Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentRuntime ¶
AgentRuntime holds the model and version of the agent making the request.
type Consequence ¶
type Consequence struct {
Type value.ConsequenceType
// Monetary variant
Amount float64
Currency string
// Risk rating variant
RiskRating value.RiskRating
// Reversibility
Reversible bool
ReversalWindowSeconds int
}
Consequence represents the submitted impact of a decision request. Only one variant should be populated depending on Type.
type DecisionRequest ¶
type DecisionRequest struct {
// Idempotency scoping (schema v2.1)
RequestSource string // Source system identifier (e.g., "loan-origination", "payments-api")
RequestID string // Idempotent request ID within the source
SurfaceID string
AgentID string
Confidence float64
Consequence *Consequence
Context map[string]any
// Governance metadata
ActionType string
ActionDesc string
AgentKind string
ExpiresAt string
Runtime *AgentRuntime
Delegation *Delegation
Subject *Subject
}
DecisionRequest represents the input to the authority evaluation engine.
type Delegation ¶
type Delegation struct {
InitiatedBy string
SessionID string
Chain []string
Scope []string
AuthorizedAt string
AuthorizedUntil string
}
Delegation holds delegation chain claims submitted with the request.
type ReasonCode ¶
type ReasonCode string
ReasonCode explains why a particular outcome was reached. These values form part of the evaluation contract.
const ( // Accept reasons ReasonWithinAuthority ReasonCode = "WITHIN_AUTHORITY" // Escalation reasons ReasonConfidenceBelowThreshold ReasonCode = "CONFIDENCE_BELOW_THRESHOLD" ReasonConsequenceExceedsLimit ReasonCode = "CONSEQUENCE_EXCEEDS_LIMIT" ReasonPolicyDeny ReasonCode = "POLICY_DENY" ReasonPolicyError ReasonCode = "POLICY_ERROR" // Reject reasons ReasonAgentNotFound ReasonCode = "AGENT_NOT_FOUND" ReasonSurfaceNotFound ReasonCode = "SURFACE_NOT_FOUND" ReasonSurfaceInactive ReasonCode = "SURFACE_INACTIVE" ReasonNoActiveGrant ReasonCode = "NO_ACTIVE_GRANT" ReasonProfileNotFound ReasonCode = "PROFILE_NOT_FOUND" ReasonGrantProfileSurfaceMismatch ReasonCode = "GRANT_PROFILE_SURFACE_MISMATCH" // Request clarification reasons ReasonInsufficientContext ReasonCode = "INSUFFICIENT_CONTEXT" )
Click to show internal directories.
Click to hide internal directories.