dsh-switchman 1.5.0 → 1.7.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/README.de.md +45 -55
- package/README.es.md +21 -31
- package/README.fr.md +23 -33
- package/README.it.md +23 -33
- package/README.ja.md +42 -52
- package/README.ko.md +43 -53
- package/README.md +41 -51
- package/README.pt.md +23 -33
- package/README.ru.md +21 -31
- package/README.zh-TW.md +35 -45
- package/README.zh.md +25 -35
- package/client.js +1464 -43
- package/cordis.patch.yml +77 -92
- package/host/config.js +8 -0
- package/host/context-watch.js +197 -56
- package/host/routes.js +6 -2
- package/host/subagent-model.js +15 -10
- package/host/subagents.js +86 -70
- package/host/teams.js +160 -7
- package/package.json +2 -2
- package/skills/db-query/package.json +1 -1
- package/skills/db-query/scripts/lib/cli.js +23 -23
- package/skills/db-query/scripts/lib/config.js +78 -61
- package/skills/db-query/scripts/lib/mysql-readonly.js +167 -158
- package/skills/db-query/scripts/lib/output.js +56 -55
- package/skills/db-query/scripts/lib/redis-readonly.js +116 -111
- package/skills/db-query/scripts/mysql-query.js +46 -42
- package/skills/db-query/scripts/redis-query.js +32 -29
- package/skills/db-query/scripts/setup.sh +16 -16
package/cordis.patch.yml
CHANGED
|
@@ -28,10 +28,15 @@
|
|
|
28
28
|
#
|
|
29
29
|
# Provenance & maintenance: the four `plugins` lists below are copied verbatim
|
|
30
30
|
# from @deepseek-ai/dsh-web-app presets/{standard,ptc,minimal,cordis}.patch.yml
|
|
31
|
-
# (dsh 0.1
|
|
32
|
-
#
|
|
33
|
-
#
|
|
34
|
-
#
|
|
31
|
+
# (dsh 0.2.1-rc.1: time-context + tool-schedule + the disabled tool-plugin-market
|
|
32
|
+
# row joined every list, the subagent rows lost `backgroundMode` under the
|
|
33
|
+
# unified activation lifecycles, the ralph/codex/claude-code rows left the
|
|
34
|
+
# presets, minimal gained image-only fs tools and a compaction group, and the
|
|
35
|
+
# plan-mode text was reworded). A Loader override replaces the target row's
|
|
36
|
+
# `config` wholesale, so every field is restated here. After a DSH upgrade that
|
|
37
|
+
# changes the shipped presets, re-sync these lists from the new preset files,
|
|
38
|
+
# then reinstall this bundle; scripts/validate.mjs compares this patch against
|
|
39
|
+
# the installed app's presets field by field.
|
|
35
40
|
#
|
|
36
41
|
# NEVER set `modelSelectionSettings: true` on the tool-subagent-fork row (any
|
|
37
42
|
# preset). Only the spawn row may carry it: while the subagent model-selection
|
|
@@ -40,9 +45,19 @@
|
|
|
40
45
|
# scope, and a second instance makes session composition throw
|
|
41
46
|
# `tool "list_subagent_models" is already registered in this scope` — breaking
|
|
42
47
|
# creation of ALL new sessions and the recomposition of old ones. The shipped
|
|
43
|
-
# presets (verified against installed dsh-web-app 0.2.0-rc.2
|
|
44
|
-
# 0.2.1-alpha.1) enable it on the spawn row only; fork-side
|
|
45
|
-
# is not a factory capability.
|
|
48
|
+
# presets (verified against installed dsh-web-app 0.2.0-rc.2, the fork's
|
|
49
|
+
# 0.2.1-alpha.1, and 0.2.1-rc.1) enable it on the spawn row only; fork-side
|
|
50
|
+
# explicit routing is not a factory capability.
|
|
51
|
+
#
|
|
52
|
+
# dsh 0.2.1 REMOVED the `cwd` prompt variable ("centralize working directories
|
|
53
|
+
# and directory context"): registered prompt variables are `provider` and
|
|
54
|
+
# `model` only, and the working directory now reaches the model as REQUIRED
|
|
55
|
+
# runtime context in every preset — it survives even minimal's
|
|
56
|
+
# includeRuntimeContext: false, so no preset needs a directory line here. The
|
|
57
|
+
# suffix therefore carries NO `Your working directory is {{cwd}}.` line any
|
|
58
|
+
# more: an unknown variable in an interpolated section throws at EVERY prompt
|
|
59
|
+
# render and kills every conversation while this bundle is enabled. Do not
|
|
60
|
+
# reintroduce {{cwd}} (or any variable beyond provider/model).
|
|
46
61
|
#
|
|
47
62
|
# Known consequences of overriding:
|
|
48
63
|
# - plugin_manager `set_plugin` on these preset rows reports `overridden`.
|
|
@@ -65,8 +80,6 @@
|
|
|
65
80
|
config:
|
|
66
81
|
prefix: You are a coding agent powered by the {{model}} model.
|
|
67
82
|
suffix: &switchman-team-suffix |
|
|
68
|
-
Your working directory is {{cwd}}.
|
|
69
|
-
|
|
70
83
|
# dsh-switchman 自主智能体团队调度规程(本段为当前 profile 的最高行为准则)
|
|
71
84
|
|
|
72
85
|
总纲:在准确理解需求、严谨思考、最优质量、最低返工率的前提下最小化总 token 消耗。返工是最贵的 token——过程与铺陈可以省,验证与关键推理绝不省。
|
|
@@ -99,6 +112,8 @@
|
|
|
99
112
|
name: '@deepseek-ai/dsh-agent-instructions'
|
|
100
113
|
config:
|
|
101
114
|
maxBytes: 65536
|
|
115
|
+
- id: time-context
|
|
116
|
+
name: '@deepseek-ai/dsh-time-context'
|
|
102
117
|
- id: tool-bash
|
|
103
118
|
name: '@deepseek-ai/dsh-tool-bash'
|
|
104
119
|
disabled: !!js process.platform === 'win32'
|
|
@@ -113,6 +128,8 @@
|
|
|
113
128
|
sampleOverCapGlobResults: false
|
|
114
129
|
- id: tool-jobs
|
|
115
130
|
name: '@deepseek-ai/dsh-tool-jobs'
|
|
131
|
+
- id: tool-schedule
|
|
132
|
+
name: '@deepseek-ai/dsh-tool-schedule'
|
|
116
133
|
- id: skill-filesystem
|
|
117
134
|
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
118
135
|
- id: tool-skill
|
|
@@ -131,7 +148,7 @@
|
|
|
131
148
|
name: '@deepseek-ai/dsh-plan-mode'
|
|
132
149
|
config:
|
|
133
150
|
section: |
|
|
134
|
-
You are in plan mode. Stay in plan mode until
|
|
151
|
+
You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode or 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.
|
|
135
152
|
|
|
136
153
|
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.
|
|
137
154
|
|
|
@@ -175,41 +192,17 @@
|
|
|
175
192
|
provider: spawn
|
|
176
193
|
toolName: subagent
|
|
177
194
|
modelSelectionSettings: true
|
|
178
|
-
backgroundMode: continuable
|
|
179
195
|
- id: tool-subagent-fork
|
|
180
196
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
181
197
|
config:
|
|
182
198
|
provider: fork
|
|
183
199
|
toolName: subagent_fork
|
|
184
|
-
backgroundMode: continuable
|
|
185
|
-
- id: tool-subagent-codex
|
|
186
|
-
name: '@deepseek-ai/dsh-tool-subagent'
|
|
187
|
-
disabled: true
|
|
188
|
-
config:
|
|
189
|
-
provider: codex
|
|
190
|
-
toolName: subagent_codex
|
|
191
|
-
backgroundMode: one-shot
|
|
192
|
-
maxDepth: provider-managed
|
|
193
|
-
- id: tool-subagent-claude-code
|
|
194
|
-
name: '@deepseek-ai/dsh-tool-subagent'
|
|
195
|
-
disabled: true
|
|
196
|
-
config:
|
|
197
|
-
provider: claude-code
|
|
198
|
-
toolName: subagent_claude_code
|
|
199
|
-
backgroundMode: one-shot
|
|
200
|
-
maxDepth: provider-managed
|
|
201
200
|
- id: workflow-ptc
|
|
202
201
|
name: '@deepseek-ai/dsh-workflow-ptc'
|
|
203
202
|
config:
|
|
204
203
|
provider: spawn
|
|
205
204
|
- id: tool-workflow
|
|
206
205
|
name: '@deepseek-ai/dsh-tool-workflow'
|
|
207
|
-
- id: tool-ralph
|
|
208
|
-
name: '@deepseek-ai/dsh-tool-ralph'
|
|
209
|
-
disabled: true
|
|
210
|
-
config:
|
|
211
|
-
subagentProvider: spawn
|
|
212
|
-
maxRounds: 64
|
|
213
206
|
- id: tool-ask-user
|
|
214
207
|
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
215
208
|
- id: tool-todo
|
|
@@ -226,6 +219,9 @@
|
|
|
226
219
|
- id: tool-plugin-manager
|
|
227
220
|
name: '@deepseek-ai/dsh-plugin-manager/tools'
|
|
228
221
|
disabled: true
|
|
222
|
+
- id: tool-plugin-market
|
|
223
|
+
name: '@deepseek-ai/dsh-plugin-market/tools'
|
|
224
|
+
disabled: true
|
|
229
225
|
|
|
230
226
|
# -----------------------------------------------------------------------------
|
|
231
227
|
# ptc — shipped list verbatim (workflow tooling disabled, PTC presentation);
|
|
@@ -246,6 +242,8 @@
|
|
|
246
242
|
name: '@deepseek-ai/dsh-agent-instructions'
|
|
247
243
|
config:
|
|
248
244
|
maxBytes: 65536
|
|
245
|
+
- id: time-context
|
|
246
|
+
name: '@deepseek-ai/dsh-time-context'
|
|
249
247
|
- id: tool-bash
|
|
250
248
|
name: '@deepseek-ai/dsh-tool-bash'
|
|
251
249
|
disabled: !!js process.platform === 'win32'
|
|
@@ -260,6 +258,8 @@
|
|
|
260
258
|
sampleOverCapGlobResults: false
|
|
261
259
|
- id: tool-jobs
|
|
262
260
|
name: '@deepseek-ai/dsh-tool-jobs'
|
|
261
|
+
- id: tool-schedule
|
|
262
|
+
name: '@deepseek-ai/dsh-tool-schedule'
|
|
263
263
|
- id: skill-filesystem
|
|
264
264
|
name: '@deepseek-ai/dsh-skill-filesystem'
|
|
265
265
|
- id: tool-skill
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
name: '@deepseek-ai/dsh-plan-mode'
|
|
279
279
|
config:
|
|
280
280
|
section: |
|
|
281
|
-
You are in plan mode. Stay in plan mode until
|
|
281
|
+
You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode or 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.
|
|
282
282
|
|
|
283
283
|
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.
|
|
284
284
|
|
|
@@ -322,29 +322,11 @@
|
|
|
322
322
|
provider: spawn
|
|
323
323
|
toolName: subagent
|
|
324
324
|
modelSelectionSettings: true
|
|
325
|
-
backgroundMode: continuable
|
|
326
325
|
- id: tool-subagent-fork
|
|
327
326
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
328
327
|
config:
|
|
329
328
|
provider: fork
|
|
330
329
|
toolName: subagent_fork
|
|
331
|
-
backgroundMode: continuable
|
|
332
|
-
- id: tool-subagent-codex
|
|
333
|
-
name: '@deepseek-ai/dsh-tool-subagent'
|
|
334
|
-
disabled: true
|
|
335
|
-
config:
|
|
336
|
-
provider: codex
|
|
337
|
-
toolName: subagent_codex
|
|
338
|
-
backgroundMode: one-shot
|
|
339
|
-
maxDepth: provider-managed
|
|
340
|
-
- id: tool-subagent-claude-code
|
|
341
|
-
name: '@deepseek-ai/dsh-tool-subagent'
|
|
342
|
-
disabled: true
|
|
343
|
-
config:
|
|
344
|
-
provider: claude-code
|
|
345
|
-
toolName: subagent_claude_code
|
|
346
|
-
backgroundMode: one-shot
|
|
347
|
-
maxDepth: provider-managed
|
|
348
330
|
- id: workflow-ptc
|
|
349
331
|
name: '@deepseek-ai/dsh-workflow-ptc'
|
|
350
332
|
disabled: true
|
|
@@ -353,12 +335,6 @@
|
|
|
353
335
|
- id: tool-workflow
|
|
354
336
|
name: '@deepseek-ai/dsh-tool-workflow'
|
|
355
337
|
disabled: true
|
|
356
|
-
- id: tool-ralph
|
|
357
|
-
name: '@deepseek-ai/dsh-tool-ralph'
|
|
358
|
-
disabled: true
|
|
359
|
-
config:
|
|
360
|
-
subagentProvider: spawn
|
|
361
|
-
maxRounds: 64
|
|
362
338
|
- id: tool-ask-user
|
|
363
339
|
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
364
340
|
- id: tool-todo
|
|
@@ -379,13 +355,21 @@
|
|
|
379
355
|
- id: tool-plugin-manager
|
|
380
356
|
name: '@deepseek-ai/dsh-plugin-manager/tools'
|
|
381
357
|
disabled: true
|
|
358
|
+
- id: tool-plugin-market
|
|
359
|
+
name: '@deepseek-ai/dsh-plugin-market/tools'
|
|
360
|
+
disabled: true
|
|
382
361
|
|
|
383
362
|
# -----------------------------------------------------------------------------
|
|
384
|
-
# minimal — shipped list verbatim (
|
|
385
|
-
#
|
|
386
|
-
#
|
|
387
|
-
#
|
|
388
|
-
#
|
|
363
|
+
# minimal — shipped list verbatim (image-only fs tools, compaction, persistent
|
|
364
|
+
# shell). The shipped persona keeps `complete: true` + `includeRuntimeContext:
|
|
365
|
+
# false`, and the shared doctrine suffix stays attached for the four-row shape
|
|
366
|
+
# contract of scripts/validate.mjs — but a complete persona prefix IS the whole
|
|
367
|
+
# system prompt (the registry ignores the suffix and every other section at
|
|
368
|
+
# render), so the doctrine does not reach minimal sessions; only the prefix
|
|
369
|
+
# renders. The working directory does reach them: since dsh 0.2.1 it arrives
|
|
370
|
+
# as REQUIRED runtime context, which includeRuntimeContext: false cannot
|
|
371
|
+
# suppress, so minimal's persistent shell still sees the cwd with no
|
|
372
|
+
# `{{cwd}}` variable and no directory line in the suffix.
|
|
389
373
|
# -----------------------------------------------------------------------------
|
|
390
374
|
- id: preset-minimal
|
|
391
375
|
name: '@deepseek-ai/dsh-agent-preset'
|
|
@@ -400,6 +384,23 @@
|
|
|
400
384
|
complete: true
|
|
401
385
|
includeRuntimeContext: false
|
|
402
386
|
suffix: *switchman-team-suffix
|
|
387
|
+
- id: tool-fs
|
|
388
|
+
name: '@deepseek-ai/dsh-tool-fs'
|
|
389
|
+
config:
|
|
390
|
+
read: false
|
|
391
|
+
readImage: true
|
|
392
|
+
write: false
|
|
393
|
+
edit: false
|
|
394
|
+
- id: compaction
|
|
395
|
+
name: cordis:group
|
|
396
|
+
group: true
|
|
397
|
+
isolate:
|
|
398
|
+
compaction: true
|
|
399
|
+
config:
|
|
400
|
+
- id: compaction-basic
|
|
401
|
+
name: '@deepseek-ai/dsh-compaction-basic'
|
|
402
|
+
- id: command-compact
|
|
403
|
+
name: '@deepseek-ai/dsh-command-compact'
|
|
403
404
|
- id: persistent-shell
|
|
404
405
|
name: cordis:group
|
|
405
406
|
group: true
|
|
@@ -448,8 +449,8 @@
|
|
|
448
449
|
|
|
449
450
|
# -----------------------------------------------------------------------------
|
|
450
451
|
# cordis — shipped list verbatim (cordis tooling, bundled skills directory,
|
|
451
|
-
# plugin-manager tools for profile-context sessions); persona suffix
|
|
452
|
-
# by the shared doctrine suffix.
|
|
452
|
+
# plugin-manager/market tools for profile-context sessions); persona suffix
|
|
453
|
+
# replaced by the shared doctrine suffix.
|
|
453
454
|
# -----------------------------------------------------------------------------
|
|
454
455
|
- id: preset-cordis
|
|
455
456
|
name: '@deepseek-ai/dsh-agent-preset'
|
|
@@ -460,12 +461,15 @@
|
|
|
460
461
|
- id: persona
|
|
461
462
|
name: '@deepseek-ai/dsh-persona'
|
|
462
463
|
config:
|
|
463
|
-
prefix:
|
|
464
|
+
prefix: >-
|
|
465
|
+
You are a coding agent powered by the {{model}} model.
|
|
464
466
|
suffix: *switchman-team-suffix
|
|
465
467
|
- id: agent-instructions
|
|
466
468
|
name: '@deepseek-ai/dsh-agent-instructions'
|
|
467
469
|
config:
|
|
468
470
|
maxBytes: 65536
|
|
471
|
+
- id: time-context
|
|
472
|
+
name: '@deepseek-ai/dsh-time-context'
|
|
469
473
|
- id: tool-bash
|
|
470
474
|
name: '@deepseek-ai/dsh-tool-bash'
|
|
471
475
|
disabled: !!js process.platform === 'win32'
|
|
@@ -480,6 +484,8 @@
|
|
|
480
484
|
sampleOverCapGlobResults: false
|
|
481
485
|
- id: tool-jobs
|
|
482
486
|
name: '@deepseek-ai/dsh-tool-jobs'
|
|
487
|
+
- id: tool-schedule
|
|
488
|
+
name: '@deepseek-ai/dsh-tool-schedule'
|
|
483
489
|
- id: command-goal
|
|
484
490
|
name: '@deepseek-ai/dsh-command-goal'
|
|
485
491
|
- id: tool-goal
|
|
@@ -494,7 +500,7 @@
|
|
|
494
500
|
name: '@deepseek-ai/dsh-plan-mode'
|
|
495
501
|
config:
|
|
496
502
|
section: |
|
|
497
|
-
You are in plan mode. Stay in plan mode until
|
|
503
|
+
You are in plan mode. Stay in plan mode until the user approves your plan through exit_plan_mode or 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.
|
|
498
504
|
|
|
499
505
|
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.
|
|
500
506
|
|
|
@@ -538,41 +544,17 @@
|
|
|
538
544
|
provider: spawn
|
|
539
545
|
toolName: subagent
|
|
540
546
|
modelSelectionSettings: true
|
|
541
|
-
backgroundMode: continuable
|
|
542
547
|
- id: tool-subagent-fork
|
|
543
548
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
544
549
|
config:
|
|
545
550
|
provider: fork
|
|
546
551
|
toolName: subagent_fork
|
|
547
|
-
backgroundMode: continuable
|
|
548
|
-
- id: tool-subagent-codex
|
|
549
|
-
name: '@deepseek-ai/dsh-tool-subagent'
|
|
550
|
-
disabled: true
|
|
551
|
-
config:
|
|
552
|
-
provider: codex
|
|
553
|
-
toolName: subagent_codex
|
|
554
|
-
backgroundMode: one-shot
|
|
555
|
-
maxDepth: provider-managed
|
|
556
|
-
- id: tool-subagent-claude-code
|
|
557
|
-
name: '@deepseek-ai/dsh-tool-subagent'
|
|
558
|
-
disabled: true
|
|
559
|
-
config:
|
|
560
|
-
provider: claude-code
|
|
561
|
-
toolName: subagent_claude_code
|
|
562
|
-
backgroundMode: one-shot
|
|
563
|
-
maxDepth: provider-managed
|
|
564
552
|
- id: workflow-ptc
|
|
565
553
|
name: '@deepseek-ai/dsh-workflow-ptc'
|
|
566
554
|
config:
|
|
567
555
|
provider: spawn
|
|
568
556
|
- id: tool-workflow
|
|
569
557
|
name: '@deepseek-ai/dsh-tool-workflow'
|
|
570
|
-
- id: tool-ralph
|
|
571
|
-
name: '@deepseek-ai/dsh-tool-ralph'
|
|
572
|
-
disabled: true
|
|
573
|
-
config:
|
|
574
|
-
subagentProvider: spawn
|
|
575
|
-
maxRounds: 64
|
|
576
558
|
- id: tool-ask-user
|
|
577
559
|
name: '@deepseek-ai/dsh-tool-ask-user'
|
|
578
560
|
- id: tool-todo
|
|
@@ -598,6 +580,9 @@
|
|
|
598
580
|
- id: tool-plugin-manager
|
|
599
581
|
name: '@deepseek-ai/dsh-plugin-manager/tools'
|
|
600
582
|
disabled: !!js "!ctx.get('profileContext')"
|
|
583
|
+
- id: tool-plugin-market
|
|
584
|
+
name: '@deepseek-ai/dsh-plugin-market/tools'
|
|
585
|
+
disabled: !!js "!ctx.get('profileContext')"
|
|
601
586
|
|
|
602
587
|
# -----------------------------------------------------------------------------
|
|
603
588
|
# The bundle's own plugin row. The Host half (index.js) registers the bundled
|
package/host/config.js
CHANGED
|
@@ -46,6 +46,14 @@ export const EffortEntrySchema = z.object({
|
|
|
46
46
|
|
|
47
47
|
/** All dsh-switchman settings. Field names are the settings mutation paths. */
|
|
48
48
|
export const Config = z.object({
|
|
49
|
+
// --- Phase 0: UI locale ------------------------------------------------
|
|
50
|
+
/** Display language for this plugin's own UI (badge, panel, settings
|
|
51
|
+
* page): "auto" follows the DSH app language; any other value forces
|
|
52
|
+
* the plugin UI into that locale (extra locales resolve
|
|
53
|
+
* client-side from the inline EXTRA_UI_DICTS table, falling back
|
|
54
|
+
* to English). */
|
|
55
|
+
uiLocale: z.union(["auto", "en", "zh", "zh-TW", "ja", "ko", "de", "es", "fr", "it", "pt", "ru"]).default("auto").volatile(),
|
|
56
|
+
|
|
49
57
|
// --- Phase 1: project language preference -----------------------------
|
|
50
58
|
/** Where the three language slots live: "global" = these profile-level
|
|
51
59
|
* fields below; "project" = each project's .switchman/lang.json (per
|