pub enum OutputSchemaRef {
InlineJson {
content_hash: ContentHash,
redacted_schema: Value,
},
ContentStore {
content_ref: ContentRef,
content_hash: ContentHash,
},
RustSerde {
type_name: TypeName,
crate_name: CrateName,
crate_version: String,
generated_schema_ref: ContentRef,
content_hash: ContentHash,
},
HostRegistered {
validator_ref: OutputValidatorRef,
contract_version: SchemaVersion,
content_hash: ContentHash,
},
}Expand description
Enumerates the finite output schema ref cases. Serialized names are part of the SDK contract; update fixtures when variants change.
Variants§
InlineJson
Use this variant when the contract needs to represent inline json; selecting it has no side effect by itself.
Fields
content_hash: ContentHashStable hash for the bytes or canonical payload used for stale checks and fingerprints.
ContentStore
Use this variant when the contract needs to represent content store; selecting it has no side effect by itself.
Fields
content_ref: ContentRefContent reference where payload bytes or structured tool output are stored.
content_hash: ContentHashStable hash for the bytes or canonical payload used for stale checks and fingerprints.
RustSerde
Use this variant when the contract needs to represent rust serde; selecting it has no side effect by itself.
Fields
crate_version: StringVersion string for this capability, package, or protocol surface. Use it for compatibility checks during package or adapter resolution.
generated_schema_ref: ContentRefTyped generated schema ref reference. Resolving or executing it is a separate policy-gated step.
content_hash: ContentHashStable hash for the bytes or canonical payload used for stale checks and fingerprints.
HostRegistered
Use this variant when the contract needs to represent host registered; selecting it has no side effect by itself.
Fields
validator_ref: OutputValidatorRefTyped validator ref reference. Resolving or executing it is a separate policy-gated step.
contract_version: SchemaVersionVersion string for this capability, package, or protocol surface. Use it for compatibility checks during package or adapter resolution.
content_hash: ContentHashStable hash for the bytes or canonical payload used for stale checks and fingerprints.
Implementations§
Source§impl OutputSchemaRef
impl OutputSchemaRef
Sourcepub fn content_hash(&self) -> ContentHash
pub fn content_hash(&self) -> ContentHash
Computes the stable content hash for this records::output value. The computation is deterministic and side-effect free so it can be used in package, journal, or test evidence.
Sourcepub fn validate_shape(&self) -> Result<(), AgentError>
pub fn validate_shape(&self) -> Result<(), AgentError>
Validates the records::output 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 OutputSchemaRef
impl Clone for OutputSchemaRef
Source§fn clone(&self) -> OutputSchemaRef
fn clone(&self) -> OutputSchemaRef
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 OutputSchemaRef
impl Debug for OutputSchemaRef
Source§impl<'de> Deserialize<'de> for OutputSchemaRef
impl<'de> Deserialize<'de> for OutputSchemaRef
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>,
Source§impl PartialEq for OutputSchemaRef
impl PartialEq for OutputSchemaRef
Source§fn eq(&self, other: &OutputSchemaRef) -> bool
fn eq(&self, other: &OutputSchemaRef) -> bool
self and other values to be equal, and is used by ==.