Skip to main content

spawn

Function spawn 

Source
pub fn spawn(
    spec: SessionSpec,
    tx: Sender<AgentEvent>,
) -> Result<Box<dyn AgentControl>>
Expand description

Starts a session and returns a control handle; events stream through tx.

Determines whether to use native structured protocols or PTY passthrough based on spec.transport. Auto chooses the best native protocol for the agent; falls back to PTY if native startup fails.