dsh-gitbash-shell 0.4.0
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 -0
- package/README.md +133 -0
- package/README_EN.md +58 -0
- package/assets/code-gitbash/agent.cordis.yml +264 -0
- package/assets/code-gitbash/preset.yml +3 -0
- package/assets/cordis-gitbash/agent.cordis.yml +264 -0
- package/assets/cordis-gitbash/preset.yml +3 -0
- package/assets/minimal-gitbash/agent.cordis.yml +89 -0
- package/assets/minimal-gitbash/preset.yml +3 -0
- package/assets/standard-gitbash/agent.cordis.yml +253 -0
- package/assets/standard-gitbash/preset.yml +3 -0
- package/cordis.patch.yml +39 -0
- package/dsh.plugin.json +13 -0
- package/package.json +54 -0
- package/src/index.js +367 -0
- package/src/shell.js +96 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# The `cordis` agent preset: the standard coding agent, plus the ability to
|
|
2
|
+
# read and write the runtime it is running in.
|
|
3
|
+
#
|
|
4
|
+
# It exists so a person can ask an agent to author another agent. Everything in
|
|
5
|
+
# `standard` is here unchanged; what is added is the self-referential Cordis
|
|
6
|
+
# toolset, a skill that teaches composition authoring, and a persona that says
|
|
7
|
+
# which of the two planes an edit belongs to.
|
|
8
|
+
#
|
|
9
|
+
# TRUST: `cordis_mount` evaluates model-written JavaScript against the live
|
|
10
|
+
# runtime, and a composition this agent writes becomes a preset other sessions
|
|
11
|
+
# mount. Treat a session on this preset as shell access — the toolset's own
|
|
12
|
+
# documentation makes the same statement.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
# The preset's own persona, shadowing the deployment default for this agent.
|
|
16
|
+
# `{{model}}` and `{{cwd}}` resolve from the agent's own route and workspace.
|
|
17
|
+
- id: persona
|
|
18
|
+
name: '@deepseek-ai/dsh-persona'
|
|
19
|
+
config:
|
|
20
|
+
text: |-
|
|
21
|
+
You are a coding agent powered by the {{model}} model, running on the DeepSeek Harness. Your working directory is {{cwd}}.
|
|
22
|
+
|
|
23
|
+
You can read and modify the harness you run on. Its composition is Cordis: every capability is a plugin row in a `cordis.yml`, and an agent preset is one such file mounted for a single session.
|
|
24
|
+
|
|
25
|
+
Two planes decide where an edit belongs. The HOST composition holds the registries and anything shared across sessions — persistence, the sandbox and approval stack, the model route, the subagent registry and its backends. An AGENT PRESET holds what one session contributes to those registries: its tools, its persona, its prompt sections. A row that publishes a service belongs in the host composition, or inside an `isolate` realm if the preset genuinely owns that service and nothing outside one agent reads it.
|
|
26
|
+
|
|
27
|
+
Presets you author live one directory per preset under `${DSH_HOME:-$HOME/.dsh}/.agent-presets/<id>/`; the roster reports each preset's real path, so take the one you edit from there. NEVER edit or delete the shipped preset install (the `agent-presets` directory beside the deployment's own config): it belongs to the deployment, an upgrade overwrites it, and corrupting the `cordis` preset would disable this very mode. To change what a shipped preset does, copy its composition into a new preset directory and edit the copy.
|
|
28
|
+
|
|
29
|
+
Load the `editing-cordis-compositions` skill before writing or changing a composition.
|
|
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; the host executor is the Git Bash provider (`dsh-gitbash-shell`)
|
|
44
|
+
# host-plane too.
|
|
45
|
+
- id: tool-bash
|
|
46
|
+
name: '@deepseek-ai/dsh-tool-bash'
|
|
47
|
+
# Git Bash on Windows: the host executor is dsh-gitbash-shell (see $DSH_HOME/cordis.patch.yml).
|
|
48
|
+
disabled: false
|
|
49
|
+
|
|
50
|
+
- id: tool-pwsh
|
|
51
|
+
name: '@deepseek-ai/dsh-tool-pwsh'
|
|
52
|
+
disabled: true
|
|
53
|
+
|
|
54
|
+
# ── filesystem ──────────────────────────────────────────────────────────────
|
|
55
|
+
|
|
56
|
+
# Both register into the host `tools` registry and provide nothing, so
|
|
57
|
+
# they need no realm. The `fs` service and its policy stay in the host.
|
|
58
|
+
- id: tool-fs
|
|
59
|
+
name: '@deepseek-ai/dsh-tool-fs'
|
|
60
|
+
|
|
61
|
+
- id: tool-fs-search
|
|
62
|
+
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
63
|
+
config:
|
|
64
|
+
sampleOverCapGlobResults: false
|
|
65
|
+
|
|
66
|
+
# ── background jobs ────────────────────────────────────────────────────────
|
|
67
|
+
|
|
68
|
+
# Only the model-facing controls. The task REGISTRY stays on the host plane:
|
|
69
|
+
# its producers sit outside any realm this file could put it in — `tool-bash`
|
|
70
|
+
# above resolves it with `ctx.get`, and an entry-local realm here is invisible
|
|
71
|
+
# to every sibling row, so `run_in_background` would answer "background jobs
|
|
72
|
+
# unavailable" while these controls sat in the catalog. The registry is keyed by
|
|
73
|
+
# owning agent anyway, so one host instance serves every session. What a preset
|
|
74
|
+
# chooses is whether its agent can collect and stop background work at all.
|
|
75
|
+
- id: tool-jobs
|
|
76
|
+
name: '@deepseek-ai/dsh-tool-jobs'
|
|
77
|
+
|
|
78
|
+
# ── goals ───────────────────────────────────────────────────────────────────
|
|
79
|
+
|
|
80
|
+
# Only the model-facing tool. The goal SERVICE, its session driver, and the
|
|
81
|
+
# `/goal` command stay on the host plane: the Gateway serves the goal domain as
|
|
82
|
+
# Remote endpoints whose receiver comes from a generated descriptor, so it
|
|
83
|
+
# resolves `goals` on the host and an entry-local realm here would hide it. The
|
|
84
|
+
# registry is keyed by session anyway, so one host instance serves every
|
|
85
|
+
# session. What a preset chooses is whether its agent can call the goal tool.
|
|
86
|
+
- id: tool-goal
|
|
87
|
+
name: '@deepseek-ai/dsh-tool-goal'
|
|
88
|
+
|
|
89
|
+
# ── plan mode ───────────────────────────────────────────────────────────────
|
|
90
|
+
|
|
91
|
+
# Plan state is per-agent by nature, so an entry-local realm is not a
|
|
92
|
+
# workaround here — it is the correct lifetime.
|
|
93
|
+
- id: planning
|
|
94
|
+
name: cordis:group
|
|
95
|
+
group: true
|
|
96
|
+
isolate:
|
|
97
|
+
planMode: true
|
|
98
|
+
config:
|
|
99
|
+
- id: plan-mode
|
|
100
|
+
name: '@deepseek-ai/dsh-plan-mode'
|
|
101
|
+
config:
|
|
102
|
+
section: |
|
|
103
|
+
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.
|
|
104
|
+
|
|
105
|
+
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.
|
|
106
|
+
|
|
107
|
+
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.
|
|
108
|
+
|
|
109
|
+
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.
|
|
110
|
+
|
|
111
|
+
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.
|
|
112
|
+
|
|
113
|
+
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.
|
|
114
|
+
|
|
115
|
+
# ── compaction ──────────────────────────────────────────────────────────────
|
|
116
|
+
|
|
117
|
+
# `compaction-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
|
|
118
|
+
# share this realm rather than sit outside it.
|
|
119
|
+
#
|
|
120
|
+
# `tokenMeter` is deliberately NOT in this realm: the meter stays on the HOST
|
|
121
|
+
# plane, and the rows here resolve that one instance. It takes no configuration,
|
|
122
|
+
# keys every fold by Session, and owns the context-meter projection units the
|
|
123
|
+
# browser reads for every session — behind a realm those units would come and go
|
|
124
|
+
# with whichever presets happen to be mounted. What a preset chooses is whether
|
|
125
|
+
# its agent compacts at all, which is `compaction-basic` below.
|
|
126
|
+
- id: compaction
|
|
127
|
+
name: cordis:group
|
|
128
|
+
group: true
|
|
129
|
+
isolate:
|
|
130
|
+
compaction: true
|
|
131
|
+
toolResultPruner: true
|
|
132
|
+
config:
|
|
133
|
+
- id: compaction-basic
|
|
134
|
+
name: '@deepseek-ai/dsh-compaction-basic'
|
|
135
|
+
|
|
136
|
+
- id: command-compact
|
|
137
|
+
name: '@deepseek-ai/dsh-command-compact'
|
|
138
|
+
|
|
139
|
+
- id: tool-result-pruner
|
|
140
|
+
name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
|
|
141
|
+
config:
|
|
142
|
+
thresholdChars: 8192
|
|
143
|
+
headChars: 4096
|
|
144
|
+
tailChars: 1024
|
|
145
|
+
|
|
146
|
+
# ── delegation and workflows ────────────────────────────────────────────────
|
|
147
|
+
|
|
148
|
+
# The `subagents` registry and its spawn/fork backends live in the HOST
|
|
149
|
+
# composition: the registry is a process singleton whose cross-session queries
|
|
150
|
+
# the api-proxy serves to the browser, and a provider name may only be
|
|
151
|
+
# registered once. This preset contributes the delegation TOOLS, which resolve
|
|
152
|
+
# that host registry.
|
|
153
|
+
#
|
|
154
|
+
# `workflows` is different — nothing outside an agent reads it — so every row
|
|
155
|
+
# that reaches it shares one entry-local realm here, and a consumer left
|
|
156
|
+
# outside would resolve a host registry this preset does not populate.
|
|
157
|
+
#
|
|
158
|
+
# `tool-subagent-report` is host-plane for the same reason as the registry,
|
|
159
|
+
# not because a preset may not want it: it registers a CONTINUABLE SETUP on
|
|
160
|
+
# that singleton rather than a tool this agent calls, and the setup list is
|
|
161
|
+
# not scope-aware — one copy per mounted preset means every child gets
|
|
162
|
+
# `report` registered once per live session, which throws on the second.
|
|
163
|
+
- id: delegation
|
|
164
|
+
name: cordis:group
|
|
165
|
+
group: true
|
|
166
|
+
isolate:
|
|
167
|
+
workflowEngine: true
|
|
168
|
+
config:
|
|
169
|
+
- id: tool-subagent-control
|
|
170
|
+
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
171
|
+
|
|
172
|
+
- id: tool-subagent-list-agents
|
|
173
|
+
name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
|
|
174
|
+
|
|
175
|
+
- id: tool-subagent
|
|
176
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
177
|
+
config:
|
|
178
|
+
provider: spawn
|
|
179
|
+
toolName: subagent
|
|
180
|
+
backgroundMode: continuable
|
|
181
|
+
|
|
182
|
+
- id: tool-subagent-fork
|
|
183
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
184
|
+
config:
|
|
185
|
+
provider: fork
|
|
186
|
+
toolName: subagent_fork
|
|
187
|
+
backgroundMode: continuable
|
|
188
|
+
|
|
189
|
+
# Production dsh does not install these optional providers. Install the
|
|
190
|
+
# matching Bundle in this Profile and restart the Host, then copy this
|
|
191
|
+
# preset and remove `disabled` from the matching tool row. Host availability
|
|
192
|
+
# alone grants no tool.
|
|
193
|
+
- id: tool-subagent-codex
|
|
194
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
195
|
+
disabled: true
|
|
196
|
+
config:
|
|
197
|
+
provider: codex
|
|
198
|
+
toolName: subagent_codex
|
|
199
|
+
backgroundMode: one-shot
|
|
200
|
+
maxDepth: provider-managed
|
|
201
|
+
|
|
202
|
+
- id: tool-subagent-claude-code
|
|
203
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
204
|
+
disabled: true
|
|
205
|
+
config:
|
|
206
|
+
provider: claude-code
|
|
207
|
+
toolName: subagent_claude_code
|
|
208
|
+
backgroundMode: one-shot
|
|
209
|
+
maxDepth: provider-managed
|
|
210
|
+
|
|
211
|
+
- id: workflow-worker-thread
|
|
212
|
+
name: '@deepseek-ai/dsh-workflow-worker-thread'
|
|
213
|
+
config:
|
|
214
|
+
provider: spawn
|
|
215
|
+
|
|
216
|
+
- id: tool-workflow
|
|
217
|
+
name: '@deepseek-ai/dsh-tool-workflow'
|
|
218
|
+
|
|
219
|
+
- id: tool-ralph
|
|
220
|
+
name: '@deepseek-ai/dsh-tool-ralph'
|
|
221
|
+
config:
|
|
222
|
+
subagentProvider: spawn
|
|
223
|
+
maxRounds: 64
|
|
224
|
+
|
|
225
|
+
# ── remaining model-facing rows ─────────────────────────────────────────────
|
|
226
|
+
|
|
227
|
+
- id: tool-ask-user
|
|
228
|
+
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
229
|
+
|
|
230
|
+
- id: tool-todo
|
|
231
|
+
name: '@deepseek-ai/dsh-tool-todo'
|
|
232
|
+
config:
|
|
233
|
+
allowParallelInProgress: true
|
|
234
|
+
|
|
235
|
+
# The `web` service and its search provider stay in the host composition; only
|
|
236
|
+
# the model-facing tool is per-session.
|
|
237
|
+
- id: tool-web
|
|
238
|
+
name: '@deepseek-ai/dsh-tool-web'
|
|
239
|
+
config:
|
|
240
|
+
fetch: false
|
|
241
|
+
searchTimeoutMs: 60000
|
|
242
|
+
|
|
243
|
+
# ── self-modification ───────────────────────────────────────────────────────
|
|
244
|
+
|
|
245
|
+
# Read the live runtime, mount a temporary plugin, unmount it. The toolset is a
|
|
246
|
+
# trust boundary, not a sandbox — see this file's header.
|
|
247
|
+
- id: tool-cordis
|
|
248
|
+
name: '@deepseek-ai/dsh-tool-cordis'
|
|
249
|
+
|
|
250
|
+
# The composition-authoring skill travels with this preset rather than living
|
|
251
|
+
# in the user's skill root: it documents THIS deployment's two planes, and a
|
|
252
|
+
# preset is the unit that gets copied and edited. `baseUrl` is the preset's
|
|
253
|
+
# own directory, so the root resolves wherever the preset is installed.
|
|
254
|
+
# Both rows register into THIS preset's layer of the host skill registry, so
|
|
255
|
+
# they need no realm; the agent's merged catalog also carries whatever the
|
|
256
|
+
# deployment registered globally (repository plugins).
|
|
257
|
+
- id: skill-filesystem
|
|
258
|
+
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
259
|
+
config:
|
|
260
|
+
customSkillDirs:
|
|
261
|
+
- !!js "process.getBuiltinModule('node:url').fileURLToPath(new URL('skills/', baseUrl))"
|
|
262
|
+
|
|
263
|
+
- id: tool-skill
|
|
264
|
+
name: '@deepseek-ai/dsh-tool-skill'
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# The `minimal` agent preset: a fixed-prompt, two-tool coding-agent composition.
|
|
2
|
+
#
|
|
3
|
+
# The persona is the complete system prompt, so global identity, Web orientation,
|
|
4
|
+
# tool guidance, and later assembly listeners cannot add prompt text. Runtime
|
|
5
|
+
# context snapshots are suppressed for this preset, and the model composes only
|
|
6
|
+
# the persistent shell (Git for Windows bash; bash on POSIX) and
|
|
7
|
+
# `str_replace_editor`. Context compaction is absent.
|
|
8
|
+
|
|
9
|
+
- id: persona
|
|
10
|
+
name: '@deepseek-ai/dsh-persona'
|
|
11
|
+
config:
|
|
12
|
+
text: You are a helpful software engineer assistant.
|
|
13
|
+
complete: true
|
|
14
|
+
includeRuntimeContext: false
|
|
15
|
+
|
|
16
|
+
# The PTY registry is an agent-owned service, so it lives in an entry-local
|
|
17
|
+
# realm. The backend still consumes the host sandbox policy and subprocess
|
|
18
|
+
# implementation, while the tool registers into this agent's scoped catalog.
|
|
19
|
+
# Exactly one shell stack mounts per host: the bash stack gates off win32 and
|
|
20
|
+
# its pwsh twin gates off POSIX, mirroring the one-shot shell rows.
|
|
21
|
+
- id: persistent-shell
|
|
22
|
+
name: cordis:group
|
|
23
|
+
group: true
|
|
24
|
+
isolate:
|
|
25
|
+
terminals: true
|
|
26
|
+
config:
|
|
27
|
+
- id: pty
|
|
28
|
+
name: '@deepseek-ai/dsh-terminal'
|
|
29
|
+
|
|
30
|
+
- id: terminal-bash
|
|
31
|
+
name: '@deepseek-ai/dsh-terminal-bash'
|
|
32
|
+
disabled: false
|
|
33
|
+
config:
|
|
34
|
+
timeoutMs: 300000
|
|
35
|
+
shellPath: !!js "process.platform === 'win32' ? 'C:/Program Files/Git/bin/bash.exe' : '/bin/bash'"
|
|
36
|
+
|
|
37
|
+
- id: persistent-bash
|
|
38
|
+
name: '@deepseek-ai/dsh-tool-bash-persistent'
|
|
39
|
+
disabled: false
|
|
40
|
+
config:
|
|
41
|
+
timeoutMs: 300000
|
|
42
|
+
description: |-
|
|
43
|
+
Run commands in a bash shell (Git for Windows bash on Windows: native paths like C:/... work, and PATH plus the rest of the environment are inherited from the host)
|
|
44
|
+
* When invoking this tool, the contents of the "command" parameter does NOT need to be XML-escaped.
|
|
45
|
+
* You don't have access to the internet via this tool.
|
|
46
|
+
* You do have access to a mirror of common linux and python packages via apt and pip.
|
|
47
|
+
* State is persistent across command calls and discussions with the user.
|
|
48
|
+
* To inspect a particular line range of a file, e.g. lines 10-25, try 'sed -n 10,25p /path/to/the/file'.
|
|
49
|
+
* Please avoid commands that may produce a very large amount of output.
|
|
50
|
+
* Please run long lived commands in the background, e.g. 'sleep 10 &' or start a server in the background.
|
|
51
|
+
|
|
52
|
+
- id: terminal-pwsh
|
|
53
|
+
name: '@deepseek-ai/dsh-terminal-bash'
|
|
54
|
+
disabled: true
|
|
55
|
+
config:
|
|
56
|
+
shellDialect: pwsh
|
|
57
|
+
timeoutMs: 300000
|
|
58
|
+
|
|
59
|
+
- id: persistent-pwsh
|
|
60
|
+
name: '@deepseek-ai/dsh-tool-pwsh-persistent'
|
|
61
|
+
disabled: true
|
|
62
|
+
config:
|
|
63
|
+
timeoutMs: 300000
|
|
64
|
+
description: |-
|
|
65
|
+
Run commands in a PowerShell shell
|
|
66
|
+
* When invoking this tool, the contents of the "command" parameter does NOT need to be XML-escaped.
|
|
67
|
+
* You don't have access to the internet via this tool.
|
|
68
|
+
* State is persistent across command calls and discussions with the user.
|
|
69
|
+
* Use native Windows paths (C:\...) and $env:NAME variables; this is PowerShell, not bash.
|
|
70
|
+
* Please avoid commands that may produce a very large amount of output.
|
|
71
|
+
* Please run long lived commands in the background, e.g. 'Start-Job' or start a server with Start-Process.
|
|
72
|
+
|
|
73
|
+
# The bare local filesystem shadows the host's sandboxed provider only for this
|
|
74
|
+
# preset. The editor shares that realm and requires absolute paths.
|
|
75
|
+
- id: filesystem
|
|
76
|
+
name: cordis:group
|
|
77
|
+
group: true
|
|
78
|
+
isolate:
|
|
79
|
+
fs: true
|
|
80
|
+
config:
|
|
81
|
+
- id: fs-local
|
|
82
|
+
name: '@deepseek-ai/dsh-fs-local'
|
|
83
|
+
config:
|
|
84
|
+
cwd: !!js process.env.DSH_CWD ?? process.cwd()
|
|
85
|
+
|
|
86
|
+
- id: str-replace-editor
|
|
87
|
+
name: '@deepseek-ai/dsh-tool-str-replace-editor'
|
|
88
|
+
config:
|
|
89
|
+
maxOutputChars: 16000
|
|
@@ -0,0 +1,253 @@
|
|
|
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 persona, shadowing the deployment default for this agent.
|
|
23
|
+
# `{{model}}` and `{{cwd}}` resolve from the agent's own route and workspace.
|
|
24
|
+
- id: persona
|
|
25
|
+
name: '@deepseek-ai/dsh-persona'
|
|
26
|
+
config:
|
|
27
|
+
text: >-
|
|
28
|
+
You are a coding agent powered by the {{model}} model. 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; the host executor is the Git Bash provider (`dsh-gitbash-shell`)
|
|
43
|
+
# host-plane too.
|
|
44
|
+
- id: tool-bash
|
|
45
|
+
name: '@deepseek-ai/dsh-tool-bash'
|
|
46
|
+
# Git Bash on Windows: the host executor is dsh-gitbash-shell (see $DSH_HOME/cordis.patch.yml).
|
|
47
|
+
disabled: false
|
|
48
|
+
|
|
49
|
+
- id: tool-pwsh
|
|
50
|
+
name: '@deepseek-ai/dsh-tool-pwsh'
|
|
51
|
+
disabled: true
|
|
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
|
+
# Only the model-facing tool. The goal SERVICE, its session driver, and the
|
|
93
|
+
# `/goal` command stay on the host plane: the Gateway serves the goal domain as
|
|
94
|
+
# Remote endpoints whose receiver comes from a generated descriptor, so it
|
|
95
|
+
# resolves `goals` on the host and an entry-local realm here would hide it. The
|
|
96
|
+
# registry is keyed by session anyway, so one host instance serves every
|
|
97
|
+
# session. What a preset chooses is whether its agent can call the goal tool.
|
|
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
|
+
#
|
|
170
|
+
# `tool-subagent-report` is host-plane for the same reason as the registry,
|
|
171
|
+
# not because a preset may not want it: it registers a CONTINUABLE SETUP on
|
|
172
|
+
# that singleton rather than a tool this agent calls, and the setup list is
|
|
173
|
+
# not scope-aware — one copy per mounted preset means every child gets
|
|
174
|
+
# `report` registered once per live session, which throws on the second.
|
|
175
|
+
- id: delegation
|
|
176
|
+
name: cordis:group
|
|
177
|
+
group: true
|
|
178
|
+
isolate:
|
|
179
|
+
workflowEngine: true
|
|
180
|
+
config:
|
|
181
|
+
- id: tool-subagent-control
|
|
182
|
+
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
183
|
+
|
|
184
|
+
- id: tool-subagent-list-agents
|
|
185
|
+
name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
|
|
186
|
+
|
|
187
|
+
- id: tool-subagent
|
|
188
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
189
|
+
config:
|
|
190
|
+
provider: spawn
|
|
191
|
+
toolName: subagent
|
|
192
|
+
backgroundMode: continuable
|
|
193
|
+
|
|
194
|
+
- id: tool-subagent-fork
|
|
195
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
196
|
+
config:
|
|
197
|
+
provider: fork
|
|
198
|
+
toolName: subagent_fork
|
|
199
|
+
backgroundMode: continuable
|
|
200
|
+
|
|
201
|
+
# Production dsh does not install these optional providers. Install the
|
|
202
|
+
# matching Bundle in this Profile and restart the Host, then copy this
|
|
203
|
+
# preset and remove `disabled` from the matching tool row. Host availability
|
|
204
|
+
# alone grants no tool.
|
|
205
|
+
- id: tool-subagent-codex
|
|
206
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
207
|
+
disabled: true
|
|
208
|
+
config:
|
|
209
|
+
provider: codex
|
|
210
|
+
toolName: subagent_codex
|
|
211
|
+
backgroundMode: one-shot
|
|
212
|
+
maxDepth: provider-managed
|
|
213
|
+
|
|
214
|
+
- id: tool-subagent-claude-code
|
|
215
|
+
name: '@deepseek-ai/dsh-tool-subagent'
|
|
216
|
+
disabled: true
|
|
217
|
+
config:
|
|
218
|
+
provider: claude-code
|
|
219
|
+
toolName: subagent_claude_code
|
|
220
|
+
backgroundMode: one-shot
|
|
221
|
+
maxDepth: provider-managed
|
|
222
|
+
|
|
223
|
+
- id: workflow-worker-thread
|
|
224
|
+
name: '@deepseek-ai/dsh-workflow-worker-thread'
|
|
225
|
+
config:
|
|
226
|
+
provider: spawn
|
|
227
|
+
|
|
228
|
+
- id: tool-workflow
|
|
229
|
+
name: '@deepseek-ai/dsh-tool-workflow'
|
|
230
|
+
|
|
231
|
+
- id: tool-ralph
|
|
232
|
+
name: '@deepseek-ai/dsh-tool-ralph'
|
|
233
|
+
config:
|
|
234
|
+
subagentProvider: spawn
|
|
235
|
+
maxRounds: 64
|
|
236
|
+
|
|
237
|
+
# ── remaining model-facing rows ─────────────────────────────────────────────
|
|
238
|
+
|
|
239
|
+
- id: tool-ask-user
|
|
240
|
+
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
241
|
+
|
|
242
|
+
- id: tool-todo
|
|
243
|
+
name: '@deepseek-ai/dsh-tool-todo'
|
|
244
|
+
config:
|
|
245
|
+
allowParallelInProgress: true
|
|
246
|
+
|
|
247
|
+
# The `web` service and its search provider stay in the host composition; only
|
|
248
|
+
# the model-facing tool is per-session.
|
|
249
|
+
- id: tool-web
|
|
250
|
+
name: '@deepseek-ai/dsh-tool-web'
|
|
251
|
+
config:
|
|
252
|
+
fetch: false
|
|
253
|
+
searchTimeoutMs: 60000
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# dsh-gitbash-shell bundle patch
|
|
2
|
+
#
|
|
3
|
+
# Installed through the official CLI —
|
|
4
|
+
#
|
|
5
|
+
# dsh plugin --profile <name> add github:KannaKuron/dsh-gitbash-shell
|
|
6
|
+
#
|
|
7
|
+
# — the command reconciles `dsh.profile.bundles` against installed packages
|
|
8
|
+
# and, seeing this declaration, appends dsh-gitbash-shell to the bundle
|
|
9
|
+
# stack. The profile boot then merges this patch:
|
|
10
|
+
#
|
|
11
|
+
# 1. withdraw the PowerShell executor (the framework composes exactly one
|
|
12
|
+
# ctx.shell provider per process);
|
|
13
|
+
# 2. insert the Git Bash executor row (a subclass of the shipped
|
|
14
|
+
# @deepseek-ai/dsh-bash-sandbox, so sandbox policy, denial
|
|
15
|
+
# classification, background jobs, and settings behave identically);
|
|
16
|
+
# 3. insert the preset-materialization row, which writes the
|
|
17
|
+
# standard/minimal/code/cordis Git Bash variants into the first
|
|
18
|
+
# user-trust preset root.
|
|
19
|
+
#
|
|
20
|
+
# On non-Windows hosts the executor row is disabled and the bundle is inert
|
|
21
|
+
# apart from the preset materialization (bash is already the native stack).
|
|
22
|
+
#
|
|
23
|
+
# This patch deliberately does NOT flip the base host tool-bash/tool-pwsh
|
|
24
|
+
# rows: the web surface disables them and lets agent presets provide the
|
|
25
|
+
# model-facing shell tools, while base-only surfaces (TUI) flip them in
|
|
26
|
+
# their own patch layer.
|
|
27
|
+
- id: pwsh-sandbox
|
|
28
|
+
disabled: true
|
|
29
|
+
|
|
30
|
+
- insert:
|
|
31
|
+
- id: gitbash-executor
|
|
32
|
+
name: dsh-gitbash-shell/shell
|
|
33
|
+
disabled: !!js process.platform !== 'win32'
|
|
34
|
+
config:
|
|
35
|
+
timeoutMs: 60000
|
|
36
|
+
bashPath: "C:/Program Files/Git/bin/bash.exe"
|
|
37
|
+
|
|
38
|
+
- id: gitbash-presets
|
|
39
|
+
name: dsh-gitbash-shell
|