Files
deepseek-harness/packages/subprocess
Tianyi Cui 43d81b67ce fix(subprocess): consumers with one mixed env map split DSH_* onto the managed channel
Codex review of the acp-only fix found lsp-local carries the identical
defect: its server config's unrestricted env merges into the connection's
ordinary spawn channel, so a configured DSH_* fact crashed the spawn with
the reserved-namespace rejection. The partition now lives on the seam as
splitEnvChannels() beside the scrub it complements; the ACP run and the
LSP connection both use it, and each proves child delivery end-to-end
(MOCK_ECHO_ENV / LSP_FAKE_ECHO_ENV fixture knobs). Seam + consumer README
rows updated (en+zh, re-recorded). bash-local is already two-channel;
mcp/pty/sdk bypass the seam and only share the scrub.
2026-07-27 01:21:32 +08:00
..

subprocess/ — subprocess capability family

English | 中文

The shared home for spawning managed child-process trees: fully-specified spawn specs with Node-shaped per-stream stdio dispositions (raw pipes, inherit, bounded tail-keep collection with spill files), the one credential scrub every harness spawner uses, offset-based incremental reads, tree-scoped signalling with SIGTERM→grace→SIGKILL escalation, and the cooperative dispose ladder. Command defaulting, shell semantics, deadlines, protocol framing, and presentation stay with consumers — the bash executors, the LSP host, and the ACP subagent backend. See the subprocess seam Agent Note.

Package ctx key Role
subprocess (@deepseek-ai/dsh-subprocess) ctx.subprocess The seam: abstract SubprocessService.spawn(spec), the fully-explicit SubprocessSpawnSpec with per-stream stdio dispositions, SubprocessHandle (streams, offset-based readers, kill/terminate/waitForExit/dispose), and the shared scrub + DSH_*/CollectedOutput vocabulary
subprocess-local (@deepseek-ai/dsh-subprocess-local) The local implementation: detached process trees, per-disposition stream wiring, tail-keep truncation with bounded private spill files, the DSH_* merge order, tree signalling with escalation, the dispose ladder, and terminate-and-join disposal

The service owns process lifetime across consumer reloads; consumers own what a process means (a bash command, a future non-shell runner) and every default that shapes one.