// Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.36.11 // protoc (unknown) // source: guard/v1/guard.proto package guardv1 import ( protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" durationpb "google.golang.org/protobuf/types/known/durationpb" timestamppb "google.golang.org/protobuf/types/known/timestamppb" reflect "reflect" sync "sync" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-to-date. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) // Verify that runtime/protoimpl is sufficiently up-to-date. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) type Reversibility int32 const ( Reversibility_REVERSIBILITY_UNSPECIFIED Reversibility = 0 Reversibility_REVERSIBILITY_UNDONE_AUTOMATICALLY Reversibility = 1 Reversibility_REVERSIBILITY_RECOVERABLE Reversibility = 2 Reversibility_REVERSIBILITY_IRREVERSIBLE Reversibility = 3 ) // Enum value maps for Reversibility. var ( Reversibility_name = map[int32]string{ 0: "REVERSIBILITY_UNSPECIFIED", 1: "REVERSIBILITY_UNDONE_AUTOMATICALLY", 2: "REVERSIBILITY_RECOVERABLE", 3: "REVERSIBILITY_IRREVERSIBLE", } Reversibility_value = map[string]int32{ "REVERSIBILITY_UNSPECIFIED": 0, "REVERSIBILITY_UNDONE_AUTOMATICALLY": 1, "REVERSIBILITY_RECOVERABLE": 2, "REVERSIBILITY_IRREVERSIBLE": 3, } ) func (x Reversibility) Enum() *Reversibility { p := new(Reversibility) *p = x return p } func (x Reversibility) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Reversibility) Descriptor() protoreflect.EnumDescriptor { return file_guard_v1_guard_proto_enumTypes[0].Descriptor() } func (Reversibility) Type() protoreflect.EnumType { return &file_guard_v1_guard_proto_enumTypes[0] } func (x Reversibility) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use Reversibility.Descriptor instead. func (Reversibility) EnumDescriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{0} } // Ceiling is the five-level scale, from the most autonomy to the least. type Ceiling int32 const ( Ceiling_CEILING_UNSPECIFIED Ceiling = 0 Ceiling_CEILING_ACT_QUIETLY Ceiling = 1 Ceiling_CEILING_ACT_AND_TELL Ceiling = 2 Ceiling_CEILING_PROPOSE_AND_WAIT Ceiling = 3 Ceiling_CEILING_ESCALATE Ceiling = 4 Ceiling_CEILING_NEVER Ceiling = 5 ) // Enum value maps for Ceiling. var ( Ceiling_name = map[int32]string{ 0: "CEILING_UNSPECIFIED", 1: "CEILING_ACT_QUIETLY", 2: "CEILING_ACT_AND_TELL", 3: "CEILING_PROPOSE_AND_WAIT", 4: "CEILING_ESCALATE", 5: "CEILING_NEVER", } Ceiling_value = map[string]int32{ "CEILING_UNSPECIFIED": 0, "CEILING_ACT_QUIETLY": 1, "CEILING_ACT_AND_TELL": 2, "CEILING_PROPOSE_AND_WAIT": 3, "CEILING_ESCALATE": 4, "CEILING_NEVER": 5, } ) func (x Ceiling) Enum() *Ceiling { p := new(Ceiling) *p = x return p } func (x Ceiling) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Ceiling) Descriptor() protoreflect.EnumDescriptor { return file_guard_v1_guard_proto_enumTypes[1].Descriptor() } func (Ceiling) Type() protoreflect.EnumType { return &file_guard_v1_guard_proto_enumTypes[1] } func (x Ceiling) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use Ceiling.Descriptor instead. func (Ceiling) EnumDescriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{1} } // Strength is how much a finding's evidence supports it. type Strength int32 const ( Strength_STRENGTH_UNSPECIFIED Strength = 0 Strength_STRENGTH_WEAK Strength = 1 Strength_STRENGTH_MODERATE Strength = 2 Strength_STRENGTH_STRONG Strength = 3 ) // Enum value maps for Strength. var ( Strength_name = map[int32]string{ 0: "STRENGTH_UNSPECIFIED", 1: "STRENGTH_WEAK", 2: "STRENGTH_MODERATE", 3: "STRENGTH_STRONG", } Strength_value = map[string]int32{ "STRENGTH_UNSPECIFIED": 0, "STRENGTH_WEAK": 1, "STRENGTH_MODERATE": 2, "STRENGTH_STRONG": 3, } ) func (x Strength) Enum() *Strength { p := new(Strength) *p = x return p } func (x Strength) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } func (Strength) Descriptor() protoreflect.EnumDescriptor { return file_guard_v1_guard_proto_enumTypes[2].Descriptor() } func (Strength) Type() protoreflect.EnumType { return &file_guard_v1_guard_proto_enumTypes[2] } func (x Strength) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } // Deprecated: Use Strength.Descriptor instead. func (Strength) EnumDescriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{2} } type ConfigureRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Settings map[string]string `protobuf:"bytes,1,rep,name=settings,proto3" json:"settings,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` Secrets map[string]string `protobuf:"bytes,2,rep,name=secrets,proto3" json:"secrets,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ConfigureRequest) Reset() { *x = ConfigureRequest{} mi := &file_guard_v1_guard_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ConfigureRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*ConfigureRequest) ProtoMessage() {} func (x *ConfigureRequest) ProtoReflect() protoreflect.Message { mi := &file_guard_v1_guard_proto_msgTypes[0] 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 ConfigureRequest.ProtoReflect.Descriptor instead. func (*ConfigureRequest) Descriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{0} } func (x *ConfigureRequest) GetSettings() map[string]string { if x != nil { return x.Settings } return nil } func (x *ConfigureRequest) GetSecrets() map[string]string { if x != nil { return x.Secrets } return nil } type ConfigureResponse struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *ConfigureResponse) Reset() { *x = ConfigureResponse{} mi := &file_guard_v1_guard_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *ConfigureResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*ConfigureResponse) ProtoMessage() {} func (x *ConfigureResponse) ProtoReflect() protoreflect.Message { mi := &file_guard_v1_guard_proto_msgTypes[1] 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 ConfigureResponse.ProtoReflect.Descriptor instead. func (*ConfigureResponse) Descriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{1} } type DescribeRequest struct { state protoimpl.MessageState `protogen:"open.v1"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *DescribeRequest) Reset() { *x = DescribeRequest{} mi := &file_guard_v1_guard_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *DescribeRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*DescribeRequest) ProtoMessage() {} func (x *DescribeRequest) ProtoReflect() protoreflect.Message { mi := &file_guard_v1_guard_proto_msgTypes[2] 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 DescribeRequest.ProtoReflect.Descriptor instead. func (*DescribeRequest) Descriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{2} } type DescribeResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // contract is the contract version the guard speaks, "v1". Contract string `protobuf:"bytes,1,opt,name=contract,proto3" json:"contract,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // version is the guard's own release, recorded with each verdict. Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` // advisory says the guard's verdicts are recorded and set no ceiling. Advisory bool `protobuf:"varint,4,opt,name=advisory,proto3" json:"advisory,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *DescribeResponse) Reset() { *x = DescribeResponse{} mi := &file_guard_v1_guard_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *DescribeResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*DescribeResponse) ProtoMessage() {} func (x *DescribeResponse) ProtoReflect() protoreflect.Message { mi := &file_guard_v1_guard_proto_msgTypes[3] 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 DescribeResponse.ProtoReflect.Descriptor instead. func (*DescribeResponse) Descriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{3} } func (x *DescribeResponse) GetContract() string { if x != nil { return x.Contract } return "" } func (x *DescribeResponse) GetName() string { if x != nil { return x.Name } return "" } func (x *DescribeResponse) GetVersion() string { if x != nil { return x.Version } return "" } func (x *DescribeResponse) GetAdvisory() bool { if x != nil { return x.Advisory } return false } type Effect struct { state protoimpl.MessageState `protogen:"open.v1"` ReadOnly bool `protobuf:"varint,1,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` Reversibility Reversibility `protobuf:"varint,2,opt,name=reversibility,proto3,enum=guard.v1.Reversibility" json:"reversibility,omitempty"` Summary string `protobuf:"bytes,3,opt,name=summary,proto3" json:"summary,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Effect) Reset() { *x = Effect{} mi := &file_guard_v1_guard_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *Effect) String() string { return protoimpl.X.MessageStringOf(x) } func (*Effect) ProtoMessage() {} func (x *Effect) ProtoReflect() protoreflect.Message { mi := &file_guard_v1_guard_proto_msgTypes[4] 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 Effect.ProtoReflect.Descriptor instead. func (*Effect) Descriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{4} } func (x *Effect) GetReadOnly() bool { if x != nil { return x.ReadOnly } return false } func (x *Effect) GetReversibility() Reversibility { if x != nil { return x.Reversibility } return Reversibility_REVERSIBILITY_UNSPECIFIED } func (x *Effect) GetSummary() string { if x != nil { return x.Summary } return "" } type Target struct { state protoimpl.MessageState `protogen:"open.v1"` Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Environment string `protobuf:"bytes,3,opt,name=environment,proto3" json:"environment,omitempty"` Disposable bool `protobuf:"varint,4,opt,name=disposable,proto3" json:"disposable,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Target) Reset() { *x = Target{} mi := &file_guard_v1_guard_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *Target) String() string { return protoimpl.X.MessageStringOf(x) } func (*Target) ProtoMessage() {} func (x *Target) ProtoReflect() protoreflect.Message { mi := &file_guard_v1_guard_proto_msgTypes[5] 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 Target.ProtoReflect.Descriptor instead. func (*Target) Descriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{5} } func (x *Target) GetKind() string { if x != nil { return x.Kind } return "" } func (x *Target) GetId() string { if x != nil { return x.Id } return "" } func (x *Target) GetEnvironment() string { if x != nil { return x.Environment } return "" } func (x *Target) GetDisposable() bool { if x != nil { return x.Disposable } return false } type RunContext struct { state protoimpl.MessageState `protogen:"open.v1"` RunId string `protobuf:"bytes,1,opt,name=run_id,json=runId,proto3" json:"run_id,omitempty"` // decision_key identifies the attempt to run the action. DecisionKey string `protobuf:"bytes,2,opt,name=decision_key,json=decisionKey,proto3" json:"decision_key,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *RunContext) Reset() { *x = RunContext{} mi := &file_guard_v1_guard_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *RunContext) String() string { return protoimpl.X.MessageStringOf(x) } func (*RunContext) ProtoMessage() {} func (x *RunContext) ProtoReflect() protoreflect.Message { mi := &file_guard_v1_guard_proto_msgTypes[6] 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 RunContext.ProtoReflect.Descriptor instead. func (*RunContext) Descriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{6} } func (x *RunContext) GetRunId() string { if x != nil { return x.RunId } return "" } func (x *RunContext) GetDecisionKey() string { if x != nil { return x.DecisionKey } return "" } type JudgeRequest struct { state protoimpl.MessageState `protogen:"open.v1"` Connector string `protobuf:"bytes,1,opt,name=connector,proto3" json:"connector,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Input []byte `protobuf:"bytes,3,opt,name=input,proto3" json:"input,omitempty"` // digest identifies the exact action: its name and input. Digest string `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"` Target *Target `protobuf:"bytes,5,opt,name=target,proto3" json:"target,omitempty"` Effect *Effect `protobuf:"bytes,6,opt,name=effect,proto3" json:"effect,omitempty"` Run *RunContext `protobuf:"bytes,7,opt,name=run,proto3" json:"run,omitempty"` // deadline is how long the host waits for the verdict. Deadline *durationpb.Duration `protobuf:"bytes,8,opt,name=deadline,proto3" json:"deadline,omitempty"` // at is the host's clock when the action was put to the guard. At *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=at,proto3" json:"at,omitempty"` // diagnosis is what the agent concluded so far, in its own words. Empty // when no agent proposed the action. Diagnosis string `protobuf:"bytes,10,opt,name=diagnosis,proto3" json:"diagnosis,omitempty"` // evidence is what the agent read during the run, oldest first. Evidence []*Evidence `protobuf:"bytes,11,rep,name=evidence,proto3" json:"evidence,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *JudgeRequest) Reset() { *x = JudgeRequest{} mi := &file_guard_v1_guard_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *JudgeRequest) String() string { return protoimpl.X.MessageStringOf(x) } func (*JudgeRequest) ProtoMessage() {} func (x *JudgeRequest) ProtoReflect() protoreflect.Message { mi := &file_guard_v1_guard_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 JudgeRequest.ProtoReflect.Descriptor instead. func (*JudgeRequest) Descriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{7} } func (x *JudgeRequest) GetConnector() string { if x != nil { return x.Connector } return "" } func (x *JudgeRequest) GetName() string { if x != nil { return x.Name } return "" } func (x *JudgeRequest) GetInput() []byte { if x != nil { return x.Input } return nil } func (x *JudgeRequest) GetDigest() string { if x != nil { return x.Digest } return "" } func (x *JudgeRequest) GetTarget() *Target { if x != nil { return x.Target } return nil } func (x *JudgeRequest) GetEffect() *Effect { if x != nil { return x.Effect } return nil } func (x *JudgeRequest) GetRun() *RunContext { if x != nil { return x.Run } return nil } func (x *JudgeRequest) GetDeadline() *durationpb.Duration { if x != nil { return x.Deadline } return nil } func (x *JudgeRequest) GetAt() *timestamppb.Timestamp { if x != nil { return x.At } return nil } func (x *JudgeRequest) GetDiagnosis() string { if x != nil { return x.Diagnosis } return "" } func (x *JudgeRequest) GetEvidence() []*Evidence { if x != nil { return x.Evidence } return nil } // Evidence is one result the agent read, as the tool returned it. type Evidence struct { state protoimpl.MessageState `protogen:"open.v1"` // source names the tool that returned it. Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Evidence) Reset() { *x = Evidence{} mi := &file_guard_v1_guard_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *Evidence) String() string { return protoimpl.X.MessageStringOf(x) } func (*Evidence) ProtoMessage() {} func (x *Evidence) ProtoReflect() protoreflect.Message { mi := &file_guard_v1_guard_proto_msgTypes[8] 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 Evidence.ProtoReflect.Descriptor instead. func (*Evidence) Descriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{8} } func (x *Evidence) GetSource() string { if x != nil { return x.Source } return "" } func (x *Evidence) GetText() string { if x != nil { return x.Text } return "" } type Finding struct { state protoimpl.MessageState `protogen:"open.v1"` Text string `protobuf:"bytes,1,opt,name=text,proto3" json:"text,omitempty"` // evidence is what the finding rests on, in plain words. Evidence string `protobuf:"bytes,2,opt,name=evidence,proto3" json:"evidence,omitempty"` Strength Strength `protobuf:"varint,3,opt,name=strength,proto3,enum=guard.v1.Strength" json:"strength,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *Finding) Reset() { *x = Finding{} mi := &file_guard_v1_guard_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *Finding) String() string { return protoimpl.X.MessageStringOf(x) } func (*Finding) ProtoMessage() {} func (x *Finding) ProtoReflect() protoreflect.Message { mi := &file_guard_v1_guard_proto_msgTypes[9] 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 Finding.ProtoReflect.Descriptor instead. func (*Finding) Descriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{9} } func (x *Finding) GetText() string { if x != nil { return x.Text } return "" } func (x *Finding) GetEvidence() string { if x != nil { return x.Evidence } return "" } func (x *Finding) GetStrength() Strength { if x != nil { return x.Strength } return Strength_STRENGTH_UNSPECIFIED } type JudgeResponse struct { state protoimpl.MessageState `protogen:"open.v1"` // ceiling must be set. A guard with no concern answers CEILING_ACT_QUIETLY. Ceiling Ceiling `protobuf:"varint,1,opt,name=ceiling,proto3,enum=guard.v1.Ceiling" json:"ceiling,omitempty"` Findings []*Finding `protobuf:"bytes,2,rep,name=findings,proto3" json:"findings,omitempty"` // blind_spots are what the guard could not see. BlindSpots []string `protobuf:"bytes,3,rep,name=blind_spots,json=blindSpots,proto3" json:"blind_spots,omitempty"` // judges is every model judgement the verdict rests on, clean answers // included. A guard that asked a model records the answer here, so the // verdict can be audited without asking the model again. Judges []*JudgeRecord `protobuf:"bytes,4,rep,name=judges,proto3" json:"judges,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *JudgeResponse) Reset() { *x = JudgeResponse{} mi := &file_guard_v1_guard_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *JudgeResponse) String() string { return protoimpl.X.MessageStringOf(x) } func (*JudgeResponse) ProtoMessage() {} func (x *JudgeResponse) ProtoReflect() protoreflect.Message { mi := &file_guard_v1_guard_proto_msgTypes[10] 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 JudgeResponse.ProtoReflect.Descriptor instead. func (*JudgeResponse) Descriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{10} } func (x *JudgeResponse) GetCeiling() Ceiling { if x != nil { return x.Ceiling } return Ceiling_CEILING_UNSPECIFIED } func (x *JudgeResponse) GetFindings() []*Finding { if x != nil { return x.Findings } return nil } func (x *JudgeResponse) GetBlindSpots() []string { if x != nil { return x.BlindSpots } return nil } func (x *JudgeResponse) GetJudges() []*JudgeRecord { if x != nil { return x.Judges } return nil } // JudgeRecord is what one model judge answered and what it was judged on. type JudgeRecord struct { state protoimpl.MessageState `protogen:"open.v1"` // model is the model that judged. Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` // result_id identifies the judge's result with the service that ran it. ResultId string `protobuf:"bytes,2,opt,name=result_id,json=resultId,proto3" json:"result_id,omitempty"` // answer is the choice the judge settled on, such as "complies". Answer string `protobuf:"bytes,3,opt,name=answer,proto3" json:"answer,omitempty"` Confidence float64 `protobuf:"fixed64,4,opt,name=confidence,proto3" json:"confidence,omitempty"` // reason is the judge's own reasoning, or why the call failed. Reason string `protobuf:"bytes,5,opt,name=reason,proto3" json:"reason,omitempty"` // basis is the text the judge was given beyond the action itself, such as // the policy rules. basis_digest is its SHA-256 in hex. Basis string `protobuf:"bytes,6,opt,name=basis,proto3" json:"basis,omitempty"` BasisDigest string `protobuf:"bytes,7,opt,name=basis_digest,json=basisDigest,proto3" json:"basis_digest,omitempty"` // answers is every question's answer as JSON: choice, probabilities and // confidence. Answers []byte `protobuf:"bytes,8,opt,name=answers,proto3" json:"answers,omitempty"` // trusted says the judge has passed its recorded eval, so its verdict sets // a ceiling. When false, advisory_reason says why. Trusted bool `protobuf:"varint,9,opt,name=trusted,proto3" json:"trusted,omitempty"` AdvisoryReason string `protobuf:"bytes,10,opt,name=advisory_reason,json=advisoryReason,proto3" json:"advisory_reason,omitempty"` // eval_date is the date of the eval the judge's standing comes from. EvalDate string `protobuf:"bytes,11,opt,name=eval_date,json=evalDate,proto3" json:"eval_date,omitempty"` // request is the exact body sent to the judge endpoint, and response the // exact body it returned, both kept for audit. A failed call records what // was sent and whatever came back. Request []byte `protobuf:"bytes,12,opt,name=request,proto3" json:"request,omitempty"` Response []byte `protobuf:"bytes,13,opt,name=response,proto3" json:"response,omitempty"` // endpoint_path is the path the request was sent to, without the host. EndpointPath string `protobuf:"bytes,14,opt,name=endpoint_path,json=endpointPath,proto3" json:"endpoint_path,omitempty"` // http_status is the response status, or 0 when no response arrived. HttpStatus int32 `protobuf:"varint,15,opt,name=http_status,json=httpStatus,proto3" json:"http_status,omitempty"` // latency_ms is how long the call took, measured by the caller. LatencyMs int64 `protobuf:"varint,16,opt,name=latency_ms,json=latencyMs,proto3" json:"latency_ms,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } func (x *JudgeRecord) Reset() { *x = JudgeRecord{} mi := &file_guard_v1_guard_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } func (x *JudgeRecord) String() string { return protoimpl.X.MessageStringOf(x) } func (*JudgeRecord) ProtoMessage() {} func (x *JudgeRecord) ProtoReflect() protoreflect.Message { mi := &file_guard_v1_guard_proto_msgTypes[11] 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 JudgeRecord.ProtoReflect.Descriptor instead. func (*JudgeRecord) Descriptor() ([]byte, []int) { return file_guard_v1_guard_proto_rawDescGZIP(), []int{11} } func (x *JudgeRecord) GetModel() string { if x != nil { return x.Model } return "" } func (x *JudgeRecord) GetResultId() string { if x != nil { return x.ResultId } return "" } func (x *JudgeRecord) GetAnswer() string { if x != nil { return x.Answer } return "" } func (x *JudgeRecord) GetConfidence() float64 { if x != nil { return x.Confidence } return 0 } func (x *JudgeRecord) GetReason() string { if x != nil { return x.Reason } return "" } func (x *JudgeRecord) GetBasis() string { if x != nil { return x.Basis } return "" } func (x *JudgeRecord) GetBasisDigest() string { if x != nil { return x.BasisDigest } return "" } func (x *JudgeRecord) GetAnswers() []byte { if x != nil { return x.Answers } return nil } func (x *JudgeRecord) GetTrusted() bool { if x != nil { return x.Trusted } return false } func (x *JudgeRecord) GetAdvisoryReason() string { if x != nil { return x.AdvisoryReason } return "" } func (x *JudgeRecord) GetEvalDate() string { if x != nil { return x.EvalDate } return "" } func (x *JudgeRecord) GetRequest() []byte { if x != nil { return x.Request } return nil } func (x *JudgeRecord) GetResponse() []byte { if x != nil { return x.Response } return nil } func (x *JudgeRecord) GetEndpointPath() string { if x != nil { return x.EndpointPath } return "" } func (x *JudgeRecord) GetHttpStatus() int32 { if x != nil { return x.HttpStatus } return 0 } func (x *JudgeRecord) GetLatencyMs() int64 { if x != nil { return x.LatencyMs } return 0 } var File_guard_v1_guard_proto protoreflect.FileDescriptor const file_guard_v1_guard_proto_rawDesc = "" + "\n" + "\x14guard/v1/guard.proto\x12\bguard.v1\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x94\x02\n" + "\x10ConfigureRequest\x12D\n" + "\bsettings\x18\x01 \x03(\v2(.guard.v1.ConfigureRequest.SettingsEntryR\bsettings\x12A\n" + "\asecrets\x18\x02 \x03(\v2'.guard.v1.ConfigureRequest.SecretsEntryR\asecrets\x1a;\n" + "\rSettingsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\x1a:\n" + "\fSecretsEntry\x12\x10\n" + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\"\x13\n" + "\x11ConfigureResponse\"\x11\n" + "\x0fDescribeRequest\"x\n" + "\x10DescribeResponse\x12\x1a\n" + "\bcontract\x18\x01 \x01(\tR\bcontract\x12\x12\n" + "\x04name\x18\x02 \x01(\tR\x04name\x12\x18\n" + "\aversion\x18\x03 \x01(\tR\aversion\x12\x1a\n" + "\badvisory\x18\x04 \x01(\bR\badvisory\"~\n" + "\x06Effect\x12\x1b\n" + "\tread_only\x18\x01 \x01(\bR\breadOnly\x12=\n" + "\rreversibility\x18\x02 \x01(\x0e2\x17.guard.v1.ReversibilityR\rreversibility\x12\x18\n" + "\asummary\x18\x03 \x01(\tR\asummary\"n\n" + "\x06Target\x12\x12\n" + "\x04kind\x18\x01 \x01(\tR\x04kind\x12\x0e\n" + "\x02id\x18\x02 \x01(\tR\x02id\x12 \n" + "\venvironment\x18\x03 \x01(\tR\venvironment\x12\x1e\n" + "\n" + "disposable\x18\x04 \x01(\bR\n" + "disposable\"F\n" + "\n" + "RunContext\x12\x15\n" + "\x06run_id\x18\x01 \x01(\tR\x05runId\x12!\n" + "\fdecision_key\x18\x02 \x01(\tR\vdecisionKey\"\x9b\x03\n" + "\fJudgeRequest\x12\x1c\n" + "\tconnector\x18\x01 \x01(\tR\tconnector\x12\x12\n" + "\x04name\x18\x02 \x01(\tR\x04name\x12\x14\n" + "\x05input\x18\x03 \x01(\fR\x05input\x12\x16\n" + "\x06digest\x18\x04 \x01(\tR\x06digest\x12(\n" + "\x06target\x18\x05 \x01(\v2\x10.guard.v1.TargetR\x06target\x12(\n" + "\x06effect\x18\x06 \x01(\v2\x10.guard.v1.EffectR\x06effect\x12&\n" + "\x03run\x18\a \x01(\v2\x14.guard.v1.RunContextR\x03run\x125\n" + "\bdeadline\x18\b \x01(\v2\x19.google.protobuf.DurationR\bdeadline\x12*\n" + "\x02at\x18\t \x01(\v2\x1a.google.protobuf.TimestampR\x02at\x12\x1c\n" + "\tdiagnosis\x18\n" + " \x01(\tR\tdiagnosis\x12.\n" + "\bevidence\x18\v \x03(\v2\x12.guard.v1.EvidenceR\bevidence\"6\n" + "\bEvidence\x12\x16\n" + "\x06source\x18\x01 \x01(\tR\x06source\x12\x12\n" + "\x04text\x18\x02 \x01(\tR\x04text\"i\n" + "\aFinding\x12\x12\n" + "\x04text\x18\x01 \x01(\tR\x04text\x12\x1a\n" + "\bevidence\x18\x02 \x01(\tR\bevidence\x12.\n" + "\bstrength\x18\x03 \x01(\x0e2\x12.guard.v1.StrengthR\bstrength\"\xbb\x01\n" + "\rJudgeResponse\x12+\n" + "\aceiling\x18\x01 \x01(\x0e2\x11.guard.v1.CeilingR\aceiling\x12-\n" + "\bfindings\x18\x02 \x03(\v2\x11.guard.v1.FindingR\bfindings\x12\x1f\n" + "\vblind_spots\x18\x03 \x03(\tR\n" + "blindSpots\x12-\n" + "\x06judges\x18\x04 \x03(\v2\x15.guard.v1.JudgeRecordR\x06judges\"\xde\x03\n" + "\vJudgeRecord\x12\x14\n" + "\x05model\x18\x01 \x01(\tR\x05model\x12\x1b\n" + "\tresult_id\x18\x02 \x01(\tR\bresultId\x12\x16\n" + "\x06answer\x18\x03 \x01(\tR\x06answer\x12\x1e\n" + "\n" + "confidence\x18\x04 \x01(\x01R\n" + "confidence\x12\x16\n" + "\x06reason\x18\x05 \x01(\tR\x06reason\x12\x14\n" + "\x05basis\x18\x06 \x01(\tR\x05basis\x12!\n" + "\fbasis_digest\x18\a \x01(\tR\vbasisDigest\x12\x18\n" + "\aanswers\x18\b \x01(\fR\aanswers\x12\x18\n" + "\atrusted\x18\t \x01(\bR\atrusted\x12'\n" + "\x0fadvisory_reason\x18\n" + " \x01(\tR\x0eadvisoryReason\x12\x1b\n" + "\teval_date\x18\v \x01(\tR\bevalDate\x12\x18\n" + "\arequest\x18\f \x01(\fR\arequest\x12\x1a\n" + "\bresponse\x18\r \x01(\fR\bresponse\x12#\n" + "\rendpoint_path\x18\x0e \x01(\tR\fendpointPath\x12\x1f\n" + "\vhttp_status\x18\x0f \x01(\x05R\n" + "httpStatus\x12\x1d\n" + "\n" + "latency_ms\x18\x10 \x01(\x03R\tlatencyMs*\x95\x01\n" + "\rReversibility\x12\x1d\n" + "\x19REVERSIBILITY_UNSPECIFIED\x10\x00\x12&\n" + "\"REVERSIBILITY_UNDONE_AUTOMATICALLY\x10\x01\x12\x1d\n" + "\x19REVERSIBILITY_RECOVERABLE\x10\x02\x12\x1e\n" + "\x1aREVERSIBILITY_IRREVERSIBLE\x10\x03*\x9c\x01\n" + "\aCeiling\x12\x17\n" + "\x13CEILING_UNSPECIFIED\x10\x00\x12\x17\n" + "\x13CEILING_ACT_QUIETLY\x10\x01\x12\x18\n" + "\x14CEILING_ACT_AND_TELL\x10\x02\x12\x1c\n" + "\x18CEILING_PROPOSE_AND_WAIT\x10\x03\x12\x14\n" + "\x10CEILING_ESCALATE\x10\x04\x12\x11\n" + "\rCEILING_NEVER\x10\x05*c\n" + "\bStrength\x12\x18\n" + "\x14STRENGTH_UNSPECIFIED\x10\x00\x12\x11\n" + "\rSTRENGTH_WEAK\x10\x01\x12\x15\n" + "\x11STRENGTH_MODERATE\x10\x02\x12\x13\n" + "\x0fSTRENGTH_STRONG\x10\x032\xd1\x01\n" + "\fGuardService\x12D\n" + "\tConfigure\x12\x1a.guard.v1.ConfigureRequest\x1a\x1b.guard.v1.ConfigureResponse\x12A\n" + "\bDescribe\x12\x19.guard.v1.DescribeRequest\x1a\x1a.guard.v1.DescribeResponse\x128\n" + "\x05Judge\x12\x16.guard.v1.JudgeRequest\x1a\x17.guard.v1.JudgeResponseB\x95\x01\n" + "\fcom.guard.v1B\n" + "GuardProtoP\x01Z8github.com/samcharles93/archipelago/sdk/guard/v1;guardv1\xa2\x02\x03GXX\xaa\x02\bGuard.V1\xca\x02\bGuard\\V1\xe2\x02\x14Guard\\V1\\GPBMetadata\xea\x02\tGuard::V1b\x06proto3" var ( file_guard_v1_guard_proto_rawDescOnce sync.Once file_guard_v1_guard_proto_rawDescData []byte ) func file_guard_v1_guard_proto_rawDescGZIP() []byte { file_guard_v1_guard_proto_rawDescOnce.Do(func() { file_guard_v1_guard_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_guard_v1_guard_proto_rawDesc), len(file_guard_v1_guard_proto_rawDesc))) }) return file_guard_v1_guard_proto_rawDescData } var file_guard_v1_guard_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_guard_v1_guard_proto_msgTypes = make([]protoimpl.MessageInfo, 14) var file_guard_v1_guard_proto_goTypes = []any{ (Reversibility)(0), // 0: guard.v1.Reversibility (Ceiling)(0), // 1: guard.v1.Ceiling (Strength)(0), // 2: guard.v1.Strength (*ConfigureRequest)(nil), // 3: guard.v1.ConfigureRequest (*ConfigureResponse)(nil), // 4: guard.v1.ConfigureResponse (*DescribeRequest)(nil), // 5: guard.v1.DescribeRequest (*DescribeResponse)(nil), // 6: guard.v1.DescribeResponse (*Effect)(nil), // 7: guard.v1.Effect (*Target)(nil), // 8: guard.v1.Target (*RunContext)(nil), // 9: guard.v1.RunContext (*JudgeRequest)(nil), // 10: guard.v1.JudgeRequest (*Evidence)(nil), // 11: guard.v1.Evidence (*Finding)(nil), // 12: guard.v1.Finding (*JudgeResponse)(nil), // 13: guard.v1.JudgeResponse (*JudgeRecord)(nil), // 14: guard.v1.JudgeRecord nil, // 15: guard.v1.ConfigureRequest.SettingsEntry nil, // 16: guard.v1.ConfigureRequest.SecretsEntry (*durationpb.Duration)(nil), // 17: google.protobuf.Duration (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp } var file_guard_v1_guard_proto_depIdxs = []int32{ 15, // 0: guard.v1.ConfigureRequest.settings:type_name -> guard.v1.ConfigureRequest.SettingsEntry 16, // 1: guard.v1.ConfigureRequest.secrets:type_name -> guard.v1.ConfigureRequest.SecretsEntry 0, // 2: guard.v1.Effect.reversibility:type_name -> guard.v1.Reversibility 8, // 3: guard.v1.JudgeRequest.target:type_name -> guard.v1.Target 7, // 4: guard.v1.JudgeRequest.effect:type_name -> guard.v1.Effect 9, // 5: guard.v1.JudgeRequest.run:type_name -> guard.v1.RunContext 17, // 6: guard.v1.JudgeRequest.deadline:type_name -> google.protobuf.Duration 18, // 7: guard.v1.JudgeRequest.at:type_name -> google.protobuf.Timestamp 11, // 8: guard.v1.JudgeRequest.evidence:type_name -> guard.v1.Evidence 2, // 9: guard.v1.Finding.strength:type_name -> guard.v1.Strength 1, // 10: guard.v1.JudgeResponse.ceiling:type_name -> guard.v1.Ceiling 12, // 11: guard.v1.JudgeResponse.findings:type_name -> guard.v1.Finding 14, // 12: guard.v1.JudgeResponse.judges:type_name -> guard.v1.JudgeRecord 3, // 13: guard.v1.GuardService.Configure:input_type -> guard.v1.ConfigureRequest 5, // 14: guard.v1.GuardService.Describe:input_type -> guard.v1.DescribeRequest 10, // 15: guard.v1.GuardService.Judge:input_type -> guard.v1.JudgeRequest 4, // 16: guard.v1.GuardService.Configure:output_type -> guard.v1.ConfigureResponse 6, // 17: guard.v1.GuardService.Describe:output_type -> guard.v1.DescribeResponse 13, // 18: guard.v1.GuardService.Judge:output_type -> guard.v1.JudgeResponse 16, // [16:19] is the sub-list for method output_type 13, // [13:16] is the sub-list for method input_type 13, // [13:13] is the sub-list for extension type_name 13, // [13:13] is the sub-list for extension extendee 0, // [0:13] is the sub-list for field type_name } func init() { file_guard_v1_guard_proto_init() } func file_guard_v1_guard_proto_init() { if File_guard_v1_guard_proto != nil { return } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: unsafe.Slice(unsafe.StringData(file_guard_v1_guard_proto_rawDesc), len(file_guard_v1_guard_proto_rawDesc)), NumEnums: 3, NumMessages: 14, NumExtensions: 0, NumServices: 1, }, GoTypes: file_guard_v1_guard_proto_goTypes, DependencyIndexes: file_guard_v1_guard_proto_depIdxs, EnumInfos: file_guard_v1_guard_proto_enumTypes, MessageInfos: file_guard_v1_guard_proto_msgTypes, }.Build() File_guard_v1_guard_proto = out.File file_guard_v1_guard_proto_goTypes = nil file_guard_v1_guard_proto_depIdxs = nil }