pub struct StepToolSnapshot { /* private fields */ }Expand description
One immutable model-exposure and host-routing snapshot.
Implementations§
Source§impl StepToolSnapshot
impl StepToolSnapshot
Sourcepub const fn transcript(&self) -> &Snapshot
pub const fn transcript(&self) -> &Snapshot
Returns the frozen Step-top transcript shared by this Step’s provider resolution and every invocation minted from this snapshot.
Sourcepub fn exposure(&self) -> impl ExactSizeIterator<Item = (&Descriptor, Lane)>
pub fn exposure(&self) -> impl ExactSizeIterator<Item = (&Descriptor, Lane)>
Returns every frozen exposed descriptor and lane in deterministic order.
Sourcepub fn client_model_tools(&self) -> Vec<ClientTool>
pub fn client_model_tools(&self) -> Vec<ClientTool>
Materializes the client/local lane for crate::runtime::model::RequestPlan.
Sourcepub fn hosted_model_extensions(&self) -> Vec<Envelope>
pub fn hosted_model_extensions(&self) -> Vec<Envelope>
Materializes the hosted/model-native lane for
crate::runtime::model::RequestPlan.
Sourcepub fn apply_to_plan(&self, plan: &mut RequestPlan)
pub fn apply_to_plan(&self, plan: &mut RequestPlan)
Applies both model-visible lanes from this exact Step snapshot.
Sourcepub fn invocation(
&self,
session_id: Option<String>,
call_id: Id,
emitter: ToolEmitter,
) -> Invocation
pub fn invocation( &self, session_id: Option<String>, call_id: Id, emitter: ToolEmitter, ) -> Invocation
Mints one invocation whose transcript shares this snapshot’s exact immutable backing, 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.
Sourcepub async fn execute(
&self,
invocation: &Invocation,
call: &ToolCall,
cancellation: &Token,
) -> Result<ExecutionOutcome, ExecutionError>
pub async fn execute( &self, invocation: &Invocation, call: &ToolCall, cancellation: &Token, ) -> Result<ExecutionOutcome, ExecutionError>
Routes one accepted effective call to its captured executor.
§Errors
Returns ExecutionError only for control-path failures: hosted
misrouting, cancellation, and fatal output mapping. Unknown names and
ordinary executor failures are business outcomes.