@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
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
@@ -583,7 +621,11 @@
583
621
  disabled: true
584
622
  - id: tool-subagent-fork
585
623
  disabled: true
586
- - id: workflow-worker-thread
624
+ # The workflow engine is preset-owned: DSCODE's delegation group mounts it inside an
625
+ # entry-local `workflowEngine` realm, so the host row stays off. DSH 0.1.7 renamed this
626
+ # row from `workflow-worker-thread`, and a patch addresses rows by id — an id that no
627
+ # longer exists silently patches nothing, which is how the host engine came back.
628
+ - id: workflow-ptc
587
629
  disabled: true
588
630
  - id: tool-workflow
589
631
  disabled: true
@@ -600,9 +642,18 @@
600
642
  # preset became a single-tool composition), so this patch no longer lists it.
601
643
 
602
644
  - 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'
645
+ # The account login's browser callback: `deepseekAccount` registers /oauth/callback on
646
+ # `ctx.webServer` for the lifetime of one attempt, so the terminal needs an HTTP
647
+ # transport of its own. Loopback only and an OS-assigned port, and no route exists
648
+ # until a login runs — the provider's route is the only one this profile registers,
649
+ # because the Web shell's frontend and API rows stay in the web-app bundle.
650
+ # `DSCODE_ACCOUNT_LOGIN=0` removes the listener, and `/account` then says why.
651
+ - id: webserver
652
+ name: '@deepseek-ai/dsh-host-webserver'
653
+ disabled: !!js process.env.DSCODE_ACCOUNT_LOGIN === '0'
654
+ config:
655
+ host: 127.0.0.1
656
+ port: 0
606
657
 
607
658
  # Cross-session @mentions: bounded read-only snapshots of other sessions
608
659
  # as sourced model context. Opt-in upstream; the TUI's completion menu
@@ -617,12 +668,15 @@
617
668
  - id: file-reference-local
618
669
  name: '@deepseek-ai/dsh-file-reference-local'
619
670
 
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'
671
+ # Preset selection. DSH 0.1.7 split the old `agent-presets` service into this
672
+ # registry plus one `@deepseek-ai/dsh-agent-preset` row per preset, and dropped
673
+ # discovery from directories: the shipped rows live in the `dsh-web-app` bundle
674
+ # this profile does not carry, so the DSCODE declaration in the profile patch is
675
+ # the roster, and that patch also names it the deployment default.
676
+ - id: agent-preset-registry
677
+ name: '@deepseek-ai/dsh-agent-preset-registry'
624
678
  config:
625
- default: standard
679
+ default: dscode
626
680
 
627
681
  # Cordis self-inspection (the shipped `cordis` agent preset's toolset):
628
682
  # the host runner publishes the `dynamicCordisRunner`/`cordisInspect`
@@ -745,11 +799,9 @@
745
799
  config:
746
800
  startup: !!js ctx.tuiStartup.startup
747
801
 
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
802
+ # Host/profile overlay. The DSCODE Agent Preset declaration at the end of the
803
+ # profile patch supplies coding, skills, planning, compaction and native
804
+ # subagents in their correct scopes, and names itself the registry default.
753
805
 
754
806
  - id: sandbox-policy
755
807
  config:
@@ -782,24 +834,17 @@
782
834
  maxOutputTokens: 1024
783
835
  timeoutMs: 60000
784
836
 
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
837
  # Chrome MCP belongs to the DSCODE agent preset. A fresh, prompt-free TUI
796
838
  # launch can render before composing an agent or connecting the browser server.
797
839
 
840
+ # DSH 0.1.7 reserved the name `auto` for its own Auto integration (full access with
841
+ # approval off), so DSCODE's reviewed preset — workspace writes with every eligible
842
+ # approval request reviewed by a model, human fallback intact — is named `auto-review`.
798
843
  - id: permission
799
844
  config:
800
- defaultPreset: auto
845
+ defaultPreset: auto-review
801
846
  presets:
802
- auto:
847
+ auto-review:
803
848
  sandbox: workspace-write
804
849
  approval: ask
805
850
  name: Auto review
@@ -821,6 +866,8 @@
821
866
 
822
867
  - id: credentials
823
868
  disabled: true
869
+ - id: computer-use
870
+ disabled: true
824
871
  - insert:
825
872
  - id: dscode-credentials
826
873
  name: "@toddzheng024/dscode-bundle/credentials"
@@ -852,21 +899,361 @@
852
899
  name: "@toddzheng024/dscode-bundle/email-tools"
853
900
  - id: dscode-triggers
854
901
  name: "@toddzheng024/dscode-bundle/triggers"
902
+ - id: dscode-computer-use
903
+ name: "@toddzheng024/dscode-bundle/computer-use"
904
+ config:
905
+ observationTtlMs: 30000
906
+ allowAllApps: false
907
+ interaction:
908
+ focusPolicy: preserve
909
+ keyboardPolicy: activate
910
+ pointerInputPolicy: targeted
911
+ cursorVisualization: visible
912
+ - id: dscode-account
913
+ name: "@toddzheng024/dscode-bundle/account"
855
914
  - id: dscode-hooks
856
915
  name: "@deepseek-ai/dsh-hooks-codex"
857
- inject: &a1
916
+ inject:
858
917
  - dscodePaths
859
918
  config:
860
919
  configPath: !!js ctx.dscodePaths.hooks
861
920
  defaultTimeoutMs: 10000
862
921
  stderrSummaryMaxChars: 500
863
- - id: agent-presets
864
- inject: *a1
922
+ - id: agent-preset-registry
865
923
  config:
866
924
  default: dscode
867
- roots:
868
- - path: !!js ctx.dscodePaths.presets
869
- trust: system
925
+
926
+ # The DSCODE preset: one `@deepseek-ai/dsh-agent-preset` declaration carrying the
927
+ # agent-plane composition of `presets/dscode/agent.cordis.yml`.
928
+ - insert:
929
+ - id: preset-dscode
930
+ name: '@deepseek-ai/dsh-agent-preset'
931
+ config:
932
+ id: dscode
933
+ name: "DSCODE"
934
+ description: "持久 Shell 编码环境,保留 Skills、压缩、目标、子代理与工作流。"
935
+ order: 0
936
+ plugins:
937
+ # The `dscode` agent preset: the full coding agent, mounted once per process.
938
+ #
939
+ # This file is an AGENT-PLANE composition. The roster mounts it ONCE under a
940
+ # standing scope; every session naming it joins by scope parentage, so the
941
+ # tools and prompt sections registered here cover each joined agent while a
942
+ # session's own state stays keyed per Session/Agent inside the plugins. The
943
+ # host composition (`base.cordis.yml` + `web.cordis.yml`) keeps everything a
944
+ # preset must not own: the registries themselves, the sandbox and approval
945
+ # stack, persistence, and the model route.
946
+ #
947
+ # A service row here MUST sit inside a group carrying an `isolate` realm.
948
+ # Without one it publishes into the root realm, where it is process-global —
949
+ # another preset publishing the same name collides, and a host reader would
950
+ # resolve one preset's instance for every session; the preset registry rejects
951
+ # that at mount. `true` means an entry-local realm: this standing mount's own
952
+ # private instance, apart from every other preset's. (A shared label does NOT
953
+ # pool instances — `provide()` throws on the second registration under the
954
+ # same realm symbol; labels join REALMS, and are not what this file needs.)
955
+
956
+ # ── identity ────────────────────────────────────────────────────────────────
957
+
958
+ # The preset's own persona, shadowing the deployment default for this agent.
959
+ # `{{model}}` and `{{cwd}}` resolve from the agent's own route and workspace.
960
+ - id: persona
961
+ name: '@deepseek-ai/dsh-persona'
962
+ config:
963
+ suffix: Your working directory is {{cwd}}.
964
+ prefix: >-
965
+ You are a coding agent powered by the {{model}} model, working through a persistent shell.
966
+ Reply in the language the user writes in.
967
+ 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.
968
+ Before the first tool call, briefly state what you will check or change; for a simple answer without tools, answer directly.
969
+ 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.
970
+ 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.
971
+ Before changing code, read the relevant code and any project instructions; reuse existing functions and patterns instead of adding new machinery.
972
+ Make routine judgment calls yourself and ask only when different answers would lead to materially different work.
973
+ Deliver the whole requested scope; if part of it is blocked, finish the rest and say what was left out and why.
974
+ 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.
975
+ 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.
976
+ Once the requested behavior and required checks pass, move to delivery. Do not turn a finished task into optional optimization, refactoring or speculative hardening.
977
+ 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.
978
+ 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.
979
+ 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.
980
+ 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.
981
+ Keep the final reply concise, lead with the outcome, and never claim work you did not do.
982
+
983
+ - id: agent-instructions
984
+ name: '@deepseek-ai/dsh-agent-instructions'
985
+ config:
986
+ # The launcher folds AGENTS.md/CLAUDE.md from directories above the project
987
+ # root, up to home, in front of the user-global file; without those files it
988
+ # points at $DSH_HOME, exactly as before.
989
+ dshHome: !!js 'process.env.DSCODE_INSTRUCTION_HOME'
990
+ maxBytes: 65536
991
+
992
+ - id: persistent-shell
993
+ name: cordis:group
994
+ group: true
995
+ isolate:
996
+ terminals: true
997
+ config:
998
+ - id: pty
999
+ name: '@deepseek-ai/dsh-terminal'
1000
+
1001
+ - id: terminal-bash
1002
+ name: '@toddzheng024/dscode-bundle/terminal'
1003
+ disabled: !!js process.platform === 'win32'
1004
+ config:
1005
+ timeoutMs: 300000
1006
+
1007
+ - id: persistent-bash
1008
+ name: '@toddzheng024/dscode-bundle/persistent'
1009
+ disabled: !!js process.platform === 'win32'
1010
+ config:
1011
+ timeoutMs: 300000
1012
+ description: |-
1013
+ Run commands in a bash shell
1014
+ * When invoking this tool, the contents of the "command" parameter does NOT need to be XML-escaped.
1015
+ * Network access depends on the task environment. Prefer configured mirrors/proxies when they are available.
1016
+ * State is persistent across command calls and discussions with the user.
1017
+ * To inspect a particular line range of a file, e.g. lines 10-25, try 'sed -n 10,25p /path/to/the/file'.
1018
+ * Please avoid commands that may produce a very large amount of output.
1019
+ * Please run long lived commands in the background, e.g. 'sleep 10 &' or start a server in the background.
1020
+
1021
+ - id: terminal-pwsh
1022
+ name: '@toddzheng024/dscode-bundle/terminal'
1023
+ disabled: !!js process.platform !== 'win32'
1024
+ config:
1025
+ shellDialect: pwsh
1026
+ timeoutMs: 300000
1027
+
1028
+ - id: persistent-pwsh
1029
+ name: '@deepseek-ai/dsh-tool-pwsh-persistent'
1030
+ disabled: !!js process.platform !== 'win32'
1031
+ config:
1032
+ timeoutMs: 300000
1033
+ description: |-
1034
+ Run commands in a PowerShell shell
1035
+ * When invoking this tool, the contents of the "command" parameter does NOT need to be XML-escaped.
1036
+ * You don't have access to the internet via this tool.
1037
+ * State is persistent across command calls and discussions with the user.
1038
+ * Use native Windows paths (C:\...) and $env:NAME variables; this is PowerShell, not bash.
1039
+ * Please avoid commands that may produce a very large amount of output.
1040
+ * Please run long lived commands in the background, e.g. 'Start-Job' or start a server with Start-Process.
1041
+
1042
+ - id: dscode-policy
1043
+ name: '@toddzheng024/dscode-bundle/policy'
1044
+
1045
+ # A fresh shell for reviewed escalation. It does not inherit PTY state.
1046
+ - id: shell-retry
1047
+ name: '@toddzheng024/dscode-bundle/bash'
1048
+ config:
1049
+ toolName: shell_retry
1050
+
1051
+
1052
+ # ── background jobs ────────────────────────────────────────────────────────
1053
+
1054
+ # Only the model-facing controls. The task REGISTRY stays on the host plane:
1055
+ # its producers sit outside any realm this file could put it in — `tool-bash`
1056
+ # above resolves it with `ctx.get`, and an entry-local realm here is invisible
1057
+ # to every sibling row, so `run_in_background` would answer "background jobs
1058
+ # unavailable" while these controls sat in the catalog. The registry is keyed by
1059
+ # owning agent anyway, so one host instance serves every session. What a preset
1060
+ # chooses is whether its agent can collect and stop background work at all.
1061
+ - id: tool-jobs
1062
+ name: '@deepseek-ai/dsh-tool-jobs'
1063
+
1064
+ # ── skills ──────────────────────────────────────────────────────────────────
1065
+
1066
+ # The skill REGISTRY lives in the host composition and is layered per scope:
1067
+ # these rows register into THIS preset's layer of it, so they need no realm.
1068
+ # `skill-filesystem` contributes local-root discovery for agents on this preset, and
1069
+ # `tool-skill` gives them the catalog and loader; the merged catalog also
1070
+ # carries whatever the deployment registered globally (repository plugins).
1071
+ - id: skill-filesystem
1072
+ name: '@deepseek-ai/dsh-skill-filesystem'
1073
+ config:
1074
+ # Ancestor skill discovery is on by default: the skill roots of directories
1075
+ # between the working directory and home register at rank 300, nearest first,
1076
+ # so headers enter the catalog and bodies stay lazy. =0 turns it off.
1077
+ customSkillDirs: !!js 'JSON.parse(process.env.DSCODE_SKILL_ANCESTOR_DIRS ?? "[]")'
1078
+
1079
+ - id: tool-skill
1080
+ name: '@deepseek-ai/dsh-tool-skill'
1081
+
1082
+ # ── goals ───────────────────────────────────────────────────────────────────
1083
+
1084
+ # The goal service and session driver stay on the host plane, where the Gateway
1085
+ # can resolve them. The human command and model-facing tool register into this
1086
+ # preset's scoped layers.
1087
+ - id: command-goal
1088
+ name: '@toddzheng024/dscode-bundle/command-goal'
1089
+
1090
+ - id: tool-goal
1091
+ name: '@deepseek-ai/dsh-tool-goal'
1092
+
1093
+ # ── plan mode ───────────────────────────────────────────────────────────────
1094
+
1095
+ # Plan state is per-agent by nature, so an entry-local realm is not a
1096
+ # workaround here — it is the correct lifetime.
1097
+ - id: planning
1098
+ name: cordis:group
1099
+ group: true
1100
+ isolate:
1101
+ planMode: true
1102
+ config:
1103
+ - id: plan-mode
1104
+ name: '@deepseek-ai/dsh-plan-mode'
1105
+ config:
1106
+ section: |
1107
+ 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.
1108
+
1109
+ 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.
1110
+
1111
+ 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.
1112
+
1113
+ 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.
1114
+
1115
+ 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.
1116
+
1117
+ 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.
1118
+
1119
+ # ── compaction ──────────────────────────────────────────────────────────────
1120
+
1121
+ # `compaction-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
1122
+ # share this realm rather than sit outside it.
1123
+ #
1124
+ # `tokenMeter` is deliberately NOT in this realm: the meter stays on the HOST
1125
+ # plane, and the rows here resolve that one instance. It takes no configuration,
1126
+ # keys every fold by Session, and owns the context-meter projection units the
1127
+ # browser reads for every session — behind a realm those units would come and go
1128
+ # with whichever presets happen to be mounted. What a preset chooses is whether
1129
+ # its agent compacts at all, which is `compaction-basic` below.
1130
+ - id: compaction
1131
+ name: cordis:group
1132
+ group: true
1133
+ isolate:
1134
+ compaction: true
1135
+ toolResultPruner: true
1136
+ config:
1137
+ - id: compaction-basic
1138
+ name: '@toddzheng024/dscode-bundle/compaction'
1139
+
1140
+ - id: command-compact
1141
+ name: '@deepseek-ai/dsh-command-compact'
1142
+
1143
+ - id: tool-result-pruner
1144
+ name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
1145
+ config:
1146
+ thresholdChars: 8192
1147
+ headChars: 4096
1148
+ tailChars: 1024
1149
+
1150
+ # ── delegation and workflows ────────────────────────────────────────────────
1151
+
1152
+ # The `subagents` registry and its spawn/fork backends live in the HOST
1153
+ # composition: the registry is a process singleton whose cross-session queries
1154
+ # the api-proxy serves to the browser, and a provider name may only be
1155
+ # registered once. This preset contributes the delegation TOOLS, which resolve
1156
+ # that host registry.
1157
+ #
1158
+ # `workflows` is different — nothing outside an agent reads it — so every row
1159
+ # that reaches it shares one entry-local realm here, and a consumer left
1160
+ # outside would resolve a host registry this preset does not populate.
1161
+ - id: delegation
1162
+ name: cordis:group
1163
+ group: true
1164
+ isolate:
1165
+ workflowEngine: true
1166
+ config:
1167
+ - id: tool-subagent-control
1168
+ name: '@deepseek-ai/dsh-tool-subagent-control'
1169
+
1170
+ - id: tool-subagent-list-agents
1171
+ name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
1172
+
1173
+ - id: tool-subagent
1174
+ name: '@toddzheng024/dscode-bundle/subagent'
1175
+ config:
1176
+ provider: spawn
1177
+ toolName: subagent
1178
+ modelSelectionSettings: true
1179
+ backgroundMode: continuable
1180
+ maxDepth: 1
1181
+
1182
+ # Fork omits model selection so provider/model stay equal to the parent and
1183
+ # the inherited history remains eligible for KV Cache reuse. DSCODE exposes
1184
+ # reasoning_effort independently; changing effort does not select a new route.
1185
+ # This preset
1186
+ # keeps fork continuable; parent and child inherit the same messaging tool,
1187
+ # while the parent id and return guidance follow the inherited history.
1188
+ - id: tool-subagent-fork
1189
+ name: '@toddzheng024/dscode-bundle/subagent'
1190
+ config:
1191
+ provider: fork
1192
+ toolName: subagent_fork
1193
+ backgroundMode: continuable
1194
+ maxDepth: 1
1195
+
1196
+ # Production dsh does not install these optional providers. Install the
1197
+ # matching Bundle in this Profile and restart the Host, then copy this
1198
+ # preset and remove `disabled` from the matching tool row. Host availability
1199
+ # alone grants no tool.
1200
+ - id: tool-subagent-codex
1201
+ name: '@toddzheng024/dscode-bundle/subagent'
1202
+ disabled: true
1203
+ config:
1204
+ provider: codex
1205
+ toolName: subagent_codex
1206
+ backgroundMode: one-shot
1207
+ maxDepth: provider-managed
1208
+
1209
+ - id: tool-subagent-claude-code
1210
+ name: '@toddzheng024/dscode-bundle/subagent'
1211
+ disabled: true
1212
+ config:
1213
+ provider: claude-code
1214
+ toolName: subagent_claude_code
1215
+ backgroundMode: one-shot
1216
+ maxDepth: provider-managed
1217
+
1218
+ - id: workflow-ptc
1219
+ name: '@deepseek-ai/dsh-workflow-ptc'
1220
+ config:
1221
+ provider: spawn
1222
+
1223
+ - id: tool-workflow
1224
+ name: '@deepseek-ai/dsh-tool-workflow'
1225
+ disabled: true
1226
+
1227
+ - id: tool-ralph
1228
+ name: '@deepseek-ai/dsh-tool-ralph'
1229
+ disabled: true
1230
+ config:
1231
+ subagentProvider: spawn
1232
+ maxRounds: 64
1233
+
1234
+ # ── remaining model-facing rows ─────────────────────────────────────────────
1235
+
1236
+ - id: tool-ask-user
1237
+ name: '@deepseek-ai/dsh-tool-ask-user'
1238
+
1239
+ - id: tool-todo
1240
+ name: '@deepseek-ai/dsh-tool-todo'
1241
+ config:
1242
+ allowParallelInProgress: true
1243
+
1244
+ # The `web` service and its search provider stay in the host composition; only
1245
+ # the model-facing tool is per-session.
1246
+ - id: tool-web
1247
+ name: '@deepseek-ai/dsh-tool-web'
1248
+ config:
1249
+ fetch: true
1250
+ searchTimeoutMs: 60000
1251
+
1252
+ - id: code-review
1253
+ name: '@toddzheng024/dscode-bundle/code-review'
1254
+
1255
+ - id: present
1256
+ name: '@deepseek-ai/dsh-tool-present'
870
1257
 
871
1258
  - id: llm-deepseek
872
1259
  disabled: true