odai-dsh-agent 0.2.37 → 0.2.39
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/README.md +32 -41
- package/build/bin/odai-dsh-agent.d.mts +11 -0
- package/build/bin/odai-dsh-agent.d.mts.map +1 -1
- package/build/bin/odai-dsh-agent.mjs +48 -108
- package/build/bin/odai-dsh-agent.mjs.map +1 -1
- package/build/src/control-center-installer.d.mts.map +1 -1
- package/build/src/control-center-installer.mjs +81 -4
- package/build/src/control-center-installer.mjs.map +1 -1
- package/build/src/installer.d.mts +55 -17
- package/build/src/installer.d.mts.map +1 -1
- package/build/src/installer.mjs +52 -227
- package/build/src/installer.mjs.map +1 -1
- package/package.json +9 -4
- package/preset/odai/runtime/compaction-config.d.mts.map +1 -1
- package/preset/odai/runtime/compaction-config.mjs +2 -4
- package/preset/odai/runtime/compaction-config.mjs.map +1 -1
- package/preset/odai/runtime/lifecycle-runtime.d.mts.map +1 -1
- package/preset/odai/runtime/lifecycle-runtime.mjs +8 -1
- package/preset/odai/runtime/lifecycle-runtime.mjs.map +1 -1
- package/preset/odai/runtime/routing-context.d.mts +3 -0
- package/preset/odai/runtime/routing-context.d.mts.map +1 -1
- package/preset/odai/runtime/routing-context.mjs +11 -3
- package/preset/odai/runtime/routing-context.mjs.map +1 -1
- package/preset/odai/runtime/runtime-support.d.mts.map +1 -1
- package/preset/odai/runtime/runtime-support.mjs +2 -3
- package/preset/odai/runtime/runtime-support.mjs.map +1 -1
- package/preset/odai/runtime/runtime-types.d.mts +1 -0
- package/preset/odai/runtime/runtime-types.d.mts.map +1 -1
- package/preset/odai/runtime/runtime-types.mjs +4 -0
- package/preset/odai/runtime/runtime-types.mjs.map +1 -1
- package/preset/odai/runtime/semantic-memory.d.mts.map +1 -1
- package/preset/odai/runtime/semantic-memory.mjs +2 -3
- package/preset/odai/runtime/semantic-memory.mjs.map +1 -1
- package/preset/odai/skills/odai/SKILL.md +41 -40
- package/preset/odai/skills/odai/manifest.json +1 -1
- package/preset/odai/skills/odai/references/craft.md +2 -2
- package/preset/odai/skills/odai/references/dao.md +15 -16
- package/preset/odai/skills/odai/references/planning.md +2 -2
- package/preset/odai/skills/odai/references/verification.md +4 -4
- package/preset.cordis.patch.yml +282 -0
- package/build/src/control-center-prompt.d.mts +0 -4
- package/build/src/control-center-prompt.d.mts.map +0 -1
- package/build/src/control-center-prompt.mjs +0 -27
- package/build/src/control-center-prompt.mjs.map +0 -1
- package/preset/odai/agent.cordis.yml +0 -261
- package/preset/odai/preset.yml +0 -3
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
# Odai agent preset for DSH 0.1.7: one `@deepseek-ai/dsh-agent-preset`
|
|
2
|
+
# declaration inserted by this bundle. The preset id stays `odai`, so sessions
|
|
3
|
+
# saved with it keep resolving after upgrade. Standard is a reference, not a
|
|
4
|
+
# composition this preset must mirror.
|
|
5
|
+
- insert:
|
|
6
|
+
- id: preset-odai
|
|
7
|
+
name: '@deepseek-ai/dsh-agent-preset'
|
|
8
|
+
config:
|
|
9
|
+
id: odai
|
|
10
|
+
name: odai 治理模式
|
|
11
|
+
description: 独立维护的治理模式,以 odai 为总控,按任务需要提供治理与协作。
|
|
12
|
+
order: 40
|
|
13
|
+
plugins:
|
|
14
|
+
#
|
|
15
|
+
# This file is an AGENT-PLANE composition. The roster mounts it ONCE under a
|
|
16
|
+
# standing scope; every session naming it joins by scope parentage, so the
|
|
17
|
+
# tools and prompt sections registered here cover each joined agent while a
|
|
18
|
+
# session's own state stays keyed per Session/Agent inside the plugins. The
|
|
19
|
+
# host composition (`base.cordis.yml` + `web.cordis.yml`) keeps everything a
|
|
20
|
+
# preset must not own: the registries themselves, the sandbox and approval
|
|
21
|
+
# stack, persistence, and the model route.
|
|
22
|
+
#
|
|
23
|
+
# A service row here MUST sit inside a group carrying an `isolate` realm.
|
|
24
|
+
# Without one it publishes into the root realm, where it is process-global —
|
|
25
|
+
# another preset publishing the same name collides, and a host reader would
|
|
26
|
+
# resolve one preset's instance for every session; `dsh-agent-presets` rejects
|
|
27
|
+
# that at mount. `true` means an entry-local realm: this standing mount's own
|
|
28
|
+
# private instance, apart from every other preset's. (A shared label does NOT
|
|
29
|
+
# pool instances — `provide()` throws on the second registration under the
|
|
30
|
+
# same realm symbol; labels join REALMS, and are not what this file needs.)
|
|
31
|
+
|
|
32
|
+
# ── identity ────────────────────────────────────────────────────────────────
|
|
33
|
+
|
|
34
|
+
# The preset's own model-neutral persona shadows the deployment default. Auto
|
|
35
|
+
# routing can upgrade after prompt assembly; `{{cwd}}` remains workspace-local.
|
|
36
|
+
- id: persona
|
|
37
|
+
name: '@deepseek-ai/dsh-persona'
|
|
38
|
+
config:
|
|
39
|
+
prefix: You are Odai, a coding agent.
|
|
40
|
+
suffix: Your working directory is {{cwd}}.
|
|
41
|
+
|
|
42
|
+
- id: agent-instructions
|
|
43
|
+
name: '@deepseek-ai/dsh-agent-instructions'
|
|
44
|
+
config:
|
|
45
|
+
maxBytes: 65536
|
|
46
|
+
|
|
47
|
+
# ── shell ───────────────────────────────────────────────────────────────────
|
|
48
|
+
|
|
49
|
+
# `shell-env` stays in the HOST composition: `apps/cli/src/web.ts` injects it to
|
|
50
|
+
# publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
|
|
51
|
+
# the criterion for host-plane ownership — injection resolves before any session
|
|
52
|
+
# exists, so there is no agent to key by. Behind a preset realm those variables
|
|
53
|
+
# never reached the model's shell at all. Both shell tools consume the host
|
|
54
|
+
# registry from here; their executors (`bash-sandbox`/`pwsh-sandbox`) are
|
|
55
|
+
# host-plane too.
|
|
56
|
+
- id: tool-bash
|
|
57
|
+
name: '@deepseek-ai/dsh-tool-bash'
|
|
58
|
+
disabled: !!js process.platform === 'win32'
|
|
59
|
+
|
|
60
|
+
- id: tool-pwsh
|
|
61
|
+
name: '@deepseek-ai/dsh-tool-pwsh'
|
|
62
|
+
disabled: !!js process.platform !== 'win32'
|
|
63
|
+
|
|
64
|
+
# ── filesystem ──────────────────────────────────────────────────────────────
|
|
65
|
+
|
|
66
|
+
# Both register into the host `tools` registry and provide nothing, so
|
|
67
|
+
# they need no realm. The `fs` service and its policy stay in the host.
|
|
68
|
+
- id: tool-fs
|
|
69
|
+
name: '@deepseek-ai/dsh-tool-fs'
|
|
70
|
+
|
|
71
|
+
- id: tool-fs-search
|
|
72
|
+
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
73
|
+
config:
|
|
74
|
+
sampleOverCapGlobResults: false
|
|
75
|
+
|
|
76
|
+
# ── background jobs ────────────────────────────────────────────────────────
|
|
77
|
+
|
|
78
|
+
# Only the model-facing controls. The task REGISTRY stays on the host plane:
|
|
79
|
+
# its producers sit outside any realm this file could put it in — `tool-bash`
|
|
80
|
+
# above resolves it with `ctx.get`, and an entry-local realm here is invisible
|
|
81
|
+
# to every sibling row, so `run_in_background` would answer "background jobs
|
|
82
|
+
# unavailable" while these controls sat in the catalog. The registry is keyed by
|
|
83
|
+
# owning agent anyway, so one host instance serves every session. What a preset
|
|
84
|
+
# chooses is whether its agent can collect and stop background work at all.
|
|
85
|
+
- id: tool-jobs
|
|
86
|
+
name: '@deepseek-ai/dsh-tool-jobs'
|
|
87
|
+
|
|
88
|
+
# ── skills ──────────────────────────────────────────────────────────────────
|
|
89
|
+
|
|
90
|
+
# The skill REGISTRY lives in the host composition and is layered per scope:
|
|
91
|
+
# these rows register into THIS preset's layer of it, so they need no realm.
|
|
92
|
+
# `skill-filesystem` contributes local-root discovery for agents on this preset, and
|
|
93
|
+
# `tool-skill` gives them the catalog and loader; the merged catalog also
|
|
94
|
+
# carries whatever the deployment registered globally (repository plugins).
|
|
95
|
+
- id: skill-filesystem
|
|
96
|
+
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
97
|
+
|
|
98
|
+
- id: tool-skill
|
|
99
|
+
name: '@deepseek-ai/dsh-tool-skill'
|
|
100
|
+
|
|
101
|
+
# ── goals ───────────────────────────────────────────────────────────────────
|
|
102
|
+
|
|
103
|
+
# The goal service and session driver stay on the host plane, where the Gateway
|
|
104
|
+
# can resolve them. The human command and model-facing tool register into this
|
|
105
|
+
# preset's scoped layers.
|
|
106
|
+
- id: command-goal
|
|
107
|
+
name: '@deepseek-ai/dsh-command-goal'
|
|
108
|
+
|
|
109
|
+
- id: tool-goal
|
|
110
|
+
name: '@deepseek-ai/dsh-tool-goal'
|
|
111
|
+
|
|
112
|
+
# ── plan mode ───────────────────────────────────────────────────────────────
|
|
113
|
+
|
|
114
|
+
# Plan state is per-agent by nature, so an entry-local realm is not a
|
|
115
|
+
# workaround here — it is the correct lifetime.
|
|
116
|
+
- id: planning
|
|
117
|
+
name: cordis:group
|
|
118
|
+
group: true
|
|
119
|
+
isolate:
|
|
120
|
+
planMode: true
|
|
121
|
+
config:
|
|
122
|
+
- id: plan-mode
|
|
123
|
+
name: '@deepseek-ai/dsh-plan-mode'
|
|
124
|
+
config:
|
|
125
|
+
section: |
|
|
126
|
+
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.
|
|
127
|
+
|
|
128
|
+
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.
|
|
129
|
+
|
|
130
|
+
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.
|
|
131
|
+
|
|
132
|
+
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.
|
|
133
|
+
|
|
134
|
+
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.
|
|
135
|
+
|
|
136
|
+
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.
|
|
137
|
+
|
|
138
|
+
# ── compaction ──────────────────────────────────────────────────────────────
|
|
139
|
+
|
|
140
|
+
# `compaction-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
|
|
141
|
+
# share this realm rather than sit outside it.
|
|
142
|
+
#
|
|
143
|
+
# `tokenMeter` is deliberately NOT in this realm: the meter stays on the HOST
|
|
144
|
+
# plane, and the rows here resolve that one instance. It takes no configuration,
|
|
145
|
+
# keys every fold by Session, and owns the context-meter projection units the
|
|
146
|
+
# browser reads for every session — behind a realm those units would come and go
|
|
147
|
+
# with whichever presets happen to be mounted. What a preset chooses is whether
|
|
148
|
+
# its agent compacts at all, which is `compaction-basic` below.
|
|
149
|
+
- id: compaction
|
|
150
|
+
name: cordis:group
|
|
151
|
+
group: true
|
|
152
|
+
isolate:
|
|
153
|
+
compaction: true
|
|
154
|
+
toolResultPruner: true
|
|
155
|
+
config:
|
|
156
|
+
- id: compaction-basic
|
|
157
|
+
name: '@deepseek-ai/dsh-compaction-basic'
|
|
158
|
+
|
|
159
|
+
- id: command-compact
|
|
160
|
+
name: '@deepseek-ai/dsh-command-compact'
|
|
161
|
+
|
|
162
|
+
- id: tool-result-pruner
|
|
163
|
+
name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
|
|
164
|
+
config:
|
|
165
|
+
thresholdChars: 8192
|
|
166
|
+
headChars: 4096
|
|
167
|
+
tailChars: 1024
|
|
168
|
+
|
|
169
|
+
# ── delegation and workflows ────────────────────────────────────────────────
|
|
170
|
+
|
|
171
|
+
# The `subagents` registry and its spawn/fork backends live in the HOST
|
|
172
|
+
# composition: the registry is a process singleton whose cross-session queries
|
|
173
|
+
# the api-proxy serves to the browser, and a provider name may only be
|
|
174
|
+
# registered once. This preset contributes the delegation TOOLS, which resolve
|
|
175
|
+
# that host registry.
|
|
176
|
+
#
|
|
177
|
+
# `workflows` is different — nothing outside an agent reads it — so every row
|
|
178
|
+
# that reaches it shares one entry-local realm here, and a consumer left
|
|
179
|
+
# outside would resolve a host registry this preset does not populate.
|
|
180
|
+
- id: delegation
|
|
181
|
+
name: cordis:group
|
|
182
|
+
group: true
|
|
183
|
+
isolate:
|
|
184
|
+
workflowEngine: true
|
|
185
|
+
config:
|
|
186
|
+
- id: tool-subagent-control
|
|
187
|
+
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
188
|
+
|
|
189
|
+
- id: tool-subagent-list-agents
|
|
190
|
+
name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
|
|
191
|
+
|
|
192
|
+
- id: tool-subagent
|
|
193
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
194
|
+
config:
|
|
195
|
+
provider: spawn
|
|
196
|
+
toolName: subagent
|
|
197
|
+
modelSelectionSettings: true
|
|
198
|
+
backgroundMode: continuable
|
|
199
|
+
|
|
200
|
+
# Fork omits model selection so provider/model stay equal to the parent and
|
|
201
|
+
# the inherited history remains eligible for KV Cache reuse. This preset
|
|
202
|
+
# keeps fork continuable; parent and child inherit the same messaging tool,
|
|
203
|
+
# while the parent id and return guidance follow the inherited history.
|
|
204
|
+
- id: tool-subagent-fork
|
|
205
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
206
|
+
config:
|
|
207
|
+
provider: fork
|
|
208
|
+
toolName: subagent_fork
|
|
209
|
+
backgroundMode: continuable
|
|
210
|
+
|
|
211
|
+
# Production dsh does not install these optional providers. Install the
|
|
212
|
+
# matching Bundle in this Profile and restart the Host, then copy this
|
|
213
|
+
# preset and remove `disabled` from the matching tool row. Host availability
|
|
214
|
+
# alone grants no tool.
|
|
215
|
+
- id: tool-subagent-codex
|
|
216
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
217
|
+
disabled: true
|
|
218
|
+
config:
|
|
219
|
+
provider: codex
|
|
220
|
+
toolName: subagent_codex
|
|
221
|
+
backgroundMode: one-shot
|
|
222
|
+
maxDepth: provider-managed
|
|
223
|
+
|
|
224
|
+
- id: tool-subagent-claude-code
|
|
225
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
226
|
+
disabled: true
|
|
227
|
+
config:
|
|
228
|
+
provider: claude-code
|
|
229
|
+
toolName: subagent_claude_code
|
|
230
|
+
backgroundMode: one-shot
|
|
231
|
+
maxDepth: provider-managed
|
|
232
|
+
|
|
233
|
+
- id: workflow-ptc
|
|
234
|
+
name: '@deepseek-ai/dsh-workflow-ptc'
|
|
235
|
+
config:
|
|
236
|
+
provider: spawn
|
|
237
|
+
|
|
238
|
+
- id: tool-workflow
|
|
239
|
+
name: '@deepseek-ai/dsh-tool-workflow'
|
|
240
|
+
|
|
241
|
+
# Off by default, as in Standard: ordinary work proceeds directly. DSH's
|
|
242
|
+
# Plugins page cannot edit rows inside a preset; turning this on means
|
|
243
|
+
# overriding the whole plugin list of this preset.
|
|
244
|
+
- id: tool-ralph
|
|
245
|
+
name: '@deepseek-ai/dsh-tool-ralph'
|
|
246
|
+
disabled: true
|
|
247
|
+
config:
|
|
248
|
+
subagentProvider: spawn
|
|
249
|
+
maxRounds: 64
|
|
250
|
+
|
|
251
|
+
# ── remaining model-facing rows ─────────────────────────────────────────────
|
|
252
|
+
|
|
253
|
+
- id: tool-ask-user
|
|
254
|
+
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
255
|
+
|
|
256
|
+
- id: tool-todo
|
|
257
|
+
name: '@deepseek-ai/dsh-tool-todo'
|
|
258
|
+
config:
|
|
259
|
+
allowParallelInProgress: true
|
|
260
|
+
|
|
261
|
+
# The `web` service and its search provider stay in the host composition; only
|
|
262
|
+
# the model-facing tool is per-session.
|
|
263
|
+
- id: tool-web
|
|
264
|
+
name: '@deepseek-ai/dsh-tool-web'
|
|
265
|
+
config:
|
|
266
|
+
fetch: true
|
|
267
|
+
searchTimeoutMs: 60000
|
|
268
|
+
|
|
269
|
+
# Disabled as in Standard. Like every row inside a preset, it is read-only in
|
|
270
|
+
# DSH's Plugins page.
|
|
271
|
+
- id: tool-plugin-manager
|
|
272
|
+
name: '@deepseek-ai/dsh-plugin-manager/tools'
|
|
273
|
+
disabled: true
|
|
274
|
+
|
|
275
|
+
# Odai contributes scoped prompt, guard, routing, user-owned responsibility
|
|
276
|
+
# mappings, and evidence listeners. Base controller selection stays host-owned.
|
|
277
|
+
- id: odai-governance
|
|
278
|
+
name: odai-dsh-agent/governance
|
|
279
|
+
config:
|
|
280
|
+
routing:
|
|
281
|
+
mode: auto
|
|
282
|
+
provider: spawn
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Readable, Writable } from "node:stream";
|
|
2
|
-
export declare function acceptsControlCenterInstall(answer: string): boolean;
|
|
3
|
-
export declare function promptForControlCenterInstall(input?: Readable, output?: Writable, profile?: string, action?: string): Promise<boolean>;
|
|
4
|
-
//# sourceMappingURL=control-center-prompt.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"control-center-prompt.d.mts","sourceRoot":"","sources":["../../src/control-center-prompt.mts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEtD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED,wBAAsB,6BAA6B,CACjD,KAAK,GAAE,QAAwB,EAC/B,MAAM,GAAE,QAAyB,EACjC,OAAO,SAAQ,EACf,MAAM,SAA4C,GACjD,OAAO,CAAC,OAAO,CAAC,CAgBlB"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { once } from "node:events";
|
|
2
|
-
import { createInterface } from "node:readline/promises";
|
|
3
|
-
export function acceptsControlCenterInstall(answer) {
|
|
4
|
-
return /^(?:|y|yes)$/iu.test(answer.trim());
|
|
5
|
-
}
|
|
6
|
-
export async function promptForControlCenterInstall(input = process.stdin, output = process.stdout, profile = "web", action = `把 Odai 控制中心安装到 DSH profile “${profile}”`) {
|
|
7
|
-
if (input.readableEnded)
|
|
8
|
-
return false;
|
|
9
|
-
const readline = createInterface({ input, output });
|
|
10
|
-
const eof = Symbol("control-center-prompt-eof");
|
|
11
|
-
try {
|
|
12
|
-
const answer = await Promise.race([
|
|
13
|
-
readline.question(`${action}?回车或 y/yes 确认,n/no 取消 [Y/n] `),
|
|
14
|
-
once(input, "end").then(() => eof),
|
|
15
|
-
]);
|
|
16
|
-
if (typeof answer !== "string")
|
|
17
|
-
return false;
|
|
18
|
-
return acceptsControlCenterInstall(answer);
|
|
19
|
-
}
|
|
20
|
-
catch {
|
|
21
|
-
return false;
|
|
22
|
-
}
|
|
23
|
-
finally {
|
|
24
|
-
readline.close();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=control-center-prompt.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"control-center-prompt.mjs","sourceRoot":"","sources":["../../src/control-center-prompt.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAGzD,MAAM,UAAU,2BAA2B,CAAC,MAAc;IACxD,OAAO,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,KAAK,GAAa,OAAO,CAAC,KAAK,EAC/B,MAAM,GAAa,OAAO,CAAC,MAAM,EACjC,OAAO,GAAG,KAAK,EACf,MAAM,GAAG,+BAA+B,OAAO,GAAG;IAElD,IAAI,KAAK,CAAC,aAAa;QAAE,OAAO,KAAK,CAAC;IACtC,MAAM,QAAQ,GAAG,eAAe,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IACpD,MAAM,GAAG,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;IAChD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC;YAChC,QAAQ,CAAC,QAAQ,CAAC,GAAG,MAAM,8BAA8B,CAAC;YAC1D,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC;SACnC,CAAC,CAAC;QACH,IAAI,OAAO,MAAM,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QAC7C,OAAO,2BAA2B,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;YAAS,CAAC;QACT,QAAQ,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC;AACH,CAAC"}
|
|
@@ -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
|
package/preset/odai/preset.yml
DELETED