pub struct MobSessionBridge { /* private fields */ }Expand description
Concrete SessionBridge backed by a MobHandle.
AgentRuntimeId is usually used as the MobAgentIdentity at the mob layer. Real
external bindings are the exception: Meerkat’s external peer names require
identifier-safe <mob>/<profile>/<member> segments, so the bridge maps the
runtime ID to the durable identity for those members.
Implementations§
Source§impl MobSessionBridge
impl MobSessionBridge
Sourcepub fn with_session_service(
handle: MobHandle,
session_service: Arc<dyn MobSessionService>,
) -> Self
pub fn with_session_service( handle: MobHandle, session_service: Arc<dyn MobSessionService>, ) -> Self
Create a new bridge with session-service access for live model capability checks.
Sourcepub fn with_session_store(
handle: MobHandle,
session_store: Arc<dyn SessionStore>,
) -> Self
pub fn with_session_store( handle: MobHandle, session_store: Arc<dyn SessionStore>, ) -> Self
Create a new bridge with an explicit session store for checkpoint support.
Sourcepub fn with_session_store_and_service(
handle: MobHandle,
session_store: Arc<dyn SessionStore>,
session_service: Arc<dyn MobSessionService>,
) -> Self
pub fn with_session_store_and_service( handle: MobHandle, session_store: Arc<dyn SessionStore>, session_service: Arc<dyn MobSessionService>, ) -> Self
Create a bridge with checkpoint and live capability support.
Sourcepub fn with_continuity_session_store(
handle: MobHandle,
session_store: Arc<ContinuitySessionStoreAdapter>,
session_service: Option<Arc<dyn MobSessionService>>,
) -> Self
pub fn with_continuity_session_store( handle: MobHandle, session_store: Arc<ContinuitySessionStoreAdapter>, session_service: Option<Arc<dyn MobSessionService>>, ) -> Self
Create a bridge with an identity-owned continuity session store.
Trait Implementations§
Source§impl SessionBridge for MobSessionBridge
impl SessionBridge for MobSessionBridge
Source§fn create_session<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
_identity: &'life1 AgentIdentity,
runtime_id: &'life2 AgentRuntimeId,
spec: &'life3 DurableAgentSpec,
draft: &'life4 AgentBuildDraft,
session_id: &'life5 SessionId,
) -> Pin<Box<dyn Future<Output = Result<SessionId, BridgeError>> + 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 create_session<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
_identity: &'life1 AgentIdentity,
runtime_id: &'life2 AgentRuntimeId,
spec: &'life3 DurableAgentSpec,
draft: &'life4 AgentBuildDraft,
session_id: &'life5 SessionId,
) -> Pin<Box<dyn Future<Output = Result<SessionId, BridgeError>> + 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,
Spawn a new mob member for a freshly-created identity.
Source§fn resume_session<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
_identity: &'life1 AgentIdentity,
runtime_id: &'life2 AgentRuntimeId,
spec: &'life3 DurableAgentSpec,
draft: &'life4 AgentBuildDraft,
session_id: &'life5 SessionId,
_snapshot: &'life6 SessionSnapshot,
) -> Pin<Box<dyn Future<Output = Result<ResumeSessionOutcome, BridgeError>> + 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 resume_session<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'async_trait>(
&'life0 self,
_identity: &'life1 AgentIdentity,
runtime_id: &'life2 AgentRuntimeId,
spec: &'life3 DurableAgentSpec,
draft: &'life4 AgentBuildDraft,
session_id: &'life5 SessionId,
_snapshot: &'life6 SessionSnapshot,
) -> Pin<Box<dyn Future<Output = Result<ResumeSessionOutcome, BridgeError>> + 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,
Resume a mob member from a previously checkpointed snapshot. Read more
Source§fn deliver<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
runtime_id: &'life1 AgentRuntimeId,
content: &'life2 ContentInput,
) -> Pin<Box<dyn Future<Output = Result<SessionId, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn deliver<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
runtime_id: &'life1 AgentRuntimeId,
content: &'life2 ContentInput,
) -> Pin<Box<dyn Future<Output = Result<SessionId, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Deliver content to an active mob member.
Source§fn deliver_with_mode<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
runtime_id: &'life1 AgentRuntimeId,
content: &'life2 ContentInput,
handling_mode: HandlingMode,
) -> Pin<Box<dyn Future<Output = Result<SessionId, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn deliver_with_mode<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
runtime_id: &'life1 AgentRuntimeId,
content: &'life2 ContentInput,
handling_mode: HandlingMode,
) -> Pin<Box<dyn Future<Output = Result<SessionId, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Deliver content to an active mob member using a caller-selected turn
handling mode. Bridge implementations that do not distinguish modes can
fall back to ordinary delivery.
Source§fn deliver_with_mode_and_context<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
runtime_id: &'life1 AgentRuntimeId,
content: &'life2 ContentInput,
injected_context: &'life3 [ContentInput],
handling_mode: HandlingMode,
) -> Pin<Box<dyn Future<Output = Result<SessionId, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn deliver_with_mode_and_context<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
runtime_id: &'life1 AgentRuntimeId,
content: &'life2 ContentInput,
injected_context: &'life3 [ContentInput],
handling_mode: HandlingMode,
) -> Pin<Box<dyn Future<Output = Result<SessionId, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Deliver content plus a separate
injected_context body (meerkat
0.7.12 ask 1: typed ambient injection alongside — not fused into —
the user’s message). Bridges that do not carry injected context fall
back to plain delivery of the user content, dropping the injection.Source§fn checkpoint_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_runtime_id: &'life1 AgentRuntimeId,
session_id: &'life2 SessionId,
) -> Pin<Box<dyn Future<Output = Result<SessionSnapshot, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn checkpoint_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_runtime_id: &'life1 AgentRuntimeId,
session_id: &'life2 SessionId,
) -> Pin<Box<dyn Future<Output = Result<SessionSnapshot, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Checkpoint the current session state for a mob member.
Source§fn retire_member<'life0, 'life1, 'async_trait>(
&'life0 self,
runtime_id: &'life1 AgentRuntimeId,
) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn retire_member<'life0, 'life1, 'async_trait>(
&'life0 self,
runtime_id: &'life1 AgentRuntimeId,
) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retire a mob member.
Source§fn wire_peer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
a: &'life1 AgentRuntimeId,
b: &'life2 AgentRuntimeId,
) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn wire_peer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
a: &'life1 AgentRuntimeId,
b: &'life2 AgentRuntimeId,
) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Wire two active same-mob members by their concrete runtime IDs.
Source§fn wire_peers_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
edges: &'life1 [(AgentRuntimeId, AgentRuntimeId)],
) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn wire_peers_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
edges: &'life1 [(AgentRuntimeId, AgentRuntimeId)],
) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Wire many active same-mob member pairs by their concrete runtime IDs.
Source§fn current_member_wires<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(AgentRuntimeId, AgentRuntimeId)>, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn current_member_wires<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<(AgentRuntimeId, AgentRuntimeId)>, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Return currently materialized same-mob member wires by concrete runtime IDs.
Source§fn unwire_peer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
a: &'life1 AgentRuntimeId,
b: &'life2 AgentRuntimeId,
) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn unwire_peer<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
a: &'life1 AgentRuntimeId,
b: &'life2 AgentRuntimeId,
) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Unwire two active same-mob members by their concrete runtime IDs.
Source§fn inspect_member<'life0, 'life1, 'async_trait>(
&'life0 self,
runtime_id: &'life1 AgentRuntimeId,
) -> Pin<Box<dyn Future<Output = Result<MemberInspection, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn inspect_member<'life0, 'life1, 'async_trait>(
&'life0 self,
runtime_id: &'life1 AgentRuntimeId,
) -> Pin<Box<dyn Future<Output = Result<MemberInspection, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Inspect the current execution state of a mob member.
Source§fn register_session_runtime_state<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 SessionId,
identity: &'life2 AgentIdentity,
generation: ContinuityGeneration,
checkpoint_version: CheckpointVersion,
fencing_token: FencingToken,
) -> Pin<Box<dyn Future<Output = Result<CheckpointVersion, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn register_session_runtime_state<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 SessionId,
identity: &'life2 AgentIdentity,
generation: ContinuityGeneration,
checkpoint_version: CheckpointVersion,
fencing_token: FencingToken,
) -> Pin<Box<dyn Future<Output = Result<CheckpointVersion, BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Register identity ownership for a concrete bridge session. Read more
Source§fn unregister_session_runtime_state<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 SessionId,
) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unregister_session_runtime_state<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 SessionId,
) -> Pin<Box<dyn Future<Output = Result<(), BridgeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove identity ownership metadata for a concrete bridge session. Read more
Auto Trait Implementations§
impl !Freeze for MobSessionBridge
impl !RefUnwindSafe for MobSessionBridge
impl !UnwindSafe for MobSessionBridge
impl Send for MobSessionBridge
impl Sync for MobSessionBridge
impl Unpin for MobSessionBridge
impl UnsafeUnpin for MobSessionBridge
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more