@toddzheng024/dscode-bundle 0.7.27 → 0.7.29

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 (103) hide show
  1. package/README.md +1 -1
  2. package/THIRD_PARTY_NOTICES.md +10 -10
  3. package/bootstrap.mjs +1 -1
  4. package/cordis.patch.yml +433 -46
  5. package/package.json +280 -245
  6. package/plugins/account/index.mjs +178 -0
  7. package/plugins/account/state.mjs +123 -0
  8. package/plugins/auto-review/index.mjs +8 -5
  9. package/plugins/code-review/index.mjs +1 -1
  10. package/plugins/computer-use/index.mjs +37 -0
  11. package/plugins/cordis-config/plain.mjs +31 -0
  12. package/plugins/dscode/index.mjs +1 -1
  13. package/plugins/exec/cli.mjs +1 -1
  14. package/plugins/grok/index.mjs +28 -24
  15. package/plugins/i18n/messages.mjs +204 -0
  16. package/plugins/memory/index.mjs +1 -1
  17. package/plugins/message-source/kind.mjs +20 -0
  18. package/plugins/openrouter/adapter.mjs +29 -13
  19. package/plugins/openrouter/index.mjs +31 -28
  20. package/plugins/session-bridge/communication.mjs +6 -3
  21. package/plugins/session-bridge/server.mjs +3 -2
  22. package/plugins/session-bridge/tasks.mjs +3 -1
  23. package/plugins/session-cards/index.mjs +1 -1
  24. package/plugins/time-marks/index.mjs +3 -2
  25. package/plugins/time-marks/marks.mjs +6 -5
  26. package/plugins/triggers/config.mjs +1 -1
  27. package/plugins/triggers/tools.mjs +1 -1
  28. package/plugins/tui-tools/doctor.mjs +1 -1
  29. package/plugins/tui-tools/index.mjs +16 -4
  30. package/plugins/ultra/policy.mjs +16 -0
  31. package/vendor/bash/index.js +455 -186
  32. package/vendor/bash/types/background.d.ts +38 -7
  33. package/vendor/bash/types/index.d.ts +20 -4
  34. package/vendor/bash/types/render.d.ts +28 -9
  35. package/vendor/command-goal/index.js +3 -1
  36. package/vendor/deepseek/index.js +1378 -1246
  37. package/vendor/deepseek/types/adapter.d.ts +16 -155
  38. package/vendor/deepseek/types/config.d.ts +127 -0
  39. package/vendor/deepseek/types/defaults.d.ts +24 -0
  40. package/vendor/deepseek/types/file-store.d.ts +5 -3
  41. package/vendor/deepseek/types/files-api.d.ts +12 -9
  42. package/vendor/deepseek/types/image-tokens.d.ts +24 -9
  43. package/vendor/deepseek/types/images.d.ts +35 -0
  44. package/vendor/deepseek/types/index.d.ts +10 -94
  45. package/vendor/deepseek/types/messages-api.d.ts +10 -0
  46. package/vendor/deepseek/types/model-info.d.ts +16 -0
  47. package/vendor/deepseek/types/models.d.ts +4 -0
  48. package/vendor/deepseek/types/replay.d.ts +27 -0
  49. package/vendor/deepseek/types/request-extensions.d.ts +16 -0
  50. package/vendor/deepseek/types/request-files.d.ts +49 -0
  51. package/vendor/deepseek/types/request-pricing.d.ts +32 -20
  52. package/vendor/deepseek/types/serialize.d.ts +17 -82
  53. package/vendor/deepseek/types/sse.d.ts +6 -22
  54. package/vendor/deepseek/types/translate.d.ts +13 -36
  55. package/vendor/deepseek/types/transport.d.ts +15 -0
  56. package/vendor/deepseek/types/types.d.ts +106 -167
  57. package/vendor/deepseek/types/wire-types.d.ts +62 -0
  58. package/vendor/persistent/index.js +9 -3
  59. package/vendor/subagent/index.js +11 -8
  60. package/vendor/subagent/model-selection-settings.js +12 -38
  61. package/vendor/subagent/types/index.d.ts +4 -3
  62. package/vendor/subagent/types/model-selection-settings.d.ts +12 -10
  63. package/vendor/subagent-core/index.js +401 -264
  64. package/vendor/subagent-core/typert.host.js +103 -113
  65. package/vendor/subagent-core/typert.remote-client.d.ts +1 -3
  66. package/vendor/subagent-core/typert.remote-client.js +23 -69
  67. package/vendor/subagent-core/types/archive-admission.d.ts +16 -0
  68. package/vendor/subagent-core/types/archive-admission.js +151 -0
  69. package/vendor/subagent-core/types/assistant-output.d.ts +2 -2
  70. package/vendor/subagent-core/types/catalog.d.ts +17 -10
  71. package/vendor/subagent-core/types/catalog.js +12 -6
  72. package/vendor/subagent-core/types/child-agent.d.ts +8 -5
  73. package/vendor/subagent-core/types/child-agent.js +11 -5
  74. package/vendor/subagent-core/types/continuation-activation.d.ts +17 -1
  75. package/vendor/subagent-core/types/continuation-activation.js +41 -4
  76. package/vendor/subagent-core/types/continuation-messages.d.ts +1 -1
  77. package/vendor/subagent-core/types/continuation-messages.js +7 -3
  78. package/vendor/subagent-core/types/continuation.d.ts +1 -1
  79. package/vendor/subagent-core/types/continuation.js +2 -2
  80. package/vendor/subagent-core/types/control-types.d.ts +29 -36
  81. package/vendor/subagent-core/types/control-types.js +2 -3
  82. package/vendor/subagent-core/types/control.d.ts +2 -28
  83. package/vendor/subagent-core/types/control.js +3 -40
  84. package/vendor/subagent-core/types/index.d.ts +45 -41
  85. package/vendor/subagent-core/types/index.js +46 -82
  86. package/vendor/subagent-core/types/internal.d.ts +2 -2
  87. package/vendor/subagent-core/types/internal.js +2 -2
  88. package/vendor/subagent-core/types/lifecycle.d.ts +1 -1
  89. package/vendor/subagent-core/types/lifecycle.js +5 -3
  90. package/vendor/subagent-core/types/list-children.d.ts +15 -32
  91. package/vendor/subagent-core/types/list-children.js +45 -49
  92. package/vendor/subagent-core/types/out-of-process.d.ts +1 -1
  93. package/vendor/subagent-core/types/projection-types.d.ts +9 -1
  94. package/vendor/subagent-core/types/projection.d.ts +5 -0
  95. package/vendor/subagent-core/types/projection.js +10 -4
  96. package/vendor/subagent-core/types/run-settlement.js +1 -1
  97. package/vendor/subagent-core/types/types.d.ts +2 -2
  98. package/vendor/terminal/index.js +94 -30
  99. package/vendor/tui/lib/index.mjs +2 -1
  100. package/vendor/tui/lib/kernel-panels.mjs +1 -1
  101. package/vendor/tui/lib/render/projection.mjs +50 -36
  102. package/presets/dscode/agent.cordis.yml +0 -321
  103. package/presets/dscode/preset.yml +0 -3
@@ -1,321 +0,0 @@
1
- # The `dscode` 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
- suffix: Your working directory is {{cwd}}.
28
- prefix: >-
29
- You are a coding agent powered by the {{model}} model, working through a persistent shell.
30
- Reply in the language the user writes in.
31
- Keep the user informed during tool-driven work with ordinary assistant text, visible even when verbose mode is off. Reasoning blocks and tool descriptions do not count as progress updates.
32
- Before the first tool call, briefly state what you will check or change; for a simple answer without tools, answer directly.
33
- During sustained work, send an update when you have something to report: a significant finding, a blocker, a change of direction, or the result of a long blocking call once control returns. Do not announce routine reads, do not claim to speak while a tool is blocking, and never pad: an update says what changed and what the next step resolves, in one or two sentences, using observable facts and decisions rather than private reasoning, raw tool payloads or a narration of every command.
34
- Continue working after each update without asking permission for already-authorized steps. Progress text is not the final answer; finish with a self-contained result and any remaining gaps.
35
- Before changing code, read the relevant code and any project instructions; reuse existing functions and patterns instead of adding new machinery.
36
- Make routine judgment calls yourself and ask only when different answers would lead to materially different work.
37
- Deliver the whole requested scope; if part of it is blocked, finish the rest and say what was left out and why.
38
- Verify changes by running the relevant checks, and report outcomes faithfully: say when a check fails, when a step was skipped, and when something could not be verified.
39
- Before editing, identify the requested scope and observable acceptance checks. Keep them stable unless the user changes the task or evidence shows a necessary dependency.
40
- Once the requested behavior and required checks pass, move to delivery. Do not turn a finished task into optional optimization, refactoring or speculative hardening.
41
- Treat review findings as claims to verify against the actual code and requirements, not automatic instructions. Fix confirmed defects affecting this task; report unrelated opportunities separately.
42
- After a fix, rerun affected checks. Repeat broader checks only when changed behavior or a failure invalidates the earlier result; do not rerun passing suites just to feel more certain.
43
- If a check suddenly becomes much slower, inspect the changed workload and the existing output before rerunning it. Keep test fixtures small and independent of production-sized limits.
44
- Respect the automatic review budget. Reaching it is not proof of correctness: finish necessary fixes and focused checks, report unresolved issues honestly, and continue already-authorized delivery steps when their requirements are met.
45
- Keep the final reply concise, lead with the outcome, and never claim work you did not do.
46
-
47
- - id: agent-instructions
48
- name: '@deepseek-ai/dsh-agent-instructions'
49
- config:
50
- # The launcher folds AGENTS.md/CLAUDE.md from directories above the project
51
- # root, up to home, in front of the user-global file; without those files it
52
- # points at $DSH_HOME, exactly as before.
53
- dshHome: !!js 'process.env.DSCODE_INSTRUCTION_HOME'
54
- maxBytes: 65536
55
-
56
- - id: persistent-shell
57
- name: cordis:group
58
- group: true
59
- isolate:
60
- terminals: true
61
- config:
62
- - id: pty
63
- name: '@deepseek-ai/dsh-terminal'
64
-
65
- - id: terminal-bash
66
- name: '@toddzheng024/dscode-bundle/terminal'
67
- disabled: !!js process.platform === 'win32'
68
- config:
69
- timeoutMs: 300000
70
-
71
- - id: persistent-bash
72
- name: '@toddzheng024/dscode-bundle/persistent'
73
- disabled: !!js process.platform === 'win32'
74
- config:
75
- timeoutMs: 300000
76
- description: |-
77
- Run commands in a bash shell
78
- * When invoking this tool, the contents of the "command" parameter does NOT need to be XML-escaped.
79
- * Network access depends on the task environment. Prefer configured mirrors/proxies when they are available.
80
- * State is persistent across command calls and discussions with the user.
81
- * To inspect a particular line range of a file, e.g. lines 10-25, try 'sed -n 10,25p /path/to/the/file'.
82
- * Please avoid commands that may produce a very large amount of output.
83
- * Please run long lived commands in the background, e.g. 'sleep 10 &' or start a server in the background.
84
-
85
- - id: terminal-pwsh
86
- name: '@toddzheng024/dscode-bundle/terminal'
87
- disabled: !!js process.platform !== 'win32'
88
- config:
89
- shellDialect: pwsh
90
- timeoutMs: 300000
91
-
92
- - id: persistent-pwsh
93
- name: '@deepseek-ai/dsh-tool-pwsh-persistent'
94
- disabled: !!js process.platform !== 'win32'
95
- config:
96
- timeoutMs: 300000
97
- description: |-
98
- Run commands in a PowerShell shell
99
- * When invoking this tool, the contents of the "command" parameter does NOT need to be XML-escaped.
100
- * You don't have access to the internet via this tool.
101
- * State is persistent across command calls and discussions with the user.
102
- * Use native Windows paths (C:\...) and $env:NAME variables; this is PowerShell, not bash.
103
- * Please avoid commands that may produce a very large amount of output.
104
- * Please run long lived commands in the background, e.g. 'Start-Job' or start a server with Start-Process.
105
-
106
- - id: dscode-policy
107
- name: '@toddzheng024/dscode-bundle/policy'
108
-
109
- # A fresh shell for reviewed escalation. It does not inherit PTY state.
110
- - id: shell-retry
111
- name: '@toddzheng024/dscode-bundle/bash'
112
- config:
113
- toolName: shell_retry
114
-
115
-
116
- # ── background jobs ────────────────────────────────────────────────────────
117
-
118
- # Only the model-facing controls. The task REGISTRY stays on the host plane:
119
- # its producers sit outside any realm this file could put it in — `tool-bash`
120
- # above resolves it with `ctx.get`, and an entry-local realm here is invisible
121
- # to every sibling row, so `run_in_background` would answer "background jobs
122
- # unavailable" while these controls sat in the catalog. The registry is keyed by
123
- # owning agent anyway, so one host instance serves every session. What a preset
124
- # chooses is whether its agent can collect and stop background work at all.
125
- - id: tool-jobs
126
- name: '@deepseek-ai/dsh-tool-jobs'
127
-
128
- # ── skills ──────────────────────────────────────────────────────────────────
129
-
130
- # The skill REGISTRY lives in the host composition and is layered per scope:
131
- # these rows register into THIS preset's layer of it, so they need no realm.
132
- # `skill-filesystem` contributes local-root discovery for agents on this preset, and
133
- # `tool-skill` gives them the catalog and loader; the merged catalog also
134
- # carries whatever the deployment registered globally (repository plugins).
135
- - id: skill-filesystem
136
- name: '@deepseek-ai/dsh-skill-filesystem'
137
- config:
138
- # Ancestor skill discovery is on by default: the skill roots of directories
139
- # between the working directory and home register at rank 300, nearest first,
140
- # so headers enter the catalog and bodies stay lazy. =0 turns it off.
141
- customSkillDirs: !!js 'JSON.parse(process.env.DSCODE_SKILL_ANCESTOR_DIRS ?? "[]")'
142
-
143
- - id: tool-skill
144
- name: '@deepseek-ai/dsh-tool-skill'
145
-
146
- # ── goals ───────────────────────────────────────────────────────────────────
147
-
148
- # The goal service and session driver stay on the host plane, where the Gateway
149
- # can resolve them. The human command and model-facing tool register into this
150
- # preset's scoped layers.
151
- - id: command-goal
152
- name: '@toddzheng024/dscode-bundle/command-goal'
153
-
154
- - id: tool-goal
155
- name: '@deepseek-ai/dsh-tool-goal'
156
-
157
- # ── plan mode ───────────────────────────────────────────────────────────────
158
-
159
- # Plan state is per-agent by nature, so an entry-local realm is not a
160
- # workaround here — it is the correct lifetime.
161
- - id: planning
162
- name: cordis:group
163
- group: true
164
- isolate:
165
- planMode: true
166
- config:
167
- - id: plan-mode
168
- name: '@deepseek-ai/dsh-plan-mode'
169
- config:
170
- section: |
171
- 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.
172
-
173
- 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.
174
-
175
- 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.
176
-
177
- 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.
178
-
179
- 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.
180
-
181
- 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.
182
-
183
- # ── compaction ──────────────────────────────────────────────────────────────
184
-
185
- # `compaction-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
186
- # share this realm rather than sit outside it.
187
- #
188
- # `tokenMeter` is deliberately NOT in this realm: the meter stays on the HOST
189
- # plane, and the rows here resolve that one instance. It takes no configuration,
190
- # keys every fold by Session, and owns the context-meter projection units the
191
- # browser reads for every session — behind a realm those units would come and go
192
- # with whichever presets happen to be mounted. What a preset chooses is whether
193
- # its agent compacts at all, which is `compaction-basic` below.
194
- - id: compaction
195
- name: cordis:group
196
- group: true
197
- isolate:
198
- compaction: true
199
- toolResultPruner: true
200
- config:
201
- - id: compaction-basic
202
- name: '@toddzheng024/dscode-bundle/compaction'
203
-
204
- - id: command-compact
205
- name: '@deepseek-ai/dsh-command-compact'
206
-
207
- - id: tool-result-pruner
208
- name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
209
- config:
210
- thresholdChars: 8192
211
- headChars: 4096
212
- tailChars: 1024
213
-
214
- # ── delegation and workflows ────────────────────────────────────────────────
215
-
216
- # The `subagents` registry and its spawn/fork backends live in the HOST
217
- # composition: the registry is a process singleton whose cross-session queries
218
- # the api-proxy serves to the browser, and a provider name may only be
219
- # registered once. This preset contributes the delegation TOOLS, which resolve
220
- # that host registry.
221
- #
222
- # `workflows` is different — nothing outside an agent reads it — so every row
223
- # that reaches it shares one entry-local realm here, and a consumer left
224
- # outside would resolve a host registry this preset does not populate.
225
- - id: delegation
226
- name: cordis:group
227
- group: true
228
- isolate:
229
- workflowEngine: true
230
- config:
231
- - id: tool-subagent-control
232
- name: '@deepseek-ai/dsh-tool-subagent-control'
233
-
234
- - id: tool-subagent-list-agents
235
- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
236
-
237
- - id: tool-subagent
238
- name: '@toddzheng024/dscode-bundle/subagent'
239
- config:
240
- provider: spawn
241
- toolName: subagent
242
- modelSelectionSettings: true
243
- backgroundMode: continuable
244
- maxDepth: 1
245
-
246
- # Fork omits model selection so provider/model stay equal to the parent and
247
- # the inherited history remains eligible for KV Cache reuse. DSCODE exposes
248
- # reasoning_effort independently; changing effort does not select a new route.
249
- # This preset
250
- # keeps fork continuable; parent and child inherit the same messaging tool,
251
- # while the parent id and return guidance follow the inherited history.
252
- - id: tool-subagent-fork
253
- name: '@toddzheng024/dscode-bundle/subagent'
254
- config:
255
- provider: fork
256
- toolName: subagent_fork
257
- backgroundMode: continuable
258
- maxDepth: 1
259
-
260
- # Production dsh does not install these optional providers. Install the
261
- # matching Bundle in this Profile and restart the Host, then copy this
262
- # preset and remove `disabled` from the matching tool row. Host availability
263
- # alone grants no tool.
264
- - id: tool-subagent-codex
265
- name: '@toddzheng024/dscode-bundle/subagent'
266
- disabled: true
267
- config:
268
- provider: codex
269
- toolName: subagent_codex
270
- backgroundMode: one-shot
271
- maxDepth: provider-managed
272
-
273
- - id: tool-subagent-claude-code
274
- name: '@toddzheng024/dscode-bundle/subagent'
275
- disabled: true
276
- config:
277
- provider: claude-code
278
- toolName: subagent_claude_code
279
- backgroundMode: one-shot
280
- maxDepth: provider-managed
281
-
282
- - id: workflow-worker-thread
283
- name: '@deepseek-ai/dsh-workflow-worker-thread'
284
- config:
285
- provider: spawn
286
-
287
- - id: tool-workflow
288
- name: '@deepseek-ai/dsh-tool-workflow'
289
- disabled: true
290
-
291
- - id: tool-ralph
292
- name: '@deepseek-ai/dsh-tool-ralph'
293
- disabled: true
294
- config:
295
- subagentProvider: spawn
296
- maxRounds: 64
297
-
298
- # ── remaining model-facing rows ─────────────────────────────────────────────
299
-
300
- - id: tool-ask-user
301
- name: '@deepseek-ai/dsh-tool-ask-user'
302
-
303
- - id: tool-todo
304
- name: '@deepseek-ai/dsh-tool-todo'
305
- config:
306
- allowParallelInProgress: true
307
-
308
- # The `web` service and its search provider stay in the host composition; only
309
- # the model-facing tool is per-session.
310
- - id: tool-web
311
- name: '@deepseek-ai/dsh-tool-web'
312
- config:
313
- fetch: true
314
- searchTimeoutMs: 60000
315
-
316
- - id: code-review
317
- name: '@toddzheng024/dscode-bundle/code-review'
318
-
319
- - id: present
320
- name: '@deepseek-ai/dsh-tool-present'
321
-
@@ -1,3 +0,0 @@
1
- name: DSCODE
2
- description: 持久 Shell 编码环境,保留 Skills、压缩、目标、子代理与工作流。
3
- order: 0