odai-dsh-agent 0.2.37 → 0.2.38

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 (33) hide show
  1. package/README.md +32 -41
  2. package/build/bin/odai-dsh-agent.d.mts +11 -0
  3. package/build/bin/odai-dsh-agent.d.mts.map +1 -1
  4. package/build/bin/odai-dsh-agent.mjs +48 -108
  5. package/build/bin/odai-dsh-agent.mjs.map +1 -1
  6. package/build/src/control-center-installer.d.mts.map +1 -1
  7. package/build/src/control-center-installer.mjs +81 -4
  8. package/build/src/control-center-installer.mjs.map +1 -1
  9. package/build/src/installer.d.mts +55 -17
  10. package/build/src/installer.d.mts.map +1 -1
  11. package/build/src/installer.mjs +52 -227
  12. package/build/src/installer.mjs.map +1 -1
  13. package/package.json +9 -4
  14. package/preset/odai/runtime/lifecycle-runtime.d.mts.map +1 -1
  15. package/preset/odai/runtime/lifecycle-runtime.mjs +8 -1
  16. package/preset/odai/runtime/lifecycle-runtime.mjs.map +1 -1
  17. package/preset/odai/runtime/routing-context.d.mts +3 -0
  18. package/preset/odai/runtime/routing-context.d.mts.map +1 -1
  19. package/preset/odai/runtime/routing-context.mjs +11 -3
  20. package/preset/odai/runtime/routing-context.mjs.map +1 -1
  21. package/preset/odai/skills/odai/SKILL.md +41 -40
  22. package/preset/odai/skills/odai/manifest.json +1 -1
  23. package/preset/odai/skills/odai/references/craft.md +2 -2
  24. package/preset/odai/skills/odai/references/dao.md +15 -16
  25. package/preset/odai/skills/odai/references/planning.md +2 -2
  26. package/preset/odai/skills/odai/references/verification.md +4 -4
  27. package/preset.cordis.patch.yml +282 -0
  28. package/build/src/control-center-prompt.d.mts +0 -4
  29. package/build/src/control-center-prompt.d.mts.map +0 -1
  30. package/build/src/control-center-prompt.mjs +0 -27
  31. package/build/src/control-center-prompt.mjs.map +0 -1
  32. package/preset/odai/agent.cordis.yml +0 -261
  33. package/preset/odai/preset.yml +0 -3
@@ -1,261 +0,0 @@
1
- # The Odai-owned coding preset, mounted once per process.
2
- # Standard is a reference, not a composition that this preset must mirror.
3
- #
4
- # This file is an AGENT-PLANE composition. The roster mounts it ONCE under a
5
- # standing scope; every session naming it joins by scope parentage, so the
6
- # tools and prompt sections registered here cover each joined agent while a
7
- # session's own state stays keyed per Session/Agent inside the plugins. The
8
- # host composition (`base.cordis.yml` + `web.cordis.yml`) keeps everything a
9
- # preset must not own: the registries themselves, the sandbox and approval
10
- # stack, persistence, and the model route.
11
- #
12
- # A service row here MUST sit inside a group carrying an `isolate` realm.
13
- # Without one it publishes into the root realm, where it is process-global —
14
- # another preset publishing the same name collides, and a host reader would
15
- # resolve one preset's instance for every session; `dsh-agent-presets` rejects
16
- # that at mount. `true` means an entry-local realm: this standing mount's own
17
- # private instance, apart from every other preset's. (A shared label does NOT
18
- # pool instances — `provide()` throws on the second registration under the
19
- # same realm symbol; labels join REALMS, and are not what this file needs.)
20
-
21
- # ── identity ────────────────────────────────────────────────────────────────
22
-
23
- # The preset's own model-neutral persona shadows the deployment default. Auto
24
- # routing can upgrade after prompt assembly; `{{cwd}}` remains workspace-local.
25
- - id: persona
26
- name: '@deepseek-ai/dsh-persona'
27
- config:
28
- prefix: You are Odai, a coding agent.
29
- suffix: Your working directory is {{cwd}}.
30
-
31
- - id: agent-instructions
32
- name: '@deepseek-ai/dsh-agent-instructions'
33
- config:
34
- maxBytes: 65536
35
-
36
- # ── shell ───────────────────────────────────────────────────────────────────
37
-
38
- # `shell-env` stays in the HOST composition: `apps/cli/src/web.ts` injects it to
39
- # publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
40
- # the criterion for host-plane ownership — injection resolves before any session
41
- # exists, so there is no agent to key by. Behind a preset realm those variables
42
- # never reached the model's shell at all. Both shell tools consume the host
43
- # registry from here; their executors (`bash-sandbox`/`pwsh-sandbox`) are
44
- # host-plane too.
45
- - id: tool-bash
46
- name: '@deepseek-ai/dsh-tool-bash'
47
- disabled: !!js process.platform === 'win32'
48
-
49
- - id: tool-pwsh
50
- name: '@deepseek-ai/dsh-tool-pwsh'
51
- disabled: !!js process.platform !== 'win32'
52
-
53
- # ── filesystem ──────────────────────────────────────────────────────────────
54
-
55
- # Both register into the host `tools` registry and provide nothing, so
56
- # they need no realm. The `fs` service and its policy stay in the host.
57
- - id: tool-fs
58
- name: '@deepseek-ai/dsh-tool-fs'
59
-
60
- - id: tool-fs-search
61
- name: '@deepseek-ai/dsh-tool-fs-search'
62
- config:
63
- sampleOverCapGlobResults: false
64
-
65
- # ── background jobs ────────────────────────────────────────────────────────
66
-
67
- # Only the model-facing controls. The task REGISTRY stays on the host plane:
68
- # its producers sit outside any realm this file could put it in — `tool-bash`
69
- # above resolves it with `ctx.get`, and an entry-local realm here is invisible
70
- # to every sibling row, so `run_in_background` would answer "background jobs
71
- # unavailable" while these controls sat in the catalog. The registry is keyed by
72
- # owning agent anyway, so one host instance serves every session. What a preset
73
- # chooses is whether its agent can collect and stop background work at all.
74
- - id: tool-jobs
75
- name: '@deepseek-ai/dsh-tool-jobs'
76
-
77
- # ── skills ──────────────────────────────────────────────────────────────────
78
-
79
- # The skill REGISTRY lives in the host composition and is layered per scope:
80
- # these rows register into THIS preset's layer of it, so they need no realm.
81
- # `skill-filesystem` contributes local-root discovery for agents on this preset, and
82
- # `tool-skill` gives them the catalog and loader; the merged catalog also
83
- # carries whatever the deployment registered globally (repository plugins).
84
- - id: skill-filesystem
85
- name: '@deepseek-ai/dsh-skill-filesystem'
86
-
87
- - id: tool-skill
88
- name: '@deepseek-ai/dsh-tool-skill'
89
-
90
- # ── goals ───────────────────────────────────────────────────────────────────
91
-
92
- # The goal service and session driver stay on the host plane, where the Gateway
93
- # can resolve them. The human command and model-facing tool register into this
94
- # preset's scoped layers.
95
- - id: command-goal
96
- name: '@deepseek-ai/dsh-command-goal'
97
-
98
- - id: tool-goal
99
- name: '@deepseek-ai/dsh-tool-goal'
100
-
101
- # ── plan mode ───────────────────────────────────────────────────────────────
102
-
103
- # Plan state is per-agent by nature, so an entry-local realm is not a
104
- # workaround here — it is the correct lifetime.
105
- - id: planning
106
- name: cordis:group
107
- group: true
108
- isolate:
109
- planMode: true
110
- config:
111
- - id: plan-mode
112
- name: '@deepseek-ai/dsh-plan-mode'
113
- config:
114
- section: |
115
- 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.
116
-
117
- 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.
118
-
119
- 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.
120
-
121
- 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.
122
-
123
- 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.
124
-
125
- 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.
126
-
127
- # ── compaction ──────────────────────────────────────────────────────────────
128
-
129
- # `compaction-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
130
- # share this realm rather than sit outside it.
131
- #
132
- # `tokenMeter` is deliberately NOT in this realm: the meter stays on the HOST
133
- # plane, and the rows here resolve that one instance. It takes no configuration,
134
- # keys every fold by Session, and owns the context-meter projection units the
135
- # browser reads for every session — behind a realm those units would come and go
136
- # with whichever presets happen to be mounted. What a preset chooses is whether
137
- # its agent compacts at all, which is `compaction-basic` below.
138
- - id: compaction
139
- name: cordis:group
140
- group: true
141
- isolate:
142
- compaction: true
143
- toolResultPruner: true
144
- config:
145
- - id: compaction-basic
146
- name: '@deepseek-ai/dsh-compaction-basic'
147
-
148
- - id: command-compact
149
- name: '@deepseek-ai/dsh-command-compact'
150
-
151
- - id: tool-result-pruner
152
- name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
153
- config:
154
- thresholdChars: 8192
155
- headChars: 4096
156
- tailChars: 1024
157
-
158
- # ── delegation and workflows ────────────────────────────────────────────────
159
-
160
- # The `subagents` registry and its spawn/fork backends live in the HOST
161
- # composition: the registry is a process singleton whose cross-session queries
162
- # the api-proxy serves to the browser, and a provider name may only be
163
- # registered once. This preset contributes the delegation TOOLS, which resolve
164
- # that host registry.
165
- #
166
- # `workflows` is different — nothing outside an agent reads it — so every row
167
- # that reaches it shares one entry-local realm here, and a consumer left
168
- # outside would resolve a host registry this preset does not populate.
169
- - id: delegation
170
- name: cordis:group
171
- group: true
172
- isolate:
173
- workflowEngine: true
174
- config:
175
- - id: tool-subagent-control
176
- name: '@deepseek-ai/dsh-tool-subagent-control'
177
-
178
- - id: tool-subagent-list-agents
179
- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
180
-
181
- - id: tool-subagent
182
- name: '@deepseek-ai/dsh-tool-subagent'
183
- config:
184
- provider: spawn
185
- toolName: subagent
186
- modelSelectionSettings: true
187
- backgroundMode: continuable
188
-
189
- # Fork omits model selection so provider/model stay equal to the parent and
190
- # the inherited history remains eligible for KV Cache reuse. This preset
191
- # keeps fork continuable; parent and child inherit the same messaging tool,
192
- # while the parent id and return guidance follow the inherited history.
193
- - id: tool-subagent-fork
194
- name: '@deepseek-ai/dsh-tool-subagent'
195
- config:
196
- provider: fork
197
- toolName: subagent_fork
198
- backgroundMode: continuable
199
-
200
- # Production dsh does not install these optional providers. Install the
201
- # matching Bundle in this Profile and restart the Host, then copy this
202
- # preset and remove `disabled` from the matching tool row. Host availability
203
- # alone grants no tool.
204
- - id: tool-subagent-codex
205
- name: '@deepseek-ai/dsh-tool-subagent'
206
- disabled: true
207
- config:
208
- provider: codex
209
- toolName: subagent_codex
210
- backgroundMode: one-shot
211
- maxDepth: provider-managed
212
-
213
- - id: tool-subagent-claude-code
214
- name: '@deepseek-ai/dsh-tool-subagent'
215
- disabled: true
216
- config:
217
- provider: claude-code
218
- toolName: subagent_claude_code
219
- backgroundMode: one-shot
220
- maxDepth: provider-managed
221
-
222
- - id: workflow-worker-thread
223
- name: '@deepseek-ai/dsh-workflow-worker-thread'
224
- config:
225
- provider: spawn
226
-
227
- - id: tool-workflow
228
- name: '@deepseek-ai/dsh-tool-workflow'
229
-
230
- - id: tool-ralph
231
- name: '@deepseek-ai/dsh-tool-ralph'
232
- config:
233
- subagentProvider: spawn
234
- maxRounds: 64
235
-
236
- # ── remaining model-facing rows ─────────────────────────────────────────────
237
-
238
- - id: tool-ask-user
239
- name: '@deepseek-ai/dsh-tool-ask-user'
240
-
241
- - id: tool-todo
242
- name: '@deepseek-ai/dsh-tool-todo'
243
- config:
244
- allowParallelInProgress: true
245
-
246
- # The `web` service and its search provider stay in the host composition; only
247
- # the model-facing tool is per-session.
248
- - id: tool-web
249
- name: '@deepseek-ai/dsh-tool-web'
250
- config:
251
- fetch: true
252
- searchTimeoutMs: 60000
253
-
254
- # Odai contributes scoped prompt, guard, routing, user-owned responsibility
255
- # mappings, and evidence listeners. Base controller selection stays host-owned.
256
- - id: odai-governance
257
- name: ./odai-governance.mjs
258
- config:
259
- routing:
260
- mode: auto
261
- provider: spawn
@@ -1,3 +0,0 @@
1
- name: odai 治理模式
2
- order: 40
3
- description: 独立维护的治理模式,以 odai 为总控,按任务需要提供治理与协作。