diff --git a/CLAUDE.md b/CLAUDE.md index ca305b6ee..a2f6a27a9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -187,7 +187,7 @@ structures found in legacy packages. changing this package or its callers. - The proto (`proto/state/v1/state.proto`, service `StateStoreService`, package `statev1` in `internal/contracts/state/v1/`) is one gRPC service - fronting every ratified store contract (40 RPCs); the Go consumer facades + fronting every ratified store contract (42 RPCs); the Go consumer facades stay narrow (`workflow.Store`, `store.TaskStore`, etc., all ≤8 methods except the `TaskStore` composite) via `staterpc.Client`'s multiple `var _` assertions -- never add a Go interface method without a matching RPC. diff --git a/docs/prds/service-decomposition.md b/docs/prds/service-decomposition.md index 73150b89a..f1b73588b 100644 --- a/docs/prds/service-decomposition.md +++ b/docs/prds/service-decomposition.md @@ -201,7 +201,7 @@ recorded in [`ui-service-boundary.md`](ui-service-boundary.md). **RATIFIED (2026-09-06, beads archie-core-8cda.4.1).** The authoritative contract boundary & transport design for this is fixed in `docs/prds/state-store-contract.md` (rev. 2c): one `StateStore` gRPC service, - 40 RPCs; **ownership split** — consumer-owned `workflow.Store` + + 42 RPCs; **ownership split** — consumer-owned `workflow.Store` + `workflow.Task`/`Status`/`Source` in the workflow domain (dependency rules #2/#7), producer-owned daemon/webui store surfaces in `internal/store`; the `Task`/`Status`/`Source` + interface relocation is a Phase 2 diff --git a/docs/prds/state-store-contract.md b/docs/prds/state-store-contract.md index 762dee8e5..80695956f 100644 --- a/docs/prds/state-store-contract.md +++ b/docs/prds/state-store-contract.md @@ -248,10 +248,19 @@ Methods are named after the store methods so the mapping is unambiguous. `workfl | Binding | `InsertBinding`, `GetBinding`, `ListBindings`, `UpdateBinding`, `DeleteBinding`, `ApproveBinding` | | Dispatch | `ArmedBindingsForSource`, `RecordDispatch`, `ListUndispatchedCaptures` | | BindingTaskCreator | `EnqueueBindingTask` | +| Config snapshot | `PutConfigSnapshot`, `GetConfigSnapshot` | -That is **40 unique RPCs** across one service (the `TaskEvents.Close` method is dropped). +That is **42 unique RPCs** across one service (the `TaskEvents.Close` method is dropped). `Close()` is **excluded** from the wire (it is server lifecycle, not a client call) — see §11. +The config-snapshot pair was added by `archie-core-ymut` (see +`docs/architecture/migration-decisions.md`, "Dashboard configuration page"). It is the one +surface whose writer is the daemon and whose reader is the UI process, and both RPCs are +administrative: `authorizesTaskScopedCall` is deny-by-default, so a task-scoped grant reaches +neither. `ConfigSnapshot.document` is opaque to this contract — the store neither parses nor +validates it, and `schema` names the projection so a reader can refuse a shape it does not +understand. + ### Domain types and `values.go` mapping `values.go` maps proto ⇄ these types. The task model for the **agent** path is the domain-owned @@ -619,7 +628,7 @@ an explicit operator decision. (`workflow.Store` + `workflow.Task`/`Status`/`Source`, per dependency rules #2 and #7); daemon/webui store surfaces stay **producer-owned** in `internal/store`. `store.WorkflowStore` is superseded by `workflow.Store`. -- **One `StateStore` gRPC service** (40 RPCs, grouped by contract) + narrow Go consumer facades +- **One `StateStore` gRPC service** (42 RPCs, grouped by contract) + narrow Go consumer facades (≤8) on `staterpc.Client` — mirrors the single-`ChatService` precedent. - **Domain type relocation** (`Task`/`Status`/`Source` → `internal/domain/workflow`) is a Phase 2 prerequisite, pulled forward from migration-decisions §4 (minimal bound, diff --git a/internal/app/archied/state_store.go b/internal/app/archied/state_store.go index 4e4147a70..e0be38c0b 100644 --- a/internal/app/archied/state_store.go +++ b/internal/app/archied/state_store.go @@ -140,6 +140,9 @@ func (b *boot) stateStoreDeps(grants *staterpc.TaskGrants) staterpc.Deps { if btc, ok := b.st.(store.BindingTaskCreator); ok { deps.BindingTaskCreator = btc } + if css, ok := b.st.(store.ConfigSnapshotStore); ok { + deps.ConfigSnapshots = css + } return deps } diff --git a/internal/contracts/state/v1/state.pb.go b/internal/contracts/state/v1/state.pb.go index 025aaf300..a1b36fdc6 100644 --- a/internal/contracts/state/v1/state.pb.go +++ b/internal/contracts/state/v1/state.pb.go @@ -3387,6 +3387,240 @@ func (x *TokensByDayResponse) GetTokens() []*DayTokens { return nil } +// 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. +type ConfigSnapshot struct { + state protoimpl.MessageState `protogen:"open.v1"` + Schema string `protobuf:"bytes,1,opt,name=schema,proto3" json:"schema,omitempty"` + Document []byte `protobuf:"bytes,2,opt,name=document,proto3" json:"document,omitempty"` + PublishedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=published_at,json=publishedAt,proto3" json:"published_at,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ConfigSnapshot) Reset() { + *x = ConfigSnapshot{} + mi := &file_state_v1_state_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ConfigSnapshot) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ConfigSnapshot) ProtoMessage() {} + +func (x *ConfigSnapshot) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_state_proto_msgTypes[60] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ConfigSnapshot.ProtoReflect.Descriptor instead. +func (*ConfigSnapshot) Descriptor() ([]byte, []int) { + return file_state_v1_state_proto_rawDescGZIP(), []int{60} +} + +func (x *ConfigSnapshot) GetSchema() string { + if x != nil { + return x.Schema + } + return "" +} + +func (x *ConfigSnapshot) GetDocument() []byte { + if x != nil { + return x.Document + } + return nil +} + +func (x *ConfigSnapshot) GetPublishedAt() *timestamppb.Timestamp { + if x != nil { + return x.PublishedAt + } + return nil +} + +type PutConfigSnapshotRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Snapshot *ConfigSnapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PutConfigSnapshotRequest) Reset() { + *x = PutConfigSnapshotRequest{} + mi := &file_state_v1_state_proto_msgTypes[61] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PutConfigSnapshotRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutConfigSnapshotRequest) ProtoMessage() {} + +func (x *PutConfigSnapshotRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_state_proto_msgTypes[61] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutConfigSnapshotRequest.ProtoReflect.Descriptor instead. +func (*PutConfigSnapshotRequest) Descriptor() ([]byte, []int) { + return file_state_v1_state_proto_rawDescGZIP(), []int{61} +} + +func (x *PutConfigSnapshotRequest) GetSnapshot() *ConfigSnapshot { + if x != nil { + return x.Snapshot + } + return nil +} + +type PutConfigSnapshotResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PutConfigSnapshotResponse) Reset() { + *x = PutConfigSnapshotResponse{} + mi := &file_state_v1_state_proto_msgTypes[62] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PutConfigSnapshotResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PutConfigSnapshotResponse) ProtoMessage() {} + +func (x *PutConfigSnapshotResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_state_proto_msgTypes[62] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PutConfigSnapshotResponse.ProtoReflect.Descriptor instead. +func (*PutConfigSnapshotResponse) Descriptor() ([]byte, []int) { + return file_state_v1_state_proto_rawDescGZIP(), []int{62} +} + +type GetConfigSnapshotRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetConfigSnapshotRequest) Reset() { + *x = GetConfigSnapshotRequest{} + mi := &file_state_v1_state_proto_msgTypes[63] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConfigSnapshotRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConfigSnapshotRequest) ProtoMessage() {} + +func (x *GetConfigSnapshotRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_state_proto_msgTypes[63] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConfigSnapshotRequest.ProtoReflect.Descriptor instead. +func (*GetConfigSnapshotRequest) Descriptor() ([]byte, []int) { + return file_state_v1_state_proto_rawDescGZIP(), []int{63} +} + +type GetConfigSnapshotResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + Snapshot *ConfigSnapshot `protobuf:"bytes,1,opt,name=snapshot,proto3" json:"snapshot,omitempty"` + Found bool `protobuf:"varint,2,opt,name=found,proto3" json:"found,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetConfigSnapshotResponse) Reset() { + *x = GetConfigSnapshotResponse{} + mi := &file_state_v1_state_proto_msgTypes[64] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetConfigSnapshotResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetConfigSnapshotResponse) ProtoMessage() {} + +func (x *GetConfigSnapshotResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_state_proto_msgTypes[64] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetConfigSnapshotResponse.ProtoReflect.Descriptor instead. +func (*GetConfigSnapshotResponse) Descriptor() ([]byte, []int) { + return file_state_v1_state_proto_rawDescGZIP(), []int{64} +} + +func (x *GetConfigSnapshotResponse) GetSnapshot() *ConfigSnapshot { + if x != nil { + return x.Snapshot + } + return nil +} + +func (x *GetConfigSnapshotResponse) GetFound() bool { + if x != nil { + return x.Found + } + return false +} + type InsertCaptureRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Capture *CapturedEvent `protobuf:"bytes,1,opt,name=capture,proto3" json:"capture,omitempty"` @@ -3398,7 +3632,7 @@ type InsertCaptureRequest struct { func (x *InsertCaptureRequest) Reset() { *x = InsertCaptureRequest{} - mi := &file_state_v1_state_proto_msgTypes[60] + mi := &file_state_v1_state_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3410,7 +3644,7 @@ func (x *InsertCaptureRequest) String() string { func (*InsertCaptureRequest) ProtoMessage() {} func (x *InsertCaptureRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[60] + mi := &file_state_v1_state_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3423,7 +3657,7 @@ func (x *InsertCaptureRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use InsertCaptureRequest.ProtoReflect.Descriptor instead. func (*InsertCaptureRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{60} + return file_state_v1_state_proto_rawDescGZIP(), []int{65} } func (x *InsertCaptureRequest) GetCapture() *CapturedEvent { @@ -3456,7 +3690,7 @@ type InsertCaptureResponse struct { func (x *InsertCaptureResponse) Reset() { *x = InsertCaptureResponse{} - mi := &file_state_v1_state_proto_msgTypes[61] + mi := &file_state_v1_state_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3468,7 +3702,7 @@ func (x *InsertCaptureResponse) String() string { func (*InsertCaptureResponse) ProtoMessage() {} func (x *InsertCaptureResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[61] + mi := &file_state_v1_state_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3481,7 +3715,7 @@ func (x *InsertCaptureResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use InsertCaptureResponse.ProtoReflect.Descriptor instead. func (*InsertCaptureResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{61} + return file_state_v1_state_proto_rawDescGZIP(), []int{66} } func (x *InsertCaptureResponse) GetId() int64 { @@ -3500,7 +3734,7 @@ type ListCapturesRequest struct { func (x *ListCapturesRequest) Reset() { *x = ListCapturesRequest{} - mi := &file_state_v1_state_proto_msgTypes[62] + mi := &file_state_v1_state_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3512,7 +3746,7 @@ func (x *ListCapturesRequest) String() string { func (*ListCapturesRequest) ProtoMessage() {} func (x *ListCapturesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[62] + mi := &file_state_v1_state_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3525,7 +3759,7 @@ func (x *ListCapturesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListCapturesRequest.ProtoReflect.Descriptor instead. func (*ListCapturesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{62} + return file_state_v1_state_proto_rawDescGZIP(), []int{67} } func (x *ListCapturesRequest) GetLimit() int64 { @@ -3544,7 +3778,7 @@ type ListCapturesResponse struct { func (x *ListCapturesResponse) Reset() { *x = ListCapturesResponse{} - mi := &file_state_v1_state_proto_msgTypes[63] + mi := &file_state_v1_state_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3556,7 +3790,7 @@ func (x *ListCapturesResponse) String() string { func (*ListCapturesResponse) ProtoMessage() {} func (x *ListCapturesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[63] + mi := &file_state_v1_state_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3569,7 +3803,7 @@ func (x *ListCapturesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListCapturesResponse.ProtoReflect.Descriptor instead. func (*ListCapturesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{63} + return file_state_v1_state_proto_rawDescGZIP(), []int{68} } func (x *ListCapturesResponse) GetCaptures() []*CapturedEvent { @@ -3588,7 +3822,7 @@ type StreamCapturesRequest struct { func (x *StreamCapturesRequest) Reset() { *x = StreamCapturesRequest{} - mi := &file_state_v1_state_proto_msgTypes[64] + mi := &file_state_v1_state_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3600,7 +3834,7 @@ func (x *StreamCapturesRequest) String() string { func (*StreamCapturesRequest) ProtoMessage() {} func (x *StreamCapturesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[64] + mi := &file_state_v1_state_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3613,7 +3847,7 @@ func (x *StreamCapturesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamCapturesRequest.ProtoReflect.Descriptor instead. func (*StreamCapturesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{64} + return file_state_v1_state_proto_rawDescGZIP(), []int{69} } func (x *StreamCapturesRequest) GetLimit() int64 { @@ -3633,7 +3867,7 @@ type StreamCapturesResponse struct { func (x *StreamCapturesResponse) Reset() { *x = StreamCapturesResponse{} - mi := &file_state_v1_state_proto_msgTypes[65] + mi := &file_state_v1_state_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3645,7 +3879,7 @@ func (x *StreamCapturesResponse) String() string { func (*StreamCapturesResponse) ProtoMessage() {} func (x *StreamCapturesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[65] + mi := &file_state_v1_state_proto_msgTypes[70] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3658,7 +3892,7 @@ func (x *StreamCapturesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamCapturesResponse.ProtoReflect.Descriptor instead. func (*StreamCapturesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{65} + return file_state_v1_state_proto_rawDescGZIP(), []int{70} } func (x *StreamCapturesResponse) GetCapture() *CapturedEvent { @@ -3677,7 +3911,7 @@ type InsertMappingRequest struct { func (x *InsertMappingRequest) Reset() { *x = InsertMappingRequest{} - mi := &file_state_v1_state_proto_msgTypes[66] + mi := &file_state_v1_state_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3689,7 +3923,7 @@ func (x *InsertMappingRequest) String() string { func (*InsertMappingRequest) ProtoMessage() {} func (x *InsertMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[66] + mi := &file_state_v1_state_proto_msgTypes[71] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3702,7 +3936,7 @@ func (x *InsertMappingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use InsertMappingRequest.ProtoReflect.Descriptor instead. func (*InsertMappingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{66} + return file_state_v1_state_proto_rawDescGZIP(), []int{71} } func (x *InsertMappingRequest) GetMapping() *Mapping { @@ -3721,7 +3955,7 @@ type InsertMappingResponse struct { func (x *InsertMappingResponse) Reset() { *x = InsertMappingResponse{} - mi := &file_state_v1_state_proto_msgTypes[67] + mi := &file_state_v1_state_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3733,7 +3967,7 @@ func (x *InsertMappingResponse) String() string { func (*InsertMappingResponse) ProtoMessage() {} func (x *InsertMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[67] + mi := &file_state_v1_state_proto_msgTypes[72] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3746,7 +3980,7 @@ func (x *InsertMappingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use InsertMappingResponse.ProtoReflect.Descriptor instead. func (*InsertMappingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{67} + return file_state_v1_state_proto_rawDescGZIP(), []int{72} } func (x *InsertMappingResponse) GetId() int64 { @@ -3765,7 +3999,7 @@ type GetMappingRequest struct { func (x *GetMappingRequest) Reset() { *x = GetMappingRequest{} - mi := &file_state_v1_state_proto_msgTypes[68] + mi := &file_state_v1_state_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3777,7 +4011,7 @@ func (x *GetMappingRequest) String() string { func (*GetMappingRequest) ProtoMessage() {} func (x *GetMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[68] + mi := &file_state_v1_state_proto_msgTypes[73] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3790,7 +4024,7 @@ func (x *GetMappingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetMappingRequest.ProtoReflect.Descriptor instead. func (*GetMappingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{68} + return file_state_v1_state_proto_rawDescGZIP(), []int{73} } func (x *GetMappingRequest) GetId() int64 { @@ -3810,7 +4044,7 @@ type GetMappingResponse struct { func (x *GetMappingResponse) Reset() { *x = GetMappingResponse{} - mi := &file_state_v1_state_proto_msgTypes[69] + mi := &file_state_v1_state_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3822,7 +4056,7 @@ func (x *GetMappingResponse) String() string { func (*GetMappingResponse) ProtoMessage() {} func (x *GetMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[69] + mi := &file_state_v1_state_proto_msgTypes[74] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3835,7 +4069,7 @@ func (x *GetMappingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetMappingResponse.ProtoReflect.Descriptor instead. func (*GetMappingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{69} + return file_state_v1_state_proto_rawDescGZIP(), []int{74} } func (x *GetMappingResponse) GetMapping() *Mapping { @@ -3860,7 +4094,7 @@ type ListMappingsRequest struct { func (x *ListMappingsRequest) Reset() { *x = ListMappingsRequest{} - mi := &file_state_v1_state_proto_msgTypes[70] + mi := &file_state_v1_state_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3872,7 +4106,7 @@ func (x *ListMappingsRequest) String() string { func (*ListMappingsRequest) ProtoMessage() {} func (x *ListMappingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[70] + mi := &file_state_v1_state_proto_msgTypes[75] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3885,7 +4119,7 @@ func (x *ListMappingsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMappingsRequest.ProtoReflect.Descriptor instead. func (*ListMappingsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{70} + return file_state_v1_state_proto_rawDescGZIP(), []int{75} } type ListMappingsResponse struct { @@ -3897,7 +4131,7 @@ type ListMappingsResponse struct { func (x *ListMappingsResponse) Reset() { *x = ListMappingsResponse{} - mi := &file_state_v1_state_proto_msgTypes[71] + mi := &file_state_v1_state_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3909,7 +4143,7 @@ func (x *ListMappingsResponse) String() string { func (*ListMappingsResponse) ProtoMessage() {} func (x *ListMappingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[71] + mi := &file_state_v1_state_proto_msgTypes[76] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3922,7 +4156,7 @@ func (x *ListMappingsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListMappingsResponse.ProtoReflect.Descriptor instead. func (*ListMappingsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{71} + return file_state_v1_state_proto_rawDescGZIP(), []int{76} } func (x *ListMappingsResponse) GetMappings() []*Mapping { @@ -3941,7 +4175,7 @@ type UpdateMappingRequest struct { func (x *UpdateMappingRequest) Reset() { *x = UpdateMappingRequest{} - mi := &file_state_v1_state_proto_msgTypes[72] + mi := &file_state_v1_state_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3953,7 +4187,7 @@ func (x *UpdateMappingRequest) String() string { func (*UpdateMappingRequest) ProtoMessage() {} func (x *UpdateMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[72] + mi := &file_state_v1_state_proto_msgTypes[77] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3966,7 +4200,7 @@ func (x *UpdateMappingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateMappingRequest.ProtoReflect.Descriptor instead. func (*UpdateMappingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{72} + return file_state_v1_state_proto_rawDescGZIP(), []int{77} } func (x *UpdateMappingRequest) GetMapping() *Mapping { @@ -3984,7 +4218,7 @@ type UpdateMappingResponse struct { func (x *UpdateMappingResponse) Reset() { *x = UpdateMappingResponse{} - mi := &file_state_v1_state_proto_msgTypes[73] + mi := &file_state_v1_state_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3996,7 +4230,7 @@ func (x *UpdateMappingResponse) String() string { func (*UpdateMappingResponse) ProtoMessage() {} func (x *UpdateMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[73] + mi := &file_state_v1_state_proto_msgTypes[78] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4009,7 +4243,7 @@ func (x *UpdateMappingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateMappingResponse.ProtoReflect.Descriptor instead. func (*UpdateMappingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{73} + return file_state_v1_state_proto_rawDescGZIP(), []int{78} } type DeleteMappingRequest struct { @@ -4021,7 +4255,7 @@ type DeleteMappingRequest struct { func (x *DeleteMappingRequest) Reset() { *x = DeleteMappingRequest{} - mi := &file_state_v1_state_proto_msgTypes[74] + mi := &file_state_v1_state_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4033,7 +4267,7 @@ func (x *DeleteMappingRequest) String() string { func (*DeleteMappingRequest) ProtoMessage() {} func (x *DeleteMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[74] + mi := &file_state_v1_state_proto_msgTypes[79] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4046,7 +4280,7 @@ func (x *DeleteMappingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteMappingRequest.ProtoReflect.Descriptor instead. func (*DeleteMappingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{74} + return file_state_v1_state_proto_rawDescGZIP(), []int{79} } func (x *DeleteMappingRequest) GetId() int64 { @@ -4064,7 +4298,7 @@ type DeleteMappingResponse struct { func (x *DeleteMappingResponse) Reset() { *x = DeleteMappingResponse{} - mi := &file_state_v1_state_proto_msgTypes[75] + mi := &file_state_v1_state_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4076,7 +4310,7 @@ func (x *DeleteMappingResponse) String() string { func (*DeleteMappingResponse) ProtoMessage() {} func (x *DeleteMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[75] + mi := &file_state_v1_state_proto_msgTypes[80] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4089,7 +4323,7 @@ func (x *DeleteMappingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteMappingResponse.ProtoReflect.Descriptor instead. func (*DeleteMappingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{75} + return file_state_v1_state_proto_rawDescGZIP(), []int{80} } type InsertBindingRequest struct { @@ -4101,7 +4335,7 @@ type InsertBindingRequest struct { func (x *InsertBindingRequest) Reset() { *x = InsertBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[76] + mi := &file_state_v1_state_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4113,7 +4347,7 @@ func (x *InsertBindingRequest) String() string { func (*InsertBindingRequest) ProtoMessage() {} func (x *InsertBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[76] + mi := &file_state_v1_state_proto_msgTypes[81] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4126,7 +4360,7 @@ func (x *InsertBindingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use InsertBindingRequest.ProtoReflect.Descriptor instead. func (*InsertBindingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{76} + return file_state_v1_state_proto_rawDescGZIP(), []int{81} } func (x *InsertBindingRequest) GetBinding() *Binding { @@ -4145,7 +4379,7 @@ type InsertBindingResponse struct { func (x *InsertBindingResponse) Reset() { *x = InsertBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[77] + mi := &file_state_v1_state_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4157,7 +4391,7 @@ func (x *InsertBindingResponse) String() string { func (*InsertBindingResponse) ProtoMessage() {} func (x *InsertBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[77] + mi := &file_state_v1_state_proto_msgTypes[82] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4170,7 +4404,7 @@ func (x *InsertBindingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use InsertBindingResponse.ProtoReflect.Descriptor instead. func (*InsertBindingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{77} + return file_state_v1_state_proto_rawDescGZIP(), []int{82} } func (x *InsertBindingResponse) GetId() int64 { @@ -4189,7 +4423,7 @@ type GetBindingRequest struct { func (x *GetBindingRequest) Reset() { *x = GetBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[78] + mi := &file_state_v1_state_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4201,7 +4435,7 @@ func (x *GetBindingRequest) String() string { func (*GetBindingRequest) ProtoMessage() {} func (x *GetBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[78] + mi := &file_state_v1_state_proto_msgTypes[83] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4214,7 +4448,7 @@ func (x *GetBindingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBindingRequest.ProtoReflect.Descriptor instead. func (*GetBindingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{78} + return file_state_v1_state_proto_rawDescGZIP(), []int{83} } func (x *GetBindingRequest) GetId() int64 { @@ -4234,7 +4468,7 @@ type GetBindingResponse struct { func (x *GetBindingResponse) Reset() { *x = GetBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[79] + mi := &file_state_v1_state_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4246,7 +4480,7 @@ func (x *GetBindingResponse) String() string { func (*GetBindingResponse) ProtoMessage() {} func (x *GetBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[79] + mi := &file_state_v1_state_proto_msgTypes[84] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4259,7 +4493,7 @@ func (x *GetBindingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetBindingResponse.ProtoReflect.Descriptor instead. func (*GetBindingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{79} + return file_state_v1_state_proto_rawDescGZIP(), []int{84} } func (x *GetBindingResponse) GetBinding() *Binding { @@ -4284,7 +4518,7 @@ type ListBindingsRequest struct { func (x *ListBindingsRequest) Reset() { *x = ListBindingsRequest{} - mi := &file_state_v1_state_proto_msgTypes[80] + mi := &file_state_v1_state_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4296,7 +4530,7 @@ func (x *ListBindingsRequest) String() string { func (*ListBindingsRequest) ProtoMessage() {} func (x *ListBindingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[80] + mi := &file_state_v1_state_proto_msgTypes[85] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4309,7 +4543,7 @@ func (x *ListBindingsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListBindingsRequest.ProtoReflect.Descriptor instead. func (*ListBindingsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{80} + return file_state_v1_state_proto_rawDescGZIP(), []int{85} } type ListBindingsResponse struct { @@ -4321,7 +4555,7 @@ type ListBindingsResponse struct { func (x *ListBindingsResponse) Reset() { *x = ListBindingsResponse{} - mi := &file_state_v1_state_proto_msgTypes[81] + mi := &file_state_v1_state_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4333,7 +4567,7 @@ func (x *ListBindingsResponse) String() string { func (*ListBindingsResponse) ProtoMessage() {} func (x *ListBindingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[81] + mi := &file_state_v1_state_proto_msgTypes[86] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4346,7 +4580,7 @@ func (x *ListBindingsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListBindingsResponse.ProtoReflect.Descriptor instead. func (*ListBindingsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{81} + return file_state_v1_state_proto_rawDescGZIP(), []int{86} } func (x *ListBindingsResponse) GetBindings() []*Binding { @@ -4365,7 +4599,7 @@ type UpdateBindingRequest struct { func (x *UpdateBindingRequest) Reset() { *x = UpdateBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[82] + mi := &file_state_v1_state_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4377,7 +4611,7 @@ func (x *UpdateBindingRequest) String() string { func (*UpdateBindingRequest) ProtoMessage() {} func (x *UpdateBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[82] + mi := &file_state_v1_state_proto_msgTypes[87] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4390,7 +4624,7 @@ func (x *UpdateBindingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateBindingRequest.ProtoReflect.Descriptor instead. func (*UpdateBindingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{82} + return file_state_v1_state_proto_rawDescGZIP(), []int{87} } func (x *UpdateBindingRequest) GetBinding() *Binding { @@ -4408,7 +4642,7 @@ type UpdateBindingResponse struct { func (x *UpdateBindingResponse) Reset() { *x = UpdateBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[83] + mi := &file_state_v1_state_proto_msgTypes[88] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4420,7 +4654,7 @@ func (x *UpdateBindingResponse) String() string { func (*UpdateBindingResponse) ProtoMessage() {} func (x *UpdateBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[83] + mi := &file_state_v1_state_proto_msgTypes[88] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4433,7 +4667,7 @@ func (x *UpdateBindingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateBindingResponse.ProtoReflect.Descriptor instead. func (*UpdateBindingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{83} + return file_state_v1_state_proto_rawDescGZIP(), []int{88} } type DeleteBindingRequest struct { @@ -4445,7 +4679,7 @@ type DeleteBindingRequest struct { func (x *DeleteBindingRequest) Reset() { *x = DeleteBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[84] + mi := &file_state_v1_state_proto_msgTypes[89] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4457,7 +4691,7 @@ func (x *DeleteBindingRequest) String() string { func (*DeleteBindingRequest) ProtoMessage() {} func (x *DeleteBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[84] + mi := &file_state_v1_state_proto_msgTypes[89] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4470,7 +4704,7 @@ func (x *DeleteBindingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteBindingRequest.ProtoReflect.Descriptor instead. func (*DeleteBindingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{84} + return file_state_v1_state_proto_rawDescGZIP(), []int{89} } func (x *DeleteBindingRequest) GetId() int64 { @@ -4488,7 +4722,7 @@ type DeleteBindingResponse struct { func (x *DeleteBindingResponse) Reset() { *x = DeleteBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[85] + mi := &file_state_v1_state_proto_msgTypes[90] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4500,7 +4734,7 @@ func (x *DeleteBindingResponse) String() string { func (*DeleteBindingResponse) ProtoMessage() {} func (x *DeleteBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[85] + mi := &file_state_v1_state_proto_msgTypes[90] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4513,7 +4747,7 @@ func (x *DeleteBindingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeleteBindingResponse.ProtoReflect.Descriptor instead. func (*DeleteBindingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{85} + return file_state_v1_state_proto_rawDescGZIP(), []int{90} } type ApproveBindingRequest struct { @@ -4525,7 +4759,7 @@ type ApproveBindingRequest struct { func (x *ApproveBindingRequest) Reset() { *x = ApproveBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[86] + mi := &file_state_v1_state_proto_msgTypes[91] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4537,7 +4771,7 @@ func (x *ApproveBindingRequest) String() string { func (*ApproveBindingRequest) ProtoMessage() {} func (x *ApproveBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[86] + mi := &file_state_v1_state_proto_msgTypes[91] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4550,7 +4784,7 @@ func (x *ApproveBindingRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ApproveBindingRequest.ProtoReflect.Descriptor instead. func (*ApproveBindingRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{86} + return file_state_v1_state_proto_rawDescGZIP(), []int{91} } func (x *ApproveBindingRequest) GetId() int64 { @@ -4568,7 +4802,7 @@ type ApproveBindingResponse struct { func (x *ApproveBindingResponse) Reset() { *x = ApproveBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[87] + mi := &file_state_v1_state_proto_msgTypes[92] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4580,7 +4814,7 @@ func (x *ApproveBindingResponse) String() string { func (*ApproveBindingResponse) ProtoMessage() {} func (x *ApproveBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[87] + mi := &file_state_v1_state_proto_msgTypes[92] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4593,7 +4827,7 @@ func (x *ApproveBindingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ApproveBindingResponse.ProtoReflect.Descriptor instead. func (*ApproveBindingResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{87} + return file_state_v1_state_proto_rawDescGZIP(), []int{92} } type ArmedBindingsForSourceRequest struct { @@ -4605,7 +4839,7 @@ type ArmedBindingsForSourceRequest struct { func (x *ArmedBindingsForSourceRequest) Reset() { *x = ArmedBindingsForSourceRequest{} - mi := &file_state_v1_state_proto_msgTypes[88] + mi := &file_state_v1_state_proto_msgTypes[93] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4617,7 +4851,7 @@ func (x *ArmedBindingsForSourceRequest) String() string { func (*ArmedBindingsForSourceRequest) ProtoMessage() {} func (x *ArmedBindingsForSourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[88] + mi := &file_state_v1_state_proto_msgTypes[93] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4630,7 +4864,7 @@ func (x *ArmedBindingsForSourceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ArmedBindingsForSourceRequest.ProtoReflect.Descriptor instead. func (*ArmedBindingsForSourceRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{88} + return file_state_v1_state_proto_rawDescGZIP(), []int{93} } func (x *ArmedBindingsForSourceRequest) GetSource() string { @@ -4649,7 +4883,7 @@ type ArmedBindingsForSourceResponse struct { func (x *ArmedBindingsForSourceResponse) Reset() { *x = ArmedBindingsForSourceResponse{} - mi := &file_state_v1_state_proto_msgTypes[89] + mi := &file_state_v1_state_proto_msgTypes[94] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4661,7 +4895,7 @@ func (x *ArmedBindingsForSourceResponse) String() string { func (*ArmedBindingsForSourceResponse) ProtoMessage() {} func (x *ArmedBindingsForSourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[89] + mi := &file_state_v1_state_proto_msgTypes[94] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4674,7 +4908,7 @@ func (x *ArmedBindingsForSourceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ArmedBindingsForSourceResponse.ProtoReflect.Descriptor instead. func (*ArmedBindingsForSourceResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{89} + return file_state_v1_state_proto_rawDescGZIP(), []int{94} } func (x *ArmedBindingsForSourceResponse) GetBindings() []*Binding { @@ -4696,7 +4930,7 @@ type RecordDispatchRequest struct { func (x *RecordDispatchRequest) Reset() { *x = RecordDispatchRequest{} - mi := &file_state_v1_state_proto_msgTypes[90] + mi := &file_state_v1_state_proto_msgTypes[95] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4708,7 +4942,7 @@ func (x *RecordDispatchRequest) String() string { func (*RecordDispatchRequest) ProtoMessage() {} func (x *RecordDispatchRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[90] + mi := &file_state_v1_state_proto_msgTypes[95] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4721,7 +4955,7 @@ func (x *RecordDispatchRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RecordDispatchRequest.ProtoReflect.Descriptor instead. func (*RecordDispatchRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{90} + return file_state_v1_state_proto_rawDescGZIP(), []int{95} } func (x *RecordDispatchRequest) GetBindingId() int64 { @@ -4760,7 +4994,7 @@ type RecordDispatchResponse struct { func (x *RecordDispatchResponse) Reset() { *x = RecordDispatchResponse{} - mi := &file_state_v1_state_proto_msgTypes[91] + mi := &file_state_v1_state_proto_msgTypes[96] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4772,7 +5006,7 @@ func (x *RecordDispatchResponse) String() string { func (*RecordDispatchResponse) ProtoMessage() {} func (x *RecordDispatchResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[91] + mi := &file_state_v1_state_proto_msgTypes[96] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4785,7 +5019,7 @@ func (x *RecordDispatchResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RecordDispatchResponse.ProtoReflect.Descriptor instead. func (*RecordDispatchResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{91} + return file_state_v1_state_proto_rawDescGZIP(), []int{96} } type ListUndispatchedCapturesRequest struct { @@ -4798,7 +5032,7 @@ type ListUndispatchedCapturesRequest struct { func (x *ListUndispatchedCapturesRequest) Reset() { *x = ListUndispatchedCapturesRequest{} - mi := &file_state_v1_state_proto_msgTypes[92] + mi := &file_state_v1_state_proto_msgTypes[97] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4810,7 +5044,7 @@ func (x *ListUndispatchedCapturesRequest) String() string { func (*ListUndispatchedCapturesRequest) ProtoMessage() {} func (x *ListUndispatchedCapturesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[92] + mi := &file_state_v1_state_proto_msgTypes[97] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4823,7 +5057,7 @@ func (x *ListUndispatchedCapturesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListUndispatchedCapturesRequest.ProtoReflect.Descriptor instead. func (*ListUndispatchedCapturesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{92} + return file_state_v1_state_proto_rawDescGZIP(), []int{97} } func (x *ListUndispatchedCapturesRequest) GetSources() []string { @@ -4849,7 +5083,7 @@ type ListUndispatchedCapturesResponse struct { func (x *ListUndispatchedCapturesResponse) Reset() { *x = ListUndispatchedCapturesResponse{} - mi := &file_state_v1_state_proto_msgTypes[93] + mi := &file_state_v1_state_proto_msgTypes[98] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4861,7 +5095,7 @@ func (x *ListUndispatchedCapturesResponse) String() string { func (*ListUndispatchedCapturesResponse) ProtoMessage() {} func (x *ListUndispatchedCapturesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[93] + mi := &file_state_v1_state_proto_msgTypes[98] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4874,7 +5108,7 @@ func (x *ListUndispatchedCapturesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListUndispatchedCapturesResponse.ProtoReflect.Descriptor instead. func (*ListUndispatchedCapturesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{93} + return file_state_v1_state_proto_rawDescGZIP(), []int{98} } func (x *ListUndispatchedCapturesResponse) GetCaptures() []*CapturedEvent { @@ -4894,7 +5128,7 @@ type StreamUndispatchedCapturesRequest struct { func (x *StreamUndispatchedCapturesRequest) Reset() { *x = StreamUndispatchedCapturesRequest{} - mi := &file_state_v1_state_proto_msgTypes[94] + mi := &file_state_v1_state_proto_msgTypes[99] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4906,7 +5140,7 @@ func (x *StreamUndispatchedCapturesRequest) String() string { func (*StreamUndispatchedCapturesRequest) ProtoMessage() {} func (x *StreamUndispatchedCapturesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[94] + mi := &file_state_v1_state_proto_msgTypes[99] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4919,7 +5153,7 @@ func (x *StreamUndispatchedCapturesRequest) ProtoReflect() protoreflect.Message // Deprecated: Use StreamUndispatchedCapturesRequest.ProtoReflect.Descriptor instead. func (*StreamUndispatchedCapturesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{94} + return file_state_v1_state_proto_rawDescGZIP(), []int{99} } func (x *StreamUndispatchedCapturesRequest) GetSources() []string { @@ -4946,7 +5180,7 @@ type StreamUndispatchedCapturesResponse struct { func (x *StreamUndispatchedCapturesResponse) Reset() { *x = StreamUndispatchedCapturesResponse{} - mi := &file_state_v1_state_proto_msgTypes[95] + mi := &file_state_v1_state_proto_msgTypes[100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4958,7 +5192,7 @@ func (x *StreamUndispatchedCapturesResponse) String() string { func (*StreamUndispatchedCapturesResponse) ProtoMessage() {} func (x *StreamUndispatchedCapturesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[95] + mi := &file_state_v1_state_proto_msgTypes[100] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4971,7 +5205,7 @@ func (x *StreamUndispatchedCapturesResponse) ProtoReflect() protoreflect.Message // Deprecated: Use StreamUndispatchedCapturesResponse.ProtoReflect.Descriptor instead. func (*StreamUndispatchedCapturesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{95} + return file_state_v1_state_proto_rawDescGZIP(), []int{100} } func (x *StreamUndispatchedCapturesResponse) GetCapture() *CapturedEvent { @@ -4997,7 +5231,7 @@ type EnqueueBindingTaskRequest struct { func (x *EnqueueBindingTaskRequest) Reset() { *x = EnqueueBindingTaskRequest{} - mi := &file_state_v1_state_proto_msgTypes[96] + mi := &file_state_v1_state_proto_msgTypes[101] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5009,7 +5243,7 @@ func (x *EnqueueBindingTaskRequest) String() string { func (*EnqueueBindingTaskRequest) ProtoMessage() {} func (x *EnqueueBindingTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[96] + mi := &file_state_v1_state_proto_msgTypes[101] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5022,7 +5256,7 @@ func (x *EnqueueBindingTaskRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EnqueueBindingTaskRequest.ProtoReflect.Descriptor instead. func (*EnqueueBindingTaskRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{96} + return file_state_v1_state_proto_rawDescGZIP(), []int{101} } func (x *EnqueueBindingTaskRequest) GetOwner() string { @@ -5090,7 +5324,7 @@ type EnqueueBindingTaskResponse struct { func (x *EnqueueBindingTaskResponse) Reset() { *x = EnqueueBindingTaskResponse{} - mi := &file_state_v1_state_proto_msgTypes[97] + mi := &file_state_v1_state_proto_msgTypes[102] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5102,7 +5336,7 @@ func (x *EnqueueBindingTaskResponse) String() string { func (*EnqueueBindingTaskResponse) ProtoMessage() {} func (x *EnqueueBindingTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[97] + mi := &file_state_v1_state_proto_msgTypes[102] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5115,7 +5349,7 @@ func (x *EnqueueBindingTaskResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EnqueueBindingTaskResponse.ProtoReflect.Descriptor instead. func (*EnqueueBindingTaskResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{97} + return file_state_v1_state_proto_rawDescGZIP(), []int{102} } func (x *EnqueueBindingTaskResponse) GetTask() *Task { @@ -5364,7 +5598,18 @@ const file_state_v1_state_proto_rawDesc = "" + "\x12TokensByDayRequest\x12\x12\n" + "\x04days\x18\x01 \x01(\x03R\x04days\"B\n" + "\x13TokensByDayResponse\x12+\n" + - "\x06tokens\x18\x01 \x03(\v2\x13.state.v1.DayTokensR\x06tokens\"\x95\x01\n" + + "\x06tokens\x18\x01 \x03(\v2\x13.state.v1.DayTokensR\x06tokens\"\x83\x01\n" + + "\x0eConfigSnapshot\x12\x16\n" + + "\x06schema\x18\x01 \x01(\tR\x06schema\x12\x1a\n" + + "\bdocument\x18\x02 \x01(\fR\bdocument\x12=\n" + + "\fpublished_at\x18\x03 \x01(\v2\x1a.google.protobuf.TimestampR\vpublishedAt\"P\n" + + "\x18PutConfigSnapshotRequest\x124\n" + + "\bsnapshot\x18\x01 \x01(\v2\x18.state.v1.ConfigSnapshotR\bsnapshot\"\x1b\n" + + "\x19PutConfigSnapshotResponse\"\x1a\n" + + "\x18GetConfigSnapshotRequest\"g\n" + + "\x19GetConfigSnapshotResponse\x124\n" + + "\bsnapshot\x18\x01 \x01(\v2\x18.state.v1.ConfigSnapshotR\bsnapshot\x12\x14\n" + + "\x05found\x18\x02 \x01(\bR\x05found\"\x95\x01\n" + "\x14InsertCaptureRequest\x121\n" + "\acapture\x18\x01 \x01(\v2\x17.state.v1.CapturedEventR\acapture\x12+\n" + "\x11retention_seconds\x18\x02 \x01(\x03R\x10retentionSeconds\x12\x1d\n" + @@ -5452,7 +5697,7 @@ const file_state_v1_state_proto_rawDesc = "" + "binding_id\x18\a \x01(\x03R\tbindingId\x12'\n" + "\x0fbinding_version\x18\b \x01(\x03R\x0ebindingVersion\"@\n" + "\x1aEnqueueBindingTaskResponse\x12\"\n" + - "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task2\x95\x1c\n" + + "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task2\xd1\x1d\n" + "\x11StateStoreService\x12\\\n" + "\x11RegisterTaskGrant\x12\".state.v1.RegisterTaskGrantRequest\x1a#.state.v1.RegisterTaskGrantResponse\x12V\n" + "\x0fRevokeTaskGrant\x12 .state.v1.RevokeTaskGrantRequest\x1a!.state.v1.RevokeTaskGrantResponse\x12M\n" + @@ -5481,7 +5726,9 @@ const file_state_v1_state_proto_rawDesc = "" + "\rWorkflowStats\x12\x1e.state.v1.WorkflowStatsRequest\x1a\x1f.state.v1.WorkflowStatsResponse\x12G\n" + "\n" + "StageStats\x12\x1b.state.v1.StageStatsRequest\x1a\x1c.state.v1.StageStatsResponse\x12J\n" + - "\vTokensByDay\x12\x1c.state.v1.TokensByDayRequest\x1a\x1d.state.v1.TokensByDayResponse\x12P\n" + + "\vTokensByDay\x12\x1c.state.v1.TokensByDayRequest\x1a\x1d.state.v1.TokensByDayResponse\x12\\\n" + + "\x11PutConfigSnapshot\x12\".state.v1.PutConfigSnapshotRequest\x1a#.state.v1.PutConfigSnapshotResponse\x12\\\n" + + "\x11GetConfigSnapshot\x12\".state.v1.GetConfigSnapshotRequest\x1a#.state.v1.GetConfigSnapshotResponse\x12P\n" + "\rInsertCapture\x12\x1e.state.v1.InsertCaptureRequest\x1a\x1f.state.v1.InsertCaptureResponse\x12R\n" + "\fListCaptures\x12\x1d.state.v1.ListCapturesRequest\x1a\x1e.state.v1.ListCapturesResponse\"\x03\x88\x02\x01\x12U\n" + "\x0eStreamCaptures\x12\x1f.state.v1.StreamCapturesRequest\x1a .state.v1.StreamCapturesResponse0\x01\x12P\n" + @@ -5518,7 +5765,7 @@ func file_state_v1_state_proto_rawDescGZIP() []byte { return file_state_v1_state_proto_rawDescData } -var file_state_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 99) +var file_state_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 104) var file_state_v1_state_proto_goTypes = []any{ (*RegisterTaskGrantRequest)(nil), // 0: state.v1.RegisterTaskGrantRequest (*RegisterTaskGrantResponse)(nil), // 1: state.v1.RegisterTaskGrantResponse @@ -5580,182 +5827,194 @@ var file_state_v1_state_proto_goTypes = []any{ (*StageStatsResponse)(nil), // 57: state.v1.StageStatsResponse (*TokensByDayRequest)(nil), // 58: state.v1.TokensByDayRequest (*TokensByDayResponse)(nil), // 59: state.v1.TokensByDayResponse - (*InsertCaptureRequest)(nil), // 60: state.v1.InsertCaptureRequest - (*InsertCaptureResponse)(nil), // 61: state.v1.InsertCaptureResponse - (*ListCapturesRequest)(nil), // 62: state.v1.ListCapturesRequest - (*ListCapturesResponse)(nil), // 63: state.v1.ListCapturesResponse - (*StreamCapturesRequest)(nil), // 64: state.v1.StreamCapturesRequest - (*StreamCapturesResponse)(nil), // 65: state.v1.StreamCapturesResponse - (*InsertMappingRequest)(nil), // 66: state.v1.InsertMappingRequest - (*InsertMappingResponse)(nil), // 67: state.v1.InsertMappingResponse - (*GetMappingRequest)(nil), // 68: state.v1.GetMappingRequest - (*GetMappingResponse)(nil), // 69: state.v1.GetMappingResponse - (*ListMappingsRequest)(nil), // 70: state.v1.ListMappingsRequest - (*ListMappingsResponse)(nil), // 71: state.v1.ListMappingsResponse - (*UpdateMappingRequest)(nil), // 72: state.v1.UpdateMappingRequest - (*UpdateMappingResponse)(nil), // 73: state.v1.UpdateMappingResponse - (*DeleteMappingRequest)(nil), // 74: state.v1.DeleteMappingRequest - (*DeleteMappingResponse)(nil), // 75: state.v1.DeleteMappingResponse - (*InsertBindingRequest)(nil), // 76: state.v1.InsertBindingRequest - (*InsertBindingResponse)(nil), // 77: state.v1.InsertBindingResponse - (*GetBindingRequest)(nil), // 78: state.v1.GetBindingRequest - (*GetBindingResponse)(nil), // 79: state.v1.GetBindingResponse - (*ListBindingsRequest)(nil), // 80: state.v1.ListBindingsRequest - (*ListBindingsResponse)(nil), // 81: state.v1.ListBindingsResponse - (*UpdateBindingRequest)(nil), // 82: state.v1.UpdateBindingRequest - (*UpdateBindingResponse)(nil), // 83: state.v1.UpdateBindingResponse - (*DeleteBindingRequest)(nil), // 84: state.v1.DeleteBindingRequest - (*DeleteBindingResponse)(nil), // 85: state.v1.DeleteBindingResponse - (*ApproveBindingRequest)(nil), // 86: state.v1.ApproveBindingRequest - (*ApproveBindingResponse)(nil), // 87: state.v1.ApproveBindingResponse - (*ArmedBindingsForSourceRequest)(nil), // 88: state.v1.ArmedBindingsForSourceRequest - (*ArmedBindingsForSourceResponse)(nil), // 89: state.v1.ArmedBindingsForSourceResponse - (*RecordDispatchRequest)(nil), // 90: state.v1.RecordDispatchRequest - (*RecordDispatchResponse)(nil), // 91: state.v1.RecordDispatchResponse - (*ListUndispatchedCapturesRequest)(nil), // 92: state.v1.ListUndispatchedCapturesRequest - (*ListUndispatchedCapturesResponse)(nil), // 93: state.v1.ListUndispatchedCapturesResponse - (*StreamUndispatchedCapturesRequest)(nil), // 94: state.v1.StreamUndispatchedCapturesRequest - (*StreamUndispatchedCapturesResponse)(nil), // 95: state.v1.StreamUndispatchedCapturesResponse - (*EnqueueBindingTaskRequest)(nil), // 96: state.v1.EnqueueBindingTaskRequest - (*EnqueueBindingTaskResponse)(nil), // 97: state.v1.EnqueueBindingTaskResponse - nil, // 98: state.v1.StatusCountsResponse.CountsEntry - (*timestamppb.Timestamp)(nil), // 99: google.protobuf.Timestamp + (*ConfigSnapshot)(nil), // 60: state.v1.ConfigSnapshot + (*PutConfigSnapshotRequest)(nil), // 61: state.v1.PutConfigSnapshotRequest + (*PutConfigSnapshotResponse)(nil), // 62: state.v1.PutConfigSnapshotResponse + (*GetConfigSnapshotRequest)(nil), // 63: state.v1.GetConfigSnapshotRequest + (*GetConfigSnapshotResponse)(nil), // 64: state.v1.GetConfigSnapshotResponse + (*InsertCaptureRequest)(nil), // 65: state.v1.InsertCaptureRequest + (*InsertCaptureResponse)(nil), // 66: state.v1.InsertCaptureResponse + (*ListCapturesRequest)(nil), // 67: state.v1.ListCapturesRequest + (*ListCapturesResponse)(nil), // 68: state.v1.ListCapturesResponse + (*StreamCapturesRequest)(nil), // 69: state.v1.StreamCapturesRequest + (*StreamCapturesResponse)(nil), // 70: state.v1.StreamCapturesResponse + (*InsertMappingRequest)(nil), // 71: state.v1.InsertMappingRequest + (*InsertMappingResponse)(nil), // 72: state.v1.InsertMappingResponse + (*GetMappingRequest)(nil), // 73: state.v1.GetMappingRequest + (*GetMappingResponse)(nil), // 74: state.v1.GetMappingResponse + (*ListMappingsRequest)(nil), // 75: state.v1.ListMappingsRequest + (*ListMappingsResponse)(nil), // 76: state.v1.ListMappingsResponse + (*UpdateMappingRequest)(nil), // 77: state.v1.UpdateMappingRequest + (*UpdateMappingResponse)(nil), // 78: state.v1.UpdateMappingResponse + (*DeleteMappingRequest)(nil), // 79: state.v1.DeleteMappingRequest + (*DeleteMappingResponse)(nil), // 80: state.v1.DeleteMappingResponse + (*InsertBindingRequest)(nil), // 81: state.v1.InsertBindingRequest + (*InsertBindingResponse)(nil), // 82: state.v1.InsertBindingResponse + (*GetBindingRequest)(nil), // 83: state.v1.GetBindingRequest + (*GetBindingResponse)(nil), // 84: state.v1.GetBindingResponse + (*ListBindingsRequest)(nil), // 85: state.v1.ListBindingsRequest + (*ListBindingsResponse)(nil), // 86: state.v1.ListBindingsResponse + (*UpdateBindingRequest)(nil), // 87: state.v1.UpdateBindingRequest + (*UpdateBindingResponse)(nil), // 88: state.v1.UpdateBindingResponse + (*DeleteBindingRequest)(nil), // 89: state.v1.DeleteBindingRequest + (*DeleteBindingResponse)(nil), // 90: state.v1.DeleteBindingResponse + (*ApproveBindingRequest)(nil), // 91: state.v1.ApproveBindingRequest + (*ApproveBindingResponse)(nil), // 92: state.v1.ApproveBindingResponse + (*ArmedBindingsForSourceRequest)(nil), // 93: state.v1.ArmedBindingsForSourceRequest + (*ArmedBindingsForSourceResponse)(nil), // 94: state.v1.ArmedBindingsForSourceResponse + (*RecordDispatchRequest)(nil), // 95: state.v1.RecordDispatchRequest + (*RecordDispatchResponse)(nil), // 96: state.v1.RecordDispatchResponse + (*ListUndispatchedCapturesRequest)(nil), // 97: state.v1.ListUndispatchedCapturesRequest + (*ListUndispatchedCapturesResponse)(nil), // 98: state.v1.ListUndispatchedCapturesResponse + (*StreamUndispatchedCapturesRequest)(nil), // 99: state.v1.StreamUndispatchedCapturesRequest + (*StreamUndispatchedCapturesResponse)(nil), // 100: state.v1.StreamUndispatchedCapturesResponse + (*EnqueueBindingTaskRequest)(nil), // 101: state.v1.EnqueueBindingTaskRequest + (*EnqueueBindingTaskResponse)(nil), // 102: state.v1.EnqueueBindingTaskResponse + nil, // 103: state.v1.StatusCountsResponse.CountsEntry + (*timestamppb.Timestamp)(nil), // 104: google.protobuf.Timestamp } var file_state_v1_state_proto_depIdxs = []int32{ - 99, // 0: state.v1.Task.created_at:type_name -> google.protobuf.Timestamp - 99, // 1: state.v1.Task.updated_at:type_name -> google.protobuf.Timestamp - 99, // 2: state.v1.Event.at:type_name -> google.protobuf.Timestamp - 99, // 3: state.v1.CapturedEvent.received_at:type_name -> google.protobuf.Timestamp - 7, // 4: state.v1.Mapping.fields:type_name -> state.v1.MappingField - 99, // 5: state.v1.Mapping.created_at:type_name -> google.protobuf.Timestamp - 99, // 6: state.v1.Mapping.updated_at:type_name -> google.protobuf.Timestamp - 9, // 7: state.v1.Binding.matcher:type_name -> state.v1.BindingMatcher - 99, // 8: state.v1.Binding.created_at:type_name -> google.protobuf.Timestamp - 99, // 9: state.v1.Binding.updated_at:type_name -> google.protobuf.Timestamp - 4, // 10: state.v1.EnqueueChatTaskResponse.task:type_name -> state.v1.Task - 4, // 11: state.v1.ClaimNextResponse.task:type_name -> state.v1.Task - 4, // 12: state.v1.ClaimByIssueResponse.task:type_name -> state.v1.Task - 4, // 13: state.v1.UpdateRequest.task:type_name -> state.v1.Task - 5, // 14: state.v1.ArchiveTaskRequest.audit:type_name -> state.v1.Event - 4, // 15: state.v1.TaskByIssueResponse.task:type_name -> state.v1.Task - 4, // 16: state.v1.TaskByIDResponse.task:type_name -> state.v1.Task - 4, // 17: state.v1.OpenPRsResponse.tasks:type_name -> state.v1.Task - 4, // 18: state.v1.TasksResponse.tasks:type_name -> state.v1.Task - 98, // 19: state.v1.StatusCountsResponse.counts:type_name -> state.v1.StatusCountsResponse.CountsEntry - 5, // 20: state.v1.InsertEventRequest.event:type_name -> state.v1.Event - 5, // 21: state.v1.EventsSinceResponse.events:type_name -> state.v1.Event - 5, // 22: state.v1.TaskEventsResponse.events:type_name -> state.v1.Event - 11, // 23: state.v1.WorkflowStatsResponse.stats:type_name -> state.v1.WorkflowStat - 12, // 24: state.v1.StageStatsResponse.stats:type_name -> state.v1.StageStat - 13, // 25: state.v1.TokensByDayResponse.tokens:type_name -> state.v1.DayTokens - 6, // 26: state.v1.InsertCaptureRequest.capture:type_name -> state.v1.CapturedEvent - 6, // 27: state.v1.ListCapturesResponse.captures:type_name -> state.v1.CapturedEvent - 6, // 28: state.v1.StreamCapturesResponse.capture:type_name -> state.v1.CapturedEvent - 8, // 29: state.v1.InsertMappingRequest.mapping:type_name -> state.v1.Mapping - 8, // 30: state.v1.GetMappingResponse.mapping:type_name -> state.v1.Mapping - 8, // 31: state.v1.ListMappingsResponse.mappings:type_name -> state.v1.Mapping - 8, // 32: state.v1.UpdateMappingRequest.mapping:type_name -> state.v1.Mapping - 10, // 33: state.v1.InsertBindingRequest.binding:type_name -> state.v1.Binding - 10, // 34: state.v1.GetBindingResponse.binding:type_name -> state.v1.Binding - 10, // 35: state.v1.ListBindingsResponse.bindings:type_name -> state.v1.Binding - 10, // 36: state.v1.UpdateBindingRequest.binding:type_name -> state.v1.Binding - 10, // 37: state.v1.ArmedBindingsForSourceResponse.bindings:type_name -> state.v1.Binding - 6, // 38: state.v1.ListUndispatchedCapturesResponse.captures:type_name -> state.v1.CapturedEvent - 6, // 39: state.v1.StreamUndispatchedCapturesResponse.capture:type_name -> state.v1.CapturedEvent - 4, // 40: state.v1.EnqueueBindingTaskResponse.task:type_name -> state.v1.Task - 0, // 41: state.v1.StateStoreService.RegisterTaskGrant:input_type -> state.v1.RegisterTaskGrantRequest - 2, // 42: state.v1.StateStoreService.RevokeTaskGrant:input_type -> state.v1.RevokeTaskGrantRequest - 14, // 43: state.v1.StateStoreService.EnqueueIssue:input_type -> state.v1.EnqueueIssueRequest - 16, // 44: state.v1.StateStoreService.EnqueueChatTask:input_type -> state.v1.EnqueueChatTaskRequest - 18, // 45: state.v1.StateStoreService.ClaimNext:input_type -> state.v1.ClaimNextRequest - 20, // 46: state.v1.StateStoreService.ClaimByIssue:input_type -> state.v1.ClaimByIssueRequest - 22, // 47: state.v1.StateStoreService.Transition:input_type -> state.v1.TransitionRequest - 24, // 48: state.v1.StateStoreService.Update:input_type -> state.v1.UpdateRequest - 26, // 49: state.v1.StateStoreService.Requeue:input_type -> state.v1.RequeueRequest - 28, // 50: state.v1.StateStoreService.RecoverStale:input_type -> state.v1.RecoverStaleRequest - 30, // 51: state.v1.StateStoreService.ArchiveTask:input_type -> state.v1.ArchiveTaskRequest - 32, // 52: state.v1.StateStoreService.RetryTask:input_type -> state.v1.RetryTaskRequest - 34, // 53: state.v1.StateStoreService.TaskByIssue:input_type -> state.v1.TaskByIssueRequest - 36, // 54: state.v1.StateStoreService.TaskByID:input_type -> state.v1.TaskByIDRequest - 38, // 55: state.v1.StateStoreService.OpenPRs:input_type -> state.v1.OpenPRsRequest - 40, // 56: state.v1.StateStoreService.ClearTerminalTasks:input_type -> state.v1.ClearTerminalTasksRequest - 42, // 57: state.v1.StateStoreService.Tasks:input_type -> state.v1.TasksRequest - 44, // 58: state.v1.StateStoreService.StatusCounts:input_type -> state.v1.StatusCountsRequest - 46, // 59: state.v1.StateStoreService.IncrementRetryCount:input_type -> state.v1.IncrementRetryCountRequest - 48, // 60: state.v1.StateStoreService.InsertEvent:input_type -> state.v1.InsertEventRequest - 50, // 61: state.v1.StateStoreService.EventsSince:input_type -> state.v1.EventsSinceRequest - 52, // 62: state.v1.StateStoreService.TaskEvents:input_type -> state.v1.TaskEventsRequest - 54, // 63: state.v1.StateStoreService.WorkflowStats:input_type -> state.v1.WorkflowStatsRequest - 56, // 64: state.v1.StateStoreService.StageStats:input_type -> state.v1.StageStatsRequest - 58, // 65: state.v1.StateStoreService.TokensByDay:input_type -> state.v1.TokensByDayRequest - 60, // 66: state.v1.StateStoreService.InsertCapture:input_type -> state.v1.InsertCaptureRequest - 62, // 67: state.v1.StateStoreService.ListCaptures:input_type -> state.v1.ListCapturesRequest - 64, // 68: state.v1.StateStoreService.StreamCaptures:input_type -> state.v1.StreamCapturesRequest - 66, // 69: state.v1.StateStoreService.InsertMapping:input_type -> state.v1.InsertMappingRequest - 68, // 70: state.v1.StateStoreService.GetMapping:input_type -> state.v1.GetMappingRequest - 70, // 71: state.v1.StateStoreService.ListMappings:input_type -> state.v1.ListMappingsRequest - 72, // 72: state.v1.StateStoreService.UpdateMapping:input_type -> state.v1.UpdateMappingRequest - 74, // 73: state.v1.StateStoreService.DeleteMapping:input_type -> state.v1.DeleteMappingRequest - 76, // 74: state.v1.StateStoreService.InsertBinding:input_type -> state.v1.InsertBindingRequest - 78, // 75: state.v1.StateStoreService.GetBinding:input_type -> state.v1.GetBindingRequest - 80, // 76: state.v1.StateStoreService.ListBindings:input_type -> state.v1.ListBindingsRequest - 82, // 77: state.v1.StateStoreService.UpdateBinding:input_type -> state.v1.UpdateBindingRequest - 84, // 78: state.v1.StateStoreService.DeleteBinding:input_type -> state.v1.DeleteBindingRequest - 86, // 79: state.v1.StateStoreService.ApproveBinding:input_type -> state.v1.ApproveBindingRequest - 88, // 80: state.v1.StateStoreService.ArmedBindingsForSource:input_type -> state.v1.ArmedBindingsForSourceRequest - 90, // 81: state.v1.StateStoreService.RecordDispatch:input_type -> state.v1.RecordDispatchRequest - 92, // 82: state.v1.StateStoreService.ListUndispatchedCaptures:input_type -> state.v1.ListUndispatchedCapturesRequest - 94, // 83: state.v1.StateStoreService.StreamUndispatchedCaptures:input_type -> state.v1.StreamUndispatchedCapturesRequest - 96, // 84: state.v1.StateStoreService.EnqueueBindingTask:input_type -> state.v1.EnqueueBindingTaskRequest - 1, // 85: state.v1.StateStoreService.RegisterTaskGrant:output_type -> state.v1.RegisterTaskGrantResponse - 3, // 86: state.v1.StateStoreService.RevokeTaskGrant:output_type -> state.v1.RevokeTaskGrantResponse - 15, // 87: state.v1.StateStoreService.EnqueueIssue:output_type -> state.v1.EnqueueIssueResponse - 17, // 88: state.v1.StateStoreService.EnqueueChatTask:output_type -> state.v1.EnqueueChatTaskResponse - 19, // 89: state.v1.StateStoreService.ClaimNext:output_type -> state.v1.ClaimNextResponse - 21, // 90: state.v1.StateStoreService.ClaimByIssue:output_type -> state.v1.ClaimByIssueResponse - 23, // 91: state.v1.StateStoreService.Transition:output_type -> state.v1.TransitionResponse - 25, // 92: state.v1.StateStoreService.Update:output_type -> state.v1.UpdateResponse - 27, // 93: state.v1.StateStoreService.Requeue:output_type -> state.v1.RequeueResponse - 29, // 94: state.v1.StateStoreService.RecoverStale:output_type -> state.v1.RecoverStaleResponse - 31, // 95: state.v1.StateStoreService.ArchiveTask:output_type -> state.v1.ArchiveTaskResponse - 33, // 96: state.v1.StateStoreService.RetryTask:output_type -> state.v1.RetryTaskResponse - 35, // 97: state.v1.StateStoreService.TaskByIssue:output_type -> state.v1.TaskByIssueResponse - 37, // 98: state.v1.StateStoreService.TaskByID:output_type -> state.v1.TaskByIDResponse - 39, // 99: state.v1.StateStoreService.OpenPRs:output_type -> state.v1.OpenPRsResponse - 41, // 100: state.v1.StateStoreService.ClearTerminalTasks:output_type -> state.v1.ClearTerminalTasksResponse - 43, // 101: state.v1.StateStoreService.Tasks:output_type -> state.v1.TasksResponse - 45, // 102: state.v1.StateStoreService.StatusCounts:output_type -> state.v1.StatusCountsResponse - 47, // 103: state.v1.StateStoreService.IncrementRetryCount:output_type -> state.v1.IncrementRetryCountResponse - 49, // 104: state.v1.StateStoreService.InsertEvent:output_type -> state.v1.InsertEventResponse - 51, // 105: state.v1.StateStoreService.EventsSince:output_type -> state.v1.EventsSinceResponse - 53, // 106: state.v1.StateStoreService.TaskEvents:output_type -> state.v1.TaskEventsResponse - 55, // 107: state.v1.StateStoreService.WorkflowStats:output_type -> state.v1.WorkflowStatsResponse - 57, // 108: state.v1.StateStoreService.StageStats:output_type -> state.v1.StageStatsResponse - 59, // 109: state.v1.StateStoreService.TokensByDay:output_type -> state.v1.TokensByDayResponse - 61, // 110: state.v1.StateStoreService.InsertCapture:output_type -> state.v1.InsertCaptureResponse - 63, // 111: state.v1.StateStoreService.ListCaptures:output_type -> state.v1.ListCapturesResponse - 65, // 112: state.v1.StateStoreService.StreamCaptures:output_type -> state.v1.StreamCapturesResponse - 67, // 113: state.v1.StateStoreService.InsertMapping:output_type -> state.v1.InsertMappingResponse - 69, // 114: state.v1.StateStoreService.GetMapping:output_type -> state.v1.GetMappingResponse - 71, // 115: state.v1.StateStoreService.ListMappings:output_type -> state.v1.ListMappingsResponse - 73, // 116: state.v1.StateStoreService.UpdateMapping:output_type -> state.v1.UpdateMappingResponse - 75, // 117: state.v1.StateStoreService.DeleteMapping:output_type -> state.v1.DeleteMappingResponse - 77, // 118: state.v1.StateStoreService.InsertBinding:output_type -> state.v1.InsertBindingResponse - 79, // 119: state.v1.StateStoreService.GetBinding:output_type -> state.v1.GetBindingResponse - 81, // 120: state.v1.StateStoreService.ListBindings:output_type -> state.v1.ListBindingsResponse - 83, // 121: state.v1.StateStoreService.UpdateBinding:output_type -> state.v1.UpdateBindingResponse - 85, // 122: state.v1.StateStoreService.DeleteBinding:output_type -> state.v1.DeleteBindingResponse - 87, // 123: state.v1.StateStoreService.ApproveBinding:output_type -> state.v1.ApproveBindingResponse - 89, // 124: state.v1.StateStoreService.ArmedBindingsForSource:output_type -> state.v1.ArmedBindingsForSourceResponse - 91, // 125: state.v1.StateStoreService.RecordDispatch:output_type -> state.v1.RecordDispatchResponse - 93, // 126: state.v1.StateStoreService.ListUndispatchedCaptures:output_type -> state.v1.ListUndispatchedCapturesResponse - 95, // 127: state.v1.StateStoreService.StreamUndispatchedCaptures:output_type -> state.v1.StreamUndispatchedCapturesResponse - 97, // 128: state.v1.StateStoreService.EnqueueBindingTask:output_type -> state.v1.EnqueueBindingTaskResponse - 85, // [85:129] is the sub-list for method output_type - 41, // [41:85] is the sub-list for method input_type - 41, // [41:41] is the sub-list for extension type_name - 41, // [41:41] is the sub-list for extension extendee - 0, // [0:41] is the sub-list for field type_name + 104, // 0: state.v1.Task.created_at:type_name -> google.protobuf.Timestamp + 104, // 1: state.v1.Task.updated_at:type_name -> google.protobuf.Timestamp + 104, // 2: state.v1.Event.at:type_name -> google.protobuf.Timestamp + 104, // 3: state.v1.CapturedEvent.received_at:type_name -> google.protobuf.Timestamp + 7, // 4: state.v1.Mapping.fields:type_name -> state.v1.MappingField + 104, // 5: state.v1.Mapping.created_at:type_name -> google.protobuf.Timestamp + 104, // 6: state.v1.Mapping.updated_at:type_name -> google.protobuf.Timestamp + 9, // 7: state.v1.Binding.matcher:type_name -> state.v1.BindingMatcher + 104, // 8: state.v1.Binding.created_at:type_name -> google.protobuf.Timestamp + 104, // 9: state.v1.Binding.updated_at:type_name -> google.protobuf.Timestamp + 4, // 10: state.v1.EnqueueChatTaskResponse.task:type_name -> state.v1.Task + 4, // 11: state.v1.ClaimNextResponse.task:type_name -> state.v1.Task + 4, // 12: state.v1.ClaimByIssueResponse.task:type_name -> state.v1.Task + 4, // 13: state.v1.UpdateRequest.task:type_name -> state.v1.Task + 5, // 14: state.v1.ArchiveTaskRequest.audit:type_name -> state.v1.Event + 4, // 15: state.v1.TaskByIssueResponse.task:type_name -> state.v1.Task + 4, // 16: state.v1.TaskByIDResponse.task:type_name -> state.v1.Task + 4, // 17: state.v1.OpenPRsResponse.tasks:type_name -> state.v1.Task + 4, // 18: state.v1.TasksResponse.tasks:type_name -> state.v1.Task + 103, // 19: state.v1.StatusCountsResponse.counts:type_name -> state.v1.StatusCountsResponse.CountsEntry + 5, // 20: state.v1.InsertEventRequest.event:type_name -> state.v1.Event + 5, // 21: state.v1.EventsSinceResponse.events:type_name -> state.v1.Event + 5, // 22: state.v1.TaskEventsResponse.events:type_name -> state.v1.Event + 11, // 23: state.v1.WorkflowStatsResponse.stats:type_name -> state.v1.WorkflowStat + 12, // 24: state.v1.StageStatsResponse.stats:type_name -> state.v1.StageStat + 13, // 25: state.v1.TokensByDayResponse.tokens:type_name -> state.v1.DayTokens + 104, // 26: state.v1.ConfigSnapshot.published_at:type_name -> google.protobuf.Timestamp + 60, // 27: state.v1.PutConfigSnapshotRequest.snapshot:type_name -> state.v1.ConfigSnapshot + 60, // 28: state.v1.GetConfigSnapshotResponse.snapshot:type_name -> state.v1.ConfigSnapshot + 6, // 29: state.v1.InsertCaptureRequest.capture:type_name -> state.v1.CapturedEvent + 6, // 30: state.v1.ListCapturesResponse.captures:type_name -> state.v1.CapturedEvent + 6, // 31: state.v1.StreamCapturesResponse.capture:type_name -> state.v1.CapturedEvent + 8, // 32: state.v1.InsertMappingRequest.mapping:type_name -> state.v1.Mapping + 8, // 33: state.v1.GetMappingResponse.mapping:type_name -> state.v1.Mapping + 8, // 34: state.v1.ListMappingsResponse.mappings:type_name -> state.v1.Mapping + 8, // 35: state.v1.UpdateMappingRequest.mapping:type_name -> state.v1.Mapping + 10, // 36: state.v1.InsertBindingRequest.binding:type_name -> state.v1.Binding + 10, // 37: state.v1.GetBindingResponse.binding:type_name -> state.v1.Binding + 10, // 38: state.v1.ListBindingsResponse.bindings:type_name -> state.v1.Binding + 10, // 39: state.v1.UpdateBindingRequest.binding:type_name -> state.v1.Binding + 10, // 40: state.v1.ArmedBindingsForSourceResponse.bindings:type_name -> state.v1.Binding + 6, // 41: state.v1.ListUndispatchedCapturesResponse.captures:type_name -> state.v1.CapturedEvent + 6, // 42: state.v1.StreamUndispatchedCapturesResponse.capture:type_name -> state.v1.CapturedEvent + 4, // 43: state.v1.EnqueueBindingTaskResponse.task:type_name -> state.v1.Task + 0, // 44: state.v1.StateStoreService.RegisterTaskGrant:input_type -> state.v1.RegisterTaskGrantRequest + 2, // 45: state.v1.StateStoreService.RevokeTaskGrant:input_type -> state.v1.RevokeTaskGrantRequest + 14, // 46: state.v1.StateStoreService.EnqueueIssue:input_type -> state.v1.EnqueueIssueRequest + 16, // 47: state.v1.StateStoreService.EnqueueChatTask:input_type -> state.v1.EnqueueChatTaskRequest + 18, // 48: state.v1.StateStoreService.ClaimNext:input_type -> state.v1.ClaimNextRequest + 20, // 49: state.v1.StateStoreService.ClaimByIssue:input_type -> state.v1.ClaimByIssueRequest + 22, // 50: state.v1.StateStoreService.Transition:input_type -> state.v1.TransitionRequest + 24, // 51: state.v1.StateStoreService.Update:input_type -> state.v1.UpdateRequest + 26, // 52: state.v1.StateStoreService.Requeue:input_type -> state.v1.RequeueRequest + 28, // 53: state.v1.StateStoreService.RecoverStale:input_type -> state.v1.RecoverStaleRequest + 30, // 54: state.v1.StateStoreService.ArchiveTask:input_type -> state.v1.ArchiveTaskRequest + 32, // 55: state.v1.StateStoreService.RetryTask:input_type -> state.v1.RetryTaskRequest + 34, // 56: state.v1.StateStoreService.TaskByIssue:input_type -> state.v1.TaskByIssueRequest + 36, // 57: state.v1.StateStoreService.TaskByID:input_type -> state.v1.TaskByIDRequest + 38, // 58: state.v1.StateStoreService.OpenPRs:input_type -> state.v1.OpenPRsRequest + 40, // 59: state.v1.StateStoreService.ClearTerminalTasks:input_type -> state.v1.ClearTerminalTasksRequest + 42, // 60: state.v1.StateStoreService.Tasks:input_type -> state.v1.TasksRequest + 44, // 61: state.v1.StateStoreService.StatusCounts:input_type -> state.v1.StatusCountsRequest + 46, // 62: state.v1.StateStoreService.IncrementRetryCount:input_type -> state.v1.IncrementRetryCountRequest + 48, // 63: state.v1.StateStoreService.InsertEvent:input_type -> state.v1.InsertEventRequest + 50, // 64: state.v1.StateStoreService.EventsSince:input_type -> state.v1.EventsSinceRequest + 52, // 65: state.v1.StateStoreService.TaskEvents:input_type -> state.v1.TaskEventsRequest + 54, // 66: state.v1.StateStoreService.WorkflowStats:input_type -> state.v1.WorkflowStatsRequest + 56, // 67: state.v1.StateStoreService.StageStats:input_type -> state.v1.StageStatsRequest + 58, // 68: state.v1.StateStoreService.TokensByDay:input_type -> state.v1.TokensByDayRequest + 61, // 69: state.v1.StateStoreService.PutConfigSnapshot:input_type -> state.v1.PutConfigSnapshotRequest + 63, // 70: state.v1.StateStoreService.GetConfigSnapshot:input_type -> state.v1.GetConfigSnapshotRequest + 65, // 71: state.v1.StateStoreService.InsertCapture:input_type -> state.v1.InsertCaptureRequest + 67, // 72: state.v1.StateStoreService.ListCaptures:input_type -> state.v1.ListCapturesRequest + 69, // 73: state.v1.StateStoreService.StreamCaptures:input_type -> state.v1.StreamCapturesRequest + 71, // 74: state.v1.StateStoreService.InsertMapping:input_type -> state.v1.InsertMappingRequest + 73, // 75: state.v1.StateStoreService.GetMapping:input_type -> state.v1.GetMappingRequest + 75, // 76: state.v1.StateStoreService.ListMappings:input_type -> state.v1.ListMappingsRequest + 77, // 77: state.v1.StateStoreService.UpdateMapping:input_type -> state.v1.UpdateMappingRequest + 79, // 78: state.v1.StateStoreService.DeleteMapping:input_type -> state.v1.DeleteMappingRequest + 81, // 79: state.v1.StateStoreService.InsertBinding:input_type -> state.v1.InsertBindingRequest + 83, // 80: state.v1.StateStoreService.GetBinding:input_type -> state.v1.GetBindingRequest + 85, // 81: state.v1.StateStoreService.ListBindings:input_type -> state.v1.ListBindingsRequest + 87, // 82: state.v1.StateStoreService.UpdateBinding:input_type -> state.v1.UpdateBindingRequest + 89, // 83: state.v1.StateStoreService.DeleteBinding:input_type -> state.v1.DeleteBindingRequest + 91, // 84: state.v1.StateStoreService.ApproveBinding:input_type -> state.v1.ApproveBindingRequest + 93, // 85: state.v1.StateStoreService.ArmedBindingsForSource:input_type -> state.v1.ArmedBindingsForSourceRequest + 95, // 86: state.v1.StateStoreService.RecordDispatch:input_type -> state.v1.RecordDispatchRequest + 97, // 87: state.v1.StateStoreService.ListUndispatchedCaptures:input_type -> state.v1.ListUndispatchedCapturesRequest + 99, // 88: state.v1.StateStoreService.StreamUndispatchedCaptures:input_type -> state.v1.StreamUndispatchedCapturesRequest + 101, // 89: state.v1.StateStoreService.EnqueueBindingTask:input_type -> state.v1.EnqueueBindingTaskRequest + 1, // 90: state.v1.StateStoreService.RegisterTaskGrant:output_type -> state.v1.RegisterTaskGrantResponse + 3, // 91: state.v1.StateStoreService.RevokeTaskGrant:output_type -> state.v1.RevokeTaskGrantResponse + 15, // 92: state.v1.StateStoreService.EnqueueIssue:output_type -> state.v1.EnqueueIssueResponse + 17, // 93: state.v1.StateStoreService.EnqueueChatTask:output_type -> state.v1.EnqueueChatTaskResponse + 19, // 94: state.v1.StateStoreService.ClaimNext:output_type -> state.v1.ClaimNextResponse + 21, // 95: state.v1.StateStoreService.ClaimByIssue:output_type -> state.v1.ClaimByIssueResponse + 23, // 96: state.v1.StateStoreService.Transition:output_type -> state.v1.TransitionResponse + 25, // 97: state.v1.StateStoreService.Update:output_type -> state.v1.UpdateResponse + 27, // 98: state.v1.StateStoreService.Requeue:output_type -> state.v1.RequeueResponse + 29, // 99: state.v1.StateStoreService.RecoverStale:output_type -> state.v1.RecoverStaleResponse + 31, // 100: state.v1.StateStoreService.ArchiveTask:output_type -> state.v1.ArchiveTaskResponse + 33, // 101: state.v1.StateStoreService.RetryTask:output_type -> state.v1.RetryTaskResponse + 35, // 102: state.v1.StateStoreService.TaskByIssue:output_type -> state.v1.TaskByIssueResponse + 37, // 103: state.v1.StateStoreService.TaskByID:output_type -> state.v1.TaskByIDResponse + 39, // 104: state.v1.StateStoreService.OpenPRs:output_type -> state.v1.OpenPRsResponse + 41, // 105: state.v1.StateStoreService.ClearTerminalTasks:output_type -> state.v1.ClearTerminalTasksResponse + 43, // 106: state.v1.StateStoreService.Tasks:output_type -> state.v1.TasksResponse + 45, // 107: state.v1.StateStoreService.StatusCounts:output_type -> state.v1.StatusCountsResponse + 47, // 108: state.v1.StateStoreService.IncrementRetryCount:output_type -> state.v1.IncrementRetryCountResponse + 49, // 109: state.v1.StateStoreService.InsertEvent:output_type -> state.v1.InsertEventResponse + 51, // 110: state.v1.StateStoreService.EventsSince:output_type -> state.v1.EventsSinceResponse + 53, // 111: state.v1.StateStoreService.TaskEvents:output_type -> state.v1.TaskEventsResponse + 55, // 112: state.v1.StateStoreService.WorkflowStats:output_type -> state.v1.WorkflowStatsResponse + 57, // 113: state.v1.StateStoreService.StageStats:output_type -> state.v1.StageStatsResponse + 59, // 114: state.v1.StateStoreService.TokensByDay:output_type -> state.v1.TokensByDayResponse + 62, // 115: state.v1.StateStoreService.PutConfigSnapshot:output_type -> state.v1.PutConfigSnapshotResponse + 64, // 116: state.v1.StateStoreService.GetConfigSnapshot:output_type -> state.v1.GetConfigSnapshotResponse + 66, // 117: state.v1.StateStoreService.InsertCapture:output_type -> state.v1.InsertCaptureResponse + 68, // 118: state.v1.StateStoreService.ListCaptures:output_type -> state.v1.ListCapturesResponse + 70, // 119: state.v1.StateStoreService.StreamCaptures:output_type -> state.v1.StreamCapturesResponse + 72, // 120: state.v1.StateStoreService.InsertMapping:output_type -> state.v1.InsertMappingResponse + 74, // 121: state.v1.StateStoreService.GetMapping:output_type -> state.v1.GetMappingResponse + 76, // 122: state.v1.StateStoreService.ListMappings:output_type -> state.v1.ListMappingsResponse + 78, // 123: state.v1.StateStoreService.UpdateMapping:output_type -> state.v1.UpdateMappingResponse + 80, // 124: state.v1.StateStoreService.DeleteMapping:output_type -> state.v1.DeleteMappingResponse + 82, // 125: state.v1.StateStoreService.InsertBinding:output_type -> state.v1.InsertBindingResponse + 84, // 126: state.v1.StateStoreService.GetBinding:output_type -> state.v1.GetBindingResponse + 86, // 127: state.v1.StateStoreService.ListBindings:output_type -> state.v1.ListBindingsResponse + 88, // 128: state.v1.StateStoreService.UpdateBinding:output_type -> state.v1.UpdateBindingResponse + 90, // 129: state.v1.StateStoreService.DeleteBinding:output_type -> state.v1.DeleteBindingResponse + 92, // 130: state.v1.StateStoreService.ApproveBinding:output_type -> state.v1.ApproveBindingResponse + 94, // 131: state.v1.StateStoreService.ArmedBindingsForSource:output_type -> state.v1.ArmedBindingsForSourceResponse + 96, // 132: state.v1.StateStoreService.RecordDispatch:output_type -> state.v1.RecordDispatchResponse + 98, // 133: state.v1.StateStoreService.ListUndispatchedCaptures:output_type -> state.v1.ListUndispatchedCapturesResponse + 100, // 134: state.v1.StateStoreService.StreamUndispatchedCaptures:output_type -> state.v1.StreamUndispatchedCapturesResponse + 102, // 135: state.v1.StateStoreService.EnqueueBindingTask:output_type -> state.v1.EnqueueBindingTaskResponse + 90, // [90:136] is the sub-list for method output_type + 44, // [44:90] is the sub-list for method input_type + 44, // [44:44] is the sub-list for extension type_name + 44, // [44:44] is the sub-list for extension extendee + 0, // [0:44] is the sub-list for field type_name } func init() { file_state_v1_state_proto_init() } @@ -5769,7 +6028,7 @@ func file_state_v1_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_state_v1_state_proto_rawDesc), len(file_state_v1_state_proto_rawDesc)), NumEnums: 0, - NumMessages: 99, + NumMessages: 104, NumExtensions: 0, NumServices: 1, }, diff --git a/internal/contracts/state/v1/state_grpc.pb.go b/internal/contracts/state/v1/state_grpc.pb.go index b103fb412..83e1446b0 100644 --- a/internal/contracts/state/v1/state_grpc.pb.go +++ b/internal/contracts/state/v1/state_grpc.pb.go @@ -44,6 +44,8 @@ const ( StateStoreService_WorkflowStats_FullMethodName = "/state.v1.StateStoreService/WorkflowStats" StateStoreService_StageStats_FullMethodName = "/state.v1.StateStoreService/StageStats" StateStoreService_TokensByDay_FullMethodName = "/state.v1.StateStoreService/TokensByDay" + StateStoreService_PutConfigSnapshot_FullMethodName = "/state.v1.StateStoreService/PutConfigSnapshot" + StateStoreService_GetConfigSnapshot_FullMethodName = "/state.v1.StateStoreService/GetConfigSnapshot" StateStoreService_InsertCapture_FullMethodName = "/state.v1.StateStoreService/InsertCapture" StateStoreService_ListCaptures_FullMethodName = "/state.v1.StateStoreService/ListCaptures" StateStoreService_StreamCaptures_FullMethodName = "/state.v1.StateStoreService/StreamCaptures" @@ -107,6 +109,13 @@ type StateStoreServiceClient interface { WorkflowStats(ctx context.Context, in *WorkflowStatsRequest, opts ...grpc.CallOption) (*WorkflowStatsResponse, error) StageStats(ctx context.Context, in *StageStatsRequest, opts ...grpc.CallOption) (*StageStatsResponse, error) TokensByDay(ctx context.Context, in *TokensByDayRequest, opts ...grpc.CallOption) (*TokensByDayResponse, error) + // 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"). + PutConfigSnapshot(ctx context.Context, in *PutConfigSnapshotRequest, opts ...grpc.CallOption) (*PutConfigSnapshotResponse, error) + GetConfigSnapshot(ctx context.Context, in *GetConfigSnapshotRequest, opts ...grpc.CallOption) (*GetConfigSnapshotResponse, error) // Capture InsertCapture(ctx context.Context, in *InsertCaptureRequest, opts ...grpc.CallOption) (*InsertCaptureResponse, error) // Deprecated: Do not use. @@ -402,6 +411,26 @@ func (c *stateStoreServiceClient) TokensByDay(ctx context.Context, in *TokensByD return out, nil } +func (c *stateStoreServiceClient) PutConfigSnapshot(ctx context.Context, in *PutConfigSnapshotRequest, opts ...grpc.CallOption) (*PutConfigSnapshotResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PutConfigSnapshotResponse) + err := c.cc.Invoke(ctx, StateStoreService_PutConfigSnapshot_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *stateStoreServiceClient) GetConfigSnapshot(ctx context.Context, in *GetConfigSnapshotRequest, opts ...grpc.CallOption) (*GetConfigSnapshotResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetConfigSnapshotResponse) + err := c.cc.Invoke(ctx, StateStoreService_GetConfigSnapshot_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *stateStoreServiceClient) InsertCapture(ctx context.Context, in *InsertCaptureRequest, opts ...grpc.CallOption) (*InsertCaptureResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(InsertCaptureResponse) @@ -654,6 +683,13 @@ type StateStoreServiceServer interface { WorkflowStats(context.Context, *WorkflowStatsRequest) (*WorkflowStatsResponse, error) StageStats(context.Context, *StageStatsRequest) (*StageStatsResponse, error) TokensByDay(context.Context, *TokensByDayRequest) (*TokensByDayResponse, error) + // 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"). + PutConfigSnapshot(context.Context, *PutConfigSnapshotRequest) (*PutConfigSnapshotResponse, error) + GetConfigSnapshot(context.Context, *GetConfigSnapshotRequest) (*GetConfigSnapshotResponse, error) // Capture InsertCapture(context.Context, *InsertCaptureRequest) (*InsertCaptureResponse, error) // Deprecated: Do not use. @@ -774,6 +810,12 @@ func (UnimplementedStateStoreServiceServer) StageStats(context.Context, *StageSt func (UnimplementedStateStoreServiceServer) TokensByDay(context.Context, *TokensByDayRequest) (*TokensByDayResponse, error) { return nil, status.Error(codes.Unimplemented, "method TokensByDay not implemented") } +func (UnimplementedStateStoreServiceServer) PutConfigSnapshot(context.Context, *PutConfigSnapshotRequest) (*PutConfigSnapshotResponse, error) { + return nil, status.Error(codes.Unimplemented, "method PutConfigSnapshot not implemented") +} +func (UnimplementedStateStoreServiceServer) GetConfigSnapshot(context.Context, *GetConfigSnapshotRequest) (*GetConfigSnapshotResponse, error) { + return nil, status.Error(codes.Unimplemented, "method GetConfigSnapshot not implemented") +} func (UnimplementedStateStoreServiceServer) InsertCapture(context.Context, *InsertCaptureRequest) (*InsertCaptureResponse, error) { return nil, status.Error(codes.Unimplemented, "method InsertCapture not implemented") } @@ -1302,6 +1344,42 @@ func _StateStoreService_TokensByDay_Handler(srv interface{}, ctx context.Context return interceptor(ctx, in, info, handler) } +func _StateStoreService_PutConfigSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PutConfigSnapshotRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StateStoreServiceServer).PutConfigSnapshot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StateStoreService_PutConfigSnapshot_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StateStoreServiceServer).PutConfigSnapshot(ctx, req.(*PutConfigSnapshotRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StateStoreService_GetConfigSnapshot_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetConfigSnapshotRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StateStoreServiceServer).GetConfigSnapshot(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StateStoreService_GetConfigSnapshot_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StateStoreServiceServer).GetConfigSnapshot(ctx, req.(*GetConfigSnapshotRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _StateStoreService_InsertCapture_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(InsertCaptureRequest) if err := dec(in); err != nil { @@ -1737,6 +1815,14 @@ var StateStoreService_ServiceDesc = grpc.ServiceDesc{ MethodName: "TokensByDay", Handler: _StateStoreService_TokensByDay_Handler, }, + { + MethodName: "PutConfigSnapshot", + Handler: _StateStoreService_PutConfigSnapshot_Handler, + }, + { + MethodName: "GetConfigSnapshot", + Handler: _StateStoreService_GetConfigSnapshot_Handler, + }, { MethodName: "InsertCapture", Handler: _StateStoreService_InsertCapture_Handler, diff --git a/internal/infrastructure/staterpc/client.go b/internal/infrastructure/staterpc/client.go index f412a8adb..1f4b7f7e0 100644 --- a/internal/infrastructure/staterpc/client.go +++ b/internal/infrastructure/staterpc/client.go @@ -34,13 +34,14 @@ func NewClient(conn grpc.ClientConnInterface) *Client { func (c *Client) Close() error { return nil } var ( - _ workflow.Store = (*Client)(nil) - _ store.TaskStore = (*Client)(nil) - _ store.CaptureStore = (*Client)(nil) - _ store.MappingStore = (*Client)(nil) - _ store.BindingStore = (*Client)(nil) - _ store.BindingDispatcher = (*Client)(nil) - _ store.BindingTaskCreator = (*Client)(nil) + _ workflow.Store = (*Client)(nil) + _ store.TaskStore = (*Client)(nil) + _ store.CaptureStore = (*Client)(nil) + _ store.MappingStore = (*Client)(nil) + _ store.BindingStore = (*Client)(nil) + _ store.BindingDispatcher = (*Client)(nil) + _ store.BindingTaskCreator = (*Client)(nil) + _ store.ConfigSnapshotStore = (*Client)(nil) ) // Lifecycle @@ -249,6 +250,30 @@ func (c *Client) InsertCapture(ctx context.Context, ce store.CapturedEvent, rete // ListCaptures calls StreamCaptures, not the deprecated unary ListCaptures // RPC: a batch of large capture bodies in one unary response can exceed // gRPC's 4MiB message cap (docs/prds/state-store-contract.md). +// PutConfigSnapshot publishes the dashboard's configuration projection. The +// server admits it on the administrative token only; a task-scoped grant +// cannot reach it (see TaskGrants). +func (c *Client) PutConfigSnapshot(ctx context.Context, snapshot store.ConfigSnapshot) error { + _, err := c.client.PutConfigSnapshot(ctx, &pb.PutConfigSnapshotRequest{Snapshot: configSnapshotProto(snapshot)}) + if err != nil { + return unmapError(err) + } + return nil +} + +// ConfigSnapshot reads the published projection. found is false, with a nil +// error, before a daemon has published one. +func (c *Client) ConfigSnapshot(ctx context.Context) (store.ConfigSnapshot, bool, error) { + reply, err := c.client.GetConfigSnapshot(ctx, &pb.GetConfigSnapshotRequest{}) + if err != nil { + return store.ConfigSnapshot{}, false, unmapError(err) + } + if !reply.Found { + return store.ConfigSnapshot{}, false, nil + } + return configSnapshotValue(reply.Snapshot), true, nil +} + func (c *Client) ListCaptures(ctx context.Context, limit int) ([]store.CapturedEvent, error) { stream, err := c.client.StreamCaptures(ctx, &pb.StreamCapturesRequest{Limit: int64(limit)}) if err != nil { diff --git a/internal/infrastructure/staterpc/conformance_test.go b/internal/infrastructure/staterpc/conformance_test.go index 940b58da3..bd5adabb7 100644 --- a/internal/infrastructure/staterpc/conformance_test.go +++ b/internal/infrastructure/staterpc/conformance_test.go @@ -5,6 +5,7 @@ import ( "errors" "net" "testing" + "time" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -27,6 +28,7 @@ type contract interface { store.BindingStore store.BindingDispatcher store.BindingTaskCreator + store.ConfigSnapshotStore } func remoteContract(t *testing.T, local *store.Store) contract { @@ -35,7 +37,7 @@ func remoteContract(t *testing.T, local *store.Store) contract { server := grpc.NewServer() RegisterServer(server, Deps{ Tasks: local, Captures: local, Mappings: local, Bindings: local, - BindingDispatcher: local, BindingTaskCreator: local, + BindingDispatcher: local, BindingTaskCreator: local, ConfigSnapshots: local, }) go func() { _ = server.Serve(listener) }() t.Cleanup(func() { server.Stop(); _ = listener.Close() }) @@ -304,3 +306,48 @@ func TestTokenInterceptorRejectsMissingOrInvalidToken(t *testing.T) { t.Fatalf("valid token rejected: %v", err) } } + +// TestConfigSnapshotContract drives the published configuration projection +// through both the local store and the gRPC client. The document is opaque to +// this hop, so the test's whole claim is that it arrives unchanged: the UI +// process renders exactly what the daemon published, and an absent snapshot +// reads as "not published yet" rather than an error. +func TestConfigSnapshotContract(t *testing.T) { + for _, mode := range []string{"local", "grpc"} { + t.Run(mode, func(t *testing.T) { + local := store.OpenTest(t) + var st contract = local + if mode == "grpc" { + st = remoteContract(t, local) + } + ctx := t.Context() + + if _, found, err := st.ConfigSnapshot(ctx); err != nil || found { + t.Fatalf("unpublished snapshot = (found %v, %v), want (false, nil)", found, err) + } + + published := store.ConfigSnapshot{ + Schema: "webui.ConfigView/1", + Document: []byte(`{"identity":{"bot_user":"archie"},"providers":{"openai":{"api_key_env":"OPENAI_API_KEY","configured":true}}}`), + PublishedAt: time.Date(2026, 9, 9, 12, 30, 0, 0, time.UTC), + } + if err := st.PutConfigSnapshot(ctx, published); err != nil { + t.Fatalf("PutConfigSnapshot: %v", err) + } + + got, found, err := st.ConfigSnapshot(ctx) + if err != nil || !found { + t.Fatalf("ConfigSnapshot = (found %v, %v), want the published snapshot", found, err) + } + if got.Schema != published.Schema { + t.Errorf("schema = %q, want %q", got.Schema, published.Schema) + } + if string(got.Document) != string(published.Document) { + t.Errorf("document = %s, want %s", got.Document, published.Document) + } + if !got.PublishedAt.Equal(published.PublishedAt) { + t.Errorf("published at = %v, want %v", got.PublishedAt, published.PublishedAt) + } + }) + } +} diff --git a/internal/infrastructure/staterpc/server.go b/internal/infrastructure/staterpc/server.go index 834effd43..5d628690b 100644 --- a/internal/infrastructure/staterpc/server.go +++ b/internal/infrastructure/staterpc/server.go @@ -25,6 +25,7 @@ import ( // rather than a nil-pointer panic. var ( errCaptureUnavailable = status.Error(codes.Unavailable, "capture store unavailable") + errConfigSnapshotsUnavailable = status.Error(codes.Unavailable, "config snapshot store unavailable") errMappingUnavailable = status.Error(codes.Unavailable, "mapping store unavailable") errBindingUnavailable = status.Error(codes.Unavailable, "binding store unavailable") errBindingDispatchUnavailable = status.Error(codes.Unavailable, "binding dispatcher unavailable") @@ -41,6 +42,7 @@ type Deps struct { Grants *TaskGrants Tasks store.TaskStore Captures store.CaptureStore + ConfigSnapshots store.ConfigSnapshotStore Mappings store.MappingStore Bindings store.BindingStore BindingDispatcher store.BindingDispatcher @@ -282,6 +284,39 @@ func (s *server) capture() (store.CaptureStore, error) { return s.deps.Captures, nil } +func (s *server) configSnapshots() (store.ConfigSnapshotStore, error) { + if s.deps.ConfigSnapshots == nil { + return nil, errConfigSnapshotsUnavailable + } + return s.deps.ConfigSnapshots, nil +} + +func (s *server) PutConfigSnapshot(ctx context.Context, r *pb.PutConfigSnapshotRequest) (*pb.PutConfigSnapshotResponse, error) { + cs, err := s.configSnapshots() + if err != nil { + return nil, err + } + if err := cs.PutConfigSnapshot(ctx, configSnapshotValue(r.Snapshot)); err != nil { + return nil, s.logErr("PutConfigSnapshot", err) + } + return &pb.PutConfigSnapshotResponse{}, nil +} + +func (s *server) GetConfigSnapshot(ctx context.Context, _ *pb.GetConfigSnapshotRequest) (*pb.GetConfigSnapshotResponse, error) { + cs, err := s.configSnapshots() + if err != nil { + return nil, err + } + snapshot, found, err := cs.ConfigSnapshot(ctx) + if err != nil { + return nil, s.logErr("GetConfigSnapshot", err) + } + if !found { + return &pb.GetConfigSnapshotResponse{}, nil + } + return &pb.GetConfigSnapshotResponse{Snapshot: configSnapshotProto(snapshot), Found: true}, nil +} + func (s *server) InsertCapture(ctx context.Context, r *pb.InsertCaptureRequest) (*pb.InsertCaptureResponse, error) { cs, err := s.capture() if err != nil { diff --git a/internal/infrastructure/staterpc/task_grants_test.go b/internal/infrastructure/staterpc/task_grants_test.go index 712feeec9..39a8e4039 100644 --- a/internal/infrastructure/staterpc/task_grants_test.go +++ b/internal/infrastructure/staterpc/task_grants_test.go @@ -28,7 +28,7 @@ func grantsServer(t *testing.T, adminToken string) (grants *TaskGrants, dial fun grpc.ChainUnaryInterceptor(grants.UnaryInterceptor(adminToken)), grpc.ChainStreamInterceptor(grants.StreamInterceptor(adminToken)), ) - RegisterServer(server, Deps{Tasks: local, Grants: grants}) + RegisterServer(server, Deps{Tasks: local, Grants: grants, ConfigSnapshots: local}) go func() { _ = server.Serve(listener) }() t.Cleanup(func() { server.Stop(); _ = listener.Close() }) @@ -109,6 +109,41 @@ func TestTaskGrantScopesWorkerToItsOwnThreeRPCs(t *testing.T) { } } +// TestOnlyAdminPublishesTheConfigSnapshot: the published projection is the +// dashboard's whole view of the running configuration, so a container's +// task-scoped credential must not be able to rewrite what an operator reads, +// nor to read a projection describing the deployment it runs inside. +func TestOnlyAdminPublishesTheConfigSnapshot(t *testing.T) { + const adminToken = "daemon-admin-token" + _, dial := grantsServer(t, adminToken) + admin := dial(t, adminToken) + ctx := t.Context() + + task, err := admin.EnqueueChatTask(ctx, "acme", "widget", "a", "body", "implement", "") + if err != nil { + t.Fatal(err) + } + workerToken, err := admin.RegisterTaskGrant(ctx, task.ID, time.Hour) + if err != nil { + t.Fatalf("RegisterTaskGrant: %v", err) + } + worker := dial(t, workerToken) + + snapshot := store.ConfigSnapshot{Schema: "webui.ConfigView/1", Document: []byte(`{}`)} + if err := admin.PutConfigSnapshot(ctx, snapshot); err != nil { + t.Fatalf("admin PutConfigSnapshot: %v", err) + } + if err := worker.PutConfigSnapshot(ctx, snapshot); err == nil { + t.Fatal("a task grant must not authorize publishing the configuration snapshot") + } + if _, _, err := worker.ConfigSnapshot(ctx); err == nil { + t.Fatal("a task grant must not authorize reading the configuration snapshot") + } + if _, found, err := admin.ConfigSnapshot(ctx); err != nil || !found { + t.Fatalf("admin ConfigSnapshot = (found %v, %v), want the published snapshot", found, err) + } +} + func TestOnlyAdminCanRegisterOrRevokeTaskGrants(t *testing.T) { const adminToken = "daemon-admin-token" _, dial := grantsServer(t, adminToken) diff --git a/internal/infrastructure/staterpc/values.go b/internal/infrastructure/staterpc/values.go index ea4793e43..c86dd1cf5 100644 --- a/internal/infrastructure/staterpc/values.go +++ b/internal/infrastructure/staterpc/values.go @@ -337,3 +337,25 @@ func unmapError(err error) error { } return fmt.Errorf("state store: %s: %w", st.Message(), err) } + +// configSnapshotProto and configSnapshotValue carry the dashboard's +// configuration projection. document crosses as bytes, unread by either side +// of this hop: the store holds it and the page renders it. +func configSnapshotProto(snapshot store.ConfigSnapshot) *pb.ConfigSnapshot { + return &pb.ConfigSnapshot{ + Schema: snapshot.Schema, + Document: snapshot.Document, + PublishedAt: timestamp(snapshot.PublishedAt), + } +} + +func configSnapshotValue(snapshot *pb.ConfigSnapshot) store.ConfigSnapshot { + if snapshot == nil { + return store.ConfigSnapshot{} + } + return store.ConfigSnapshot{ + Schema: snapshot.Schema, + Document: snapshot.Document, + PublishedAt: timeValue(snapshot.PublishedAt), + } +} diff --git a/internal/store/config_snapshot.go b/internal/store/config_snapshot.go new file mode 100644 index 000000000..20c6c6d15 --- /dev/null +++ b/internal/store/config_snapshot.go @@ -0,0 +1,83 @@ +package store + +import ( + "context" + "database/sql" + "errors" + "fmt" + "time" +) + +const configSnapshotSchema = ` +CREATE TABLE IF NOT EXISTS config_snapshot ( + id INTEGER PRIMARY KEY CHECK (id = 1), + schema TEXT NOT NULL DEFAULT '', + document TEXT NOT NULL DEFAULT '', + published_at TEXT NOT NULL +); +` + +// ConfigSnapshot is the running configuration as the dashboard renders it, +// published by whoever owns configuration for whoever displays it. +// +// Document is opaque here on purpose: its shape belongs to the producer and +// the page that reads it, not to storage, and Schema names that shape so a +// reader can refuse a document it does not understand. It is secret-free by +// construction at the producer (the projection carries an API key's +// environment variable name and whether it resolved, never a value). +type ConfigSnapshot struct { + Schema string + Document []byte + PublishedAt time.Time +} + +// configSnapshotTimeLayout follows the rest of the store's timestamp columns: +// fixed-width, so string and chronological order agree. +const configSnapshotTimeLayout = time.RFC3339 + +// PutConfigSnapshot replaces the published snapshot. One running +// configuration means one row, so a republish overwrites rather than +// appending a history nothing reads. +func (s *Store) PutConfigSnapshot(ctx context.Context, snapshot ConfigSnapshot) error { + published := snapshot.PublishedAt + if published.IsZero() { + published = time.Now() + } + _, err := s.db.ExecContext(ctx, ` + INSERT INTO config_snapshot (id, schema, document, published_at) + VALUES (1, ?, ?, ?) + ON CONFLICT(id) DO UPDATE SET + schema=excluded.schema, + document=excluded.document, + published_at=excluded.published_at`, + snapshot.Schema, string(snapshot.Document), published.UTC().Format(configSnapshotTimeLayout)) + if err != nil { + return fmt.Errorf("store: put config snapshot: %w", err) + } + return nil +} + +// ConfigSnapshot returns the published snapshot. found is false, with a nil +// error, before anything has published one -- the normal state of a store +// whose daemon has not booted yet. +func (s *Store) ConfigSnapshot(ctx context.Context) (ConfigSnapshot, bool, error) { + var ( + snapshot ConfigSnapshot + document string + published string + ) + err := s.db.QueryRowContext(ctx, ` + SELECT schema, document, published_at FROM config_snapshot WHERE id = 1`). + Scan(&snapshot.Schema, &document, &published) + if errors.Is(err, sql.ErrNoRows) { + return ConfigSnapshot{}, false, nil + } + if err != nil { + return ConfigSnapshot{}, false, fmt.Errorf("store: read config snapshot: %w", err) + } + snapshot.Document = []byte(document) + if at, err := time.Parse(configSnapshotTimeLayout, published); err == nil { + snapshot.PublishedAt = at + } + return snapshot, true, nil +} diff --git a/internal/store/config_snapshot_test.go b/internal/store/config_snapshot_test.go new file mode 100644 index 000000000..6ee5d83ee --- /dev/null +++ b/internal/store/config_snapshot_test.go @@ -0,0 +1,63 @@ +package store + +import ( + "testing" + "time" +) + +// TestConfigSnapshotRoundTrip: the daemon publishes the dashboard's +// configuration projection here and the UI process reads it, so the document +// has to come back byte-identical and the newest publish has to win. There is +// one running configuration, so there is one row. +func TestConfigSnapshotRoundTrip(t *testing.T) { + st := openTest(t) + ctx := t.Context() + + if _, found, err := st.ConfigSnapshot(ctx); err != nil || found { + t.Fatalf("ConfigSnapshot on an empty store = (found %v, %v), want (false, nil)", found, err) + } + + first := ConfigSnapshot{ + Schema: "webui.ConfigView/1", + Document: []byte(`{"identity":{"bot_user":"archie"}}`), + PublishedAt: time.Date(2026, 9, 9, 10, 0, 0, 0, time.UTC), + } + if err := st.PutConfigSnapshot(ctx, first); err != nil { + t.Fatalf("PutConfigSnapshot: %v", err) + } + + got, found, err := st.ConfigSnapshot(ctx) + if err != nil || !found { + t.Fatalf("ConfigSnapshot = (found %v, %v), want it stored", found, err) + } + if got.Schema != first.Schema || string(got.Document) != string(first.Document) { + t.Fatalf("snapshot = %+v, want %+v", got, first) + } + if !got.PublishedAt.Equal(first.PublishedAt) { + t.Fatalf("published at = %v, want %v", got.PublishedAt, first.PublishedAt) + } + + second := ConfigSnapshot{ + Schema: "webui.ConfigView/1", + Document: []byte(`{"identity":{"bot_user":"archie-2"}}`), + PublishedAt: first.PublishedAt.Add(time.Hour), + } + if err := st.PutConfigSnapshot(ctx, second); err != nil { + t.Fatalf("republish: %v", err) + } + got, found, err = st.ConfigSnapshot(ctx) + if err != nil || !found { + t.Fatalf("ConfigSnapshot after republish = (found %v, %v)", found, err) + } + if string(got.Document) != string(second.Document) { + t.Fatalf("document = %s, want the republished %s", got.Document, second.Document) + } + + var rows int + if err := st.db.QueryRowContext(ctx, `SELECT count(*) FROM config_snapshot`).Scan(&rows); err != nil { + t.Fatal(err) + } + if rows != 1 { + t.Fatalf("config_snapshot holds %d rows, want exactly 1: republishing replaces, it does not accumulate", rows) + } +} diff --git a/internal/store/interface.go b/internal/store/interface.go index eb48744cd..fd6f4ab5c 100644 --- a/internal/store/interface.go +++ b/internal/store/interface.go @@ -83,6 +83,17 @@ type CaptureStore interface { ListCaptures(ctx context.Context, limit int) ([]CapturedEvent, error) } +// ConfigSnapshotStore holds the running configuration as the dashboard +// renders it: the owner of configuration publishes, the process that displays +// it reads. Separate from every other store surface because it is the only +// one whose writer is the daemon and whose reader is the UI, and because a +// task-scoped credential must never reach the writer. +// See docs/architecture/migration-decisions.md, "Dashboard configuration page". +type ConfigSnapshotStore interface { + PutConfigSnapshot(ctx context.Context, snapshot ConfigSnapshot) error + ConfigSnapshot(ctx context.Context) (ConfigSnapshot, bool, error) +} + // MappingStore persists payload field mappings (t2db.3). Deliberately // separate from TaskStore and CaptureStore for the same reason those are // split: the dashboard's mapping editor should only acquire the mapping diff --git a/internal/store/store.go b/internal/store/store.go index b4eae7a07..7c017d046 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -54,7 +54,7 @@ func Open(ctx context.Context, path string, opts ...OpenOption) (*Store, error) return nil, err } db.SetMaxOpenConns(1) - if _, err := db.ExecContext(ctx, schema+eventsSchema+capturesSchema+mappingsSchema+bindingsSchema); err != nil { + if _, err := db.ExecContext(ctx, schema+eventsSchema+capturesSchema+mappingsSchema+bindingsSchema+configSnapshotSchema); err != nil { return nil, errors.Join(fmt.Errorf("store: init schema: %w", err), db.Close()) } if err := migrateTasks(ctx, db); err != nil { diff --git a/proto/state/v1/state.proto b/proto/state/v1/state.proto index 4baa88368..d81e9ee3a 100644 --- a/proto/state/v1/state.proto +++ b/proto/state/v1/state.proto @@ -46,6 +46,14 @@ service StateStoreService { rpc StageStats(StageStatsRequest) returns (StageStatsResponse); rpc TokensByDay(TokensByDayRequest) returns (TokensByDayResponse); + // 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); + // Capture rpc InsertCapture(InsertCaptureRequest) returns (InsertCaptureResponse); // ListCaptures is superseded by StreamCaptures (kept, unmodified, so an @@ -349,6 +357,25 @@ message StageStatsResponse { repeated StageStat stats = 1; } message TokensByDayRequest { int64 days = 1; } message TokensByDayResponse { repeated DayTokens tokens = 1; } +// 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; +} + message InsertCaptureRequest { CapturedEvent capture = 1; int64 retention_seconds = 2;