From 6aff1ec712ceb453b36f8fb111110a06ab576e6b Mon Sep 17 00:00:00 2001 From: Jonathan Haas Date: Wed, 15 Apr 2026 11:07:40 -0700 Subject: [PATCH] feat: add governance action context --- contract_test.go | 15 + gen/go/governance/v1/governance.pb.go | 357 +++++++++++------- gen/python/governance/v1/governance_pb2.py | 100 ++--- gen/ts/governance/v1/governance_pb.ts | 89 +++-- proto/governance/v1/governance.proto | 10 + .../v1/testdata/evaluate_action_request.json | 9 +- 6 files changed, 382 insertions(+), 198 deletions(-) diff --git a/contract_test.go b/contract_test.go index ef00cfa..855282f 100644 --- a/contract_test.go +++ b/contract_test.go @@ -942,6 +942,21 @@ func TestGovernanceEvaluateActionFixtureMatchesProtoContract(t *testing.T) { if string(message.GetActionPayload()) != `{"credential":"sk-live-123","target":"slack"}` { t.Fatalf("unexpected action_payload %q", string(message.GetActionPayload())) } + if message.GetContext().GetRecordCount() != 1 { + t.Fatalf("expected record_count 1, got %d", message.GetContext().GetRecordCount()) + } + if message.GetContext().GetCurrencyAmount() != 250000 { + t.Fatalf("expected currency_amount 250000, got %v", message.GetContext().GetCurrencyAmount()) + } + if message.GetContext().GetCurrencyCode() != "USD" { + t.Fatalf("expected currency_code USD, got %q", message.GetContext().GetCurrencyCode()) + } + if message.GetContext().GetEnvironment() != "production" { + t.Fatalf("expected environment production, got %q", message.GetContext().GetEnvironment()) + } + if message.GetContext().GetDataClassification() != "restricted" { + t.Fatalf("expected data_classification restricted, got %q", message.GetContext().GetDataClassification()) + } } func TestKeysResolveProviderRefFixtureMatchesProtoContract(t *testing.T) { diff --git a/gen/go/governance/v1/governance.pb.go b/gen/go/governance/v1/governance.pb.go index db8e708..a5d8f4b 100644 --- a/gen/go/governance/v1/governance.pb.go +++ b/gen/go/governance/v1/governance.pb.go @@ -698,19 +698,96 @@ func (x *SafetyRule) GetDescription() string { return "" } +type ActionContext struct { + state protoimpl.MessageState `protogen:"open.v1"` + RecordCount int64 `protobuf:"varint,1,opt,name=record_count,json=recordCount,proto3" json:"record_count,omitempty"` + CurrencyAmount float64 `protobuf:"fixed64,2,opt,name=currency_amount,json=currencyAmount,proto3" json:"currency_amount,omitempty"` + CurrencyCode string `protobuf:"bytes,3,opt,name=currency_code,json=currencyCode,proto3" json:"currency_code,omitempty"` + Environment string `protobuf:"bytes,4,opt,name=environment,proto3" json:"environment,omitempty"` + DataClassification string `protobuf:"bytes,5,opt,name=data_classification,json=dataClassification,proto3" json:"data_classification,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ActionContext) Reset() { + *x = ActionContext{} + mi := &file_governance_v1_governance_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ActionContext) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ActionContext) ProtoMessage() {} + +func (x *ActionContext) ProtoReflect() protoreflect.Message { + mi := &file_governance_v1_governance_proto_msgTypes[7] + 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 ActionContext.ProtoReflect.Descriptor instead. +func (*ActionContext) Descriptor() ([]byte, []int) { + return file_governance_v1_governance_proto_rawDescGZIP(), []int{7} +} + +func (x *ActionContext) GetRecordCount() int64 { + if x != nil { + return x.RecordCount + } + return 0 +} + +func (x *ActionContext) GetCurrencyAmount() float64 { + if x != nil { + return x.CurrencyAmount + } + return 0 +} + +func (x *ActionContext) GetCurrencyCode() string { + if x != nil { + return x.CurrencyCode + } + return "" +} + +func (x *ActionContext) GetEnvironment() string { + if x != nil { + return x.Environment + } + return "" +} + +func (x *ActionContext) GetDataClassification() string { + if x != nil { + return x.DataClassification + } + return "" +} + type EvaluateActionRequest struct { state protoimpl.MessageState `protogen:"open.v1"` WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` AgentId string `protobuf:"bytes,2,opt,name=agent_id,json=agentId,proto3" json:"agent_id,omitempty"` ActionType string `protobuf:"bytes,3,opt,name=action_type,json=actionType,proto3" json:"action_type,omitempty"` ActionPayload []byte `protobuf:"bytes,4,opt,name=action_payload,json=actionPayload,proto3" json:"action_payload,omitempty"` + Context *ActionContext `protobuf:"bytes,5,opt,name=context,proto3" json:"context,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *EvaluateActionRequest) Reset() { *x = EvaluateActionRequest{} - mi := &file_governance_v1_governance_proto_msgTypes[7] + mi := &file_governance_v1_governance_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -722,7 +799,7 @@ func (x *EvaluateActionRequest) String() string { func (*EvaluateActionRequest) ProtoMessage() {} func (x *EvaluateActionRequest) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[7] + mi := &file_governance_v1_governance_proto_msgTypes[8] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -735,7 +812,7 @@ func (x *EvaluateActionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use EvaluateActionRequest.ProtoReflect.Descriptor instead. func (*EvaluateActionRequest) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{7} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{8} } func (x *EvaluateActionRequest) GetWorkspaceId() string { @@ -766,6 +843,13 @@ func (x *EvaluateActionRequest) GetActionPayload() []byte { return nil } +func (x *EvaluateActionRequest) GetContext() *ActionContext { + if x != nil { + return x.Context + } + return nil +} + type EvaluateActionResponse struct { state protoimpl.MessageState `protogen:"open.v1"` Evaluation *ActionEvaluation `protobuf:"bytes,1,opt,name=evaluation,proto3" json:"evaluation,omitempty"` @@ -775,7 +859,7 @@ type EvaluateActionResponse struct { func (x *EvaluateActionResponse) Reset() { *x = EvaluateActionResponse{} - mi := &file_governance_v1_governance_proto_msgTypes[8] + mi := &file_governance_v1_governance_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -787,7 +871,7 @@ func (x *EvaluateActionResponse) String() string { func (*EvaluateActionResponse) ProtoMessage() {} func (x *EvaluateActionResponse) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[8] + mi := &file_governance_v1_governance_proto_msgTypes[9] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -800,7 +884,7 @@ func (x *EvaluateActionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use EvaluateActionResponse.ProtoReflect.Descriptor instead. func (*EvaluateActionResponse) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{8} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{9} } func (x *EvaluateActionResponse) GetEvaluation() *ActionEvaluation { @@ -820,7 +904,7 @@ type DetectPIIRequest struct { func (x *DetectPIIRequest) Reset() { *x = DetectPIIRequest{} - mi := &file_governance_v1_governance_proto_msgTypes[9] + mi := &file_governance_v1_governance_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -832,7 +916,7 @@ func (x *DetectPIIRequest) String() string { func (*DetectPIIRequest) ProtoMessage() {} func (x *DetectPIIRequest) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[9] + mi := &file_governance_v1_governance_proto_msgTypes[10] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -845,7 +929,7 @@ func (x *DetectPIIRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use DetectPIIRequest.ProtoReflect.Descriptor instead. func (*DetectPIIRequest) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{9} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{10} } func (x *DetectPIIRequest) GetText() string { @@ -871,7 +955,7 @@ type DetectPIIResponse struct { func (x *DetectPIIResponse) Reset() { *x = DetectPIIResponse{} - mi := &file_governance_v1_governance_proto_msgTypes[10] + mi := &file_governance_v1_governance_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -883,7 +967,7 @@ func (x *DetectPIIResponse) String() string { func (*DetectPIIResponse) ProtoMessage() {} func (x *DetectPIIResponse) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[10] + mi := &file_governance_v1_governance_proto_msgTypes[11] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -896,7 +980,7 @@ func (x *DetectPIIResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use DetectPIIResponse.ProtoReflect.Descriptor instead. func (*DetectPIIResponse) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{10} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{11} } func (x *DetectPIIResponse) GetResult() *PIIDetectionResult { @@ -911,13 +995,14 @@ type ClassifyRiskRequest struct { WorkspaceId string `protobuf:"bytes,1,opt,name=workspace_id,json=workspaceId,proto3" json:"workspace_id,omitempty"` ActionType string `protobuf:"bytes,2,opt,name=action_type,json=actionType,proto3" json:"action_type,omitempty"` ActionPayload []byte `protobuf:"bytes,3,opt,name=action_payload,json=actionPayload,proto3" json:"action_payload,omitempty"` + Context *ActionContext `protobuf:"bytes,4,opt,name=context,proto3" json:"context,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ClassifyRiskRequest) Reset() { *x = ClassifyRiskRequest{} - mi := &file_governance_v1_governance_proto_msgTypes[11] + mi := &file_governance_v1_governance_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -929,7 +1014,7 @@ func (x *ClassifyRiskRequest) String() string { func (*ClassifyRiskRequest) ProtoMessage() {} func (x *ClassifyRiskRequest) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[11] + mi := &file_governance_v1_governance_proto_msgTypes[12] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -942,7 +1027,7 @@ func (x *ClassifyRiskRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ClassifyRiskRequest.ProtoReflect.Descriptor instead. func (*ClassifyRiskRequest) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{11} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{12} } func (x *ClassifyRiskRequest) GetWorkspaceId() string { @@ -966,6 +1051,13 @@ func (x *ClassifyRiskRequest) GetActionPayload() []byte { return nil } +func (x *ClassifyRiskRequest) GetContext() *ActionContext { + if x != nil { + return x.Context + } + return nil +} + type ClassifyRiskResponse struct { state protoimpl.MessageState `protogen:"open.v1"` RiskLevel RiskLevel `protobuf:"varint,1,opt,name=risk_level,json=riskLevel,proto3,enum=governance.v1.RiskLevel" json:"risk_level,omitempty"` @@ -976,7 +1068,7 @@ type ClassifyRiskResponse struct { func (x *ClassifyRiskResponse) Reset() { *x = ClassifyRiskResponse{} - mi := &file_governance_v1_governance_proto_msgTypes[12] + mi := &file_governance_v1_governance_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -988,7 +1080,7 @@ func (x *ClassifyRiskResponse) String() string { func (*ClassifyRiskResponse) ProtoMessage() {} func (x *ClassifyRiskResponse) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[12] + mi := &file_governance_v1_governance_proto_msgTypes[13] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1001,7 +1093,7 @@ func (x *ClassifyRiskResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ClassifyRiskResponse.ProtoReflect.Descriptor instead. func (*ClassifyRiskResponse) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{12} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{13} } func (x *ClassifyRiskResponse) GetRiskLevel() RiskLevel { @@ -1027,7 +1119,7 @@ type CheckCredentialExposureRequest struct { func (x *CheckCredentialExposureRequest) Reset() { *x = CheckCredentialExposureRequest{} - mi := &file_governance_v1_governance_proto_msgTypes[13] + mi := &file_governance_v1_governance_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1039,7 +1131,7 @@ func (x *CheckCredentialExposureRequest) String() string { func (*CheckCredentialExposureRequest) ProtoMessage() {} func (x *CheckCredentialExposureRequest) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[13] + mi := &file_governance_v1_governance_proto_msgTypes[14] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1052,7 +1144,7 @@ func (x *CheckCredentialExposureRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckCredentialExposureRequest.ProtoReflect.Descriptor instead. func (*CheckCredentialExposureRequest) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{13} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{14} } func (x *CheckCredentialExposureRequest) GetText() string { @@ -1073,7 +1165,7 @@ type CheckCredentialExposureResponse struct { func (x *CheckCredentialExposureResponse) Reset() { *x = CheckCredentialExposureResponse{} - mi := &file_governance_v1_governance_proto_msgTypes[14] + mi := &file_governance_v1_governance_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1085,7 +1177,7 @@ func (x *CheckCredentialExposureResponse) String() string { func (*CheckCredentialExposureResponse) ProtoMessage() {} func (x *CheckCredentialExposureResponse) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[14] + mi := &file_governance_v1_governance_proto_msgTypes[15] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1098,7 +1190,7 @@ func (x *CheckCredentialExposureResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckCredentialExposureResponse.ProtoReflect.Descriptor instead. func (*CheckCredentialExposureResponse) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{14} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{15} } func (x *CheckCredentialExposureResponse) GetExposed() bool { @@ -1131,7 +1223,7 @@ type GetRetentionPolicyRequest struct { func (x *GetRetentionPolicyRequest) Reset() { *x = GetRetentionPolicyRequest{} - mi := &file_governance_v1_governance_proto_msgTypes[15] + mi := &file_governance_v1_governance_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1143,7 +1235,7 @@ func (x *GetRetentionPolicyRequest) String() string { func (*GetRetentionPolicyRequest) ProtoMessage() {} func (x *GetRetentionPolicyRequest) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[15] + mi := &file_governance_v1_governance_proto_msgTypes[16] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1156,7 +1248,7 @@ func (x *GetRetentionPolicyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRetentionPolicyRequest.ProtoReflect.Descriptor instead. func (*GetRetentionPolicyRequest) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{15} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{16} } func (x *GetRetentionPolicyRequest) GetWorkspaceId() string { @@ -1175,7 +1267,7 @@ type GetRetentionPolicyResponse struct { func (x *GetRetentionPolicyResponse) Reset() { *x = GetRetentionPolicyResponse{} - mi := &file_governance_v1_governance_proto_msgTypes[16] + mi := &file_governance_v1_governance_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1187,7 +1279,7 @@ func (x *GetRetentionPolicyResponse) String() string { func (*GetRetentionPolicyResponse) ProtoMessage() {} func (x *GetRetentionPolicyResponse) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[16] + mi := &file_governance_v1_governance_proto_msgTypes[17] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1200,7 +1292,7 @@ func (x *GetRetentionPolicyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRetentionPolicyResponse.ProtoReflect.Descriptor instead. func (*GetRetentionPolicyResponse) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{16} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{17} } func (x *GetRetentionPolicyResponse) GetPolicy() *RetentionPolicy { @@ -1219,7 +1311,7 @@ type SetRetentionPolicyRequest struct { func (x *SetRetentionPolicyRequest) Reset() { *x = SetRetentionPolicyRequest{} - mi := &file_governance_v1_governance_proto_msgTypes[17] + mi := &file_governance_v1_governance_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1231,7 +1323,7 @@ func (x *SetRetentionPolicyRequest) String() string { func (*SetRetentionPolicyRequest) ProtoMessage() {} func (x *SetRetentionPolicyRequest) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[17] + mi := &file_governance_v1_governance_proto_msgTypes[18] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1244,7 +1336,7 @@ func (x *SetRetentionPolicyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetRetentionPolicyRequest.ProtoReflect.Descriptor instead. func (*SetRetentionPolicyRequest) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{17} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{18} } func (x *SetRetentionPolicyRequest) GetPolicy() *RetentionPolicy { @@ -1263,7 +1355,7 @@ type SetRetentionPolicyResponse struct { func (x *SetRetentionPolicyResponse) Reset() { *x = SetRetentionPolicyResponse{} - mi := &file_governance_v1_governance_proto_msgTypes[18] + mi := &file_governance_v1_governance_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1275,7 +1367,7 @@ func (x *SetRetentionPolicyResponse) String() string { func (*SetRetentionPolicyResponse) ProtoMessage() {} func (x *SetRetentionPolicyResponse) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[18] + mi := &file_governance_v1_governance_proto_msgTypes[19] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1288,7 +1380,7 @@ func (x *SetRetentionPolicyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetRetentionPolicyResponse.ProtoReflect.Descriptor instead. func (*SetRetentionPolicyResponse) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{18} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{19} } func (x *SetRetentionPolicyResponse) GetPolicy() *RetentionPolicy { @@ -1308,7 +1400,7 @@ type CheckLegalHoldRequest struct { func (x *CheckLegalHoldRequest) Reset() { *x = CheckLegalHoldRequest{} - mi := &file_governance_v1_governance_proto_msgTypes[19] + mi := &file_governance_v1_governance_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1320,7 +1412,7 @@ func (x *CheckLegalHoldRequest) String() string { func (*CheckLegalHoldRequest) ProtoMessage() {} func (x *CheckLegalHoldRequest) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[19] + mi := &file_governance_v1_governance_proto_msgTypes[20] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1333,7 +1425,7 @@ func (x *CheckLegalHoldRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckLegalHoldRequest.ProtoReflect.Descriptor instead. func (*CheckLegalHoldRequest) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{19} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{20} } func (x *CheckLegalHoldRequest) GetWorkspaceId() string { @@ -1360,7 +1452,7 @@ type CheckLegalHoldResponse struct { func (x *CheckLegalHoldResponse) Reset() { *x = CheckLegalHoldResponse{} - mi := &file_governance_v1_governance_proto_msgTypes[20] + mi := &file_governance_v1_governance_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1372,7 +1464,7 @@ func (x *CheckLegalHoldResponse) String() string { func (*CheckLegalHoldResponse) ProtoMessage() {} func (x *CheckLegalHoldResponse) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[20] + mi := &file_governance_v1_governance_proto_msgTypes[21] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1385,7 +1477,7 @@ func (x *CheckLegalHoldResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use CheckLegalHoldResponse.ProtoReflect.Descriptor instead. func (*CheckLegalHoldResponse) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{20} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{21} } func (x *CheckLegalHoldResponse) GetHeld() bool { @@ -1411,7 +1503,7 @@ type SetLegalHoldRequest struct { func (x *SetLegalHoldRequest) Reset() { *x = SetLegalHoldRequest{} - mi := &file_governance_v1_governance_proto_msgTypes[21] + mi := &file_governance_v1_governance_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1423,7 +1515,7 @@ func (x *SetLegalHoldRequest) String() string { func (*SetLegalHoldRequest) ProtoMessage() {} func (x *SetLegalHoldRequest) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[21] + mi := &file_governance_v1_governance_proto_msgTypes[22] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1436,7 +1528,7 @@ func (x *SetLegalHoldRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetLegalHoldRequest.ProtoReflect.Descriptor instead. func (*SetLegalHoldRequest) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{21} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{22} } func (x *SetLegalHoldRequest) GetHold() *LegalHold { @@ -1455,7 +1547,7 @@ type SetLegalHoldResponse struct { func (x *SetLegalHoldResponse) Reset() { *x = SetLegalHoldResponse{} - mi := &file_governance_v1_governance_proto_msgTypes[22] + mi := &file_governance_v1_governance_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1467,7 +1559,7 @@ func (x *SetLegalHoldResponse) String() string { func (*SetLegalHoldResponse) ProtoMessage() {} func (x *SetLegalHoldResponse) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[22] + mi := &file_governance_v1_governance_proto_msgTypes[23] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1480,7 +1572,7 @@ func (x *SetLegalHoldResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetLegalHoldResponse.ProtoReflect.Descriptor instead. func (*SetLegalHoldResponse) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{22} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{23} } func (x *SetLegalHoldResponse) GetHold() *LegalHold { @@ -1499,7 +1591,7 @@ type GetSafetyPolicyRequest struct { func (x *GetSafetyPolicyRequest) Reset() { *x = GetSafetyPolicyRequest{} - mi := &file_governance_v1_governance_proto_msgTypes[23] + mi := &file_governance_v1_governance_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1511,7 +1603,7 @@ func (x *GetSafetyPolicyRequest) String() string { func (*GetSafetyPolicyRequest) ProtoMessage() {} func (x *GetSafetyPolicyRequest) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[23] + mi := &file_governance_v1_governance_proto_msgTypes[24] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1524,7 +1616,7 @@ func (x *GetSafetyPolicyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSafetyPolicyRequest.ProtoReflect.Descriptor instead. func (*GetSafetyPolicyRequest) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{23} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{24} } func (x *GetSafetyPolicyRequest) GetWorkspaceId() string { @@ -1543,7 +1635,7 @@ type GetSafetyPolicyResponse struct { func (x *GetSafetyPolicyResponse) Reset() { *x = GetSafetyPolicyResponse{} - mi := &file_governance_v1_governance_proto_msgTypes[24] + mi := &file_governance_v1_governance_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1555,7 +1647,7 @@ func (x *GetSafetyPolicyResponse) String() string { func (*GetSafetyPolicyResponse) ProtoMessage() {} func (x *GetSafetyPolicyResponse) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[24] + mi := &file_governance_v1_governance_proto_msgTypes[25] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1568,7 +1660,7 @@ func (x *GetSafetyPolicyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetSafetyPolicyResponse.ProtoReflect.Descriptor instead. func (*GetSafetyPolicyResponse) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{24} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{25} } func (x *GetSafetyPolicyResponse) GetPolicy() *SafetyPolicy { @@ -1587,7 +1679,7 @@ type SetSafetyPolicyRequest struct { func (x *SetSafetyPolicyRequest) Reset() { *x = SetSafetyPolicyRequest{} - mi := &file_governance_v1_governance_proto_msgTypes[25] + mi := &file_governance_v1_governance_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1599,7 +1691,7 @@ func (x *SetSafetyPolicyRequest) String() string { func (*SetSafetyPolicyRequest) ProtoMessage() {} func (x *SetSafetyPolicyRequest) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[25] + mi := &file_governance_v1_governance_proto_msgTypes[26] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1612,7 +1704,7 @@ func (x *SetSafetyPolicyRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SetSafetyPolicyRequest.ProtoReflect.Descriptor instead. func (*SetSafetyPolicyRequest) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{25} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{26} } func (x *SetSafetyPolicyRequest) GetPolicy() *SafetyPolicy { @@ -1631,7 +1723,7 @@ type SetSafetyPolicyResponse struct { func (x *SetSafetyPolicyResponse) Reset() { *x = SetSafetyPolicyResponse{} - mi := &file_governance_v1_governance_proto_msgTypes[26] + mi := &file_governance_v1_governance_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1643,7 +1735,7 @@ func (x *SetSafetyPolicyResponse) String() string { func (*SetSafetyPolicyResponse) ProtoMessage() {} func (x *SetSafetyPolicyResponse) ProtoReflect() protoreflect.Message { - mi := &file_governance_v1_governance_proto_msgTypes[26] + mi := &file_governance_v1_governance_proto_msgTypes[27] if x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1656,7 +1748,7 @@ func (x *SetSafetyPolicyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SetSafetyPolicyResponse.ProtoReflect.Descriptor instead. func (*SetSafetyPolicyResponse) Descriptor() ([]byte, []int) { - return file_governance_v1_governance_proto_rawDescGZIP(), []int{26} + return file_governance_v1_governance_proto_rawDescGZIP(), []int{27} } func (x *SetSafetyPolicyResponse) GetPolicy() *SafetyPolicy { @@ -1716,13 +1808,20 @@ const file_governance_v1_governance_proto_rawDesc = "" + "\x06action\x18\x03 \x01(\x0e2\x1d.governance.v1.ActionDecisionR\x06action\x127\n" + "\n" + "risk_level\x18\x04 \x01(\x0e2\x18.governance.v1.RiskLevelR\triskLevel\x12 \n" + - "\vdescription\x18\x05 \x01(\tR\vdescription\"\x9d\x01\n" + + "\vdescription\x18\x05 \x01(\tR\vdescription\"\xd3\x01\n" + + "\rActionContext\x12!\n" + + "\frecord_count\x18\x01 \x01(\x03R\vrecordCount\x12'\n" + + "\x0fcurrency_amount\x18\x02 \x01(\x01R\x0ecurrencyAmount\x12#\n" + + "\rcurrency_code\x18\x03 \x01(\tR\fcurrencyCode\x12 \n" + + "\venvironment\x18\x04 \x01(\tR\venvironment\x12/\n" + + "\x13data_classification\x18\x05 \x01(\tR\x12dataClassification\"\xd5\x01\n" + "\x15EvaluateActionRequest\x12!\n" + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12\x19\n" + "\bagent_id\x18\x02 \x01(\tR\aagentId\x12\x1f\n" + "\vaction_type\x18\x03 \x01(\tR\n" + "actionType\x12%\n" + - "\x0eaction_payload\x18\x04 \x01(\fR\ractionPayload\"Y\n" + + "\x0eaction_payload\x18\x04 \x01(\fR\ractionPayload\x126\n" + + "\acontext\x18\x05 \x01(\v2\x1c.governance.v1.ActionContextR\acontext\"Y\n" + "\x16EvaluateActionResponse\x12?\n" + "\n" + "evaluation\x18\x01 \x01(\v2\x1f.governance.v1.ActionEvaluationR\n" + @@ -1733,12 +1832,13 @@ const file_governance_v1_governance_proto_rawDesc = "" + "categories\x18\x02 \x03(\x0e2\x1a.governance.v1.PIICategoryR\n" + "categories\"N\n" + "\x11DetectPIIResponse\x129\n" + - "\x06result\x18\x01 \x01(\v2!.governance.v1.PIIDetectionResultR\x06result\"\x80\x01\n" + + "\x06result\x18\x01 \x01(\v2!.governance.v1.PIIDetectionResultR\x06result\"\xb8\x01\n" + "\x13ClassifyRiskRequest\x12!\n" + "\fworkspace_id\x18\x01 \x01(\tR\vworkspaceId\x12\x1f\n" + "\vaction_type\x18\x02 \x01(\tR\n" + "actionType\x12%\n" + - "\x0eaction_payload\x18\x03 \x01(\fR\ractionPayload\"i\n" + + "\x0eaction_payload\x18\x03 \x01(\fR\ractionPayload\x126\n" + + "\acontext\x18\x04 \x01(\v2\x1c.governance.v1.ActionContextR\acontext\"i\n" + "\x14ClassifyRiskResponse\x127\n" + "\n" + "risk_level\x18\x01 \x01(\x0e2\x18.governance.v1.RiskLevelR\triskLevel\x12\x18\n" + @@ -1820,7 +1920,7 @@ func file_governance_v1_governance_proto_rawDescGZIP() []byte { } var file_governance_v1_governance_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_governance_v1_governance_proto_msgTypes = make([]protoimpl.MessageInfo, 27) +var file_governance_v1_governance_proto_msgTypes = make([]protoimpl.MessageInfo, 28) var file_governance_v1_governance_proto_goTypes = []any{ (ActionDecision)(0), // 0: governance.v1.ActionDecision (PIICategory)(0), // 1: governance.v1.PIICategory @@ -1832,76 +1932,79 @@ var file_governance_v1_governance_proto_goTypes = []any{ (*LegalHold)(nil), // 7: governance.v1.LegalHold (*SafetyPolicy)(nil), // 8: governance.v1.SafetyPolicy (*SafetyRule)(nil), // 9: governance.v1.SafetyRule - (*EvaluateActionRequest)(nil), // 10: governance.v1.EvaluateActionRequest - (*EvaluateActionResponse)(nil), // 11: governance.v1.EvaluateActionResponse - (*DetectPIIRequest)(nil), // 12: governance.v1.DetectPIIRequest - (*DetectPIIResponse)(nil), // 13: governance.v1.DetectPIIResponse - (*ClassifyRiskRequest)(nil), // 14: governance.v1.ClassifyRiskRequest - (*ClassifyRiskResponse)(nil), // 15: governance.v1.ClassifyRiskResponse - (*CheckCredentialExposureRequest)(nil), // 16: governance.v1.CheckCredentialExposureRequest - (*CheckCredentialExposureResponse)(nil), // 17: governance.v1.CheckCredentialExposureResponse - (*GetRetentionPolicyRequest)(nil), // 18: governance.v1.GetRetentionPolicyRequest - (*GetRetentionPolicyResponse)(nil), // 19: governance.v1.GetRetentionPolicyResponse - (*SetRetentionPolicyRequest)(nil), // 20: governance.v1.SetRetentionPolicyRequest - (*SetRetentionPolicyResponse)(nil), // 21: governance.v1.SetRetentionPolicyResponse - (*CheckLegalHoldRequest)(nil), // 22: governance.v1.CheckLegalHoldRequest - (*CheckLegalHoldResponse)(nil), // 23: governance.v1.CheckLegalHoldResponse - (*SetLegalHoldRequest)(nil), // 24: governance.v1.SetLegalHoldRequest - (*SetLegalHoldResponse)(nil), // 25: governance.v1.SetLegalHoldResponse - (*GetSafetyPolicyRequest)(nil), // 26: governance.v1.GetSafetyPolicyRequest - (*GetSafetyPolicyResponse)(nil), // 27: governance.v1.GetSafetyPolicyResponse - (*SetSafetyPolicyRequest)(nil), // 28: governance.v1.SetSafetyPolicyRequest - (*SetSafetyPolicyResponse)(nil), // 29: governance.v1.SetSafetyPolicyResponse - (*timestamppb.Timestamp)(nil), // 30: google.protobuf.Timestamp + (*ActionContext)(nil), // 10: governance.v1.ActionContext + (*EvaluateActionRequest)(nil), // 11: governance.v1.EvaluateActionRequest + (*EvaluateActionResponse)(nil), // 12: governance.v1.EvaluateActionResponse + (*DetectPIIRequest)(nil), // 13: governance.v1.DetectPIIRequest + (*DetectPIIResponse)(nil), // 14: governance.v1.DetectPIIResponse + (*ClassifyRiskRequest)(nil), // 15: governance.v1.ClassifyRiskRequest + (*ClassifyRiskResponse)(nil), // 16: governance.v1.ClassifyRiskResponse + (*CheckCredentialExposureRequest)(nil), // 17: governance.v1.CheckCredentialExposureRequest + (*CheckCredentialExposureResponse)(nil), // 18: governance.v1.CheckCredentialExposureResponse + (*GetRetentionPolicyRequest)(nil), // 19: governance.v1.GetRetentionPolicyRequest + (*GetRetentionPolicyResponse)(nil), // 20: governance.v1.GetRetentionPolicyResponse + (*SetRetentionPolicyRequest)(nil), // 21: governance.v1.SetRetentionPolicyRequest + (*SetRetentionPolicyResponse)(nil), // 22: governance.v1.SetRetentionPolicyResponse + (*CheckLegalHoldRequest)(nil), // 23: governance.v1.CheckLegalHoldRequest + (*CheckLegalHoldResponse)(nil), // 24: governance.v1.CheckLegalHoldResponse + (*SetLegalHoldRequest)(nil), // 25: governance.v1.SetLegalHoldRequest + (*SetLegalHoldResponse)(nil), // 26: governance.v1.SetLegalHoldResponse + (*GetSafetyPolicyRequest)(nil), // 27: governance.v1.GetSafetyPolicyRequest + (*GetSafetyPolicyResponse)(nil), // 28: governance.v1.GetSafetyPolicyResponse + (*SetSafetyPolicyRequest)(nil), // 29: governance.v1.SetSafetyPolicyRequest + (*SetSafetyPolicyResponse)(nil), // 30: governance.v1.SetSafetyPolicyResponse + (*timestamppb.Timestamp)(nil), // 31: google.protobuf.Timestamp } var file_governance_v1_governance_proto_depIdxs = []int32{ 0, // 0: governance.v1.ActionEvaluation.decision:type_name -> governance.v1.ActionDecision 2, // 1: governance.v1.ActionEvaluation.risk_level:type_name -> governance.v1.RiskLevel 5, // 2: governance.v1.PIIDetectionResult.spans:type_name -> governance.v1.PIISpan 1, // 3: governance.v1.PIISpan.category:type_name -> governance.v1.PIICategory - 30, // 4: governance.v1.LegalHold.created_at:type_name -> google.protobuf.Timestamp - 30, // 5: governance.v1.LegalHold.expires_at:type_name -> google.protobuf.Timestamp + 31, // 4: governance.v1.LegalHold.created_at:type_name -> google.protobuf.Timestamp + 31, // 5: governance.v1.LegalHold.expires_at:type_name -> google.protobuf.Timestamp 9, // 6: governance.v1.SafetyPolicy.rules:type_name -> governance.v1.SafetyRule 0, // 7: governance.v1.SafetyRule.action:type_name -> governance.v1.ActionDecision 2, // 8: governance.v1.SafetyRule.risk_level:type_name -> governance.v1.RiskLevel - 3, // 9: governance.v1.EvaluateActionResponse.evaluation:type_name -> governance.v1.ActionEvaluation - 1, // 10: governance.v1.DetectPIIRequest.categories:type_name -> governance.v1.PIICategory - 4, // 11: governance.v1.DetectPIIResponse.result:type_name -> governance.v1.PIIDetectionResult - 2, // 12: governance.v1.ClassifyRiskResponse.risk_level:type_name -> governance.v1.RiskLevel - 6, // 13: governance.v1.GetRetentionPolicyResponse.policy:type_name -> governance.v1.RetentionPolicy - 6, // 14: governance.v1.SetRetentionPolicyRequest.policy:type_name -> governance.v1.RetentionPolicy - 6, // 15: governance.v1.SetRetentionPolicyResponse.policy:type_name -> governance.v1.RetentionPolicy - 7, // 16: governance.v1.CheckLegalHoldResponse.holds:type_name -> governance.v1.LegalHold - 7, // 17: governance.v1.SetLegalHoldRequest.hold:type_name -> governance.v1.LegalHold - 7, // 18: governance.v1.SetLegalHoldResponse.hold:type_name -> governance.v1.LegalHold - 8, // 19: governance.v1.GetSafetyPolicyResponse.policy:type_name -> governance.v1.SafetyPolicy - 8, // 20: governance.v1.SetSafetyPolicyRequest.policy:type_name -> governance.v1.SafetyPolicy - 8, // 21: governance.v1.SetSafetyPolicyResponse.policy:type_name -> governance.v1.SafetyPolicy - 10, // 22: governance.v1.GovernanceService.EvaluateAction:input_type -> governance.v1.EvaluateActionRequest - 12, // 23: governance.v1.GovernanceService.DetectPII:input_type -> governance.v1.DetectPIIRequest - 14, // 24: governance.v1.GovernanceService.ClassifyRisk:input_type -> governance.v1.ClassifyRiskRequest - 16, // 25: governance.v1.GovernanceService.CheckCredentialExposure:input_type -> governance.v1.CheckCredentialExposureRequest - 18, // 26: governance.v1.GovernanceService.GetRetentionPolicy:input_type -> governance.v1.GetRetentionPolicyRequest - 20, // 27: governance.v1.GovernanceService.SetRetentionPolicy:input_type -> governance.v1.SetRetentionPolicyRequest - 22, // 28: governance.v1.GovernanceService.CheckLegalHold:input_type -> governance.v1.CheckLegalHoldRequest - 24, // 29: governance.v1.GovernanceService.SetLegalHold:input_type -> governance.v1.SetLegalHoldRequest - 26, // 30: governance.v1.GovernanceService.GetSafetyPolicy:input_type -> governance.v1.GetSafetyPolicyRequest - 28, // 31: governance.v1.GovernanceService.SetSafetyPolicy:input_type -> governance.v1.SetSafetyPolicyRequest - 11, // 32: governance.v1.GovernanceService.EvaluateAction:output_type -> governance.v1.EvaluateActionResponse - 13, // 33: governance.v1.GovernanceService.DetectPII:output_type -> governance.v1.DetectPIIResponse - 15, // 34: governance.v1.GovernanceService.ClassifyRisk:output_type -> governance.v1.ClassifyRiskResponse - 17, // 35: governance.v1.GovernanceService.CheckCredentialExposure:output_type -> governance.v1.CheckCredentialExposureResponse - 19, // 36: governance.v1.GovernanceService.GetRetentionPolicy:output_type -> governance.v1.GetRetentionPolicyResponse - 21, // 37: governance.v1.GovernanceService.SetRetentionPolicy:output_type -> governance.v1.SetRetentionPolicyResponse - 23, // 38: governance.v1.GovernanceService.CheckLegalHold:output_type -> governance.v1.CheckLegalHoldResponse - 25, // 39: governance.v1.GovernanceService.SetLegalHold:output_type -> governance.v1.SetLegalHoldResponse - 27, // 40: governance.v1.GovernanceService.GetSafetyPolicy:output_type -> governance.v1.GetSafetyPolicyResponse - 29, // 41: governance.v1.GovernanceService.SetSafetyPolicy:output_type -> governance.v1.SetSafetyPolicyResponse - 32, // [32:42] is the sub-list for method output_type - 22, // [22:32] is the sub-list for method input_type - 22, // [22:22] is the sub-list for extension type_name - 22, // [22:22] is the sub-list for extension extendee - 0, // [0:22] is the sub-list for field type_name + 10, // 9: governance.v1.EvaluateActionRequest.context:type_name -> governance.v1.ActionContext + 3, // 10: governance.v1.EvaluateActionResponse.evaluation:type_name -> governance.v1.ActionEvaluation + 1, // 11: governance.v1.DetectPIIRequest.categories:type_name -> governance.v1.PIICategory + 4, // 12: governance.v1.DetectPIIResponse.result:type_name -> governance.v1.PIIDetectionResult + 10, // 13: governance.v1.ClassifyRiskRequest.context:type_name -> governance.v1.ActionContext + 2, // 14: governance.v1.ClassifyRiskResponse.risk_level:type_name -> governance.v1.RiskLevel + 6, // 15: governance.v1.GetRetentionPolicyResponse.policy:type_name -> governance.v1.RetentionPolicy + 6, // 16: governance.v1.SetRetentionPolicyRequest.policy:type_name -> governance.v1.RetentionPolicy + 6, // 17: governance.v1.SetRetentionPolicyResponse.policy:type_name -> governance.v1.RetentionPolicy + 7, // 18: governance.v1.CheckLegalHoldResponse.holds:type_name -> governance.v1.LegalHold + 7, // 19: governance.v1.SetLegalHoldRequest.hold:type_name -> governance.v1.LegalHold + 7, // 20: governance.v1.SetLegalHoldResponse.hold:type_name -> governance.v1.LegalHold + 8, // 21: governance.v1.GetSafetyPolicyResponse.policy:type_name -> governance.v1.SafetyPolicy + 8, // 22: governance.v1.SetSafetyPolicyRequest.policy:type_name -> governance.v1.SafetyPolicy + 8, // 23: governance.v1.SetSafetyPolicyResponse.policy:type_name -> governance.v1.SafetyPolicy + 11, // 24: governance.v1.GovernanceService.EvaluateAction:input_type -> governance.v1.EvaluateActionRequest + 13, // 25: governance.v1.GovernanceService.DetectPII:input_type -> governance.v1.DetectPIIRequest + 15, // 26: governance.v1.GovernanceService.ClassifyRisk:input_type -> governance.v1.ClassifyRiskRequest + 17, // 27: governance.v1.GovernanceService.CheckCredentialExposure:input_type -> governance.v1.CheckCredentialExposureRequest + 19, // 28: governance.v1.GovernanceService.GetRetentionPolicy:input_type -> governance.v1.GetRetentionPolicyRequest + 21, // 29: governance.v1.GovernanceService.SetRetentionPolicy:input_type -> governance.v1.SetRetentionPolicyRequest + 23, // 30: governance.v1.GovernanceService.CheckLegalHold:input_type -> governance.v1.CheckLegalHoldRequest + 25, // 31: governance.v1.GovernanceService.SetLegalHold:input_type -> governance.v1.SetLegalHoldRequest + 27, // 32: governance.v1.GovernanceService.GetSafetyPolicy:input_type -> governance.v1.GetSafetyPolicyRequest + 29, // 33: governance.v1.GovernanceService.SetSafetyPolicy:input_type -> governance.v1.SetSafetyPolicyRequest + 12, // 34: governance.v1.GovernanceService.EvaluateAction:output_type -> governance.v1.EvaluateActionResponse + 14, // 35: governance.v1.GovernanceService.DetectPII:output_type -> governance.v1.DetectPIIResponse + 16, // 36: governance.v1.GovernanceService.ClassifyRisk:output_type -> governance.v1.ClassifyRiskResponse + 18, // 37: governance.v1.GovernanceService.CheckCredentialExposure:output_type -> governance.v1.CheckCredentialExposureResponse + 20, // 38: governance.v1.GovernanceService.GetRetentionPolicy:output_type -> governance.v1.GetRetentionPolicyResponse + 22, // 39: governance.v1.GovernanceService.SetRetentionPolicy:output_type -> governance.v1.SetRetentionPolicyResponse + 24, // 40: governance.v1.GovernanceService.CheckLegalHold:output_type -> governance.v1.CheckLegalHoldResponse + 26, // 41: governance.v1.GovernanceService.SetLegalHold:output_type -> governance.v1.SetLegalHoldResponse + 28, // 42: governance.v1.GovernanceService.GetSafetyPolicy:output_type -> governance.v1.GetSafetyPolicyResponse + 30, // 43: governance.v1.GovernanceService.SetSafetyPolicy:output_type -> governance.v1.SetSafetyPolicyResponse + 34, // [34:44] is the sub-list for method output_type + 24, // [24:34] is the sub-list for method input_type + 24, // [24:24] is the sub-list for extension type_name + 24, // [24:24] is the sub-list for extension extendee + 0, // [0:24] is the sub-list for field type_name } func init() { file_governance_v1_governance_proto_init() } @@ -1915,7 +2018,7 @@ func file_governance_v1_governance_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_governance_v1_governance_proto_rawDesc), len(file_governance_v1_governance_proto_rawDesc)), NumEnums: 3, - NumMessages: 27, + NumMessages: 28, NumExtensions: 0, NumServices: 1, }, diff --git a/gen/python/governance/v1/governance_pb2.py b/gen/python/governance/v1/governance_pb2.py index e8d81e9..170d3dc 100644 --- a/gen/python/governance/v1/governance_pb2.py +++ b/gen/python/governance/v1/governance_pb2.py @@ -25,7 +25,7 @@ from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1egovernance/v1/governance.proto\x12\rgovernance.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa8\x02\n\x10\x41\x63tionEvaluation\x12\x39\n\x08\x64\x65\x63ision\x18\x01 \x01(\x0e\x32\x1d.governance.v1.ActionDecisionR\x08\x64\x65\x63ision\x12\x37\n\nrisk_level\x18\x02 \x01(\x0e\x32\x18.governance.v1.RiskLevelR\triskLevel\x12\x18\n\x07reasons\x18\x03 \x03(\tR\x07reasons\x12#\n\rmatched_rules\x18\x04 \x03(\tR\x0cmatchedRules\x12)\n\x10habit_confidence\x18\x05 \x01(\x02R\x0fhabitConfidence\x12\x36\n\x17habit_observation_count\x18\x06 \x01(\x05R\x15habitObservationCount\"B\n\x12PIIDetectionResult\x12,\n\x05spans\x18\x01 \x03(\x0b\x32\x16.governance.v1.PIISpanR\x05spans\"\xb7\x01\n\x07PIISpan\x12!\n\x0cstart_offset\x18\x01 \x01(\x05R\x0bstartOffset\x12\x1d\n\nend_offset\x18\x02 \x01(\x05R\tendOffset\x12\x36\n\x08\x63\x61tegory\x18\x03 \x01(\x0e\x32\x1a.governance.v1.PIICategoryR\x08\x63\x61tegory\x12\x12\n\x04text\x18\x04 \x01(\tR\x04text\x12\x1e\n\nconfidence\x18\x05 \x01(\x02R\nconfidence\"\x8b\x01\n\x0fRetentionPolicy\x12!\n\x0cworkspace_id\x18\x01 \x01(\tR\x0bworkspaceId\x12%\n\x0eretention_days\x18\x02 \x01(\x05R\rretentionDays\x12.\n\x13legal_hold_override\x18\x03 \x01(\x08R\x11legalHoldOverride\"\x99\x02\n\tLegalHold\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12!\n\x0cworkspace_id\x18\x02 \x01(\tR\x0bworkspaceId\x12\x14\n\x05scope\x18\x03 \x01(\tR\x05scope\x12\x16\n\x06reason\x18\x04 \x01(\tR\x06reason\x12\x1d\n\ncreated_by\x18\x05 \x01(\tR\tcreatedBy\x12\x16\n\x06\x61\x63tive\x18\x06 \x01(\x08R\x06\x61\x63tive\x12\x39\n\ncreated_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\tcreatedAt\x12\x39\n\nexpires_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampR\texpiresAt\"b\n\x0cSafetyPolicy\x12!\n\x0cworkspace_id\x18\x01 \x01(\tR\x0bworkspaceId\x12/\n\x05rules\x18\x02 \x03(\x0b\x32\x19.governance.v1.SafetyRuleR\x05rules\"\xc8\x01\n\nSafetyRule\x12\x0e\n\x02id\x18\x01 \x01(\tR\x02id\x12\x18\n\x07pattern\x18\x02 \x01(\tR\x07pattern\x12\x35\n\x06\x61\x63tion\x18\x03 \x01(\x0e\x32\x1d.governance.v1.ActionDecisionR\x06\x61\x63tion\x12\x37\n\nrisk_level\x18\x04 \x01(\x0e\x32\x18.governance.v1.RiskLevelR\triskLevel\x12 \n\x0b\x64\x65scription\x18\x05 \x01(\tR\x0b\x64\x65scription\"\x9d\x01\n\x15\x45valuateActionRequest\x12!\n\x0cworkspace_id\x18\x01 \x01(\tR\x0bworkspaceId\x12\x19\n\x08\x61gent_id\x18\x02 \x01(\tR\x07\x61gentId\x12\x1f\n\x0b\x61\x63tion_type\x18\x03 \x01(\tR\nactionType\x12%\n\x0e\x61\x63tion_payload\x18\x04 \x01(\x0cR\ractionPayload\"Y\n\x16\x45valuateActionResponse\x12?\n\nevaluation\x18\x01 \x01(\x0b\x32\x1f.governance.v1.ActionEvaluationR\nevaluation\"b\n\x10\x44\x65tectPIIRequest\x12\x12\n\x04text\x18\x01 \x01(\tR\x04text\x12:\n\ncategories\x18\x02 \x03(\x0e\x32\x1a.governance.v1.PIICategoryR\ncategories\"N\n\x11\x44\x65tectPIIResponse\x12\x39\n\x06result\x18\x01 \x01(\x0b\x32!.governance.v1.PIIDetectionResultR\x06result\"\x80\x01\n\x13\x43lassifyRiskRequest\x12!\n\x0cworkspace_id\x18\x01 \x01(\tR\x0bworkspaceId\x12\x1f\n\x0b\x61\x63tion_type\x18\x02 \x01(\tR\nactionType\x12%\n\x0e\x61\x63tion_payload\x18\x03 \x01(\x0cR\ractionPayload\"i\n\x14\x43lassifyRiskResponse\x12\x37\n\nrisk_level\x18\x01 \x01(\x0e\x32\x18.governance.v1.RiskLevelR\triskLevel\x12\x18\n\x07reasons\x18\x02 \x03(\tR\x07reasons\"4\n\x1e\x43heckCredentialExposureRequest\x12\x12\n\x04text\x18\x01 \x01(\tR\x04text\"\x84\x01\n\x1f\x43heckCredentialExposureResponse\x12\x18\n\x07\x65xposed\x18\x01 \x01(\x08R\x07\x65xposed\x12)\n\x10\x63redential_types\x18\x02 \x03(\tR\x0f\x63redentialTypes\x12\x1c\n\tlocations\x18\x03 \x03(\tR\tlocations\">\n\x19GetRetentionPolicyRequest\x12!\n\x0cworkspace_id\x18\x01 \x01(\tR\x0bworkspaceId\"T\n\x1aGetRetentionPolicyResponse\x12\x36\n\x06policy\x18\x01 \x01(\x0b\x32\x1e.governance.v1.RetentionPolicyR\x06policy\"S\n\x19SetRetentionPolicyRequest\x12\x36\n\x06policy\x18\x01 \x01(\x0b\x32\x1e.governance.v1.RetentionPolicyR\x06policy\"T\n\x1aSetRetentionPolicyResponse\x12\x36\n\x06policy\x18\x01 \x01(\x0b\x32\x1e.governance.v1.RetentionPolicyR\x06policy\"P\n\x15\x43heckLegalHoldRequest\x12!\n\x0cworkspace_id\x18\x01 \x01(\tR\x0bworkspaceId\x12\x14\n\x05scope\x18\x02 \x01(\tR\x05scope\"\\\n\x16\x43heckLegalHoldResponse\x12\x12\n\x04held\x18\x01 \x01(\x08R\x04held\x12.\n\x05holds\x18\x02 \x03(\x0b\x32\x18.governance.v1.LegalHoldR\x05holds\"C\n\x13SetLegalHoldRequest\x12,\n\x04hold\x18\x01 \x01(\x0b\x32\x18.governance.v1.LegalHoldR\x04hold\"D\n\x14SetLegalHoldResponse\x12,\n\x04hold\x18\x01 \x01(\x0b\x32\x18.governance.v1.LegalHoldR\x04hold\";\n\x16GetSafetyPolicyRequest\x12!\n\x0cworkspace_id\x18\x01 \x01(\tR\x0bworkspaceId\"N\n\x17GetSafetyPolicyResponse\x12\x33\n\x06policy\x18\x01 \x01(\x0b\x32\x1b.governance.v1.SafetyPolicyR\x06policy\"M\n\x16SetSafetyPolicyRequest\x12\x33\n\x06policy\x18\x01 \x01(\x0b\x32\x1b.governance.v1.SafetyPolicyR\x06policy\"N\n\x17SetSafetyPolicyResponse\x12\x33\n\x06policy\x18\x01 \x01(\x0b\x32\x1b.governance.v1.SafetyPolicyR\x06policy*\x8c\x01\n\x0e\x41\x63tionDecision\x12\x1f\n\x1b\x41\x43TION_DECISION_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41\x43TION_DECISION_ALLOW\x10\x01\x12\x18\n\x14\x41\x43TION_DECISION_DENY\x10\x02\x12$\n ACTION_DECISION_REQUIRE_APPROVAL\x10\x03*\xe0\x01\n\x0bPIICategory\x12\x1c\n\x18PII_CATEGORY_UNSPECIFIED\x10\x00\x12\x16\n\x12PII_CATEGORY_EMAIL\x10\x01\x12\x16\n\x12PII_CATEGORY_PHONE\x10\x02\x12\x14\n\x10PII_CATEGORY_SSN\x10\x03\x12\x1c\n\x18PII_CATEGORY_CREDIT_CARD\x10\x04\x12\x18\n\x14PII_CATEGORY_ADDRESS\x10\x05\x12\x1c\n\x18PII_CATEGORY_PERSON_NAME\x10\x06\x12\x17\n\x13PII_CATEGORY_CUSTOM\x10\x07*\x80\x01\n\tRiskLevel\x12\x1a\n\x16RISK_LEVEL_UNSPECIFIED\x10\x00\x12\x12\n\x0eRISK_LEVEL_LOW\x10\x01\x12\x15\n\x11RISK_LEVEL_MEDIUM\x10\x02\x12\x13\n\x0fRISK_LEVEL_HIGH\x10\x03\x12\x17\n\x13RISK_LEVEL_CRITICAL\x10\x04\x32\xe7\x07\n\x11GovernanceService\x12]\n\x0e\x45valuateAction\x12$.governance.v1.EvaluateActionRequest\x1a%.governance.v1.EvaluateActionResponse\x12N\n\tDetectPII\x12\x1f.governance.v1.DetectPIIRequest\x1a .governance.v1.DetectPIIResponse\x12W\n\x0c\x43lassifyRisk\x12\".governance.v1.ClassifyRiskRequest\x1a#.governance.v1.ClassifyRiskResponse\x12x\n\x17\x43heckCredentialExposure\x12-.governance.v1.CheckCredentialExposureRequest\x1a..governance.v1.CheckCredentialExposureResponse\x12i\n\x12GetRetentionPolicy\x12(.governance.v1.GetRetentionPolicyRequest\x1a).governance.v1.GetRetentionPolicyResponse\x12i\n\x12SetRetentionPolicy\x12(.governance.v1.SetRetentionPolicyRequest\x1a).governance.v1.SetRetentionPolicyResponse\x12]\n\x0e\x43heckLegalHold\x12$.governance.v1.CheckLegalHoldRequest\x1a%.governance.v1.CheckLegalHoldResponse\x12W\n\x0cSetLegalHold\x12\".governance.v1.SetLegalHoldRequest\x1a#.governance.v1.SetLegalHoldResponse\x12`\n\x0fGetSafetyPolicy\x12%.governance.v1.GetSafetyPolicyRequest\x1a&.governance.v1.GetSafetyPolicyResponse\x12`\n\x0fSetSafetyPolicy\x12%.governance.v1.SetSafetyPolicyRequest\x1a&.governance.v1.SetSafetyPolicyResponseB\n\x19GetRetentionPolicyRequest\x12!\n\x0cworkspace_id\x18\x01 \x01(\tR\x0bworkspaceId\"T\n\x1aGetRetentionPolicyResponse\x12\x36\n\x06policy\x18\x01 \x01(\x0b\x32\x1e.governance.v1.RetentionPolicyR\x06policy\"S\n\x19SetRetentionPolicyRequest\x12\x36\n\x06policy\x18\x01 \x01(\x0b\x32\x1e.governance.v1.RetentionPolicyR\x06policy\"T\n\x1aSetRetentionPolicyResponse\x12\x36\n\x06policy\x18\x01 \x01(\x0b\x32\x1e.governance.v1.RetentionPolicyR\x06policy\"P\n\x15\x43heckLegalHoldRequest\x12!\n\x0cworkspace_id\x18\x01 \x01(\tR\x0bworkspaceId\x12\x14\n\x05scope\x18\x02 \x01(\tR\x05scope\"\\\n\x16\x43heckLegalHoldResponse\x12\x12\n\x04held\x18\x01 \x01(\x08R\x04held\x12.\n\x05holds\x18\x02 \x03(\x0b\x32\x18.governance.v1.LegalHoldR\x05holds\"C\n\x13SetLegalHoldRequest\x12,\n\x04hold\x18\x01 \x01(\x0b\x32\x18.governance.v1.LegalHoldR\x04hold\"D\n\x14SetLegalHoldResponse\x12,\n\x04hold\x18\x01 \x01(\x0b\x32\x18.governance.v1.LegalHoldR\x04hold\";\n\x16GetSafetyPolicyRequest\x12!\n\x0cworkspace_id\x18\x01 \x01(\tR\x0bworkspaceId\"N\n\x17GetSafetyPolicyResponse\x12\x33\n\x06policy\x18\x01 \x01(\x0b\x32\x1b.governance.v1.SafetyPolicyR\x06policy\"M\n\x16SetSafetyPolicyRequest\x12\x33\n\x06policy\x18\x01 \x01(\x0b\x32\x1b.governance.v1.SafetyPolicyR\x06policy\"N\n\x17SetSafetyPolicyResponse\x12\x33\n\x06policy\x18\x01 \x01(\x0b\x32\x1b.governance.v1.SafetyPolicyR\x06policy*\x8c\x01\n\x0e\x41\x63tionDecision\x12\x1f\n\x1b\x41\x43TION_DECISION_UNSPECIFIED\x10\x00\x12\x19\n\x15\x41\x43TION_DECISION_ALLOW\x10\x01\x12\x18\n\x14\x41\x43TION_DECISION_DENY\x10\x02\x12$\n ACTION_DECISION_REQUIRE_APPROVAL\x10\x03*\xe0\x01\n\x0bPIICategory\x12\x1c\n\x18PII_CATEGORY_UNSPECIFIED\x10\x00\x12\x16\n\x12PII_CATEGORY_EMAIL\x10\x01\x12\x16\n\x12PII_CATEGORY_PHONE\x10\x02\x12\x14\n\x10PII_CATEGORY_SSN\x10\x03\x12\x1c\n\x18PII_CATEGORY_CREDIT_CARD\x10\x04\x12\x18\n\x14PII_CATEGORY_ADDRESS\x10\x05\x12\x1c\n\x18PII_CATEGORY_PERSON_NAME\x10\x06\x12\x17\n\x13PII_CATEGORY_CUSTOM\x10\x07*\x80\x01\n\tRiskLevel\x12\x1a\n\x16RISK_LEVEL_UNSPECIFIED\x10\x00\x12\x12\n\x0eRISK_LEVEL_LOW\x10\x01\x12\x15\n\x11RISK_LEVEL_MEDIUM\x10\x02\x12\x13\n\x0fRISK_LEVEL_HIGH\x10\x03\x12\x17\n\x13RISK_LEVEL_CRITICAL\x10\x04\x32\xe7\x07\n\x11GovernanceService\x12]\n\x0e\x45valuateAction\x12$.governance.v1.EvaluateActionRequest\x1a%.governance.v1.EvaluateActionResponse\x12N\n\tDetectPII\x12\x1f.governance.v1.DetectPIIRequest\x1a .governance.v1.DetectPIIResponse\x12W\n\x0c\x43lassifyRisk\x12\".governance.v1.ClassifyRiskRequest\x1a#.governance.v1.ClassifyRiskResponse\x12x\n\x17\x43heckCredentialExposure\x12-.governance.v1.CheckCredentialExposureRequest\x1a..governance.v1.CheckCredentialExposureResponse\x12i\n\x12GetRetentionPolicy\x12(.governance.v1.GetRetentionPolicyRequest\x1a).governance.v1.GetRetentionPolicyResponse\x12i\n\x12SetRetentionPolicy\x12(.governance.v1.SetRetentionPolicyRequest\x1a).governance.v1.SetRetentionPolicyResponse\x12]\n\x0e\x43heckLegalHold\x12$.governance.v1.CheckLegalHoldRequest\x1a%.governance.v1.CheckLegalHoldResponse\x12W\n\x0cSetLegalHold\x12\".governance.v1.SetLegalHoldRequest\x1a#.governance.v1.SetLegalHoldResponse\x12`\n\x0fGetSafetyPolicy\x12%.governance.v1.GetSafetyPolicyRequest\x1a&.governance.v1.GetSafetyPolicyResponse\x12`\n\x0fSetSafetyPolicy\x12%.governance.v1.SetSafetyPolicyRequest\x1a&.governance.v1.SetSafetyPolicyResponseB & { export const SafetyRuleSchema: GenMessage = /*@__PURE__*/ messageDesc(file_governance_v1_governance, 6); +/** + * @generated from message governance.v1.ActionContext + */ +export type ActionContext = Message<"governance.v1.ActionContext"> & { + /** + * @generated from field: int64 record_count = 1; + */ + recordCount: bigint; + + /** + * @generated from field: double currency_amount = 2; + */ + currencyAmount: number; + + /** + * @generated from field: string currency_code = 3; + */ + currencyCode: string; + + /** + * @generated from field: string environment = 4; + */ + environment: string; + + /** + * @generated from field: string data_classification = 5; + */ + dataClassification: string; +}; + +/** + * Describes the message governance.v1.ActionContext. + * Use `create(ActionContextSchema)` to create a new message. + */ +export const ActionContextSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_governance_v1_governance, 7); + /** * @generated from message governance.v1.EvaluateActionRequest */ @@ -289,6 +326,11 @@ export type EvaluateActionRequest = Message<"governance.v1.EvaluateActionRequest * @generated from field: bytes action_payload = 4; */ actionPayload: Uint8Array; + + /** + * @generated from field: governance.v1.ActionContext context = 5; + */ + context?: ActionContext; }; /** @@ -296,7 +338,7 @@ export type EvaluateActionRequest = Message<"governance.v1.EvaluateActionRequest * Use `create(EvaluateActionRequestSchema)` to create a new message. */ export const EvaluateActionRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 7); + messageDesc(file_governance_v1_governance, 8); /** * @generated from message governance.v1.EvaluateActionResponse @@ -313,7 +355,7 @@ export type EvaluateActionResponse = Message<"governance.v1.EvaluateActionRespon * Use `create(EvaluateActionResponseSchema)` to create a new message. */ export const EvaluateActionResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 8); + messageDesc(file_governance_v1_governance, 9); /** * @generated from message governance.v1.DetectPIIRequest @@ -335,7 +377,7 @@ export type DetectPIIRequest = Message<"governance.v1.DetectPIIRequest"> & { * Use `create(DetectPIIRequestSchema)` to create a new message. */ export const DetectPIIRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 9); + messageDesc(file_governance_v1_governance, 10); /** * @generated from message governance.v1.DetectPIIResponse @@ -352,7 +394,7 @@ export type DetectPIIResponse = Message<"governance.v1.DetectPIIResponse"> & { * Use `create(DetectPIIResponseSchema)` to create a new message. */ export const DetectPIIResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 10); + messageDesc(file_governance_v1_governance, 11); /** * @generated from message governance.v1.ClassifyRiskRequest @@ -372,6 +414,11 @@ export type ClassifyRiskRequest = Message<"governance.v1.ClassifyRiskRequest"> & * @generated from field: bytes action_payload = 3; */ actionPayload: Uint8Array; + + /** + * @generated from field: governance.v1.ActionContext context = 4; + */ + context?: ActionContext; }; /** @@ -379,7 +426,7 @@ export type ClassifyRiskRequest = Message<"governance.v1.ClassifyRiskRequest"> & * Use `create(ClassifyRiskRequestSchema)` to create a new message. */ export const ClassifyRiskRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 11); + messageDesc(file_governance_v1_governance, 12); /** * @generated from message governance.v1.ClassifyRiskResponse @@ -401,7 +448,7 @@ export type ClassifyRiskResponse = Message<"governance.v1.ClassifyRiskResponse"> * Use `create(ClassifyRiskResponseSchema)` to create a new message. */ export const ClassifyRiskResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 12); + messageDesc(file_governance_v1_governance, 13); /** * @generated from message governance.v1.CheckCredentialExposureRequest @@ -418,7 +465,7 @@ export type CheckCredentialExposureRequest = Message<"governance.v1.CheckCredent * Use `create(CheckCredentialExposureRequestSchema)` to create a new message. */ export const CheckCredentialExposureRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 13); + messageDesc(file_governance_v1_governance, 14); /** * @generated from message governance.v1.CheckCredentialExposureResponse @@ -445,7 +492,7 @@ export type CheckCredentialExposureResponse = Message<"governance.v1.CheckCreden * Use `create(CheckCredentialExposureResponseSchema)` to create a new message. */ export const CheckCredentialExposureResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 14); + messageDesc(file_governance_v1_governance, 15); /** * @generated from message governance.v1.GetRetentionPolicyRequest @@ -462,7 +509,7 @@ export type GetRetentionPolicyRequest = Message<"governance.v1.GetRetentionPolic * Use `create(GetRetentionPolicyRequestSchema)` to create a new message. */ export const GetRetentionPolicyRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 15); + messageDesc(file_governance_v1_governance, 16); /** * @generated from message governance.v1.GetRetentionPolicyResponse @@ -479,7 +526,7 @@ export type GetRetentionPolicyResponse = Message<"governance.v1.GetRetentionPoli * Use `create(GetRetentionPolicyResponseSchema)` to create a new message. */ export const GetRetentionPolicyResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 16); + messageDesc(file_governance_v1_governance, 17); /** * @generated from message governance.v1.SetRetentionPolicyRequest @@ -496,7 +543,7 @@ export type SetRetentionPolicyRequest = Message<"governance.v1.SetRetentionPolic * Use `create(SetRetentionPolicyRequestSchema)` to create a new message. */ export const SetRetentionPolicyRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 17); + messageDesc(file_governance_v1_governance, 18); /** * @generated from message governance.v1.SetRetentionPolicyResponse @@ -513,7 +560,7 @@ export type SetRetentionPolicyResponse = Message<"governance.v1.SetRetentionPoli * Use `create(SetRetentionPolicyResponseSchema)` to create a new message. */ export const SetRetentionPolicyResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 18); + messageDesc(file_governance_v1_governance, 19); /** * @generated from message governance.v1.CheckLegalHoldRequest @@ -535,7 +582,7 @@ export type CheckLegalHoldRequest = Message<"governance.v1.CheckLegalHoldRequest * Use `create(CheckLegalHoldRequestSchema)` to create a new message. */ export const CheckLegalHoldRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 19); + messageDesc(file_governance_v1_governance, 20); /** * @generated from message governance.v1.CheckLegalHoldResponse @@ -557,7 +604,7 @@ export type CheckLegalHoldResponse = Message<"governance.v1.CheckLegalHoldRespon * Use `create(CheckLegalHoldResponseSchema)` to create a new message. */ export const CheckLegalHoldResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 20); + messageDesc(file_governance_v1_governance, 21); /** * @generated from message governance.v1.SetLegalHoldRequest @@ -574,7 +621,7 @@ export type SetLegalHoldRequest = Message<"governance.v1.SetLegalHoldRequest"> & * Use `create(SetLegalHoldRequestSchema)` to create a new message. */ export const SetLegalHoldRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 21); + messageDesc(file_governance_v1_governance, 22); /** * @generated from message governance.v1.SetLegalHoldResponse @@ -591,7 +638,7 @@ export type SetLegalHoldResponse = Message<"governance.v1.SetLegalHoldResponse"> * Use `create(SetLegalHoldResponseSchema)` to create a new message. */ export const SetLegalHoldResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 22); + messageDesc(file_governance_v1_governance, 23); /** * @generated from message governance.v1.GetSafetyPolicyRequest @@ -608,7 +655,7 @@ export type GetSafetyPolicyRequest = Message<"governance.v1.GetSafetyPolicyReque * Use `create(GetSafetyPolicyRequestSchema)` to create a new message. */ export const GetSafetyPolicyRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 23); + messageDesc(file_governance_v1_governance, 24); /** * @generated from message governance.v1.GetSafetyPolicyResponse @@ -625,7 +672,7 @@ export type GetSafetyPolicyResponse = Message<"governance.v1.GetSafetyPolicyResp * Use `create(GetSafetyPolicyResponseSchema)` to create a new message. */ export const GetSafetyPolicyResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 24); + messageDesc(file_governance_v1_governance, 25); /** * @generated from message governance.v1.SetSafetyPolicyRequest @@ -642,7 +689,7 @@ export type SetSafetyPolicyRequest = Message<"governance.v1.SetSafetyPolicyReque * Use `create(SetSafetyPolicyRequestSchema)` to create a new message. */ export const SetSafetyPolicyRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 25); + messageDesc(file_governance_v1_governance, 26); /** * @generated from message governance.v1.SetSafetyPolicyResponse @@ -659,7 +706,7 @@ export type SetSafetyPolicyResponse = Message<"governance.v1.SetSafetyPolicyResp * Use `create(SetSafetyPolicyResponseSchema)` to create a new message. */ export const SetSafetyPolicyResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_governance_v1_governance, 26); + messageDesc(file_governance_v1_governance, 27); /** * ActionDecision describes the governance decision for an action. diff --git a/proto/governance/v1/governance.proto b/proto/governance/v1/governance.proto index 3596138..c80bb6c 100644 --- a/proto/governance/v1/governance.proto +++ b/proto/governance/v1/governance.proto @@ -110,11 +110,20 @@ message SafetyRule { string description = 5; } +message ActionContext { + int64 record_count = 1; + double currency_amount = 2; + string currency_code = 3; + string environment = 4; + string data_classification = 5; +} + message EvaluateActionRequest { string workspace_id = 1; string agent_id = 2; string action_type = 3; bytes action_payload = 4; + ActionContext context = 5; } message EvaluateActionResponse { @@ -134,6 +143,7 @@ message ClassifyRiskRequest { string workspace_id = 1; string action_type = 2; bytes action_payload = 3; + ActionContext context = 4; } message ClassifyRiskResponse { diff --git a/proto/governance/v1/testdata/evaluate_action_request.json b/proto/governance/v1/testdata/evaluate_action_request.json index 80b6e4a..7581c7d 100644 --- a/proto/governance/v1/testdata/evaluate_action_request.json +++ b/proto/governance/v1/testdata/evaluate_action_request.json @@ -2,5 +2,12 @@ "workspace_id": "ws_governance", "agent_id": "agent_guard", "action_type": "credential.share", - "action_payload": "eyJjcmVkZW50aWFsIjoic2stbGl2ZS0xMjMiLCJ0YXJnZXQiOiJzbGFjayJ9" + "action_payload": "eyJjcmVkZW50aWFsIjoic2stbGl2ZS0xMjMiLCJ0YXJnZXQiOiJzbGFjayJ9", + "context": { + "record_count": "1", + "currency_amount": 250000, + "currency_code": "USD", + "environment": "production", + "data_classification": "restricted" + } }