mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
A recycled shell pid could donate an unrelated process's children to the terminal session's cleanup signalling: post-exit rescans queried processTree/processSession by numeric pid alone. The handle now captures the spawned shell's start identity at construction and adopts newly scanned members only while the root pid still carries it; already-adopted members keep their own identities, which every signal already rechecks. Regressions cover a recycled root donating an imposter child and a shell whose identity was never observable; the terminal fakes now model the root row the real /proc and ps scans include. Also from the review round: tool-pty's dependency list is re-sorted, and the LSP renderer documents the deliberate drive-letter reading of ambiguous file: URIs (display-only blast radius).
pty/ — persistent PTY capability family
English | 中文
PTY stands for Pseudo-Terminal(伪终端). This capability provides persistent, owner-scoped terminal sessions for workflows that require state across tool calls or interactive stdin. PTY complements the one-shot bash and filesystem tools; it does not replace their stronger per-operation contracts.
| Package | Role | ctx key |
|---|---|---|
pty (@deepseek-ai/dsh-pty) |
Backend registry, branded ids, exact-Agent ownership, session operations, and awaited cleanup | ctx.pty |
pty-local (@deepseek-ai/dsh-pty-local) |
Shell backend over ctx.subprocess.spawnTerminal: readiness detection, bounded terminal state, sandbox policy, and session operations |
registers on ctx.pty |
tool-pty (@deepseek-ai/dsh-tool-pty) |
Six model-facing tools and generic task integration for background sends | registers on ctx.tools |
The design and deferred boundaries live in the persistent PTY Agent Note.