pub struct DaemonFanOutSpawner {
pub config: Arc<ConfigReloader>,
pub shared_mcp: Arc<Mutex<ToolExecutor>>,
pub mcp_tool_defs: Vec<Tool>,
pub mcp_pool: Arc<McpPool>,
pub hub: InteractionHub,
pub subagent_tx: UnboundedSender<SubAgentOp>,
pub tool_service: Arc<CliToolService>,
pub agents_dir: Option<PathBuf>,
pub now_secs: fn() -> i64,
}Expand description
Everything build_agent needs, captured so a fan-out worker can be spawned
from inside a world-system (which has no access to the daemon’s context).
Fields§
§config: Arc<ConfigReloader>Spawn-time config, read fresh per worker so a config.toml edit reaches
fan-out workers too (shared with the daemon’s main spawner).
The daemon-wide MCP executor, for servers configured globally.
mcp_tool_defs: Vec<Tool>Tool definitions from shared_mcp, resolved once rather than per worker.
mcp_pool: Arc<McpPool>Shared MCP pool for per-agent [[mcp_servers]] - a fan-out worker
advertises its blueprint’s already-connected servers and lazily warms any
uncached ones for subsequent workers of the same type.
hub: InteractionHubWhere a worker’s prompts go. Shared with the daemon, so a fan-out worker’s question reaches the same place as any other run’s.
subagent_tx: UnboundedSender<SubAgentOp>Where a worker’s own sub-agent spawns are sent.
tool_service: Arc<CliToolService>The tool dispatcher every worker’s calls go through.
agents_dir: Option<PathBuf>~/.leviath/agents, for resolving worker_query. None when there is no
home directory.
now_secs: fn() -> i64The clock, injected so a test can stamp a worker deterministically.
Trait Implementations§
Source§impl Clone for DaemonFanOutSpawner
impl Clone for DaemonFanOutSpawner
Source§fn clone(&self) -> DaemonFanOutSpawner
fn clone(&self) -> DaemonFanOutSpawner
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl FanOutSpawner for DaemonFanOutSpawner
impl FanOutSpawner for DaemonFanOutSpawner
Auto Trait Implementations§
impl !RefUnwindSafe for DaemonFanOutSpawner
impl !UnwindSafe for DaemonFanOutSpawner
impl Freeze for DaemonFanOutSpawner
impl Send for DaemonFanOutSpawner
impl Sync for DaemonFanOutSpawner
impl Unpin for DaemonFanOutSpawner
impl UnsafeUnpin for DaemonFanOutSpawner
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,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
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 more