@toddzheng024/dscode-bundle 0.7.26 → 0.7.28

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 (99) 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 +418 -45
  5. package/package.json +279 -245
  6. package/plugins/auto-review/index.mjs +8 -5
  7. package/plugins/code-review/index.mjs +1 -1
  8. package/plugins/computer-use/index.mjs +37 -0
  9. package/plugins/cordis-config/plain.mjs +31 -0
  10. package/plugins/exec/cli.mjs +1 -1
  11. package/plugins/grok/index.mjs +28 -24
  12. package/plugins/memory/index.mjs +1 -1
  13. package/plugins/message-source/kind.mjs +20 -0
  14. package/plugins/openrouter/adapter.mjs +29 -13
  15. package/plugins/openrouter/index.mjs +31 -28
  16. package/plugins/session-bridge/communication.mjs +6 -3
  17. package/plugins/session-bridge/server.mjs +3 -2
  18. package/plugins/session-bridge/tasks.mjs +3 -1
  19. package/plugins/session-cards/index.mjs +1 -1
  20. package/plugins/time-marks/index.mjs +3 -2
  21. package/plugins/time-marks/marks.mjs +6 -5
  22. package/plugins/triggers/config.mjs +1 -1
  23. package/plugins/triggers/tools.mjs +1 -1
  24. package/plugins/tui-tools/doctor.mjs +1 -1
  25. package/plugins/tui-tools/index.mjs +16 -4
  26. package/plugins/ultra/policy.mjs +16 -0
  27. package/vendor/bash/index.js +455 -186
  28. package/vendor/bash/types/background.d.ts +38 -7
  29. package/vendor/bash/types/index.d.ts +20 -4
  30. package/vendor/bash/types/render.d.ts +28 -9
  31. package/vendor/command-goal/index.js +3 -1
  32. package/vendor/deepseek/index.js +1378 -1246
  33. package/vendor/deepseek/types/adapter.d.ts +16 -155
  34. package/vendor/deepseek/types/config.d.ts +127 -0
  35. package/vendor/deepseek/types/defaults.d.ts +24 -0
  36. package/vendor/deepseek/types/file-store.d.ts +5 -3
  37. package/vendor/deepseek/types/files-api.d.ts +12 -9
  38. package/vendor/deepseek/types/image-tokens.d.ts +24 -9
  39. package/vendor/deepseek/types/images.d.ts +35 -0
  40. package/vendor/deepseek/types/index.d.ts +10 -94
  41. package/vendor/deepseek/types/messages-api.d.ts +10 -0
  42. package/vendor/deepseek/types/model-info.d.ts +16 -0
  43. package/vendor/deepseek/types/models.d.ts +4 -0
  44. package/vendor/deepseek/types/replay.d.ts +27 -0
  45. package/vendor/deepseek/types/request-extensions.d.ts +16 -0
  46. package/vendor/deepseek/types/request-files.d.ts +49 -0
  47. package/vendor/deepseek/types/request-pricing.d.ts +32 -20
  48. package/vendor/deepseek/types/serialize.d.ts +17 -82
  49. package/vendor/deepseek/types/sse.d.ts +6 -22
  50. package/vendor/deepseek/types/translate.d.ts +13 -36
  51. package/vendor/deepseek/types/transport.d.ts +15 -0
  52. package/vendor/deepseek/types/types.d.ts +106 -167
  53. package/vendor/deepseek/types/wire-types.d.ts +62 -0
  54. package/vendor/persistent/index.js +9 -3
  55. package/vendor/subagent/index.js +11 -8
  56. package/vendor/subagent/model-selection-settings.js +12 -38
  57. package/vendor/subagent/types/index.d.ts +4 -3
  58. package/vendor/subagent/types/model-selection-settings.d.ts +12 -10
  59. package/vendor/subagent-core/index.js +401 -264
  60. package/vendor/subagent-core/typert.host.js +103 -113
  61. package/vendor/subagent-core/typert.remote-client.d.ts +1 -3
  62. package/vendor/subagent-core/typert.remote-client.js +23 -69
  63. package/vendor/subagent-core/types/archive-admission.d.ts +16 -0
  64. package/vendor/subagent-core/types/archive-admission.js +151 -0
  65. package/vendor/subagent-core/types/assistant-output.d.ts +2 -2
  66. package/vendor/subagent-core/types/catalog.d.ts +17 -10
  67. package/vendor/subagent-core/types/catalog.js +12 -6
  68. package/vendor/subagent-core/types/child-agent.d.ts +8 -5
  69. package/vendor/subagent-core/types/child-agent.js +11 -5
  70. package/vendor/subagent-core/types/continuation-activation.d.ts +17 -1
  71. package/vendor/subagent-core/types/continuation-activation.js +41 -4
  72. package/vendor/subagent-core/types/continuation-messages.d.ts +1 -1
  73. package/vendor/subagent-core/types/continuation-messages.js +7 -3
  74. package/vendor/subagent-core/types/continuation.d.ts +1 -1
  75. package/vendor/subagent-core/types/continuation.js +2 -2
  76. package/vendor/subagent-core/types/control-types.d.ts +29 -36
  77. package/vendor/subagent-core/types/control-types.js +2 -3
  78. package/vendor/subagent-core/types/control.d.ts +2 -28
  79. package/vendor/subagent-core/types/control.js +3 -40
  80. package/vendor/subagent-core/types/index.d.ts +45 -41
  81. package/vendor/subagent-core/types/index.js +46 -82
  82. package/vendor/subagent-core/types/internal.d.ts +2 -2
  83. package/vendor/subagent-core/types/internal.js +2 -2
  84. package/vendor/subagent-core/types/lifecycle.d.ts +1 -1
  85. package/vendor/subagent-core/types/lifecycle.js +5 -3
  86. package/vendor/subagent-core/types/list-children.d.ts +15 -32
  87. package/vendor/subagent-core/types/list-children.js +45 -49
  88. package/vendor/subagent-core/types/out-of-process.d.ts +1 -1
  89. package/vendor/subagent-core/types/projection-types.d.ts +9 -1
  90. package/vendor/subagent-core/types/projection.d.ts +5 -0
  91. package/vendor/subagent-core/types/projection.js +10 -4
  92. package/vendor/subagent-core/types/run-settlement.js +1 -1
  93. package/vendor/subagent-core/types/types.d.ts +2 -2
  94. package/vendor/terminal/index.js +94 -30
  95. package/vendor/tui/lib/index.mjs +2 -1
  96. package/vendor/tui/lib/kernel-panels.mjs +1 -1
  97. package/vendor/tui/lib/render/projection.mjs +50 -36
  98. package/presets/dscode/agent.cordis.yml +0 -321
  99. package/presets/dscode/preset.yml +0 -3
package/README.md CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  Install through the DSCODE Hub preset, or use `npm install -g @toddzheng024/dscode` then `dscode`.
4
4
 
5
- Requires DSH 0.1.5-rc.2, macOS 14+, Node 22.19+ or 24+, and Chrome. Includes modified upstream modules; see THIRD_PARTY_NOTICES.md. No install-time patches or scripts.
5
+ Requires DSH 0.1.7-alpha.2, macOS 14+, Node 22.19+ or 24+, and Chrome. Includes modified upstream modules; see THIRD_PARTY_NOTICES.md. No install-time patches or scripts.
@@ -1,31 +1,31 @@
1
- @deepseek-ai/dsh-tool-subagent@0.1.5-rc.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/subagent/tool-subagent"}
1
+ @deepseek-ai/dsh-tool-subagent@0.1.7-alpha.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/subagent/tool-subagent"}
2
2
  Local changes: DSCODE effort, shell control, TUI commands and footer.
3
3
 
4
- @deepseek-ai/dsh-subagent@0.1.5-rc.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/subagent/subagent"}
4
+ @deepseek-ai/dsh-subagent@0.1.7-alpha.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/subagent/subagent"}
5
5
  Local changes: DSCODE effort, shell control, TUI commands and footer.
6
6
 
7
- @deepseek-ai/dsh-subagent-in-process-driver@0.1.5-rc.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/subagent/subagent-in-process-driver"}
7
+ @deepseek-ai/dsh-subagent-in-process-driver@0.1.7-alpha.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/subagent/subagent-in-process-driver"}
8
8
  Local changes: DSCODE effort, shell control, TUI commands and footer.
9
9
 
10
- @deepseek-ai/dsh-subagent-spawn-in-process@0.1.5-rc.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/subagent/subagent-spawn-in-process"}
10
+ @deepseek-ai/dsh-subagent-spawn-in-process@0.1.7-alpha.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/subagent/subagent-spawn-in-process"}
11
11
  Local changes: DSCODE effort, shell control, TUI commands and footer.
12
12
 
13
- @deepseek-ai/dsh-subagent-fork-in-process@0.1.5-rc.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/subagent/subagent-fork-in-process"}
13
+ @deepseek-ai/dsh-subagent-fork-in-process@0.1.7-alpha.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/subagent/subagent-fork-in-process"}
14
14
  Local changes: DSCODE effort, shell control, TUI commands and footer.
15
15
 
16
- @deepseek-ai/dsh-llm-deepseek@0.1.5-rc.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/llm/llm-deepseek"}
16
+ @deepseek-ai/dsh-llm-deepseek@0.1.7-alpha.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/llm/llm-deepseek"}
17
17
  Local changes: DSCODE effort, shell control, TUI commands and footer.
18
18
 
19
- @deepseek-ai/dsh-tool-bash@0.1.5-rc.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/shell/tool-bash"}
19
+ @deepseek-ai/dsh-tool-bash@0.1.7-alpha.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/shell/tool-bash"}
20
20
  Local changes: DSCODE effort, shell control, TUI commands and footer.
21
21
 
22
- @deepseek-ai/dsh-tool-bash-persistent@0.1.5-rc.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/shell/tool-bash-persistent"}
22
+ @deepseek-ai/dsh-tool-bash-persistent@0.1.7-alpha.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/shell/tool-bash-persistent"}
23
23
  Local changes: DSCODE effort, shell control, TUI commands and footer.
24
24
 
25
- @deepseek-ai/dsh-terminal-bash@0.1.5-rc.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/terminal/terminal-bash"}
25
+ @deepseek-ai/dsh-terminal-bash@0.1.7-alpha.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/terminal/terminal-bash"}
26
26
  Local changes: DSCODE effort, shell control, TUI commands and footer.
27
27
 
28
- @deepseek-ai/dsh-command-goal@0.1.5-rc.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/goal/command-goal"}
28
+ @deepseek-ai/dsh-command-goal@0.1.7-alpha.2: MIT; {"type":"git","url":"git+https://github.com/deepseek-ai/deepseek-harness.git","directory":"packages/goal/command-goal"}
29
29
  Local changes: DSCODE effort, shell control, TUI commands and footer.
30
30
 
31
31
  dsh-code (DSCODE vendored terminal, forked from dsh-code@1.2.0): MIT; https://github.com/unlinearity/dsh-code
package/bootstrap.mjs CHANGED
@@ -19,7 +19,7 @@ export function apply(ctx) {
19
19
  process.env.DSCODE_SKILL_ANCESTOR_DIRS = JSON.stringify(ancestorSkillDirs({ cwd: process.cwd(), home: homedir() }));
20
20
  process.env.DSCODE_INSTRUCTION_HOME = writeWorkspaceInstructions({ cwd: process.cwd(), home: homedir(), stateDir: home }) ?? home;
21
21
  process.env.DSCODE_SANDBOX_RUNNER = join(root, 'plugins/tui-tools/sandbox-runner.mjs');
22
- ctx.provide('dscodePaths', { presets: join(root, 'presets'), hooks: hookConfig.path });
22
+ ctx.provide('dscodePaths', { hooks: hookConfig.path });
23
23
  const oldPath = process.env.PATH;
24
24
  const added = join(root, 'bin');
25
25
  process.env.PATH = added + ':' + (oldPath ?? '');
package/cordis.patch.yml CHANGED
@@ -13,16 +13,23 @@
13
13
  # driven); the grouping is for readers.
14
14
 
15
15
  - insert:
16
+ - id: tool-plugin-manager
17
+ name: '@deepseek-ai/dsh-plugin-manager/tools'
18
+ disabled: true
19
+
20
+ - id: plugin-manager
21
+ name: '@deepseek-ai/dsh-plugin-manager'
22
+ disabled: !!js "!ctx.get('profileContext')"
23
+
16
24
  - id: timer
17
25
  name: '@deepseek-ai/cordis-plugin-timer'
18
26
 
19
- # Module reload is opt-in per profile. `patchReload: live` config watching
20
- # uses the launcher's watch-only fallback and does not require this row.
27
+ # Profile configuration reloads by default; module roots are opt-in.
21
28
  - id: hmr
22
- name: '@deepseek-ai/cordis-plugin-hmr'
23
- disabled: true
29
+ name: '@deepseek-ai/dsh-hmr'
30
+ disabled: !!js "!ctx.get('profileContext')"
24
31
  config:
25
- root: ['.']
32
+ root: []
26
33
 
27
34
  - id: llm
28
35
  name: '@deepseek-ai/dsh-llm'
@@ -84,16 +91,29 @@
84
91
  - id: llm-retry
85
92
  name: '@deepseek-ai/dsh-llm-retry'
86
93
 
87
- # User-settings document (`$DSH_HOME/settings.yaml`, hot-reloaded): a
88
- # `llm-deepseek:` or `llm-pi-ai:` section there overrides the adapter entries
89
- # below without a restart, and is what the web Models page writes.
94
+ # Live Config forms persist through the active profile patch.
95
+
96
+ # Live configuration forms persist through the launcher's profile.
97
+ - id: config-editor
98
+ name: '@deepseek-ai/dsh-config-editor'
99
+ disabled: !!js "!ctx.get('profileContext')"
100
+
90
101
  - id: settings
91
- name: '@deepseek-ai/dsh-settings-file'
102
+ name: '@deepseek-ai/dsh-settings'
103
+ disabled: !!js "!ctx.get('profileContext')"
92
104
 
93
105
  # Credential sources: inherited environment over the managed
94
106
  # `$DSH_HOME/.credentials.yaml`, with project and user `.env` fallbacks.
95
107
  # Adapters resolve references per request; the Models page writes only the
96
108
  # managed document, which is never materialized into the process environment.
109
+ - id: authorization
110
+ name: '@deepseek-ai/dsh-authorization'
111
+
112
+ - id: deepseek-account
113
+ name: '@deepseek-ai/dsh-deepseek-account-platform'
114
+ config:
115
+ desktopPlatform: !!js "ctx.get('profileContext')?.name === 'desktop' && ['darwin', 'win32'].includes(process.platform) ? process.platform : null"
116
+
97
117
  - id: credentials
98
118
  name: '@toddzheng024/dscode-bundle/credentials'
99
119
 
@@ -366,8 +386,11 @@
366
386
  toolName: subagent_fork
367
387
  backgroundMode: one-shot
368
388
 
369
- - id: workflow-worker-thread
370
- name: '@deepseek-ai/dsh-workflow-worker-thread'
389
+ - id: ptc-runtime
390
+ name: '@deepseek-ai/dsh-ptc-runtime-node'
391
+
392
+ - id: workflow-ptc
393
+ name: '@deepseek-ai/dsh-workflow-ptc'
371
394
  config:
372
395
  provider: spawn
373
396
 
@@ -383,7 +406,7 @@
383
406
  - id: spill-policy
384
407
  name: '@deepseek-ai/dsh-spill-policy'
385
408
  config:
386
- maxInlineBytes: 50000
409
+ maxInlineTokens: 12500
387
410
 
388
411
  # Durability checkpoints before each model request and top-level dispatch.
389
412
  - id: session-checkpoint-policy
@@ -398,6 +421,11 @@
398
421
  headChars: 4096
399
422
  tailChars: 1024
400
423
 
424
+ # When an image-capable route rejects a request as over its image budget,
425
+ # replace the oldest images with placeholders on the surface and retry.
426
+ - id: image-offload
427
+ name: '@deepseek-ai/dsh-compaction-image-offload'
428
+
401
429
  - id: tool-todo
402
430
  name: '@deepseek-ai/dsh-tool-todo'
403
431
  config:
@@ -408,9 +436,16 @@
408
436
  - id: tool-goal
409
437
  name: '@deepseek-ai/dsh-tool-goal'
410
438
 
411
- # Fresh-agent Ralph iteration over a build-time-fixed script.
439
+ # Fresh-agent Ralph iteration over a build-time-fixed script. Off by
440
+ # default: the tool description restricts `ralph` to runs the human
441
+ # explicitly asked for, and completion is a worker self-report, not an
442
+ # independent evaluation. An overlay row restores it for a base-backed
443
+ # profile (`$DSH_HOME/cordis.patch.yml`, or a `--patch <file>`):
444
+ # - id: tool-ralph
445
+ # disabled: false
412
446
  - id: tool-ralph
413
447
  name: '@deepseek-ai/dsh-tool-ralph'
448
+ disabled: true
414
449
  config:
415
450
  subagentProvider: spawn
416
451
  maxRounds: 64
@@ -427,7 +462,7 @@
427
462
  # preset; products with a stricter network policy override tool-web. DeepSeek
428
463
  # search resolves the same DEEPSEEK_API_KEY
429
464
  # credential the Models page manages for chat, at each search; its Messages
430
- # endpoint is separate from the chat-completions endpoint, so it takes its own
465
+ # endpoint is configured independently from the model route, so it takes its own
431
466
  # base-URL override. Anonymous fetch accepts only public HTTP(S) destinations,
432
467
  # resolves and validates every destination, and pins every actual connection.
433
468
  # Search is a full auxiliary model request with server-side retrieval, so this
@@ -453,6 +488,9 @@
453
488
  fetch: true
454
489
  searchTimeoutMs: 60000
455
490
 
491
+ - id: mcp-resources
492
+ name: '@deepseek-ai/dsh-mcp-resources'
493
+
456
494
  # ── rows every mode mounts, whose values each overlay may state ──────────────
457
495
 
458
496
  # The tool registry. Presentation mode is a deployment choice; omitting it here
@@ -600,9 +638,10 @@
600
638
  # preset became a single-tool composition), so this patch no longer lists it.
601
639
 
602
640
  - insert:
603
- # Code Mode is a core execution capability, not a Web component.
604
- - id: code-runtime
605
- name: '@deepseek-ai/dsh-code-runtime-worker-thread'
641
+ # Code Mode is a core execution capability, not a Web component. DSH 0.1.7
642
+ # renamed the worker-thread runtime to the Node PTC runtime.
643
+ - id: ptc-runtime
644
+ name: '@deepseek-ai/dsh-ptc-runtime-node'
606
645
 
607
646
  # Cross-session @mentions: bounded read-only snapshots of other sessions
608
647
  # as sourced model context. Opt-in upstream; the TUI's completion menu
@@ -617,12 +656,15 @@
617
656
  - id: file-reference-local
618
657
  name: '@deepseek-ai/dsh-file-reference-local'
619
658
 
620
- # The launcher supplies the shipped preset root beside its own config and
621
- # the service also discovers the user's local preset root.
622
- - id: agent-presets
623
- name: '@deepseek-ai/dsh-agent-presets'
659
+ # Preset selection. DSH 0.1.7 split the old `agent-presets` service into this
660
+ # registry plus one `@deepseek-ai/dsh-agent-preset` row per preset, and dropped
661
+ # discovery from directories: the shipped rows live in the `dsh-web-app` bundle
662
+ # this profile does not carry, so the DSCODE declaration in the profile patch is
663
+ # the roster, and that patch also names it the deployment default.
664
+ - id: agent-preset-registry
665
+ name: '@deepseek-ai/dsh-agent-preset-registry'
624
666
  config:
625
- default: standard
667
+ default: dscode
626
668
 
627
669
  # Cordis self-inspection (the shipped `cordis` agent preset's toolset):
628
670
  # the host runner publishes the `dynamicCordisRunner`/`cordisInspect`
@@ -745,11 +787,9 @@
745
787
  config:
746
788
  startup: !!js ctx.tuiStartup.startup
747
789
 
748
- # Host/profile overlay. The upstream standard Agent Preset supplies coding,
749
- # skills, planning, compaction and native subagents in their correct scopes.
750
- - id: agent-presets
751
- config:
752
- default: standard
790
+ # Host/profile overlay. The DSCODE Agent Preset declaration at the end of the
791
+ # profile patch supplies coding, skills, planning, compaction and native
792
+ # subagents in their correct scopes, and names itself the registry default.
753
793
 
754
794
  - id: sandbox-policy
755
795
  config:
@@ -782,24 +822,17 @@
782
822
  maxOutputTokens: 1024
783
823
  timeoutMs: 60000
784
824
 
785
- - id: computer-use
786
- config:
787
- observationTtlMs: 30000
788
- allowAllApps: false
789
- interaction:
790
- focusPolicy: preserve
791
- keyboardPolicy: activate
792
- pointerInputPolicy: targeted
793
- cursorVisualization: visible
794
-
795
825
  # Chrome MCP belongs to the DSCODE agent preset. A fresh, prompt-free TUI
796
826
  # launch can render before composing an agent or connecting the browser server.
797
827
 
828
+ # DSH 0.1.7 reserved the name `auto` for its own Auto integration (full access with
829
+ # approval off), so DSCODE's reviewed preset — workspace writes with every eligible
830
+ # approval request reviewed by a model, human fallback intact — is named `auto-review`.
798
831
  - id: permission
799
832
  config:
800
- defaultPreset: auto
833
+ defaultPreset: auto-review
801
834
  presets:
802
- auto:
835
+ auto-review:
803
836
  sandbox: workspace-write
804
837
  approval: ask
805
838
  name: Auto review
@@ -821,6 +854,8 @@
821
854
 
822
855
  - id: credentials
823
856
  disabled: true
857
+ - id: computer-use
858
+ disabled: true
824
859
  - insert:
825
860
  - id: dscode-credentials
826
861
  name: "@toddzheng024/dscode-bundle/credentials"
@@ -852,21 +887,359 @@
852
887
  name: "@toddzheng024/dscode-bundle/email-tools"
853
888
  - id: dscode-triggers
854
889
  name: "@toddzheng024/dscode-bundle/triggers"
890
+ - id: dscode-computer-use
891
+ name: "@toddzheng024/dscode-bundle/computer-use"
892
+ config:
893
+ observationTtlMs: 30000
894
+ allowAllApps: false
895
+ interaction:
896
+ focusPolicy: preserve
897
+ keyboardPolicy: activate
898
+ pointerInputPolicy: targeted
899
+ cursorVisualization: visible
855
900
  - id: dscode-hooks
856
901
  name: "@deepseek-ai/dsh-hooks-codex"
857
- inject: &a1
902
+ inject:
858
903
  - dscodePaths
859
904
  config:
860
905
  configPath: !!js ctx.dscodePaths.hooks
861
906
  defaultTimeoutMs: 10000
862
907
  stderrSummaryMaxChars: 500
863
- - id: agent-presets
864
- inject: *a1
908
+ - id: agent-preset-registry
865
909
  config:
866
910
  default: dscode
867
- roots:
868
- - path: !!js ctx.dscodePaths.presets
869
- trust: system
911
+
912
+ # The DSCODE preset: one `@deepseek-ai/dsh-agent-preset` declaration carrying the
913
+ # agent-plane composition of `presets/dscode/agent.cordis.yml`.
914
+ - insert:
915
+ - id: preset-dscode
916
+ name: '@deepseek-ai/dsh-agent-preset'
917
+ config:
918
+ id: dscode
919
+ name: "DSCODE"
920
+ description: "持久 Shell 编码环境,保留 Skills、压缩、目标、子代理与工作流。"
921
+ order: 0
922
+ plugins:
923
+ # The `dscode` agent preset: the full coding agent, mounted once per process.
924
+ #
925
+ # This file is an AGENT-PLANE composition. The roster mounts it ONCE under a
926
+ # standing scope; every session naming it joins by scope parentage, so the
927
+ # tools and prompt sections registered here cover each joined agent while a
928
+ # session's own state stays keyed per Session/Agent inside the plugins. The
929
+ # host composition (`base.cordis.yml` + `web.cordis.yml`) keeps everything a
930
+ # preset must not own: the registries themselves, the sandbox and approval
931
+ # stack, persistence, and the model route.
932
+ #
933
+ # A service row here MUST sit inside a group carrying an `isolate` realm.
934
+ # Without one it publishes into the root realm, where it is process-global —
935
+ # another preset publishing the same name collides, and a host reader would
936
+ # resolve one preset's instance for every session; the preset registry rejects
937
+ # that at mount. `true` means an entry-local realm: this standing mount's own
938
+ # private instance, apart from every other preset's. (A shared label does NOT
939
+ # pool instances — `provide()` throws on the second registration under the
940
+ # same realm symbol; labels join REALMS, and are not what this file needs.)
941
+
942
+ # ── identity ────────────────────────────────────────────────────────────────
943
+
944
+ # The preset's own persona, shadowing the deployment default for this agent.
945
+ # `{{model}}` and `{{cwd}}` resolve from the agent's own route and workspace.
946
+ - id: persona
947
+ name: '@deepseek-ai/dsh-persona'
948
+ config:
949
+ suffix: Your working directory is {{cwd}}.
950
+ prefix: >-
951
+ You are a coding agent powered by the {{model}} model, working through a persistent shell.
952
+ Reply in the language the user writes in.
953
+ 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.
954
+ Before the first tool call, briefly state what you will check or change; for a simple answer without tools, answer directly.
955
+ 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.
956
+ 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.
957
+ Before changing code, read the relevant code and any project instructions; reuse existing functions and patterns instead of adding new machinery.
958
+ Make routine judgment calls yourself and ask only when different answers would lead to materially different work.
959
+ Deliver the whole requested scope; if part of it is blocked, finish the rest and say what was left out and why.
960
+ 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.
961
+ 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.
962
+ Once the requested behavior and required checks pass, move to delivery. Do not turn a finished task into optional optimization, refactoring or speculative hardening.
963
+ 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.
964
+ 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.
965
+ 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.
966
+ 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.
967
+ Keep the final reply concise, lead with the outcome, and never claim work you did not do.
968
+
969
+ - id: agent-instructions
970
+ name: '@deepseek-ai/dsh-agent-instructions'
971
+ config:
972
+ # The launcher folds AGENTS.md/CLAUDE.md from directories above the project
973
+ # root, up to home, in front of the user-global file; without those files it
974
+ # points at $DSH_HOME, exactly as before.
975
+ dshHome: !!js 'process.env.DSCODE_INSTRUCTION_HOME'
976
+ maxBytes: 65536
977
+
978
+ - id: persistent-shell
979
+ name: cordis:group
980
+ group: true
981
+ isolate:
982
+ terminals: true
983
+ config:
984
+ - id: pty
985
+ name: '@deepseek-ai/dsh-terminal'
986
+
987
+ - id: terminal-bash
988
+ name: '@toddzheng024/dscode-bundle/terminal'
989
+ disabled: !!js process.platform === 'win32'
990
+ config:
991
+ timeoutMs: 300000
992
+
993
+ - id: persistent-bash
994
+ name: '@toddzheng024/dscode-bundle/persistent'
995
+ disabled: !!js process.platform === 'win32'
996
+ config:
997
+ timeoutMs: 300000
998
+ description: |-
999
+ Run commands in a bash shell
1000
+ * When invoking this tool, the contents of the "command" parameter does NOT need to be XML-escaped.
1001
+ * Network access depends on the task environment. Prefer configured mirrors/proxies when they are available.
1002
+ * State is persistent across command calls and discussions with the user.
1003
+ * To inspect a particular line range of a file, e.g. lines 10-25, try 'sed -n 10,25p /path/to/the/file'.
1004
+ * Please avoid commands that may produce a very large amount of output.
1005
+ * Please run long lived commands in the background, e.g. 'sleep 10 &' or start a server in the background.
1006
+
1007
+ - id: terminal-pwsh
1008
+ name: '@toddzheng024/dscode-bundle/terminal'
1009
+ disabled: !!js process.platform !== 'win32'
1010
+ config:
1011
+ shellDialect: pwsh
1012
+ timeoutMs: 300000
1013
+
1014
+ - id: persistent-pwsh
1015
+ name: '@deepseek-ai/dsh-tool-pwsh-persistent'
1016
+ disabled: !!js process.platform !== 'win32'
1017
+ config:
1018
+ timeoutMs: 300000
1019
+ description: |-
1020
+ Run commands in a PowerShell shell
1021
+ * When invoking this tool, the contents of the "command" parameter does NOT need to be XML-escaped.
1022
+ * You don't have access to the internet via this tool.
1023
+ * State is persistent across command calls and discussions with the user.
1024
+ * Use native Windows paths (C:\...) and $env:NAME variables; this is PowerShell, not bash.
1025
+ * Please avoid commands that may produce a very large amount of output.
1026
+ * Please run long lived commands in the background, e.g. 'Start-Job' or start a server with Start-Process.
1027
+
1028
+ - id: dscode-policy
1029
+ name: '@toddzheng024/dscode-bundle/policy'
1030
+
1031
+ # A fresh shell for reviewed escalation. It does not inherit PTY state.
1032
+ - id: shell-retry
1033
+ name: '@toddzheng024/dscode-bundle/bash'
1034
+ config:
1035
+ toolName: shell_retry
1036
+
1037
+
1038
+ # ── background jobs ────────────────────────────────────────────────────────
1039
+
1040
+ # Only the model-facing controls. The task REGISTRY stays on the host plane:
1041
+ # its producers sit outside any realm this file could put it in — `tool-bash`
1042
+ # above resolves it with `ctx.get`, and an entry-local realm here is invisible
1043
+ # to every sibling row, so `run_in_background` would answer "background jobs
1044
+ # unavailable" while these controls sat in the catalog. The registry is keyed by
1045
+ # owning agent anyway, so one host instance serves every session. What a preset
1046
+ # chooses is whether its agent can collect and stop background work at all.
1047
+ - id: tool-jobs
1048
+ name: '@deepseek-ai/dsh-tool-jobs'
1049
+
1050
+ # ── skills ──────────────────────────────────────────────────────────────────
1051
+
1052
+ # The skill REGISTRY lives in the host composition and is layered per scope:
1053
+ # these rows register into THIS preset's layer of it, so they need no realm.
1054
+ # `skill-filesystem` contributes local-root discovery for agents on this preset, and
1055
+ # `tool-skill` gives them the catalog and loader; the merged catalog also
1056
+ # carries whatever the deployment registered globally (repository plugins).
1057
+ - id: skill-filesystem
1058
+ name: '@deepseek-ai/dsh-skill-filesystem'
1059
+ config:
1060
+ # Ancestor skill discovery is on by default: the skill roots of directories
1061
+ # between the working directory and home register at rank 300, nearest first,
1062
+ # so headers enter the catalog and bodies stay lazy. =0 turns it off.
1063
+ customSkillDirs: !!js 'JSON.parse(process.env.DSCODE_SKILL_ANCESTOR_DIRS ?? "[]")'
1064
+
1065
+ - id: tool-skill
1066
+ name: '@deepseek-ai/dsh-tool-skill'
1067
+
1068
+ # ── goals ───────────────────────────────────────────────────────────────────
1069
+
1070
+ # The goal service and session driver stay on the host plane, where the Gateway
1071
+ # can resolve them. The human command and model-facing tool register into this
1072
+ # preset's scoped layers.
1073
+ - id: command-goal
1074
+ name: '@toddzheng024/dscode-bundle/command-goal'
1075
+
1076
+ - id: tool-goal
1077
+ name: '@deepseek-ai/dsh-tool-goal'
1078
+
1079
+ # ── plan mode ───────────────────────────────────────────────────────────────
1080
+
1081
+ # Plan state is per-agent by nature, so an entry-local realm is not a
1082
+ # workaround here — it is the correct lifetime.
1083
+ - id: planning
1084
+ name: cordis:group
1085
+ group: true
1086
+ isolate:
1087
+ planMode: true
1088
+ config:
1089
+ - id: plan-mode
1090
+ name: '@deepseek-ai/dsh-plan-mode'
1091
+ config:
1092
+ section: |
1093
+ 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.
1094
+
1095
+ 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.
1096
+
1097
+ 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.
1098
+
1099
+ 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.
1100
+
1101
+ 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.
1102
+
1103
+ 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.
1104
+
1105
+ # ── compaction ──────────────────────────────────────────────────────────────
1106
+
1107
+ # `compaction-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
1108
+ # share this realm rather than sit outside it.
1109
+ #
1110
+ # `tokenMeter` is deliberately NOT in this realm: the meter stays on the HOST
1111
+ # plane, and the rows here resolve that one instance. It takes no configuration,
1112
+ # keys every fold by Session, and owns the context-meter projection units the
1113
+ # browser reads for every session — behind a realm those units would come and go
1114
+ # with whichever presets happen to be mounted. What a preset chooses is whether
1115
+ # its agent compacts at all, which is `compaction-basic` below.
1116
+ - id: compaction
1117
+ name: cordis:group
1118
+ group: true
1119
+ isolate:
1120
+ compaction: true
1121
+ toolResultPruner: true
1122
+ config:
1123
+ - id: compaction-basic
1124
+ name: '@toddzheng024/dscode-bundle/compaction'
1125
+
1126
+ - id: command-compact
1127
+ name: '@deepseek-ai/dsh-command-compact'
1128
+
1129
+ - id: tool-result-pruner
1130
+ name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
1131
+ config:
1132
+ thresholdChars: 8192
1133
+ headChars: 4096
1134
+ tailChars: 1024
1135
+
1136
+ # ── delegation and workflows ────────────────────────────────────────────────
1137
+
1138
+ # The `subagents` registry and its spawn/fork backends live in the HOST
1139
+ # composition: the registry is a process singleton whose cross-session queries
1140
+ # the api-proxy serves to the browser, and a provider name may only be
1141
+ # registered once. This preset contributes the delegation TOOLS, which resolve
1142
+ # that host registry.
1143
+ #
1144
+ # `workflows` is different — nothing outside an agent reads it — so every row
1145
+ # that reaches it shares one entry-local realm here, and a consumer left
1146
+ # outside would resolve a host registry this preset does not populate.
1147
+ - id: delegation
1148
+ name: cordis:group
1149
+ group: true
1150
+ isolate:
1151
+ workflowEngine: true
1152
+ config:
1153
+ - id: tool-subagent-control
1154
+ name: '@deepseek-ai/dsh-tool-subagent-control'
1155
+
1156
+ - id: tool-subagent-list-agents
1157
+ name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
1158
+
1159
+ - id: tool-subagent
1160
+ name: '@toddzheng024/dscode-bundle/subagent'
1161
+ config:
1162
+ provider: spawn
1163
+ toolName: subagent
1164
+ modelSelectionSettings: true
1165
+ backgroundMode: continuable
1166
+ maxDepth: 1
1167
+
1168
+ # Fork omits model selection so provider/model stay equal to the parent and
1169
+ # the inherited history remains eligible for KV Cache reuse. DSCODE exposes
1170
+ # reasoning_effort independently; changing effort does not select a new route.
1171
+ # This preset
1172
+ # keeps fork continuable; parent and child inherit the same messaging tool,
1173
+ # while the parent id and return guidance follow the inherited history.
1174
+ - id: tool-subagent-fork
1175
+ name: '@toddzheng024/dscode-bundle/subagent'
1176
+ config:
1177
+ provider: fork
1178
+ toolName: subagent_fork
1179
+ backgroundMode: continuable
1180
+ maxDepth: 1
1181
+
1182
+ # Production dsh does not install these optional providers. Install the
1183
+ # matching Bundle in this Profile and restart the Host, then copy this
1184
+ # preset and remove `disabled` from the matching tool row. Host availability
1185
+ # alone grants no tool.
1186
+ - id: tool-subagent-codex
1187
+ name: '@toddzheng024/dscode-bundle/subagent'
1188
+ disabled: true
1189
+ config:
1190
+ provider: codex
1191
+ toolName: subagent_codex
1192
+ backgroundMode: one-shot
1193
+ maxDepth: provider-managed
1194
+
1195
+ - id: tool-subagent-claude-code
1196
+ name: '@toddzheng024/dscode-bundle/subagent'
1197
+ disabled: true
1198
+ config:
1199
+ provider: claude-code
1200
+ toolName: subagent_claude_code
1201
+ backgroundMode: one-shot
1202
+ maxDepth: provider-managed
1203
+
1204
+ - id: workflow-ptc
1205
+ name: '@deepseek-ai/dsh-workflow-ptc'
1206
+ config:
1207
+ provider: spawn
1208
+
1209
+ - id: tool-workflow
1210
+ name: '@deepseek-ai/dsh-tool-workflow'
1211
+ disabled: true
1212
+
1213
+ - id: tool-ralph
1214
+ name: '@deepseek-ai/dsh-tool-ralph'
1215
+ disabled: true
1216
+ config:
1217
+ subagentProvider: spawn
1218
+ maxRounds: 64
1219
+
1220
+ # ── remaining model-facing rows ─────────────────────────────────────────────
1221
+
1222
+ - id: tool-ask-user
1223
+ name: '@deepseek-ai/dsh-tool-ask-user'
1224
+
1225
+ - id: tool-todo
1226
+ name: '@deepseek-ai/dsh-tool-todo'
1227
+ config:
1228
+ allowParallelInProgress: true
1229
+
1230
+ # The `web` service and its search provider stay in the host composition; only
1231
+ # the model-facing tool is per-session.
1232
+ - id: tool-web
1233
+ name: '@deepseek-ai/dsh-tool-web'
1234
+ config:
1235
+ fetch: true
1236
+ searchTimeoutMs: 60000
1237
+
1238
+ - id: code-review
1239
+ name: '@toddzheng024/dscode-bundle/code-review'
1240
+
1241
+ - id: present
1242
+ name: '@deepseek-ai/dsh-tool-present'
870
1243
 
871
1244
  - id: llm-deepseek
872
1245
  disabled: true