pub struct SubprocessProcessSpawnerFactory;Expand description
Factory for AgentKind::Subprocess. Turns the spec into a
ProcessSpawner.
Naming convention: <WorkerIMPL><AdapterType>SpawnerFactory. Factory
names carry both the worker implementation and the host adapter so
they are not confused with each other; the old
ShellSpawnerFactory was renamed to this.
Spec shape:
{ "program": "agent-block", "args": ["-s","s.lua"],
"use_stdin": true, // optional, default = true
"stream_mode": "ndjson_lines" | "sse_events" | "length_prefixed" | null // optional, default = null (plain)
}Trait Implementations§
Source§impl SpawnerFactory for SubprocessProcessSpawnerFactory
impl SpawnerFactory for SubprocessProcessSpawnerFactory
Source§fn build(
&self,
agent_def: &AgentDef,
_hint: Option<&Value>,
) -> Result<Arc<dyn SpawnerAdapter>, CompileError>
fn build( &self, agent_def: &AgentDef, _hint: Option<&Value>, ) -> Result<Arc<dyn SpawnerAdapter>, CompileError>
Build the concrete
SpawnerAdapter for one AgentDef. hint is
the matching entry (if any) from Blueprint.hints.per_agent.Source§impl SpawnerFactoryKind for SubprocessProcessSpawnerFactory
impl SpawnerFactoryKind for SubprocessProcessSpawnerFactory
Source§const KIND: AgentKind = AgentKind::Subprocess
const KIND: AgentKind = AgentKind::Subprocess
The
AgentKind this factory handles — used as the HashMap key
by SpawnerRegistry::register.Source§type Worker = ProcessWorker
type Worker = ProcessWorker
The concrete Worker type produced by this
AgentKind — this
binds the type chain all the way from AgentKind down to Worker.
Every factory declares it so the AgentKind → Worker mapping is
explicit across all four layers. It is the source of truth for
preserving the concrete type right up until SpawnerAdapter::spawn
erases it into Box<dyn Worker>.Auto Trait Implementations§
impl Freeze for SubprocessProcessSpawnerFactory
impl RefUnwindSafe for SubprocessProcessSpawnerFactory
impl Send for SubprocessProcessSpawnerFactory
impl Sync for SubprocessProcessSpawnerFactory
impl Unpin for SubprocessProcessSpawnerFactory
impl UnsafeUnpin for SubprocessProcessSpawnerFactory
impl UnwindSafe for SubprocessProcessSpawnerFactory
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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