pub trait RuntimeFactory: Send + Sync {
// Required method
fn create(
&self,
options: RuntimeFactoryOptions,
) -> BoxFuture<'_, Result<RuntimeHandle, String>>;
// Provided method
fn supports_interactive(&self) -> bool { ... }
}Expand description
Injected factory that turns a session manager + CLI args into a live
AgentSessionRuntime.
Implementations wrap create_agent_session_services +
create_agent_session_from_services + AgentSessionRuntime::new. A fake
implementation in tests returns a lightweight runtime without network or
filesystem access.
Required Methods§
Sourcefn create(
&self,
options: RuntimeFactoryOptions,
) -> BoxFuture<'_, Result<RuntimeHandle, String>>
fn create( &self, options: RuntimeFactoryOptions, ) -> BoxFuture<'_, Result<RuntimeHandle, String>>
Build the runtime.
§Errors
Implementation-defined; the error string is surfaced verbatim prefixed
with Error: .
Provided Methods§
Sourcefn supports_interactive(&self) -> bool
fn supports_interactive(&self) -> bool
Whether the factory has a usable interactive TUI runtime. The default
is true; a minimal/fake factory returns false so the bootstrap
short-circuits interactive runs with an actionable error instead of
launching an empty TUI.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".