odai-dsh-agent 0.2.25 → 0.2.26
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.
- package/LICENSE +21 -21
- package/README.md +155 -155
- package/build/bin/odai-dsh-agent.mjs +17 -17
- package/client/client.js +12 -12
- package/control-center.cordis.patch.yml +3 -3
- package/package.json +90 -90
- package/preset/odai/agent.cordis.yml +260 -260
- package/preset/odai/preset.yml +3 -3
- package/preset/odai/runtime/role-overlays.mjs +8 -8
- package/preset/odai/skills/odai/SKILL.md +70 -68
- package/preset/odai/skills/odai/agents/openai.yaml +4 -4
- package/preset/odai/skills/odai/assets/claude-agents/agent.md +11 -11
- package/preset/odai/skills/odai/assets/codex-agents/config.toml +11 -11
- package/preset/odai/skills/odai/assets/codex-agents/role.toml +5 -5
- package/preset/odai/skills/odai/assets/copilot-agents/agent.md +13 -13
- package/preset/odai/skills/odai/assets/hooks-policy.example.json +24 -24
- package/preset/odai/skills/odai/assets/routing-roles/controller.md +15 -15
- package/preset/odai/skills/odai/assets/routing-roles/frontend.md +7 -7
- package/preset/odai/skills/odai/assets/routing-roles/planner.md +28 -28
- package/preset/odai/skills/odai/assets/routing-roles/researcher.md +7 -7
- package/preset/odai/skills/odai/assets/routing-roles/reviewer.md +11 -11
- package/preset/odai/skills/odai/assets/task-state.md +14 -14
- package/preset/odai/skills/odai/manifest.json +52 -52
- package/preset/odai/skills/odai/references/craft.md +54 -54
- package/preset/odai/skills/odai/references/dao.md +31 -30
- package/preset/odai/skills/odai/references/leverage.md +50 -48
- package/preset/odai/skills/odai/references/planning.md +83 -83
- package/preset/odai/skills/odai/references/support.md +31 -30
- package/preset/odai/skills/odai/references/verification.md +22 -22
- package/preset/odai/skills/odai/scripts/build-hooks.mjs +273 -273
- package/preset/odai/skills/odai/scripts/build-routing.mjs +315 -315
- package/preset/odai/skills/odai/scripts/install-routing.mjs +448 -448
- package/preset/odai/skills/odai/scripts/odai-hook.mjs +457 -457
- package/preset/odai/skills/odai/scripts/run-role.mjs +285 -285
- package/preset/odai/skills/odai/scripts/verify-routing.mjs +103 -103
|
@@ -1,260 +1,260 @@
|
|
|
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
|
-
- id: delegation
|
|
169
|
-
name: cordis:group
|
|
170
|
-
group: true
|
|
171
|
-
isolate:
|
|
172
|
-
workflowEngine: true
|
|
173
|
-
config:
|
|
174
|
-
- id: tool-subagent-control
|
|
175
|
-
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
176
|
-
|
|
177
|
-
- id: tool-subagent-list-agents
|
|
178
|
-
name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
|
|
179
|
-
|
|
180
|
-
- id: tool-subagent
|
|
181
|
-
name: '@deepseek-ai/dsh-tool-subagent'
|
|
182
|
-
config:
|
|
183
|
-
provider: spawn
|
|
184
|
-
toolName: subagent
|
|
185
|
-
modelSelectionSettings: true
|
|
186
|
-
backgroundMode: continuable
|
|
187
|
-
|
|
188
|
-
# Fork omits model selection so provider/model stay equal to the parent and
|
|
189
|
-
# the inherited history remains eligible for KV Cache reuse. This preset
|
|
190
|
-
# keeps fork continuable; parent and child inherit the same messaging tool,
|
|
191
|
-
# while the parent id and return guidance follow the inherited history.
|
|
192
|
-
- id: tool-subagent-fork
|
|
193
|
-
name: '@deepseek-ai/dsh-tool-subagent'
|
|
194
|
-
config:
|
|
195
|
-
provider: fork
|
|
196
|
-
toolName: subagent_fork
|
|
197
|
-
backgroundMode: continuable
|
|
198
|
-
|
|
199
|
-
# Production dsh does not install these optional providers. Install the
|
|
200
|
-
# matching Bundle in this Profile and restart the Host, then copy this
|
|
201
|
-
# preset and remove `disabled` from the matching tool row. Host availability
|
|
202
|
-
# alone grants no tool.
|
|
203
|
-
- id: tool-subagent-codex
|
|
204
|
-
name: '@deepseek-ai/dsh-tool-subagent'
|
|
205
|
-
disabled: true
|
|
206
|
-
config:
|
|
207
|
-
provider: codex
|
|
208
|
-
toolName: subagent_codex
|
|
209
|
-
backgroundMode: one-shot
|
|
210
|
-
maxDepth: provider-managed
|
|
211
|
-
|
|
212
|
-
- id: tool-subagent-claude-code
|
|
213
|
-
name: '@deepseek-ai/dsh-tool-subagent'
|
|
214
|
-
disabled: true
|
|
215
|
-
config:
|
|
216
|
-
provider: claude-code
|
|
217
|
-
toolName: subagent_claude_code
|
|
218
|
-
backgroundMode: one-shot
|
|
219
|
-
maxDepth: provider-managed
|
|
220
|
-
|
|
221
|
-
- id: workflow-worker-thread
|
|
222
|
-
name: '@deepseek-ai/dsh-workflow-worker-thread'
|
|
223
|
-
config:
|
|
224
|
-
provider: spawn
|
|
225
|
-
|
|
226
|
-
- id: tool-workflow
|
|
227
|
-
name: '@deepseek-ai/dsh-tool-workflow'
|
|
228
|
-
|
|
229
|
-
- id: tool-ralph
|
|
230
|
-
name: '@deepseek-ai/dsh-tool-ralph'
|
|
231
|
-
config:
|
|
232
|
-
subagentProvider: spawn
|
|
233
|
-
maxRounds: 64
|
|
234
|
-
|
|
235
|
-
# ── remaining model-facing rows ─────────────────────────────────────────────
|
|
236
|
-
|
|
237
|
-
- id: tool-ask-user
|
|
238
|
-
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
239
|
-
|
|
240
|
-
- id: tool-todo
|
|
241
|
-
name: '@deepseek-ai/dsh-tool-todo'
|
|
242
|
-
config:
|
|
243
|
-
allowParallelInProgress: true
|
|
244
|
-
|
|
245
|
-
# The `web` service and its search provider stay in the host composition; only
|
|
246
|
-
# the model-facing tool is per-session.
|
|
247
|
-
- id: tool-web
|
|
248
|
-
name: '@deepseek-ai/dsh-tool-web'
|
|
249
|
-
config:
|
|
250
|
-
fetch: true
|
|
251
|
-
searchTimeoutMs: 60000
|
|
252
|
-
|
|
253
|
-
# Odai contributes scoped prompt, guard, routing, user-owned responsibility
|
|
254
|
-
# mappings, and evidence listeners. Base controller selection stays host-owned.
|
|
255
|
-
- id: odai-governance
|
|
256
|
-
name: ./runtime/index.mjs
|
|
257
|
-
config:
|
|
258
|
-
routing:
|
|
259
|
-
mode: auto
|
|
260
|
-
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
|
+
- id: delegation
|
|
169
|
+
name: cordis:group
|
|
170
|
+
group: true
|
|
171
|
+
isolate:
|
|
172
|
+
workflowEngine: true
|
|
173
|
+
config:
|
|
174
|
+
- id: tool-subagent-control
|
|
175
|
+
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
176
|
+
|
|
177
|
+
- id: tool-subagent-list-agents
|
|
178
|
+
name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
|
|
179
|
+
|
|
180
|
+
- id: tool-subagent
|
|
181
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
182
|
+
config:
|
|
183
|
+
provider: spawn
|
|
184
|
+
toolName: subagent
|
|
185
|
+
modelSelectionSettings: true
|
|
186
|
+
backgroundMode: continuable
|
|
187
|
+
|
|
188
|
+
# Fork omits model selection so provider/model stay equal to the parent and
|
|
189
|
+
# the inherited history remains eligible for KV Cache reuse. This preset
|
|
190
|
+
# keeps fork continuable; parent and child inherit the same messaging tool,
|
|
191
|
+
# while the parent id and return guidance follow the inherited history.
|
|
192
|
+
- id: tool-subagent-fork
|
|
193
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
194
|
+
config:
|
|
195
|
+
provider: fork
|
|
196
|
+
toolName: subagent_fork
|
|
197
|
+
backgroundMode: continuable
|
|
198
|
+
|
|
199
|
+
# Production dsh does not install these optional providers. Install the
|
|
200
|
+
# matching Bundle in this Profile and restart the Host, then copy this
|
|
201
|
+
# preset and remove `disabled` from the matching tool row. Host availability
|
|
202
|
+
# alone grants no tool.
|
|
203
|
+
- id: tool-subagent-codex
|
|
204
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
205
|
+
disabled: true
|
|
206
|
+
config:
|
|
207
|
+
provider: codex
|
|
208
|
+
toolName: subagent_codex
|
|
209
|
+
backgroundMode: one-shot
|
|
210
|
+
maxDepth: provider-managed
|
|
211
|
+
|
|
212
|
+
- id: tool-subagent-claude-code
|
|
213
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
214
|
+
disabled: true
|
|
215
|
+
config:
|
|
216
|
+
provider: claude-code
|
|
217
|
+
toolName: subagent_claude_code
|
|
218
|
+
backgroundMode: one-shot
|
|
219
|
+
maxDepth: provider-managed
|
|
220
|
+
|
|
221
|
+
- id: workflow-worker-thread
|
|
222
|
+
name: '@deepseek-ai/dsh-workflow-worker-thread'
|
|
223
|
+
config:
|
|
224
|
+
provider: spawn
|
|
225
|
+
|
|
226
|
+
- id: tool-workflow
|
|
227
|
+
name: '@deepseek-ai/dsh-tool-workflow'
|
|
228
|
+
|
|
229
|
+
- id: tool-ralph
|
|
230
|
+
name: '@deepseek-ai/dsh-tool-ralph'
|
|
231
|
+
config:
|
|
232
|
+
subagentProvider: spawn
|
|
233
|
+
maxRounds: 64
|
|
234
|
+
|
|
235
|
+
# ── remaining model-facing rows ─────────────────────────────────────────────
|
|
236
|
+
|
|
237
|
+
- id: tool-ask-user
|
|
238
|
+
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
239
|
+
|
|
240
|
+
- id: tool-todo
|
|
241
|
+
name: '@deepseek-ai/dsh-tool-todo'
|
|
242
|
+
config:
|
|
243
|
+
allowParallelInProgress: true
|
|
244
|
+
|
|
245
|
+
# The `web` service and its search provider stay in the host composition; only
|
|
246
|
+
# the model-facing tool is per-session.
|
|
247
|
+
- id: tool-web
|
|
248
|
+
name: '@deepseek-ai/dsh-tool-web'
|
|
249
|
+
config:
|
|
250
|
+
fetch: true
|
|
251
|
+
searchTimeoutMs: 60000
|
|
252
|
+
|
|
253
|
+
# Odai contributes scoped prompt, guard, routing, user-owned responsibility
|
|
254
|
+
# mappings, and evidence listeners. Base controller selection stays host-owned.
|
|
255
|
+
- id: odai-governance
|
|
256
|
+
name: ./runtime/index.mjs
|
|
257
|
+
config:
|
|
258
|
+
routing:
|
|
259
|
+
mode: auto
|
|
260
|
+
provider: spawn
|
package/preset/odai/preset.yml
CHANGED
|
@@ -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. A frozen requirements ledger, when present, contains controller-normalized decisions whose exact excerpts and ordering were verified against authenticated direct-user messages; that source binding does not prove the normalized meaning or replacement semantics. Check each claimed replacement against its excerpts, and use only active entries for coverage after that check. Without the ledger, do not infer coverage from controller prose or supersede requirements yourself. 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 = {}) {
|