14f7976e3d29f4fe40077d28a87d9fafdb9dc921
Review finding: the exit tool's direct mode/set append flipped the folded mode while the loop could still execute further tool calls from the SAME assistant response — a same-batch exit_plan_mode + write pair would sail past tools/pre-execute under 'default' even though the request was assembled under the plan-shaped header. That broke the design's own invariant (a step's executions run under the mode its assembly folded), which the pending-intent flush was built to hold for user flips. The tool now records the switch as a pending intent like every other writer, flushed at this step's end (still in-turn); pending intents carry a narrate flag so the exit's flush stays silent — the tool result is its narration — while user flips keep the coalesced boundary notice. The gate, folding the logged mode only, now provably covers the whole batch: regression test pins approve-then-write-in-the-same-batch as denied, and the widened toolset still arrives on the next step. The recorded scenarios are re-recorded: the fixture now shows mode/set landing after step/end, before the widened fallback header.
DeepSeek Harness
English | 中文
The DeepSeek Harness SDK is a plugin-based SDK for building agent harnesses.
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:repl # REPL agent demo (needs DEEPSEEK_API_KEY)
pnpm run demo:acp # ACP server agent demo (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 and documentation graph index before package work. Local context lives in packages/ and vendor/.
For agents, follow AGENTS.md.
Languages
TypeScript
96.9%
CSS
1.6%
JavaScript
0.7%
Python
0.7%