Skip to main content

Crate cli_stream

Crate cli_stream 

Source
Expand description

Generic streaming subprocess engine.

Spawn a child CLI, stream its stdout/stderr line-by-line through a callback as ProcessEvents, cancel it (SIGTERM → SIGKILL), and augment PATH so Node-based CLIs resolve even from a Finder-launched .app. No agent / harness protocol knowledge — it parses no CLI’s output and knows no agent’s wire format. The one node-specific concession is the best-effort PATH resolver (augmented_node_path): every consumer in this family drives a Node-based CLI, and as the shared leaf this is the one place bob-rs and agent-harness can both reuse it without a cycle. Otherwise it’s purely subprocess streaming, useful to anyone driving a CLI.

InstallEvent is the sibling shape for streamed install/login output.

This is a deliberate leaf crate: both bob-rs (the bob SDK) and agent-harness (the framework) depend on it, which is what lets bob-rs stay standalone without a dependency cycle.

Re-exports§

pub use error::StreamError;
pub use install::InstallEvent;
pub use process::augmented_node_path;
pub use process::spawn_streaming;
pub use process::ProcessEvent;
pub use process::ProcessHandle;

Modules§

error
Typed errors for the streaming engine.
install
Streamed install / sign-in progress events.
process
Generic streaming subprocess engine — the shared core behind every process-backed harness (bob, Claude Code, Codex, …).