Skip to main content

StepToolSnapshot

Struct StepToolSnapshot 

Source
pub struct StepToolSnapshot { /* private fields */ }
Expand description

One immutable model-exposure and host-routing snapshot.

Implementations§

Source§

impl StepToolSnapshot

Source

pub fn transcript(&self) -> &Snapshot

Returns the frozen Step-top transcript shared by this Step’s provider resolution and every invocation minted from this snapshot.

Source

pub fn exposure(&self) -> impl ExactSizeIterator<Item = (&Descriptor, Lane)>

Returns every frozen exposed descriptor and lane in deterministic order.

Source

pub fn client_model_tools(&self) -> Vec<ClientTool>

Materializes the client/local lane for crate::runtime::model::RequestPlan.

Source

pub fn hosted_model_extensions(&self) -> Vec<Envelope>

Materializes the hosted/model-native lane for crate::runtime::model::RequestPlan.

Source

pub fn apply_to_plan(&self, plan: &mut RequestPlan)

Applies both model-visible lanes from this exact Step snapshot.

Source

pub fn invocation( &self, session_id: Option<String>, call_id: Id, emitter: ToolEmitter, ) -> Invocation

Mints one invocation whose transcript is this snapshot’s exact owned frozen view, so no caller can substitute another transcript version.

Minting requires both a core-resolved snapshot and a ToolEmitter, whose outward authority and crate::value::lifecycle::Coord are stamped by core. Neither the outward producer nor any run state is reachable through this seam. Outside a live run, pass ToolEmitter::closed.

Source

pub async fn execute( &self, invocation: &Invocation, call: &ToolCall, gate: Option<&dyn Gate>, cancellation: &Token, ) -> Result<ExecutionOutcome, ExecutionError>

Routes one accepted effective call through ADR-010’s admission branches.

§Errors

Returns ExecutionError only for control-path failures: hosted misrouting, invalid admission facts or verdicts, cancellation, gate operation failures, and fatal output mapping. Unknown, forbidden, ungated, denied, and ordinarily failing calls are business outcomes.

Trait Implementations§

Source§

impl Debug for StepToolSnapshot

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.