Skip to main content

SessionServiceRuntimeExt

Trait SessionServiceRuntimeExt 

Source
pub trait SessionServiceRuntimeExt: Send + Sync {
Show 23 methods // Required methods fn accept_input<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, input: Input, ) -> Pin<Box<dyn Future<Output = Result<AcceptOutcome, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn accept_input_with_completion<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, input: Input, ) -> Pin<Box<dyn Future<Output = Result<(AcceptOutcome, Option<CompletionHandle>), RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn runtime_state<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<RuntimeState, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn retire_runtime<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<RetireReport, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn reset_runtime<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<ResetReport, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn input_state<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, input_id: &'life2 InputId, ) -> Pin<Box<dyn Future<Output = Result<Option<StoredInputState>, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn input_terminal_completion<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, input_id: &'life2 InputId, ) -> Pin<Box<dyn Future<Output = Result<Option<CompletionOutcome>, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn input_state_by_idempotency_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, idempotency_key: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<StoredInputState>, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn interaction_terminal_status<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, selector: InteractionSelector, ) -> Pin<Box<dyn Future<Output = Result<Option<Sourced<InteractionTerminalReport>>, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn run_terminal_status<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, ) -> Pin<Box<dyn Future<Output = Result<Sourced<RunTerminalReport>, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn list_active_inputs<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<Vec<InputId>, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn reconfigure_session_llm_identity<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, request: SessionLlmReconfigureRequest, ) -> Pin<Box<dyn Future<Output = Result<SessionLlmReconfigureReport, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; // Provided methods fn resolved_session_llm_capabilities<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<Option<SessionLlmCapabilitySurface>, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn configure_model_routing_baseline<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _baseline_model: ModelId, _realtime_capable: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn session_model_routing_status<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<SessionModelRoutingStatus, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn request_switch_turn<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _request: SwitchTurnRequest, ) -> Pin<Box<dyn Future<Output = Result<SwitchTurnControlResult, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn admit_model_routing_assistant_turn<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<(), RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn begin_image_operation<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _request: ImageOperationRoutingRequest, ) -> Pin<Box<dyn Future<Output = Result<ImageOperationRoutingResult, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn deny_image_operation_plan<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _operation_id: ImageOperationId, _reason: ImageOperationDenialReason, ) -> Pin<Box<dyn Future<Output = Result<ImageOperationPhase, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn activate_image_operation_override<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _operation_id: ImageOperationId, ) -> Pin<Box<dyn Future<Output = Result<ImageOperationPhase, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn classify_image_operation_terminal<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _operation_id: ImageOperationId, _observation: ImageProviderTerminalObservation, _provider_text: ProviderTextDisposition, ) -> Pin<Box<dyn Future<Output = Result<ImageOperationTerminalClass, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn complete_image_operation<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _operation_id: ImageOperationId, _terminal: ImageOperationTerminalClass, ) -> Pin<Box<dyn Future<Output = Result<ImageOperationPhase, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn restore_image_operation_override<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _operation_id: ImageOperationId, ) -> Pin<Box<dyn Future<Output = Result<ImageOperationPhase, RuntimeDriverError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... }
}
Expand description

v9 runtime extensions for SessionService.

This branch is runtime-backed only: every implementation is a v9 runtime surface, so the methods below are unconditionally available.

Required Methods§

Source

fn accept_input<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, input: Input, ) -> Pin<Box<dyn Future<Output = Result<AcceptOutcome, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Accept an input for a session.

Source

fn accept_input_with_completion<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, input: Input, ) -> Pin<Box<dyn Future<Output = Result<(AcceptOutcome, Option<CompletionHandle>), RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Accept an input and optionally return a completion handle that resolves when the admitted work reaches a terminal runtime outcome.

Source

fn runtime_state<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<RuntimeState, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the runtime state for a session.

Source

fn retire_runtime<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<RetireReport, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Retire a session’s runtime.

Source

fn reset_runtime<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<ResetReport, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reset a session’s runtime.

Source

fn input_state<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, input_id: &'life2 InputId, ) -> Pin<Box<dyn Future<Output = Result<Option<StoredInputState>, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Get the state of a specific input, bundled with its DSL-owned seed (phase / run association / boundary sequence).

Source

fn input_terminal_completion<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, input_id: &'life2 InputId, ) -> Pin<Box<dyn Future<Output = Result<Option<CompletionOutcome>, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Return the exact rich public completion previously selected for this input, without registering a waiter or reviving an unregistered runtime.

Ok(None) means an admitted input has no finalized receipt yet, including the durable pre-finalization window. A terminal 0.8.10 row whose rich result was never recorded is repair-blocked rather than reported as retryable absence. InputTerminalOutcome::Consumed is not evidence for any particular public completion class.

Source

fn input_state_by_idempotency_key<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, idempotency_key: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<StoredInputState>, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Resolve a caller-supplied idempotency key to its admitted input and return that input’s stored state (terminal outcome, last run id, boundary sequence).

This is the durable reconciliation query for interrupted work: the machine-owned idempotency binding and the input’s terminal facts survive restart (persistent runtimes re-enter them on recovery), so after re-registering a session a host can ask “did the interaction I submitted under this key reach a terminal state, and which?” without keeping its own run journal. Read-only: never registers a binding.

Source

fn interaction_terminal_status<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, selector: InteractionSelector, ) -> Pin<Box<dyn Future<Output = Result<Option<Sourced<InteractionTerminalReport>>, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Durable terminal-status query for one interaction.

Registered sessions answer from live DSL truth; unregistered sessions on a machine with a persistent RuntimeStore answer from the durably committed input-state witnesses WITHOUT reviving the runtime. A never-admitted session id fails typed NotFound; unregistered sessions on a store-less (ephemeral) machine keep the NotReady class. Ok(None) means the session is known but no input matches the selector.

Source

fn run_terminal_status<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, run_id: &'life2 RunId, ) -> Pin<Box<dyn Future<Output = Result<Sourced<RunTerminalReport>, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Durable terminal-status query for a run.

Evaluates the input-state witnesses whose last_run_id references run_id (live snapshot when registered, durable store rows otherwise) through the canonical pure evaluator. An unknown run on a known session reports NoDurableWitness — callers must not read that as Failed (re-staging rebinds last_run_id).

Source

fn list_active_inputs<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<Vec<InputId>, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List all active (non-terminal) inputs for a session.

Source

fn reconfigure_session_llm_identity<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, request: SessionLlmReconfigureRequest, ) -> Pin<Box<dyn Future<Output = Result<SessionLlmReconfigureReport, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Canonically reconfigure the LLM identity for a registered live session.

Provided Methods§

Source

fn resolved_session_llm_capabilities<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<Option<SessionLlmCapabilitySurface>, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the runtime-owned resolved LLM capability surface for a session.

Source

fn configure_model_routing_baseline<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _baseline_model: ModelId, _realtime_capable: bool, ) -> Pin<Box<dyn Future<Output = Result<(), RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn session_model_routing_status<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<SessionModelRoutingStatus, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn request_switch_turn<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _request: SwitchTurnRequest, ) -> Pin<Box<dyn Future<Output = Result<SwitchTurnControlResult, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn admit_model_routing_assistant_turn<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<(), RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn begin_image_operation<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _request: ImageOperationRoutingRequest, ) -> Pin<Box<dyn Future<Output = Result<ImageOperationRoutingResult, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn deny_image_operation_plan<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _operation_id: ImageOperationId, _reason: ImageOperationDenialReason, ) -> Pin<Box<dyn Future<Output = Result<ImageOperationPhase, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn activate_image_operation_override<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _operation_id: ImageOperationId, ) -> Pin<Box<dyn Future<Output = Result<ImageOperationPhase, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn classify_image_operation_terminal<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _operation_id: ImageOperationId, _observation: ImageProviderTerminalObservation, _provider_text: ProviderTextDisposition, ) -> Pin<Box<dyn Future<Output = Result<ImageOperationTerminalClass, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn complete_image_operation<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _operation_id: ImageOperationId, _terminal: ImageOperationTerminalClass, ) -> Pin<Box<dyn Future<Output = Result<ImageOperationPhase, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn restore_image_operation_override<'life0, 'life1, 'async_trait>( &'life0 self, _session_id: &'life1 SessionId, _operation_id: ImageOperationId, ) -> Pin<Box<dyn Future<Output = Result<ImageOperationPhase, RuntimeDriverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§