pub struct OperatorSpawner { /* private fields */ }Expand description
A SpawnerAdapter implementation that hands the dispatch off to an
Arc<dyn Operator>.
OperatorSpawner itself does not inspect the operator’s kind —
MainAi / Human / Automate / Composite all go through the same
path, and the operator implementation absorbs the differences.
§Position — the AgentSpec-axis Operator path
Use this type on the path that bakes a separate Operator backend
into every AgentDef. For an AgentKind::Operator AgentDef, the
OperatorSpawnerFactory produces one with
OperatorSpawner::new(op, system_prompt, worker_binding) and places it
in routes[agent_name]. Agents flowing in through the agent.md
loader default to kind = Operator, so they land here.
This is now the only way a dispatch reaches an Operator. There
used to be a paired Blueprint-global (session) axis,
crate::middleware::OperatorDelegateMiddleware, which registered one
backend on the session and applied it uniformly to every agent; when
both were effective it sat at the outer end of the stack and bypassed
inner.spawn, leaving this type inert. It was removed — it resolved
its destination from the launch record rather than the Run’s seat (so
a handover could not move it) and, having no per-agent spawner, could
not render or bake an agent’s system_prompt. With one axis left,
the exclusivity question it created goes away with it.
Implementations§
Trait Implementations§
Source§impl SpawnerAdapter for OperatorSpawner
impl SpawnerAdapter for OperatorSpawner
Source§fn spawn<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
engine: &'life1 Engine,
ctx: &'life2 Ctx,
task_id: StepId,
attempt: u32,
token: CapToken,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Worker>, SpawnError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn spawn<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
engine: &'life1 Engine,
ctx: &'life2 Ctx,
task_id: StepId,
attempt: u32,
token: CapToken,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn Worker>, SpawnError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Box<dyn Worker>. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for OperatorSpawner
impl !UnwindSafe for OperatorSpawner
impl Freeze for OperatorSpawner
impl Send for OperatorSpawner
impl Sync for OperatorSpawner
impl Unpin for OperatorSpawner
impl UnsafeUnpin for OperatorSpawner
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> 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