pub struct SpawnDeps<'a> {
pub tool_service: &'a CliToolService,
pub config: &'a Config,
pub shared_mcp: Arc<Mutex<ToolExecutor>>,
pub mcp_tool_defs: &'a [Tool],
pub hub: &'a InteractionHub,
pub now_secs: i64,
pub subagent_tx: UnboundedSender<SubAgentOp>,
}Expand description
Everything a spawn needs that is not the request itself.
Grouped because these seven travel together through every spawn path -
build_agent, build_agent_for_reload, and the fan-out world-system -
and threading them positionally meant three signatures that had to agree
plus a too_many_arguments suppression on each. It also meant a nine-argument
call in which config, mcp_tool_defs and hub are adjacent references:
transposing two of them type-checks in some orders, and the compiler is the
only thing that was ever going to notice.
Fields§
§tool_service: &'a CliToolServiceThe daemon’s tool service, which per-agent state is registered against.
config: &'a ConfigThe resolved daemon configuration for this run.
MCP connections shared by every agent, built once at startup.
mcp_tool_defs: &'a [Tool]Tool definitions those MCP servers advertise.
hub: &'a InteractionHubWhere this agent’s interaction prompts are parked.
now_secs: i64Spawn time, injected so a test does not depend on the wall clock.
subagent_tx: UnboundedSender<SubAgentOp>Channel the agent’s sub-agent tools send operations on.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SpawnDeps<'a>
impl<'a> !UnwindSafe for SpawnDeps<'a>
impl<'a> Freeze for SpawnDeps<'a>
impl<'a> Send for SpawnDeps<'a>
impl<'a> Sync for SpawnDeps<'a>
impl<'a> Unpin for SpawnDeps<'a>
impl<'a> UnsafeUnpin for SpawnDeps<'a>
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