Skip to main content

MobSessionBridge

Struct MobSessionBridge 

Source
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

Source

pub fn new(handle: MobHandle) -> Self

Create a new bridge wrapping the given mob handle.

Source

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.

Source

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.

Source

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.

Source

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

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

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,

Remove identity ownership metadata for a concrete bridge session. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more