syntax = "proto3"; package state.v1; import "google/protobuf/timestamp.proto"; import "logging/v1/logging.proto"; service StatusService { rpc RecentLogs(RecentLogsRequest) returns (RecentLogsResponse); // Configuration snapshot: the running configuration as the dashboard // renders it, published by the owner of configuration for the process that // displays it. PutConfigSnapshot is administrative; GetConfigSnapshot is // the UI's read (docs/architecture/migration-decisions.md, "Dashboard // configuration page"). rpc PutConfigSnapshot(PutConfigSnapshotRequest) returns (PutConfigSnapshotResponse); rpc GetConfigSnapshot(GetConfigSnapshotRequest) returns (GetConfigSnapshotResponse); // Channel status is what the process HOSTING the channels observes about them: // one row per channel, written by the Messaging Service and read by the UI // process. Administrative like the config snapshot, and for the same reason -- // a task-scoped grant reaches neither, so authorizesTaskScopedCall admits only // the administrative token. It is runtime state rather than a settings // document, which is why it is not a ControlPlaneService resource kind. rpc PutChannelStatus(PutChannelStatusRequest) returns (PutChannelStatusResponse); rpc ListChannelStatus(ListChannelStatusRequest) returns (ListChannelStatusResponse); // Apply status: which version of a control-plane resource each process is // running, and why it could not. Every process that applies a resource // publishes; the UI process reads (docs/prds/control-plane-apply-status.md). // Both are administrative. rpc PutApplyStatus(PutApplyStatusRequest) returns (PutApplyStatusResponse); rpc ListApplyStatus(ListApplyStatusRequest) returns (ListApplyStatusResponse); // Presence: every running service instance re-stamps one record, so a // record past the staleness window means that instance is down. // Administrative. rpc PutPresence(PutPresenceRequest) returns (PutPresenceResponse); rpc ListPresence(ListPresenceRequest) returns (ListPresenceResponse); } // ConfigSnapshot carries the dashboard's configuration projection. document // is opaque to the store: its shape belongs to the producer and the page that // reads it, and schema names that shape so a reader can refuse one it does // not understand. It is secret-free at the producer -- the projection carries // an API key's environment variable name and whether it resolved, never a // value. message ConfigSnapshot { string schema = 1; bytes document = 2; google.protobuf.Timestamp published_at = 3; } message PutConfigSnapshotRequest { ConfigSnapshot snapshot = 1; } message PutConfigSnapshotResponse {} message GetConfigSnapshotRequest {} message GetConfigSnapshotResponse { ConfigSnapshot snapshot = 1; bool found = 2; } // ChannelStatus is one channel's runtime state, as the process hosting it // observes it. ReloadSupported is a capability declaration, not a request: the // service reports it, so a reader may offer a reload action -- but asking for one // travels on its own surface, because a transient request and a durable state do // not share a lifetime. message ChannelStatus { string id = 1; string name = 2; string state = 3; string detail = 4; bool configured = 5; bool reload_supported = 6; google.protobuf.Timestamp observed_at = 7; } message PutChannelStatusRequest { repeated ChannelStatus channels = 1; } message PutChannelStatusResponse {} message ListChannelStatusRequest {} message ListChannelStatusResponse { repeated ChannelStatus channels = 1; } // ApplyStatus is one process's report about one control-plane resource kind. // applied_version is the version that process is running; error is set when it // could not apply what the store returned, and leaves applied_version at the // last version it did apply. reported_at is re-stamped on an interval, so a // record older than the staleness window belongs to a process that has stopped // running (docs/prds/control-plane-apply-status.md). message ApplyStatus { string process = 1; string kind = 2; int64 applied_version = 3; string error = 4; google.protobuf.Timestamp reported_at = 5; } message PutApplyStatusRequest { ApplyStatus status = 1; } message PutApplyStatusResponse {} message ListApplyStatusRequest {} message ListApplyStatusResponse { repeated ApplyStatus statuses = 1; } // Presence is one running service instance. ready and detail summarise its // readiness probes; detail names the degraded ones. message DependencyCheck { string name = 1; string status = 2; bool ready = 3; string detail = 4; } message Presence { string service = 1; string instance_id = 2; string version = 3; string install_type = 4; google.protobuf.Timestamp started_at = 5; google.protobuf.Timestamp reported_at = 6; bool ready = 7; string detail = 8; repeated DependencyCheck checks = 9; } message PutPresenceRequest { Presence presence = 1; } message PutPresenceResponse {} message ListPresenceRequest {} message ListPresenceResponse { repeated Presence presences = 1; } message RecentLogsRequest { logging.v1.LogQuery query = 1; } message RecentLogsResponse { logging.v1.LogSnapshot snapshot = 1; }