pub struct TurnRequestSnapshot { /* private fields */ }Expand description
Immutable model request plus the durable tail used to construct it.
Implementations§
Source§impl TurnRequestSnapshot
impl TurnRequestSnapshot
Sourcepub fn build(
state: &MaterializedSessionState,
config: &KernelRunConfig,
tools: &ToolRegistry,
model: &ModelSpec,
) -> Result<Self, KernelError>
pub fn build( state: &MaterializedSessionState, config: &KernelRunConfig, tools: &ToolRegistry, model: &ModelSpec, ) -> Result<Self, KernelError>
Builds and validates one immutable request from committed session state.
Registered tool specifications are projected in canonical name order and parallel calls remain disabled for the sequential milestone scheduler.
§Errors
Returns a typed error when no model is selected, the provider does not advertise it, or model/tool/request bounds are incompatible.
Sourcepub const fn request(&self) -> &ModelRequest
pub const fn request(&self) -> &ModelRequest
Returns the immutable provider request.
Sourcepub fn client_tool_names(&self) -> &[ToolName]
pub fn client_tool_names(&self) -> &[ToolName]
Returns the exact client-executable function names frozen for this turn.
Active hosted projections are deliberately absent even when their portable tool specifications also have a client route.
Sourcepub fn hosted_tool_names(&self) -> &[ToolName]
pub fn hosted_tool_names(&self) -> &[ToolName]
Returns the exact provider-hosted tool names frozen for this turn.
Sourcepub fn allows_client_tool_call(&self, tool_name: &str) -> bool
pub fn allows_client_tool_call(&self, tool_name: &str) -> bool
Returns whether a provider function call may enter local execution.
Sourcepub fn is_hosted_tool_projection(&self, tool_name: &str) -> bool
pub fn is_hosted_tool_projection(&self, tool_name: &str) -> bool
Returns whether this name was projected as a provider-hosted tool.
Sourcepub fn into_request(self) -> ModelRequest
pub fn into_request(self) -> ModelRequest
Consumes the snapshot into its provider request.
Sourcepub const fn durable_tail(&self) -> SessionSequence
pub const fn durable_tail(&self) -> SessionSequence
Returns the durable session tail captured with the request.