Skip to main content

Module shell_node

Module shell_node 

Source
Expand description

ShellNodeRunner — spawns a shell command and streams output to the frontend as shell_chunk MPS events scoped to the agent’s block.

Launched by handle_shell_create (server/mod.rs) via tokio::spawn. The runner is fire-and-forget; the HTTP handler returns the shell_id to the MCP caller immediately while output streams asynchronously.

Phase 2 of SPEC_PERSISTENT_SHELL_NODE_2026_06_11.md. Uses tokio::process::Command with captured pipes (no PTY in this phase; PTY support is a Phase 3 follow-up that requires portable-pty wiring similar to the existing ShellController).

Structs§

ShellNodeCreateEvent
shell_node_create: a Shell command started, so the agent pane adds its row before the first chunk. Scoped block:<agent block>.
ShellNodeRunner
ShellSessionRegistry
ShellStatusInfo
Live status of a running (or recently exited) shell. Updated by ShellNodeRunner as output arrives and on exit.
ShellSummary
Snapshot of one currently-running shell for the Swarm pane’s per-agent long-running-process rows. See ShellSessionRegistry::list_active. Carries block_id (unfiltered list — same shape as subagent.ListActive/ ActiveSubagent.parent_block_id) so the Swarm pane’s buildTree() groups by block client-side in one pass, instead of one RPC call per tracked agent block.

Enums§

ShellChunkEvent
shell_chunk: one line a Shell command wrote, or its exit. Scoped shell:<shell_id>.