pub struct OutputRefs(/* private fields */);Expand description
The llm-runner’s output-refs descriptor, carried opaquely.
When an agent refers to earlier tool output, the llm-runner resolves those
references into a stored set of snapshots and describes that set with a
descriptor. The descriptor’s schema belongs to the llm-runner contract (the
cortexkit-role-llm-runner crate in the CortexKit commons repository), and
a provider decodes it with that crate’s type. This crate does not copy the
schema, so the two cannot drift: it checks only that the value is a JSON
object of at most MAX_OUTPUT_REFS_BYTES bytes, and refuses anything
else, both when building one with OutputRefs::new and when decoding.
The daemon relays route bodies without reading them, so it never reads
this.
Implementations§
Source§impl OutputRefs
impl OutputRefs
Sourcepub fn new(value: Value) -> Result<Self, OutputRefsError>
pub fn new(value: Value) -> Result<Self, OutputRefsError>
Accept value as a descriptor if it is a JSON object whose compact
encoding is at most MAX_OUTPUT_REFS_BYTES bytes.
Sourcepub fn as_map(&self) -> &Map<String, Value>
pub fn as_map(&self) -> &Map<String, Value>
The descriptor’s members, for a provider to decode with the llm-runner contract’s type.
Sourcepub fn into_value(self) -> Value
pub fn into_value(self) -> Value
The descriptor as a JSON object value.