pub struct Invocation { /* private fields */ }Expand description
The closed per-call context supplied to one Executor::execute.
This is trusted runtime-provided context, never a dependency-injection bag: optional capabilities such as process execution are constructor-injected into the concrete executor and never flow through here.
The struct has no public constructor and no public fields, so only a core
adapter can mint one. Its emit capability is limited to
crate::runtime::event::ToolEmitter, which itself can only produce audit
and error facts, so producer authority and outward event state never leak to
an executor.
Implementations§
Source§impl Invocation
impl Invocation
Sourcepub fn session_id(&self) -> Option<&str>
pub fn session_id(&self) -> Option<&str>
Returns the trusted host-provided session identity, when one exists.
Core does not require this to be nonempty or globally unique; treat it as correlation metadata rather than an authorization credential. Model tool arguments can never override it.
Sourcepub const fn transcript(&self) -> &Snapshot
pub const fn transcript(&self) -> &Snapshot
Returns the frozen Step-top transcript shared by every provider resolution and every invocation in the same Step.
Sourcepub const fn call_id(&self) -> &Id
pub const fn call_id(&self) -> &Id
Returns the model-assigned identity of this invocation within its Step.
Sourcepub const fn emitter(&self) -> &ToolEmitter
pub const fn emitter(&self) -> &ToolEmitter
Returns the invocation-scoped audit/error emit capability.