pub struct OutputContractSnapshot {Show 14 fields
pub schema_id: OutputSchemaId,
pub schema_version: SchemaVersion,
pub schema_fingerprint: String,
pub dialect: OutputSchemaDialect,
pub mode: OutputMode,
pub validation_policy_ref: PolicyRef,
pub repair_policy_ref: PolicyRef,
pub local_validator_version: String,
pub provider_hint_policy: ProviderHintPolicy,
pub validation: ValidationPolicy,
pub repair: RepairPolicy,
pub retry_budget: RetryBudget,
pub content_policy: ContentCapturePolicy,
pub projection_hint: OutputProjectionHint,
}Expand description
Describes the output contract snapshot portion of a runtime package snapshot. Use it when package authors or tests need explicit package configuration; validation and activation happen in package/runtime coordinators.
Fields§
§schema_id: OutputSchemaIdStable schema id used for typed lineage, lookup, or dedupe.
schema_version: SchemaVersionWire schema version used for compatibility checks.
schema_fingerprint: StringDeterministic schema fingerprint used for stale checks, package evidence, or replay comparisons.
dialect: OutputSchemaDialectSchema dialect used to interpret the output schema. Validators use it to select the supported JSON-schema subset and compatibility rules.
mode: OutputModeMode that selects how this operation or contract should behave. Callers use it to choose the explicit execution path instead of relying on hidden defaults.
validation_policy_ref: PolicyRefTyped validation policy ref reference. Resolving or executing it is a separate policy-gated step.
repair_policy_ref: PolicyRefTyped repair policy ref reference. Resolving or executing it is a separate policy-gated step.
local_validator_version: StringVersion of the local validator contract used for this output policy. Use it to keep validation and replay behavior stable across releases.
provider_hint_policy: ProviderHintPolicyPolicy for provider-side structured-output hints. Hints may guide prompting but cannot replace SDK-owned validation.
validation: ValidationPolicyValidation policy applied before output is accepted as typed data. It controls validator selection, bounds, failure visibility, and local validation behavior.
repair: RepairPolicyRepair policy used after structured output validation fails. It controls whether repair is attempted and which policy gates must approve it.
retry_budget: RetryBudgetRetry budget for validation, repair, or adapter attempts. Runtimes use it to stop bounded loops deterministically.
content_policy: ContentCapturePolicyContent-capture policy that governs raw content, summaries, redaction, and retention. Projection, telemetry, and delivery paths must honor it before exposing content.
projection_hint: OutputProjectionHintProvider-facing projection hint for structured output requests. It can guide model prompting but does not replace local validation policy.
Implementations§
Source§impl OutputContractSnapshot
impl OutputContractSnapshot
Sourcepub fn validate(&self) -> Result<(), AgentError>
pub fn validate(&self) -> Result<(), AgentError>
Validates the package invariants and returns a typed error on failure. Validation is pure and does not perform I/O, dispatch, journal appends, or adapter calls.
Trait Implementations§
Source§impl Clone for OutputContractSnapshot
impl Clone for OutputContractSnapshot
Source§fn clone(&self) -> OutputContractSnapshot
fn clone(&self) -> OutputContractSnapshot
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OutputContractSnapshot
impl Debug for OutputContractSnapshot
Source§impl<'de> Deserialize<'de> for OutputContractSnapshot
impl<'de> Deserialize<'de> for OutputContractSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for OutputContractSnapshot
Source§impl From<&OutputContract> for OutputContractSnapshot
impl From<&OutputContract> for OutputContractSnapshot
Source§fn from(contract: &OutputContract) -> Self
fn from(contract: &OutputContract) -> Self
Source§impl PartialEq for OutputContractSnapshot
impl PartialEq for OutputContractSnapshot
Source§fn eq(&self, other: &OutputContractSnapshot) -> bool
fn eq(&self, other: &OutputContractSnapshot) -> bool
self and other values to be equal, and is used by ==.