dsh-plugin-prompt-tool 0.7.2 → 0.8.1

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 (169) hide show
  1. package/README.md +185 -46
  2. package/engine/THIRD_PARTY_LICENSES +25 -0
  3. package/engine/actions.mjs +931 -0
  4. package/engine/anchor-match.mjs +6 -3
  5. package/engine/character-tools.mjs +11 -0
  6. package/engine/classify-task.mjs +18 -0
  7. package/engine/compaction-epoch.mjs +41 -20
  8. package/engine/compositions/library/agent-instructions.yml +9 -0
  9. package/engine/compositions/library/command-goal.yml +2 -6
  10. package/engine/compositions/library/compaction.yml +2 -32
  11. package/engine/compositions/library/delegation-ptc.yml +58 -0
  12. package/engine/compositions/library/delegation.yml +5 -38
  13. package/engine/compositions/library/persistent-shell.yml +4 -13
  14. package/engine/compositions/library/planning.yml +8 -23
  15. package/engine/compositions/library/skill-filesystem-cordis.yml +10 -0
  16. package/engine/compositions/library/skill-filesystem.yml +2 -8
  17. package/engine/compositions/library/tool-ask-user.yml +2 -3
  18. package/engine/compositions/library/tool-bash.yml +4 -12
  19. package/engine/compositions/library/tool-cordis.yml +7 -0
  20. package/engine/compositions/library/tool-fs-search.yml +2 -11
  21. package/engine/compositions/library/tool-fs.yml +2 -5
  22. package/engine/compositions/library/tool-goal.yml +2 -6
  23. package/engine/compositions/library/tool-jobs.yml +2 -18
  24. package/engine/compositions/library/tool-plugin-manager-disabled.yml +8 -0
  25. package/engine/compositions/library/tool-plugin-manager.yml +8 -0
  26. package/engine/compositions/library/tool-present.yml +7 -0
  27. package/engine/compositions/library/tool-presentation.yml +9 -0
  28. package/engine/compositions/library/tool-pwsh.yml +2 -6
  29. package/engine/compositions/library/tool-skill.yml +7 -0
  30. package/engine/compositions/library/tool-todo.yml +2 -4
  31. package/engine/compositions/library/tool-web.yml +2 -1
  32. package/engine/compositions/source/local/character-tools.yml +5 -0
  33. package/engine/compositions/source/local/declared-triggers.yml +12 -0
  34. package/engine/compositions/source/local/filesystem-editor.yml +30 -0
  35. package/engine/compositions/source/local/instruction-hint.yml +15 -0
  36. package/engine/compositions/{library/official-persistent-shell.yml → source/local/persistent-shell-posix.yml} +10 -8
  37. package/engine/compositions/source/local/prompt-config-engine.yml +3 -9
  38. package/engine/compositions/source/local/run-code-env.yml +4 -7
  39. package/engine/compositions/source/local/session-var-tools.yml +5 -0
  40. package/engine/compositions/source/local/skill-search.yml +3 -9
  41. package/engine/compositions/source/local/subagent-tool-policy.yml +21 -0
  42. package/engine/compositions/source/local/tool-bash-disabled.yml +9 -0
  43. package/engine/compositions/source/local/tool-config-engine.yml +8 -0
  44. package/engine/compositions/source/local/tool-git-bash.yml +15 -0
  45. package/engine/compositions/source/local/world-book-tools.yml +5 -0
  46. package/engine/condition.mjs +83 -0
  47. package/engine/declared-triggers.mjs +93 -0
  48. package/engine/executor.mjs +364 -185
  49. package/engine/fields.mjs +219 -0
  50. package/engine/fillers.mjs +12 -141
  51. package/engine/host-package.mjs +51 -0
  52. package/engine/instruction-hint.mjs +285 -0
  53. package/engine/interpolate.mjs +157 -29
  54. package/engine/layers.mjs +495 -75
  55. package/engine/predicates.mjs +753 -0
  56. package/engine/prompt-config-engine.mjs +63 -8
  57. package/engine/run-code-env.mjs +48 -31
  58. package/engine/schema.mjs +444 -103
  59. package/engine/sdk-strip.mjs +365 -0
  60. package/engine/session-var-tools.mjs +11 -0
  61. package/engine/session-vars.mjs +8 -6
  62. package/engine/shared.mjs +137 -0
  63. package/engine/skill-search.mjs +34 -21
  64. package/engine/st-macros.d.mts +22 -0
  65. package/engine/st-macros.mjs +208 -0
  66. package/engine/st-render.mjs +105 -0
  67. package/engine/st-world-book.d.mts +10 -0
  68. package/engine/st-world-book.mjs +259 -0
  69. package/engine/strategies.mjs +31 -20
  70. package/engine/subagent-tool-policy-core.mjs +400 -0
  71. package/engine/subagent-tool-policy.mjs +327 -0
  72. package/engine/tool-config-engine.mjs +207 -145
  73. package/engine/tool-definition.mjs +143 -0
  74. package/engine/{custom-bash.mjs → tool-git-bash.mjs} +38 -13
  75. package/engine/trigger-editor-meta.mjs +48 -0
  76. package/engine/trigger-spec.mjs +257 -0
  77. package/engine/trigger.mjs +304 -0
  78. package/engine/world-book-tools.mjs +11 -0
  79. package/lib/client.js +16495 -5456
  80. package/lib/client.js.map +1 -1
  81. package/lib/index.d.mts +628 -382
  82. package/lib/index.mjs +5391 -2942
  83. package/lib/paths-CY5psBqE.d.mts +1233 -0
  84. package/lib/preset-package-BnJqrU4R.mjs +16792 -0
  85. package/lib/preset-transfer.d.mts +2 -0
  86. package/lib/preset-transfer.mjs +2 -0
  87. package/package.json +91 -49
  88. package/preset/pt-cordis/preset.yml +43 -0
  89. package/preset/pt-cordis/skills/cordis-composition-reference/SKILL.md +29 -0
  90. package/preset/pt-cordis/skills/cordis-composition-reference/references/packages.md +501 -0
  91. package/preset/pt-cordis/skills/cordis-plugin-development/SKILL.md +38 -0
  92. package/preset/pt-cordis/skills/cordis-plugin-development/references/host-plugin.md +60 -0
  93. package/preset/pt-cordis/skills/cordis-plugin-development/references/mcp-bundle.md +5 -0
  94. package/preset/pt-cordis/skills/cordis-plugin-development/references/ui-plugin.md +13 -0
  95. package/preset/pt-cordis/skills/cordis-plugin-development/references/verification.md +5 -0
  96. package/preset/pt-cordis/skills/cordis-plugin-development/templates/decoration/client.js +22 -0
  97. package/preset/pt-cordis/skills/cordis-plugin-development/templates/decoration/cordis.patch.yml +3 -0
  98. package/preset/pt-cordis/skills/cordis-plugin-development/templates/decoration/index.js +2 -0
  99. package/preset/pt-cordis/skills/cordis-plugin-development/templates/decoration/package.json +15 -0
  100. package/preset/pt-cordis/skills/cordis-plugin-development/templates/mcp/cordis.patch.yml +8 -0
  101. package/preset/pt-cordis/skills/cordis-plugin-development/templates/mcp/package.json +7 -0
  102. package/preset/pt-cordis/skills/editing-cordis-compositions/SKILL.md +84 -0
  103. package/preset/pt-custom/preset.yml +15 -0
  104. package/preset/pt-minimal/preset.yml +27 -0
  105. package/preset/pt-ptc/preset.yml +45 -0
  106. package/preset/pt-standard/preset.yml +43 -0
  107. package/templates/14-first-turn-anchor.yml +4 -4
  108. package/templates/15-guide-auto.yml +3 -3
  109. package/templates/16-custom-fallback.yml +1 -0
  110. package/templates/18-placeholder-env-facts.yml +3 -3
  111. package/templates/20-system-section.yml +3 -2
  112. package/templates/65-turn-stop.yml +18 -0
  113. package/templates/66-subagent-start.yml +14 -0
  114. package/templates/75-subagent-end.yml +15 -0
  115. package/templates/tools/10-shell-command.yml +1 -1
  116. package/templates/tools/40-delegate-character.yml +1 -1
  117. package/templates/tools/50-delegate-worldbook.yml +1 -1
  118. package/templates/tools/60-delegate-session-var.yml +1 -1
  119. package/templates/tools/70-delegate-worldbook-upsert.yml +1 -1
  120. package/engine/anchor-turn.mjs +0 -68
  121. package/engine/code-presentation.mjs +0 -103
  122. package/engine/compositions/library/anchor-turn.yml +0 -10
  123. package/engine/compositions/library/bootstrap-filesystem.yml +0 -19
  124. package/engine/compositions/library/code-presentation.yml +0 -8
  125. package/engine/compositions/library/context-gate.yml +0 -39
  126. package/engine/compositions/library/cot-drip.yml +0 -11
  127. package/engine/compositions/library/custom-bash.yml +0 -14
  128. package/engine/compositions/library/deliberation-gate.yml +0 -11
  129. package/engine/compositions/library/official-agent-instructions.yml +0 -17
  130. package/engine/compositions/library/official-skill-filesystem-cordis.yml +0 -10
  131. package/engine/compositions/library/official-tool-bash.yml +0 -6
  132. package/engine/compositions/library/official-tool-cordis.yml +0 -13
  133. package/engine/compositions/library/official-tool-presentation.yml +0 -7
  134. package/engine/compositions/library/official-tool-skill.yml +0 -14
  135. package/engine/compositions/library/persona.yml +0 -13
  136. package/engine/compositions/library/prompt-config-engine.yml +0 -16
  137. package/engine/compositions/library/run-code-env.yml +0 -15
  138. package/engine/compositions/library/skill-search.yml +0 -14
  139. package/engine/compositions/library/str-replace-editor.yml +0 -10
  140. package/engine/compositions/library/tool-bootstrap.yml +0 -14
  141. package/engine/compositions/library/tool-config-engine.yml +0 -9
  142. package/engine/compositions/library/tool-filter.yml +0 -8
  143. package/engine/compositions/source/local/code-presentation.yml +0 -8
  144. package/engine/compositions/source/local/context-gate.yml +0 -36
  145. package/engine/compositions/source/local/custom-bash.yml +0 -11
  146. package/engine/compositions/source/local/str-replace-editor.yml +0 -10
  147. package/engine/compositions/source/local/tool-bootstrap.yml +0 -11
  148. package/engine/compositions/source/local/tool-filter.yml +0 -8
  149. package/engine/context-gate.mjs +0 -305
  150. package/engine/cot-drip.mjs +0 -137
  151. package/engine/deliberation-gate.mjs +0 -127
  152. package/engine/tool-bootstrap.mjs +0 -476
  153. package/engine/tool-filter.mjs +0 -80
  154. package/lib/preset-core.d.mts +0 -10
  155. package/lib/preset-core.mjs +0 -77
  156. package/lib/prompt-configs-BnQKRHVb.mjs +0 -884
  157. package/lib/prompt-configs-CN0sJTUL.d.mts +0 -193
  158. package/preset/anchored/preset.yml +0 -296
  159. package/preset/creative/preset.yml +0 -67
  160. package/preset/creative/skills/cordis-plugin-development/SKILL.md +0 -420
  161. package/preset/creative/skills/editing-cordis-compositions/SKILL.md +0 -165
  162. package/preset/custom/preset.yml +0 -12
  163. package/preset/liangshen/preset.yml +0 -75
  164. package/preset/minimal/preset.yml +0 -45
  165. package/preset/ptc/preset.yml +0 -58
  166. package/preset/standard/preset.yml +0 -57
  167. package/skills/manifest.json +0 -7
  168. package/skills/sandboxmod/SKILL.md +0 -49
  169. package/skills/web ui/SKILL.md +0 -42
@@ -1,10 +0,0 @@
1
- # module: anchor-turn
2
- # source: engine/compositions/library/anchor-turn.yml (本地附加,上游 dsh-anchored-standard 移植)
3
- # 前置锚定轮:用户首条真实消息前 prepend 合成锚定轮(配合 zero-tool 模式 =
4
- # 空工具面上的 "we" 锚定)。默认 enabled: false(挂载即禁用,行为不变);
5
- # 启用 = params.anchorTurn(UI 开关)或本行 config.enabled: true。
6
-
7
- - id: anchor-turn
8
- name: ./engine/anchor-turn.mjs
9
- config:
10
- enabled: false
@@ -1,19 +0,0 @@
1
- # module: bootstrap-filesystem
2
- # source: D:\AI\GitHub\deepseek-harness/packages/preset/agent-presets/presets/minimal/agent.cordis.yml
3
- # local patches: 1
4
-
5
- - id: bootstrap-filesystem
6
- name: cordis:group
7
- group: true
8
- isolate:
9
- fs: true
10
- config:
11
- - id: fs-local
12
- name: '@deepseek-ai/dsh-fs-local'
13
- config:
14
- cwd: !!js process.env.DSH_CWD ?? process.cwd()
15
-
16
- - id: str-replace-editor
17
- name: '@deepseek-ai/dsh-tool-str-replace-editor'
18
- config:
19
- maxOutputChars: 16000
@@ -1,8 +0,0 @@
1
- # module: code-presentation
2
- # source: engine/compositions/source/local/code-presentation.yml (本地附加,非官方模块)
3
- # 晋升后 Code Mode (PTC) wire 呈现(从 tool-bootstrap 拆出,与目录窄化解耦):
4
- # "只要 PTC 不要 bootstrap" = modules 只挂本行;PTC+bootstrap = 同时挂两行。
5
- # usePtcMode 默认 false(opt-in);params.usePtcMode 显式覆盖(参数桥)。
6
-
7
- - id: code-presentation
8
- name: ./engine/code-presentation.mjs
@@ -1,39 +0,0 @@
1
- # module: context-gate
2
- # source: engine/compositions/source/local/context-gate.yml (本地附加,非官方模块)
3
-
4
- - id: context-gate
5
- name: ./engine/context-gate.mjs
6
- config:
7
- promoteOn: either
8
- includeSubagents: false
9
-
10
- # ── bootstrap ───────────────────────────────────────────────────────────────
11
-
12
- # Tool catalog control (mode-owned tool-bootstrap.mjs). V4 Pro conditions
13
- # strongly on the API tool catalog AND the first request output budget:
14
- # request #1 exposes the OFFICIAL Minimal preset's real tool pair —
15
- # persistent `bash` + `str_replace_editor` — which anchors at the
16
- # adapter-default maxTokens (256000) with no output cap needed (issue #11:
17
- # 5/5 anchored vs 11/11 standard-like for every standard-family schema);
18
- # after the session records its first durable promotion signal (a tool call OR
19
- # the first assistant message, default `promoteOn: either`), later steps keep
20
- # the assembled catalog and usePtcMode optionally switches the wire to Code
21
- # Mode (PTC). `bootstrapMaxTokens` is
22
- # opt-in for standard-schema bootstraps; unset, the adapter default flows. See
23
- # tool-bootstrap.mjs for the other triggers. Context stripping is NOT here —
24
- # the context-gate row above owns it.
25
- #
26
- # POST-PROMOTION (prompt-tool local addition): both modes keep the assembled
27
- # catalog after promotion. `usePtcMode` switches the wire presentation to Code
28
- # Mode (PTC, a single run_code backed by the full registry SDK) instead of
29
- # narrowing the resident set; the pre-promotion and post-compaction controlled
30
- # phase below still stays on the bootstrap pair + `compactionTools`.
31
- #
32
- # COMPACTION (local addition): after `compaction/end` the session falls back
33
- # to the controlled phase — bootstrap pair + `compactionTools` — until a NEW
34
- # durable promotion signal exists past the boundary (epoch-aware, see
35
- # compaction-epoch.mjs).
36
- #
37
- # `includeSubagents: true` keeps the subagent phase in sync with the
38
- # context-gate row: a subagent's first request sees the bootstrap pair, then
39
- # its own first reply or tool call promotes it to the assembled catalog.
@@ -1,11 +0,0 @@
1
- # module: cot-drip
2
- # source: engine/compositions/library/cot-drip.yml (本地附加,上游 dsh-anchored-standard 移植)
3
- # 深思维持节拍:每 N 次工具结果滴入一条 "We …" 重申提醒(additionalContexts)。
4
- # 默认 enabled: false(挂载即禁用);启用 = params.cotDrip(UI 开关)。
5
-
6
- - id: cot-drip
7
- name: ./engine/cot-drip.mjs
8
- config:
9
- enabled: false
10
- every: 4
11
- maxPerTurn: 1
@@ -1,14 +0,0 @@
1
- # module: custom-bash
2
- # source: engine/compositions/source/local/custom-bash.yml (本地附加,非官方模块)
3
-
4
- - id: custom-bash
5
- name: ./engine/custom-bash.mjs
6
- disabled: !!js process.platform !== 'win32'
7
- config:
8
- timeoutMs: 120000
9
- maxOutputBytes: 64000
10
-
11
- # ── filesystem ──────────────────────────────────────────────────────────────
12
-
13
- # Both register into the host `tools` registry and provide nothing, so
14
- # they need no realm. The `fs` service and its policy stay in the host.
@@ -1,11 +0,0 @@
1
- # module: deliberation-gate
2
- # source: engine/compositions/library/deliberation-gate.yml (本地附加,上游 dsh-anchored-standard 移植)
3
- # 轨迹深度门:首工具调用前流式深思 < minChars 时 deny 一次(规划式提示)。
4
- # 默认 enabled: false(挂载即禁用);启用 = params.deliberationGate(UI 开关)。
5
-
6
- - id: deliberation-gate
7
- name: ./engine/deliberation-gate.mjs
8
- config:
9
- enabled: false
10
- minChars: 400
11
- maxGatesPerTurn: 1
@@ -1,17 +0,0 @@
1
- # module: official-agent-instructions
2
- # source: deepseek-harness official standard agent preset (agent-instructions)
3
-
4
- - id: agent-instructions
5
- name: '@deepseek-ai/dsh-agent-instructions'
6
- config:
7
- maxBytes: 65536
8
-
9
- # ── shell ───────────────────────────────────────────────────────────────────
10
-
11
- # `shell-env` stays in the HOST composition: `apps/cli/src/web.ts` injects it to
12
- # publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
13
- # the criterion for host-plane ownership — injection resolves before any session
14
- # exists, so there is no agent to key by. Behind a preset realm those variables
15
- # never reached the model's shell at all. Both shell tools consume the host
16
- # registry from here; their executors (`bash-sandbox`/`pwsh-sandbox`) are
17
- # host-plane too.
@@ -1,10 +0,0 @@
1
- # module: official-skill-filesystem-cordis
2
- # source: deepseek-harness official cordis agent preset (skill-filesystem)
3
- # 差异含 !!js 表达式(代码类),无法经 moduleConfigs 参数化(YAML tag 不保真),保留独立文件。
4
-
5
- - id: skill-filesystem
6
- name: '@deepseek-ai/dsh-skill-filesystem'
7
- config:
8
- customSkillDirs:
9
- - !!js "process.getBuiltinModule('node:url').fileURLToPath(new URL('skills/', baseUrl))"
10
-
@@ -1,6 +0,0 @@
1
- # module: official-tool-bash
2
- # source: deepseek-harness official standard agent preset (tool-bash)
3
-
4
- - id: tool-bash
5
- name: '@deepseek-ai/dsh-tool-bash'
6
- disabled: !!js process.platform === 'win32'
@@ -1,13 +0,0 @@
1
- # module: official-tool-cordis
2
- # source: deepseek-harness official cordis agent preset (tool-cordis)
3
-
4
- - id: tool-cordis
5
- name: '@deepseek-ai/dsh-tool-cordis'
6
-
7
- # The composition-authoring skill travels with this preset rather than living
8
- # in the user's skill root: it documents THIS deployment's two planes, and a
9
- # preset is the unit that gets copied and edited. `baseUrl` is the preset's
10
- # own directory, so the root resolves wherever the preset is installed.
11
- # Both rows register into THIS preset's layer of the host skill registry, so
12
- # they need no realm; the agent's merged catalog also carries whatever the
13
- # deployment registered globally (repository plugins).
@@ -1,7 +0,0 @@
1
- # module: official-tool-presentation
2
- # source: deepseek-harness official code agent preset (tool-presentation)
3
-
4
- - id: tool-presentation
5
- name: '@deepseek-ai/dsh-agent-tool-presentation'
6
- config:
7
- mode: code
@@ -1,14 +0,0 @@
1
- # module: official-tool-skill
2
- # source: deepseek-harness official standard agent preset (tool-skill)
3
-
4
- - id: tool-skill
5
- name: '@deepseek-ai/dsh-tool-skill'
6
-
7
- # ── goals ───────────────────────────────────────────────────────────────────
8
-
9
- # Only the model-facing tool. The goal SERVICE, its session driver, and the
10
- # `/goal` command stay on the host plane: the Gateway serves the goal domain as
11
- # Remote endpoints whose receiver comes from a generated descriptor, so it
12
- # resolves `goals` on the host and an entry-local realm here would hide it. The
13
- # registry is keyed by session anyway, so one host instance serves every
14
- # session. What a preset chooses is whether its agent can call the goal tool.
@@ -1,13 +0,0 @@
1
- # module: persona
2
- # source: D:\AI\GitHub\deepseek-harness/packages/preset/agent-presets/presets/standard/agent.cordis.yml
3
- # local patches: 0
4
-
5
- # ── identity ────────────────────────────────────────────────────────────────
6
-
7
- # The preset's own persona, shadowing the deployment default for this agent.
8
- # `{{model}}` and `{{cwd}}` resolve from the agent's own route and workspace.
9
- - id: persona
10
- name: '@deepseek-ai/dsh-persona'
11
- config:
12
- text: >-
13
- You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}.
@@ -1,16 +0,0 @@
1
- # module: prompt-config-engine
2
- # source: engine/compositions/source/local/prompt-config-engine.yml (本地附加,非官方模块)
3
-
4
- - id: prompt-config-engine
5
- name: ./engine/prompt-config-engine.mjs
6
- config:
7
- configsDir: ../prompt-configs
8
-
9
- # ── PTC run_code environment (prompt-tool local addition) ──────────────────
10
- #
11
- # Official Code Mode runs the model program in a worker with env={}; the
12
- # program cannot read system environment. This row patches the reserved
13
- # run_code transport so every program gets a frozen `env` global containing
14
- # the whitelisted non-secret host variables below plus managed DSH_* facts
15
- # and DSH_WORKSPACE. Add deployment-specific names to envKeys as needed.
16
- # Credential-shaped names (KEY/PASSWORD/SECRET/TOKEN) are always rejected.
@@ -1,15 +0,0 @@
1
- # module: run-code-env
2
- # source: engine/compositions/source/local/run-code-env.yml (本地附加,非官方模块)
3
-
4
- - id: run-code-env
5
- name: ./engine/run-code-env.mjs
6
- config:
7
- enabled: true
8
- envKeys: [PATH, PATHEXT, HOME, USERPROFILE, USERNAME, COMPUTERNAME, OS, TEMP, TMP, SystemRoot, ProgramFiles, ProgramFiles(x86), LOCALAPPDATA, APPDATA]
9
-
10
- # ── identity ────────────────────────────────────────────────────────────────
11
-
12
- # Keep this text byte-identical to the Minimal preset. `complete` prevents the
13
- # Harness identity and per-tool guidance from changing the system prompt, while
14
- # runtime-context suppression leaves task and repository rules to user messages
15
- # and explicit file reads. Tool schemas and their runtime enforcement remain.
@@ -1,14 +0,0 @@
1
- # module: skill-search
2
- # source: engine/compositions/source/local/skill-search.yml (本地附加,非官方模块)
3
-
4
- - id: skill-search
5
- name: ./engine/skill-search.mjs
6
-
7
- # ── goals ───────────────────────────────────────────────────────────────────
8
-
9
- # Only the model-facing tool. The goal SERVICE, its session driver, and the
10
- # `/goal` command stay on the host plane: the Gateway serves the goal domain as
11
- # Remote endpoints whose receiver comes from a generated descriptor, so it
12
- # resolves `goals` on the host and an entry-local realm here would hide it. The
13
- # registry is keyed by session anyway, so one host instance serves every
14
- # session. What a preset chooses is whether its agent can call the goal tool.
@@ -1,10 +0,0 @@
1
- # module: str-replace-editor
2
- # source: engine/compositions/source/local/str-replace-editor.yml (本地附加,非官方模块)
3
- # 官方 minimal 内置工具(filesystem group 内的 str-replace-editor 行)拆出为独立模块:
4
- # 复用宿主 sandbox 的 ctx.fs,不挂 fs-local 裸文件系统。
5
- # maxOutputChars 参数化:params.strReplaceEditorMaxOutputChars(默认官方值 16000)。
6
-
7
- - id: str-replace-editor
8
- name: '@deepseek-ai/dsh-tool-str-replace-editor'
9
- config:
10
- maxOutputChars: 16000
@@ -1,14 +0,0 @@
1
- # module: tool-bootstrap
2
- # source: engine/compositions/source/local/tool-bootstrap.yml (本地附加,非官方模块)
3
-
4
- - id: tool-bootstrap
5
- name: ./engine/tool-bootstrap.mjs
6
- config:
7
- bootstrapTools: [bash, str_replace_editor]
8
- promoteOn: either
9
- includeSubagents: false
10
- # Post-compaction core work set: the model is mid-task and needs to keep
11
- # working, but faces a small catalog instead of the full Standard set.
12
- compactionTools: [read, write, edit, glob, grep, todo_write, ask_user_question]
13
-
14
- # ── prompt-tool 模板自带行(由 write-preset 按 manifest 变量物化) ─────────────
@@ -1,9 +0,0 @@
1
- # module: tool-config-engine
2
- # source: 本地新增(自定义工具引擎:preset.yml customTools 段 → 渲染 custom-tools/ → 运行时注册)
3
- # 工具定义在预设目录 custom-tools/*.yml;执行器 shell/http/delegate/fs/ask-user。
4
- # requireApproval 数组可列出需 approval 门的执行器(默认空 = 不要求)。
5
-
6
- - id: tool-config-engine
7
- name: ./engine/tool-config-engine.mjs
8
- config:
9
- configsDir: ../custom-tools
@@ -1,8 +0,0 @@
1
- # module: tool-filter
2
- # source: engine/compositions/source/local/tool-filter.yml (本地附加,非官方模块)
3
- # 主会话常驻工具白名单/黑名单:作用于任意注册工具(含第三方插件工具)。
4
- # config 由参数桥按 params.toolFilterAllow/Deny/Subagents 合并;
5
- # 未声明 = 不过滤(官方默认),见 tool-filter.mjs。
6
-
7
- - id: tool-filter
8
- name: ./engine/tool-filter.mjs
@@ -1,8 +0,0 @@
1
- # module: code-presentation
2
- # source: engine/compositions/source/local/code-presentation.yml (本地附加,非官方模块)
3
- # 晋升后 Code Mode (PTC) wire 呈现(从 tool-bootstrap 拆出,与目录窄化解耦):
4
- # "只要 PTC 不要 bootstrap" = modules 只挂本行;PTC+bootstrap = 同时挂两行。
5
- # usePtcMode 默认 false(opt-in);params.usePtcMode 显式覆盖(参数桥)。
6
-
7
- - id: code-presentation
8
- name: ./engine/code-presentation.mjs
@@ -1,36 +0,0 @@
1
- - id: context-gate
2
- name: ./engine/context-gate.mjs
3
- config:
4
- promoteOn: either
5
- includeSubagents: false
6
-
7
- # ── bootstrap ───────────────────────────────────────────────────────────────
8
-
9
- # Tool catalog control (mode-owned tool-bootstrap.mjs). V4 Pro conditions
10
- # strongly on the API tool catalog AND the first request output budget:
11
- # request #1 exposes the OFFICIAL Minimal preset's real tool pair —
12
- # persistent `bash` + `str_replace_editor` — which anchors at the
13
- # adapter-default maxTokens (256000) with no output cap needed (issue #11:
14
- # 5/5 anchored vs 11/11 standard-like for every standard-family schema);
15
- # after the session records its first durable promotion signal (a tool call OR
16
- # the first assistant message, default `promoteOn: either`), later steps keep
17
- # the assembled catalog and usePtcMode optionally switches the wire to Code
18
- # Mode (PTC). `bootstrapMaxTokens` is
19
- # opt-in for standard-schema bootstraps; unset, the adapter default flows. See
20
- # tool-bootstrap.mjs for the other triggers. Context stripping is NOT here —
21
- # the context-gate row above owns it.
22
- #
23
- # POST-PROMOTION (prompt-tool local addition): both modes keep the assembled
24
- # catalog after promotion. `usePtcMode` switches the wire presentation to Code
25
- # Mode (PTC, a single run_code backed by the full registry SDK) instead of
26
- # narrowing the resident set; the pre-promotion and post-compaction controlled
27
- # phase below still stays on the bootstrap pair + `compactionTools`.
28
- #
29
- # COMPACTION (local addition): after `compaction/end` the session falls back
30
- # to the controlled phase — bootstrap pair + `compactionTools` — until a NEW
31
- # durable promotion signal exists past the boundary (epoch-aware, see
32
- # compaction-epoch.mjs).
33
- #
34
- # `includeSubagents: true` keeps the subagent phase in sync with the
35
- # context-gate row: a subagent's first request sees the bootstrap pair, then
36
- # its own first reply or tool call promotes it to the assembled catalog.
@@ -1,11 +0,0 @@
1
- - id: custom-bash
2
- name: ./engine/custom-bash.mjs
3
- disabled: !!js process.platform !== 'win32'
4
- config:
5
- timeoutMs: 120000
6
- maxOutputBytes: 64000
7
-
8
- # ── filesystem ──────────────────────────────────────────────────────────────
9
-
10
- # Both register into the host `tools` registry and provide nothing, so
11
- # they need no realm. The `fs` service and its policy stay in the host.
@@ -1,10 +0,0 @@
1
- # module: str-replace-editor
2
- # source: engine/compositions/source/local/str-replace-editor.yml (本地附加,非官方模块)
3
- # 官方 minimal 内置工具(filesystem group 内的 str-replace-editor 行)拆出为独立模块:
4
- # 复用宿主 sandbox 的 ctx.fs,不挂 fs-local 裸文件系统。
5
- # maxOutputChars 参数化:params.strReplaceEditorMaxOutputChars(默认官方值 16000)。
6
-
7
- - id: str-replace-editor
8
- name: '@deepseek-ai/dsh-tool-str-replace-editor'
9
- config:
10
- maxOutputChars: 16000
@@ -1,11 +0,0 @@
1
- - id: tool-bootstrap
2
- name: ./engine/tool-bootstrap.mjs
3
- config:
4
- bootstrapTools: [bash, str_replace_editor]
5
- promoteOn: either
6
- includeSubagents: false
7
- # Post-compaction core work set: the model is mid-task and needs to keep
8
- # working, but faces a small catalog instead of the full Standard set.
9
- compactionTools: [read, write, edit, glob, grep, todo_write, ask_user_question]
10
-
11
- # ── prompt-tool 模板自带行(由 write-preset 按 manifest 变量物化) ─────────────
@@ -1,8 +0,0 @@
1
- # module: tool-filter
2
- # source: engine/compositions/source/local/tool-filter.yml (本地附加,非官方模块)
3
- # 主会话常驻工具白名单/黑名单:作用于任意注册工具(含第三方插件工具)。
4
- # config 由参数桥按 params.toolFilterAllow/Deny/Subagents 合并;
5
- # 未声明 = 不过滤(官方默认),见 tool-filter.mjs。
6
-
7
- - id: tool-filter
8
- name: ./engine/tool-filter.mjs