mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
4565161c64b86a7db497106a76f0d5dd81e2e119
dispose() ended stdin and sent SIGTERM in the same tick, so the child's EOF-driven quiesce had no window to run. The real acp-agent has no SIGTERM handler in a normal session — it flushes persistence and stops child-owned work via the server bridge's connection-close path (conn.closed → per-agent dispose → final session/flush), driven by stdin EOF, NOT by a signal. A prompt response can resolve from a turn/end before that post-turn flush lands, so the child still owes durable work when dispose runs; a same-tick default SIGTERM terminated it mid-flush, orphaning child-owned bash and dropping the flush. dispose now waits for the child's natural exit after stdin EOF first, then escalates SIGTERM (grace), then SIGKILL — a three-tier ladder. Add an `exitsWithin` helper for the bounded waits. Regression coverage: a new mock mode (MOCK_FLUSH_ON_EOF) flushes a marker asynchronously on EOF then self-exits; the tier-1 test asserts the marker lands (proven RED on the same-tick-SIGTERM ordering — child killed mid-flush). MOCK_IGNORE_EOF covers the middle tier (ignores EOF, dies on default SIGTERM); the existing MOCK_TRAP_SIGTERM test covers the SIGKILL tier.
DeepSeek Harness
Monorepo for the DeepSeek Harness group.
Projects
- DeepSeek Code — DeepSeek's coding agent product.
Development
This monorepo is built on the Cordis framework (vendored as source under vendor/), microkernel-style: everything is a plugin.
pnpm install
pnpm run test # vitest
pnpm run demo:echo # runnable echo-agent example (no API key needed)
pnpm run demo:coding # the real DeepSeek coding agent (needs DEEPSEEK_API_KEY)
For humans, start with the development guide for local setup, hooks, environment variables, and quality gates, then read the architecture design before package work. Local context lives in packages/ and vendor/.
For agents, follow AGENTS.md.
Languages
TypeScript
97%
CSS
1.6%
Python
0.7%
JavaScript
0.6%