The dsh-tools half of the Code Mode RFC (its fourth, final change): the registry gains its first config — mode: native | code | both — and OWNS how its tools reach the model. 'code' contributes exactly one wire tool, run_code, plus a lazy tools:sdk prompt section declaring every other tool as a generated TypeScript API (jsonSchemaToTs: total over the defineTool subset, unknown degradation, lexicographic byte-identical rendering); 'both' ships both representations; 'native' is byte-for-byte the old behavior. Non-native modes fail every assembly loudly without a typescript-language ctx.codeRuntime. run_code's dispatch bridge: JSON-normalizes each binding argument before dispatch (what dispatches is what the tool/code-dispatch event logs — the append can never fail on payload shape; BigInt/circulars reject that one call), serializes all program tool calls through a per-run queue (even Promise.all — no concurrency-safety metadata yet), routes every sub-call through tools/pre-execute → tools/post-execute (a deny rejects the program-side promise), drops sub-call additionalContext (no safe outlet mid-run; pinned), owns a run-scoped abort that follows the outer signal in and fires on settlement (in-flight sub-dispatch aborted, queued abandoned, queue drained before returning), and converts a failed run into CodeRunFailedError → a structured isError carrying kind + captured logs. tool/code-dispatch joins SessionEventMap by declaration merging (log-only; deriveMessages ignores it). The composed surface: the tools config forwards through agent-core and both app packages; examples/code-agent + demo:code run the worker runtime under mode code (keyless boot smoke + a with-key e2e proving the collapsed [run_code] header, the dispatch events, and the file the program wrote); two new snapshot scenarios (code-mode-turn, both-mode-turn) record the SDK section, collapsed header, dispatch events, and result card — each its own header-pinning class (the harness gains per-scenario config overlays and per-class pins). Catalogs, graphs, cookbook, hooks-bridge notes, and the RFC (moved to implemented/, restructured to decision-era headings) updated in the same change.
62 lines
1.9 KiB
JSON
62 lines
1.9 KiB
JSON
{
|
|
"name": "@deepseek-ai/dsh-stdio-agent",
|
|
"description": "Terminal stdio chat app: the agent-core spine + console logger + readline UI + a pre-created main agent, with a bin to boot a leaf cordis.yml",
|
|
"version": "0.0.1",
|
|
"private": true,
|
|
"type": "module",
|
|
"main": "lib/index.js",
|
|
"types": "lib/types/index.d.ts",
|
|
"bin": {
|
|
"dsh-stdio-agent": "lib/bin.js"
|
|
},
|
|
"exports": {
|
|
".": {
|
|
"types": "./lib/types/index.d.ts",
|
|
"default": "./lib/index.js"
|
|
},
|
|
"./bin": {
|
|
"types": "./lib/types/bin.d.ts",
|
|
"default": "./lib/bin.js"
|
|
},
|
|
"./src/*": "./src/*",
|
|
"./package.json": "./package.json"
|
|
},
|
|
"files": [
|
|
"lib/index.js",
|
|
"lib/bin.js",
|
|
"lib/types/**/*.d.ts",
|
|
"lib/types/**/*.d.ts.map",
|
|
"src"
|
|
],
|
|
"license": "BSD-3-Clause",
|
|
"peerDependencies": {
|
|
"@cordisjs/plugin-include": "^1.0.4",
|
|
"@cordisjs/plugin-loader": "^1.0.0-rc.4",
|
|
"@deepseek-ai/dsh-app-boot": "^0.0.1",
|
|
"@cordisjs/plugin-logger-console": "^1.0.0",
|
|
"@deepseek-ai/dsh-agent": "^0.0.1",
|
|
"@deepseek-ai/dsh-llm": "^0.0.1",
|
|
"@deepseek-ai/dsh-agent-core": "^0.0.1",
|
|
"@deepseek-ai/dsh-session": "^0.0.1",
|
|
"@deepseek-ai/dsh-tools": "^0.0.1",
|
|
"@deepseek-ai/dsh-session-persistence-jsonl": "^0.0.1",
|
|
"cordis": "^4.0.0-rc.6",
|
|
"schemastery": "^3.17.0"
|
|
},
|
|
"devDependencies": {
|
|
"@cordisjs/plugin-include": "workspace:^",
|
|
"@cordisjs/plugin-loader": "workspace:^",
|
|
"@deepseek-ai/dsh-app-boot": "workspace:^",
|
|
"@cordisjs/plugin-logger-console": "workspace:^",
|
|
"@deepseek-ai/dsh-agent": "workspace:^",
|
|
"@deepseek-ai/dsh-llm": "workspace:^",
|
|
"@deepseek-ai/dsh-agent-core": "workspace:^",
|
|
"@deepseek-ai/dsh-system-prompt": "workspace:^",
|
|
"@deepseek-ai/dsh-session": "workspace:^",
|
|
"@deepseek-ai/dsh-tools": "workspace:^",
|
|
"@deepseek-ai/dsh-session-persistence-jsonl": "workspace:^",
|
|
"cordis": "^4.0.0-rc.6",
|
|
"schemastery": "^3.17.0"
|
|
}
|
|
}
|