pub trait MobSessionService:
SessionServiceCommsExt
+ SessionServiceControlExt
+ SessionServiceHistoryExt {
// Provided methods
fn subscribe_session_events<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 SessionId,
) -> Pin<Box<dyn Future<Output = Result<EventStream, StreamError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn supports_persistent_sessions(&self) -> bool { ... }
fn runtime_adapter(&self) -> Option<Arc<RuntimeSessionAdapter>> { ... }
fn session_belongs_to_mob<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_id: &'life1 SessionId,
_mob_id: &'life2 MobId,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait { ... }
fn load_persisted_session<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: &'life1 SessionId,
) -> Pin<Box<dyn Future<Output = Result<Option<Session>, SessionError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn apply_runtime_turn<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: &'life1 SessionId,
_run_id: RunId,
_req: StartTurnRequest,
_boundary: RunApplyBoundary,
_contributing_input_ids: Vec<InputId>,
) -> Pin<Box<dyn Future<Output = Result<CoreApplyOutput, SessionError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn discard_live_session<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: &'life1 SessionId,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn cancel_all_checkpointers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
fn rearm_all_checkpointers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait { ... }
}Expand description
Extension trait for session services used by the mob runtime.
Builds on SessionServiceCommsExt from core so mob orchestration can use
comms/injector access without per-crate bridge traits.
Provided Methods§
Sourcefn subscribe_session_events<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 SessionId,
) -> Pin<Box<dyn Future<Output = Result<EventStream, StreamError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe_session_events<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 SessionId,
) -> Pin<Box<dyn Future<Output = Result<EventStream, StreamError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Subscribe to session-wide events regardless of triggering interaction.
Sourcefn supports_persistent_sessions(&self) -> bool
fn supports_persistent_sessions(&self) -> bool
Whether this service satisfies the persistent-session contract required by REQ-MOB-030.
fn runtime_adapter(&self) -> Option<Arc<RuntimeSessionAdapter>>
Sourcefn session_belongs_to_mob<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_id: &'life1 SessionId,
_mob_id: &'life2 MobId,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn session_belongs_to_mob<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_session_id: &'life1 SessionId,
_mob_id: &'life2 MobId,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Whether a listed session belongs to the given mob for reconciliation.
Sourcefn load_persisted_session<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: &'life1 SessionId,
) -> Pin<Box<dyn Future<Output = Result<Option<Session>, SessionError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_persisted_session<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: &'life1 SessionId,
) -> Pin<Box<dyn Future<Output = Result<Option<Session>, SessionError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Load the persisted session snapshot when available.
fn apply_runtime_turn<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: &'life1 SessionId,
_run_id: RunId,
_req: StartTurnRequest,
_boundary: RunApplyBoundary,
_contributing_input_ids: Vec<InputId>,
) -> Pin<Box<dyn Future<Output = Result<CoreApplyOutput, SessionError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn discard_live_session<'life0, 'life1, 'async_trait>(
&'life0 self,
_session_id: &'life1 SessionId,
) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn cancel_all_checkpointers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn cancel_all_checkpointers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Cancel all active checkpointer gates.
After this call in-flight saves complete but subsequent checkpoint
calls on any session are no-ops. Call during stop() to prevent
checkpoint writes from racing with external cleanup.
Sourcefn rearm_all_checkpointers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn rearm_all_checkpointers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Re-enable checkpointer gates cancelled by [cancel_all_checkpointers].
Call during resume() to restore periodic persistence.