@dsh-cc/preset-cc 0.7.1-rc.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.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,6 @@
1
+ # Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
2
+ # side as of the last confirmed-consistent state. Both languages carry equal authority;
3
+ # after editing either side, bring the other along and re-record with:
4
+ # pnpm check:readme --write
5
+ README.md: 915baac2d78d1412da3ef374df2d2c09c91270d9
6
+ README.zh.md: 582c9ec91057a4e4eb77f8e5bb51b4d0032b4505
package/README.md ADDED
@@ -0,0 +1,45 @@
1
+ # @dsh-cc/preset-cc
2
+
3
+ English | [中文](README.zh.md)
4
+
5
+ The **CC 模式** (CC mode) agent preset for the DeepSeek Harness (dsh): the fifth agent preset alongside the stock `standard`, `minimal`, and the other built-ins. It composes the Claude Code surface — Claude hooks, on-disk CC plugin directories, slash commands, memory, CC output styles, and CC-style WebFetch — on top of the complete standard preset. This package is **composition-only**: no TypeScript runtime code, just `agent.cordis.yml` (the flatted agent entry list) plus `preset.yml` metadata.
6
+
7
+ ## What it does
8
+
9
+ - **A full standard-mode baseline.** `agent.cordis.yml` opens with a verbatim copy of the stock `standard` preset (the 16 baseline rows), so a CC-mode session keeps every capability of the standard coding agent.
10
+ - **A scoped CC surface.** The `cc rows` section mounts the Claude Code parity plugins — hook bridge (18 of 30 hook events), CC plugin-directory glue, `ToolSearch`, memory + consolidation, output styles, the coordinator, 21 slash commands, and the worktree/sleep/notebook/structured-output and git tools. WebFetch: stock `tool-web` runs with `fetch: false` and the 60s search timeout carried forward; `web_fetch` is replaced by the cc-services `tool-web-fetch` row (`@dsh-cc/tool-web-fetch`, optional `prompt` summarized on the cheap lane). The fetch executor is the stock dsh-base provider (DNS-pinned, public-only per hop) with CC egress caps restated in the cc-shell patch, and the tool upgrades `http:` URLs to `https:` (CC parity); an optional prompt without the `haiku` route hard-fails before any fetch.
11
+ - **Session titles and `/rename`.** The cc-shell bundle swaps the stock `session-title-llm` host row for `@dsh-cc/session-title-provider`, a first-prompt title provider that stamps the `haiku` cheap lane when configured (else it inherits the main route), and this preset mounts `@dsh-cc/command-rename` so `/rename <title>` pins a user title.
12
+ - **Isolated service realms.** Service-bearing rows (tool search, microcompactor, plugin registry, MCP connections, hook-bridge status, plugin MCP seam) live inside the `cc-services` group with the seven required `isolate` keys, so they publish into an entry-local realm instead of the process-global root realm (which would trip the preset mount gate).
13
+ - **CC Task delegation (`tool-task` + `cc-model-routes`).** The `cc-services` group also mounts `@dsh-cc/subagent-task` (the CC Task tool, `subagent_type` dispatch over per-workspace `.claude/agents` definitions) and `@dsh-cc/model-aliases` (`cc-model-routes`, owning the `model-aliases` settings namespace and the spawn-time alias resolver). In this preset the harness `tool-subagent` and `tool-subagent-fork` rows are **disabled** in favour of the replacement Task, which also owns the durable background/`continuable` loop: `run_in_background: true` starts an agentId-addressable continuable child, and `report`/`send_message`/`list_agents`/`interrupt_agent` operate on that id (`subagent_type: "fork"` stays foreground one-shot until upstream harness issue #2124 resolves). See the task package README and the parity matrix for the known limits.
14
+
15
+ These rows previously lived in the global `cc-shell` patch (`packages/bundle/cc-shell/cordis.patch.yml`) and leaked into every agent preset. Scoping them to this preset is exactly what isolates each surface.
16
+
17
+ ## Install
18
+
19
+ ```bash
20
+ bash scripts/sync-local-profile.sh web # mirror @dsh-cc/* packages into the profile
21
+ bash scripts/sync-cc-preset.sh # install the cc preset into ~/.dsh/.agent-presets/
22
+ ```
23
+
24
+ Both scripts copy, they do not symlink; plugin code and preset files are read at boot, so **restart dsh** after the first install (subsequent file edits are picked up on the next restart too).
25
+
26
+ ## Select
27
+
28
+ - **Web UI**: pick "CC mode" from the agent-preset selector; or
29
+ - **settings**: `~/.dsh/settings.json` → `"agent-presets": { "default": "cc" }`.
30
+ - **TUI**: `dsh --profile tui` (or `dsh-cc`) boots the terminal surface with this preset as the default.
31
+
32
+ ## Known limits
33
+
34
+ 1. **Standing mount, host-plane singletons.** A preset is mounted once per process under a standing scope. MCP connections, the on-disk CC plugin directories loaded by the glue, the subagent-provider roster, and CC-plugin `settings.json` writes resolve to process-shared host-plane singletons (the same criterion upstream `subagents`/`goals` already follow), so those are not per-session across simultaneously mounted presets.
35
+ 2. **Vendored baseline, drift gate.** The standard baseline is vendored. After upgrading dsh, run the drift gate (`pnpm vitest run packages/preset/cc`, or the binary directly) to re-diff it against the new standard preset and fold in upstream changes. On a CI machine with no dsh install present, the gate auto-skips via `it.runIf`.
36
+ 3. **Uninstall is deletion.** Remove `~/.dsh/.agent-presets/cc` (or however it was installed); the four built-in modes are unaffected — a user-root preset of the same `id` never overrides the installed system-root entries.
37
+ 4. **`DSH_COORDINATOR_MODE=1` breaks this preset's mount.** The coordinator needs an agent `ctx`, and a standing mount has none; that failure is now scoped to this preset's session creation. In the old global-patch era the whole app failed to boot — the blast radius is narrower, but the mode is still unsupported here.
38
+ 5. **A settings default to a missing preset errors.** If the default names a preset that does not exist, session creation reports `agent-preset-not-found` (the `details.available` list names the valid ids). Reset by pointing `~/.dsh/settings.json` → `agent-presets.default` back to `standard`.
39
+
40
+ ## Links
41
+
42
+ - Source composition: `agent.cordis.yml` (baseline + `cc rows`)
43
+ - Metadata: `preset.yml`
44
+ - Origin rows: `packages/bundle/cc-shell/cordis.patch.yml`
45
+ - Composition contract: `tests/composition.spec.ts`
package/README.zh.md ADDED
@@ -0,0 +1,44 @@
1
+ # @dsh-cc/preset-cc
2
+
3
+ [English](README.md) | 中文
4
+
5
+ DeepSeek Harness(dsh)的 **CC 模式** agent preset:除内置 `standard`、`minimal` 等之外的第 5 个 agent preset。它在完整标准 preset 之上组合出 Claude Code 行为面——Claude hooks、磁盘上的 CC 插件目录、斜杠命令、memory、CC 输出样式、CC 风格 WebFetch。本包**纯配置**:无 TS 运行时代码,只有 `agent.cordis.yml`(平铺的 agent 组合 entry list)加 `preset.yml` 元数据。
6
+
7
+ ## 作用
8
+
9
+ - **完整标准基底**。`agent.cordis.yml` 以标准 `standard` preset 的逐字拷贝开头(16 个基座行),CC 模式会话因此具备标准编码 agent 的全部能力。
10
+ - **作用域化的 CC 表面**。`cc rows` 段挂载 Claude Code 对齐插件——hook 桥(30 个 hook 事件中的 18 个)、CC 插件目录 glue、`ToolSearch`、memory 与 consolidation、输出样式、coordinator、21 个斜杠命令,以及 worktree/sleep/notebook/structured-output 与 git 工具。WebFetch:stock `tool-web` 以 `fetch: false` 运行,搜索超时沿用 60s;`web_fetch` 由 cc-services 里的 `tool-web-fetch` 行(`@dsh-cc/tool-web-fetch`,可选 `prompt` 在廉价 lane 上摘要)替代。fetch 执行器是 dsh-base 自带的 stock provider(DNS 钉定、逐跳仅公网),CC 出口上限由 cc-shell patch 重述;工具层会把 `http:` URL 升级为 `https:`(CC 对齐);没有 `haiku` 路由时,可选 `prompt` 会在任何 fetch 之前硬失败。
11
+ - **会话标题与 `/rename`**。cc-shell bundle 用 `@dsh-cc/session-title-provider` 替换原生 `session-title-llm` 宿主行——first-prompt 标题提供方,配置了 `haiku` 廉价通道时盖印该路由(否则继承主路由);本 preset 还挂载 `@dsh-cc/command-rename`,`/rename <title>` 即可固定用户标题。
12
+ - **隔离的服务 realm**。承载服务的行(工具搜索、microcompactor、插件注册表、MCP 连接、hook-bridge 状态、插件 MCP seam)放进 `cc-services` 组并带七个必需的 `isolate` 键,发布到 entry-local realm 而非进程全局 root realm(否则会触发 preset 挂载门禁)。
13
+ - **CC Task 委派(`tool-task` + `cc-model-routes`)**。`cc-services` 组还挂载 `@dsh-cc/subagent-task`(CC Task 工具,对按工作区的 `.claude/agents` 定义做 `subagent_type` 派发)与 `@dsh-cc/model-aliases`(`cc-model-routes`,拥有 `model-aliases` settings 命名空间与派发时别名解析器)。本 preset 里 harness 的 `tool-subagent` 与 `tool-subagent-fork` 两行被**禁用**,改用这个替代 Task,它同样拥有 durable 后台/`continuable` 流程:`run_in_background: true` 启动一个可按 agentId 寻址的 continuable 子代理,`report`/`send_message`/`list_agents`/`interrupt_agent` 都作用于该 id(`subagent_type: "fork"` 在上游 harness issue #2124 解决前保持前台一次性)。已知限制见 task 包 README 与 parity matrix。
14
+
15
+ 这些行此前位于全局 `cc-shell` patch(`packages/bundle/cc-shell/cordis.patch.yml`),会泄漏进每个 agent preset;把它们 scope 到本 preset 正是隔离各行为面的手段。
16
+
17
+ ## 安装
18
+
19
+ ```bash
20
+ bash scripts/sync-local-profile.sh web # 把 @dsh-cc/* 包镜像到 profile
21
+ bash scripts/sync-cc-preset.sh # 把 cc preset 装进 ~/.dsh/.agent-presets/
22
+ ```
23
+
24
+ 两个脚本都是拷贝而非软链;插件代码与 preset 文件在启动时读取,因此首次安装后需**重启 dsh**(之后的文件改动也在下次重启生效)。
25
+
26
+ ## 选用
27
+
28
+ - **Web UI**:预设选择器里选「CC mode」;或
29
+ - **settings**:`~/.dsh/settings.json` → `"agent-presets": { "default": "cc" }`。
30
+
31
+ ## Known limits(已知限制)
32
+
33
+ 1. **standing 挂载 + host-plane 单例**。preset 在每个进程挂载一次并处于 standing scope。MCP 连接、glue 装载的磁盘 CC 插件目录、subagent provider 名册、CC 插件对 `settings.json` 的写入都落到进程共享的 host-plane 单例(与上游 `subagents`/`goals` 相同的判据),因此不会因同时挂载的多个 preset 而按会话隔离。
34
+ 2. **基座 vendored,靠漂移闸**。标准基座是 vendored 的。升级 dsh 后运行漂移闸(`pnpm vitest run packages/preset/cc`,或直跑二进制)重新 diff 新标准 preset 并合入上游改动。CI 机器无 dsh 安装时闸通过 `it.runIf` 自动跳过。
35
+ 3. **卸载即删除**。删掉 `~/.dsh/.agent-presets/cc`(或你的安装方式);四个内置模式不受影响——user root 下同 id 的 preset 也盖不掉已安装的 system root 条目。
36
+ 4. **`DSH_COORDINATOR_MODE=1` 使本 preset 挂载失败**。coordinator 需要 agent `ctx`,而 standing 挂载点没有;该失败现在只影响本 preset 的会话创建。在旧全局 patch 时代整个 app 起不来——影响面已收窄,但此模式在此处仍不受支持。
37
+ 5. **settings 指向不存在的 preset 会报错**。若默认指向不存在的 preset,建会话报 `agent-preset-not-found`(`details.available` 列出可用 id)。把 `~/.dsh/settings.json` 的 `agent-presets.default` 改回 `standard` 即复位。
38
+
39
+ ## 链接
40
+
41
+ - 源组合:`agent.cordis.yml`(基座 + `cc rows`)
42
+ - 元数据:`preset.yml`
43
+ - 行来源:`packages/bundle/cc-shell/cordis.patch.yml`
44
+ - 组合契约:`tests/composition.spec.ts`
@@ -0,0 +1,664 @@
1
+ # BEGIN dsh-cc header
2
+ # vendored from @deepseek-ai/dsh@0.1.1-rc.2 config/agent-presets/standard/agent.cordis.yml
3
+ # source: config/agent-presets/standard/agent.cordis.yml (deepseek-harness install)
4
+ #
5
+ # This file is the dsh "CC mode" agent preset composition. The baseline below
6
+ # is a verbatim copy of the standard preset; the `cc rows` section appended at
7
+ # the bottom carries the CC surface rows scoped to this preset (they previously
8
+ # lived in the cc-shell global patch, see
9
+ # $R/packages/bundle/cc-shell/cordis.patch.yml).
10
+ #
11
+ # After upgrading dsh upstream, re-diff this baseline against the new standard
12
+ # preset (the drift gate in tests/composition.spec.ts automates this) and fold
13
+ # in any upstream changes.
14
+ # END dsh-cc header
15
+ # The `standard` agent preset: the full coding agent, mounted once per process.
16
+ #
17
+ # This file is an AGENT-PLANE composition. The roster mounts it ONCE under a
18
+ # standing scope; every session naming it joins by scope parentage, so the
19
+ # tools and prompt sections registered here cover each joined agent while a
20
+ # session's own state stays keyed per Session/Agent inside the plugins. The
21
+ # host composition (`base.cordis.yml` + `web.cordis.yml`) keeps everything a
22
+ # preset must not own: the registries themselves, the sandbox and approval
23
+ # stack, persistence, and the model route.
24
+ #
25
+ # A service row here MUST sit inside a group carrying an `isolate` realm.
26
+ # Without one it publishes into the root realm, where it is process-global —
27
+ # another preset publishing the same name collides, and a host reader would
28
+ # resolve one preset's instance for every session; `dsh-agent-presets` rejects
29
+ # that at mount. `true` means an entry-local realm: this standing mount's own
30
+ # private instance, apart from every other preset's. (A shared label does NOT
31
+ # pool instances — `provide()` throws on the second registration under the
32
+ # same realm symbol; labels join REALMS, and are not what this file needs.)
33
+
34
+ # ── identity ────────────────────────────────────────────────────────────────
35
+
36
+ # The preset's own persona, shadowing the deployment default for this agent.
37
+ # `{{model}}` and `{{cwd}}` resolve from the agent's own route and workspace.
38
+ - id: persona
39
+ name: '@deepseek-ai/dsh-persona'
40
+ config:
41
+ prefix: >-
42
+ You are a coding agent powered by the {{model}} model. Your working directory is {{cwd}}.
43
+
44
+ - id: agent-instructions
45
+ name: '@deepseek-ai/dsh-agent-instructions'
46
+ config:
47
+ maxBytes: 65536
48
+
49
+ # ── shell ───────────────────────────────────────────────────────────────────
50
+
51
+ # `shell-env` stays in the HOST composition: `apps/cli/src/web.ts` injects it to
52
+ # publish `DSH_WEB_URL`/`DSH_WEB_MODE`, and a host row that injects a service is
53
+ # the criterion for host-plane ownership — injection resolves before any session
54
+ # exists, so there is no agent to key by. Behind a preset realm those variables
55
+ # never reached the model's shell at all. Both shell tools consume the host
56
+ # registry from here; their executors (`bash-sandbox`/`pwsh-sandbox`) are
57
+ # host-plane too.
58
+ - id: tool-bash
59
+ name: '@deepseek-ai/dsh-tool-bash'
60
+ disabled: !!js process.platform === 'win32'
61
+
62
+ - id: tool-pwsh
63
+ name: '@deepseek-ai/dsh-tool-pwsh'
64
+ disabled: !!js process.platform !== 'win32'
65
+
66
+ # ── filesystem ──────────────────────────────────────────────────────────────
67
+
68
+ # Both register into the host `tools` registry and provide nothing, so
69
+ # they need no realm. The `fs` service and its policy stay in the host.
70
+ - id: tool-fs
71
+ name: '@deepseek-ai/dsh-tool-fs'
72
+
73
+ - id: tool-fs-search
74
+ name: '@deepseek-ai/dsh-tool-fs-search'
75
+ config:
76
+ sampleOverCapGlobResults: false
77
+
78
+ # ── background jobs ────────────────────────────────────────────────────────
79
+
80
+ # Only the model-facing controls. The task REGISTRY stays on the host plane:
81
+ # its producers sit outside any realm this file could put it in — `tool-bash`
82
+ # above resolves it with `ctx.get`, and an entry-local realm here is invisible
83
+ # to every sibling row, so `run_in_background` would answer "background jobs
84
+ # unavailable" while these controls sat in the catalog. The registry is keyed by
85
+ # owning agent anyway, so one host instance serves every session. What a preset
86
+ # chooses is whether its agent can collect and stop background work at all.
87
+ - id: tool-jobs
88
+ name: '@deepseek-ai/dsh-tool-jobs'
89
+
90
+ # ── skills ──────────────────────────────────────────────────────────────────
91
+
92
+ # The skill REGISTRY lives in the host composition and is layered per scope:
93
+ # these rows register into THIS preset's layer of it, so they need no realm.
94
+ # `skill-filesystem` contributes local-root discovery for agents on this preset, and
95
+ # `tool-skill` gives them the catalog and loader; the merged catalog also
96
+ # carries whatever the deployment registered globally (repository plugins).
97
+ - id: skill-filesystem
98
+ name: '@deepseek-ai/dsh-skill-filesystem'
99
+
100
+ - id: tool-skill
101
+ name: '@deepseek-ai/dsh-tool-skill'
102
+
103
+ # ── goals ───────────────────────────────────────────────────────────────────
104
+
105
+ # Only the model-facing tool. The goal SERVICE, its session driver, and the
106
+ # `/goal` command stay on the host plane: the Gateway serves the goal domain as
107
+ # Remote endpoints whose receiver comes from a generated descriptor, so it
108
+ # resolves `goals` on the host and an entry-local realm here would hide it. The
109
+ # registry is keyed by session anyway, so one host instance serves every
110
+ # session. What a preset chooses is whether its agent can call the goal tool.
111
+ - id: tool-goal
112
+ name: '@deepseek-ai/dsh-tool-goal'
113
+
114
+ # ── plan mode ───────────────────────────────────────────────────────────────
115
+
116
+ # Plan state is per-agent by nature, so an entry-local realm is not a
117
+ # workaround here — it is the correct lifetime.
118
+ - id: planning
119
+ name: cordis:group
120
+ group: true
121
+ isolate:
122
+ planMode: true
123
+ config:
124
+ - id: plan-mode
125
+ name: '@deepseek-ai/dsh-plan-mode'
126
+ config:
127
+ section: |
128
+ 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.
129
+
130
+ 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.
131
+
132
+ 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.
133
+
134
+ 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.
135
+
136
+ 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.
137
+
138
+ 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.
139
+
140
+ # ── compaction ──────────────────────────────────────────────────────────────
141
+
142
+ # `compaction-basic` reads `toolResultPrune` through `ctx.get`, so the pruner must
143
+ # share this realm rather than sit outside it.
144
+ #
145
+ # The engine and the command are CC replacements for the upstream rows: the
146
+ # engine subclass folds a per-agent `/compact [instructions]` hint into the
147
+ # summarizer input; the command forwards the free-text argument as that hint
148
+ # instead of rejecting arguments.
149
+ #
150
+ # `tokenMeter` is deliberately NOT in this realm: the meter stays on the HOST
151
+ # plane, and the rows here resolve that one instance. It takes no configuration,
152
+ # keys every fold by Session, and owns the context-meter projection units the
153
+ # browser reads for every session — behind a realm those units would come and go
154
+ # with whichever presets happen to be mounted. What a preset chooses is whether
155
+ # its agent compacts at all, which is `compaction-basic` below.
156
+ - id: compaction
157
+ name: cordis:group
158
+ group: true
159
+ isolate:
160
+ compaction: true
161
+ toolResultPruner: true
162
+ config:
163
+ - id: compaction-basic
164
+ name: '@dsh-cc/compaction-basic'
165
+
166
+ - id: command-compact
167
+ name: '@dsh-cc/command-compact'
168
+
169
+ - id: tool-result-pruner
170
+ name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
171
+ config:
172
+ thresholdChars: 8192
173
+ headChars: 4096
174
+ tailChars: 1024
175
+
176
+ # ── delegation and workflows ────────────────────────────────────────────────
177
+
178
+ # The `subagents` registry and its spawn/fork backends live in the HOST
179
+ # composition: the registry is a process singleton whose cross-session queries
180
+ # the api-proxy serves to the browser, and a provider name may only be
181
+ # registered once. This preset contributes the delegation TOOLS, which resolve
182
+ # that host registry.
183
+ #
184
+ # `workflows` is different — nothing outside an agent reads it — so every row
185
+ # that reaches it shares one entry-local realm here, and a consumer left
186
+ # outside would resolve a host registry this preset does not populate.
187
+ #
188
+ # `tool-subagent-report` is GONE upstream: there is no report tool anymore.
189
+ # Workers return outcomes to their parent with the host-plane
190
+ # `tool-subagent-control` send_message tool (addressed to the parent's session
191
+ # id), and settlement reaches the parent as the subagent manager's
192
+ # `subagent-settled` notice. `tool-subagent-control` stays host-plane for the
193
+ # same reason as the registry: its tools resolve `ctx.subagents.sendMessage` /
194
+ # interrupt state on the host plane, not a tool this agent registers locally.
195
+ #
196
+ # `tool-subagent` and `tool-subagent-fork` (the harness spawn/fork Task tools)
197
+ # are DISABLED here — the CC Task tool is provided by the `tool-task` row in
198
+ # the cc-services group instead. That replacement Task now implements the
199
+ # continuable loop itself: `run_in_background: true` starts a durable
200
+ # background child on the spawn provider, and send_message /
201
+ # list_agents / interrupt_agent operate on its returned agentId. The harness
202
+ # rows stay disabled. Note for future readers: the disabled
203
+ # `tool-subagent-fork` row's `backgroundMode: continuable` config is inert
204
+ # while the row is disabled, and fork children remain foreground one-shot
205
+ # until upstream harness issue #2124 resolves.
206
+ - id: delegation
207
+ name: cordis:group
208
+ group: true
209
+ isolate:
210
+ workflowEngine: true
211
+ config:
212
+ - id: tool-subagent-control
213
+ name: '@deepseek-ai/dsh-tool-subagent-control'
214
+
215
+ - id: tool-subagent-list-agents
216
+ name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
217
+
218
+ - id: tool-subagent
219
+ name: '@deepseek-ai/dsh-tool-subagent'
220
+ disabled: true
221
+ config:
222
+ provider: spawn
223
+ toolName: subagent
224
+ backgroundMode: continuable
225
+
226
+ - id: tool-subagent-fork
227
+ name: '@deepseek-ai/dsh-tool-subagent'
228
+ disabled: true
229
+ config:
230
+ provider: fork
231
+ toolName: subagent_fork
232
+ backgroundMode: continuable
233
+
234
+ # Production dsh does not install these optional providers. Install the
235
+ # matching Bundle in this Profile and restart the Host, then copy this
236
+ # preset and remove `disabled` from the matching tool row. Host availability
237
+ # alone grants no tool.
238
+ - id: tool-subagent-codex
239
+ name: '@deepseek-ai/dsh-tool-subagent'
240
+ disabled: true
241
+ config:
242
+ provider: codex
243
+ toolName: subagent_codex
244
+ backgroundMode: one-shot
245
+ maxDepth: provider-managed
246
+
247
+ - id: tool-subagent-claude-code
248
+ name: '@deepseek-ai/dsh-tool-subagent'
249
+ disabled: true
250
+ config:
251
+ provider: claude-code
252
+ toolName: subagent_claude_code
253
+ backgroundMode: one-shot
254
+ maxDepth: provider-managed
255
+
256
+ - id: workflow-worker-thread
257
+ name: '@deepseek-ai/dsh-workflow-worker-thread'
258
+ config:
259
+ provider: spawn
260
+
261
+ - id: tool-workflow
262
+ name: '@deepseek-ai/dsh-tool-workflow'
263
+
264
+ - id: tool-ralph
265
+ name: '@deepseek-ai/dsh-tool-ralph'
266
+ config:
267
+ subagentProvider: spawn
268
+ maxRounds: 64
269
+
270
+ # ── remaining model-facing rows ─────────────────────────────────────────────
271
+
272
+ - id: tool-ask-user
273
+ name: '@deepseek-ai/dsh-tool-ask-user'
274
+
275
+ - id: tool-todo
276
+ name: '@deepseek-ai/dsh-tool-todo'
277
+ config:
278
+ allowParallelInProgress: true
279
+
280
+ # The `web` service and its search provider stay in the host composition; only
281
+ # the model-facing tool is per-session.
282
+ #
283
+ # Moved in from the cc-shell global swap. fetch is still disabled here because
284
+ # `@dsh-cc/tool-web-fetch` inside cc-services owns the model-facing tool
285
+ # (adds the optional `prompt` and upgrades http: URLs to https: before the
286
+ # seam). The HTTP executor is the stock `@deepseek-ai/dsh-web-fetch-http`
287
+ # provider from dsh-base, with CC egress caps restated in cc-shell's patch.
288
+ # A prompt without the `haiku` route hard-fails.
289
+ - id: tool-web
290
+ name: '@deepseek-ai/dsh-tool-web'
291
+ config:
292
+ fetch: false
293
+ searchTimeoutMs: 60000
294
+
295
+ # ── cc rows ─────────────────────────────────────────────────────────────────
296
+
297
+ # The CC surface rows, scoped to this preset. They previously lived in the
298
+ # cc-shell global patch ($R/packages/bundle/cc-shell/cordis.patch.yml) and are
299
+ # moved here so they no longer leak into every agent preset that mounts the
300
+ # global host composition.
301
+
302
+ # Service rows MUST sit in a group with an `isolate` realm: mounting this preset
303
+ # rejects any row that publishes a cordis Service into the root realm
304
+ # (PresetMountError / leakedServices). The isolate keys below are all required —
305
+ # the glue dynamically attaches mcp-client as a sub-fiber, and `Context.extend`
306
+ # inherits the group's isolate map down the prototype chain, so without
307
+ # `mcpConnections` isolated here it would publish into the root realm and break
308
+ # the preset. The command rows and the `memory` / `hooks-claude-code` consumers
309
+ # must live INSIDE the group: they `ctx.get('ccModelRoutes')` (and
310
+ # `ctx.get('mcpConnections')`), which resolve to nothing outside the isolated
311
+ # realm. `ccPlugins` is deliberately NOT isolated: the glue publishes it into
312
+ # the ROOT realm from the root fiber (see CcPluginsService in
313
+ # @dsh-cc/bundle-shell) so host-plane siblings — the TUI driver and /help
314
+ # — can resolve it; isolating the name here would shadow that publication and
315
+ # break in-group resolution too. `mcp` (the plugin MCP seam) IS isolated:
316
+ # only in-group loader fibers `ctx.get('mcp')`; a root-realm provide would
317
+ # trip leakedServices (the providing fiber is the cc-mcp-seam child, inside
318
+ # the preset mount). `hooks` (the plugin hooks seam) IS isolated like `mcp`:
319
+ # only in-group loader fibers ctx.get('hooks'); the providing fiber is
320
+ # hooks-claude-code, inside this group — a root-realm provide would trip
321
+ # leakedServices.
322
+ # The bridge's second provide, `hookRun` (WorktreeCreate / WorktreeRemove
323
+ # invocation; docs/plans/2026-09-14-cc-worktree-parity.md WS-6), is
324
+ # deliberately NOT isolated, mirroring `ccPlugins`: its consumer
325
+ # (tool-git-worktree) mounts top-level, outside this group's realm — and like
326
+ # ccPlugins it is provided from the ROOT fiber (see the bridge's root-provide
327
+ # in @dsh-cc/hooks-claude-code), because a plain in-realm provide here would
328
+ # publish a preset fiber's service into the root realm and trip the preset
329
+ # leakedServices gate (agent-preset/invalid at mount).
330
+ - id: cc-services
331
+ name: cordis:group
332
+ group: true
333
+ isolate:
334
+ toolSearch: true
335
+ microcompactor: true
336
+ ccModelRoutes: true
337
+ resumePinStore: true
338
+ mcpConnections: true
339
+ hookBridgeStatus: true
340
+ mcp: true
341
+ hooks: true
342
+ contextCrusher: true
343
+ config:
344
+ # ToolSearch: model-called search that activates deferred tools per scope.
345
+ - id: tool-search
346
+ name: '@dsh-cc/tool-search'
347
+
348
+ # Model-free staleness microcompaction (auto: false by default).
349
+ - id: compaction-micro
350
+ name: '@dsh-cc/compaction-micro'
351
+
352
+ # CCR tool-output compression (plan docs/plans/2026-09-10-ccr-tool-output-compression.md):
353
+ # a `tools/post-execute` listener registered with `prepend: true`, composed
354
+ # post-`next()`, plus the agent-visible `context_retrieve` tool (listener +
355
+ # tool host, no consumed service of its own — but it mounts a Service, so it
356
+ # shares this realm via the `contextCrusher` isolate key above). MUST sit
357
+ # BEFORE the hooks-claude-code row: waterfall listeners dispatch
358
+ # outermost-first in registration order, and the crusher must be outermost
359
+ # so its post-`next()` compression wraps the bridge's PostToolUse fold (the
360
+ # bridge sees the original bytes; the committed result carries the
361
+ # compressed form). The order tripwire is pinned by
362
+ # packages/context/context-crusher/tests/composition.spec.ts.
363
+ - id: context-crusher
364
+ name: '@dsh-cc/context-crusher'
365
+
366
+ # The hook bridge: runs the Claude Code hooks.json / settings hook config
367
+ # on the harness interception seams and provides the `hooks` seam plugin
368
+ # hooks merge through. Must mount BEFORE cc-shell-glue: the glue's
369
+ # CcPluginsService.mountAll probes ctx.get('hooks') at boot, so the bridge
370
+ # must have provided it first. Nothing between glue and bridge consumes
371
+ # bridge services at mount time (command-doctor reads hookBridgeStatus
372
+ # lazily at invocation), and the bridge's interception listeners use
373
+ # prepend:true, so ordering vs permission-rules is compose-order-insensitive.
374
+ - id: hooks-claude-code
375
+ name: '@dsh-cc/hooks-claude-code'
376
+ # Tracked root-level hook config (serena code-intelligence plan Phase 0).
377
+ # Relative configPath resolves against the process launch cwd, so a
378
+ # worktree session started at the worktree root loads it by construction.
379
+ config:
380
+ configPath: hooks.json
381
+
382
+ # CC plugins on disk (agents/skills/commands/hooks/mcp servers) plus the
383
+ # base agent preset dirs and .mcp.json server wiring — see the glue plugin.
384
+ - id: cc-shell-glue
385
+ name: '@dsh-cc/bundle-shell'
386
+
387
+ - id: command-plugin
388
+ name: '@dsh-cc/command-plugin'
389
+
390
+ - id: command-mcp
391
+ name: '@dsh-cc/command-mcp'
392
+
393
+ # Serena-first prompt steering: while a serena MCP server is ready
394
+ # (registry-only, live detection over the isolated `mcpConnections`
395
+ # above), the registered `serena-first` section (order 105) renders the
396
+ # policy paragraph and the assemble waterfall rewrites the upstream
397
+ # `tool:read` / `tool:grep` texts (replace-not-mutate, `{ prepend: true }`).
398
+ # Publishes no Service, so it needs no isolate key of its own;
399
+ # `systemPrompt` resolves through the group via the prototype chain.
400
+ # `serverName` config (default 'serena') drives detection and every
401
+ # emitted `mcp__<serverName>__*` name.
402
+ - id: serena-first
403
+ name: '@dsh-cc/serena-first'
404
+
405
+ # /doctor reads ccModelRoutes, mcpConnections, and hookBridgeStatus, so it
406
+ # shares the group realm.
407
+ - id: command-doctor
408
+ name: '@dsh-cc/command-doctor'
409
+
410
+ # cc-model-routes owns the model-aliases settings namespace and resolver;
411
+ # tool-task provides the CC Task tool (subagent_type dispatch over
412
+ # per-workspace .claude/agents) and reserves the names 'subagent'/'workflow'.
413
+ - id: cc-model-routes
414
+ name: '@dsh-cc/model-aliases'
415
+
416
+ # Resume pins (plan docs/plans/2026-09-04-subagent-resume-pins.md §4.10):
417
+ # one PinStore + the resume gate/overlay/policy per mounted preset, exposed
418
+ # as the `resumePinStore` service (isolated above, like ccModelRoutes). The
419
+ # pins root COLOCATES with the session-persistence root: the harness base
420
+ # patch mounts the jsonl backend at `!!js dshHomePath('sessions')`, and this
421
+ # `!!js` expression resolves `dshHomePath` the same way at entry activation
422
+ # (app-boot provides it on the root ctx before the config tree mounts), so
423
+ # pins always sit next to the durable sessions they pin. Must mount BEFORE
424
+ # tool-task: the Task plugin's spawn capture prefers this service store.
425
+ - id: cc-resume-pins
426
+ name: '@dsh-cc/subagent-resume-pins'
427
+ config:
428
+ pinsRoot: !!js dshHomePath('sessions', 'resume-pins')
429
+
430
+ - id: tool-task
431
+ name: '@dsh-cc/subagent-task'
432
+
433
+ # /agents: query/control surface for continuable background children
434
+ # (plan docs/plans/2026-09-05-continuable-background-ux.md §3.2). Mounts
435
+ # INSIDE cc-services (F8): the read-only snapshot joins the realm-interior
436
+ # resumePinStore with the host-plane subagents/agents registries, then
437
+ # republishes the snapshot as the ROOT-realm `ccAgents` service (CcPlugins
438
+ # pattern) so the TUI local-slash path consumes the SAME snapshot. Must
439
+ # mount AFTER cc-resume-pins.
440
+ - id: command-agents
441
+ name: '@dsh-cc/command-agents'
442
+
443
+ # Memory and the hook bridge consume `ctx.get('ccModelRoutes')` at spawn
444
+ # time (recall small-fast lane / hook model resolution), so they share this
445
+ # realm. memory-consolidation stays OUTSIDE: its forks must keep inheriting
446
+ # the parent route. memory still publishes no cordis Service;
447
+ # hooks-claude-code now provides `hookBridgeStatus` (for /doctor), which is
448
+ # isolated on this group's isolate map — both stay mount-legal under the
449
+ # leakedServices gate only because they sit INSIDE the group.
450
+ - id: memory
451
+ name: '@dsh-cc/memory'
452
+
453
+ # Replaces the stock dsh-tool-web web_fetch (fetch: false above): adds the
454
+ # optional `prompt`, summarized on the cheap lane when the haiku alias is
455
+ # configured; degrades to raw converted text + notice otherwise.
456
+ - id: tool-web-fetch
457
+ name: '@dsh-cc/tool-web-fetch'
458
+
459
+ # Subagent handoff store (plan docs/plans/2026-09-10-subagent-handoff-store.md):
460
+ # the handoff_put / handoff_get tool pair over a content-addressed store
461
+ # under $DSH_HOME/handoff/<projectKey>/. Publishes no Service (plain plugin,
462
+ # memory pattern), so it needs no isolate key of its own; state is entirely
463
+ # on disk (TTL 24h + 500-entry disk-based LRU swept on put), so spawned
464
+ # children in separate processes see the same store.
465
+ - id: handoff-store
466
+ name: '@dsh-cc/handoff-store'
467
+
468
+ # Stage-0 reasoning-fold probe (plan docs/plans/2026-09-10-reasoning-fold-deepseek.md):
469
+ # a READ-ONLY `llm/stream` listener byte-counting reasoning vs text deltas
470
+ # into $DSH_HOME/reasoning-fold/<sessionId>.jsonl. Publishes no Service
471
+ # (plain plugin, handoff-store pattern), so it needs no isolate key of its
472
+ # own; the listener never rewrites the chunk stream (LEDGER-ONLY).
473
+ - id: reasoning-fold
474
+ name: '@dsh-cc/reasoning-fold'
475
+
476
+ # ── parallel rows ──────────────────────────────────────────────────────────
477
+
478
+ # Claude Code skills from user/project/additional roots.
479
+ - id: skill-claude-code
480
+ name: '@dsh-cc/skill-loader'
481
+
482
+ - id: memory-consolidation
483
+ name: '@dsh-cc/memory-consolidation'
484
+
485
+ # Render CLAUDE.md-style output styles to the system prompt.
486
+ - id: cc-output-styles
487
+ name: '@dsh-cc/output-styles'
488
+
489
+ # Coordinator mode: DSH_COORDINATOR_MODE=1 or config enabled.
490
+ - id: coordinator
491
+ name: '@dsh-cc/coordinator'
492
+
493
+ - id: schedule
494
+ name: '@deepseek-ai/dsh-schedule'
495
+
496
+ - id: session-cwd
497
+ name: '@dsh-cc/session-cwd'
498
+
499
+ - id: tool-git-worktree
500
+ name: '@dsh-cc/tool-git-worktree'
501
+
502
+ - id: tool-sleep
503
+ name: '@dsh-cc/tool-sleep'
504
+
505
+ # NotebookEdit: edits Jupyter notebook (.ipynb) cells over the ctx.fs seam
506
+ # with CC's replace/insert/delete, cell addressing, and read-before-write gate.
507
+ - id: tool-notebook-edit
508
+ name: '@dsh-cc/tool-notebook-edit'
509
+
510
+ # StructuredOutput: non-interactive structured-final-response channel, registered
511
+ # only when the deployment declares a schema (CC's SyntheticOutputTool).
512
+ - id: tool-structured-output
513
+ name: '@dsh-cc/tool-structured-output'
514
+
515
+ # ── CC parity slash commands ───────────────────────────────────────────────
516
+
517
+ # CacheHealth: passive prompt-cache prefix-stability observer; /cache-health
518
+ # joins its own llm/stream observation ledger with provider-metered cache
519
+ # usage from session events (detector-only, no request rewriting).
520
+ - id: cache-health
521
+ name: '@dsh-cc/cache-health'
522
+
523
+ - id: command-cost
524
+ name: '@dsh-cc/command-cost'
525
+ config:
526
+ # Composition decides pricing → the package schema stays strict. The preset
527
+ # ships a starter table of official published list prices (USD per 1M
528
+ # tokens), collected 2026-09-10 from the vendor pricing pages; deployments
529
+ # whose billing differs should override the whole modelTable. No '*'
530
+ # wildcard column on purpose: unmatched models report "no price
531
+ # configured" instead of a misleading zero cost. A runtime id with a route
532
+ # prefix (e.g. `llmbox_ant/glm-5.3`) matches the bare model row via suffix
533
+ # matching.
534
+ modelTable:
535
+ # DeepSeek (api-docs.deepseek.com/quick_start/pricing); cache write is
536
+ # not billed separately → cacheWrite 0.
537
+ - model: deepseek-v4-flash-0731
538
+ inputPerMTok: 0.28
539
+ outputPerMTok: 0.42
540
+ cacheReadPerMTok: 0.04
541
+ cacheWritePerMTok: 0
542
+ - model: deepseek-v4-flash
543
+ inputPerMTok: 0.28
544
+ outputPerMTok: 0.42
545
+ cacheReadPerMTok: 0.04
546
+ cacheWritePerMTok: 0
547
+ - model: deepseek-v4-pro
548
+ inputPerMTok: 0.56
549
+ outputPerMTok: 1.68
550
+ cacheReadPerMTok: 0.08
551
+ cacheWritePerMTok: 0
552
+ # GLM (docs.z.ai/guides/overview/pricing); cached-input storage is
553
+ # limited-time free → cacheWrite 0. glm-5.3-flash uses list prices, not
554
+ # the 50%-off promo.
555
+ - model: glm-5.3
556
+ inputPerMTok: 1.4
557
+ outputPerMTok: 4.4
558
+ cacheReadPerMTok: 0.26
559
+ cacheWritePerMTok: 0
560
+ - model: glm-5.2
561
+ inputPerMTok: 1.4
562
+ outputPerMTok: 4.4
563
+ cacheReadPerMTok: 0.26
564
+ cacheWritePerMTok: 0
565
+ - model: glm-5.1
566
+ inputPerMTok: 1.4
567
+ outputPerMTok: 4.4
568
+ cacheReadPerMTok: 0.26
569
+ cacheWritePerMTok: 0
570
+ - model: glm-5
571
+ inputPerMTok: 1.0
572
+ outputPerMTok: 3.2
573
+ cacheReadPerMTok: 0.2
574
+ cacheWritePerMTok: 0
575
+ - model: glm-4.7
576
+ inputPerMTok: 0.6
577
+ outputPerMTok: 2.2
578
+ cacheReadPerMTok: 0.11
579
+ cacheWritePerMTok: 0
580
+ - model: glm-4.6
581
+ inputPerMTok: 0.6
582
+ outputPerMTok: 2.2
583
+ cacheReadPerMTok: 0.11
584
+ cacheWritePerMTok: 0
585
+ - model: glm-4.5
586
+ inputPerMTok: 0.6
587
+ outputPerMTok: 2.2
588
+ cacheReadPerMTok: 0.11
589
+ cacheWritePerMTok: 0
590
+ - model: glm-5.3-flash
591
+ inputPerMTok: 0.15
592
+ outputPerMTok: 0.50
593
+ cacheReadPerMTok: 0.03
594
+ cacheWritePerMTok: 0
595
+ # Kimi (kimi.ai kimi-k3 pricing page).
596
+ - model: kimi-k3
597
+ inputPerMTok: 3.00
598
+ outputPerMTok: 15.00
599
+ cacheReadPerMTok: 0.30
600
+ cacheWritePerMTok: 0
601
+
602
+ - id: command-export
603
+ name: '@dsh-cc/command-export'
604
+
605
+ - id: command-stats
606
+ name: '@dsh-cc/command-stats'
607
+
608
+ - id: command-status
609
+ name: '@dsh-cc/command-status'
610
+
611
+ - id: command-memory
612
+ name: '@dsh-cc/command-memory'
613
+
614
+ - id: command-skills
615
+ name: '@dsh-cc/command-skills'
616
+
617
+ - id: command-help
618
+ name: '@dsh-cc/command-help'
619
+
620
+ - id: command-config
621
+ name: '@dsh-cc/command-config'
622
+
623
+ - id: command-permissions
624
+ name: '@dsh-cc/command-permissions'
625
+
626
+ - id: command-version
627
+ name: '@dsh-cc/command-version'
628
+
629
+ - id: command-release-notes
630
+ name: '@dsh-cc/command-release-notes'
631
+
632
+ - id: command-diff
633
+ name: '@dsh-cc/command-diff'
634
+
635
+ - id: command-init
636
+ name: '@dsh-cc/command-init'
637
+
638
+ - id: command-learn
639
+ name: '@dsh-cc/command-learn'
640
+
641
+ - id: command-tasks
642
+ name: '@dsh-cc/command-tasks'
643
+
644
+ - id: command-resume
645
+ name: '@dsh-cc/command-resume'
646
+
647
+ - id: command-rename
648
+ name: '@dsh-cc/command-rename'
649
+
650
+ - id: command-branch
651
+ name: '@dsh-cc/command-branch'
652
+
653
+ # Cache-stable tool ordering: remembers each scope's last emitted tool-name
654
+ # sequence on the system-prompt/assemble waterfall and appends newly appeared
655
+ # tools (ToolSearch activations, MCP registrations) lexicographically at the
656
+ # tail, so an activation extends the request prefix instead of shifting every
657
+ # tool after the insertion point. cordis waterfall is outermost-first and the
658
+ # outermost listener has the final say, so the plugin registers its assemble
659
+ # listener with `prepend` to stay outermost regardless of row position; the
660
+ # row itself stays last because the composition drift gate expects cc rows at
661
+ # the bottom (the Item 6 L0 prefix-stability e2e is the sentinel).
662
+ # Publishes no Service, so it needs no isolate realm.
663
+ - id: tool-append-order
664
+ name: '@dsh-cc/tool-append-order'
package/package.json ADDED
@@ -0,0 +1,76 @@
1
+ {
2
+ "name": "@dsh-cc/preset-cc",
3
+ "description": "dsh CC mode agent preset: composition-only package mounting the Claude Code surface",
4
+ "version": "0.7.1-rc.1",
5
+ "type": "module",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/dsh-cc/dsh-cc.git",
9
+ "directory": "packages/preset/cc"
10
+ },
11
+ "files": [
12
+ "agent.cordis.yml",
13
+ "preset.yml",
14
+ "README.md",
15
+ "README.zh.md"
16
+ ],
17
+ "license": "Apache-2.0",
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "dependencies": {
22
+ "@dsh-cc/command-agents": "^0.7.1-rc.1",
23
+ "@dsh-cc/command-compact": "^0.7.1-rc.1",
24
+ "@dsh-cc/command-branch": "^0.7.1-rc.1",
25
+ "@dsh-cc/command-config": "^0.7.1-rc.1",
26
+ "@dsh-cc/command-cost": "^0.7.1-rc.1",
27
+ "@dsh-cc/bundle-shell": "^0.7.1-rc.1",
28
+ "@dsh-cc/cache-health": "^0.7.1-rc.1",
29
+ "@dsh-cc/command-diff": "^0.7.1-rc.1",
30
+ "@dsh-cc/command-help": "^0.7.1-rc.1",
31
+ "@dsh-cc/command-export": "^0.7.1-rc.1",
32
+ "@dsh-cc/command-init": "^0.7.1-rc.1",
33
+ "@dsh-cc/command-doctor": "^0.7.1-rc.1",
34
+ "@dsh-cc/command-learn": "^0.7.1-rc.1",
35
+ "@dsh-cc/command-mcp": "^0.7.1-rc.1",
36
+ "@dsh-cc/command-permissions": "^0.7.1-rc.1",
37
+ "@dsh-cc/command-memory": "^0.7.1-rc.1",
38
+ "@dsh-cc/command-plugin": "^0.7.1-rc.1",
39
+ "@dsh-cc/command-release-notes": "^0.7.1-rc.1",
40
+ "@dsh-cc/command-resume": "^0.7.1-rc.1",
41
+ "@dsh-cc/command-skills": "^0.7.1-rc.1",
42
+ "@dsh-cc/command-rename": "^0.7.1-rc.1",
43
+ "@dsh-cc/command-stats": "^0.7.1-rc.1",
44
+ "@dsh-cc/command-status": "^0.7.1-rc.1",
45
+ "@dsh-cc/command-tasks": "^0.7.1-rc.1",
46
+ "@dsh-cc/compaction-basic": "^0.7.1-rc.1",
47
+ "@dsh-cc/command-version": "^0.7.1-rc.1",
48
+ "@dsh-cc/compaction-micro": "^0.7.1-rc.1",
49
+ "@dsh-cc/context-crusher": "^0.7.1-rc.1",
50
+ "@dsh-cc/coordinator": "^0.7.1-rc.1",
51
+ "@dsh-cc/memory": "^0.7.1-rc.1",
52
+ "@dsh-cc/memory-consolidation": "^0.7.1-rc.1",
53
+ "@dsh-cc/hooks-claude-code": "^0.7.1-rc.1",
54
+ "@dsh-cc/model-aliases": "^0.7.1-rc.1",
55
+ "@dsh-cc/session-cwd": "^0.7.1-rc.1",
56
+ "@dsh-cc/output-styles": "^0.7.1-rc.1",
57
+ "@dsh-cc/skill-loader": "^0.7.1-rc.1",
58
+ "@dsh-cc/serena-first": "^0.7.1-rc.1",
59
+ "@dsh-cc/subagent-resume-pins": "^0.7.1-rc.1",
60
+ "@dsh-cc/subagent-task": "^0.7.1-rc.1",
61
+ "@dsh-cc/tool-git-worktree": "^0.7.1-rc.1",
62
+ "@dsh-cc/tool-append-order": "^0.7.1-rc.1",
63
+ "@dsh-cc/tool-sleep": "^0.7.1-rc.1",
64
+ "@dsh-cc/tool-notebook-edit": "^0.7.1-rc.1",
65
+ "@dsh-cc/tool-structured-output": "^0.7.1-rc.1",
66
+ "@dsh-cc/tool-search": "^0.7.1-rc.1",
67
+ "@dsh-cc/handoff-store": "^0.7.1-rc.1",
68
+ "@dsh-cc/tool-web-fetch": "^0.7.1-rc.1",
69
+ "@dsh-cc/reasoning-fold": "^0.7.1-rc.1"
70
+ },
71
+ "devDependencies": {
72
+ "@deepseek-ai/cordis-plugin-include": "link:../../../../deepseek-harness/vendor/include",
73
+ "js-yaml": "^4.1.0",
74
+ "vitest": "^4.1.8"
75
+ }
76
+ }
package/preset.yml ADDED
@@ -0,0 +1,3 @@
1
+ name: CC mode
2
+ description: Full Standard-mode capability, plus the Claude Code surface — .claude plugin directories, Claude hooks, slash commands, persistent memory, output styles, and fetch-enabled Web tools.
3
+ order: 5