mirror of
https://github.com/deepseek-ai/deepseek-harness
synced 2026-08-15 21:04:50 +00:00
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.
28 lines
438 B
JSON
28 lines
438 B
JSON
{
|
|
"extends": "../../../tsconfig.base.json",
|
|
"compilerOptions": {
|
|
"rootDir": "src",
|
|
"outDir": "lib/types"
|
|
},
|
|
"include": [
|
|
"src"
|
|
],
|
|
"references": [
|
|
{
|
|
"path": "../../../vendor/cosmokit"
|
|
},
|
|
{
|
|
"path": "../../../vendor/cordis"
|
|
},
|
|
{
|
|
"path": "../../../vendor/schemastery"
|
|
},
|
|
{
|
|
"path": "../../core/tools"
|
|
},
|
|
{
|
|
"path": "../../support/invariants"
|
|
}
|
|
]
|
|
}
|