pub struct HostBackends {
pub harness_store: Arc<dyn RuntimeHarnessStore>,
pub agent_store: Arc<dyn RuntimeAgentStore>,
pub session_store: Arc<dyn RuntimeSessionStore>,
pub event_log: Arc<dyn EventLog>,
pub compaction_checkpoint_store: Arc<dyn CompactionCheckpointStore>,
pub provider_store: Arc<dyn RuntimeProviderStore>,
pub event_sink: Arc<dyn EventSink>,
pub storage_store: Arc<dyn SessionStorageStore>,
pub connection_resolver: Option<Arc<dyn UserConnectionResolver>>,
pub session_task_registry: Option<Arc<dyn SessionTaskRegistry>>,
pub schedule_store_factory: Option<Arc<dyn Fn(i64) -> Arc<dyn SessionScheduleStore> + Sync + Send>>,
pub platform_store_factory: Option<Arc<dyn Fn(i64, TypedId<SessionIdMarker>) -> Arc<dyn PlatformStore> + Sync + Send>>,
}Expand description
Non-filesystem backend bundle supplied to an execution host.
Use this when you want the public runtime orchestration but your own store
implementations instead of the built-in in-memory ones. Session filesystem
selection is always resolved from PlatformDefinition.
Fields§
§harness_store: Arc<dyn RuntimeHarnessStore>Harness definitions available to the runtime.
agent_store: Arc<dyn RuntimeAgentStore>Agent definitions available to the runtime.
session_store: Arc<dyn RuntimeSessionStore>Session records and mutable session metadata.
event_log: Arc<dyn EventLog>Coherent canonical event log. This is the sole conversation write path.
compaction_checkpoint_store: Arc<dyn CompactionCheckpointStore>Durable replacement context used to reconstruct compacted model input.
provider_store: Arc<dyn RuntimeProviderStore>Model/provider resolution and default-model configuration.
event_sink: Arc<dyn EventSink>Optional, non-blocking live observation sink notified after commit.
storage_store: Arc<dyn SessionStorageStore>Session key/value + secret storage backend.
connection_resolver: Option<Arc<dyn UserConnectionResolver>>Optional resolver for user connection tokens (e.g. GitHub, Daytona).
When set, the runtime exposes it through ToolContext.connection_resolver
so connection-aware capabilities can resolve tokens lazily at tool time.
None (the default) leaves the resolver unset, matching prior behavior.
There is no in-memory default because a connection resolver implies a
real credential source the embedder must supply.
session_task_registry: Option<Arc<dyn SessionTaskRegistry>>Optional session-task registry injected into the act path so background
tools, subagents, and monitors persist their lifecycle. None (the
default) leaves RuntimeHostAdapter::session_task_registry returning
None, matching prior in-memory behavior.
schedule_store_factory: Option<Arc<dyn Fn(i64) -> Arc<dyn SessionScheduleStore> + Sync + Send>>Optional per-org schedule store factory. None (the default) leaves
RuntimeHostAdapter::schedule_store returning None.
platform_store_factory: Option<Arc<dyn Fn(i64, TypedId<SessionIdMarker>) -> Arc<dyn PlatformStore> + Sync + Send>>Optional per-(org, session) platform store factory. None (the
default) leaves RuntimeHostAdapter::platform_store returning None.
Implementations§
Source§impl HostBackends
impl HostBackends
Sourcepub fn in_memory() -> HostBackends
pub fn in_memory() -> HostBackends
Backend bundle with in-memory implementations for every store.
Suitable for tests, examples, and the default runtime configuration.
Use the chainable with_* setters to override individual stores.
pub fn with_harness_store( self, store: Arc<dyn RuntimeHarnessStore>, ) -> HostBackends
pub fn with_agent_store(self, store: Arc<dyn RuntimeAgentStore>) -> HostBackends
pub fn with_session_store( self, store: Arc<dyn RuntimeSessionStore>, ) -> HostBackends
Sourcepub fn with_event_log(self, log: Arc<dyn EventLog>) -> HostBackends
pub fn with_event_log(self, log: Arc<dyn EventLog>) -> HostBackends
Replace the coherent canonical event log.
pub fn with_compaction_checkpoint_store( self, store: Arc<dyn CompactionCheckpointStore>, ) -> HostBackends
pub fn with_provider_store( self, store: Arc<dyn RuntimeProviderStore>, ) -> HostBackends
Sourcepub fn with_event_sink(self, sink: Arc<dyn EventSink>) -> HostBackends
pub fn with_event_sink(self, sink: Arc<dyn EventSink>) -> HostBackends
Install a non-blocking post-commit observation sink.
pub fn with_storage_store( self, store: Arc<dyn SessionStorageStore>, ) -> HostBackends
Sourcepub fn with_connection_resolver(
self,
resolver: Arc<dyn UserConnectionResolver>,
) -> HostBackends
pub fn with_connection_resolver( self, resolver: Arc<dyn UserConnectionResolver>, ) -> HostBackends
Supply a resolver for user connection tokens (e.g. GitHub, Daytona).
The runtime forwards it into ToolContext so connection-aware
capabilities resolve tokens lazily at tool execution time.
Sourcepub fn with_session_task_registry(
self,
registry: Arc<dyn SessionTaskRegistry>,
) -> HostBackends
pub fn with_session_task_registry( self, registry: Arc<dyn SessionTaskRegistry>, ) -> HostBackends
Inject a session-task registry so background tools / subagents / monitors
persist their lifecycle through the act path. Additive: leaving this unset
keeps the prior behavior (the adapter returns None).
Sourcepub fn with_schedule_store_factory(
self,
factory: Arc<dyn Fn(i64) -> Arc<dyn SessionScheduleStore> + Sync + Send>,
) -> HostBackends
pub fn with_schedule_store_factory( self, factory: Arc<dyn Fn(i64) -> Arc<dyn SessionScheduleStore> + Sync + Send>, ) -> HostBackends
Inject a per-org schedule store factory. The closure is invoked with the internal org id each time the act path needs a schedule store.
Sourcepub fn with_platform_store_factory(
self,
factory: Arc<dyn Fn(i64, TypedId<SessionIdMarker>) -> Arc<dyn PlatformStore> + Sync + Send>,
) -> HostBackends
pub fn with_platform_store_factory( self, factory: Arc<dyn Fn(i64, TypedId<SessionIdMarker>) -> Arc<dyn PlatformStore> + Sync + Send>, ) -> HostBackends
Inject a per-(org, session) platform store factory. The closure is invoked with the internal org id and the calling session id.
Trait Implementations§
Source§impl Clone for HostBackends
impl Clone for HostBackends
Source§fn clone(&self) -> HostBackends
fn clone(&self) -> HostBackends
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for HostBackends
impl !UnwindSafe for HostBackends
impl Freeze for HostBackends
impl Send for HostBackends
impl Sync for HostBackends
impl Unpin for HostBackends
impl UnsafeUnpin for HostBackends
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request