← All Go packages
github.com/anulum/director-ai/gateway/proto/director/v1
package directorv1 // import "github.com/anulum/director-ai/gateway/proto/director/v1"
CONSTANTS
const (
CoherenceScoring_ScoreClaim_FullMethodName = "/director.v1.CoherenceScoring/ScoreClaim"
CoherenceScoring_ScoreStream_FullMethodName = "/director.v1.CoherenceScoring/ScoreStream"
)
const (
ChatGateway_ChatCompletion_FullMethodName = "/director.v1.ChatGateway/ChatCompletion"
ChatGateway_ChatCompletionStream_FullMethodName = "/director.v1.ChatGateway/ChatCompletionStream"
)
VARIABLES
var (
Role_name = map[int32]string{
0: "ROLE_UNSPECIFIED",
1: "ROLE_SYSTEM",
2: "ROLE_USER",
3: "ROLE_ASSISTANT",
4: "ROLE_TOOL",
}
Role_value = map[string]int32{
"ROLE_UNSPECIFIED": 0,
"ROLE_SYSTEM": 1,
"ROLE_USER": 2,
"ROLE_ASSISTANT": 3,
"ROLE_TOOL": 4,
}
)
Enum value maps for Role.
var (
HaltReason_name = map[int32]string{
0: "HALT_REASON_UNSPECIFIED",
1: "HALT_REASON_NONE",
2: "HALT_REASON_COHERENCE_BELOW_THRESHOLD",
3: "HALT_REASON_INJECTION_DETECTED",
4: "HALT_REASON_POLICY_VIOLATION",
5: "HALT_REASON_TOKEN_TIMEOUT",
6: "HALT_REASON_TOTAL_TIMEOUT",
7: "HALT_REASON_CALLBACK_TIMEOUT",
}
HaltReason_value = map[string]int32{
"HALT_REASON_UNSPECIFIED": 0,
"HALT_REASON_NONE": 1,
"HALT_REASON_COHERENCE_BELOW_THRESHOLD": 2,
"HALT_REASON_INJECTION_DETECTED": 3,
"HALT_REASON_POLICY_VIOLATION": 4,
"HALT_REASON_TOKEN_TIMEOUT": 5,
"HALT_REASON_TOTAL_TIMEOUT": 6,
"HALT_REASON_CALLBACK_TIMEOUT": 7,
}
)
Enum value maps for HaltReason.
var (
PolicyDecision_name = map[int32]string{
0: "POLICY_DECISION_UNSPECIFIED",
1: "POLICY_DECISION_ALLOW",
2: "POLICY_DECISION_WARN",
3: "POLICY_DECISION_HALT",
4: "POLICY_DECISION_BLOCK",
}
PolicyDecision_value = map[string]int32{
"POLICY_DECISION_UNSPECIFIED": 0,
"POLICY_DECISION_ALLOW": 1,
"POLICY_DECISION_WARN": 2,
"POLICY_DECISION_HALT": 3,
"POLICY_DECISION_BLOCK": 4,
}
)
Enum value maps for PolicyDecision.
var (
TenantTier_name = map[int32]string{
0: "TENANT_TIER_UNSPECIFIED",
1: "TENANT_TIER_INDIE",
2: "TENANT_TIER_PRO",
3: "TENANT_TIER_PERPETUAL",
4: "TENANT_TIER_ENTERPRISE_PILOT",
5: "TENANT_TIER_ENTERPRISE",
}
TenantTier_value = map[string]int32{
"TENANT_TIER_UNSPECIFIED": 0,
"TENANT_TIER_INDIE": 1,
"TENANT_TIER_PRO": 2,
"TENANT_TIER_PERPETUAL": 3,
"TENANT_TIER_ENTERPRISE_PILOT": 4,
"TENANT_TIER_ENTERPRISE": 5,
}
)
Enum value maps for TenantTier.
var ChatGateway_ServiceDesc = grpc.ServiceDesc{
ServiceName: "director.v1.ChatGateway",
HandlerType: (*ChatGatewayServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ChatCompletion",
Handler: _ChatGateway_ChatCompletion_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "ChatCompletionStream",
Handler: _ChatGateway_ChatCompletionStream_Handler,
ServerStreams: true,
},
},
Metadata: "director/v1/director.proto",
}
ChatGateway_ServiceDesc is the grpc.ServiceDesc for ChatGateway service.
It's only intended for direct use with grpc.RegisterService, and not to be
introspected or modified (even as a copy)
var CoherenceScoring_ServiceDesc = grpc.ServiceDesc{
ServiceName: "director.v1.CoherenceScoring",
HandlerType: (*CoherenceScoringServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ScoreClaim",
Handler: _CoherenceScoring_ScoreClaim_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "ScoreStream",
Handler: _CoherenceScoring_ScoreStream_Handler,
ServerStreams: true,
ClientStreams: true,
},
},
Metadata: "director/v1/director.proto",
}
CoherenceScoring_ServiceDesc is the grpc.ServiceDesc for CoherenceScoring
service. It's only intended for direct use with grpc.RegisterService,
and not to be introspected or modified (even as a copy)
var File_director_v1_director_proto protoreflect.FileDescriptor
FUNCTIONS
func RegisterChatGatewayServer(s grpc.ServiceRegistrar, srv ChatGatewayServer)
func RegisterCoherenceScoringServer(s grpc.ServiceRegistrar, srv CoherenceScoringServer)
TYPES
type APIKeyMetadata struct {
// Truncated salted fingerprint — never the raw key.
Fingerprint string `protobuf:"bytes,1,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
TenantId string `protobuf:"bytes,2,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
// When the key was issued, in unix seconds UTC.
IssuedUnix int64 `protobuf:"varint,3,opt,name=issued_unix,json=issuedUnix,proto3" json:"issued_unix,omitempty"`
// When the key should stop working. Zero = no expiry.
ExpiresUnix int64 `protobuf:"varint,4,opt,name=expires_unix,json=expiresUnix,proto3" json:"expires_unix,omitempty"`
Revoked bool `protobuf:"varint,5,opt,name=revoked,proto3" json:"revoked,omitempty"`
// Has unexported fields.
}
func (*APIKeyMetadata) Descriptor() ([]byte, []int)
Deprecated: Use APIKeyMetadata.ProtoReflect.Descriptor instead.
func (x *APIKeyMetadata) GetExpiresUnix() int64
func (x *APIKeyMetadata) GetFingerprint() string
func (x *APIKeyMetadata) GetIssuedUnix() int64
func (x *APIKeyMetadata) GetRevoked() bool
func (x *APIKeyMetadata) GetTenantId() string
func (*APIKeyMetadata) ProtoMessage()
func (x *APIKeyMetadata) ProtoReflect() protoreflect.Message
func (x *APIKeyMetadata) Reset()
func (x *APIKeyMetadata) String() string
type AuditRecord struct {
// RFC-3339 string with nanosecond resolution. String form keeps
// the wire format readable in text logs and survives clock-skew
// debates between services.
Timestamp string `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
TenantId string `protobuf:"bytes,3,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
ApiKeyFingerprint string `protobuf:"bytes,4,opt,name=api_key_fingerprint,json=apiKeyFingerprint,proto3" json:"api_key_fingerprint,omitempty"`
// Salted hash of the input query — never the plaintext.
QueryHash string `protobuf:"bytes,5,opt,name=query_hash,json=queryHash,proto3" json:"query_hash,omitempty"`
// Response length in characters, for volume metrics. Zero on halt.
ResponseLength int32 `protobuf:"varint,6,opt,name=response_length,json=responseLength,proto3" json:"response_length,omitempty"`
Verdict *CoherenceVerdict `protobuf:"bytes,7,opt,name=verdict,proto3" json:"verdict,omitempty"`
// Structured policy violation codes.
PolicyViolations []string `protobuf:"bytes,8,rep,name=policy_violations,json=policyViolations,proto3" json:"policy_violations,omitempty"`
// Wall time the decision took end-to-end at the gateway.
LatencyMs int64 `protobuf:"varint,9,opt,name=latency_ms,json=latencyMs,proto3" json:"latency_ms,omitempty"`
// Model name actually routed to (may differ from requested model
// when the gateway falls back). Empty on pure heuristic scoring.
Model string `protobuf:"bytes,10,opt,name=model,proto3" json:"model,omitempty"`
// Safety hook decisions attached to this audit row.
SafetyEvents []*SafetyEvent `protobuf:"bytes,11,rep,name=safety_events,json=safetyEvents,proto3" json:"safety_events,omitempty"`
// Has unexported fields.
}
func (*AuditRecord) Descriptor() ([]byte, []int)
Deprecated: Use AuditRecord.ProtoReflect.Descriptor instead.
func (x *AuditRecord) GetApiKeyFingerprint() string
func (x *AuditRecord) GetLatencyMs() int64
func (x *AuditRecord) GetModel() string
func (x *AuditRecord) GetPolicyViolations() []string
func (x *AuditRecord) GetQueryHash() string
func (x *AuditRecord) GetRequestId() string
func (x *AuditRecord) GetResponseLength() int32
func (x *AuditRecord) GetSafetyEvents() []*SafetyEvent
func (x *AuditRecord) GetTenantId() string
func (x *AuditRecord) GetTimestamp() string
func (x *AuditRecord) GetVerdict() *CoherenceVerdict
func (*AuditRecord) ProtoMessage()
func (x *AuditRecord) ProtoReflect() protoreflect.Message
func (x *AuditRecord) Reset()
func (x *AuditRecord) String() string
type ChatChoice struct {
Index int32 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
Message *ChatMessage `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// Delta content for streaming chunks. Assistants should populate
// `message.content` for non-stream and `delta_content` for stream.
DeltaContent string `protobuf:"bytes,3,opt,name=delta_content,json=deltaContent,proto3" json:"delta_content,omitempty"`
FinishReason string `protobuf:"bytes,4,opt,name=finish_reason,json=finishReason,proto3" json:"finish_reason,omitempty"`
// Has unexported fields.
}
func (*ChatChoice) Descriptor() ([]byte, []int)
Deprecated: Use ChatChoice.ProtoReflect.Descriptor instead.
func (x *ChatChoice) GetDeltaContent() string
func (x *ChatChoice) GetFinishReason() string
func (x *ChatChoice) GetIndex() int32
func (x *ChatChoice) GetMessage() *ChatMessage
func (*ChatChoice) ProtoMessage()
func (x *ChatChoice) ProtoReflect() protoreflect.Message
func (x *ChatChoice) Reset()
func (x *ChatChoice) String() string
type ChatCompletionRequest struct {
Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"`
Messages []*ChatMessage `protobuf:"bytes,2,rep,name=messages,proto3" json:"messages,omitempty"`
// Sampling temperature. Zero signals "unset"; gateways forward
// the upstream default rather than zero-inject.
Temperature float32 `protobuf:"fixed32,3,opt,name=temperature,proto3" json:"temperature,omitempty"`
MaxTokens int32 `protobuf:"varint,4,opt,name=max_tokens,json=maxTokens,proto3" json:"max_tokens,omitempty"`
Stream bool `protobuf:"varint,5,opt,name=stream,proto3" json:"stream,omitempty"`
// Tenant binding. Empty = use the tenant bound to the API key.
TenantId string `protobuf:"bytes,6,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
// Opaque per-request ID for correlation. Gateways must not mutate.
RequestId string `protobuf:"bytes,7,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
// Has unexported fields.
}
func (*ChatCompletionRequest) Descriptor() ([]byte, []int)
Deprecated: Use ChatCompletionRequest.ProtoReflect.Descriptor instead.
func (x *ChatCompletionRequest) GetMaxTokens() int32
func (x *ChatCompletionRequest) GetMessages() []*ChatMessage
func (x *ChatCompletionRequest) GetModel() string
func (x *ChatCompletionRequest) GetRequestId() string
func (x *ChatCompletionRequest) GetStream() bool
func (x *ChatCompletionRequest) GetTemperature() float32
func (x *ChatCompletionRequest) GetTenantId() string
func (*ChatCompletionRequest) ProtoMessage()
func (x *ChatCompletionRequest) ProtoReflect() protoreflect.Message
func (x *ChatCompletionRequest) Reset()
func (x *ChatCompletionRequest) String() string
type ChatCompletionResponse struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Model string `protobuf:"bytes,2,opt,name=model,proto3" json:"model,omitempty"`
CreatedUnix int64 `protobuf:"varint,3,opt,name=created_unix,json=createdUnix,proto3" json:"created_unix,omitempty"`
Choices []*ChatChoice `protobuf:"bytes,4,rep,name=choices,proto3" json:"choices,omitempty"`
Usage *TokenUsage `protobuf:"bytes,5,opt,name=usage,proto3" json:"usage,omitempty"`
// Director-AI augmentation. Present on both stream chunks and
// final non-stream responses.
Coherence *CoherenceVerdict `protobuf:"bytes,6,opt,name=coherence,proto3" json:"coherence,omitempty"`
// Has unexported fields.
}
func (*ChatCompletionResponse) Descriptor() ([]byte, []int)
Deprecated: Use ChatCompletionResponse.ProtoReflect.Descriptor instead.
func (x *ChatCompletionResponse) GetChoices() []*ChatChoice
func (x *ChatCompletionResponse) GetCoherence() *CoherenceVerdict
func (x *ChatCompletionResponse) GetCreatedUnix() int64
func (x *ChatCompletionResponse) GetId() string
func (x *ChatCompletionResponse) GetModel() string
func (x *ChatCompletionResponse) GetUsage() *TokenUsage
func (*ChatCompletionResponse) ProtoMessage()
func (x *ChatCompletionResponse) ProtoReflect() protoreflect.Message
func (x *ChatCompletionResponse) Reset()
func (x *ChatCompletionResponse) String() string
type ChatGatewayClient interface {
ChatCompletion(ctx context.Context, in *ChatCompletionRequest, opts ...grpc.CallOption) (*ChatCompletionResponse, error)
ChatCompletionStream(ctx context.Context, in *ChatCompletionRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[ChatCompletionResponse], error)
}
ChatGatewayClient is the client API for ChatGateway service.
For semantics around ctx use and closing/ending streaming RPCs, please refer
to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewChatGatewayClient(cc grpc.ClientConnInterface) ChatGatewayClient
type ChatGatewayServer interface {
ChatCompletion(context.Context, *ChatCompletionRequest) (*ChatCompletionResponse, error)
ChatCompletionStream(*ChatCompletionRequest, grpc.ServerStreamingServer[ChatCompletionResponse]) error
// Has unexported methods.
}
ChatGatewayServer is the server API for ChatGateway service. All
implementations must embed UnimplementedChatGatewayServer for forward
compatibility.
type ChatGateway_ChatCompletionStreamClient = grpc.ServerStreamingClient[ChatCompletionResponse]
This type alias is provided for backwards compatibility with existing code
that references the prior non-generic stream type by name.
type ChatGateway_ChatCompletionStreamServer = grpc.ServerStreamingServer[ChatCompletionResponse]
This type alias is provided for backwards compatibility with existing code
that references the prior non-generic stream type by name.
type ChatMessage struct {
Role Role `protobuf:"varint,1,opt,name=role,proto3,enum=director.v1.Role" json:"role,omitempty"`
Content string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
// OpenAI allows a stable name per message, used for multi-user
// conversations and tool responses. Empty = not set.
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
// Has unexported fields.
}
func (*ChatMessage) Descriptor() ([]byte, []int)
Deprecated: Use ChatMessage.ProtoReflect.Descriptor instead.
func (x *ChatMessage) GetContent() string
func (x *ChatMessage) GetName() string
func (x *ChatMessage) GetRole() Role
func (*ChatMessage) ProtoMessage()
func (x *ChatMessage) ProtoReflect() protoreflect.Message
func (x *ChatMessage) Reset()
func (x *ChatMessage) String() string
type CoherenceScoringClient interface {
ScoreClaim(ctx context.Context, in *ScoreClaimRequest, opts ...grpc.CallOption) (*ScoreClaimResponse, error)
ScoreStream(ctx context.Context, opts ...grpc.CallOption) (grpc.BidiStreamingClient[ScoreTokenRequest, ScoreTokenResponse], error)
}
CoherenceScoringClient is the client API for CoherenceScoring service.
For semantics around ctx use and closing/ending streaming RPCs, please refer
to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewCoherenceScoringClient(cc grpc.ClientConnInterface) CoherenceScoringClient
type CoherenceScoringServer interface {
ScoreClaim(context.Context, *ScoreClaimRequest) (*ScoreClaimResponse, error)
ScoreStream(grpc.BidiStreamingServer[ScoreTokenRequest, ScoreTokenResponse]) error
// Has unexported methods.
}
CoherenceScoringServer is the server API for CoherenceScoring service.
All implementations must embed UnimplementedCoherenceScoringServer for
forward compatibility.
type CoherenceScoring_ScoreStreamClient = grpc.BidiStreamingClient[ScoreTokenRequest, ScoreTokenResponse]
This type alias is provided for backwards compatibility with existing code
that references the prior non-generic stream type by name.
type CoherenceScoring_ScoreStreamServer = grpc.BidiStreamingServer[ScoreTokenRequest, ScoreTokenResponse]
This type alias is provided for backwards compatibility with existing code
that references the prior non-generic stream type by name.
type CoherenceVerdict struct {
Score float32 `protobuf:"fixed32,1,opt,name=score,proto3" json:"score,omitempty"`
Halted bool `protobuf:"varint,2,opt,name=halted,proto3" json:"halted,omitempty"`
HaltReason HaltReason `protobuf:"varint,3,opt,name=halt_reason,json=haltReason,proto3,enum=director.v1.HaltReason" json:"halt_reason,omitempty"`
// Scores below `hard_limit` halt the stream. Carried on the wire
// so a thin client can log the operating point without querying
// the server for its configuration.
HardLimit float32 `protobuf:"fixed32,4,opt,name=hard_limit,json=hardLimit,proto3" json:"hard_limit,omitempty"`
// Confidence intervals for `score`, if computed. Zero-zero means
// "not available" — consumers must not infer tight certainty from
// an absent CI.
ScoreLower float32 `protobuf:"fixed32,5,opt,name=score_lower,json=scoreLower,proto3" json:"score_lower,omitempty"`
ScoreUpper float32 `protobuf:"fixed32,6,opt,name=score_upper,json=scoreUpper,proto3" json:"score_upper,omitempty"`
// Evidence trail for the verdict. Unused in heuristic mode.
Sources []*GroundingSource `protobuf:"bytes,7,rep,name=sources,proto3" json:"sources,omitempty"`
// Free-form human string for logging and UI hover. Machine
// consumers should branch on `halt_reason`, not parse this.
Message string `protobuf:"bytes,8,opt,name=message,proto3" json:"message,omitempty"`
// Has unexported fields.
}
func (*CoherenceVerdict) Descriptor() ([]byte, []int)
Deprecated: Use CoherenceVerdict.ProtoReflect.Descriptor instead.
func (x *CoherenceVerdict) GetHaltReason() HaltReason
func (x *CoherenceVerdict) GetHalted() bool
func (x *CoherenceVerdict) GetHardLimit() float32
func (x *CoherenceVerdict) GetMessage() string
func (x *CoherenceVerdict) GetScore() float32
func (x *CoherenceVerdict) GetScoreLower() float32
func (x *CoherenceVerdict) GetScoreUpper() float32
func (x *CoherenceVerdict) GetSources() []*GroundingSource
func (*CoherenceVerdict) ProtoMessage()
func (x *CoherenceVerdict) ProtoReflect() protoreflect.Message
func (x *CoherenceVerdict) Reset()
func (x *CoherenceVerdict) String() string
type GroundingSource struct {
SourceId string `protobuf:"bytes,1,opt,name=source_id,json=sourceId,proto3" json:"source_id,omitempty"`
Similarity float32 `protobuf:"fixed32,2,opt,name=similarity,proto3" json:"similarity,omitempty"`
NliSupport float32 `protobuf:"fixed32,3,opt,name=nli_support,json=nliSupport,proto3" json:"nli_support,omitempty"`
// Has unexported fields.
}
One line of scorer output for a claim-document pair. Ground-truth sources
that survive grounding are listed; full source text is not duplicated — a
reference is enough at the wire boundary.
func (*GroundingSource) Descriptor() ([]byte, []int)
Deprecated: Use GroundingSource.ProtoReflect.Descriptor instead.
func (x *GroundingSource) GetNliSupport() float32
func (x *GroundingSource) GetSimilarity() float32
func (x *GroundingSource) GetSourceId() string
func (*GroundingSource) ProtoMessage()
func (x *GroundingSource) ProtoReflect() protoreflect.Message
func (x *GroundingSource) Reset()
func (x *GroundingSource) String() string
type HaltReason int32
const (
HaltReason_HALT_REASON_UNSPECIFIED HaltReason = 0
HaltReason_HALT_REASON_NONE HaltReason = 1
HaltReason_HALT_REASON_COHERENCE_BELOW_THRESHOLD HaltReason = 2
HaltReason_HALT_REASON_INJECTION_DETECTED HaltReason = 3
HaltReason_HALT_REASON_POLICY_VIOLATION HaltReason = 4
HaltReason_HALT_REASON_TOKEN_TIMEOUT HaltReason = 5
HaltReason_HALT_REASON_TOTAL_TIMEOUT HaltReason = 6
HaltReason_HALT_REASON_CALLBACK_TIMEOUT HaltReason = 7
)
func (HaltReason) Descriptor() protoreflect.EnumDescriptor
func (x HaltReason) Enum() *HaltReason
func (HaltReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use HaltReason.Descriptor instead.
func (x HaltReason) Number() protoreflect.EnumNumber
func (x HaltReason) String() string
func (HaltReason) Type() protoreflect.EnumType
type PolicyDecision int32
const (
PolicyDecision_POLICY_DECISION_UNSPECIFIED PolicyDecision = 0
PolicyDecision_POLICY_DECISION_ALLOW PolicyDecision = 1
PolicyDecision_POLICY_DECISION_WARN PolicyDecision = 2
PolicyDecision_POLICY_DECISION_HALT PolicyDecision = 3
PolicyDecision_POLICY_DECISION_BLOCK PolicyDecision = 4
)
func (PolicyDecision) Descriptor() protoreflect.EnumDescriptor
func (x PolicyDecision) Enum() *PolicyDecision
func (PolicyDecision) EnumDescriptor() ([]byte, []int)
Deprecated: Use PolicyDecision.Descriptor instead.
func (x PolicyDecision) Number() protoreflect.EnumNumber
func (x PolicyDecision) String() string
func (PolicyDecision) Type() protoreflect.EnumType
type Role int32
const (
Role_ROLE_UNSPECIFIED Role = 0
Role_ROLE_SYSTEM Role = 1
Role_ROLE_USER Role = 2
Role_ROLE_ASSISTANT Role = 3
Role_ROLE_TOOL Role = 4
)
func (Role) Descriptor() protoreflect.EnumDescriptor
func (x Role) Enum() *Role
func (Role) EnumDescriptor() ([]byte, []int)
Deprecated: Use Role.Descriptor instead.
func (x Role) Number() protoreflect.EnumNumber
func (x Role) String() string
func (Role) Type() protoreflect.EnumType
type SafetyEvent struct {
SchemaVersion string `protobuf:"bytes,1,opt,name=schema_version,json=schemaVersion,proto3" json:"schema_version,omitempty"`
EventId string `protobuf:"bytes,2,opt,name=event_id,json=eventId,proto3" json:"event_id,omitempty"`
Timestamp string `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
TenantId string `protobuf:"bytes,5,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
HookId string `protobuf:"bytes,6,opt,name=hook_id,json=hookId,proto3" json:"hook_id,omitempty"`
HookScope string `protobuf:"bytes,7,opt,name=hook_scope,json=hookScope,proto3" json:"hook_scope,omitempty"`
PolicyDecision PolicyDecision `protobuf:"varint,8,opt,name=policy_decision,json=policyDecision,proto3,enum=director.v1.PolicyDecision" json:"policy_decision,omitempty"`
HaltReason HaltReason `protobuf:"varint,9,opt,name=halt_reason,json=haltReason,proto3,enum=director.v1.HaltReason" json:"halt_reason,omitempty"`
Threshold float32 `protobuf:"fixed32,10,opt,name=threshold,proto3" json:"threshold,omitempty"`
ObservedScore float32 `protobuf:"fixed32,11,opt,name=observed_score,json=observedScore,proto3" json:"observed_score,omitempty"`
LatencyMs int64 `protobuf:"varint,12,opt,name=latency_ms,json=latencyMs,proto3" json:"latency_ms,omitempty"`
EvidenceRefs []string `protobuf:"bytes,13,rep,name=evidence_refs,json=evidenceRefs,proto3" json:"evidence_refs,omitempty"`
TenantSafeExplanation string `protobuf:"bytes,14,opt,name=tenant_safe_explanation,json=tenantSafeExplanation,proto3" json:"tenant_safe_explanation,omitempty"`
Attributes map[string]string `protobuf:"bytes,15,rep,name=attributes,proto3" json:"attributes,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
// Has unexported fields.
}
Tenant-safe halt or policy decision emitted by any safety hook. The event
carries references and short explanations only; raw prompts, model output,
and raw evidence text stay outside the wire event.
func (*SafetyEvent) Descriptor() ([]byte, []int)
Deprecated: Use SafetyEvent.ProtoReflect.Descriptor instead.
func (x *SafetyEvent) GetAttributes() map[string]string
func (x *SafetyEvent) GetEventId() string
func (x *SafetyEvent) GetEvidenceRefs() []string
func (x *SafetyEvent) GetHaltReason() HaltReason
func (x *SafetyEvent) GetHookId() string
func (x *SafetyEvent) GetHookScope() string
func (x *SafetyEvent) GetLatencyMs() int64
func (x *SafetyEvent) GetObservedScore() float32
func (x *SafetyEvent) GetPolicyDecision() PolicyDecision
func (x *SafetyEvent) GetRequestId() string
func (x *SafetyEvent) GetSchemaVersion() string
func (x *SafetyEvent) GetTenantId() string
func (x *SafetyEvent) GetTenantSafeExplanation() string
func (x *SafetyEvent) GetThreshold() float32
func (x *SafetyEvent) GetTimestamp() string
func (*SafetyEvent) ProtoMessage()
func (x *SafetyEvent) ProtoReflect() protoreflect.Message
func (x *SafetyEvent) Reset()
func (x *SafetyEvent) String() string
type ScoreClaimRequest struct {
Claim string `protobuf:"bytes,1,opt,name=claim,proto3" json:"claim,omitempty"`
Documents []string `protobuf:"bytes,2,rep,name=documents,proto3" json:"documents,omitempty"`
TenantId string `protobuf:"bytes,3,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
RequestId string `protobuf:"bytes,4,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
// Per-call override of the server default. Zero = use server.
Threshold float32 `protobuf:"fixed32,5,opt,name=threshold,proto3" json:"threshold,omitempty"`
// Has unexported fields.
}
Single-shot scoring RPC input. Kept flat so clients can batch claims without
nesting.
func (*ScoreClaimRequest) Descriptor() ([]byte, []int)
Deprecated: Use ScoreClaimRequest.ProtoReflect.Descriptor instead.
func (x *ScoreClaimRequest) GetClaim() string
func (x *ScoreClaimRequest) GetDocuments() []string
func (x *ScoreClaimRequest) GetRequestId() string
func (x *ScoreClaimRequest) GetTenantId() string
func (x *ScoreClaimRequest) GetThreshold() float32
func (*ScoreClaimRequest) ProtoMessage()
func (x *ScoreClaimRequest) ProtoReflect() protoreflect.Message
func (x *ScoreClaimRequest) Reset()
func (x *ScoreClaimRequest) String() string
type ScoreClaimResponse struct {
Verdict *CoherenceVerdict `protobuf:"bytes,1,opt,name=verdict,proto3" json:"verdict,omitempty"`
// Server-measured wall time, independent of any client-side timer.
LatencyMs int64 `protobuf:"varint,2,opt,name=latency_ms,json=latencyMs,proto3" json:"latency_ms,omitempty"`
// Has unexported fields.
}
func (*ScoreClaimResponse) Descriptor() ([]byte, []int)
Deprecated: Use ScoreClaimResponse.ProtoReflect.Descriptor instead.
func (x *ScoreClaimResponse) GetLatencyMs() int64
func (x *ScoreClaimResponse) GetVerdict() *CoherenceVerdict
func (*ScoreClaimResponse) ProtoMessage()
func (x *ScoreClaimResponse) ProtoReflect() protoreflect.Message
func (x *ScoreClaimResponse) Reset()
func (x *ScoreClaimResponse) String() string
type ScoreTokenRequest struct {
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
RequestId string `protobuf:"bytes,2,opt,name=request_id,json=requestId,proto3" json:"request_id,omitempty"`
// Accumulated assistant output to this point (not a delta). Mirrors
// the `accumulated = "".join(output_buffer) + token` shape on the
// Python side.
AccumulatedText string `protobuf:"bytes,3,opt,name=accumulated_text,json=accumulatedText,proto3" json:"accumulated_text,omitempty"`
// Candidate token about to be emitted. Empty on the final "flush"
// request that closes the stream.
NextToken string `protobuf:"bytes,4,opt,name=next_token,json=nextToken,proto3" json:"next_token,omitempty"`
Documents []string `protobuf:"bytes,5,rep,name=documents,proto3" json:"documents,omitempty"`
// Has unexported fields.
}
Streaming scoring: one request per token (or chunk), one verdict per token.
The server decides when to halt; clients must honour `halted` immediately on
any chunk.
func (*ScoreTokenRequest) Descriptor() ([]byte, []int)
Deprecated: Use ScoreTokenRequest.ProtoReflect.Descriptor instead.
func (x *ScoreTokenRequest) GetAccumulatedText() string
func (x *ScoreTokenRequest) GetDocuments() []string
func (x *ScoreTokenRequest) GetNextToken() string
func (x *ScoreTokenRequest) GetRequestId() string
func (x *ScoreTokenRequest) GetTenantId() string
func (*ScoreTokenRequest) ProtoMessage()
func (x *ScoreTokenRequest) ProtoReflect() protoreflect.Message
func (x *ScoreTokenRequest) Reset()
func (x *ScoreTokenRequest) String() string
type ScoreTokenResponse struct {
Verdict *CoherenceVerdict `protobuf:"bytes,1,opt,name=verdict,proto3" json:"verdict,omitempty"`
// Has unexported fields.
}
func (*ScoreTokenResponse) Descriptor() ([]byte, []int)
Deprecated: Use ScoreTokenResponse.ProtoReflect.Descriptor instead.
func (x *ScoreTokenResponse) GetVerdict() *CoherenceVerdict
func (*ScoreTokenResponse) ProtoMessage()
func (x *ScoreTokenResponse) ProtoReflect() protoreflect.Message
func (x *ScoreTokenResponse) Reset()
func (x *ScoreTokenResponse) String() string
type Tenant struct {
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
Tier TenantTier `protobuf:"varint,3,opt,name=tier,proto3,enum=director.v1.TenantTier" json:"tier,omitempty"`
// When the tenant was created, in unix seconds UTC.
CreatedUnix int64 `protobuf:"varint,4,opt,name=created_unix,json=createdUnix,proto3" json:"created_unix,omitempty"`
// Per-tenant rate limits. Zero = inherit gateway default.
RpmLimit int32 `protobuf:"varint,5,opt,name=rpm_limit,json=rpmLimit,proto3" json:"rpm_limit,omitempty"`
RpdLimit int32 `protobuf:"varint,6,opt,name=rpd_limit,json=rpdLimit,proto3" json:"rpd_limit,omitempty"`
// Fingerprint identifier of the API key bound to this tenant, as
// emitted by audit_salt.get_audit_salt + truncated SHA-256. Raw
// keys never cross this wire.
ApiKeyFingerprints []string `protobuf:"bytes,7,rep,name=api_key_fingerprints,json=apiKeyFingerprints,proto3" json:"api_key_fingerprints,omitempty"`
// Has unexported fields.
}
func (*Tenant) Descriptor() ([]byte, []int)
Deprecated: Use Tenant.ProtoReflect.Descriptor instead.
func (x *Tenant) GetApiKeyFingerprints() []string
func (x *Tenant) GetCreatedUnix() int64
func (x *Tenant) GetDisplayName() string
func (x *Tenant) GetRpdLimit() int32
func (x *Tenant) GetRpmLimit() int32
func (x *Tenant) GetTenantId() string
func (x *Tenant) GetTier() TenantTier
func (*Tenant) ProtoMessage()
func (x *Tenant) ProtoReflect() protoreflect.Message
func (x *Tenant) Reset()
func (x *Tenant) String() string
type TenantTier int32
const (
TenantTier_TENANT_TIER_UNSPECIFIED TenantTier = 0
TenantTier_TENANT_TIER_INDIE TenantTier = 1
TenantTier_TENANT_TIER_PRO TenantTier = 2
TenantTier_TENANT_TIER_PERPETUAL TenantTier = 3
TenantTier_TENANT_TIER_ENTERPRISE_PILOT TenantTier = 4
TenantTier_TENANT_TIER_ENTERPRISE TenantTier = 5
)
func (TenantTier) Descriptor() protoreflect.EnumDescriptor
func (x TenantTier) Enum() *TenantTier
func (TenantTier) EnumDescriptor() ([]byte, []int)
Deprecated: Use TenantTier.Descriptor instead.
func (x TenantTier) Number() protoreflect.EnumNumber
func (x TenantTier) String() string
func (TenantTier) Type() protoreflect.EnumType
type TokenUsage struct {
PromptTokens int32 `protobuf:"varint,1,opt,name=prompt_tokens,json=promptTokens,proto3" json:"prompt_tokens,omitempty"`
CompletionTokens int32 `protobuf:"varint,2,opt,name=completion_tokens,json=completionTokens,proto3" json:"completion_tokens,omitempty"`
TotalTokens int32 `protobuf:"varint,3,opt,name=total_tokens,json=totalTokens,proto3" json:"total_tokens,omitempty"`
// Has unexported fields.
}
func (*TokenUsage) Descriptor() ([]byte, []int)
Deprecated: Use TokenUsage.ProtoReflect.Descriptor instead.
func (x *TokenUsage) GetCompletionTokens() int32
func (x *TokenUsage) GetPromptTokens() int32
func (x *TokenUsage) GetTotalTokens() int32
func (*TokenUsage) ProtoMessage()
func (x *TokenUsage) ProtoReflect() protoreflect.Message
func (x *TokenUsage) Reset()
func (x *TokenUsage) String() string
type UnimplementedChatGatewayServer struct{}
UnimplementedChatGatewayServer must be embedded to have forward compatible
implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil
pointer dereference when methods are called.
func (UnimplementedChatGatewayServer) ChatCompletion(context.Context, *ChatCompletionRequest) (*ChatCompletionResponse, error)
func (UnimplementedChatGatewayServer) ChatCompletionStream(*ChatCompletionRequest, grpc.ServerStreamingServer[ChatCompletionResponse]) error
type UnimplementedCoherenceScoringServer struct{}
UnimplementedCoherenceScoringServer must be embedded to have forward
compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil
pointer dereference when methods are called.
func (UnimplementedCoherenceScoringServer) ScoreClaim(context.Context, *ScoreClaimRequest) (*ScoreClaimResponse, error)
func (UnimplementedCoherenceScoringServer) ScoreStream(grpc.BidiStreamingServer[ScoreTokenRequest, ScoreTokenResponse]) error
type UnsafeChatGatewayServer interface {
// Has unexported methods.
}
UnsafeChatGatewayServer may be embedded to opt out of forward compatibility
for this service. Use of this interface is not recommended, as added methods
to ChatGatewayServer will result in compilation errors.
type UnsafeCoherenceScoringServer interface {
// Has unexported methods.
}
UnsafeCoherenceScoringServer may be embedded to opt out of forward
compatibility for this service. Use of this interface is not recommended, as
added methods to CoherenceScoringServer will result in compilation errors.