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.
Examples
English | 中文
Runnable demonstrations of the main DeepSeek Harness interfaces and extension points. Each child directory owns its configuration, prerequisites, commands, and detailed behavior.
mcp-memory
Optional overlays that connect supported third-party memory servers through the generic MCP client. See the memory example reference.
headless-agent
A non-interactive agent that accepts one task, runs it, and emits a selected machine-readable or human-readable output format. See the headless example reference.
jsonrpc-agent
An unattended coding agent driven through the Python SDK and JSON-RPC. See the JSON-RPC example reference.
web-cordis
A self-referential agent that can inspect and change its in-memory Cordis plugin tree. See the web-cordis example reference.
acp-agent
An Agent Client Protocol automation server for programmatic clients, with session, permission, and cancellation support. See the ACP example reference.