pub struct SessionExecutionReservation { /* private fields */ }Expand description
One exact runner reservation plus its logical-session activation ownership.
Callers must obtain this through reserve_session_execution. The only
exception is the router’s own activation launcher, which uses the
crate-private placeholder constructor while assembling its two-phase launch.
Implementations§
Source§impl SessionExecutionReservation
impl SessionExecutionReservation
pub fn session_id(&self) -> &str
pub fn run_id(&self) -> &str
pub fn cancel_token(&self) -> &CancellationToken
Sourcepub async fn bind_root_actor(
&mut self,
agent: &Agent,
session: &Session,
) -> Result<()>
pub async fn bind_root_actor( &mut self, agent: &Agent, session: &Session, ) -> Result<()>
Bind before an adapter persists execution state or admits a provider. A duplicate call on this exact reservation retains the same capability.
pub fn execution_persistence( &self, ) -> Option<Arc<dyn RuntimeSessionPersistence>>
Sourcepub fn bind_root_inbox_receipt(
&mut self,
receipt: SessionInboxReceipt,
) -> Result<()>
pub fn bind_root_inbox_receipt( &mut self, receipt: SessionInboxReceipt, ) -> Result<()>
Retain one exact input selector in the same private persistence view moved through admission, Ready and spawn. This cannot mint a writer.
Sourcepub async fn retain_selected_run_output(&self) -> Result<bool>
pub async fn retain_selected_run_output(&self) -> Result<bool>
Opt only a selected, actual Root execution into finite visible output replay. No public request data can supply its writer or runner identity.
pub fn root_actor_writer(&self) -> Option<RootActorRuntimeWrite>
Sourcepub fn queue_root_response_event(
&mut self,
event: AgentEvent,
) -> Option<AgentEvent>
pub fn queue_root_response_event( &mut self, event: AgentEvent, ) -> Option<AgentEvent>
Response frames travel with the exact reserved Root until its detached adapter can publish them through the existing fenced event forwarder.
pub fn take_root_response_events(&mut self) -> Vec<AgentEvent>
Sourcepub async fn finish_root_actor(&mut self, outcome: ActorActivationFinish)
pub async fn finish_root_actor(&mut self, outcome: ActorActivationFinish)
Finish a valid adapter-owned pause only after its actual history publication barrier. Abandonment remains the rejected-startup fallback.
Sourcepub async fn ensure_registered(
&mut self,
) -> Result<(), SessionRunRegistrationError>
pub async fn ensure_registered( &mut self, ) -> Result<(), SessionRunRegistrationError>
Adopt a router-published activation placeholder before any adapter-side tool replay, workspace mutation, persistence, relay, or spawned task.
Reservations returned by reserve_session_execution are already
registered, so calling this on the normal manual/server path is a no-op.