pub struct MobBootstrapSpec {
pub definition: MobDefinition,
pub storage: MobStorage,
pub session_service: Arc<dyn MobSessionService>,
pub binary_blob_store: Option<Arc<dyn BinaryBlobStore>>,
pub options: MobBootstrapOptions,
pub runtime_adapter: Option<Arc<MeerkatMachine>>,
/* private fields */
}Expand description
Specification for bootstrapping a mob runtime from a definition, storage, and session service.
Fields§
§definition: MobDefinition§storage: MobStorage§session_service: Arc<dyn MobSessionService>§binary_blob_store: Option<Arc<dyn BinaryBlobStore>>§options: MobBootstrapOptions§runtime_adapter: Option<Arc<MeerkatMachine>>Explicit runtime adapter — bypasses session_service.runtime_adapter().
Used by persistent() to supply the adapter directly so the session
service’s runtime_store can stay None (keeping the checkpointer
enabled). See meerkat-session#checkpointer-enabled-flag.
Implementations§
Source§impl MobBootstrapSpec
impl MobBootstrapSpec
pub fn new( definition: MobDefinition, storage: MobStorage, session_service: Arc<dyn MobSessionService>, ) -> Self
pub fn with_options(self, options: MobBootstrapOptions) -> Self
Sourcepub fn with_session_runtime_adapter(self, adapter: Arc<MeerkatMachine>) -> Self
pub fn with_session_runtime_adapter(self, adapter: Arc<MeerkatMachine>) -> Self
Expose a runtime adapter through the session-service facade.
Custom embedders that construct their own MobSessionService still need
MobKit’s session-service surface to report the same runtime authority
that MobBuilder::with_runtime_adapter(...) receives. This keeps
autonomous-host comms, runtime inspection, and control paths pointed at
one machine without forcing embedders through the stock factory helpers.
Sourcepub fn with_after_create_hook(self, hook: AfterCreateHook) -> Self
pub fn with_after_create_hook(self, hook: AfterCreateHook) -> Self
Wrap the session service with an after-create hook that fires after
each successful create_session. The hook is best-effort: errors are
not propagated. Uses AfterCreateMobSessionService which wraps the
inner service without a pre-build hook, so any pre-build mutations
from inner wrappers are fully reflected in the context.
Sourcepub fn ephemeral(
definition: MobDefinition,
storage: MobStorage,
store_path: PathBuf,
max_sessions: usize,
session_store: Option<Arc<dyn AgentSessionStore>>,
) -> Self
pub fn ephemeral( definition: MobDefinition, storage: MobStorage, store_path: PathBuf, max_sessions: usize, session_store: Option<Arc<dyn AgentSessionStore>>, ) -> Self
Build an ephemeral session service with a correctly wired AgentFactory.
If session_store is provided, it is set on the FactoryAgentBuilder so
that agents use the given store instead of falling back to JSONL.
Sourcepub fn ephemeral_with_hook(
definition: MobDefinition,
storage: MobStorage,
store_path: PathBuf,
max_sessions: usize,
session_store: Option<Arc<dyn AgentSessionStore>>,
hook: impl Fn(&mut CreateSessionRequest) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + '_>> + Send + Sync + 'static,
) -> Self
pub fn ephemeral_with_hook( definition: MobDefinition, storage: MobStorage, store_path: PathBuf, max_sessions: usize, session_store: Option<Arc<dyn AgentSessionStore>>, hook: impl Fn(&mut CreateSessionRequest) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + '_>> + Send + Sync + 'static, ) -> Self
Like ephemeral, but with a pre-build hook that is
called before each agent is constructed. Use this to inject external
tools, augment system prompts, or set per-agent labels.
Sourcepub fn persistent(
definition: MobDefinition,
storage: MobStorage,
store_path: PathBuf,
max_sessions: usize,
session_store: Arc<dyn SessionStore>,
) -> Self
pub fn persistent( definition: MobDefinition, storage: MobStorage, store_path: PathBuf, max_sessions: usize, session_store: Arc<dyn SessionStore>, ) -> Self
Build a persistent session service with a correctly wired AgentFactory.
The session_store is used in two places:
- As the persistence backend for
PersistentSessionService(checkpoint/restore). - Adapted via
StoreAdapterand set onFactoryAgentBuilder.default_session_storeso that agents use it directly instead of falling back to JSONL.
Sourcepub fn persistent_with_hook(
definition: MobDefinition,
storage: MobStorage,
store_path: PathBuf,
max_sessions: usize,
session_store: Arc<dyn SessionStore>,
hook: impl Fn(&mut CreateSessionRequest) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + '_>> + Send + Sync + 'static,
) -> Self
pub fn persistent_with_hook( definition: MobDefinition, storage: MobStorage, store_path: PathBuf, max_sessions: usize, session_store: Arc<dyn SessionStore>, hook: impl Fn(&mut CreateSessionRequest) -> Pin<Box<dyn Future<Output = Result<(), SessionError>> + Send + '_>> + Send + Sync + 'static, ) -> Self
Like persistent, but with a pre-build hook that
is called before each agent is constructed. Use this to inject external
tools, augment system prompts, or set per-agent labels.
Auto Trait Implementations§
impl Freeze for MobBootstrapSpec
impl !RefUnwindSafe for MobBootstrapSpec
impl Send for MobBootstrapSpec
impl Sync for MobBootstrapSpec
impl Unpin for MobBootstrapSpec
impl UnsafeUnpin for MobBootstrapSpec
impl !UnwindSafe for MobBootstrapSpec
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
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>
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>
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