deepseek-harness/packages/core/tools/src
Yichen Jiang e258cf7a2d fix(tools): resolve the collapse through the scope, not the deployment default
`collapses()` read `defaultMode`, so the collapse only applied when the
DEPLOYMENT was `code`. An agent handed `code` by an agent preset under a
native default announced `[run_code]` on the wire and still executed a
model-direct native call -- the bypass this collapse exists to close,
reopened for exactly the composition `dsh-agent-tool-mode` produces.

`modeFor(scope)` is the same resolution `wireSchemas` and the SDK section
already use, so presentation and execution cannot disagree, and a mode
inherited from a standing preset scope collapses like a declared one.

The per-agent and preset tests asserted only the wire, which is why the
regression passed them. They now assert through the executor: the body
never runs, the call resolves UNKNOWN_TOOL, and the native sibling beside
it still executes.
2026-08-11 22:53:17 +08:00
..
code-mode.ts refactor: replace overloaded surface terminology 2026-08-11 15:23:05 +08:00
index.ts fix(tools): resolve the collapse through the scope, not the deployment default 2026-08-11 22:53:17 +08:00
invariant.ts build(vendor): rescope the vendored Cordis packages into @deepseek-ai 2026-08-10 22:04:13 +08:00
json-schema.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
presentation.ts refactor: replace overloaded surface terminology 2026-08-11 15:23:05 +08:00
py-types.ts docs: make technical prose concrete 2026-08-10 16:34:20 +08:00
schema.ts refactor: replace overloaded surface terminology 2026-08-11 15:23:05 +08:00
testing.ts refactor: migrate linting to Oxlint 2026-07-29 14:32:11 +08:00
ts-types.ts refactor: replace overloaded surface terminology 2026-08-11 15:23:05 +08:00
types.ts fix(client): consume typed business session events 2026-08-09 18:42:25 +08:00