deepseek-harness/packages/core/tools/tests
Chinesezjc 24dd48b133 fix(tools): collapse code-mode executor to run_code for model-direct calls
wireSchemas() already advertised only run_code under mode: 'code', but the
executor resolved every call through get(), which returns the full visible
map plus the reserved transport. A model could name a native tool directly
and bypass run_code entirely. Route the execution-path lookups through a
new private resolveExecution() that applies the mode collapse at the
operation boundary: model-direct calls under 'code' may only name run_code
(UNKNOWN_TOOL otherwise), while SDK sub-dispatches (parent token set) keep
every visible tool. get()/schemas() public semantics are unchanged.

The denial happens at createExecution, before the extensible policy
pipeline — pre-execute listeners, approval ask, and guards never observe
a call that is deterministically denied. A collapsed call honors the
pre-dispatch cancellation contract, routes aborted results through the
visible tool's finalizeContent, and captures the finalizer before
argument materialization.

Regenerated docs, catalogs, graphs, scoped events, re-recorded
translation pairs, and updated test assertions.

Fixes #1815
2026-08-11 22:40:36 +08:00
..
code-mode.spec.ts refactor: replace overloaded surface terminology 2026-08-11 15:23:05 +08:00
execution-mode.spec.ts build(vendor): rescope the vendored Cordis packages into @deepseek-ai 2026-08-10 22:04:13 +08:00
execution-signal-types.spec.ts build(vendor): rescope the vendored Cordis packages into @deepseek-ai 2026-08-10 22:04:13 +08:00
gen-tool-catalog.spec.ts Merge remote-tracking branch 'origin/master' into worktree/schedule-conversational-after 2026-08-11 19:05:13 +08:00
invariant.spec.ts build(vendor): rescope the vendored Cordis packages into @deepseek-ai 2026-08-10 22:04:13 +08:00
json-schema.spec.ts fix(schema): align projected and enforced declarations 2026-07-23 01:05:41 +08:00
properties.spec.ts test(tools): cover adversarial JSON containers 2026-07-21 18:20:18 +08:00
py-types.spec.ts test(tools): drop the quantifier that miscounted its own enumeration 2026-08-06 02:33:25 +08:00
schema.spec.ts fix(schema): align projected and enforced declarations 2026-07-23 01:05:41 +08:00
scoped.spec.ts fix(tools): collapse code-mode executor to run_code for model-direct calls 2026-08-11 22:40:36 +08:00
tools.spec.ts fix(tools): collapse code-mode executor to run_code for model-direct calls 2026-08-11 22:40:20 +08:00
ts-types.spec.ts feat(tools): live dispatch lifecycle + native-contract parallel sub-calls in Code Mode 2026-07-26 06:02:36 +08:00