From e8d79b38844ca4a39937f62ef09c9c33b35edf30 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Wed, 23 Sep 2026 12:08:44 +1000 Subject: [PATCH] feat(daemon): wire the review-reaction consumer to remediate runs The remediate workflow was registered but had no trigger: the reaction stream was provisioned, the envelope, resolver and owned-PR lookup all landed, yet nothing consumed the stream (pr-review-remediation.md's sequencing left the consumer for this step). The daemon now drains the reaction stream each cycle, before the task drain, so a reaction can be claimed in the same pass that carried it. Per decision 3, the store's owned-PR lookup is the authorization boundary: an unmatched, merged or closed PR drops with a counter, and a public reaction can never start an agent against a foreign repository. Per decision 5, a review is the unit of remediation -- its comment events are appended to the unit while it is queued and dropped once the run is claimed (the round cap bounds the exchange); a standalone comment is its own unit of one; approved reviews never remediate; and archie's own comments, matched on the owning identity's bot user, are excluded so its replies cannot retrigger it. The guarded BeginRemediation/UpdateReviewPayload store methods are the dedup: the pr_open -> queued transition carries the review unit in the same write, so re-delivered reactions fail the status guard instead of starting a second round. Both are new StateStoreService RPCs following the Requeue shape, covered by the local/grpc conformance battery. --- internal/app/archied/bootstrap.go | 5 + internal/contracts/state/v1/state.pb.go | 1174 ++++++++++------- internal/contracts/state/v1/state_grpc.pb.go | 76 ++ internal/daemon/daemon.go | 49 +- internal/daemon/reactions.go | 234 ++++ internal/daemon/reactions_test.go | 367 ++++++ .../domain/storecontract/storecontract.go | 12 + internal/infrastructure/staterpc/client.go | 10 + .../staterpc/conformance_test.go | 29 + internal/infrastructure/staterpc/server.go | 14 + internal/store/remediation_test.go | 109 ++ internal/store/store.go | 60 + proto/state/v1/state.proto | 14 + 13 files changed, 1662 insertions(+), 491 deletions(-) create mode 100644 internal/daemon/reactions.go create mode 100644 internal/daemon/reactions_test.go create mode 100644 internal/store/remediation_test.go diff --git a/internal/app/archied/bootstrap.go b/internal/app/archied/bootstrap.go index 9480f9269..b7acddf63 100644 --- a/internal/app/archied/bootstrap.go +++ b/internal/app/archied/bootstrap.go @@ -185,6 +185,9 @@ type boot struct { lastReload func() config.ReloadStatus natsClient *nats.Client + // reactionClient pulls the ARCHIE_REACTIONS fan-out stream; the daemon + // drains it each cycle to turn review reactions into remediate runs. + reactionClient *nats.Client // natsURL is the endpoint the daemon's own client connected with at // startup. For external mode it is cfg.NATS.URL; for embedded mode it is // the embedded server's ClientURL(). Recorded so Daemon.ConnectedNATS @@ -552,6 +555,7 @@ func (b *boot) connectNATS(ctx context.Context) error { //nolint:nestif // embed // is the deliverable. A future producer (bead archie-core-8li9.3) will // need its own publisher surface, wired when that step lands. b.addCleanup(func() { reactionClient.Close() }) + b.reactionClient = reactionClient log.Info("nats connected", "url", url, "task_stream", nats.DefaultStreamName, "reaction_stream", nats.DefaultReactionStreamName) return nil } @@ -1289,6 +1293,7 @@ func (b *boot) buildDaemon() { Storage: b.storeBackend, Log: log, Tasks: b.natsClient, + Reactions: b.reactionClient, WorktreeGrants: b.worktreeGrants, StateStoreGrants: b.stateStoreGrants, ContainerPool: b.containerPool, diff --git a/internal/contracts/state/v1/state.pb.go b/internal/contracts/state/v1/state.pb.go index 8a2d725d9..3c8d92681 100644 --- a/internal/contracts/state/v1/state.pb.go +++ b/internal/contracts/state/v1/state.pb.go @@ -3396,6 +3396,182 @@ func (*RetryTaskResponse) Descriptor() ([]byte, []int) { return file_state_v1_state_proto_rawDescGZIP(), []int{53} } +type BeginRemediationRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Payload string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BeginRemediationRequest) Reset() { + *x = BeginRemediationRequest{} + mi := &file_state_v1_state_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BeginRemediationRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BeginRemediationRequest) ProtoMessage() {} + +func (x *BeginRemediationRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_state_proto_msgTypes[54] + 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 BeginRemediationRequest.ProtoReflect.Descriptor instead. +func (*BeginRemediationRequest) Descriptor() ([]byte, []int) { + return file_state_v1_state_proto_rawDescGZIP(), []int{54} +} + +func (x *BeginRemediationRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *BeginRemediationRequest) GetPayload() string { + if x != nil { + return x.Payload + } + return "" +} + +type BeginRemediationResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BeginRemediationResponse) Reset() { + *x = BeginRemediationResponse{} + mi := &file_state_v1_state_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BeginRemediationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BeginRemediationResponse) ProtoMessage() {} + +func (x *BeginRemediationResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_state_proto_msgTypes[55] + 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 BeginRemediationResponse.ProtoReflect.Descriptor instead. +func (*BeginRemediationResponse) Descriptor() ([]byte, []int) { + return file_state_v1_state_proto_rawDescGZIP(), []int{55} +} + +type UpdateReviewPayloadRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TaskId int64 `protobuf:"varint,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + Payload string `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateReviewPayloadRequest) Reset() { + *x = UpdateReviewPayloadRequest{} + mi := &file_state_v1_state_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateReviewPayloadRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReviewPayloadRequest) ProtoMessage() {} + +func (x *UpdateReviewPayloadRequest) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_state_proto_msgTypes[56] + 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 UpdateReviewPayloadRequest.ProtoReflect.Descriptor instead. +func (*UpdateReviewPayloadRequest) Descriptor() ([]byte, []int) { + return file_state_v1_state_proto_rawDescGZIP(), []int{56} +} + +func (x *UpdateReviewPayloadRequest) GetTaskId() int64 { + if x != nil { + return x.TaskId + } + return 0 +} + +func (x *UpdateReviewPayloadRequest) GetPayload() string { + if x != nil { + return x.Payload + } + return "" +} + +type UpdateReviewPayloadResponse struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *UpdateReviewPayloadResponse) Reset() { + *x = UpdateReviewPayloadResponse{} + mi := &file_state_v1_state_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *UpdateReviewPayloadResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdateReviewPayloadResponse) ProtoMessage() {} + +func (x *UpdateReviewPayloadResponse) ProtoReflect() protoreflect.Message { + mi := &file_state_v1_state_proto_msgTypes[57] + 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 UpdateReviewPayloadResponse.ProtoReflect.Descriptor instead. +func (*UpdateReviewPayloadResponse) Descriptor() ([]byte, []int) { + return file_state_v1_state_proto_rawDescGZIP(), []int{57} +} + type TaskByIssueRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` @@ -3407,7 +3583,7 @@ type TaskByIssueRequest struct { func (x *TaskByIssueRequest) Reset() { *x = TaskByIssueRequest{} - mi := &file_state_v1_state_proto_msgTypes[54] + mi := &file_state_v1_state_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3419,7 +3595,7 @@ func (x *TaskByIssueRequest) String() string { func (*TaskByIssueRequest) ProtoMessage() {} func (x *TaskByIssueRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[54] + mi := &file_state_v1_state_proto_msgTypes[58] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3432,7 +3608,7 @@ func (x *TaskByIssueRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskByIssueRequest.ProtoReflect.Descriptor instead. func (*TaskByIssueRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{54} + return file_state_v1_state_proto_rawDescGZIP(), []int{58} } func (x *TaskByIssueRequest) GetOwner() string { @@ -3466,7 +3642,7 @@ type TaskByIssueResponse struct { func (x *TaskByIssueResponse) Reset() { *x = TaskByIssueResponse{} - mi := &file_state_v1_state_proto_msgTypes[55] + mi := &file_state_v1_state_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3478,7 +3654,7 @@ func (x *TaskByIssueResponse) String() string { func (*TaskByIssueResponse) ProtoMessage() {} func (x *TaskByIssueResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[55] + mi := &file_state_v1_state_proto_msgTypes[59] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3491,7 +3667,7 @@ func (x *TaskByIssueResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskByIssueResponse.ProtoReflect.Descriptor instead. func (*TaskByIssueResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{55} + return file_state_v1_state_proto_rawDescGZIP(), []int{59} } func (x *TaskByIssueResponse) GetTask() *Task { @@ -3519,7 +3695,7 @@ type OpenTaskByPRRequest struct { func (x *OpenTaskByPRRequest) Reset() { *x = OpenTaskByPRRequest{} - mi := &file_state_v1_state_proto_msgTypes[56] + mi := &file_state_v1_state_proto_msgTypes[60] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3531,7 +3707,7 @@ func (x *OpenTaskByPRRequest) String() string { func (*OpenTaskByPRRequest) ProtoMessage() {} func (x *OpenTaskByPRRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[56] + mi := &file_state_v1_state_proto_msgTypes[60] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3544,7 +3720,7 @@ func (x *OpenTaskByPRRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OpenTaskByPRRequest.ProtoReflect.Descriptor instead. func (*OpenTaskByPRRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{56} + return file_state_v1_state_proto_rawDescGZIP(), []int{60} } func (x *OpenTaskByPRRequest) GetOwner() string { @@ -3578,7 +3754,7 @@ type OpenTaskByPRResponse struct { func (x *OpenTaskByPRResponse) Reset() { *x = OpenTaskByPRResponse{} - mi := &file_state_v1_state_proto_msgTypes[57] + mi := &file_state_v1_state_proto_msgTypes[61] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3590,7 +3766,7 @@ func (x *OpenTaskByPRResponse) String() string { func (*OpenTaskByPRResponse) ProtoMessage() {} func (x *OpenTaskByPRResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[57] + mi := &file_state_v1_state_proto_msgTypes[61] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3603,7 +3779,7 @@ func (x *OpenTaskByPRResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OpenTaskByPRResponse.ProtoReflect.Descriptor instead. func (*OpenTaskByPRResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{57} + return file_state_v1_state_proto_rawDescGZIP(), []int{61} } func (x *OpenTaskByPRResponse) GetTask() *Task { @@ -3629,7 +3805,7 @@ type TaskByIDRequest struct { func (x *TaskByIDRequest) Reset() { *x = TaskByIDRequest{} - mi := &file_state_v1_state_proto_msgTypes[58] + mi := &file_state_v1_state_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3641,7 +3817,7 @@ func (x *TaskByIDRequest) String() string { func (*TaskByIDRequest) ProtoMessage() {} func (x *TaskByIDRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[58] + mi := &file_state_v1_state_proto_msgTypes[62] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3654,7 +3830,7 @@ func (x *TaskByIDRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskByIDRequest.ProtoReflect.Descriptor instead. func (*TaskByIDRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{58} + return file_state_v1_state_proto_rawDescGZIP(), []int{62} } func (x *TaskByIDRequest) GetTaskId() int64 { @@ -3674,7 +3850,7 @@ type TaskByIDResponse struct { func (x *TaskByIDResponse) Reset() { *x = TaskByIDResponse{} - mi := &file_state_v1_state_proto_msgTypes[59] + mi := &file_state_v1_state_proto_msgTypes[63] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3686,7 +3862,7 @@ func (x *TaskByIDResponse) String() string { func (*TaskByIDResponse) ProtoMessage() {} func (x *TaskByIDResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[59] + mi := &file_state_v1_state_proto_msgTypes[63] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3699,7 +3875,7 @@ func (x *TaskByIDResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskByIDResponse.ProtoReflect.Descriptor instead. func (*TaskByIDResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{59} + return file_state_v1_state_proto_rawDescGZIP(), []int{63} } func (x *TaskByIDResponse) GetTask() *Task { @@ -3724,7 +3900,7 @@ type OpenPRsRequest struct { func (x *OpenPRsRequest) Reset() { *x = OpenPRsRequest{} - mi := &file_state_v1_state_proto_msgTypes[60] + mi := &file_state_v1_state_proto_msgTypes[64] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3736,7 +3912,7 @@ func (x *OpenPRsRequest) String() string { func (*OpenPRsRequest) ProtoMessage() {} func (x *OpenPRsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[60] + mi := &file_state_v1_state_proto_msgTypes[64] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3749,7 +3925,7 @@ func (x *OpenPRsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use OpenPRsRequest.ProtoReflect.Descriptor instead. func (*OpenPRsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{60} + return file_state_v1_state_proto_rawDescGZIP(), []int{64} } type OpenPRsResponse struct { @@ -3761,7 +3937,7 @@ type OpenPRsResponse struct { func (x *OpenPRsResponse) Reset() { *x = OpenPRsResponse{} - mi := &file_state_v1_state_proto_msgTypes[61] + mi := &file_state_v1_state_proto_msgTypes[65] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3773,7 +3949,7 @@ func (x *OpenPRsResponse) String() string { func (*OpenPRsResponse) ProtoMessage() {} func (x *OpenPRsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[61] + mi := &file_state_v1_state_proto_msgTypes[65] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3786,7 +3962,7 @@ func (x *OpenPRsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use OpenPRsResponse.ProtoReflect.Descriptor instead. func (*OpenPRsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{61} + return file_state_v1_state_proto_rawDescGZIP(), []int{65} } func (x *OpenPRsResponse) GetTasks() []*Task { @@ -3804,7 +3980,7 @@ type ClearTerminalTasksRequest struct { func (x *ClearTerminalTasksRequest) Reset() { *x = ClearTerminalTasksRequest{} - mi := &file_state_v1_state_proto_msgTypes[62] + mi := &file_state_v1_state_proto_msgTypes[66] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3816,7 +3992,7 @@ func (x *ClearTerminalTasksRequest) String() string { func (*ClearTerminalTasksRequest) ProtoMessage() {} func (x *ClearTerminalTasksRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[62] + mi := &file_state_v1_state_proto_msgTypes[66] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3829,7 +4005,7 @@ func (x *ClearTerminalTasksRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ClearTerminalTasksRequest.ProtoReflect.Descriptor instead. func (*ClearTerminalTasksRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{62} + return file_state_v1_state_proto_rawDescGZIP(), []int{66} } type ClearTerminalTasksResponse struct { @@ -3841,7 +4017,7 @@ type ClearTerminalTasksResponse struct { func (x *ClearTerminalTasksResponse) Reset() { *x = ClearTerminalTasksResponse{} - mi := &file_state_v1_state_proto_msgTypes[63] + mi := &file_state_v1_state_proto_msgTypes[67] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3853,7 +4029,7 @@ func (x *ClearTerminalTasksResponse) String() string { func (*ClearTerminalTasksResponse) ProtoMessage() {} func (x *ClearTerminalTasksResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[63] + mi := &file_state_v1_state_proto_msgTypes[67] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3866,7 +4042,7 @@ func (x *ClearTerminalTasksResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ClearTerminalTasksResponse.ProtoReflect.Descriptor instead. func (*ClearTerminalTasksResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{63} + return file_state_v1_state_proto_rawDescGZIP(), []int{67} } func (x *ClearTerminalTasksResponse) GetCount() int64 { @@ -3885,7 +4061,7 @@ type TasksRequest struct { func (x *TasksRequest) Reset() { *x = TasksRequest{} - mi := &file_state_v1_state_proto_msgTypes[64] + mi := &file_state_v1_state_proto_msgTypes[68] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3897,7 +4073,7 @@ func (x *TasksRequest) String() string { func (*TasksRequest) ProtoMessage() {} func (x *TasksRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[64] + mi := &file_state_v1_state_proto_msgTypes[68] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3910,7 +4086,7 @@ func (x *TasksRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TasksRequest.ProtoReflect.Descriptor instead. func (*TasksRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{64} + return file_state_v1_state_proto_rawDescGZIP(), []int{68} } func (x *TasksRequest) GetLimit() int64 { @@ -3929,7 +4105,7 @@ type TasksResponse struct { func (x *TasksResponse) Reset() { *x = TasksResponse{} - mi := &file_state_v1_state_proto_msgTypes[65] + mi := &file_state_v1_state_proto_msgTypes[69] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3941,7 +4117,7 @@ func (x *TasksResponse) String() string { func (*TasksResponse) ProtoMessage() {} func (x *TasksResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[65] + mi := &file_state_v1_state_proto_msgTypes[69] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3954,7 +4130,7 @@ func (x *TasksResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TasksResponse.ProtoReflect.Descriptor instead. func (*TasksResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{65} + return file_state_v1_state_proto_rawDescGZIP(), []int{69} } func (x *TasksResponse) GetTasks() []*Task { @@ -3972,7 +4148,7 @@ type StatusCountsRequest struct { func (x *StatusCountsRequest) Reset() { *x = StatusCountsRequest{} - mi := &file_state_v1_state_proto_msgTypes[66] + mi := &file_state_v1_state_proto_msgTypes[70] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3984,7 +4160,7 @@ func (x *StatusCountsRequest) String() string { func (*StatusCountsRequest) ProtoMessage() {} func (x *StatusCountsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[66] + mi := &file_state_v1_state_proto_msgTypes[70] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3997,7 +4173,7 @@ func (x *StatusCountsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusCountsRequest.ProtoReflect.Descriptor instead. func (*StatusCountsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{66} + return file_state_v1_state_proto_rawDescGZIP(), []int{70} } type StatusCountsResponse struct { @@ -4009,7 +4185,7 @@ type StatusCountsResponse struct { func (x *StatusCountsResponse) Reset() { *x = StatusCountsResponse{} - mi := &file_state_v1_state_proto_msgTypes[67] + mi := &file_state_v1_state_proto_msgTypes[71] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4021,7 +4197,7 @@ func (x *StatusCountsResponse) String() string { func (*StatusCountsResponse) ProtoMessage() {} func (x *StatusCountsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[67] + mi := &file_state_v1_state_proto_msgTypes[71] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4034,7 +4210,7 @@ func (x *StatusCountsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StatusCountsResponse.ProtoReflect.Descriptor instead. func (*StatusCountsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{67} + return file_state_v1_state_proto_rawDescGZIP(), []int{71} } func (x *StatusCountsResponse) GetCounts() map[string]int64 { @@ -4053,7 +4229,7 @@ type InsertEventRequest struct { func (x *InsertEventRequest) Reset() { *x = InsertEventRequest{} - mi := &file_state_v1_state_proto_msgTypes[68] + mi := &file_state_v1_state_proto_msgTypes[72] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4065,7 +4241,7 @@ func (x *InsertEventRequest) String() string { func (*InsertEventRequest) ProtoMessage() {} func (x *InsertEventRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[68] + mi := &file_state_v1_state_proto_msgTypes[72] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4078,7 +4254,7 @@ func (x *InsertEventRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use InsertEventRequest.ProtoReflect.Descriptor instead. func (*InsertEventRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{68} + return file_state_v1_state_proto_rawDescGZIP(), []int{72} } func (x *InsertEventRequest) GetEvent() *Event { @@ -4097,7 +4273,7 @@ type InsertEventResponse struct { func (x *InsertEventResponse) Reset() { *x = InsertEventResponse{} - mi := &file_state_v1_state_proto_msgTypes[69] + mi := &file_state_v1_state_proto_msgTypes[73] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4109,7 +4285,7 @@ func (x *InsertEventResponse) String() string { func (*InsertEventResponse) ProtoMessage() {} func (x *InsertEventResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[69] + mi := &file_state_v1_state_proto_msgTypes[73] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4122,7 +4298,7 @@ func (x *InsertEventResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use InsertEventResponse.ProtoReflect.Descriptor instead. func (*InsertEventResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{69} + return file_state_v1_state_proto_rawDescGZIP(), []int{73} } func (x *InsertEventResponse) GetId() int64 { @@ -4147,7 +4323,7 @@ type EventsSinceRequest struct { func (x *EventsSinceRequest) Reset() { *x = EventsSinceRequest{} - mi := &file_state_v1_state_proto_msgTypes[70] + mi := &file_state_v1_state_proto_msgTypes[74] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4159,7 +4335,7 @@ func (x *EventsSinceRequest) String() string { func (*EventsSinceRequest) ProtoMessage() {} func (x *EventsSinceRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[70] + mi := &file_state_v1_state_proto_msgTypes[74] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4172,7 +4348,7 @@ func (x *EventsSinceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EventsSinceRequest.ProtoReflect.Descriptor instead. func (*EventsSinceRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{70} + return file_state_v1_state_proto_rawDescGZIP(), []int{74} } func (x *EventsSinceRequest) GetSinceId() string { @@ -4198,7 +4374,7 @@ type EventsSinceResponse struct { func (x *EventsSinceResponse) Reset() { *x = EventsSinceResponse{} - mi := &file_state_v1_state_proto_msgTypes[71] + mi := &file_state_v1_state_proto_msgTypes[75] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4210,7 +4386,7 @@ func (x *EventsSinceResponse) String() string { func (*EventsSinceResponse) ProtoMessage() {} func (x *EventsSinceResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[71] + mi := &file_state_v1_state_proto_msgTypes[75] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4223,7 +4399,7 @@ func (x *EventsSinceResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EventsSinceResponse.ProtoReflect.Descriptor instead. func (*EventsSinceResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{71} + return file_state_v1_state_proto_rawDescGZIP(), []int{75} } func (x *EventsSinceResponse) GetEvents() []*Event { @@ -4242,7 +4418,7 @@ type TaskEventsRequest struct { func (x *TaskEventsRequest) Reset() { *x = TaskEventsRequest{} - mi := &file_state_v1_state_proto_msgTypes[72] + mi := &file_state_v1_state_proto_msgTypes[76] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4254,7 +4430,7 @@ func (x *TaskEventsRequest) String() string { func (*TaskEventsRequest) ProtoMessage() {} func (x *TaskEventsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[72] + mi := &file_state_v1_state_proto_msgTypes[76] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4267,7 +4443,7 @@ func (x *TaskEventsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskEventsRequest.ProtoReflect.Descriptor instead. func (*TaskEventsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{72} + return file_state_v1_state_proto_rawDescGZIP(), []int{76} } func (x *TaskEventsRequest) GetTaskId() int64 { @@ -4286,7 +4462,7 @@ type TaskEventsResponse struct { func (x *TaskEventsResponse) Reset() { *x = TaskEventsResponse{} - mi := &file_state_v1_state_proto_msgTypes[73] + mi := &file_state_v1_state_proto_msgTypes[77] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4298,7 +4474,7 @@ func (x *TaskEventsResponse) String() string { func (*TaskEventsResponse) ProtoMessage() {} func (x *TaskEventsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[73] + mi := &file_state_v1_state_proto_msgTypes[77] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4311,7 +4487,7 @@ func (x *TaskEventsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskEventsResponse.ProtoReflect.Descriptor instead. func (*TaskEventsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{73} + return file_state_v1_state_proto_rawDescGZIP(), []int{77} } func (x *TaskEventsResponse) GetEvents() []*Event { @@ -4329,7 +4505,7 @@ type WorkflowStatsRequest struct { func (x *WorkflowStatsRequest) Reset() { *x = WorkflowStatsRequest{} - mi := &file_state_v1_state_proto_msgTypes[74] + mi := &file_state_v1_state_proto_msgTypes[78] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4341,7 +4517,7 @@ func (x *WorkflowStatsRequest) String() string { func (*WorkflowStatsRequest) ProtoMessage() {} func (x *WorkflowStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[74] + mi := &file_state_v1_state_proto_msgTypes[78] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4354,7 +4530,7 @@ func (x *WorkflowStatsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkflowStatsRequest.ProtoReflect.Descriptor instead. func (*WorkflowStatsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{74} + return file_state_v1_state_proto_rawDescGZIP(), []int{78} } type WorkflowStatsResponse struct { @@ -4366,7 +4542,7 @@ type WorkflowStatsResponse struct { func (x *WorkflowStatsResponse) Reset() { *x = WorkflowStatsResponse{} - mi := &file_state_v1_state_proto_msgTypes[75] + mi := &file_state_v1_state_proto_msgTypes[79] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4378,7 +4554,7 @@ func (x *WorkflowStatsResponse) String() string { func (*WorkflowStatsResponse) ProtoMessage() {} func (x *WorkflowStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[75] + mi := &file_state_v1_state_proto_msgTypes[79] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4391,7 +4567,7 @@ func (x *WorkflowStatsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use WorkflowStatsResponse.ProtoReflect.Descriptor instead. func (*WorkflowStatsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{75} + return file_state_v1_state_proto_rawDescGZIP(), []int{79} } func (x *WorkflowStatsResponse) GetStats() []*WorkflowStat { @@ -4409,7 +4585,7 @@ type StageStatsRequest struct { func (x *StageStatsRequest) Reset() { *x = StageStatsRequest{} - mi := &file_state_v1_state_proto_msgTypes[76] + mi := &file_state_v1_state_proto_msgTypes[80] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4421,7 +4597,7 @@ func (x *StageStatsRequest) String() string { func (*StageStatsRequest) ProtoMessage() {} func (x *StageStatsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[76] + mi := &file_state_v1_state_proto_msgTypes[80] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4434,7 +4610,7 @@ func (x *StageStatsRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StageStatsRequest.ProtoReflect.Descriptor instead. func (*StageStatsRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{76} + return file_state_v1_state_proto_rawDescGZIP(), []int{80} } type StageStatsResponse struct { @@ -4446,7 +4622,7 @@ type StageStatsResponse struct { func (x *StageStatsResponse) Reset() { *x = StageStatsResponse{} - mi := &file_state_v1_state_proto_msgTypes[77] + mi := &file_state_v1_state_proto_msgTypes[81] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4458,7 +4634,7 @@ func (x *StageStatsResponse) String() string { func (*StageStatsResponse) ProtoMessage() {} func (x *StageStatsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[77] + mi := &file_state_v1_state_proto_msgTypes[81] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4471,7 +4647,7 @@ func (x *StageStatsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StageStatsResponse.ProtoReflect.Descriptor instead. func (*StageStatsResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{77} + return file_state_v1_state_proto_rawDescGZIP(), []int{81} } func (x *StageStatsResponse) GetStats() []*StageStat { @@ -4490,7 +4666,7 @@ type TokensByDayRequest struct { func (x *TokensByDayRequest) Reset() { *x = TokensByDayRequest{} - mi := &file_state_v1_state_proto_msgTypes[78] + mi := &file_state_v1_state_proto_msgTypes[82] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4502,7 +4678,7 @@ func (x *TokensByDayRequest) String() string { func (*TokensByDayRequest) ProtoMessage() {} func (x *TokensByDayRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[78] + mi := &file_state_v1_state_proto_msgTypes[82] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4515,7 +4691,7 @@ func (x *TokensByDayRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use TokensByDayRequest.ProtoReflect.Descriptor instead. func (*TokensByDayRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{78} + return file_state_v1_state_proto_rawDescGZIP(), []int{82} } func (x *TokensByDayRequest) GetDays() int64 { @@ -4534,7 +4710,7 @@ type TokensByDayResponse struct { func (x *TokensByDayResponse) Reset() { *x = TokensByDayResponse{} - mi := &file_state_v1_state_proto_msgTypes[79] + mi := &file_state_v1_state_proto_msgTypes[83] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4546,7 +4722,7 @@ func (x *TokensByDayResponse) String() string { func (*TokensByDayResponse) ProtoMessage() {} func (x *TokensByDayResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[79] + mi := &file_state_v1_state_proto_msgTypes[83] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4559,7 +4735,7 @@ func (x *TokensByDayResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use TokensByDayResponse.ProtoReflect.Descriptor instead. func (*TokensByDayResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{79} + return file_state_v1_state_proto_rawDescGZIP(), []int{83} } func (x *TokensByDayResponse) GetTokens() []*DayTokens { @@ -4586,7 +4762,7 @@ type ConfigSnapshot struct { func (x *ConfigSnapshot) Reset() { *x = ConfigSnapshot{} - mi := &file_state_v1_state_proto_msgTypes[80] + mi := &file_state_v1_state_proto_msgTypes[84] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4598,7 +4774,7 @@ func (x *ConfigSnapshot) String() string { func (*ConfigSnapshot) ProtoMessage() {} func (x *ConfigSnapshot) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[80] + mi := &file_state_v1_state_proto_msgTypes[84] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4611,7 +4787,7 @@ func (x *ConfigSnapshot) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigSnapshot.ProtoReflect.Descriptor instead. func (*ConfigSnapshot) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{80} + return file_state_v1_state_proto_rawDescGZIP(), []int{84} } func (x *ConfigSnapshot) GetSchema() string { @@ -4644,7 +4820,7 @@ type PutConfigSnapshotRequest struct { func (x *PutConfigSnapshotRequest) Reset() { *x = PutConfigSnapshotRequest{} - mi := &file_state_v1_state_proto_msgTypes[81] + mi := &file_state_v1_state_proto_msgTypes[85] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4656,7 +4832,7 @@ func (x *PutConfigSnapshotRequest) String() string { func (*PutConfigSnapshotRequest) ProtoMessage() {} func (x *PutConfigSnapshotRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[81] + mi := &file_state_v1_state_proto_msgTypes[85] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4669,7 +4845,7 @@ func (x *PutConfigSnapshotRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PutConfigSnapshotRequest.ProtoReflect.Descriptor instead. func (*PutConfigSnapshotRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{81} + return file_state_v1_state_proto_rawDescGZIP(), []int{85} } func (x *PutConfigSnapshotRequest) GetSnapshot() *ConfigSnapshot { @@ -4687,7 +4863,7 @@ type PutConfigSnapshotResponse struct { func (x *PutConfigSnapshotResponse) Reset() { *x = PutConfigSnapshotResponse{} - mi := &file_state_v1_state_proto_msgTypes[82] + mi := &file_state_v1_state_proto_msgTypes[86] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4699,7 +4875,7 @@ func (x *PutConfigSnapshotResponse) String() string { func (*PutConfigSnapshotResponse) ProtoMessage() {} func (x *PutConfigSnapshotResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[82] + mi := &file_state_v1_state_proto_msgTypes[86] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4712,7 +4888,7 @@ func (x *PutConfigSnapshotResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PutConfigSnapshotResponse.ProtoReflect.Descriptor instead. func (*PutConfigSnapshotResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{82} + return file_state_v1_state_proto_rawDescGZIP(), []int{86} } type GetConfigSnapshotRequest struct { @@ -4723,7 +4899,7 @@ type GetConfigSnapshotRequest struct { func (x *GetConfigSnapshotRequest) Reset() { *x = GetConfigSnapshotRequest{} - mi := &file_state_v1_state_proto_msgTypes[83] + mi := &file_state_v1_state_proto_msgTypes[87] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4735,7 +4911,7 @@ func (x *GetConfigSnapshotRequest) String() string { func (*GetConfigSnapshotRequest) ProtoMessage() {} func (x *GetConfigSnapshotRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[83] + mi := &file_state_v1_state_proto_msgTypes[87] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4748,7 +4924,7 @@ func (x *GetConfigSnapshotRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetConfigSnapshotRequest.ProtoReflect.Descriptor instead. func (*GetConfigSnapshotRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{83} + return file_state_v1_state_proto_rawDescGZIP(), []int{87} } type GetConfigSnapshotResponse struct { @@ -4761,7 +4937,7 @@ type GetConfigSnapshotResponse struct { func (x *GetConfigSnapshotResponse) Reset() { *x = GetConfigSnapshotResponse{} - mi := &file_state_v1_state_proto_msgTypes[84] + mi := &file_state_v1_state_proto_msgTypes[88] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4773,7 +4949,7 @@ func (x *GetConfigSnapshotResponse) String() string { func (*GetConfigSnapshotResponse) ProtoMessage() {} func (x *GetConfigSnapshotResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[84] + mi := &file_state_v1_state_proto_msgTypes[88] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4786,7 +4962,7 @@ func (x *GetConfigSnapshotResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetConfigSnapshotResponse.ProtoReflect.Descriptor instead. func (*GetConfigSnapshotResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{84} + return file_state_v1_state_proto_rawDescGZIP(), []int{88} } func (x *GetConfigSnapshotResponse) GetSnapshot() *ConfigSnapshot { @@ -4823,7 +4999,7 @@ type ChannelStatus struct { func (x *ChannelStatus) Reset() { *x = ChannelStatus{} - mi := &file_state_v1_state_proto_msgTypes[85] + mi := &file_state_v1_state_proto_msgTypes[89] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4835,7 +5011,7 @@ func (x *ChannelStatus) String() string { func (*ChannelStatus) ProtoMessage() {} func (x *ChannelStatus) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[85] + mi := &file_state_v1_state_proto_msgTypes[89] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4848,7 +5024,7 @@ func (x *ChannelStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use ChannelStatus.ProtoReflect.Descriptor instead. func (*ChannelStatus) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{85} + return file_state_v1_state_proto_rawDescGZIP(), []int{89} } func (x *ChannelStatus) GetId() string { @@ -4909,7 +5085,7 @@ type PutChannelStatusRequest struct { func (x *PutChannelStatusRequest) Reset() { *x = PutChannelStatusRequest{} - mi := &file_state_v1_state_proto_msgTypes[86] + mi := &file_state_v1_state_proto_msgTypes[90] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4921,7 +5097,7 @@ func (x *PutChannelStatusRequest) String() string { func (*PutChannelStatusRequest) ProtoMessage() {} func (x *PutChannelStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[86] + mi := &file_state_v1_state_proto_msgTypes[90] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4934,7 +5110,7 @@ func (x *PutChannelStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PutChannelStatusRequest.ProtoReflect.Descriptor instead. func (*PutChannelStatusRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{86} + return file_state_v1_state_proto_rawDescGZIP(), []int{90} } func (x *PutChannelStatusRequest) GetChannels() []*ChannelStatus { @@ -4952,7 +5128,7 @@ type PutChannelStatusResponse struct { func (x *PutChannelStatusResponse) Reset() { *x = PutChannelStatusResponse{} - mi := &file_state_v1_state_proto_msgTypes[87] + mi := &file_state_v1_state_proto_msgTypes[91] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4964,7 +5140,7 @@ func (x *PutChannelStatusResponse) String() string { func (*PutChannelStatusResponse) ProtoMessage() {} func (x *PutChannelStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[87] + mi := &file_state_v1_state_proto_msgTypes[91] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4977,7 +5153,7 @@ func (x *PutChannelStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PutChannelStatusResponse.ProtoReflect.Descriptor instead. func (*PutChannelStatusResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{87} + return file_state_v1_state_proto_rawDescGZIP(), []int{91} } type ListChannelStatusRequest struct { @@ -4988,7 +5164,7 @@ type ListChannelStatusRequest struct { func (x *ListChannelStatusRequest) Reset() { *x = ListChannelStatusRequest{} - mi := &file_state_v1_state_proto_msgTypes[88] + mi := &file_state_v1_state_proto_msgTypes[92] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5000,7 +5176,7 @@ func (x *ListChannelStatusRequest) String() string { func (*ListChannelStatusRequest) ProtoMessage() {} func (x *ListChannelStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[88] + mi := &file_state_v1_state_proto_msgTypes[92] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5013,7 +5189,7 @@ func (x *ListChannelStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListChannelStatusRequest.ProtoReflect.Descriptor instead. func (*ListChannelStatusRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{88} + return file_state_v1_state_proto_rawDescGZIP(), []int{92} } type ListChannelStatusResponse struct { @@ -5025,7 +5201,7 @@ type ListChannelStatusResponse struct { func (x *ListChannelStatusResponse) Reset() { *x = ListChannelStatusResponse{} - mi := &file_state_v1_state_proto_msgTypes[89] + mi := &file_state_v1_state_proto_msgTypes[93] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5037,7 +5213,7 @@ func (x *ListChannelStatusResponse) String() string { func (*ListChannelStatusResponse) ProtoMessage() {} func (x *ListChannelStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[89] + mi := &file_state_v1_state_proto_msgTypes[93] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5050,7 +5226,7 @@ func (x *ListChannelStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListChannelStatusResponse.ProtoReflect.Descriptor instead. func (*ListChannelStatusResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{89} + return file_state_v1_state_proto_rawDescGZIP(), []int{93} } func (x *ListChannelStatusResponse) GetChannels() []*ChannelStatus { @@ -5079,7 +5255,7 @@ type ApplyStatus struct { func (x *ApplyStatus) Reset() { *x = ApplyStatus{} - mi := &file_state_v1_state_proto_msgTypes[90] + mi := &file_state_v1_state_proto_msgTypes[94] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5091,7 +5267,7 @@ func (x *ApplyStatus) String() string { func (*ApplyStatus) ProtoMessage() {} func (x *ApplyStatus) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[90] + mi := &file_state_v1_state_proto_msgTypes[94] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5104,7 +5280,7 @@ func (x *ApplyStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use ApplyStatus.ProtoReflect.Descriptor instead. func (*ApplyStatus) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{90} + return file_state_v1_state_proto_rawDescGZIP(), []int{94} } func (x *ApplyStatus) GetProcess() string { @@ -5151,7 +5327,7 @@ type PutApplyStatusRequest struct { func (x *PutApplyStatusRequest) Reset() { *x = PutApplyStatusRequest{} - mi := &file_state_v1_state_proto_msgTypes[91] + mi := &file_state_v1_state_proto_msgTypes[95] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5163,7 +5339,7 @@ func (x *PutApplyStatusRequest) String() string { func (*PutApplyStatusRequest) ProtoMessage() {} func (x *PutApplyStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[91] + mi := &file_state_v1_state_proto_msgTypes[95] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5176,7 +5352,7 @@ func (x *PutApplyStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use PutApplyStatusRequest.ProtoReflect.Descriptor instead. func (*PutApplyStatusRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{91} + return file_state_v1_state_proto_rawDescGZIP(), []int{95} } func (x *PutApplyStatusRequest) GetStatus() *ApplyStatus { @@ -5194,7 +5370,7 @@ type PutApplyStatusResponse struct { func (x *PutApplyStatusResponse) Reset() { *x = PutApplyStatusResponse{} - mi := &file_state_v1_state_proto_msgTypes[92] + mi := &file_state_v1_state_proto_msgTypes[96] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5206,7 +5382,7 @@ func (x *PutApplyStatusResponse) String() string { func (*PutApplyStatusResponse) ProtoMessage() {} func (x *PutApplyStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[92] + mi := &file_state_v1_state_proto_msgTypes[96] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5219,7 +5395,7 @@ func (x *PutApplyStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PutApplyStatusResponse.ProtoReflect.Descriptor instead. func (*PutApplyStatusResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{92} + return file_state_v1_state_proto_rawDescGZIP(), []int{96} } type ListApplyStatusRequest struct { @@ -5230,7 +5406,7 @@ type ListApplyStatusRequest struct { func (x *ListApplyStatusRequest) Reset() { *x = ListApplyStatusRequest{} - mi := &file_state_v1_state_proto_msgTypes[93] + mi := &file_state_v1_state_proto_msgTypes[97] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5242,7 +5418,7 @@ func (x *ListApplyStatusRequest) String() string { func (*ListApplyStatusRequest) ProtoMessage() {} func (x *ListApplyStatusRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[93] + mi := &file_state_v1_state_proto_msgTypes[97] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5255,7 +5431,7 @@ func (x *ListApplyStatusRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListApplyStatusRequest.ProtoReflect.Descriptor instead. func (*ListApplyStatusRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{93} + return file_state_v1_state_proto_rawDescGZIP(), []int{97} } type ListApplyStatusResponse struct { @@ -5267,7 +5443,7 @@ type ListApplyStatusResponse struct { func (x *ListApplyStatusResponse) Reset() { *x = ListApplyStatusResponse{} - mi := &file_state_v1_state_proto_msgTypes[94] + mi := &file_state_v1_state_proto_msgTypes[98] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5279,7 +5455,7 @@ func (x *ListApplyStatusResponse) String() string { func (*ListApplyStatusResponse) ProtoMessage() {} func (x *ListApplyStatusResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[94] + mi := &file_state_v1_state_proto_msgTypes[98] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5292,7 +5468,7 @@ func (x *ListApplyStatusResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListApplyStatusResponse.ProtoReflect.Descriptor instead. func (*ListApplyStatusResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{94} + return file_state_v1_state_proto_rawDescGZIP(), []int{98} } func (x *ListApplyStatusResponse) GetStatuses() []*ApplyStatus { @@ -5319,7 +5495,7 @@ type TaskLogEntry struct { func (x *TaskLogEntry) Reset() { *x = TaskLogEntry{} - mi := &file_state_v1_state_proto_msgTypes[95] + mi := &file_state_v1_state_proto_msgTypes[99] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5331,7 +5507,7 @@ func (x *TaskLogEntry) String() string { func (*TaskLogEntry) ProtoMessage() {} func (x *TaskLogEntry) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[95] + mi := &file_state_v1_state_proto_msgTypes[99] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5344,7 +5520,7 @@ func (x *TaskLogEntry) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskLogEntry.ProtoReflect.Descriptor instead. func (*TaskLogEntry) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{95} + return file_state_v1_state_proto_rawDescGZIP(), []int{99} } func (x *TaskLogEntry) GetId() int64 { @@ -5409,7 +5585,7 @@ type ReadTaskLogRequest struct { func (x *ReadTaskLogRequest) Reset() { *x = ReadTaskLogRequest{} - mi := &file_state_v1_state_proto_msgTypes[96] + mi := &file_state_v1_state_proto_msgTypes[100] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5421,7 +5597,7 @@ func (x *ReadTaskLogRequest) String() string { func (*ReadTaskLogRequest) ProtoMessage() {} func (x *ReadTaskLogRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[96] + mi := &file_state_v1_state_proto_msgTypes[100] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5434,7 +5610,7 @@ func (x *ReadTaskLogRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadTaskLogRequest.ProtoReflect.Descriptor instead. func (*ReadTaskLogRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{96} + return file_state_v1_state_proto_rawDescGZIP(), []int{100} } func (x *ReadTaskLogRequest) GetTaskId() int64 { @@ -5520,7 +5696,7 @@ type ReadTaskLogResponse struct { func (x *ReadTaskLogResponse) Reset() { *x = ReadTaskLogResponse{} - mi := &file_state_v1_state_proto_msgTypes[97] + mi := &file_state_v1_state_proto_msgTypes[101] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5532,7 +5708,7 @@ func (x *ReadTaskLogResponse) String() string { func (*ReadTaskLogResponse) ProtoMessage() {} func (x *ReadTaskLogResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[97] + mi := &file_state_v1_state_proto_msgTypes[101] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5545,7 +5721,7 @@ func (x *ReadTaskLogResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadTaskLogResponse.ProtoReflect.Descriptor instead. func (*ReadTaskLogResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{97} + return file_state_v1_state_proto_rawDescGZIP(), []int{101} } func (x *ReadTaskLogResponse) GetEntries() []*TaskLogEntry { @@ -5604,7 +5780,7 @@ type StreamTaskLogContentRequest struct { func (x *StreamTaskLogContentRequest) Reset() { *x = StreamTaskLogContentRequest{} - mi := &file_state_v1_state_proto_msgTypes[98] + mi := &file_state_v1_state_proto_msgTypes[102] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5616,7 +5792,7 @@ func (x *StreamTaskLogContentRequest) String() string { func (*StreamTaskLogContentRequest) ProtoMessage() {} func (x *StreamTaskLogContentRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[98] + mi := &file_state_v1_state_proto_msgTypes[102] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5629,7 +5805,7 @@ func (x *StreamTaskLogContentRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamTaskLogContentRequest.ProtoReflect.Descriptor instead. func (*StreamTaskLogContentRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{98} + return file_state_v1_state_proto_rawDescGZIP(), []int{102} } func (x *StreamTaskLogContentRequest) GetTaskId() int64 { @@ -5657,7 +5833,7 @@ type StreamTaskLogContentResponse struct { func (x *StreamTaskLogContentResponse) Reset() { *x = StreamTaskLogContentResponse{} - mi := &file_state_v1_state_proto_msgTypes[99] + mi := &file_state_v1_state_proto_msgTypes[103] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5669,7 +5845,7 @@ func (x *StreamTaskLogContentResponse) String() string { func (*StreamTaskLogContentResponse) ProtoMessage() {} func (x *StreamTaskLogContentResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[99] + mi := &file_state_v1_state_proto_msgTypes[103] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5682,7 +5858,7 @@ func (x *StreamTaskLogContentResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StreamTaskLogContentResponse.ProtoReflect.Descriptor instead. func (*StreamTaskLogContentResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{99} + return file_state_v1_state_proto_rawDescGZIP(), []int{103} } func (x *StreamTaskLogContentResponse) GetChunk() []byte { @@ -5717,7 +5893,7 @@ type InsertCaptureRequest struct { func (x *InsertCaptureRequest) Reset() { *x = InsertCaptureRequest{} - mi := &file_state_v1_state_proto_msgTypes[100] + mi := &file_state_v1_state_proto_msgTypes[104] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5729,7 +5905,7 @@ func (x *InsertCaptureRequest) String() string { func (*InsertCaptureRequest) ProtoMessage() {} func (x *InsertCaptureRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[100] + mi := &file_state_v1_state_proto_msgTypes[104] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5742,7 +5918,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{100} + return file_state_v1_state_proto_rawDescGZIP(), []int{104} } func (x *InsertCaptureRequest) GetCapture() *CapturedEvent { @@ -5775,7 +5951,7 @@ type InsertCaptureResponse struct { func (x *InsertCaptureResponse) Reset() { *x = InsertCaptureResponse{} - mi := &file_state_v1_state_proto_msgTypes[101] + mi := &file_state_v1_state_proto_msgTypes[105] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5787,7 +5963,7 @@ func (x *InsertCaptureResponse) String() string { func (*InsertCaptureResponse) ProtoMessage() {} func (x *InsertCaptureResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[101] + mi := &file_state_v1_state_proto_msgTypes[105] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5800,7 +5976,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{101} + return file_state_v1_state_proto_rawDescGZIP(), []int{105} } func (x *InsertCaptureResponse) GetId() string { @@ -5819,7 +5995,7 @@ type ListCapturesRequest struct { func (x *ListCapturesRequest) Reset() { *x = ListCapturesRequest{} - mi := &file_state_v1_state_proto_msgTypes[102] + mi := &file_state_v1_state_proto_msgTypes[106] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5831,7 +6007,7 @@ func (x *ListCapturesRequest) String() string { func (*ListCapturesRequest) ProtoMessage() {} func (x *ListCapturesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[102] + mi := &file_state_v1_state_proto_msgTypes[106] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5844,7 +6020,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{102} + return file_state_v1_state_proto_rawDescGZIP(), []int{106} } func (x *ListCapturesRequest) GetLimit() int64 { @@ -5863,7 +6039,7 @@ type ListCapturesResponse struct { func (x *ListCapturesResponse) Reset() { *x = ListCapturesResponse{} - mi := &file_state_v1_state_proto_msgTypes[103] + mi := &file_state_v1_state_proto_msgTypes[107] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5875,7 +6051,7 @@ func (x *ListCapturesResponse) String() string { func (*ListCapturesResponse) ProtoMessage() {} func (x *ListCapturesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[103] + mi := &file_state_v1_state_proto_msgTypes[107] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5888,7 +6064,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{103} + return file_state_v1_state_proto_rawDescGZIP(), []int{107} } func (x *ListCapturesResponse) GetCaptures() []*CapturedEvent { @@ -5907,7 +6083,7 @@ type StreamCapturesRequest struct { func (x *StreamCapturesRequest) Reset() { *x = StreamCapturesRequest{} - mi := &file_state_v1_state_proto_msgTypes[104] + mi := &file_state_v1_state_proto_msgTypes[108] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5919,7 +6095,7 @@ func (x *StreamCapturesRequest) String() string { func (*StreamCapturesRequest) ProtoMessage() {} func (x *StreamCapturesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[104] + mi := &file_state_v1_state_proto_msgTypes[108] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5932,7 +6108,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{104} + return file_state_v1_state_proto_rawDescGZIP(), []int{108} } func (x *StreamCapturesRequest) GetLimit() int64 { @@ -5952,7 +6128,7 @@ type StreamCapturesResponse struct { func (x *StreamCapturesResponse) Reset() { *x = StreamCapturesResponse{} - mi := &file_state_v1_state_proto_msgTypes[105] + mi := &file_state_v1_state_proto_msgTypes[109] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5964,7 +6140,7 @@ func (x *StreamCapturesResponse) String() string { func (*StreamCapturesResponse) ProtoMessage() {} func (x *StreamCapturesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[105] + mi := &file_state_v1_state_proto_msgTypes[109] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5977,7 +6153,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{105} + return file_state_v1_state_proto_rawDescGZIP(), []int{109} } func (x *StreamCapturesResponse) GetCapture() *CapturedEvent { @@ -5996,7 +6172,7 @@ type InsertMappingRequest struct { func (x *InsertMappingRequest) Reset() { *x = InsertMappingRequest{} - mi := &file_state_v1_state_proto_msgTypes[106] + mi := &file_state_v1_state_proto_msgTypes[110] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6008,7 +6184,7 @@ func (x *InsertMappingRequest) String() string { func (*InsertMappingRequest) ProtoMessage() {} func (x *InsertMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[106] + mi := &file_state_v1_state_proto_msgTypes[110] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6021,7 +6197,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{106} + return file_state_v1_state_proto_rawDescGZIP(), []int{110} } func (x *InsertMappingRequest) GetMapping() *Mapping { @@ -6040,7 +6216,7 @@ type InsertMappingResponse struct { func (x *InsertMappingResponse) Reset() { *x = InsertMappingResponse{} - mi := &file_state_v1_state_proto_msgTypes[107] + mi := &file_state_v1_state_proto_msgTypes[111] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6052,7 +6228,7 @@ func (x *InsertMappingResponse) String() string { func (*InsertMappingResponse) ProtoMessage() {} func (x *InsertMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[107] + mi := &file_state_v1_state_proto_msgTypes[111] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6065,7 +6241,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{107} + return file_state_v1_state_proto_rawDescGZIP(), []int{111} } func (x *InsertMappingResponse) GetId() string { @@ -6084,7 +6260,7 @@ type GetMappingRequest struct { func (x *GetMappingRequest) Reset() { *x = GetMappingRequest{} - mi := &file_state_v1_state_proto_msgTypes[108] + mi := &file_state_v1_state_proto_msgTypes[112] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6096,7 +6272,7 @@ func (x *GetMappingRequest) String() string { func (*GetMappingRequest) ProtoMessage() {} func (x *GetMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[108] + mi := &file_state_v1_state_proto_msgTypes[112] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6109,7 +6285,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{108} + return file_state_v1_state_proto_rawDescGZIP(), []int{112} } func (x *GetMappingRequest) GetId() string { @@ -6129,7 +6305,7 @@ type GetMappingResponse struct { func (x *GetMappingResponse) Reset() { *x = GetMappingResponse{} - mi := &file_state_v1_state_proto_msgTypes[109] + mi := &file_state_v1_state_proto_msgTypes[113] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6141,7 +6317,7 @@ func (x *GetMappingResponse) String() string { func (*GetMappingResponse) ProtoMessage() {} func (x *GetMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[109] + mi := &file_state_v1_state_proto_msgTypes[113] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6154,7 +6330,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{109} + return file_state_v1_state_proto_rawDescGZIP(), []int{113} } func (x *GetMappingResponse) GetMapping() *Mapping { @@ -6179,7 +6355,7 @@ type ListMappingsRequest struct { func (x *ListMappingsRequest) Reset() { *x = ListMappingsRequest{} - mi := &file_state_v1_state_proto_msgTypes[110] + mi := &file_state_v1_state_proto_msgTypes[114] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6191,7 +6367,7 @@ func (x *ListMappingsRequest) String() string { func (*ListMappingsRequest) ProtoMessage() {} func (x *ListMappingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[110] + mi := &file_state_v1_state_proto_msgTypes[114] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6204,7 +6380,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{110} + return file_state_v1_state_proto_rawDescGZIP(), []int{114} } type ListMappingsResponse struct { @@ -6216,7 +6392,7 @@ type ListMappingsResponse struct { func (x *ListMappingsResponse) Reset() { *x = ListMappingsResponse{} - mi := &file_state_v1_state_proto_msgTypes[111] + mi := &file_state_v1_state_proto_msgTypes[115] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6228,7 +6404,7 @@ func (x *ListMappingsResponse) String() string { func (*ListMappingsResponse) ProtoMessage() {} func (x *ListMappingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[111] + mi := &file_state_v1_state_proto_msgTypes[115] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6241,7 +6417,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{111} + return file_state_v1_state_proto_rawDescGZIP(), []int{115} } func (x *ListMappingsResponse) GetMappings() []*Mapping { @@ -6260,7 +6436,7 @@ type UpdateMappingRequest struct { func (x *UpdateMappingRequest) Reset() { *x = UpdateMappingRequest{} - mi := &file_state_v1_state_proto_msgTypes[112] + mi := &file_state_v1_state_proto_msgTypes[116] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6272,7 +6448,7 @@ func (x *UpdateMappingRequest) String() string { func (*UpdateMappingRequest) ProtoMessage() {} func (x *UpdateMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[112] + mi := &file_state_v1_state_proto_msgTypes[116] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6285,7 +6461,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{112} + return file_state_v1_state_proto_rawDescGZIP(), []int{116} } func (x *UpdateMappingRequest) GetMapping() *Mapping { @@ -6303,7 +6479,7 @@ type UpdateMappingResponse struct { func (x *UpdateMappingResponse) Reset() { *x = UpdateMappingResponse{} - mi := &file_state_v1_state_proto_msgTypes[113] + mi := &file_state_v1_state_proto_msgTypes[117] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6315,7 +6491,7 @@ func (x *UpdateMappingResponse) String() string { func (*UpdateMappingResponse) ProtoMessage() {} func (x *UpdateMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[113] + mi := &file_state_v1_state_proto_msgTypes[117] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6328,7 +6504,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{113} + return file_state_v1_state_proto_rawDescGZIP(), []int{117} } type DeleteMappingRequest struct { @@ -6340,7 +6516,7 @@ type DeleteMappingRequest struct { func (x *DeleteMappingRequest) Reset() { *x = DeleteMappingRequest{} - mi := &file_state_v1_state_proto_msgTypes[114] + mi := &file_state_v1_state_proto_msgTypes[118] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6352,7 +6528,7 @@ func (x *DeleteMappingRequest) String() string { func (*DeleteMappingRequest) ProtoMessage() {} func (x *DeleteMappingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[114] + mi := &file_state_v1_state_proto_msgTypes[118] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6365,7 +6541,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{114} + return file_state_v1_state_proto_rawDescGZIP(), []int{118} } func (x *DeleteMappingRequest) GetId() string { @@ -6383,7 +6559,7 @@ type DeleteMappingResponse struct { func (x *DeleteMappingResponse) Reset() { *x = DeleteMappingResponse{} - mi := &file_state_v1_state_proto_msgTypes[115] + mi := &file_state_v1_state_proto_msgTypes[119] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6395,7 +6571,7 @@ func (x *DeleteMappingResponse) String() string { func (*DeleteMappingResponse) ProtoMessage() {} func (x *DeleteMappingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[115] + mi := &file_state_v1_state_proto_msgTypes[119] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6408,7 +6584,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{115} + return file_state_v1_state_proto_rawDescGZIP(), []int{119} } type InsertBindingRequest struct { @@ -6420,7 +6596,7 @@ type InsertBindingRequest struct { func (x *InsertBindingRequest) Reset() { *x = InsertBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[116] + mi := &file_state_v1_state_proto_msgTypes[120] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6432,7 +6608,7 @@ func (x *InsertBindingRequest) String() string { func (*InsertBindingRequest) ProtoMessage() {} func (x *InsertBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[116] + mi := &file_state_v1_state_proto_msgTypes[120] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6445,7 +6621,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{116} + return file_state_v1_state_proto_rawDescGZIP(), []int{120} } func (x *InsertBindingRequest) GetBinding() *Binding { @@ -6464,7 +6640,7 @@ type InsertBindingResponse struct { func (x *InsertBindingResponse) Reset() { *x = InsertBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[117] + mi := &file_state_v1_state_proto_msgTypes[121] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6476,7 +6652,7 @@ func (x *InsertBindingResponse) String() string { func (*InsertBindingResponse) ProtoMessage() {} func (x *InsertBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[117] + mi := &file_state_v1_state_proto_msgTypes[121] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6489,7 +6665,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{117} + return file_state_v1_state_proto_rawDescGZIP(), []int{121} } func (x *InsertBindingResponse) GetId() string { @@ -6508,7 +6684,7 @@ type GetBindingRequest struct { func (x *GetBindingRequest) Reset() { *x = GetBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[118] + mi := &file_state_v1_state_proto_msgTypes[122] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6520,7 +6696,7 @@ func (x *GetBindingRequest) String() string { func (*GetBindingRequest) ProtoMessage() {} func (x *GetBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[118] + mi := &file_state_v1_state_proto_msgTypes[122] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6533,7 +6709,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{118} + return file_state_v1_state_proto_rawDescGZIP(), []int{122} } func (x *GetBindingRequest) GetId() string { @@ -6553,7 +6729,7 @@ type GetBindingResponse struct { func (x *GetBindingResponse) Reset() { *x = GetBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[119] + mi := &file_state_v1_state_proto_msgTypes[123] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6565,7 +6741,7 @@ func (x *GetBindingResponse) String() string { func (*GetBindingResponse) ProtoMessage() {} func (x *GetBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[119] + mi := &file_state_v1_state_proto_msgTypes[123] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6578,7 +6754,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{119} + return file_state_v1_state_proto_rawDescGZIP(), []int{123} } func (x *GetBindingResponse) GetBinding() *Binding { @@ -6603,7 +6779,7 @@ type ListBindingsRequest struct { func (x *ListBindingsRequest) Reset() { *x = ListBindingsRequest{} - mi := &file_state_v1_state_proto_msgTypes[120] + mi := &file_state_v1_state_proto_msgTypes[124] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6615,7 +6791,7 @@ func (x *ListBindingsRequest) String() string { func (*ListBindingsRequest) ProtoMessage() {} func (x *ListBindingsRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[120] + mi := &file_state_v1_state_proto_msgTypes[124] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6628,7 +6804,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{120} + return file_state_v1_state_proto_rawDescGZIP(), []int{124} } type ListBindingsResponse struct { @@ -6640,7 +6816,7 @@ type ListBindingsResponse struct { func (x *ListBindingsResponse) Reset() { *x = ListBindingsResponse{} - mi := &file_state_v1_state_proto_msgTypes[121] + mi := &file_state_v1_state_proto_msgTypes[125] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6652,7 +6828,7 @@ func (x *ListBindingsResponse) String() string { func (*ListBindingsResponse) ProtoMessage() {} func (x *ListBindingsResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[121] + mi := &file_state_v1_state_proto_msgTypes[125] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6665,7 +6841,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{121} + return file_state_v1_state_proto_rawDescGZIP(), []int{125} } func (x *ListBindingsResponse) GetBindings() []*Binding { @@ -6684,7 +6860,7 @@ type UpdateBindingRequest struct { func (x *UpdateBindingRequest) Reset() { *x = UpdateBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[122] + mi := &file_state_v1_state_proto_msgTypes[126] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6696,7 +6872,7 @@ func (x *UpdateBindingRequest) String() string { func (*UpdateBindingRequest) ProtoMessage() {} func (x *UpdateBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[122] + mi := &file_state_v1_state_proto_msgTypes[126] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6709,7 +6885,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{122} + return file_state_v1_state_proto_rawDescGZIP(), []int{126} } func (x *UpdateBindingRequest) GetBinding() *Binding { @@ -6727,7 +6903,7 @@ type UpdateBindingResponse struct { func (x *UpdateBindingResponse) Reset() { *x = UpdateBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[123] + mi := &file_state_v1_state_proto_msgTypes[127] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6739,7 +6915,7 @@ func (x *UpdateBindingResponse) String() string { func (*UpdateBindingResponse) ProtoMessage() {} func (x *UpdateBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[123] + mi := &file_state_v1_state_proto_msgTypes[127] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6752,7 +6928,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{123} + return file_state_v1_state_proto_rawDescGZIP(), []int{127} } type DeleteBindingRequest struct { @@ -6764,7 +6940,7 @@ type DeleteBindingRequest struct { func (x *DeleteBindingRequest) Reset() { *x = DeleteBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[124] + mi := &file_state_v1_state_proto_msgTypes[128] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6776,7 +6952,7 @@ func (x *DeleteBindingRequest) String() string { func (*DeleteBindingRequest) ProtoMessage() {} func (x *DeleteBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[124] + mi := &file_state_v1_state_proto_msgTypes[128] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6789,7 +6965,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{124} + return file_state_v1_state_proto_rawDescGZIP(), []int{128} } func (x *DeleteBindingRequest) GetId() string { @@ -6807,7 +6983,7 @@ type DeleteBindingResponse struct { func (x *DeleteBindingResponse) Reset() { *x = DeleteBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[125] + mi := &file_state_v1_state_proto_msgTypes[129] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6819,7 +6995,7 @@ func (x *DeleteBindingResponse) String() string { func (*DeleteBindingResponse) ProtoMessage() {} func (x *DeleteBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[125] + mi := &file_state_v1_state_proto_msgTypes[129] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6832,7 +7008,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{125} + return file_state_v1_state_proto_rawDescGZIP(), []int{129} } type ApproveBindingRequest struct { @@ -6844,7 +7020,7 @@ type ApproveBindingRequest struct { func (x *ApproveBindingRequest) Reset() { *x = ApproveBindingRequest{} - mi := &file_state_v1_state_proto_msgTypes[126] + mi := &file_state_v1_state_proto_msgTypes[130] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6856,7 +7032,7 @@ func (x *ApproveBindingRequest) String() string { func (*ApproveBindingRequest) ProtoMessage() {} func (x *ApproveBindingRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[126] + mi := &file_state_v1_state_proto_msgTypes[130] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6869,7 +7045,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{126} + return file_state_v1_state_proto_rawDescGZIP(), []int{130} } func (x *ApproveBindingRequest) GetId() string { @@ -6887,7 +7063,7 @@ type ApproveBindingResponse struct { func (x *ApproveBindingResponse) Reset() { *x = ApproveBindingResponse{} - mi := &file_state_v1_state_proto_msgTypes[127] + mi := &file_state_v1_state_proto_msgTypes[131] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6899,7 +7075,7 @@ func (x *ApproveBindingResponse) String() string { func (*ApproveBindingResponse) ProtoMessage() {} func (x *ApproveBindingResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[127] + mi := &file_state_v1_state_proto_msgTypes[131] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6912,7 +7088,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{127} + return file_state_v1_state_proto_rawDescGZIP(), []int{131} } type ArmedBindingsForSourceRequest struct { @@ -6924,7 +7100,7 @@ type ArmedBindingsForSourceRequest struct { func (x *ArmedBindingsForSourceRequest) Reset() { *x = ArmedBindingsForSourceRequest{} - mi := &file_state_v1_state_proto_msgTypes[128] + mi := &file_state_v1_state_proto_msgTypes[132] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6936,7 +7112,7 @@ func (x *ArmedBindingsForSourceRequest) String() string { func (*ArmedBindingsForSourceRequest) ProtoMessage() {} func (x *ArmedBindingsForSourceRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[128] + mi := &file_state_v1_state_proto_msgTypes[132] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6949,7 +7125,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{128} + return file_state_v1_state_proto_rawDescGZIP(), []int{132} } func (x *ArmedBindingsForSourceRequest) GetSource() string { @@ -6968,7 +7144,7 @@ type ArmedBindingsForSourceResponse struct { func (x *ArmedBindingsForSourceResponse) Reset() { *x = ArmedBindingsForSourceResponse{} - mi := &file_state_v1_state_proto_msgTypes[129] + mi := &file_state_v1_state_proto_msgTypes[133] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6980,7 +7156,7 @@ func (x *ArmedBindingsForSourceResponse) String() string { func (*ArmedBindingsForSourceResponse) ProtoMessage() {} func (x *ArmedBindingsForSourceResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[129] + mi := &file_state_v1_state_proto_msgTypes[133] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6993,7 +7169,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{129} + return file_state_v1_state_proto_rawDescGZIP(), []int{133} } func (x *ArmedBindingsForSourceResponse) GetBindings() []*Binding { @@ -7016,7 +7192,7 @@ type RecordDispatchRequest struct { func (x *RecordDispatchRequest) Reset() { *x = RecordDispatchRequest{} - mi := &file_state_v1_state_proto_msgTypes[130] + mi := &file_state_v1_state_proto_msgTypes[134] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7028,7 +7204,7 @@ func (x *RecordDispatchRequest) String() string { func (*RecordDispatchRequest) ProtoMessage() {} func (x *RecordDispatchRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[130] + mi := &file_state_v1_state_proto_msgTypes[134] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7041,7 +7217,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{130} + return file_state_v1_state_proto_rawDescGZIP(), []int{134} } func (x *RecordDispatchRequest) GetBindingId() string { @@ -7080,7 +7256,7 @@ type RecordDispatchResponse struct { func (x *RecordDispatchResponse) Reset() { *x = RecordDispatchResponse{} - mi := &file_state_v1_state_proto_msgTypes[131] + mi := &file_state_v1_state_proto_msgTypes[135] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7092,7 +7268,7 @@ func (x *RecordDispatchResponse) String() string { func (*RecordDispatchResponse) ProtoMessage() {} func (x *RecordDispatchResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[131] + mi := &file_state_v1_state_proto_msgTypes[135] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7105,7 +7281,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{131} + return file_state_v1_state_proto_rawDescGZIP(), []int{135} } type RecordPlaybookDispatchRequest struct { @@ -7120,7 +7296,7 @@ type RecordPlaybookDispatchRequest struct { func (x *RecordPlaybookDispatchRequest) Reset() { *x = RecordPlaybookDispatchRequest{} - mi := &file_state_v1_state_proto_msgTypes[132] + mi := &file_state_v1_state_proto_msgTypes[136] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7132,7 +7308,7 @@ func (x *RecordPlaybookDispatchRequest) String() string { func (*RecordPlaybookDispatchRequest) ProtoMessage() {} func (x *RecordPlaybookDispatchRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[132] + mi := &file_state_v1_state_proto_msgTypes[136] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7145,7 +7321,7 @@ func (x *RecordPlaybookDispatchRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use RecordPlaybookDispatchRequest.ProtoReflect.Descriptor instead. func (*RecordPlaybookDispatchRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{132} + return file_state_v1_state_proto_rawDescGZIP(), []int{136} } func (x *RecordPlaybookDispatchRequest) GetPlaybookId() string { @@ -7184,7 +7360,7 @@ type RecordPlaybookDispatchResponse struct { func (x *RecordPlaybookDispatchResponse) Reset() { *x = RecordPlaybookDispatchResponse{} - mi := &file_state_v1_state_proto_msgTypes[133] + mi := &file_state_v1_state_proto_msgTypes[137] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7196,7 +7372,7 @@ func (x *RecordPlaybookDispatchResponse) String() string { func (*RecordPlaybookDispatchResponse) ProtoMessage() {} func (x *RecordPlaybookDispatchResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[133] + mi := &file_state_v1_state_proto_msgTypes[137] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7209,7 +7385,7 @@ func (x *RecordPlaybookDispatchResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use RecordPlaybookDispatchResponse.ProtoReflect.Descriptor instead. func (*RecordPlaybookDispatchResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{133} + return file_state_v1_state_proto_rawDescGZIP(), []int{137} } type DeletePlaybookDispatchesRequest struct { @@ -7221,7 +7397,7 @@ type DeletePlaybookDispatchesRequest struct { func (x *DeletePlaybookDispatchesRequest) Reset() { *x = DeletePlaybookDispatchesRequest{} - mi := &file_state_v1_state_proto_msgTypes[134] + mi := &file_state_v1_state_proto_msgTypes[138] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7233,7 +7409,7 @@ func (x *DeletePlaybookDispatchesRequest) String() string { func (*DeletePlaybookDispatchesRequest) ProtoMessage() {} func (x *DeletePlaybookDispatchesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[134] + mi := &file_state_v1_state_proto_msgTypes[138] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7246,7 +7422,7 @@ func (x *DeletePlaybookDispatchesRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DeletePlaybookDispatchesRequest.ProtoReflect.Descriptor instead. func (*DeletePlaybookDispatchesRequest) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{134} + return file_state_v1_state_proto_rawDescGZIP(), []int{138} } func (x *DeletePlaybookDispatchesRequest) GetPlaybookId() string { @@ -7264,7 +7440,7 @@ type DeletePlaybookDispatchesResponse struct { func (x *DeletePlaybookDispatchesResponse) Reset() { *x = DeletePlaybookDispatchesResponse{} - mi := &file_state_v1_state_proto_msgTypes[135] + mi := &file_state_v1_state_proto_msgTypes[139] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7276,7 +7452,7 @@ func (x *DeletePlaybookDispatchesResponse) String() string { func (*DeletePlaybookDispatchesResponse) ProtoMessage() {} func (x *DeletePlaybookDispatchesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[135] + mi := &file_state_v1_state_proto_msgTypes[139] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7289,7 +7465,7 @@ func (x *DeletePlaybookDispatchesResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DeletePlaybookDispatchesResponse.ProtoReflect.Descriptor instead. func (*DeletePlaybookDispatchesResponse) Descriptor() ([]byte, []int) { - return file_state_v1_state_proto_rawDescGZIP(), []int{135} + return file_state_v1_state_proto_rawDescGZIP(), []int{139} } type ListUndispatchedCapturesRequest struct { @@ -7302,7 +7478,7 @@ type ListUndispatchedCapturesRequest struct { func (x *ListUndispatchedCapturesRequest) Reset() { *x = ListUndispatchedCapturesRequest{} - mi := &file_state_v1_state_proto_msgTypes[136] + mi := &file_state_v1_state_proto_msgTypes[140] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7314,7 +7490,7 @@ func (x *ListUndispatchedCapturesRequest) String() string { func (*ListUndispatchedCapturesRequest) ProtoMessage() {} func (x *ListUndispatchedCapturesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[136] + mi := &file_state_v1_state_proto_msgTypes[140] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7327,7 +7503,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{136} + return file_state_v1_state_proto_rawDescGZIP(), []int{140} } func (x *ListUndispatchedCapturesRequest) GetSources() []string { @@ -7353,7 +7529,7 @@ type ListUndispatchedCapturesResponse struct { func (x *ListUndispatchedCapturesResponse) Reset() { *x = ListUndispatchedCapturesResponse{} - mi := &file_state_v1_state_proto_msgTypes[137] + mi := &file_state_v1_state_proto_msgTypes[141] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7365,7 +7541,7 @@ func (x *ListUndispatchedCapturesResponse) String() string { func (*ListUndispatchedCapturesResponse) ProtoMessage() {} func (x *ListUndispatchedCapturesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[137] + mi := &file_state_v1_state_proto_msgTypes[141] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7378,7 +7554,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{137} + return file_state_v1_state_proto_rawDescGZIP(), []int{141} } func (x *ListUndispatchedCapturesResponse) GetCaptures() []*CapturedEvent { @@ -7398,7 +7574,7 @@ type StreamUndispatchedCapturesRequest struct { func (x *StreamUndispatchedCapturesRequest) Reset() { *x = StreamUndispatchedCapturesRequest{} - mi := &file_state_v1_state_proto_msgTypes[138] + mi := &file_state_v1_state_proto_msgTypes[142] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7410,7 +7586,7 @@ func (x *StreamUndispatchedCapturesRequest) String() string { func (*StreamUndispatchedCapturesRequest) ProtoMessage() {} func (x *StreamUndispatchedCapturesRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[138] + mi := &file_state_v1_state_proto_msgTypes[142] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7423,7 +7599,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{138} + return file_state_v1_state_proto_rawDescGZIP(), []int{142} } func (x *StreamUndispatchedCapturesRequest) GetSources() []string { @@ -7450,7 +7626,7 @@ type StreamUndispatchedCapturesResponse struct { func (x *StreamUndispatchedCapturesResponse) Reset() { *x = StreamUndispatchedCapturesResponse{} - mi := &file_state_v1_state_proto_msgTypes[139] + mi := &file_state_v1_state_proto_msgTypes[143] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7462,7 +7638,7 @@ func (x *StreamUndispatchedCapturesResponse) String() string { func (*StreamUndispatchedCapturesResponse) ProtoMessage() {} func (x *StreamUndispatchedCapturesResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[139] + mi := &file_state_v1_state_proto_msgTypes[143] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7475,7 +7651,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{139} + return file_state_v1_state_proto_rawDescGZIP(), []int{143} } func (x *StreamUndispatchedCapturesResponse) GetCapture() *CapturedEvent { @@ -7501,7 +7677,7 @@ type EnqueueBindingTaskRequest struct { func (x *EnqueueBindingTaskRequest) Reset() { *x = EnqueueBindingTaskRequest{} - mi := &file_state_v1_state_proto_msgTypes[140] + mi := &file_state_v1_state_proto_msgTypes[144] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7513,7 +7689,7 @@ func (x *EnqueueBindingTaskRequest) String() string { func (*EnqueueBindingTaskRequest) ProtoMessage() {} func (x *EnqueueBindingTaskRequest) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[140] + mi := &file_state_v1_state_proto_msgTypes[144] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7526,7 +7702,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{140} + return file_state_v1_state_proto_rawDescGZIP(), []int{144} } func (x *EnqueueBindingTaskRequest) GetOwner() string { @@ -7594,7 +7770,7 @@ type EnqueueBindingTaskResponse struct { func (x *EnqueueBindingTaskResponse) Reset() { *x = EnqueueBindingTaskResponse{} - mi := &file_state_v1_state_proto_msgTypes[141] + mi := &file_state_v1_state_proto_msgTypes[145] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7606,7 +7782,7 @@ func (x *EnqueueBindingTaskResponse) String() string { func (*EnqueueBindingTaskResponse) ProtoMessage() {} func (x *EnqueueBindingTaskResponse) ProtoReflect() protoreflect.Message { - mi := &file_state_v1_state_proto_msgTypes[141] + mi := &file_state_v1_state_proto_msgTypes[145] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -7619,7 +7795,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{141} + return file_state_v1_state_proto_rawDescGZIP(), []int{145} } func (x *EnqueueBindingTaskResponse) GetTask() *Task { @@ -7891,7 +8067,15 @@ const file_state_v1_state_proto_rawDesc = "" + "\vfrom_status\x18\x02 \x01(\tR\n" + "fromStatus\x12\x1a\n" + "\bworkflow\x18\x03 \x01(\tR\bworkflow\"\x13\n" + - "\x11RetryTaskResponse\"V\n" + + "\x11RetryTaskResponse\"L\n" + + "\x17BeginRemediationRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x18\n" + + "\apayload\x18\x02 \x01(\tR\apayload\"\x1a\n" + + "\x18BeginRemediationResponse\"O\n" + + "\x1aUpdateReviewPayloadRequest\x12\x17\n" + + "\atask_id\x18\x01 \x01(\x03R\x06taskId\x12\x18\n" + + "\apayload\x18\x02 \x01(\tR\apayload\"\x1d\n" + + "\x1bUpdateReviewPayloadResponse\"V\n" + "\x12TaskByIssueRequest\x12\x14\n" + "\x05owner\x18\x01 \x01(\tR\x05owner\x12\x12\n" + "\x04repo\x18\x02 \x01(\tR\x04repo\x12\x16\n" + @@ -8122,7 +8306,7 @@ const file_state_v1_state_proto_rawDesc = "" + "binding_id\x18\a \x01(\tR\tbindingId\x12'\n" + "\x0fbinding_version\x18\b \x01(\x03R\x0ebindingVersion\"@\n" + "\x1aEnqueueBindingTaskResponse\x12\"\n" + - "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task2\xe1)\n" + + "\x04task\x18\x01 \x01(\v2\x0e.state.v1.TaskR\x04task2\xa0+\n" + "\x11StateStoreService\x12\\\n" + "\x11RegisterTaskGrant\x12\".state.v1.RegisterTaskGrantRequest\x1a#.state.v1.RegisterTaskGrantResponse\x12V\n" + "\x0fRevokeTaskGrant\x12 .state.v1.RevokeTaskGrantRequest\x1a!.state.v1.RevokeTaskGrantResponse\x12S\n" + @@ -8145,7 +8329,9 @@ const file_state_v1_state_proto_rawDesc = "" + "\aRequeue\x12\x18.state.v1.RequeueRequest\x1a\x19.state.v1.RequeueResponse\x12M\n" + "\fRecoverStale\x12\x1d.state.v1.RecoverStaleRequest\x1a\x1e.state.v1.RecoverStaleResponse\x12J\n" + "\vArchiveTask\x12\x1c.state.v1.ArchiveTaskRequest\x1a\x1d.state.v1.ArchiveTaskResponse\x12D\n" + - "\tRetryTask\x12\x1a.state.v1.RetryTaskRequest\x1a\x1b.state.v1.RetryTaskResponse\x12J\n" + + "\tRetryTask\x12\x1a.state.v1.RetryTaskRequest\x1a\x1b.state.v1.RetryTaskResponse\x12Y\n" + + "\x10BeginRemediation\x12!.state.v1.BeginRemediationRequest\x1a\".state.v1.BeginRemediationResponse\x12b\n" + + "\x13UpdateReviewPayload\x12$.state.v1.UpdateReviewPayloadRequest\x1a%.state.v1.UpdateReviewPayloadResponse\x12J\n" + "\vTaskByIssue\x12\x1c.state.v1.TaskByIssueRequest\x1a\x1d.state.v1.TaskByIssueResponse\x12M\n" + "\fOpenTaskByPR\x12\x1d.state.v1.OpenTaskByPRRequest\x1a\x1e.state.v1.OpenTaskByPRResponse\x12A\n" + "\bTaskByID\x12\x19.state.v1.TaskByIDRequest\x1a\x1a.state.v1.TaskByIDResponse\x12>\n" + @@ -8207,7 +8393,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, 143) +var file_state_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 147) var file_state_v1_state_proto_goTypes = []any{ (*RegisterTaskGrantRequest)(nil), // 0: state.v1.RegisterTaskGrantRequest (*RegisterTaskGrantResponse)(nil), // 1: state.v1.RegisterTaskGrantResponse @@ -8263,100 +8449,104 @@ var file_state_v1_state_proto_goTypes = []any{ (*ArchiveTaskResponse)(nil), // 51: state.v1.ArchiveTaskResponse (*RetryTaskRequest)(nil), // 52: state.v1.RetryTaskRequest (*RetryTaskResponse)(nil), // 53: state.v1.RetryTaskResponse - (*TaskByIssueRequest)(nil), // 54: state.v1.TaskByIssueRequest - (*TaskByIssueResponse)(nil), // 55: state.v1.TaskByIssueResponse - (*OpenTaskByPRRequest)(nil), // 56: state.v1.OpenTaskByPRRequest - (*OpenTaskByPRResponse)(nil), // 57: state.v1.OpenTaskByPRResponse - (*TaskByIDRequest)(nil), // 58: state.v1.TaskByIDRequest - (*TaskByIDResponse)(nil), // 59: state.v1.TaskByIDResponse - (*OpenPRsRequest)(nil), // 60: state.v1.OpenPRsRequest - (*OpenPRsResponse)(nil), // 61: state.v1.OpenPRsResponse - (*ClearTerminalTasksRequest)(nil), // 62: state.v1.ClearTerminalTasksRequest - (*ClearTerminalTasksResponse)(nil), // 63: state.v1.ClearTerminalTasksResponse - (*TasksRequest)(nil), // 64: state.v1.TasksRequest - (*TasksResponse)(nil), // 65: state.v1.TasksResponse - (*StatusCountsRequest)(nil), // 66: state.v1.StatusCountsRequest - (*StatusCountsResponse)(nil), // 67: state.v1.StatusCountsResponse - (*InsertEventRequest)(nil), // 68: state.v1.InsertEventRequest - (*InsertEventResponse)(nil), // 69: state.v1.InsertEventResponse - (*EventsSinceRequest)(nil), // 70: state.v1.EventsSinceRequest - (*EventsSinceResponse)(nil), // 71: state.v1.EventsSinceResponse - (*TaskEventsRequest)(nil), // 72: state.v1.TaskEventsRequest - (*TaskEventsResponse)(nil), // 73: state.v1.TaskEventsResponse - (*WorkflowStatsRequest)(nil), // 74: state.v1.WorkflowStatsRequest - (*WorkflowStatsResponse)(nil), // 75: state.v1.WorkflowStatsResponse - (*StageStatsRequest)(nil), // 76: state.v1.StageStatsRequest - (*StageStatsResponse)(nil), // 77: state.v1.StageStatsResponse - (*TokensByDayRequest)(nil), // 78: state.v1.TokensByDayRequest - (*TokensByDayResponse)(nil), // 79: state.v1.TokensByDayResponse - (*ConfigSnapshot)(nil), // 80: state.v1.ConfigSnapshot - (*PutConfigSnapshotRequest)(nil), // 81: state.v1.PutConfigSnapshotRequest - (*PutConfigSnapshotResponse)(nil), // 82: state.v1.PutConfigSnapshotResponse - (*GetConfigSnapshotRequest)(nil), // 83: state.v1.GetConfigSnapshotRequest - (*GetConfigSnapshotResponse)(nil), // 84: state.v1.GetConfigSnapshotResponse - (*ChannelStatus)(nil), // 85: state.v1.ChannelStatus - (*PutChannelStatusRequest)(nil), // 86: state.v1.PutChannelStatusRequest - (*PutChannelStatusResponse)(nil), // 87: state.v1.PutChannelStatusResponse - (*ListChannelStatusRequest)(nil), // 88: state.v1.ListChannelStatusRequest - (*ListChannelStatusResponse)(nil), // 89: state.v1.ListChannelStatusResponse - (*ApplyStatus)(nil), // 90: state.v1.ApplyStatus - (*PutApplyStatusRequest)(nil), // 91: state.v1.PutApplyStatusRequest - (*PutApplyStatusResponse)(nil), // 92: state.v1.PutApplyStatusResponse - (*ListApplyStatusRequest)(nil), // 93: state.v1.ListApplyStatusRequest - (*ListApplyStatusResponse)(nil), // 94: state.v1.ListApplyStatusResponse - (*TaskLogEntry)(nil), // 95: state.v1.TaskLogEntry - (*ReadTaskLogRequest)(nil), // 96: state.v1.ReadTaskLogRequest - (*ReadTaskLogResponse)(nil), // 97: state.v1.ReadTaskLogResponse - (*StreamTaskLogContentRequest)(nil), // 98: state.v1.StreamTaskLogContentRequest - (*StreamTaskLogContentResponse)(nil), // 99: state.v1.StreamTaskLogContentResponse - (*InsertCaptureRequest)(nil), // 100: state.v1.InsertCaptureRequest - (*InsertCaptureResponse)(nil), // 101: state.v1.InsertCaptureResponse - (*ListCapturesRequest)(nil), // 102: state.v1.ListCapturesRequest - (*ListCapturesResponse)(nil), // 103: state.v1.ListCapturesResponse - (*StreamCapturesRequest)(nil), // 104: state.v1.StreamCapturesRequest - (*StreamCapturesResponse)(nil), // 105: state.v1.StreamCapturesResponse - (*InsertMappingRequest)(nil), // 106: state.v1.InsertMappingRequest - (*InsertMappingResponse)(nil), // 107: state.v1.InsertMappingResponse - (*GetMappingRequest)(nil), // 108: state.v1.GetMappingRequest - (*GetMappingResponse)(nil), // 109: state.v1.GetMappingResponse - (*ListMappingsRequest)(nil), // 110: state.v1.ListMappingsRequest - (*ListMappingsResponse)(nil), // 111: state.v1.ListMappingsResponse - (*UpdateMappingRequest)(nil), // 112: state.v1.UpdateMappingRequest - (*UpdateMappingResponse)(nil), // 113: state.v1.UpdateMappingResponse - (*DeleteMappingRequest)(nil), // 114: state.v1.DeleteMappingRequest - (*DeleteMappingResponse)(nil), // 115: state.v1.DeleteMappingResponse - (*InsertBindingRequest)(nil), // 116: state.v1.InsertBindingRequest - (*InsertBindingResponse)(nil), // 117: state.v1.InsertBindingResponse - (*GetBindingRequest)(nil), // 118: state.v1.GetBindingRequest - (*GetBindingResponse)(nil), // 119: state.v1.GetBindingResponse - (*ListBindingsRequest)(nil), // 120: state.v1.ListBindingsRequest - (*ListBindingsResponse)(nil), // 121: state.v1.ListBindingsResponse - (*UpdateBindingRequest)(nil), // 122: state.v1.UpdateBindingRequest - (*UpdateBindingResponse)(nil), // 123: state.v1.UpdateBindingResponse - (*DeleteBindingRequest)(nil), // 124: state.v1.DeleteBindingRequest - (*DeleteBindingResponse)(nil), // 125: state.v1.DeleteBindingResponse - (*ApproveBindingRequest)(nil), // 126: state.v1.ApproveBindingRequest - (*ApproveBindingResponse)(nil), // 127: state.v1.ApproveBindingResponse - (*ArmedBindingsForSourceRequest)(nil), // 128: state.v1.ArmedBindingsForSourceRequest - (*ArmedBindingsForSourceResponse)(nil), // 129: state.v1.ArmedBindingsForSourceResponse - (*RecordDispatchRequest)(nil), // 130: state.v1.RecordDispatchRequest - (*RecordDispatchResponse)(nil), // 131: state.v1.RecordDispatchResponse - (*RecordPlaybookDispatchRequest)(nil), // 132: state.v1.RecordPlaybookDispatchRequest - (*RecordPlaybookDispatchResponse)(nil), // 133: state.v1.RecordPlaybookDispatchResponse - (*DeletePlaybookDispatchesRequest)(nil), // 134: state.v1.DeletePlaybookDispatchesRequest - (*DeletePlaybookDispatchesResponse)(nil), // 135: state.v1.DeletePlaybookDispatchesResponse - (*ListUndispatchedCapturesRequest)(nil), // 136: state.v1.ListUndispatchedCapturesRequest - (*ListUndispatchedCapturesResponse)(nil), // 137: state.v1.ListUndispatchedCapturesResponse - (*StreamUndispatchedCapturesRequest)(nil), // 138: state.v1.StreamUndispatchedCapturesRequest - (*StreamUndispatchedCapturesResponse)(nil), // 139: state.v1.StreamUndispatchedCapturesResponse - (*EnqueueBindingTaskRequest)(nil), // 140: state.v1.EnqueueBindingTaskRequest - (*EnqueueBindingTaskResponse)(nil), // 141: state.v1.EnqueueBindingTaskResponse - nil, // 142: state.v1.StatusCountsResponse.CountsEntry - (*timestamppb.Timestamp)(nil), // 143: google.protobuf.Timestamp + (*BeginRemediationRequest)(nil), // 54: state.v1.BeginRemediationRequest + (*BeginRemediationResponse)(nil), // 55: state.v1.BeginRemediationResponse + (*UpdateReviewPayloadRequest)(nil), // 56: state.v1.UpdateReviewPayloadRequest + (*UpdateReviewPayloadResponse)(nil), // 57: state.v1.UpdateReviewPayloadResponse + (*TaskByIssueRequest)(nil), // 58: state.v1.TaskByIssueRequest + (*TaskByIssueResponse)(nil), // 59: state.v1.TaskByIssueResponse + (*OpenTaskByPRRequest)(nil), // 60: state.v1.OpenTaskByPRRequest + (*OpenTaskByPRResponse)(nil), // 61: state.v1.OpenTaskByPRResponse + (*TaskByIDRequest)(nil), // 62: state.v1.TaskByIDRequest + (*TaskByIDResponse)(nil), // 63: state.v1.TaskByIDResponse + (*OpenPRsRequest)(nil), // 64: state.v1.OpenPRsRequest + (*OpenPRsResponse)(nil), // 65: state.v1.OpenPRsResponse + (*ClearTerminalTasksRequest)(nil), // 66: state.v1.ClearTerminalTasksRequest + (*ClearTerminalTasksResponse)(nil), // 67: state.v1.ClearTerminalTasksResponse + (*TasksRequest)(nil), // 68: state.v1.TasksRequest + (*TasksResponse)(nil), // 69: state.v1.TasksResponse + (*StatusCountsRequest)(nil), // 70: state.v1.StatusCountsRequest + (*StatusCountsResponse)(nil), // 71: state.v1.StatusCountsResponse + (*InsertEventRequest)(nil), // 72: state.v1.InsertEventRequest + (*InsertEventResponse)(nil), // 73: state.v1.InsertEventResponse + (*EventsSinceRequest)(nil), // 74: state.v1.EventsSinceRequest + (*EventsSinceResponse)(nil), // 75: state.v1.EventsSinceResponse + (*TaskEventsRequest)(nil), // 76: state.v1.TaskEventsRequest + (*TaskEventsResponse)(nil), // 77: state.v1.TaskEventsResponse + (*WorkflowStatsRequest)(nil), // 78: state.v1.WorkflowStatsRequest + (*WorkflowStatsResponse)(nil), // 79: state.v1.WorkflowStatsResponse + (*StageStatsRequest)(nil), // 80: state.v1.StageStatsRequest + (*StageStatsResponse)(nil), // 81: state.v1.StageStatsResponse + (*TokensByDayRequest)(nil), // 82: state.v1.TokensByDayRequest + (*TokensByDayResponse)(nil), // 83: state.v1.TokensByDayResponse + (*ConfigSnapshot)(nil), // 84: state.v1.ConfigSnapshot + (*PutConfigSnapshotRequest)(nil), // 85: state.v1.PutConfigSnapshotRequest + (*PutConfigSnapshotResponse)(nil), // 86: state.v1.PutConfigSnapshotResponse + (*GetConfigSnapshotRequest)(nil), // 87: state.v1.GetConfigSnapshotRequest + (*GetConfigSnapshotResponse)(nil), // 88: state.v1.GetConfigSnapshotResponse + (*ChannelStatus)(nil), // 89: state.v1.ChannelStatus + (*PutChannelStatusRequest)(nil), // 90: state.v1.PutChannelStatusRequest + (*PutChannelStatusResponse)(nil), // 91: state.v1.PutChannelStatusResponse + (*ListChannelStatusRequest)(nil), // 92: state.v1.ListChannelStatusRequest + (*ListChannelStatusResponse)(nil), // 93: state.v1.ListChannelStatusResponse + (*ApplyStatus)(nil), // 94: state.v1.ApplyStatus + (*PutApplyStatusRequest)(nil), // 95: state.v1.PutApplyStatusRequest + (*PutApplyStatusResponse)(nil), // 96: state.v1.PutApplyStatusResponse + (*ListApplyStatusRequest)(nil), // 97: state.v1.ListApplyStatusRequest + (*ListApplyStatusResponse)(nil), // 98: state.v1.ListApplyStatusResponse + (*TaskLogEntry)(nil), // 99: state.v1.TaskLogEntry + (*ReadTaskLogRequest)(nil), // 100: state.v1.ReadTaskLogRequest + (*ReadTaskLogResponse)(nil), // 101: state.v1.ReadTaskLogResponse + (*StreamTaskLogContentRequest)(nil), // 102: state.v1.StreamTaskLogContentRequest + (*StreamTaskLogContentResponse)(nil), // 103: state.v1.StreamTaskLogContentResponse + (*InsertCaptureRequest)(nil), // 104: state.v1.InsertCaptureRequest + (*InsertCaptureResponse)(nil), // 105: state.v1.InsertCaptureResponse + (*ListCapturesRequest)(nil), // 106: state.v1.ListCapturesRequest + (*ListCapturesResponse)(nil), // 107: state.v1.ListCapturesResponse + (*StreamCapturesRequest)(nil), // 108: state.v1.StreamCapturesRequest + (*StreamCapturesResponse)(nil), // 109: state.v1.StreamCapturesResponse + (*InsertMappingRequest)(nil), // 110: state.v1.InsertMappingRequest + (*InsertMappingResponse)(nil), // 111: state.v1.InsertMappingResponse + (*GetMappingRequest)(nil), // 112: state.v1.GetMappingRequest + (*GetMappingResponse)(nil), // 113: state.v1.GetMappingResponse + (*ListMappingsRequest)(nil), // 114: state.v1.ListMappingsRequest + (*ListMappingsResponse)(nil), // 115: state.v1.ListMappingsResponse + (*UpdateMappingRequest)(nil), // 116: state.v1.UpdateMappingRequest + (*UpdateMappingResponse)(nil), // 117: state.v1.UpdateMappingResponse + (*DeleteMappingRequest)(nil), // 118: state.v1.DeleteMappingRequest + (*DeleteMappingResponse)(nil), // 119: state.v1.DeleteMappingResponse + (*InsertBindingRequest)(nil), // 120: state.v1.InsertBindingRequest + (*InsertBindingResponse)(nil), // 121: state.v1.InsertBindingResponse + (*GetBindingRequest)(nil), // 122: state.v1.GetBindingRequest + (*GetBindingResponse)(nil), // 123: state.v1.GetBindingResponse + (*ListBindingsRequest)(nil), // 124: state.v1.ListBindingsRequest + (*ListBindingsResponse)(nil), // 125: state.v1.ListBindingsResponse + (*UpdateBindingRequest)(nil), // 126: state.v1.UpdateBindingRequest + (*UpdateBindingResponse)(nil), // 127: state.v1.UpdateBindingResponse + (*DeleteBindingRequest)(nil), // 128: state.v1.DeleteBindingRequest + (*DeleteBindingResponse)(nil), // 129: state.v1.DeleteBindingResponse + (*ApproveBindingRequest)(nil), // 130: state.v1.ApproveBindingRequest + (*ApproveBindingResponse)(nil), // 131: state.v1.ApproveBindingResponse + (*ArmedBindingsForSourceRequest)(nil), // 132: state.v1.ArmedBindingsForSourceRequest + (*ArmedBindingsForSourceResponse)(nil), // 133: state.v1.ArmedBindingsForSourceResponse + (*RecordDispatchRequest)(nil), // 134: state.v1.RecordDispatchRequest + (*RecordDispatchResponse)(nil), // 135: state.v1.RecordDispatchResponse + (*RecordPlaybookDispatchRequest)(nil), // 136: state.v1.RecordPlaybookDispatchRequest + (*RecordPlaybookDispatchResponse)(nil), // 137: state.v1.RecordPlaybookDispatchResponse + (*DeletePlaybookDispatchesRequest)(nil), // 138: state.v1.DeletePlaybookDispatchesRequest + (*DeletePlaybookDispatchesResponse)(nil), // 139: state.v1.DeletePlaybookDispatchesResponse + (*ListUndispatchedCapturesRequest)(nil), // 140: state.v1.ListUndispatchedCapturesRequest + (*ListUndispatchedCapturesResponse)(nil), // 141: state.v1.ListUndispatchedCapturesResponse + (*StreamUndispatchedCapturesRequest)(nil), // 142: state.v1.StreamUndispatchedCapturesRequest + (*StreamUndispatchedCapturesResponse)(nil), // 143: state.v1.StreamUndispatchedCapturesResponse + (*EnqueueBindingTaskRequest)(nil), // 144: state.v1.EnqueueBindingTaskRequest + (*EnqueueBindingTaskResponse)(nil), // 145: state.v1.EnqueueBindingTaskResponse + nil, // 146: state.v1.StatusCountsResponse.CountsEntry + (*timestamppb.Timestamp)(nil), // 147: google.protobuf.Timestamp } var file_state_v1_state_proto_depIdxs = []int32{ - 143, // 0: state.v1.Identity.created_at:type_name -> google.protobuf.Timestamp - 143, // 1: state.v1.Identity.updated_at:type_name -> google.protobuf.Timestamp + 147, // 0: state.v1.Identity.created_at:type_name -> google.protobuf.Timestamp + 147, // 1: state.v1.Identity.updated_at:type_name -> google.protobuf.Timestamp 4, // 2: state.v1.ListIdentitiesResponse.identities:type_name -> state.v1.Identity 4, // 3: state.v1.GetIdentityResponse.identity:type_name -> state.v1.Identity 5, // 4: state.v1.CreateIdentityRequest.audit:type_name -> state.v1.IdentityAudit @@ -8372,16 +8562,16 @@ var file_state_v1_state_proto_depIdxs = []int32{ 4, // 14: state.v1.ResolveIdentitySubjectResponse.identity:type_name -> state.v1.Identity 5, // 15: state.v1.BindIdentitySubjectRequest.audit:type_name -> state.v1.IdentityAudit 4, // 16: state.v1.BindIdentitySubjectResponse.identity:type_name -> state.v1.Identity - 143, // 17: state.v1.Task.created_at:type_name -> google.protobuf.Timestamp - 143, // 18: state.v1.Task.updated_at:type_name -> google.protobuf.Timestamp - 143, // 19: state.v1.Event.at:type_name -> google.protobuf.Timestamp - 143, // 20: state.v1.CapturedEvent.received_at:type_name -> google.protobuf.Timestamp + 147, // 17: state.v1.Task.created_at:type_name -> google.protobuf.Timestamp + 147, // 18: state.v1.Task.updated_at:type_name -> google.protobuf.Timestamp + 147, // 19: state.v1.Event.at:type_name -> google.protobuf.Timestamp + 147, // 20: state.v1.CapturedEvent.received_at:type_name -> google.protobuf.Timestamp 27, // 21: state.v1.Mapping.fields:type_name -> state.v1.MappingField - 143, // 22: state.v1.Mapping.created_at:type_name -> google.protobuf.Timestamp - 143, // 23: state.v1.Mapping.updated_at:type_name -> google.protobuf.Timestamp + 147, // 22: state.v1.Mapping.created_at:type_name -> google.protobuf.Timestamp + 147, // 23: state.v1.Mapping.updated_at:type_name -> google.protobuf.Timestamp 29, // 24: state.v1.Binding.matcher:type_name -> state.v1.BindingMatcher - 143, // 25: state.v1.Binding.created_at:type_name -> google.protobuf.Timestamp - 143, // 26: state.v1.Binding.updated_at:type_name -> google.protobuf.Timestamp + 147, // 25: state.v1.Binding.created_at:type_name -> google.protobuf.Timestamp + 147, // 26: state.v1.Binding.updated_at:type_name -> google.protobuf.Timestamp 24, // 27: state.v1.EnqueueChatTaskResponse.task:type_name -> state.v1.Task 24, // 28: state.v1.ClaimNextResponse.task:type_name -> state.v1.Task 24, // 29: state.v1.ClaimByIssueResponse.task:type_name -> state.v1.Task @@ -8392,26 +8582,26 @@ var file_state_v1_state_proto_depIdxs = []int32{ 24, // 34: state.v1.TaskByIDResponse.task:type_name -> state.v1.Task 24, // 35: state.v1.OpenPRsResponse.tasks:type_name -> state.v1.Task 24, // 36: state.v1.TasksResponse.tasks:type_name -> state.v1.Task - 142, // 37: state.v1.StatusCountsResponse.counts:type_name -> state.v1.StatusCountsResponse.CountsEntry + 146, // 37: state.v1.StatusCountsResponse.counts:type_name -> state.v1.StatusCountsResponse.CountsEntry 25, // 38: state.v1.InsertEventRequest.event:type_name -> state.v1.Event 25, // 39: state.v1.EventsSinceResponse.events:type_name -> state.v1.Event 25, // 40: state.v1.TaskEventsResponse.events:type_name -> state.v1.Event 31, // 41: state.v1.WorkflowStatsResponse.stats:type_name -> state.v1.WorkflowStat 32, // 42: state.v1.StageStatsResponse.stats:type_name -> state.v1.StageStat 33, // 43: state.v1.TokensByDayResponse.tokens:type_name -> state.v1.DayTokens - 143, // 44: state.v1.ConfigSnapshot.published_at:type_name -> google.protobuf.Timestamp - 80, // 45: state.v1.PutConfigSnapshotRequest.snapshot:type_name -> state.v1.ConfigSnapshot - 80, // 46: state.v1.GetConfigSnapshotResponse.snapshot:type_name -> state.v1.ConfigSnapshot - 143, // 47: state.v1.ChannelStatus.observed_at:type_name -> google.protobuf.Timestamp - 85, // 48: state.v1.PutChannelStatusRequest.channels:type_name -> state.v1.ChannelStatus - 85, // 49: state.v1.ListChannelStatusResponse.channels:type_name -> state.v1.ChannelStatus - 143, // 50: state.v1.ApplyStatus.reported_at:type_name -> google.protobuf.Timestamp - 90, // 51: state.v1.PutApplyStatusRequest.status:type_name -> state.v1.ApplyStatus - 90, // 52: state.v1.ListApplyStatusResponse.statuses:type_name -> state.v1.ApplyStatus - 143, // 53: state.v1.TaskLogEntry.time:type_name -> google.protobuf.Timestamp - 143, // 54: state.v1.ReadTaskLogRequest.since:type_name -> google.protobuf.Timestamp - 143, // 55: state.v1.ReadTaskLogRequest.until:type_name -> google.protobuf.Timestamp - 95, // 56: state.v1.ReadTaskLogResponse.entries:type_name -> state.v1.TaskLogEntry + 147, // 44: state.v1.ConfigSnapshot.published_at:type_name -> google.protobuf.Timestamp + 84, // 45: state.v1.PutConfigSnapshotRequest.snapshot:type_name -> state.v1.ConfigSnapshot + 84, // 46: state.v1.GetConfigSnapshotResponse.snapshot:type_name -> state.v1.ConfigSnapshot + 147, // 47: state.v1.ChannelStatus.observed_at:type_name -> google.protobuf.Timestamp + 89, // 48: state.v1.PutChannelStatusRequest.channels:type_name -> state.v1.ChannelStatus + 89, // 49: state.v1.ListChannelStatusResponse.channels:type_name -> state.v1.ChannelStatus + 147, // 50: state.v1.ApplyStatus.reported_at:type_name -> google.protobuf.Timestamp + 94, // 51: state.v1.PutApplyStatusRequest.status:type_name -> state.v1.ApplyStatus + 94, // 52: state.v1.ListApplyStatusResponse.statuses:type_name -> state.v1.ApplyStatus + 147, // 53: state.v1.TaskLogEntry.time:type_name -> google.protobuf.Timestamp + 147, // 54: state.v1.ReadTaskLogRequest.since:type_name -> google.protobuf.Timestamp + 147, // 55: state.v1.ReadTaskLogRequest.until:type_name -> google.protobuf.Timestamp + 99, // 56: state.v1.ReadTaskLogResponse.entries:type_name -> state.v1.TaskLogEntry 26, // 57: state.v1.InsertCaptureRequest.capture:type_name -> state.v1.CapturedEvent 26, // 58: state.v1.ListCapturesResponse.captures:type_name -> state.v1.CapturedEvent 26, // 59: state.v1.StreamCapturesResponse.capture:type_name -> state.v1.CapturedEvent @@ -8448,113 +8638,117 @@ var file_state_v1_state_proto_depIdxs = []int32{ 48, // 90: state.v1.StateStoreService.RecoverStale:input_type -> state.v1.RecoverStaleRequest 50, // 91: state.v1.StateStoreService.ArchiveTask:input_type -> state.v1.ArchiveTaskRequest 52, // 92: state.v1.StateStoreService.RetryTask:input_type -> state.v1.RetryTaskRequest - 54, // 93: state.v1.StateStoreService.TaskByIssue:input_type -> state.v1.TaskByIssueRequest - 56, // 94: state.v1.StateStoreService.OpenTaskByPR:input_type -> state.v1.OpenTaskByPRRequest - 58, // 95: state.v1.StateStoreService.TaskByID:input_type -> state.v1.TaskByIDRequest - 60, // 96: state.v1.StateStoreService.OpenPRs:input_type -> state.v1.OpenPRsRequest - 62, // 97: state.v1.StateStoreService.ClearTerminalTasks:input_type -> state.v1.ClearTerminalTasksRequest - 64, // 98: state.v1.StateStoreService.Tasks:input_type -> state.v1.TasksRequest - 66, // 99: state.v1.StateStoreService.StatusCounts:input_type -> state.v1.StatusCountsRequest - 68, // 100: state.v1.StateStoreService.InsertEvent:input_type -> state.v1.InsertEventRequest - 70, // 101: state.v1.StateStoreService.EventsSince:input_type -> state.v1.EventsSinceRequest - 72, // 102: state.v1.StateStoreService.TaskEvents:input_type -> state.v1.TaskEventsRequest - 74, // 103: state.v1.StateStoreService.WorkflowStats:input_type -> state.v1.WorkflowStatsRequest - 76, // 104: state.v1.StateStoreService.StageStats:input_type -> state.v1.StageStatsRequest - 78, // 105: state.v1.StateStoreService.TokensByDay:input_type -> state.v1.TokensByDayRequest - 81, // 106: state.v1.StateStoreService.PutConfigSnapshot:input_type -> state.v1.PutConfigSnapshotRequest - 83, // 107: state.v1.StateStoreService.GetConfigSnapshot:input_type -> state.v1.GetConfigSnapshotRequest - 86, // 108: state.v1.StateStoreService.PutChannelStatus:input_type -> state.v1.PutChannelStatusRequest - 88, // 109: state.v1.StateStoreService.ListChannelStatus:input_type -> state.v1.ListChannelStatusRequest - 91, // 110: state.v1.StateStoreService.PutApplyStatus:input_type -> state.v1.PutApplyStatusRequest - 93, // 111: state.v1.StateStoreService.ListApplyStatus:input_type -> state.v1.ListApplyStatusRequest - 96, // 112: state.v1.StateStoreService.ReadTaskLog:input_type -> state.v1.ReadTaskLogRequest - 98, // 113: state.v1.StateStoreService.StreamTaskLogContent:input_type -> state.v1.StreamTaskLogContentRequest - 100, // 114: state.v1.StateStoreService.InsertCapture:input_type -> state.v1.InsertCaptureRequest - 102, // 115: state.v1.StateStoreService.ListCaptures:input_type -> state.v1.ListCapturesRequest - 104, // 116: state.v1.StateStoreService.StreamCaptures:input_type -> state.v1.StreamCapturesRequest - 106, // 117: state.v1.StateStoreService.InsertMapping:input_type -> state.v1.InsertMappingRequest - 108, // 118: state.v1.StateStoreService.GetMapping:input_type -> state.v1.GetMappingRequest - 110, // 119: state.v1.StateStoreService.ListMappings:input_type -> state.v1.ListMappingsRequest - 112, // 120: state.v1.StateStoreService.UpdateMapping:input_type -> state.v1.UpdateMappingRequest - 114, // 121: state.v1.StateStoreService.DeleteMapping:input_type -> state.v1.DeleteMappingRequest - 116, // 122: state.v1.StateStoreService.InsertBinding:input_type -> state.v1.InsertBindingRequest - 118, // 123: state.v1.StateStoreService.GetBinding:input_type -> state.v1.GetBindingRequest - 120, // 124: state.v1.StateStoreService.ListBindings:input_type -> state.v1.ListBindingsRequest - 122, // 125: state.v1.StateStoreService.UpdateBinding:input_type -> state.v1.UpdateBindingRequest - 124, // 126: state.v1.StateStoreService.DeleteBinding:input_type -> state.v1.DeleteBindingRequest - 126, // 127: state.v1.StateStoreService.ApproveBinding:input_type -> state.v1.ApproveBindingRequest - 128, // 128: state.v1.StateStoreService.ArmedBindingsForSource:input_type -> state.v1.ArmedBindingsForSourceRequest - 130, // 129: state.v1.StateStoreService.RecordDispatch:input_type -> state.v1.RecordDispatchRequest - 132, // 130: state.v1.StateStoreService.RecordPlaybookDispatch:input_type -> state.v1.RecordPlaybookDispatchRequest - 134, // 131: state.v1.StateStoreService.DeletePlaybookDispatches:input_type -> state.v1.DeletePlaybookDispatchesRequest - 136, // 132: state.v1.StateStoreService.ListUndispatchedCaptures:input_type -> state.v1.ListUndispatchedCapturesRequest - 138, // 133: state.v1.StateStoreService.StreamUndispatchedCaptures:input_type -> state.v1.StreamUndispatchedCapturesRequest - 140, // 134: state.v1.StateStoreService.EnqueueBindingTask:input_type -> state.v1.EnqueueBindingTaskRequest - 1, // 135: state.v1.StateStoreService.RegisterTaskGrant:output_type -> state.v1.RegisterTaskGrantResponse - 3, // 136: state.v1.StateStoreService.RevokeTaskGrant:output_type -> state.v1.RevokeTaskGrantResponse - 7, // 137: state.v1.StateStoreService.ListIdentities:output_type -> state.v1.ListIdentitiesResponse - 9, // 138: state.v1.StateStoreService.GetIdentity:output_type -> state.v1.GetIdentityResponse - 15, // 139: state.v1.StateStoreService.CreateIdentity:output_type -> state.v1.CreateIdentityResponse - 16, // 140: state.v1.StateStoreService.RenameIdentity:output_type -> state.v1.RenameIdentityResponse - 17, // 141: state.v1.StateStoreService.SuspendIdentity:output_type -> state.v1.SuspendIdentityResponse - 18, // 142: state.v1.StateStoreService.ReactivateIdentity:output_type -> state.v1.ReactivateIdentityResponse - 19, // 143: state.v1.StateStoreService.RetireIdentity:output_type -> state.v1.RetireIdentityResponse - 21, // 144: state.v1.StateStoreService.ResolveIdentitySubject:output_type -> state.v1.ResolveIdentitySubjectResponse - 23, // 145: state.v1.StateStoreService.BindIdentitySubject:output_type -> state.v1.BindIdentitySubjectResponse - 35, // 146: state.v1.StateStoreService.EnqueueIssue:output_type -> state.v1.EnqueueIssueResponse - 37, // 147: state.v1.StateStoreService.EnqueueChatTask:output_type -> state.v1.EnqueueChatTaskResponse - 39, // 148: state.v1.StateStoreService.ClaimNext:output_type -> state.v1.ClaimNextResponse - 41, // 149: state.v1.StateStoreService.ClaimByIssue:output_type -> state.v1.ClaimByIssueResponse - 43, // 150: state.v1.StateStoreService.Transition:output_type -> state.v1.TransitionResponse - 45, // 151: state.v1.StateStoreService.Update:output_type -> state.v1.UpdateResponse - 47, // 152: state.v1.StateStoreService.Requeue:output_type -> state.v1.RequeueResponse - 49, // 153: state.v1.StateStoreService.RecoverStale:output_type -> state.v1.RecoverStaleResponse - 51, // 154: state.v1.StateStoreService.ArchiveTask:output_type -> state.v1.ArchiveTaskResponse - 53, // 155: state.v1.StateStoreService.RetryTask:output_type -> state.v1.RetryTaskResponse - 55, // 156: state.v1.StateStoreService.TaskByIssue:output_type -> state.v1.TaskByIssueResponse - 57, // 157: state.v1.StateStoreService.OpenTaskByPR:output_type -> state.v1.OpenTaskByPRResponse - 59, // 158: state.v1.StateStoreService.TaskByID:output_type -> state.v1.TaskByIDResponse - 61, // 159: state.v1.StateStoreService.OpenPRs:output_type -> state.v1.OpenPRsResponse - 63, // 160: state.v1.StateStoreService.ClearTerminalTasks:output_type -> state.v1.ClearTerminalTasksResponse - 65, // 161: state.v1.StateStoreService.Tasks:output_type -> state.v1.TasksResponse - 67, // 162: state.v1.StateStoreService.StatusCounts:output_type -> state.v1.StatusCountsResponse - 69, // 163: state.v1.StateStoreService.InsertEvent:output_type -> state.v1.InsertEventResponse - 71, // 164: state.v1.StateStoreService.EventsSince:output_type -> state.v1.EventsSinceResponse - 73, // 165: state.v1.StateStoreService.TaskEvents:output_type -> state.v1.TaskEventsResponse - 75, // 166: state.v1.StateStoreService.WorkflowStats:output_type -> state.v1.WorkflowStatsResponse - 77, // 167: state.v1.StateStoreService.StageStats:output_type -> state.v1.StageStatsResponse - 79, // 168: state.v1.StateStoreService.TokensByDay:output_type -> state.v1.TokensByDayResponse - 82, // 169: state.v1.StateStoreService.PutConfigSnapshot:output_type -> state.v1.PutConfigSnapshotResponse - 84, // 170: state.v1.StateStoreService.GetConfigSnapshot:output_type -> state.v1.GetConfigSnapshotResponse - 87, // 171: state.v1.StateStoreService.PutChannelStatus:output_type -> state.v1.PutChannelStatusResponse - 89, // 172: state.v1.StateStoreService.ListChannelStatus:output_type -> state.v1.ListChannelStatusResponse - 92, // 173: state.v1.StateStoreService.PutApplyStatus:output_type -> state.v1.PutApplyStatusResponse - 94, // 174: state.v1.StateStoreService.ListApplyStatus:output_type -> state.v1.ListApplyStatusResponse - 97, // 175: state.v1.StateStoreService.ReadTaskLog:output_type -> state.v1.ReadTaskLogResponse - 99, // 176: state.v1.StateStoreService.StreamTaskLogContent:output_type -> state.v1.StreamTaskLogContentResponse - 101, // 177: state.v1.StateStoreService.InsertCapture:output_type -> state.v1.InsertCaptureResponse - 103, // 178: state.v1.StateStoreService.ListCaptures:output_type -> state.v1.ListCapturesResponse - 105, // 179: state.v1.StateStoreService.StreamCaptures:output_type -> state.v1.StreamCapturesResponse - 107, // 180: state.v1.StateStoreService.InsertMapping:output_type -> state.v1.InsertMappingResponse - 109, // 181: state.v1.StateStoreService.GetMapping:output_type -> state.v1.GetMappingResponse - 111, // 182: state.v1.StateStoreService.ListMappings:output_type -> state.v1.ListMappingsResponse - 113, // 183: state.v1.StateStoreService.UpdateMapping:output_type -> state.v1.UpdateMappingResponse - 115, // 184: state.v1.StateStoreService.DeleteMapping:output_type -> state.v1.DeleteMappingResponse - 117, // 185: state.v1.StateStoreService.InsertBinding:output_type -> state.v1.InsertBindingResponse - 119, // 186: state.v1.StateStoreService.GetBinding:output_type -> state.v1.GetBindingResponse - 121, // 187: state.v1.StateStoreService.ListBindings:output_type -> state.v1.ListBindingsResponse - 123, // 188: state.v1.StateStoreService.UpdateBinding:output_type -> state.v1.UpdateBindingResponse - 125, // 189: state.v1.StateStoreService.DeleteBinding:output_type -> state.v1.DeleteBindingResponse - 127, // 190: state.v1.StateStoreService.ApproveBinding:output_type -> state.v1.ApproveBindingResponse - 129, // 191: state.v1.StateStoreService.ArmedBindingsForSource:output_type -> state.v1.ArmedBindingsForSourceResponse - 131, // 192: state.v1.StateStoreService.RecordDispatch:output_type -> state.v1.RecordDispatchResponse - 133, // 193: state.v1.StateStoreService.RecordPlaybookDispatch:output_type -> state.v1.RecordPlaybookDispatchResponse - 135, // 194: state.v1.StateStoreService.DeletePlaybookDispatches:output_type -> state.v1.DeletePlaybookDispatchesResponse - 137, // 195: state.v1.StateStoreService.ListUndispatchedCaptures:output_type -> state.v1.ListUndispatchedCapturesResponse - 139, // 196: state.v1.StateStoreService.StreamUndispatchedCaptures:output_type -> state.v1.StreamUndispatchedCapturesResponse - 141, // 197: state.v1.StateStoreService.EnqueueBindingTask:output_type -> state.v1.EnqueueBindingTaskResponse - 135, // [135:198] is the sub-list for method output_type - 72, // [72:135] is the sub-list for method input_type + 54, // 93: state.v1.StateStoreService.BeginRemediation:input_type -> state.v1.BeginRemediationRequest + 56, // 94: state.v1.StateStoreService.UpdateReviewPayload:input_type -> state.v1.UpdateReviewPayloadRequest + 58, // 95: state.v1.StateStoreService.TaskByIssue:input_type -> state.v1.TaskByIssueRequest + 60, // 96: state.v1.StateStoreService.OpenTaskByPR:input_type -> state.v1.OpenTaskByPRRequest + 62, // 97: state.v1.StateStoreService.TaskByID:input_type -> state.v1.TaskByIDRequest + 64, // 98: state.v1.StateStoreService.OpenPRs:input_type -> state.v1.OpenPRsRequest + 66, // 99: state.v1.StateStoreService.ClearTerminalTasks:input_type -> state.v1.ClearTerminalTasksRequest + 68, // 100: state.v1.StateStoreService.Tasks:input_type -> state.v1.TasksRequest + 70, // 101: state.v1.StateStoreService.StatusCounts:input_type -> state.v1.StatusCountsRequest + 72, // 102: state.v1.StateStoreService.InsertEvent:input_type -> state.v1.InsertEventRequest + 74, // 103: state.v1.StateStoreService.EventsSince:input_type -> state.v1.EventsSinceRequest + 76, // 104: state.v1.StateStoreService.TaskEvents:input_type -> state.v1.TaskEventsRequest + 78, // 105: state.v1.StateStoreService.WorkflowStats:input_type -> state.v1.WorkflowStatsRequest + 80, // 106: state.v1.StateStoreService.StageStats:input_type -> state.v1.StageStatsRequest + 82, // 107: state.v1.StateStoreService.TokensByDay:input_type -> state.v1.TokensByDayRequest + 85, // 108: state.v1.StateStoreService.PutConfigSnapshot:input_type -> state.v1.PutConfigSnapshotRequest + 87, // 109: state.v1.StateStoreService.GetConfigSnapshot:input_type -> state.v1.GetConfigSnapshotRequest + 90, // 110: state.v1.StateStoreService.PutChannelStatus:input_type -> state.v1.PutChannelStatusRequest + 92, // 111: state.v1.StateStoreService.ListChannelStatus:input_type -> state.v1.ListChannelStatusRequest + 95, // 112: state.v1.StateStoreService.PutApplyStatus:input_type -> state.v1.PutApplyStatusRequest + 97, // 113: state.v1.StateStoreService.ListApplyStatus:input_type -> state.v1.ListApplyStatusRequest + 100, // 114: state.v1.StateStoreService.ReadTaskLog:input_type -> state.v1.ReadTaskLogRequest + 102, // 115: state.v1.StateStoreService.StreamTaskLogContent:input_type -> state.v1.StreamTaskLogContentRequest + 104, // 116: state.v1.StateStoreService.InsertCapture:input_type -> state.v1.InsertCaptureRequest + 106, // 117: state.v1.StateStoreService.ListCaptures:input_type -> state.v1.ListCapturesRequest + 108, // 118: state.v1.StateStoreService.StreamCaptures:input_type -> state.v1.StreamCapturesRequest + 110, // 119: state.v1.StateStoreService.InsertMapping:input_type -> state.v1.InsertMappingRequest + 112, // 120: state.v1.StateStoreService.GetMapping:input_type -> state.v1.GetMappingRequest + 114, // 121: state.v1.StateStoreService.ListMappings:input_type -> state.v1.ListMappingsRequest + 116, // 122: state.v1.StateStoreService.UpdateMapping:input_type -> state.v1.UpdateMappingRequest + 118, // 123: state.v1.StateStoreService.DeleteMapping:input_type -> state.v1.DeleteMappingRequest + 120, // 124: state.v1.StateStoreService.InsertBinding:input_type -> state.v1.InsertBindingRequest + 122, // 125: state.v1.StateStoreService.GetBinding:input_type -> state.v1.GetBindingRequest + 124, // 126: state.v1.StateStoreService.ListBindings:input_type -> state.v1.ListBindingsRequest + 126, // 127: state.v1.StateStoreService.UpdateBinding:input_type -> state.v1.UpdateBindingRequest + 128, // 128: state.v1.StateStoreService.DeleteBinding:input_type -> state.v1.DeleteBindingRequest + 130, // 129: state.v1.StateStoreService.ApproveBinding:input_type -> state.v1.ApproveBindingRequest + 132, // 130: state.v1.StateStoreService.ArmedBindingsForSource:input_type -> state.v1.ArmedBindingsForSourceRequest + 134, // 131: state.v1.StateStoreService.RecordDispatch:input_type -> state.v1.RecordDispatchRequest + 136, // 132: state.v1.StateStoreService.RecordPlaybookDispatch:input_type -> state.v1.RecordPlaybookDispatchRequest + 138, // 133: state.v1.StateStoreService.DeletePlaybookDispatches:input_type -> state.v1.DeletePlaybookDispatchesRequest + 140, // 134: state.v1.StateStoreService.ListUndispatchedCaptures:input_type -> state.v1.ListUndispatchedCapturesRequest + 142, // 135: state.v1.StateStoreService.StreamUndispatchedCaptures:input_type -> state.v1.StreamUndispatchedCapturesRequest + 144, // 136: state.v1.StateStoreService.EnqueueBindingTask:input_type -> state.v1.EnqueueBindingTaskRequest + 1, // 137: state.v1.StateStoreService.RegisterTaskGrant:output_type -> state.v1.RegisterTaskGrantResponse + 3, // 138: state.v1.StateStoreService.RevokeTaskGrant:output_type -> state.v1.RevokeTaskGrantResponse + 7, // 139: state.v1.StateStoreService.ListIdentities:output_type -> state.v1.ListIdentitiesResponse + 9, // 140: state.v1.StateStoreService.GetIdentity:output_type -> state.v1.GetIdentityResponse + 15, // 141: state.v1.StateStoreService.CreateIdentity:output_type -> state.v1.CreateIdentityResponse + 16, // 142: state.v1.StateStoreService.RenameIdentity:output_type -> state.v1.RenameIdentityResponse + 17, // 143: state.v1.StateStoreService.SuspendIdentity:output_type -> state.v1.SuspendIdentityResponse + 18, // 144: state.v1.StateStoreService.ReactivateIdentity:output_type -> state.v1.ReactivateIdentityResponse + 19, // 145: state.v1.StateStoreService.RetireIdentity:output_type -> state.v1.RetireIdentityResponse + 21, // 146: state.v1.StateStoreService.ResolveIdentitySubject:output_type -> state.v1.ResolveIdentitySubjectResponse + 23, // 147: state.v1.StateStoreService.BindIdentitySubject:output_type -> state.v1.BindIdentitySubjectResponse + 35, // 148: state.v1.StateStoreService.EnqueueIssue:output_type -> state.v1.EnqueueIssueResponse + 37, // 149: state.v1.StateStoreService.EnqueueChatTask:output_type -> state.v1.EnqueueChatTaskResponse + 39, // 150: state.v1.StateStoreService.ClaimNext:output_type -> state.v1.ClaimNextResponse + 41, // 151: state.v1.StateStoreService.ClaimByIssue:output_type -> state.v1.ClaimByIssueResponse + 43, // 152: state.v1.StateStoreService.Transition:output_type -> state.v1.TransitionResponse + 45, // 153: state.v1.StateStoreService.Update:output_type -> state.v1.UpdateResponse + 47, // 154: state.v1.StateStoreService.Requeue:output_type -> state.v1.RequeueResponse + 49, // 155: state.v1.StateStoreService.RecoverStale:output_type -> state.v1.RecoverStaleResponse + 51, // 156: state.v1.StateStoreService.ArchiveTask:output_type -> state.v1.ArchiveTaskResponse + 53, // 157: state.v1.StateStoreService.RetryTask:output_type -> state.v1.RetryTaskResponse + 55, // 158: state.v1.StateStoreService.BeginRemediation:output_type -> state.v1.BeginRemediationResponse + 57, // 159: state.v1.StateStoreService.UpdateReviewPayload:output_type -> state.v1.UpdateReviewPayloadResponse + 59, // 160: state.v1.StateStoreService.TaskByIssue:output_type -> state.v1.TaskByIssueResponse + 61, // 161: state.v1.StateStoreService.OpenTaskByPR:output_type -> state.v1.OpenTaskByPRResponse + 63, // 162: state.v1.StateStoreService.TaskByID:output_type -> state.v1.TaskByIDResponse + 65, // 163: state.v1.StateStoreService.OpenPRs:output_type -> state.v1.OpenPRsResponse + 67, // 164: state.v1.StateStoreService.ClearTerminalTasks:output_type -> state.v1.ClearTerminalTasksResponse + 69, // 165: state.v1.StateStoreService.Tasks:output_type -> state.v1.TasksResponse + 71, // 166: state.v1.StateStoreService.StatusCounts:output_type -> state.v1.StatusCountsResponse + 73, // 167: state.v1.StateStoreService.InsertEvent:output_type -> state.v1.InsertEventResponse + 75, // 168: state.v1.StateStoreService.EventsSince:output_type -> state.v1.EventsSinceResponse + 77, // 169: state.v1.StateStoreService.TaskEvents:output_type -> state.v1.TaskEventsResponse + 79, // 170: state.v1.StateStoreService.WorkflowStats:output_type -> state.v1.WorkflowStatsResponse + 81, // 171: state.v1.StateStoreService.StageStats:output_type -> state.v1.StageStatsResponse + 83, // 172: state.v1.StateStoreService.TokensByDay:output_type -> state.v1.TokensByDayResponse + 86, // 173: state.v1.StateStoreService.PutConfigSnapshot:output_type -> state.v1.PutConfigSnapshotResponse + 88, // 174: state.v1.StateStoreService.GetConfigSnapshot:output_type -> state.v1.GetConfigSnapshotResponse + 91, // 175: state.v1.StateStoreService.PutChannelStatus:output_type -> state.v1.PutChannelStatusResponse + 93, // 176: state.v1.StateStoreService.ListChannelStatus:output_type -> state.v1.ListChannelStatusResponse + 96, // 177: state.v1.StateStoreService.PutApplyStatus:output_type -> state.v1.PutApplyStatusResponse + 98, // 178: state.v1.StateStoreService.ListApplyStatus:output_type -> state.v1.ListApplyStatusResponse + 101, // 179: state.v1.StateStoreService.ReadTaskLog:output_type -> state.v1.ReadTaskLogResponse + 103, // 180: state.v1.StateStoreService.StreamTaskLogContent:output_type -> state.v1.StreamTaskLogContentResponse + 105, // 181: state.v1.StateStoreService.InsertCapture:output_type -> state.v1.InsertCaptureResponse + 107, // 182: state.v1.StateStoreService.ListCaptures:output_type -> state.v1.ListCapturesResponse + 109, // 183: state.v1.StateStoreService.StreamCaptures:output_type -> state.v1.StreamCapturesResponse + 111, // 184: state.v1.StateStoreService.InsertMapping:output_type -> state.v1.InsertMappingResponse + 113, // 185: state.v1.StateStoreService.GetMapping:output_type -> state.v1.GetMappingResponse + 115, // 186: state.v1.StateStoreService.ListMappings:output_type -> state.v1.ListMappingsResponse + 117, // 187: state.v1.StateStoreService.UpdateMapping:output_type -> state.v1.UpdateMappingResponse + 119, // 188: state.v1.StateStoreService.DeleteMapping:output_type -> state.v1.DeleteMappingResponse + 121, // 189: state.v1.StateStoreService.InsertBinding:output_type -> state.v1.InsertBindingResponse + 123, // 190: state.v1.StateStoreService.GetBinding:output_type -> state.v1.GetBindingResponse + 125, // 191: state.v1.StateStoreService.ListBindings:output_type -> state.v1.ListBindingsResponse + 127, // 192: state.v1.StateStoreService.UpdateBinding:output_type -> state.v1.UpdateBindingResponse + 129, // 193: state.v1.StateStoreService.DeleteBinding:output_type -> state.v1.DeleteBindingResponse + 131, // 194: state.v1.StateStoreService.ApproveBinding:output_type -> state.v1.ApproveBindingResponse + 133, // 195: state.v1.StateStoreService.ArmedBindingsForSource:output_type -> state.v1.ArmedBindingsForSourceResponse + 135, // 196: state.v1.StateStoreService.RecordDispatch:output_type -> state.v1.RecordDispatchResponse + 137, // 197: state.v1.StateStoreService.RecordPlaybookDispatch:output_type -> state.v1.RecordPlaybookDispatchResponse + 139, // 198: state.v1.StateStoreService.DeletePlaybookDispatches:output_type -> state.v1.DeletePlaybookDispatchesResponse + 141, // 199: state.v1.StateStoreService.ListUndispatchedCaptures:output_type -> state.v1.ListUndispatchedCapturesResponse + 143, // 200: state.v1.StateStoreService.StreamUndispatchedCaptures:output_type -> state.v1.StreamUndispatchedCapturesResponse + 145, // 201: state.v1.StateStoreService.EnqueueBindingTask:output_type -> state.v1.EnqueueBindingTaskResponse + 137, // [137:202] is the sub-list for method output_type + 72, // [72:137] is the sub-list for method input_type 72, // [72:72] is the sub-list for extension type_name 72, // [72:72] is the sub-list for extension extendee 0, // [0:72] is the sub-list for field type_name @@ -8571,7 +8765,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: 143, + NumMessages: 147, 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 553316a11..6edc789e6 100644 --- a/internal/contracts/state/v1/state_grpc.pb.go +++ b/internal/contracts/state/v1/state_grpc.pb.go @@ -40,6 +40,8 @@ const ( StateStoreService_RecoverStale_FullMethodName = "/state.v1.StateStoreService/RecoverStale" StateStoreService_ArchiveTask_FullMethodName = "/state.v1.StateStoreService/ArchiveTask" StateStoreService_RetryTask_FullMethodName = "/state.v1.StateStoreService/RetryTask" + StateStoreService_BeginRemediation_FullMethodName = "/state.v1.StateStoreService/BeginRemediation" + StateStoreService_UpdateReviewPayload_FullMethodName = "/state.v1.StateStoreService/UpdateReviewPayload" StateStoreService_TaskByIssue_FullMethodName = "/state.v1.StateStoreService/TaskByIssue" StateStoreService_OpenTaskByPR_FullMethodName = "/state.v1.StateStoreService/OpenTaskByPR" StateStoreService_TaskByID_FullMethodName = "/state.v1.StateStoreService/TaskByID" @@ -124,6 +126,8 @@ type StateStoreServiceClient interface { // Archive / Retry ArchiveTask(ctx context.Context, in *ArchiveTaskRequest, opts ...grpc.CallOption) (*ArchiveTaskResponse, error) RetryTask(ctx context.Context, in *RetryTaskRequest, opts ...grpc.CallOption) (*RetryTaskResponse, error) + BeginRemediation(ctx context.Context, in *BeginRemediationRequest, opts ...grpc.CallOption) (*BeginRemediationResponse, error) + UpdateReviewPayload(ctx context.Context, in *UpdateReviewPayloadRequest, opts ...grpc.CallOption) (*UpdateReviewPayloadResponse, error) // Queries TaskByIssue(ctx context.Context, in *TaskByIssueRequest, opts ...grpc.CallOption) (*TaskByIssueResponse, error) OpenTaskByPR(ctx context.Context, in *OpenTaskByPRRequest, opts ...grpc.CallOption) (*OpenTaskByPRResponse, error) @@ -432,6 +436,26 @@ func (c *stateStoreServiceClient) RetryTask(ctx context.Context, in *RetryTaskRe return out, nil } +func (c *stateStoreServiceClient) BeginRemediation(ctx context.Context, in *BeginRemediationRequest, opts ...grpc.CallOption) (*BeginRemediationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(BeginRemediationResponse) + err := c.cc.Invoke(ctx, StateStoreService_BeginRemediation_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *stateStoreServiceClient) UpdateReviewPayload(ctx context.Context, in *UpdateReviewPayloadRequest, opts ...grpc.CallOption) (*UpdateReviewPayloadResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(UpdateReviewPayloadResponse) + err := c.cc.Invoke(ctx, StateStoreService_UpdateReviewPayload_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *stateStoreServiceClient) TaskByIssue(ctx context.Context, in *TaskByIssueRequest, opts ...grpc.CallOption) (*TaskByIssueResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(TaskByIssueResponse) @@ -921,6 +945,8 @@ type StateStoreServiceServer interface { // Archive / Retry ArchiveTask(context.Context, *ArchiveTaskRequest) (*ArchiveTaskResponse, error) RetryTask(context.Context, *RetryTaskRequest) (*RetryTaskResponse, error) + BeginRemediation(context.Context, *BeginRemediationRequest) (*BeginRemediationResponse, error) + UpdateReviewPayload(context.Context, *UpdateReviewPayloadRequest) (*UpdateReviewPayloadResponse, error) // Queries TaskByIssue(context.Context, *TaskByIssueRequest) (*TaskByIssueResponse, error) OpenTaskByPR(context.Context, *OpenTaskByPRRequest) (*OpenTaskByPRResponse, error) @@ -1082,6 +1108,12 @@ func (UnimplementedStateStoreServiceServer) ArchiveTask(context.Context, *Archiv func (UnimplementedStateStoreServiceServer) RetryTask(context.Context, *RetryTaskRequest) (*RetryTaskResponse, error) { return nil, status.Error(codes.Unimplemented, "method RetryTask not implemented") } +func (UnimplementedStateStoreServiceServer) BeginRemediation(context.Context, *BeginRemediationRequest) (*BeginRemediationResponse, error) { + return nil, status.Error(codes.Unimplemented, "method BeginRemediation not implemented") +} +func (UnimplementedStateStoreServiceServer) UpdateReviewPayload(context.Context, *UpdateReviewPayloadRequest) (*UpdateReviewPayloadResponse, error) { + return nil, status.Error(codes.Unimplemented, "method UpdateReviewPayload not implemented") +} func (UnimplementedStateStoreServiceServer) TaskByIssue(context.Context, *TaskByIssueRequest) (*TaskByIssueResponse, error) { return nil, status.Error(codes.Unimplemented, "method TaskByIssue not implemented") } @@ -1607,6 +1639,42 @@ func _StateStoreService_RetryTask_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _StateStoreService_BeginRemediation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BeginRemediationRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StateStoreServiceServer).BeginRemediation(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StateStoreService_BeginRemediation_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StateStoreServiceServer).BeginRemediation(ctx, req.(*BeginRemediationRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StateStoreService_UpdateReviewPayload_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateReviewPayloadRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StateStoreServiceServer).UpdateReviewPayload(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: StateStoreService_UpdateReviewPayload_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StateStoreServiceServer).UpdateReviewPayload(ctx, req.(*UpdateReviewPayloadRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _StateStoreService_TaskByIssue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(TaskByIssueRequest) if err := dec(in); err != nil { @@ -2433,6 +2501,14 @@ var StateStoreService_ServiceDesc = grpc.ServiceDesc{ MethodName: "RetryTask", Handler: _StateStoreService_RetryTask_Handler, }, + { + MethodName: "BeginRemediation", + Handler: _StateStoreService_BeginRemediation_Handler, + }, + { + MethodName: "UpdateReviewPayload", + Handler: _StateStoreService_UpdateReviewPayload_Handler, + }, { MethodName: "TaskByIssue", Handler: _StateStoreService_TaskByIssue_Handler, diff --git a/internal/daemon/daemon.go b/internal/daemon/daemon.go index bef1d5e2f..bcdf8dbec 100644 --- a/internal/daemon/daemon.go +++ b/internal/daemon/daemon.go @@ -25,6 +25,7 @@ import ( "github.com/samcharles93/archie-core/internal/domain/mapping" "github.com/samcharles93/archie-core/internal/domain/storecontract" "github.com/samcharles93/archie-core/internal/domain/workflow" + workflowtask "github.com/samcharles93/archie-core/internal/domain/workflow/task" "github.com/samcharles93/archie-core/internal/domain/workintake" "github.com/samcharles93/archie-core/internal/eventbus" "github.com/samcharles93/archie-core/internal/events" @@ -132,7 +133,17 @@ type Daemon struct { // NATS startup is mandatory (there is no broker-off execution mode), so // production composition always sets it. Nil appears only in tests and // is handled fail-closed at the publish/run sites. - Tasks TaskBus + Tasks TaskBus + // reactionConsumer is built lazily by drainReactions and kept for its + // lifetime drop counter. + reactionConsumer *reactionConsumer + // Reactions pulls the review-reaction fan-out stream + // (docs/prds/pr-review-remediation.md). Each cycle it is drained into + // queued remediate runs before the task drain, so a reaction can be + // claimed in the same pass that carried it. Optional: nil disables the + // reaction consumer (tests, or a deployment without the reaction + // stream). + Reactions ReactionSource WorktreeGrants WorktreeGrantIssuer // StateStoreGrants issues per-task State Store credentials for container // env (see containerEnv). Required whenever ConnectedStateStore.URL is @@ -487,6 +498,7 @@ func (d *Daemon) maintainAndDrain(ctx context.Context) { d.cleanupExpiredStorage(ctx) d.reconcilePRs(ctx) d.dispatchBindings(ctx) + d.drainReactions(ctx) if d.Tasks != nil { d.drainNATS(ctx) } @@ -561,6 +573,7 @@ func (d *Daemon) Cycle(ctx context.Context) { d.poll(ctx) d.reconcilePRs(ctx) d.dispatchBindings(ctx) + d.drainReactions(ctx) if d.Tasks != nil { d.drainNATS(ctx) } @@ -778,6 +791,40 @@ func (d *Daemon) resolveBindingRepo(b binding.Binding) (string, string, bool) { return "", "", false } +// drainReactions turns available review reactions into queued remediate +// runs. It runs before the task drain so a reaction queued in this pass can +// be claimed by it; the consumer is built lazily once, so its drop counter +// spans the process lifetime. +func (d *Daemon) drainReactions(ctx context.Context) { + if d.Reactions == nil || d.Store == nil { + return + } + if d.reactionConsumer == nil { + d.reactionConsumer = newReactionConsumer( + // The store's owned-PR lookup is the authorization boundary: a + // reaction only ever causes work against a PR archie opened and + // still owns (pr-review-remediation.md decision 3). + d.Store, + d.Store, + d.botUserForTask, + d.Log, + ) + } + if _, err := d.reactionConsumer.drain(ctx, d.Reactions, maxReactionsPerCycle); err != nil { + d.Log.Error("reaction drain failed", "err", err) + } +} + +// botUserForTask resolves the bot login that owns task, so the reaction +// consumer can exclude Archie's own comments. Identity-derived for +// multi-identity deployments, the global forge bot user otherwise. +func (d *Daemon) botUserForTask(task *workflowtask.Task) string { + if runner := d.identityFor(task); runner != nil { + return runner.Cfg.BotUser + } + return d.Cfg.Get().BotUser +} + // drainNATS processes tasks from NATS, falling back to SQLite ClaimNext for // requeued tasks (waiting_human approval, retry-parked) that didn't come // through a NATS publish. diff --git a/internal/daemon/reactions.go b/internal/daemon/reactions.go new file mode 100644 index 000000000..f2e9500b6 --- /dev/null +++ b/internal/daemon/reactions.go @@ -0,0 +1,234 @@ +package daemon + +import ( + "context" + "errors" + "fmt" + "log/slog" + + "github.com/samcharles93/archie-core/internal/domain/storecontract" + "github.com/samcharles93/archie-core/internal/domain/workflow" + workflowtask "github.com/samcharles93/archie-core/internal/domain/workflow/task" + "github.com/samcharles93/archie-core/internal/domain/workintake" + "github.com/samcharles93/archie-core/internal/eventbus" +) + +// ReactionSource is the pull surface the reaction consumer needs: fetch one +// message from the reaction stream, or eventbus.ErrNoMessage when it is +// drained. Narrow on purpose -- the consumer never publishes and never +// subscribes. +type ReactionSource interface { + Fetch(ctx context.Context) (eventbus.Message, error) +} + +// maxReactionsPerCycle bounds one drain pass. Reactions are row updates, not +// agent runs, but an unbounded drain could hold the dispatch loop hostage +// behind a burst; anything past the bound waits for the next cycle. +const maxReactionsPerCycle = 32 + +// remediableReviewStates are the review states a remediation unit addresses. +// approved is a decision-5 exclusion (recording, not remediating; merging +// stays an operator action) and dismissed is withdrawn feedback. +var remediableReviewStates = map[string]bool{ + "requested_changes": true, + "commented": true, +} + +// reactionConsumer turns forge review reactions on Archie-owned PRs into +// queued remediate runs. It implements the consumer half of +// docs/prds/pr-review-remediation.md decisions 3 and 5: resolve the PR to +// the task that owns it (the authorization boundary), never react to +// Archie's own comments, collect a review's comments into one unit while it +// is pending, and rely on the guarded store transition for dedup. +type reactionConsumer struct { + lookup workintake.ReviewTaskLookup + remediations storecontract.RemediationStarter + botUser func(*workflowtask.Task) string + log *slog.Logger + dropped int64 +} + +func newReactionConsumer( + lookup workintake.ReviewTaskLookup, + remediations storecontract.RemediationStarter, + botUser func(*workflowtask.Task) string, + log *slog.Logger, +) *reactionConsumer { + return &reactionConsumer{lookup: lookup, remediations: remediations, botUser: botUser, log: log} +} + +// drain fetches and handles reactions until the stream is idle or the +// per-cycle bound is reached, returning how many messages it handled. +func (c *reactionConsumer) drain(ctx context.Context, src ReactionSource, limit int) (int, error) { + handled := 0 + for handled < limit { + msg, err := src.Fetch(ctx) + if err != nil { + if errors.Is(err, eventbus.ErrNoMessage) { + return handled, nil + } + return handled, fmt.Errorf("fetch reaction: %w", err) + } + if ctx.Err() != nil { + return handled, ctx.Err() + } + c.handle(ctx, msg) + handled++ + } + return handled, nil +} + +// handle processes one reaction to a terminal outcome: Ack on every decided +// path (drop, dedup, or work queued), Nak only on a transient store failure +// the next delivery can succeed against. +func (c *reactionConsumer) handle(ctx context.Context, msg eventbus.Message) { + envelope, err := workintake.DecodeReviewComment(msg.Data()) + if err != nil { + c.log.Error("review reaction decode failed", "subject", msg.Subject(), "err", err) + _ = msg.Ack() // it will never decode on redelivery + return + } + + task, err := c.lookup.OpenTaskByPR(ctx, envelope.Owner, envelope.Repo, envelope.PRNumber) + if err != nil { + c.log.Error("review reaction lookup failed", "owner", envelope.Owner, "repo", envelope.Repo, "pr", envelope.PRNumber, "err", err) + _ = msg.Nak() + return + } + if task == nil { + // The resolver counts this: a reaction that does not resolve to a + // live task Archie owns is dropped, never work. + c.drop(msg, "no live task owns this PR") + return + } + if c.botUser(task) != "" && envelope.Author == c.botUser(task) { + // Decision 5: only Archie's own comments are excluded, so its + // ReplyToReview replies never retrigger it. Every other author -- + // human or bot -- is actionable. + c.drop(msg, "reaction is archie's own comment") + return + } + + switch envelope.Kind { + case workintake.ReviewReactionReview: + c.handleReview(ctx, msg, task, envelope) + case workintake.ReviewReactionComment: + c.handleComment(ctx, msg, task, envelope) + default: + c.drop(msg, "unknown reaction kind") + } +} + +func (c *reactionConsumer) handleReview(ctx context.Context, msg eventbus.Message, task *workflowtask.Task, e workintake.ReviewCommentEnvelope) { + if !remediableReviewStates[e.State] { + // approved: no remediation, and never auto-merge (decision 5). The + // review state is visible on the forge itself. + c.drop(msg, fmt.Sprintf("review state %q does not trigger remediation", e.State)) + return + } + + unit := workflow.ReviewUnit{ReviewID: e.ReviewID, Author: e.Author, State: e.State, Body: e.Body} + payload, err := workflow.EncodeReviewUnit(unit) + if err != nil { + c.log.Error("review unit encode failed", "task", task.ID, "err", err) + _ = msg.Nak() + return + } + if err := c.remediations.BeginRemediation(ctx, task.ID, payload); err != nil { + if errors.Is(err, storecontract.ErrStaleTransition) { + // Already queued or claimed: a re-delivered review, or a second + // reaction for a review whose unit is pending. The guarded + // transition is the dedup. + c.log.Debug("remediation already pending", "task", task.ID, "review", e.ReviewID) + _ = msg.Ack() + return + } + c.log.Error("BeginRemediation failed", "task", task.ID, "err", err) + _ = msg.Nak() + return + } + c.log.Info("review reaction queued a remediation", "task", task.ID, "pr", fmt.Sprintf("%s/%s#%d", e.Owner, e.Repo, e.PRNumber), "review", e.ReviewID, "state", e.State) + _ = msg.Ack() +} + +func (c *reactionConsumer) handleComment(ctx context.Context, msg eventbus.Message, task *workflowtask.Task, e workintake.ReviewCommentEnvelope) { + if e.ReviewID == 0 { + // Decision 5: a standalone comment with no parent review is its own + // unit of one. + unit := workflow.ReviewUnit{Comments: []workflow.ReviewUnitComment{{ + CommentID: e.CommentID, Path: e.Path, Line: e.Line, Body: e.Body, + }}} + payload, err := workflow.EncodeReviewUnit(unit) + if err != nil { + c.log.Error("review unit encode failed", "task", task.ID, "err", err) + _ = msg.Nak() + return + } + if err := c.remediations.BeginRemediation(ctx, task.ID, payload); err != nil { + if errors.Is(err, storecontract.ErrStaleTransition) { + _ = msg.Ack() + return + } + c.log.Error("BeginRemediation failed", "task", task.ID, "err", err) + _ = msg.Nak() + return + } + _ = msg.Ack() + return + } + + // A comment with a parent review is collected into that review's pending + // unit, never dispatched alone. Once the unit has been claimed, its input + // is frozen: a late comment is dropped, and the round cap bounds the + // exchange if the reviewer re-reviews. + if task.Status != workflow.StatusQueued || task.Workflow != "remediate" { + c.drop(msg, "parent review's unit is no longer pending") + return + } + unit, err := workflow.DecodeReviewUnit(task.ReviewPayload) + if err != nil { + if errors.Is(err, workflow.ErrNoReviewPayload) { + c.drop(msg, "queued remediation carries no review unit") + return + } + c.log.Error("review payload decode failed", "task", task.ID, "err", err) + _ = msg.Nak() + return + } + if unit.ReviewID != e.ReviewID { + c.drop(msg, "comment's parent review is not the pending unit") + return + } + for _, existing := range unit.Comments { + if existing.CommentID == e.CommentID { + _ = msg.Ack() // re-delivery of an already-collected comment + return + } + } + unit.Comments = append(unit.Comments, workflow.ReviewUnitComment{ + CommentID: e.CommentID, Path: e.Path, Line: e.Line, Body: e.Body, + }) + payload, err := workflow.EncodeReviewUnit(unit) + if err != nil { + c.log.Error("review unit encode failed", "task", task.ID, "err", err) + _ = msg.Nak() + return + } + if err := c.remediations.UpdateReviewPayload(ctx, task.ID, payload); err != nil { + if errors.Is(err, storecontract.ErrStaleTransition) { + // Claimed between the read and the write: the unit is frozen. + _ = msg.Ack() + return + } + c.log.Error("UpdateReviewPayload failed", "task", task.ID, "err", err) + _ = msg.Nak() + return + } + _ = msg.Ack() +} + +func (c *reactionConsumer) drop(msg eventbus.Message, reason string) { + c.dropped++ + c.log.Info("review reaction dropped", "subject", msg.Subject(), "reason", reason) + _ = msg.Ack() +} diff --git a/internal/daemon/reactions_test.go b/internal/daemon/reactions_test.go new file mode 100644 index 000000000..7e3782aa6 --- /dev/null +++ b/internal/daemon/reactions_test.go @@ -0,0 +1,367 @@ +package daemon + +import ( + "context" + "errors" + "log/slog" + "sync" + "testing" + + "github.com/samcharles93/archie-core/internal/domain/storecontract" + "github.com/samcharles93/archie-core/internal/domain/workflow" + workflowtask "github.com/samcharles93/archie-core/internal/domain/workflow/task" + "github.com/samcharles93/archie-core/internal/domain/workintake" + "github.com/samcharles93/archie-core/internal/eventbus" +) + +// ---- fakes ---- + +type fakeReactionSource struct { + mu sync.Mutex + pending []eventbus.Message + fetchErr error +} + +func (f *fakeReactionSource) Fetch(ctx context.Context) (eventbus.Message, error) { + f.mu.Lock() + defer f.mu.Unlock() + if f.fetchErr != nil { + return nil, f.fetchErr + } + if len(f.pending) == 0 { + return nil, eventbus.ErrNoMessage + } + m := f.pending[0] + f.pending = f.pending[1:] + return m, nil +} + +type fakeReactionMessage struct { + data []byte + subject string + mu sync.Mutex + acked bool + nakked bool +} + +func (m *fakeReactionMessage) Data() []byte { return m.data } +func (m *fakeReactionMessage) Subject() string { return m.subject } +func (m *fakeReactionMessage) Ack() error { + m.mu.Lock() + defer m.mu.Unlock() + m.acked = true + return nil +} + +func (m *fakeReactionMessage) Nak() error { + m.mu.Lock() + defer m.mu.Unlock() + m.nakked = true + return nil +} + +func (m *fakeReactionMessage) wasAcked() bool { + m.mu.Lock() + defer m.mu.Unlock() + return m.acked +} + +func (m *fakeReactionMessage) wasNakked() bool { + m.mu.Lock() + defer m.mu.Unlock() + return m.nakked +} + +type fakeRemediations struct { + begun []string // payloads handed to BeginRemediation, in order + updated []string + beginErr error +} + +func (f *fakeRemediations) BeginRemediation(ctx context.Context, taskID int64, payload string) error { + if f.beginErr != nil { + return f.beginErr + } + f.begun = append(f.begun, payload) + return nil +} + +func (f *fakeRemediations) UpdateReviewPayload(ctx context.Context, taskID int64, payload string) error { + f.updated = append(f.updated, payload) + return nil +} + +type fakeReviewLookup struct { + task *workflowtask.Task + err error + // sequence, when set, is consulted before task, so a test can model the + // store's fresh read per message (e.g. a unit that queued between two + // reactions). + sequence func(call int) (*workflowtask.Task, error) + calls int +} + +func (f *fakeReviewLookup) OpenTaskByPR(ctx context.Context, owner, repo string, number int) (*workflowtask.Task, error) { + f.calls++ + if f.sequence != nil { + return f.sequence(f.calls) + } + return f.task, f.err +} + +// ---- helpers ---- + +func reviewEnvelopeJSON(kind string, reviewID, commentID int64, author, state, body string) []byte { + e := workintake.ReviewCommentEnvelope{ + Owner: "acme", Repo: "widgets", PRNumber: 42, + Kind: workintake.ReviewReactionKind(kind), + ReviewID: reviewID, CommentID: commentID, + Author: author, State: state, Body: body, + } + data, err := e.Encode() + if err != nil { + panic(err) + } + return data +} + +func ownedTask(status, workflowName, payload string) *workflowtask.Task { + t := &workflowtask.Task{ + ID: 7, Owner: "acme", Repo: "widgets", PRNumber: 42, + Status: status, Workflow: workflowName, ReviewPayload: payload, + } + return t +} + +func newConsumer(task *workflowtask.Task, remediations *fakeRemediations) *reactionConsumer { + return newReactionConsumer( + &fakeReviewLookup{task: task}, + remediations, + func(*workflowtask.Task) string { return "archie-bot" }, + slog.New(slog.DiscardHandler), + ) +} + +// ---- tests ---- + +func TestReactionConsumerReviewEventStartsARemediation(t *testing.T) { + remediations := &fakeRemediations{} + c := newConsumer(ownedTask(workflowtask.StatusPROpen, "implement", ""), remediations) + msg := &fakeReactionMessage{data: reviewEnvelopeJSON("review", 7, 0, "alice", "requested_changes", "please fix x")} + + c.handle(context.Background(), msg) + + if len(remediations.begun) != 1 { + t.Fatalf("BeginRemediation calls = %d, want 1", len(remediations.begun)) + } + unit, err := workflow.DecodeReviewUnit(remediations.begun[0]) + if err != nil { + t.Fatal(err) + } + if unit.ReviewID != 7 || unit.State != "requested_changes" || unit.Body != "please fix x" { + t.Errorf("unit = %+v, want the review's own coordinates", unit) + } + if !msg.wasAcked() { + t.Error("message was not acked") + } +} + +func TestReactionConsumerApprovedReviewDoesNotRemediate(t *testing.T) { + remediations := &fakeRemediations{} + c := newConsumer(ownedTask(workflowtask.StatusPROpen, "implement", ""), remediations) + msg := &fakeReactionMessage{data: reviewEnvelopeJSON("review", 7, 0, "alice", "approved", "lgtm")} + + c.handle(context.Background(), msg) + + if len(remediations.begun) != 0 { + t.Errorf("BeginRemediation called for an approved review") + } + if !msg.wasAcked() { + t.Error("message was not acked") + } +} + +func TestReactionConsumerOwnCommentNeverRetriggers(t *testing.T) { + remediations := &fakeRemediations{} + c := newConsumer(ownedTask(workflowtask.StatusPROpen, "implement", ""), remediations) + msg := &fakeReactionMessage{data: reviewEnvelopeJSON("comment", 0, 9, "archie-bot", "", "my own reply")} + + c.handle(context.Background(), msg) + + if len(remediations.begun) != 0 || len(remediations.updated) != 0 { + t.Errorf("own comment triggered work: begun=%d updated=%d", len(remediations.begun), len(remediations.updated)) + } + if !msg.wasAcked() { + t.Error("message was not acked") + } +} + +func TestReactionConsumerCommentAppendsToThePendingUnitOfItsReview(t *testing.T) { + remediations := &fakeRemediations{} + pending := ownedTask(workflowtask.StatusQueued, "remediate", `{"review_id":7,"state":"requested_changes"}`) + c := newConsumer(pending, remediations) + msg := &fakeReactionMessage{data: reviewEnvelopeJSON("comment", 7, 9, "alice", "", "fix the loop")} + + c.handle(context.Background(), msg) + + if len(remediations.updated) != 1 { + t.Fatalf("UpdateReviewPayload calls = %d, want 1", len(remediations.updated)) + } + unit, err := workflow.DecodeReviewUnit(remediations.updated[0]) + if err != nil { + t.Fatal(err) + } + if unit.ReviewID != 7 || len(unit.Comments) != 1 || unit.Comments[0].CommentID != 9 { + t.Errorf("appended unit = %+v, want comment 9 under review 7", unit) + } + // The parent review's summary survives the append. + if unit.State != "requested_changes" { + t.Errorf("unit state = %q, want the parent review's state preserved", unit.State) + } + if !msg.wasAcked() { + t.Error("message was not acked") + } +} + +func TestReactionConsumerDuplicateCommentIsNotAppendedTwice(t *testing.T) { + remediations := &fakeRemediations{} + pending := ownedTask(workflowtask.StatusQueued, "remediate", `{"review_id":7,"comments":[{"comment_id":9,"body":"fix the loop"}]}`) + c := newConsumer(pending, remediations) + msg := &fakeReactionMessage{data: reviewEnvelopeJSON("comment", 7, 9, "alice", "", "fix the loop")} + + c.handle(context.Background(), msg) + + if len(remediations.updated) != 0 { + t.Errorf("UpdateReviewPayload called for a comment the unit already carries") + } + if !msg.wasAcked() { + t.Error("message was not acked") + } +} + +func TestReactionConsumerLateCommentAfterDispatchIsDropped(t *testing.T) { + remediations := &fakeRemediations{} + c := newConsumer(ownedTask(workflowtask.StatusPROpen, "implement", ""), remediations) + // A comment carrying a parent review id, but the task is not a queued + // remediation for it: the unit already dispatched. + msg := &fakeReactionMessage{data: reviewEnvelopeJSON("comment", 7, 9, "alice", "", "late comment")} + + c.handle(context.Background(), msg) + + if len(remediations.begun) != 0 || len(remediations.updated) != 0 { + t.Errorf("late comment mutated store state: begun=%d updated=%d", len(remediations.begun), len(remediations.updated)) + } + if !msg.wasAcked() { + t.Error("message was not acked") + } +} + +func TestReactionConsumerStandaloneCommentIsItsOwnUnit(t *testing.T) { + remediations := &fakeRemediations{} + c := newConsumer(ownedTask(workflowtask.StatusPROpen, "implement", ""), remediations) + msg := &fakeReactionMessage{data: reviewEnvelopeJSON("comment", 0, 12, "alice", "", "nit: rename")} + + c.handle(context.Background(), msg) + + if len(remediations.begun) != 1 { + t.Fatalf("BeginRemediation calls = %d, want 1", len(remediations.begun)) + } + unit, err := workflow.DecodeReviewUnit(remediations.begun[0]) + if err != nil { + t.Fatal(err) + } + if len(unit.Comments) != 1 || unit.Comments[0].CommentID != 12 { + t.Errorf("unit = %+v, want one standalone comment", unit) + } + if !msg.wasAcked() { + t.Error("message was not acked") + } +} + +func TestReactionConsumerUnresolvablePRIsDropped(t *testing.T) { + remediations := &fakeRemediations{} + // nil task: the PR does not belong to an archie-owned task. + c := newConsumer(nil, remediations) + msg := &fakeReactionMessage{data: reviewEnvelopeJSON("review", 7, 0, "alice", "requested_changes", "unrelated")} + + c.handle(context.Background(), msg) + + if len(remediations.begun) != 0 { + t.Errorf("reaction for a foreign PR started work") + } + if !msg.wasAcked() { + t.Error("message was not acked") + } +} + +func TestReactionConsumerInvalidEnvelopeIsAckedNotRedelivered(t *testing.T) { + remediations := &fakeRemediations{} + c := newConsumer(ownedTask(workflowtask.StatusPROpen, "implement", ""), remediations) + msg := &fakeReactionMessage{data: []byte(`{"owner":"acme"}`)} // no kind, no ids + + c.handle(context.Background(), msg) + + if len(remediations.begun) != 0 { + t.Errorf("invalid envelope started work") + } + if !msg.wasAcked() { + t.Error("message was not acked") + } +} + +func TestReactionConsumerTransientStoreErrorNaks(t *testing.T) { + remediations := &fakeRemediations{beginErr: errors.New("db unavailable")} + c := newConsumer(ownedTask(workflowtask.StatusPROpen, "implement", ""), remediations) + msg := &fakeReactionMessage{data: reviewEnvelopeJSON("review", 7, 0, "alice", "requested_changes", "please fix x")} + + c.handle(context.Background(), msg) + + if !msg.wasNakked() { + t.Error("transient failure was not nakked for redelivery") + } + if msg.wasAcked() { + t.Error("transient failure was acked") + } +} + +func TestReactionConsumerDrainsUntilIdle(t *testing.T) { + remediations := &fakeRemediations{} + // The lookup reads the row fresh per message: the review event queues the + // remediation, so the comment event resolves against the queued unit. + lookup := &fakeReviewLookup{sequence: func(call int) (*workflowtask.Task, error) { + if call == 1 { + return ownedTask(workflowtask.StatusPROpen, "implement", ""), nil + } + return ownedTask(workflowtask.StatusQueued, "remediate", `{"review_id":7,"state":"requested_changes","body":"one"}`), nil + }} + c := newReactionConsumer(lookup, remediations, func(*workflowtask.Task) string { return "archie-bot" }, slog.New(slog.DiscardHandler)) + src := &fakeReactionSource{pending: []eventbus.Message{ + &fakeReactionMessage{data: reviewEnvelopeJSON("review", 7, 0, "alice", "requested_changes", "one")}, + &fakeReactionMessage{data: reviewEnvelopeJSON("comment", 7, 8, "alice", "", "one-a")}, + }} + + n, err := c.drain(context.Background(), src, 8) + if err != nil { + t.Fatal(err) + } + if n != 2 { + t.Errorf("handled = %d, want 2", n) + } + // The review queued the unit; the comment appended to it. + if len(remediations.begun) != 1 || len(remediations.updated) != 1 { + t.Errorf("begun=%d updated=%d, want 1/1", len(remediations.begun), len(remediations.updated)) + } + unit, err := workflow.DecodeReviewUnit(remediations.updated[0]) + if err != nil { + t.Fatal(err) + } + if len(unit.Comments) != 1 || unit.Comments[0].CommentID != 8 { + t.Errorf("appended unit = %+v, want comment 8 collected under review 7", unit) + } +} + +// compile-time interface checks +var ( + _ workintake.ReviewTaskLookup = (*fakeReviewLookup)(nil) + _ storecontract.RemediationStarter = (*fakeRemediations)(nil) +) diff --git a/internal/domain/storecontract/storecontract.go b/internal/domain/storecontract/storecontract.go index d8c199887..a80f08760 100644 --- a/internal/domain/storecontract/storecontract.go +++ b/internal/domain/storecontract/storecontract.go @@ -36,6 +36,7 @@ type TaskStore interface { TaskQueries TaskArchiver TaskRetryer + RemediationStarter } // TaskLifecycle manages the core task state machine and enqueuing. @@ -66,6 +67,17 @@ type TaskRetryer interface { RetryTask(ctx context.Context, taskID int64, fromStatus, workflow string) error } +// RemediationStarter queues a review-triggered remediation for an +// Archie-owned open-PR task: one guarded transition that carries the +// JSON-encoded review unit in the same write, so a claimed remediation +// always has its input. UpdateReviewPayload appends late-arriving comments +// to a still-queued unit. Both guards are the reaction consumer's dedup and +// are documented in docs/prds/pr-review-remediation.md decisions 3 and 5. +type RemediationStarter interface { + BeginRemediation(ctx context.Context, taskID int64, payload string) error + UpdateReviewPayload(ctx context.Context, taskID int64, payload string) error +} + // TaskQueries groups read-only task accessors. type TaskQueries interface { TaskByIssue(ctx context.Context, owner, repo string, number int) (*task.Task, error) diff --git a/internal/infrastructure/staterpc/client.go b/internal/infrastructure/staterpc/client.go index 2bff29d64..c454f152d 100644 --- a/internal/infrastructure/staterpc/client.go +++ b/internal/infrastructure/staterpc/client.go @@ -134,6 +134,16 @@ func (c *Client) RetryTask(ctx context.Context, taskID int64, fromStatus, wf str return unmapError(err) } +func (c *Client) BeginRemediation(ctx context.Context, taskID int64, payload string) error { + _, err := c.client.BeginRemediation(ctx, &pb.BeginRemediationRequest{TaskId: taskID, Payload: payload}) + return unmapError(err) +} + +func (c *Client) UpdateReviewPayload(ctx context.Context, taskID int64, payload string) error { + _, err := c.client.UpdateReviewPayload(ctx, &pb.UpdateReviewPayloadRequest{TaskId: taskID, Payload: payload}) + return unmapError(err) +} + // Queries func (c *Client) TaskByIssue(ctx context.Context, owner, repo string, number int) (*task.Task, error) { diff --git a/internal/infrastructure/staterpc/conformance_test.go b/internal/infrastructure/staterpc/conformance_test.go index 7d4f22b1a..ee3cbdd67 100644 --- a/internal/infrastructure/staterpc/conformance_test.go +++ b/internal/infrastructure/staterpc/conformance_test.go @@ -172,6 +172,35 @@ func TestStateStoreConformance(t *testing.T) { t.Fatalf("Transition stale = %v, want ErrStaleTransition", err) } + // Remediation starter: the guarded transition carries the review + // unit, and both guards are the wire contract (the sentinel must + // survive the hop for the reaction consumer's dedup to work). + if err := c.Transition(ctx, task.ID, "running", "pr_open", "PR opened"); err != nil { + t.Fatalf("Transition to pr_open: %v", err) + } + if err := c.BeginRemediation(ctx, task.ID, `{"review_id":7}`); err != nil { + t.Fatalf("BeginRemediation: %v", err) + } + if err := c.BeginRemediation(ctx, task.ID, `{"review_id":7}`); !errors.Is(err, store.ErrStaleTransition) { + t.Fatalf("BeginRemediation stale = %v, want ErrStaleTransition", err) + } + remediated, err := c.TaskByID(ctx, task.ID) + if err != nil || remediated == nil { + t.Fatalf("TaskByID after BeginRemediation: %+v %v", remediated, err) + } + if remediated.Status != "queued" || remediated.Workflow != "remediate" || remediated.ReviewPayload != `{"review_id":7}` { + t.Fatalf("BeginRemediation row = status:%q workflow:%q payload:%q", remediated.Status, remediated.Workflow, remediated.ReviewPayload) + } + if err := c.UpdateReviewPayload(ctx, task.ID, `{"review_id":7,"comments":[{"comment_id":9}]}`); err != nil { + t.Fatalf("UpdateReviewPayload: %v", err) + } + if err := c.Transition(ctx, task.ID, "queued", "running", "claimed"); err != nil { + t.Fatalf("claim: %v", err) + } + if err := c.UpdateReviewPayload(ctx, task.ID, `{}`); !errors.Is(err, store.ErrStaleTransition) { + t.Fatalf("UpdateReviewPayload stale = %v, want ErrStaleTransition", err) + } + // TaskQueries: found=false is not an error. missing, err := c.TaskByID(ctx, task.ID+999999) if err != nil || missing != nil { diff --git a/internal/infrastructure/staterpc/server.go b/internal/infrastructure/staterpc/server.go index 68b93a3c3..84f1c5a58 100644 --- a/internal/infrastructure/staterpc/server.go +++ b/internal/infrastructure/staterpc/server.go @@ -202,6 +202,20 @@ func (s *server) RetryTask(ctx context.Context, r *pb.RetryTaskRequest) (*pb.Ret return &pb.RetryTaskResponse{}, nil } +func (s *server) BeginRemediation(ctx context.Context, r *pb.BeginRemediationRequest) (*pb.BeginRemediationResponse, error) { + if err := s.deps.Tasks.BeginRemediation(ctx, r.TaskId, r.Payload); err != nil { + return nil, s.logErr("BeginRemediation", err) + } + return &pb.BeginRemediationResponse{}, nil +} + +func (s *server) UpdateReviewPayload(ctx context.Context, r *pb.UpdateReviewPayloadRequest) (*pb.UpdateReviewPayloadResponse, error) { + if err := s.deps.Tasks.UpdateReviewPayload(ctx, r.TaskId, r.Payload); err != nil { + return nil, s.logErr("UpdateReviewPayload", err) + } + return &pb.UpdateReviewPayloadResponse{}, nil +} + // Queries func (s *server) TaskByIssue(ctx context.Context, r *pb.TaskByIssueRequest) (*pb.TaskByIssueResponse, error) { diff --git a/internal/store/remediation_test.go b/internal/store/remediation_test.go new file mode 100644 index 000000000..22907257d --- /dev/null +++ b/internal/store/remediation_test.go @@ -0,0 +1,109 @@ +package store + +import ( + "errors" + "testing" + + "github.com/samcharles93/archie-core/internal/domain/workflow" +) + +// prOpenTask inserts a task and walks it to the state a reaction resolves +// against: the task opened its PR and is idle waiting for review. +func prOpenTask(t *testing.T, s *Store, owner, repo string, prNumber int) int64 { + t.Helper() + ok, err := s.EnqueueIssue(t.Context(), owner, repo, 1, "title", "body", "", "") + if err != nil { + t.Fatal(err) + } + if !ok { + t.Fatal("enqueue: task already tracked") + } + task, err := s.TaskByIssue(t.Context(), owner, repo, 1) + if err != nil || task == nil { + t.Fatalf("TaskByIssue = (%v, %v)", task, err) + } + task.PRNumber = prNumber + task.Status = workflow.StatusPROpen + if err := s.Transition(t.Context(), task.ID, workflow.StatusQueued, workflow.StatusPROpen, "PR opened"); err != nil { + t.Fatal(err) + } + if err := s.Update(t.Context(), task); err != nil { + t.Fatal(err) + } + return task.ID +} + +func TestBeginRemediationMovesAnOpenPRTaskToQueuedRemediate(t *testing.T) { + s := openTest(t) + id := prOpenTask(t, s, "acme", "widgets", 42) + + if err := s.BeginRemediation(t.Context(), id, `{"review_id":7}`); err != nil { + t.Fatalf("BeginRemediation: %v", err) + } + got, err := s.TaskByID(t.Context(), id) + if err != nil { + t.Fatal(err) + } + if got.Status != workflow.StatusQueued { + t.Errorf("status = %q, want queued", got.Status) + } + if got.Workflow != "remediate" { + t.Errorf("workflow = %q, want remediate", got.Workflow) + } + if got.ReviewPayload != `{"review_id":7}` { + t.Errorf("review_payload = %q, want the carried unit", got.ReviewPayload) + } + if got.ParkReason != "" || got.Stage != "" { + t.Errorf("park_reason/stage = %q/%q, want both empty", got.ParkReason, got.Stage) + } +} + +func TestBeginRemediationRefusesAnAlreadyClaimedTask(t *testing.T) { + s := openTest(t) + id := prOpenTask(t, s, "acme", "widgets", 42) + if err := s.BeginRemediation(t.Context(), id, `{"review_id":7}`); err != nil { + t.Fatal(err) + } + if err := s.BeginRemediation(t.Context(), id, `{"review_id":7}`); !errors.Is(err, ErrStaleTransition) { + t.Errorf("second BeginRemediation err = %v, want ErrStaleTransition", err) + } +} + +func TestBeginRemediationRefusesNonOpenPRStatuses(t *testing.T) { + s := openTest(t) + id := prOpenTask(t, s, "acme", "widgets", 42) + if err := s.Transition(t.Context(), id, workflow.StatusPROpen, workflow.StatusParked, "gate failed"); err != nil { + t.Fatal(err) + } + if err := s.BeginRemediation(t.Context(), id, `{"review_id":7}`); !errors.Is(err, ErrStaleTransition) { + t.Errorf("BeginRemediation on parked err = %v, want ErrStaleTransition", err) + } +} + +func TestUpdateReviewPayloadAppendsOnlyWhileARemediationIsQueued(t *testing.T) { + s := openTest(t) + id := prOpenTask(t, s, "acme", "widgets", 42) + if err := s.BeginRemediation(t.Context(), id, `{"review_id":7}`); err != nil { + t.Fatal(err) + } + + if err := s.UpdateReviewPayload(t.Context(), id, `{"review_id":7,"comments":[{"comment_id":9}]}`); err != nil { + t.Fatalf("UpdateReviewPayload while queued: %v", err) + } + got, err := s.TaskByID(t.Context(), id) + if err != nil { + t.Fatal(err) + } + if got.ReviewPayload != `{"review_id":7,"comments":[{"comment_id":9}]}` { + t.Errorf("review_payload = %q, want the appended unit", got.ReviewPayload) + } + + // Claim the task: the remediation is running, and a payload written under + // it would race the builder's input. + if _, err := s.ClaimNext(t.Context()); err != nil { + t.Fatal(err) + } + if err := s.UpdateReviewPayload(t.Context(), id, `{"review_id":7,"comments":[{"comment_id":10}]}`); !errors.Is(err, ErrStaleTransition) { + t.Errorf("UpdateReviewPayload while running err = %v, want ErrStaleTransition", err) + } +} diff --git a/internal/store/store.go b/internal/store/store.go index e307d6a2b..6b432826f 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -526,6 +526,66 @@ func (s *Store) Update(ctx context.Context, t *workflow.Task) error { return err } +// BeginRemediation transitions an Archie-owned open-PR task into a queued +// remediate run carrying the JSON-encoded review unit. The guarded update is +// the reaction consumer's dedup: a re-delivered reaction, or a second +// consumer racing the first, fails the status guard instead of starting a +// second round. The unit is written in the same transaction, so a task can +// never be claimed into a remediate run whose payload has not landed. +func (s *Store) BeginRemediation(ctx context.Context, taskID int64, payload string) error { + tx, err := s.db.BeginTx(ctx, nil) + if err != nil { + return err + } + defer func() { _ = tx.Rollback() }() + + res, err := tx.ExecContext(ctx, ` + UPDATE tasks SET status=?, workflow=?, stage='', park_reason='', review_payload=?, + updated_at=datetime('now') + WHERE id=? AND status=?`, workflow.StatusQueued, "remediate", clip(payload, 4000), taskID, workflow.StatusPROpen) + if err != nil { + return err + } + n, err := res.RowsAffected() + if err != nil { + return err + } + if n == 0 { + return ErrStaleTransition + } + + if _, err := tx.ExecContext(ctx, + `INSERT INTO transitions (task_id, from_status, to_status, detail) VALUES (?, ?, ?, ?)`, + taskID, workflow.StatusPROpen, workflow.StatusQueued, "review reaction queued remediation"); err != nil { + return err + } + + return tx.Commit() +} + +// UpdateReviewPayload replaces a queued remediation's review unit: the +// reaction consumer appends late-arriving comments of the same review while +// the unit is still pending. The guarded update is the boundary — once a +// run is claimed, its input is frozen; a late comment is dropped by the +// caller rather than racing the builder's mission. +func (s *Store) UpdateReviewPayload(ctx context.Context, taskID int64, payload string) error { + res, err := s.db.ExecContext(ctx, ` + UPDATE tasks SET review_payload=?, updated_at=datetime('now') + WHERE id=? AND status=? AND workflow=?`, + clip(payload, 4000), taskID, workflow.StatusQueued, "remediate") + if err != nil { + return err + } + n, err := res.RowsAffected() + if err != nil { + return err + } + if n == 0 { + return ErrStaleTransition + } + return nil +} + // TaskByIssue returns the task tracking an issue, or nil. func (s *Store) TaskByIssue(ctx context.Context, owner, repo string, number int) (*workflow.Task, error) { row := s.db.QueryRowContext(ctx, ` diff --git a/proto/state/v1/state.proto b/proto/state/v1/state.proto index 69b40a9c4..366acf715 100644 --- a/proto/state/v1/state.proto +++ b/proto/state/v1/state.proto @@ -41,6 +41,8 @@ service StateStoreService { // Archive / Retry rpc ArchiveTask(ArchiveTaskRequest) returns (ArchiveTaskResponse); rpc RetryTask(RetryTaskRequest) returns (RetryTaskResponse); + rpc BeginRemediation(BeginRemediationRequest) returns (BeginRemediationResponse); + rpc UpdateReviewPayload(UpdateReviewPayloadRequest) returns (UpdateReviewPayloadResponse); // Queries rpc TaskByIssue(TaskByIssueRequest) returns (TaskByIssueResponse); @@ -428,6 +430,18 @@ message RetryTaskRequest { } message RetryTaskResponse {} +message BeginRemediationRequest { + int64 task_id = 1; + string payload = 2; +} +message BeginRemediationResponse {} + +message UpdateReviewPayloadRequest { + int64 task_id = 1; + string payload = 2; +} +message UpdateReviewPayloadResponse {} + message TaskByIssueRequest { string owner = 1; string repo = 2;