odai-dsh-agent 0.2.16 → 0.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +155 -155
  3. package/build/bin/odai-dsh-agent.mjs +36 -29
  4. package/build/bin/odai-dsh-agent.mjs.map +1 -1
  5. package/build/src/control-center-installer.d.mts +7 -2
  6. package/build/src/control-center-installer.d.mts.map +1 -1
  7. package/build/src/control-center-installer.mjs +251 -31
  8. package/build/src/control-center-installer.mjs.map +1 -1
  9. package/build/src/control-center-prompt.d.mts +1 -1
  10. package/build/src/control-center-prompt.d.mts.map +1 -1
  11. package/build/src/control-center-prompt.mjs +12 -3
  12. package/build/src/control-center-prompt.mjs.map +1 -1
  13. package/client/client.js +9 -9
  14. package/control-center.cordis.patch.yml +3 -3
  15. package/package.json +89 -89
  16. package/preset/odai/agent.cordis.yml +266 -266
  17. package/preset/odai/preset.yml +3 -3
  18. package/preset/odai/runtime/role-overlays.mjs +8 -8
  19. package/preset/odai/skills/odai/SKILL.md +68 -68
  20. package/preset/odai/skills/odai/agents/openai.yaml +4 -4
  21. package/preset/odai/skills/odai/assets/claude-agents/agent.md +11 -11
  22. package/preset/odai/skills/odai/assets/codex-agents/config.toml +11 -11
  23. package/preset/odai/skills/odai/assets/codex-agents/role.toml +5 -5
  24. package/preset/odai/skills/odai/assets/copilot-agents/agent.md +13 -13
  25. package/preset/odai/skills/odai/assets/hooks-policy.example.json +24 -24
  26. package/preset/odai/skills/odai/assets/routing-roles/controller.md +15 -15
  27. package/preset/odai/skills/odai/assets/routing-roles/frontend.md +7 -7
  28. package/preset/odai/skills/odai/assets/routing-roles/planner.md +28 -28
  29. package/preset/odai/skills/odai/assets/routing-roles/researcher.md +6 -6
  30. package/preset/odai/skills/odai/assets/routing-roles/reviewer.md +11 -11
  31. package/preset/odai/skills/odai/assets/task-state.md +14 -14
  32. package/preset/odai/skills/odai/manifest.json +52 -52
  33. package/preset/odai/skills/odai/references/craft.md +54 -54
  34. package/preset/odai/skills/odai/references/dao.md +31 -31
  35. package/preset/odai/skills/odai/references/leverage.md +50 -50
  36. package/preset/odai/skills/odai/references/planning.md +83 -83
  37. package/preset/odai/skills/odai/references/support.md +30 -30
  38. package/preset/odai/skills/odai/references/verification.md +24 -24
  39. package/preset/odai/skills/odai/scripts/build-hooks.mjs +273 -273
  40. package/preset/odai/skills/odai/scripts/build-routing.mjs +315 -315
  41. package/preset/odai/skills/odai/scripts/install-routing.mjs +393 -393
  42. package/preset/odai/skills/odai/scripts/odai-hook.mjs +457 -457
  43. package/preset/odai/skills/odai/scripts/run-role.mjs +285 -285
  44. package/preset/odai/skills/odai/scripts/verify-routing.mjs +103 -103
@@ -1,266 +1,266 @@
1
- # The `standard` agent preset: the full coding agent, mounted once per process.
2
- #
3
- # This file is an AGENT-PLANE composition. The roster mounts it ONCE under a
4
- # standing scope; every session naming it joins by scope parentage, so the
5
- # tools and prompt sections registered here cover each joined agent while a
6
- # session's own state stays keyed per Session/Agent inside the plugins. The
7
- # host composition (`base.cordis.yml` + `web.cordis.yml`) keeps everything a
8
- # preset must not own: the registries themselves, the sandbox and approval
9
- # stack, persistence, and the model route.
10
- #
11
- # A service row here MUST sit inside a group carrying an `isolate` realm.
12
- # Without one it publishes into the root realm, where it is process-global —
13
- # another preset publishing the same name collides, and a host reader would
14
- # resolve one preset's instance for every session; `dsh-agent-presets` rejects
15
- # that at mount. `true` means an entry-local realm: this standing mount's own
16
- # private instance, apart from every other preset's. (A shared label does NOT
17
- # pool instances — `provide()` throws on the second registration under the
18
- # same realm symbol; labels join REALMS, and are not what this file needs.)
19
-
20
- # ── identity ────────────────────────────────────────────────────────────────
21
-
22
- # The preset's own model-neutral persona shadows the deployment default. Auto
23
- # routing can upgrade after prompt assembly; `{{cwd}}` remains workspace-local.
24
- - id: persona
25
- name: '@deepseek-ai/dsh-persona'
26
- config:
27
- text: >-
28
- You are Odai, a coding agent. Your working directory is {{cwd}}.
29
-
30
- - id: agent-instructions
31
- name: '@deepseek-ai/dsh-agent-instructions'
32
- config:
33
- maxBytes: 65536
34
-
35
- # ── shell ───────────────────────────────────────────────────────────────────
36
-
37
- # `shell-env` stays in the HOST composition: `apps/cli/src/web.ts` injects it to
38
- # publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
39
- # the criterion for host-plane ownership — injection resolves before any session
40
- # exists, so there is no agent to key by. Behind a preset realm those variables
41
- # never reached the model's shell at all. Both shell tools consume the host
42
- # registry from here; their executors (`bash-sandbox`/`pwsh-sandbox`) are
43
- # host-plane too.
44
- - id: tool-bash
45
- name: '@deepseek-ai/dsh-tool-bash'
46
- disabled: !!js process.platform === 'win32'
47
-
48
- - id: tool-pwsh
49
- name: '@deepseek-ai/dsh-tool-pwsh'
50
- disabled: !!js process.platform !== 'win32'
51
-
52
- # ── filesystem ──────────────────────────────────────────────────────────────
53
-
54
- # Both register into the host `tools` registry and provide nothing, so
55
- # they need no realm. The `fs` service and its policy stay in the host.
56
- - id: tool-fs
57
- name: '@deepseek-ai/dsh-tool-fs'
58
-
59
- - id: tool-fs-search
60
- name: '@deepseek-ai/dsh-tool-fs-search'
61
- config:
62
- sampleOverCapGlobResults: false
63
-
64
- # ── background jobs ────────────────────────────────────────────────────────
65
-
66
- # Only the model-facing controls. The task REGISTRY stays on the host plane:
67
- # its producers sit outside any realm this file could put it in — `tool-bash`
68
- # above resolves it with `ctx.get`, and an entry-local realm here is invisible
69
- # to every sibling row, so `run_in_background` would answer "background jobs
70
- # unavailable" while these controls sat in the catalog. The registry is keyed by
71
- # owning agent anyway, so one host instance serves every session. What a preset
72
- # chooses is whether its agent can collect and stop background work at all.
73
- - id: tool-jobs
74
- name: '@deepseek-ai/dsh-tool-jobs'
75
-
76
- # ── skills ──────────────────────────────────────────────────────────────────
77
-
78
- # The skill REGISTRY lives in the host composition and is layered per scope:
79
- # these rows register into THIS preset's layer of it, so they need no realm.
80
- # `skill-filesystem` contributes local-root discovery for agents on this preset, and
81
- # `tool-skill` gives them the catalog and loader; the merged catalog also
82
- # carries whatever the deployment registered globally (repository plugins).
83
- - id: skill-filesystem
84
- name: '@deepseek-ai/dsh-skill-filesystem'
85
-
86
- - id: tool-skill
87
- name: '@deepseek-ai/dsh-tool-skill'
88
-
89
- # ── goals ───────────────────────────────────────────────────────────────────
90
-
91
- # The goal service and session driver stay on the host plane, where the Gateway
92
- # can resolve them. The human command and model-facing tool register into this
93
- # preset's scoped layers.
94
- - id: command-goal
95
- name: '@deepseek-ai/dsh-command-goal'
96
-
97
- - id: tool-goal
98
- name: '@deepseek-ai/dsh-tool-goal'
99
-
100
- # ── plan mode ───────────────────────────────────────────────────────────────
101
-
102
- # Plan state is per-agent by nature, so an entry-local realm is not a
103
- # workaround here — it is the correct lifetime.
104
- - id: planning
105
- name: cordis:group
106
- group: true
107
- isolate:
108
- planMode: true
109
- config:
110
- - id: plan-mode
111
- name: '@deepseek-ai/dsh-plan-mode'
112
- config:
113
- section: |
114
- You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
115
-
116
- Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
117
-
118
- The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
119
-
120
- Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
121
-
122
- Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
123
-
124
- When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
125
-
126
- # ── compaction ──────────────────────────────────────────────────────────────
127
-
128
- # `compaction-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
129
- # share this realm rather than sit outside it.
130
- #
131
- # `tokenMeter` is deliberately NOT in this realm: the meter stays on the HOST
132
- # plane, and the rows here resolve that one instance. It takes no configuration,
133
- # keys every fold by Session, and owns the context-meter projection units the
134
- # browser reads for every session — behind a realm those units would come and go
135
- # with whichever presets happen to be mounted. What a preset chooses is whether
136
- # its agent compacts at all, which is `compaction-basic` below.
137
- - id: compaction
138
- name: cordis:group
139
- group: true
140
- isolate:
141
- compaction: true
142
- toolResultPruner: true
143
- config:
144
- - id: compaction-basic
145
- name: '@deepseek-ai/dsh-compaction-basic'
146
-
147
- - id: command-compact
148
- name: '@deepseek-ai/dsh-command-compact'
149
-
150
- - id: tool-result-pruner
151
- name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
152
- config:
153
- thresholdChars: 8192
154
- headChars: 4096
155
- tailChars: 1024
156
-
157
- # ── delegation and workflows ────────────────────────────────────────────────
158
-
159
- # The `subagents` registry and its spawn/fork backends live in the HOST
160
- # composition: the registry is a process singleton whose cross-session queries
161
- # the api-proxy serves to the browser, and a provider name may only be
162
- # registered once. This preset contributes the delegation TOOLS, which resolve
163
- # that host registry.
164
- #
165
- # `workflows` is different — nothing outside an agent reads it — so every row
166
- # that reaches it shares one entry-local realm here, and a consumer left
167
- # outside would resolve a host registry this preset does not populate.
168
- #
169
- # `tool-subagent-report` is host-plane for the same reason as the registry,
170
- # not because a preset may not want it: it registers a CONTINUABLE SETUP on
171
- # that singleton rather than a tool this agent calls, and the setup list is
172
- # not scope-aware — one copy per mounted preset means every child gets
173
- # `report` registered once per live session, which throws on the second.
174
- - id: delegation
175
- name: cordis:group
176
- group: true
177
- isolate:
178
- workflowEngine: true
179
- config:
180
- - id: tool-subagent-control
181
- name: '@deepseek-ai/dsh-tool-subagent-control'
182
-
183
- - id: tool-subagent-list-agents
184
- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
185
-
186
- - id: tool-subagent
187
- name: '@deepseek-ai/dsh-tool-subagent'
188
- config:
189
- provider: spawn
190
- toolName: subagent
191
- modelSelectionSettings: true
192
- backgroundMode: continuable
193
-
194
- # Fork omits model selection so provider/model stay equal to the parent and
195
- # the inherited history remains eligible for KV Cache reuse. This preset
196
- # keeps fork continuable and accepts its child-scoped `report` additions invalidating
197
- # that prefix; issue #2124 tracks cache-preserving continuable fork.
198
- - id: tool-subagent-fork
199
- name: '@deepseek-ai/dsh-tool-subagent'
200
- config:
201
- provider: fork
202
- toolName: subagent_fork
203
- backgroundMode: continuable
204
-
205
- # Production dsh does not install these optional providers. Install the
206
- # matching Bundle in this Profile and restart the Host, then copy this
207
- # preset and remove `disabled` from the matching tool row. Host availability
208
- # alone grants no tool.
209
- - id: tool-subagent-codex
210
- name: '@deepseek-ai/dsh-tool-subagent'
211
- disabled: true
212
- config:
213
- provider: codex
214
- toolName: subagent_codex
215
- backgroundMode: one-shot
216
- maxDepth: provider-managed
217
-
218
- - id: tool-subagent-claude-code
219
- name: '@deepseek-ai/dsh-tool-subagent'
220
- disabled: true
221
- config:
222
- provider: claude-code
223
- toolName: subagent_claude_code
224
- backgroundMode: one-shot
225
- maxDepth: provider-managed
226
-
227
- - id: workflow-worker-thread
228
- name: '@deepseek-ai/dsh-workflow-worker-thread'
229
- config:
230
- provider: spawn
231
-
232
- - id: tool-workflow
233
- name: '@deepseek-ai/dsh-tool-workflow'
234
-
235
- - id: tool-ralph
236
- name: '@deepseek-ai/dsh-tool-ralph'
237
- config:
238
- subagentProvider: spawn
239
- maxRounds: 64
240
-
241
- # ── remaining model-facing rows ─────────────────────────────────────────────
242
-
243
- - id: tool-ask-user
244
- name: '@deepseek-ai/dsh-tool-ask-user'
245
-
246
- - id: tool-todo
247
- name: '@deepseek-ai/dsh-tool-todo'
248
- config:
249
- allowParallelInProgress: true
250
-
251
- # The `web` service and its search provider stay in the host composition; only
252
- # the model-facing tool is per-session.
253
- - id: tool-web
254
- name: '@deepseek-ai/dsh-tool-web'
255
- config:
256
- fetch: true
257
- searchTimeoutMs: 60000
258
-
259
- # Odai contributes scoped prompt, guard, routing, user-owned responsibility
260
- # mappings, and evidence listeners. Base controller selection stays host-owned.
261
- - id: odai-governance
262
- name: ./runtime/index.mjs
263
- config:
264
- routing:
265
- mode: auto
266
- provider: spawn
1
+ # The `standard` agent preset: the full coding agent, mounted once per process.
2
+ #
3
+ # This file is an AGENT-PLANE composition. The roster mounts it ONCE under a
4
+ # standing scope; every session naming it joins by scope parentage, so the
5
+ # tools and prompt sections registered here cover each joined agent while a
6
+ # session's own state stays keyed per Session/Agent inside the plugins. The
7
+ # host composition (`base.cordis.yml` + `web.cordis.yml`) keeps everything a
8
+ # preset must not own: the registries themselves, the sandbox and approval
9
+ # stack, persistence, and the model route.
10
+ #
11
+ # A service row here MUST sit inside a group carrying an `isolate` realm.
12
+ # Without one it publishes into the root realm, where it is process-global —
13
+ # another preset publishing the same name collides, and a host reader would
14
+ # resolve one preset's instance for every session; `dsh-agent-presets` rejects
15
+ # that at mount. `true` means an entry-local realm: this standing mount's own
16
+ # private instance, apart from every other preset's. (A shared label does NOT
17
+ # pool instances — `provide()` throws on the second registration under the
18
+ # same realm symbol; labels join REALMS, and are not what this file needs.)
19
+
20
+ # ── identity ────────────────────────────────────────────────────────────────
21
+
22
+ # The preset's own model-neutral persona shadows the deployment default. Auto
23
+ # routing can upgrade after prompt assembly; `{{cwd}}` remains workspace-local.
24
+ - id: persona
25
+ name: '@deepseek-ai/dsh-persona'
26
+ config:
27
+ text: >-
28
+ You are Odai, a coding agent. Your working directory is {{cwd}}.
29
+
30
+ - id: agent-instructions
31
+ name: '@deepseek-ai/dsh-agent-instructions'
32
+ config:
33
+ maxBytes: 65536
34
+
35
+ # ── shell ───────────────────────────────────────────────────────────────────
36
+
37
+ # `shell-env` stays in the HOST composition: `apps/cli/src/web.ts` injects it to
38
+ # publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
39
+ # the criterion for host-plane ownership — injection resolves before any session
40
+ # exists, so there is no agent to key by. Behind a preset realm those variables
41
+ # never reached the model's shell at all. Both shell tools consume the host
42
+ # registry from here; their executors (`bash-sandbox`/`pwsh-sandbox`) are
43
+ # host-plane too.
44
+ - id: tool-bash
45
+ name: '@deepseek-ai/dsh-tool-bash'
46
+ disabled: !!js process.platform === 'win32'
47
+
48
+ - id: tool-pwsh
49
+ name: '@deepseek-ai/dsh-tool-pwsh'
50
+ disabled: !!js process.platform !== 'win32'
51
+
52
+ # ── filesystem ──────────────────────────────────────────────────────────────
53
+
54
+ # Both register into the host `tools` registry and provide nothing, so
55
+ # they need no realm. The `fs` service and its policy stay in the host.
56
+ - id: tool-fs
57
+ name: '@deepseek-ai/dsh-tool-fs'
58
+
59
+ - id: tool-fs-search
60
+ name: '@deepseek-ai/dsh-tool-fs-search'
61
+ config:
62
+ sampleOverCapGlobResults: false
63
+
64
+ # ── background jobs ────────────────────────────────────────────────────────
65
+
66
+ # Only the model-facing controls. The task REGISTRY stays on the host plane:
67
+ # its producers sit outside any realm this file could put it in — `tool-bash`
68
+ # above resolves it with `ctx.get`, and an entry-local realm here is invisible
69
+ # to every sibling row, so `run_in_background` would answer "background jobs
70
+ # unavailable" while these controls sat in the catalog. The registry is keyed by
71
+ # owning agent anyway, so one host instance serves every session. What a preset
72
+ # chooses is whether its agent can collect and stop background work at all.
73
+ - id: tool-jobs
74
+ name: '@deepseek-ai/dsh-tool-jobs'
75
+
76
+ # ── skills ──────────────────────────────────────────────────────────────────
77
+
78
+ # The skill REGISTRY lives in the host composition and is layered per scope:
79
+ # these rows register into THIS preset's layer of it, so they need no realm.
80
+ # `skill-filesystem` contributes local-root discovery for agents on this preset, and
81
+ # `tool-skill` gives them the catalog and loader; the merged catalog also
82
+ # carries whatever the deployment registered globally (repository plugins).
83
+ - id: skill-filesystem
84
+ name: '@deepseek-ai/dsh-skill-filesystem'
85
+
86
+ - id: tool-skill
87
+ name: '@deepseek-ai/dsh-tool-skill'
88
+
89
+ # ── goals ───────────────────────────────────────────────────────────────────
90
+
91
+ # The goal service and session driver stay on the host plane, where the Gateway
92
+ # can resolve them. The human command and model-facing tool register into this
93
+ # preset's scoped layers.
94
+ - id: command-goal
95
+ name: '@deepseek-ai/dsh-command-goal'
96
+
97
+ - id: tool-goal
98
+ name: '@deepseek-ai/dsh-tool-goal'
99
+
100
+ # ── plan mode ───────────────────────────────────────────────────────────────
101
+
102
+ # Plan state is per-agent by nature, so an entry-local realm is not a
103
+ # workaround here — it is the correct lifetime.
104
+ - id: planning
105
+ name: cordis:group
106
+ group: true
107
+ isolate:
108
+ planMode: true
109
+ config:
110
+ - id: plan-mode
111
+ name: '@deepseek-ai/dsh-plan-mode'
112
+ config:
113
+ section: |
114
+ You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the user switches the session mode. Imperative language to implement changes means plan the implementation, not execute it. A user's conversational agreement — including an answer confirming something you asked — approves nothing and does not end plan mode; fold the confirmed decision into the plan and submit it through exit_plan_mode.
115
+
116
+ Explore first. Use non-mutating reads, searches, static analysis, and checks to ground the plan in the actual repository. Do not edit or write files, change configuration, run formatters or code generation that rewrites tracked files, commit, or otherwise carry out the plan. Prefer existing functions and patterns over new machinery.
117
+
118
+ The tool catalog stays the same across modes for request-cache stability. These plan-mode rules override any later tool description or guidance that suggests using mutation tools; those tools remain listed to keep the tool catalog unchanged. Do not use todo_write to track this planning phase: it tracks implementation after an approved plan, while the plan itself belongs in exit_plan_mode.
119
+
120
+ Resolve discoverable facts by inspection. Use ask_user_question only for user-owned choices or material ambiguity that inspection cannot answer. Do not ask the user where code lives or how current behavior works when you can find out.
121
+
122
+ Make the plan decision-complete: state the goal and success criteria; group implementation changes by subsystem; identify public API, schema, and data-flow changes; cover edge cases, failure modes, tests, acceptance criteria, and explicit assumptions. Keep it concise enough to review but detailed enough that another engineer can implement it without making design decisions.
123
+
124
+ When ready, call exit_plan_mode with the complete plan markdown, starting with a # title. Make exit_plan_mode the only and final tool call in that assistant response: it presents the plan for approval, and implementation begins only in a later step after approval. Do not paste the final plan as a plain reply or ask "should I proceed?" through prose or ask_user_question. If review rejects it, incorporate the feedback and present again. If the review channel is unavailable or aborted, stay in plan mode and ask the user to switch modes manually; do not proceed with implementation.
125
+
126
+ # ── compaction ──────────────────────────────────────────────────────────────
127
+
128
+ # `compaction-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
129
+ # share this realm rather than sit outside it.
130
+ #
131
+ # `tokenMeter` is deliberately NOT in this realm: the meter stays on the HOST
132
+ # plane, and the rows here resolve that one instance. It takes no configuration,
133
+ # keys every fold by Session, and owns the context-meter projection units the
134
+ # browser reads for every session — behind a realm those units would come and go
135
+ # with whichever presets happen to be mounted. What a preset chooses is whether
136
+ # its agent compacts at all, which is `compaction-basic` below.
137
+ - id: compaction
138
+ name: cordis:group
139
+ group: true
140
+ isolate:
141
+ compaction: true
142
+ toolResultPruner: true
143
+ config:
144
+ - id: compaction-basic
145
+ name: '@deepseek-ai/dsh-compaction-basic'
146
+
147
+ - id: command-compact
148
+ name: '@deepseek-ai/dsh-command-compact'
149
+
150
+ - id: tool-result-pruner
151
+ name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
152
+ config:
153
+ thresholdChars: 8192
154
+ headChars: 4096
155
+ tailChars: 1024
156
+
157
+ # ── delegation and workflows ────────────────────────────────────────────────
158
+
159
+ # The `subagents` registry and its spawn/fork backends live in the HOST
160
+ # composition: the registry is a process singleton whose cross-session queries
161
+ # the api-proxy serves to the browser, and a provider name may only be
162
+ # registered once. This preset contributes the delegation TOOLS, which resolve
163
+ # that host registry.
164
+ #
165
+ # `workflows` is different — nothing outside an agent reads it — so every row
166
+ # that reaches it shares one entry-local realm here, and a consumer left
167
+ # outside would resolve a host registry this preset does not populate.
168
+ #
169
+ # `tool-subagent-report` is host-plane for the same reason as the registry,
170
+ # not because a preset may not want it: it registers a CONTINUABLE SETUP on
171
+ # that singleton rather than a tool this agent calls, and the setup list is
172
+ # not scope-aware — one copy per mounted preset means every child gets
173
+ # `report` registered once per live session, which throws on the second.
174
+ - id: delegation
175
+ name: cordis:group
176
+ group: true
177
+ isolate:
178
+ workflowEngine: true
179
+ config:
180
+ - id: tool-subagent-control
181
+ name: '@deepseek-ai/dsh-tool-subagent-control'
182
+
183
+ - id: tool-subagent-list-agents
184
+ name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
185
+
186
+ - id: tool-subagent
187
+ name: '@deepseek-ai/dsh-tool-subagent'
188
+ config:
189
+ provider: spawn
190
+ toolName: subagent
191
+ modelSelectionSettings: true
192
+ backgroundMode: continuable
193
+
194
+ # Fork omits model selection so provider/model stay equal to the parent and
195
+ # the inherited history remains eligible for KV Cache reuse. This preset
196
+ # keeps fork continuable and accepts its child-scoped `report` additions invalidating
197
+ # that prefix; issue #2124 tracks cache-preserving continuable fork.
198
+ - id: tool-subagent-fork
199
+ name: '@deepseek-ai/dsh-tool-subagent'
200
+ config:
201
+ provider: fork
202
+ toolName: subagent_fork
203
+ backgroundMode: continuable
204
+
205
+ # Production dsh does not install these optional providers. Install the
206
+ # matching Bundle in this Profile and restart the Host, then copy this
207
+ # preset and remove `disabled` from the matching tool row. Host availability
208
+ # alone grants no tool.
209
+ - id: tool-subagent-codex
210
+ name: '@deepseek-ai/dsh-tool-subagent'
211
+ disabled: true
212
+ config:
213
+ provider: codex
214
+ toolName: subagent_codex
215
+ backgroundMode: one-shot
216
+ maxDepth: provider-managed
217
+
218
+ - id: tool-subagent-claude-code
219
+ name: '@deepseek-ai/dsh-tool-subagent'
220
+ disabled: true
221
+ config:
222
+ provider: claude-code
223
+ toolName: subagent_claude_code
224
+ backgroundMode: one-shot
225
+ maxDepth: provider-managed
226
+
227
+ - id: workflow-worker-thread
228
+ name: '@deepseek-ai/dsh-workflow-worker-thread'
229
+ config:
230
+ provider: spawn
231
+
232
+ - id: tool-workflow
233
+ name: '@deepseek-ai/dsh-tool-workflow'
234
+
235
+ - id: tool-ralph
236
+ name: '@deepseek-ai/dsh-tool-ralph'
237
+ config:
238
+ subagentProvider: spawn
239
+ maxRounds: 64
240
+
241
+ # ── remaining model-facing rows ─────────────────────────────────────────────
242
+
243
+ - id: tool-ask-user
244
+ name: '@deepseek-ai/dsh-tool-ask-user'
245
+
246
+ - id: tool-todo
247
+ name: '@deepseek-ai/dsh-tool-todo'
248
+ config:
249
+ allowParallelInProgress: true
250
+
251
+ # The `web` service and its search provider stay in the host composition; only
252
+ # the model-facing tool is per-session.
253
+ - id: tool-web
254
+ name: '@deepseek-ai/dsh-tool-web'
255
+ config:
256
+ fetch: true
257
+ searchTimeoutMs: 60000
258
+
259
+ # Odai contributes scoped prompt, guard, routing, user-owned responsibility
260
+ # mappings, and evidence listeners. Base controller selection stays host-owned.
261
+ - id: odai-governance
262
+ name: ./runtime/index.mjs
263
+ config:
264
+ routing:
265
+ mode: auto
266
+ provider: spawn
@@ -1,3 +1,3 @@
1
- name: odai 治理模式
2
- order: 40
3
- description: 完整继承 DSH 标准模式 全部能力,并叠加 odai 治理、证据与自动路由,以 odai 为总控。
1
+ name: odai 治理模式
2
+ order: 40
3
+ description: 完整继承 DSH 标准模式 全部能力,并叠加 odai 治理、证据与自动路由,以 odai 为总控。
@@ -1,15 +1,15 @@
1
1
  const DSH_ROLE_OVERLAYS = Object.freeze({
2
- researcher: `## DSH researcher execution boundary
3
-
2
+ researcher: `## DSH researcher execution boundary
3
+
4
4
  This responsibility is always read-only. In child dispatch, return JSON only, with no fence and no fields beyond this exact shape: {"schemaVersion":1,"question":"...","facts":[{"claim":"...","excerpt":"exact complete cited line","source":{"path":"repository/relative/path","line":1},"authority":"source role and freshness boundary"}],"conflicts":[],"unknowns":[],"stop":"..."}. In same-turn dispatch, build that same bounded packet, then call odai_responsibility_return with target=controller, the packet as summary, and decisive source references; never emit a terminal response. Use only read, glob, grep, and other non-mutating source tools; do not run shell commands, edit, plan, recommend, approve, or delegate. Return the smallest useful 2-6 facts from at least two distinct files. DSH validates child packet citations inside the project root before exposing them; the controller must independently verify any same-turn handback that changes a decision.`,
5
- planner: `## DSH planner execution boundary
6
-
5
+ planner: `## DSH planner execution boundary
6
+
7
7
  This responsibility is read-only in both dispatch modes. Child dispatch receives a bounded packet and returns its plan to the controller automatically. Same-turn dispatch retains the current conversation and project context; when complete it must call odai_responsibility_return with target=controller instead of emitting a terminal response. When the user-persisted planner mapping explicitly includes maxTokens, that responsibility ceiling overrides the controller ceiling only inside a same-turn scope. Do not implement or edit. For plan-only work, a new task, expanded scope, or missing user-owned authorization, return to controller for the minimum user decision.`,
8
- reviewer: `## DSH reviewer execution boundary
9
-
8
+ reviewer: `## DSH reviewer execution boundary
9
+
10
10
  Child dispatch starts only from a bounded, hash-addressed packet that contains verified tool evidence. The child's effective request header must match its configured route before its output is accepted. Same-turn dispatch is a read-only non-independent check; it must call odai_responsibility_return with target=controller and must never claim independent acceptance. Without a sufficient child packet, the recorded reviewer gap remains pending for silent reassessment after new acceptance, write, diff, test, check, failure, or host-evidence diagnostics; report the missing packet only once for that proposal. A controller-local or same-turn check may guide evidence gathering, but it must not stop the authorized task solely to ask the user for artifacts the project can produce.`,
11
- frontend: `## DSH frontend execution boundary
12
-
11
+ frontend: `## DSH frontend execution boundary
12
+
13
13
  Same-turn dispatch runs in one bounded controller responsibility scope, is not an independent child, retains the active conversation, workspace, dev-server, and browser context, and may perform the authorized frontend implementation. Child dispatch is read-only design responsibility: inspect the bounded packet, return concrete design, interaction, state, and acceptance guidance, and leave all edits, shell work, dev-server control, browser execution, and final delivery to the controller. DSH may use a user-persisted frontend provider/model/reasoning route and, only when that mapping explicitly includes maxTokens, apply that responsibility ceiling inside a same-turn scope or child request. The runtime compares the effective DSH request header with that mapping and records an applied, mismatch, or unverified receipt; configuration and self-report are not routing evidence.`,
14
14
  });
15
15
  export function dshRoleContract(role, canonicalContract, referenceContracts = {}) {