Expand description
ShellNodeRunner — spawns a shell command and streams output to the
frontend as shell_chunk WPS 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§
- Shell
Node Runner - Shell
Session Registry - Per-shell stop handles.
ShellStop(MCP tool / UI button) looks up ashell_idand fires the oneshot, which makes the owningShellNodeRunnertree-kill its child. MirrorsInstallSessionRegistry; lives inAppState.shell_sessions. Phase 3 of SPEC_PERSISTENT_SHELL_NODE.
Functions§
- kill_
tree 🔒 - Kill the entire process tree rooted at
pid.Child::kill/kill_on_droponly reap the wrapper shell (cmd /C/sh -c); atask devspawnstask.exe→cargo/nodegrandchildren that survive otherwise. - now_ms 🔒
- publish_
chunk 🔒 - publish_
exit 🔒 - shell_
scopes 🔒