pub struct ChildRunner { /* private fields */ }Expand description
Ergonomic facade for child spawns.
Reuses SpawnContext (agent, tools, caches, router, completion handler) —
the same dependency bundle the background scheduler uses.
Implementations§
Source§impl ChildRunner
impl ChildRunner
Sourcepub fn new(ctx: SpawnContext) -> Self
pub fn new(ctx: SpawnContext) -> Self
Create a runner over the given spawn context.
Sourcepub async fn run_child(&self, input: RunChildInput) -> Result<(), String>
pub async fn run_child(&self, input: RunChildInput) -> Result<(), String>
Run a child session via the canonical spawn core.
ANTI-FORK: constructs a SpawnJob and delegates to
crate::sdk::spawn::run_child_spawn; there is no inline execute/finalize.
Sourcepub async fn run_child_stream(
&self,
input: RunChildInput,
) -> Result<Receiver<AgentEvent>, String>
pub async fn run_child_stream( &self, input: RunChildInput, ) -> Result<Receiver<AgentEvent>, String>
Run a child session and return a receiver of the child’s
AgentEvent stream.
The receiver is subscribed from the existing broadcast infra
(ctx.session_event_senders) before the spawn is started, so no events
are missed. This reuses the canonical broadcast channel — it does NOT
invent a parallel RunOutcomeStream/status_rx mpsc.
Auto Trait Implementations§
impl !RefUnwindSafe for ChildRunner
impl !UnwindSafe for ChildRunner
impl Freeze for ChildRunner
impl Send for ChildRunner
impl Sync for ChildRunner
impl Unpin for ChildRunner
impl UnsafeUnpin for ChildRunner
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