deepseek-harness/apps/cli/tests
Yichen Jiang 9eaa9d22a5 feat(tools): let one agent choose its tool presentation, and ship code
Code Mode was a deployment-wide field on the host `tools` row: a
deployment ran every session that way or none. The obvious product
shape — 代码模式 beside 标准/极简/创造 in the preset picker — had
nothing to hang on.

The registry itself cannot move into a preset; the agent loop's
scheduler, the api-proxy's presenters, and every tool plugin are its
consumers. So split the registry from its projection: `presentAs(mode)`
writes one cell on the calling agent's scope layer, exactly as
`restrict()` does, and the three reads that decided presentation take
that scope's mode instead of the service's. The config `mode` becomes
the default agents shadow rather than a process-wide fact.

Two consequences are load-bearing. `run_code` now enters a view only
for scopes whose own mode presents it — a native agent must not find it
dispatchable because another agent in the process does — and the
reserved name holds whatever the configured mode, since any agent may
select a code mode later.

`dsh-agent-tool-mode` is the row a preset carries to declare this. A
code mode waits for the host's `codeRuntime` rather than assuming it,
so a runtime-less deployment fails the preset at mount, naming the
row, instead of at the session's first request.

The shipped `code` preset is `standard` plus that row, ordered second.
2026-08-07 00:44:49 +08:00
..
fixtures fix: retire leftovers of the removed $DSH_HOME/config.yaml personal overlay 2026-08-06 17:28:58 +08:00
args.spec.ts fix: address ds-review-bot round — insert-aliasing clones, settlement gates, closure module fallback 2026-08-06 09:27:44 +08:00
built-bin.e2e.ts refactor(cli)!: namespace the profile and bundle manifests under dsh.profile and dsh.bundle 2026-08-06 17:28:30 +08:00
headless-shutdown.e2e.ts refactor(cli)!: namespace the profile and bundle manifests under dsh.profile and dsh.bundle 2026-08-06 17:28:30 +08:00
install-script.spec.ts cleanup: remove TUI package and legacy dsh entrypoints 2026-08-04 13:20:28 +08:00
lazy-search-startup.compat.spec.ts feat(cli)!: dsh boots profiles; plugin subcommand manages them via pnpm 2026-08-06 06:29:06 +08:00
memory-mcp-configs.spec.ts fix(examples): keep memory configs provider-owned 2026-07-31 02:34:52 -07:00
process-shutdown.spec.ts test(cli): cover shutdown timer invariants 2026-08-04 11:03:52 +08:00
source-launch.compat.spec.ts feat(cli)!: dsh boots profiles; plugin subcommand manages them via pnpm 2026-08-06 06:29:06 +08:00
telemetry-switch.spec.ts fix(ci): telemetry switch trivially satisfied without the row; coverage-lane test fixes 2026-08-06 07:30:32 +08:00
trusted-hosts.spec.ts feat(cli)!: dsh boots profiles; plugin subcommand manages them via pnpm 2026-08-06 06:29:06 +08:00
web-agent-presets.spec.ts feat(tools): let one agent choose its tool presentation, and ship code 2026-08-07 00:44:49 +08:00