pub struct SessionRepository { /* private fields */ }Expand description
Framework-owned coordinator over a session’s cache / storage / persistence
tiers. Cheap to clone (all fields are Arc).
Implementations§
Source§impl SessionRepository
impl SessionRepository
pub fn downgrade_parent_outcome_route(&self) -> ParentOutcomeRoute
Sourcepub async fn bind_parent_outcome_writer(
&self,
session_id: &str,
) -> Result<ParentOutcomeWriter>
pub async fn bind_parent_outcome_writer( &self, session_id: &str, ) -> Result<ParentOutcomeWriter>
A named adapter for trusted Host parent-request projections. Default saves retain their rejection boundary; request identity, lineage, deadline and single-winner validation remain in the original CAS.
Source§impl SessionRepository
impl SessionRepository
pub fn new( cache: SessionCache, storage: Arc<dyn Storage>, persistence: Arc<LockedSessionStore>, ) -> Self
Sourcepub fn with_root_actor_directory(
self,
directory: Arc<dyn ActorDirectoryPort>,
) -> Self
pub fn with_root_actor_directory( self, directory: Arc<dyn ActorDirectoryPort>, ) -> Self
Enable durable ordinary Root execution ownership in a Host whose storage implements the named final writer boundary.
pub fn cache(&self) -> &SessionCache
pub fn storage(&self) -> &Arc<dyn Storage> ⓘ
pub fn persistence(&self) -> &Arc<LockedSessionStore> ⓘ
Sourcepub async fn load(&self, session_id: &str) -> Option<Session>
pub async fn load(&self, session_id: &str) -> Option<Session>
Load a session from the memory cache, falling back to durable storage
(and back-filling the cache on a storage hit). None if absent in both.
Sourcepub async fn try_load(&self, session_id: &str) -> Result<Option<Session>>
pub async fn try_load(&self, session_id: &str) -> Result<Option<Session>>
Like load, but surfaces storage errors instead of
swallowing them to None. Cache hit short-circuits; a storage hit
back-fills the cache.
Sourcepub async fn save(&self, session: &mut Session) -> Result<()>
pub async fn save(&self, session: &mut Session) -> Result<()>
Persist the session (merge-on-write) and refresh the cache, surfacing
storage errors. Use save_and_cache for the
fire-and-forget variant that logs and continues on failure.
Sourcepub async fn save_replay_resolution(&self, session: &mut Session) -> Result<()>
pub async fn save_replay_resolution(&self, session: &mut Session) -> Result<()>
Persist a blocked approval replay before starting its successor. A A save error may arrive after the rewritten result was committed. When the save was attempted, evict the old approval from cache under the same session lock so the next attempt reloads durable state.
Sourcepub async fn update_runtime_session<F>(
&self,
session_id: &str,
metadata_keys: &[&str],
mutate: F,
) -> Result<Option<Session>>
pub async fn update_runtime_session<F>( &self, session_id: &str, metadata_keys: &[&str], mutate: F, ) -> Result<Option<Session>>
Atomically mutate the latest durable runtime session and refresh the cache with the saved value. This is the safe path for narrow metadata indexes that can be updated concurrently with runner message writes.
Sourcepub async fn load_or_create(&self, session_id: &str, model: &str) -> Session
pub async fn load_or_create(&self, session_id: &str, model: &str) -> Session
Load a session, creating a fresh Session::new(id, model) if absent.
Sourcepub async fn load_merged_checked(
&self,
session_id: &str,
) -> Result<Option<Session>>
pub async fn load_merged_checked( &self, session_id: &str, ) -> Result<Option<Session>>
Load a session, reconciling the memory and storage copies via a preference heuristic: a live durable Root birth or mode epoch wins first; otherwise storage wins when it is strictly newer, or when it is the same age but still carries a pending question memory lost.
The cache is refreshed cache-aside. Timestamps cannot make a stale Root birth or mode epoch outrank verified durable authority.
Sourcepub async fn load_merged(&self, session_id: &str) -> Option<Session>
pub async fn load_merged(&self, session_id: &str) -> Option<Session>
Compatibility wrapper for read paths where the historical contract
treated a storage failure like absence. Mutating/recovery paths should
use Self::load_merged_checked so they can preserve retry state.
Sourcepub async fn save_and_cache(&self, session: &mut Session)
pub async fn save_and_cache(&self, session: &mut Session)
Persist the session (merge-on-write, preserving concurrent UI edits to the authoritative metadata group) and refresh the in-memory cache.
Trait Implementations§
Source§impl Clone for SessionRepository
impl Clone for SessionRepository
Source§impl RuntimeSessionPersistence for SessionRepository
SessionRepository is the canonical RuntimeSessionPersistence: the runtime
can persist a session through the same coordinator (merge-on-write + cache
refresh) instead of a bespoke adapter.
impl RuntimeSessionPersistence for SessionRepository
SessionRepository is the canonical RuntimeSessionPersistence: the runtime
can persist a session through the same coordinator (merge-on-write + cache
refresh) instead of a bespoke adapter.
Source§fn inherited_child_wait(&self) -> Option<InheritedChildWait>
fn inherited_child_wait(&self) -> Option<InheritedChildWait>
Source§fn bind_inherited_child_wait(
&self,
inherited: InheritedChildWait,
) -> Result<Arc<dyn RuntimeSessionPersistence>>
fn bind_inherited_child_wait( &self, inherited: InheritedChildWait, ) -> Result<Arc<dyn RuntimeSessionPersistence>>
Source§fn root_actor_writer(&self) -> Option<RootActorRuntimeWrite>
fn root_actor_writer(&self) -> Option<RootActorRuntimeWrite>
Source§fn bind_root_inbox_receipt(
&self,
receipt: SessionInboxReceipt,
) -> Result<Arc<dyn RuntimeSessionPersistence>>
fn bind_root_inbox_receipt( &self, receipt: SessionInboxReceipt, ) -> Result<Arc<dyn RuntimeSessionPersistence>>
fn root_inbox_receipt(&self) -> Option<&SessionInboxReceipt>
Source§fn root_actor_execution_required(&self, session: &Session) -> bool
fn root_actor_execution_required(&self, session: &Session) -> bool
Source§fn bind_root_actor_execution<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
run_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RootActorExecutionBinding>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn bind_root_actor_execution<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
run_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Option<RootActorExecutionBinding>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn save_runtime_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_runtime_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn supports_bound_startup_session(&self) -> bool
fn supports_bound_startup_session(&self) -> bool
Source§fn save_bound_startup_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
expected: &'life2 Session,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_bound_startup_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
expected: &'life2 Session,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn save_finalized_runtime_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_finalized_runtime_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn save_finalized_runtime_with_inherited_child_wait<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
inherited: &'life2 WaitingForChildrenState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn save_finalized_runtime_with_inherited_child_wait<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
inherited: &'life2 WaitingForChildrenState,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn seed_runtime_activation<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn seed_runtime_activation<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn record_permission_posture_activation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
expected_audit_revision: Option<u64>,
seed: &'life2 PermissionAuditSeed,
) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn record_permission_posture_activation<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
expected_audit_revision: Option<u64>,
seed: &'life2 PermissionAuditSeed,
) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn save_runtime_control_plane<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_runtime_control_plane<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn load_runtime_control_plane<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_runtime_control_plane<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
save_runtime_control_plane. Read moreSource§fn update_task_list_control_plane<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
task_list: &'life2 TaskList,
version: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn update_task_list_control_plane<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
task_list: &'life2 TaskList,
version: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Source§fn update_task_list_control_plane_if_version<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
expected_version: &'life2 str,
expected_task_list: &'life3 TaskList,
task_list: &'life4 TaskList,
version: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn update_task_list_control_plane_if_version<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
expected_version: &'life2 str,
expected_task_list: &'life3 TaskList,
task_list: &'life4 TaskList,
version: &'life5 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Source§fn update_task_list_control_planes_if_version<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
shared_session_id: &'life2 str,
expected_version: &'life3 str,
expected_task_list: &'life4 TaskList,
task_list: &'life5 TaskList,
version: &'life6 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
fn update_task_list_control_planes_if_version<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
shared_session_id: &'life2 str,
expected_version: &'life3 str,
expected_task_list: &'life4 TaskList,
task_list: &'life5 TaskList,
version: &'life6 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
Ok(true) only after both Task generations are
durable with no undo record that could later revert them. An error after
one physical write must restore both originals before returning or retain
durable recovery state and fail subsequent paired access closed until
recovery completes. Root-session callers pass the same id twice and
receive the single-target CAS semantics above.Source§fn checkpoint_live_bootstrap<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 Session,
inbox: Arc<dyn SessionInboxPort>,
gate: AdmissionGate,
) -> Pin<Box<dyn Future<Output = Result<LiveBootstrapProof>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn checkpoint_live_bootstrap<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 Session,
inbox: Arc<dyn SessionInboxPort>,
gate: AdmissionGate,
) -> Pin<Box<dyn Future<Output = Result<LiveBootstrapProof>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn confirm_live_bootstrap<'life0, 'life1, 'async_trait>(
&'life0 self,
proof: &'life1 LiveBootstrapProof,
inbox: Arc<dyn SessionInboxPort>,
publish: RootActorRuntimeEventPublisher,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn checkpoint_runtime_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn checkpoint_runtime_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn claim_scoped_loop_controls<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
inbox: Arc<dyn SessionInboxPort>,
active_run_id: &'life2 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<ScopedLoopControlClaim>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn claim_scoped_loop_controls<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 Session,
inbox: Arc<dyn SessionInboxPort>,
active_run_id: &'life2 str,
limit: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<ScopedLoopControlClaim>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn checkpoint_scoped_loop_control<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
bindings: &'life2 [ScopedLoopControlBinding],
activation: Arc<dyn SessionActivationPort>,
input: Option<(Arc<dyn SessionInboxPort>, ScopedLoopControlClaim)>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn checkpoint_scoped_loop_control<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
bindings: &'life2 [ScopedLoopControlBinding],
activation: Arc<dyn SessionActivationPort>,
input: Option<(Arc<dyn SessionInboxPort>, ScopedLoopControlClaim)>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn load_loop_control_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_loop_control_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn admit_root_inbox<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session: &'life1 mut Session,
inbox: Arc<dyn SessionInboxPort>,
active_run_id: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<Option<RootInboxAdmission>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn checkpoint_retrieval_window<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expected_base: &'life1 Session,
staged: &'life2 mut Session,
) -> Pin<Box<dyn Future<Output = Result<RetrievalWindowCheckpointOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn checkpoint_retrieval_window<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expected_base: &'life1 Session,
staged: &'life2 mut Session,
) -> Pin<Box<dyn Future<Output = Result<RetrievalWindowCheckpointOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn checkpoint_prompt_rewrite<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expected_base: &'life1 Session,
staged: &'life2 mut Session,
) -> Pin<Box<dyn Future<Output = Result<RetrievalWindowCheckpointOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn checkpoint_prompt_rewrite<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expected_base: &'life1 Session,
staged: &'life2 mut Session,
) -> Pin<Box<dyn Future<Output = Result<RetrievalWindowCheckpointOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn checkpoint_manual_archive_rejection<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expected_base: &'life1 Session,
staged: &'life2 mut Session,
) -> Pin<Box<dyn Future<Output = Result<RetrievalWindowCheckpointOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn checkpoint_manual_archive_rejection<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expected_base: &'life1 Session,
staged: &'life2 mut Session,
) -> Pin<Box<dyn Future<Output = Result<RetrievalWindowCheckpointOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
archive_context result. Read moreSource§fn checkpoint_manual_archive_consumption<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expected_base: &'life1 Session,
staged: &'life2 mut Session,
) -> Pin<Box<dyn Future<Output = Result<RetrievalWindowCheckpointOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn checkpoint_manual_archive_consumption<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
expected_base: &'life1 Session,
staged: &'life2 mut Session,
) -> Pin<Box<dyn Future<Output = Result<RetrievalWindowCheckpointOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
archive_context request. Read moreSource§fn load_runtime_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_runtime_session<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn load_runtime_admission_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn load_runtime_admission_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn clear_legacy_pending_messages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
expected: &'life2 [Value],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn clear_legacy_pending_messages<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
expected: &'life2 [Value],
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn append_token_usage_record<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
json_line: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn append_token_usage_record<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
json_line: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Storage::append_token_usage_record). Defaults to
a no-op so non-file-backed persisters are unaffected.Source§impl SessionAccess for SessionRepository
The framework-owned SessionRepository is the canonical SessionAccess.
Server AppState delegates to its session_repo; SDK / in-process callers
can use a SessionRepository directly as a SessionAccess.
impl SessionAccess for SessionRepository
The framework-owned SessionRepository is the canonical SessionAccess.
Server AppState delegates to its session_repo; SDK / in-process callers
can use a SessionRepository directly as a SessionAccess.