syntax = "proto3"; package state.v1; import "state/v1/types.proto"; service TaskEventService { rpc InsertEvent(InsertEventRequest) returns (InsertEventResponse); rpc EventsSince(EventsSinceRequest) returns (EventsSinceResponse); rpc TaskEvents(TaskEventsRequest) returns (TaskEventsResponse); } message InsertEventRequest { Event event = 1; } message InsertEventResponse { int64 id = 1; } message EventsSinceRequest { // since_id is the opaque resume cursor returned by the previous page (the SSE // id: field, echoed back as Last-Event-ID). Empty means "from the // beginning". The field keeps its name and number so the wire name stays // put; only its type widened, from the SQLite rowid to the fixed-width // "|" cursor. string since_id = 1; int64 limit = 2; } message EventsSinceResponse { repeated Event events = 1; } message TaskEventsRequest { int64 task_id = 1; } message TaskEventsResponse { repeated Event events = 1; }