mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
96c3c94f852c70af6cc5aa1d751fbe61e24640f7
Re-auditing the review-fix commits surfaced a regression the REPLACE re-assert (825cbab3) introduced: unconditionally rebuilding both arrays as filter(...)+append moved structured_output to the END of the model-visible tool list on every untampered assembly (overriding the registry's toolOrder/lexicographic contract) and moved the instruction section to the absolute array end — renderPrompt reads ARRAY order, so any section above order 190 would render before the trailing instruction, violating the sections-sorted-ascending contract. The presence-check version it replaced touched neither array when the entries were intact. The re-assert keeps its REPLACE content semantics but is now placement-preserving: the tool is replaced IN PLACE (duplicates collapse, append only when stripped); the section is re-inserted at its ascending-order position (the first entry above 190 — exactly where the registry's stable sort put it, so the untampered path reaches the model byte-identical). Pinned by two regression tests that fail against the filter+append form: untampered placement (tool before a lexicographically later tool, instruction before an order-200 section) and tamper recovery (stripped section re-enters its band; an added duplicate collapses to one right-schema entry).
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
97%
CSS
1.6%
Python
0.7%
JavaScript
0.6%