@dsh-cc/bundle-shell 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/README.i18n.yaml +6 -0
- package/README.md +32 -0
- package/README.zh.md +24 -0
- package/cordis.patch.yml +57 -0
- package/lib/ccPlugins.d.ts +124 -0
- package/lib/ccPlugins.d.ts.map +1 -0
- package/lib/ccPlugins.js +164 -0
- package/lib/ccPlugins.js.map +1 -0
- package/lib/index.d.ts +54 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +177 -0
- package/lib/index.js.map +1 -0
- package/package.json +86 -0
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.
|
package/README.i18n.yaml
ADDED
|
@@ -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 run verify-translation-pairing --write packages/bundle/cc-shell/README.md
|
|
5
|
+
README.md: 9fa8ca026f1a865d0817737cf74c7fc5314db353
|
|
6
|
+
README.zh.md: a4206536849cefe3ca56886cb429088be0342ff8
|
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# dsh-cc-bundle-shell
|
|
2
|
+
|
|
3
|
+
English | [中文](README.zh.md)
|
|
4
|
+
|
|
5
|
+
The CC shell **host-plane infra** bundle. This package carries the pieces that are genuinely host-level — the tools-registry swap with deferred-name support, and the settings-migrations mechanism — plus the `cc-shell-glue` plugin *code* (the glue code still lives here, but its mount action is performed by the CC preset, not this bundle's patch). All agent-facing composition — tool-search, skill loader, memory, coordinator, worktree/sleep/notebook/structured-output tools, the 19 slash commands, the hook bridge, output-style rendering — moved to the [`@dsh-cc/preset-cc`](../../preset/cc/README.md) composition package, so it can be isolated per preset instead of leaking into every mode.
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
- **Tools registry swap.** Disables the in-box `tools` row and remounts `@dsh-cc/tools`. `reserve()`/`isAdmitted()` join the restrictable-name universe, so permission gates can name deferred tools before they load; the shipped behavior otherwise matches upstream. The base row's `DSH_TOOLS_MODE` toggle is carried forward ($DSH_HOME / process.cwd() semantics unchanged).
|
|
10
|
+
- **Settings migrations.** Mounts `@dsh-cc/settings-migrations` to apply version-gated `settings.json` migrations at startup (equivalent to CC's `runMigrations`). Empty registry — mechanism only — for now.
|
|
11
|
+
- **Glue plugin code (mounted by the CC preset).** `cc-shell-glue` mounts what a cordis patch row cannot express statically: on-disk Claude Code plugins and `.mcp.json` server wiring. Default plugin discovery is `enabledPlugins` ∩ `installed_plugins.json` under `$CLAUDE_CONFIG_DIR` / `~/.claude` (exact `name@marketplace` keys, `installPath` as the plugin root). Explicit `pluginDirs` still flattens those dirs; `[]`/`null` disables. Discovery is best-effort — missing paths and unreadable JSON mount nothing. It also exposes the `ccPlugins` service for live enumeration/rescan of mounted plugins (`/reload-plugins` re-reads the cascade). The glue threads the spawn-time `resolveModel` into `AgentProvider` as a
|
|
12
|
+
**lazy trampoline** over the `ccModelRoutes` service:
|
|
13
|
+
`(model) => ctx.get('ccModelRoutes')?.resolve(model)` — queried on every spawn, degrading to
|
|
14
|
+
inherit the parent route when the service is unmounted.
|
|
15
|
+
|
|
16
|
+
### What moved out of the glue
|
|
17
|
+
|
|
18
|
+
Two pieces that used to live in `cc-shell-glue` moved to their owning packages:
|
|
19
|
+
|
|
20
|
+
- **`model-aliases` settings-namespace registration** → the `@dsh-cc/model-aliases`
|
|
21
|
+
`ccModelRoutes` service (`packages/compat/cc-model-aliases`). The glue no longer registers
|
|
22
|
+
the namespace (a duplicate registration would throw); it only consumes the service lazily.
|
|
23
|
+
`Config.modelAliases` was removed from the glue config.
|
|
24
|
+
- **Base CC-agent discovery** (`~/.claude/agents` + `<cwd>/.claude/agents` → subagent
|
|
25
|
+
providers) → the `@dsh-cc/subagent-task` Task tool, which discovers per the **session**
|
|
26
|
+
cwd (not the host process cwd). `Config.registerBaseAgents` was removed.
|
|
27
|
+
|
|
28
|
+
## Known limits / notes
|
|
29
|
+
|
|
30
|
+
- This bundle no longer globally mounts any agent-facing surface. Only the host-plane infra rows (tools registry swap + settings-migrations) are mounted by this bundle's `cordis.patch.yml`; the glue plugin and all agent surfaces are mounted by `@dsh-cc/preset-cc` so they stay scoped to that preset.
|
|
31
|
+
- Because the tool-web executor row is unshipped by the CLI dependency tree through rc.6, fetch-based web tooling is mounted by the preset, not here; see the preset's "Known limits" for the current fetch status.
|
|
32
|
+
- Project/local `enabledPlugins` are boot-cwd-biased (the glue is a host-plane singleton, same as `.mcp.json`). `/reload-plugins` is the live escape hatch. `$CLAUDE_CONFIG_DIR` is honored for plugin discovery; `.mcp.json` still hardcodes `~/.claude`.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# dsh-cc-bundle-shell
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
CC 壳层的 **host-plane infra** 组合包。本包承载真正属于宿主层的部件——带 deferred-name 支持的 tools 注册表替换、settings-migrations 机制——以及 `cc-shell-glue` 插件的*代码*(glue 代码仍住在这里,但挂载动作由 CC preset 执行,而非本包的 patch)。所有 agent-face 组合——tool-search、skill loader、memory、coordinator、worktree/sleep/notebook/structured-output 工具、19 个斜杠命令、hook 桥、output-style 渲染——都已迁至 [`@dsh-cc/preset-cc`](../../preset/cc/README.md) 组合包,以便按 preset 隔离,而不是泄漏进每个模式。
|
|
6
|
+
|
|
7
|
+
## 作用
|
|
8
|
+
|
|
9
|
+
- **tools 注册表替换。** 禁用 in-box 的 `tools` 行,重挂 `@dsh-cc/tools`。`reserve()`/`isAdmitted()` 加入可限制名 universe,权限门可在 deferred 工具加载前按名门控;其余行为与上游一致。基础行的 `DSH_TOOLS_MODE` 开关被延续($DSH_HOME / process.cwd() 语义不变)。
|
|
10
|
+
- **settings 迁移。** 挂载 `@dsh-cc/settings-migrations`,在启动时应用版本门控的 `settings.json` 迁移(等价于 CC 的 `runMigrations`)。当前为空注册表——仅机制。
|
|
11
|
+
- **glue 插件代码(由 CC preset 挂载)。** `cc-shell-glue` 挂载 cordis patch 行无法静态表达的部件:磁盘上的 Claude Code 插件与 `.mcp.json` server 接线。默认插件发现是 `$CLAUDE_CONFIG_DIR` / `~/.claude` 下 `enabledPlugins` ∩ `installed_plugins.json`(精确 `name@marketplace` key,`installPath` 作为插件根)。显式 `pluginDirs` 仍 flatten 这些目录;`[]`/`null` 关闭。发现为尽力而为——缺失路径与无法读取的 JSON 都不挂载。它还暴露 `ccPlugins` 服务,用于对已挂载插件做实时枚举/重扫(`/reload-plugins` 会重读级联)。glue 以 **惰性 trampoline** 基于 `ccModelRoutes` 服务把派发时的 `resolveModel` 接入 `AgentProvider`:`(model) => ctx.get('ccModelRoutes')?.resolve(model)`——每次派发查询,服务未挂载时降级为继承父路由。
|
|
12
|
+
|
|
13
|
+
### 从 glue 迁出的部分
|
|
14
|
+
|
|
15
|
+
两个原本住在 `cc-shell-glue` 里的部件迁到了各自的属主包:
|
|
16
|
+
|
|
17
|
+
- **`model-aliases` settings 命名空间注册** → `@dsh-cc/model-aliases` 的 `ccModelRoutes` 服务(`packages/compat/cc-model-aliases`)。glue 不再注册该命名空间(重复注册会 throw),只惰性消费服务。glue config 的 `Config.modelAliases` 已删除。
|
|
18
|
+
- **基础 CC-agent 发现**(`~/.claude/agents` + `<cwd>/.claude/agents` → subagent providers)→ `@dsh-cc/subagent-task` 的 Task 工具,它按**会话** cwd(而非宿主进程 cwd)发现。`Config.registerBaseAgents` 已删除。
|
|
19
|
+
|
|
20
|
+
## 已知限制 / 说明
|
|
21
|
+
|
|
22
|
+
- 本包不再全局挂载任何 agent-face 表面。只有 host-plane infra 行(tools 注册表替换 + settings-migrations)由本包的 `cordis.patch.yml` 挂载;glue 插件与所有 agent 表面由 `@dsh-cc/preset-cc` 挂载,从而限定在该 preset 内。
|
|
23
|
+
- 由于 tool-web executor 行在 rc.6 之前未被 CLI 依赖树携带,基于 fetch 的 web 工具由 preset 挂载而非此处;当前 fetch 状态见 preset 的「已知限制」。
|
|
24
|
+
- 项目/local `enabledPlugins` 偏向 boot cwd(glue 是 host-plane 单例,与 `.mcp.json` 相同)。`/reload-plugins` 是热更新出口。插件发现尊重 `$CLAUDE_CONFIG_DIR`;`.mcp.json` 仍写死 `~/.claude`。
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# CC shell host-plane infra swap: the tools registry (deferred-name support)
|
|
2
|
+
# plus settings migrations. Everything agent-facing (tool-search, skill-loader,
|
|
3
|
+
# glue-driven hooks/commands, memory, coordinator, worktree/sleep/notebook/
|
|
4
|
+
# structured-output tools, 19 slash commands, the hook bridge) moved to
|
|
5
|
+
# packages/preset/cc. Rationale: globally registered tools/commands/system-prompt/
|
|
6
|
+
# skills mounted here leak into every agent preset; preset-izing them is what
|
|
7
|
+
# isolates each surface. glue plugin code still lives here but is mounted by the
|
|
8
|
+
# CC preset, not this bundle.
|
|
9
|
+
|
|
10
|
+
# Swap the in-box tool registry for the vendored one. reserve()/isAdmitted()
|
|
11
|
+
# join the restrictable-name universe so permission gates may name deferred
|
|
12
|
+
# tools before they load; the shipped behavior otherwise matches upstream.
|
|
13
|
+
- id: tools
|
|
14
|
+
disabled: true
|
|
15
|
+
|
|
16
|
+
# CC host-plane session-title overlay: disable the stock session-title-llm row
|
|
17
|
+
# and remount a CC provider below (inside the insert list) that stamps the
|
|
18
|
+
# `haiku` cheap lane for first-prompt title generation.
|
|
19
|
+
- id: session-title-llm
|
|
20
|
+
disabled: true
|
|
21
|
+
|
|
22
|
+
- insert:
|
|
23
|
+
# Remount below (in the insert list) with fetch enabled and the fetch provider.
|
|
24
|
+
- id: tools-cc
|
|
25
|
+
name: '@dsh-cc/tools'
|
|
26
|
+
config:
|
|
27
|
+
# Carry the base tools row's DSH_TOOLS_MODE toggle forward (dsh-web-app
|
|
28
|
+
# patches `tools` with it). Absent env ⇒ undefined, the established semantics.
|
|
29
|
+
mode: !!js process.env.DSH_TOOLS_MODE
|
|
30
|
+
|
|
31
|
+
# Settings migrations: apply version-gated settings.json migrations at startup
|
|
32
|
+
# (equivalent to CC's runMigrations). Empty registry — mechanism only — for now.
|
|
33
|
+
- id: settings-migrations
|
|
34
|
+
name: '@dsh-cc/settings-migrations'
|
|
35
|
+
|
|
36
|
+
# Host-plane first-prompt session titles on the CC cheap lane: stamps
|
|
37
|
+
# resolve('haiku') when configured, else inherits the logged main route
|
|
38
|
+
# (explicit provider+model config in this row would win over the alias).
|
|
39
|
+
- id: session-title-llm-cc
|
|
40
|
+
name: '@dsh-cc/session-title-provider'
|
|
41
|
+
config:
|
|
42
|
+
targetWords: 5
|
|
43
|
+
targetCjkCharacters: 10
|
|
44
|
+
maxInputBytes: 4096
|
|
45
|
+
maxOutputTokens: 64
|
|
46
|
+
timeoutMs: 60000
|
|
47
|
+
|
|
48
|
+
# CC fetch provider: SSRF-gated wrapper around the harness HttpFetchProvider.
|
|
49
|
+
# Do NOT also mount the stock web-fetch-http plugin — duplicate id 'http'.
|
|
50
|
+
- id: web-fetch-http-cc
|
|
51
|
+
name: '@dsh-cc/web-fetch-http'
|
|
52
|
+
config:
|
|
53
|
+
timeoutMs: 20000
|
|
54
|
+
maxResponseBytes: 2000000
|
|
55
|
+
maxRedirects: 3
|
|
56
|
+
upgradeInsecure: true
|
|
57
|
+
blockPrivateNetwork: true
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin-mount registry for the cc-shell glue plugin.
|
|
3
|
+
*
|
|
4
|
+
* Tracks every Claude Code plugin directory the glue mounts (keyed by plugin
|
|
5
|
+
* root) and exposes a `ccPlugins` service so host plugins — slash commands such
|
|
6
|
+
* as `/plugin`, `/reload-plugins`, `/mcp` — can enumerate what is mounted and
|
|
7
|
+
* rescan the on-disk discovery roots live. Rescan disposes all tracked mounts
|
|
8
|
+
* in reverse mount order (the innermost/last-mounted tear down first) and then
|
|
9
|
+
* re-runs the same best-effort discovery the glue performs at activation,
|
|
10
|
+
* collecting per-plugin failures without aborting the rest.
|
|
11
|
+
*
|
|
12
|
+
* @module
|
|
13
|
+
*/
|
|
14
|
+
import { Context } from '@deepseek-ai/cordis';
|
|
15
|
+
import { type CcPluginCommandInfo, type PluginLoadReport, type ResolveModel } from '@dsh-cc/plugin-loader';
|
|
16
|
+
export type { CcPluginCommandInfo } from '@dsh-cc/plugin-loader';
|
|
17
|
+
declare module '@deepseek-ai/cordis' {
|
|
18
|
+
interface Context {
|
|
19
|
+
/** The mounted Claude Code plugin registry, when cc-shell-glue is composed. */
|
|
20
|
+
ccPlugins: CcPluginsService;
|
|
21
|
+
}
|
|
22
|
+
interface Events {
|
|
23
|
+
/** The mounted plugin set or its command table changed (mount/rescan). */
|
|
24
|
+
'ccPlugins/change'(): void;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/** Constructor options for the plugin-mount registry. */
|
|
28
|
+
export interface CcPluginsServiceOptions {
|
|
29
|
+
/**
|
|
30
|
+
* Explicit discovery roots. `undefined` uses installed ∩ enabled; `[]` or
|
|
31
|
+
* `null` disables discovery; a non-empty list flattens those dirs.
|
|
32
|
+
*/
|
|
33
|
+
readonly pluginDirs?: readonly string[] | null;
|
|
34
|
+
/** Spawn-time model resolver threaded into every mounted agent. */
|
|
35
|
+
readonly resolveModel?: ResolveModel;
|
|
36
|
+
/** Claude config home; defaults to `$CLAUDE_CONFIG_DIR` / `~/.claude`. */
|
|
37
|
+
readonly claudeHome?: string;
|
|
38
|
+
/** Workspace used for project/local `enabledPlugins`; defaults to `process.cwd()`. */
|
|
39
|
+
readonly cwd?: string;
|
|
40
|
+
}
|
|
41
|
+
/** A tracked plugin mount's public summary. */
|
|
42
|
+
export interface CcPluginSummary {
|
|
43
|
+
/** The plugin's manifest name. */
|
|
44
|
+
name: string;
|
|
45
|
+
/** The plugin root directory holding `plugin.json`. */
|
|
46
|
+
root: string;
|
|
47
|
+
/** Per-component load outcome. */
|
|
48
|
+
components: PluginLoadReport['components'];
|
|
49
|
+
}
|
|
50
|
+
/** One failure (or dispose error) surfaced from a rescan, keyed by plugin root. */
|
|
51
|
+
export interface CcPluginRescanError {
|
|
52
|
+
/** The plugin root that failed to mount (or whose mount failed to dispose). */
|
|
53
|
+
root: string;
|
|
54
|
+
/** The manifest name, when a mount was disposed and the manifest was known. */
|
|
55
|
+
name?: string;
|
|
56
|
+
/** The error message. */
|
|
57
|
+
error: string;
|
|
58
|
+
}
|
|
59
|
+
/** A result of running one plugin command through the local channel. */
|
|
60
|
+
export type CcPluginCommandRunResult = {
|
|
61
|
+
ok: true;
|
|
62
|
+
} | {
|
|
63
|
+
ok: false;
|
|
64
|
+
reason: string;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The `ccPlugins` service: enumerate and rescan the mounted Claude Code plugins.
|
|
68
|
+
*
|
|
69
|
+
* Publication is deliberately host-realm: the CC preset mounts cc-shell-glue
|
|
70
|
+
* inside the `cc-services` isolate realm (`packages/preset/cc/agent.cordis.yml`),
|
|
71
|
+
* and a realm-scoped `Service.provide` stores the implementation under a
|
|
72
|
+
* realm-private key — invisible to host-plane sibling bundles (the TUI driver
|
|
73
|
+
* catalog/run seams, `/help`) whose contexts resolve `ccPlugins` against the
|
|
74
|
+
* root realm. The preset invariant also rejects a preset fiber publishing a
|
|
75
|
+
* service into the root realm, so the sanctioned shape (the invariant's own
|
|
76
|
+
* "move to the host composition") is used instead: the instance is provided
|
|
77
|
+
* from the ROOT fiber via `ctx.root.provide`, making it resolvable by every
|
|
78
|
+
* context (`ctx.get` and property access alike). The registry is process-global
|
|
79
|
+
* discovery (cwd, `~/.claude`), so one root-realm instance is the intended
|
|
80
|
+
* shape. The glue fiber keeps the lifecycle: an effect on it clears the
|
|
81
|
+
* publication when cc-shell-glue unloads, so consumers degrade to `undefined`
|
|
82
|
+
* instead of holding a dead registry; a later remount takes the slot back.
|
|
83
|
+
*/
|
|
84
|
+
export declare class CcPluginsService {
|
|
85
|
+
private readonly options;
|
|
86
|
+
/** Live mounts keyed by plugin root directory. */
|
|
87
|
+
private readonly mounts;
|
|
88
|
+
/** Live plugin commands keyed by their colon display name (`plugin:command`). */
|
|
89
|
+
private readonly commandTable;
|
|
90
|
+
/** The context this registry is mounted on (the glue plugin's context). */
|
|
91
|
+
readonly ctx: Context;
|
|
92
|
+
constructor(ctx: Context, options?: CcPluginsServiceOptions);
|
|
93
|
+
/** Recompute discovery from the stored options (so rescan re-reads the cascade). */
|
|
94
|
+
private discover;
|
|
95
|
+
/** Mount one plugin root and track it; never throws (failures are logged). */
|
|
96
|
+
private mountOne;
|
|
97
|
+
/**
|
|
98
|
+
* Discover and mount every configured plugin root. Returns per-plugin
|
|
99
|
+
* failures without halting the remaining roots.
|
|
100
|
+
*/
|
|
101
|
+
mountAll(): Promise<CcPluginRescanError[]>;
|
|
102
|
+
/** Enumerate the currently mounted plugins. */
|
|
103
|
+
list(): CcPluginSummary[];
|
|
104
|
+
/**
|
|
105
|
+
* Dispose all tracked mounts in reverse mount order, then re-run discovery
|
|
106
|
+
* and mount from the same roots. Individual failures are collected and the
|
|
107
|
+
* remaining plugins still mount. The command table is rebuilt wholesale and
|
|
108
|
+
* a `ccPlugins/change` event fires when the rescan settles.
|
|
109
|
+
*/
|
|
110
|
+
rescan(): Promise<CcPluginRescanError[]>;
|
|
111
|
+
/** Enumerate the mounted plugin commands (colon display names). */
|
|
112
|
+
listPluginCommands(): readonly CcPluginCommandInfo[];
|
|
113
|
+
/**
|
|
114
|
+
* Run one plugin command by its colon display name: render the command body
|
|
115
|
+
* with the raw input substituted for `$ARGUMENTS` and dispatch it as a user
|
|
116
|
+
* prompt on the given agent. This is the local channel for the
|
|
117
|
+
* `plugin:command` form, which never reaches the harness command registry.
|
|
118
|
+
*/
|
|
119
|
+
runPluginCommand(name: string, input: {
|
|
120
|
+
agent: unknown;
|
|
121
|
+
rawInput: string;
|
|
122
|
+
}): Promise<CcPluginCommandRunResult>;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=ccPlugins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ccPlugins.d.ts","sourceRoot":"","sources":["../src/ccPlugins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EAGL,KAAK,mBAAmB,EAGxB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EAClB,MAAM,uBAAuB,CAAA;AAE9B,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAEhE,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,OAAO;QACf,+EAA+E;QAC/E,SAAS,EAAE,gBAAgB,CAAA;KAC5B;IAED,UAAU,MAAM;QACd,0EAA0E;QAC1E,kBAAkB,IAAI,IAAI,CAAA;KAC3B;CACF;AAED,yDAAyD;AACzD,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,IAAI,CAAA;IAC9C,mEAAmE;IACnE,QAAQ,CAAC,YAAY,CAAC,EAAE,YAAY,CAAA;IACpC,0EAA0E;IAC1E,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,sFAAsF;IACtF,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CA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,MAAM,EACZ,KAAK,EAAE;QAAE,KAAK,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAC1C,OAAO,CAAC,wBAAwB,CAAC;CAOrC"}
|
package/lib/ccPlugins.js
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Plugin-mount registry for the cc-shell glue plugin.
|
|
3
|
+
*
|
|
4
|
+
* Tracks every Claude Code plugin directory the glue mounts (keyed by plugin
|
|
5
|
+
* root) and exposes a `ccPlugins` service so host plugins — slash commands such
|
|
6
|
+
* as `/plugin`, `/reload-plugins`, `/mcp` — can enumerate what is mounted and
|
|
7
|
+
* rescan the on-disk discovery roots live. Rescan disposes all tracked mounts
|
|
8
|
+
* in reverse mount order (the innermost/last-mounted tear down first) and then
|
|
9
|
+
* re-runs the same best-effort discovery the glue performs at activation,
|
|
10
|
+
* collecting per-plugin failures without aborting the rest.
|
|
11
|
+
*
|
|
12
|
+
* @module
|
|
13
|
+
*/
|
|
14
|
+
import { Context } from '@deepseek-ai/cordis';
|
|
15
|
+
import { discoverCcPluginRoots, mountCcPlugin, } from '@dsh-cc/plugin-loader';
|
|
16
|
+
/**
|
|
17
|
+
* The `ccPlugins` service: enumerate and rescan the mounted Claude Code plugins.
|
|
18
|
+
*
|
|
19
|
+
* Publication is deliberately host-realm: the CC preset mounts cc-shell-glue
|
|
20
|
+
* inside the `cc-services` isolate realm (`packages/preset/cc/agent.cordis.yml`),
|
|
21
|
+
* and a realm-scoped `Service.provide` stores the implementation under a
|
|
22
|
+
* realm-private key — invisible to host-plane sibling bundles (the TUI driver
|
|
23
|
+
* catalog/run seams, `/help`) whose contexts resolve `ccPlugins` against the
|
|
24
|
+
* root realm. The preset invariant also rejects a preset fiber publishing a
|
|
25
|
+
* service into the root realm, so the sanctioned shape (the invariant's own
|
|
26
|
+
* "move to the host composition") is used instead: the instance is provided
|
|
27
|
+
* from the ROOT fiber via `ctx.root.provide`, making it resolvable by every
|
|
28
|
+
* context (`ctx.get` and property access alike). The registry is process-global
|
|
29
|
+
* discovery (cwd, `~/.claude`), so one root-realm instance is the intended
|
|
30
|
+
* shape. The glue fiber keeps the lifecycle: an effect on it clears the
|
|
31
|
+
* publication when cc-shell-glue unloads, so consumers degrade to `undefined`
|
|
32
|
+
* instead of holding a dead registry; a later remount takes the slot back.
|
|
33
|
+
*/
|
|
34
|
+
export class CcPluginsService {
|
|
35
|
+
options;
|
|
36
|
+
/** Live mounts keyed by plugin root directory. */
|
|
37
|
+
mounts = new Map();
|
|
38
|
+
/** Live plugin commands keyed by their colon display name (`plugin:command`). */
|
|
39
|
+
commandTable = new Map();
|
|
40
|
+
/** The context this registry is mounted on (the glue plugin's context). */
|
|
41
|
+
ctx;
|
|
42
|
+
constructor(ctx, options = {}) {
|
|
43
|
+
this.options = options;
|
|
44
|
+
this.ctx = ctx;
|
|
45
|
+
const root = ctx.root;
|
|
46
|
+
const rootKey = root[Context.isolate]['ccPlugins'];
|
|
47
|
+
const existing = rootKey === undefined ? undefined : root.reflect.store[rootKey];
|
|
48
|
+
if (existing === undefined) {
|
|
49
|
+
root.provide('ccPlugins', this);
|
|
50
|
+
}
|
|
51
|
+
else if (existing.value !== this) {
|
|
52
|
+
// Take the publication back after an unload cleared it (or adopt a
|
|
53
|
+
// stale slot from an unloaded sibling instance).
|
|
54
|
+
root.set('ccPlugins', this);
|
|
55
|
+
}
|
|
56
|
+
ctx.fiber.effect(() => () => {
|
|
57
|
+
if (root.get('ccPlugins', false) === this)
|
|
58
|
+
root.set('ccPlugins', undefined);
|
|
59
|
+
}, 'ccPlugins: clear host-realm publication on unload');
|
|
60
|
+
}
|
|
61
|
+
/** Recompute discovery from the stored options (so rescan re-reads the cascade). */
|
|
62
|
+
discover() {
|
|
63
|
+
return discoverCcPluginRoots({
|
|
64
|
+
...this.options.pluginDirs !== undefined ? { pluginDirs: this.options.pluginDirs } : {},
|
|
65
|
+
...this.options.claudeHome !== undefined ? { claudeHome: this.options.claudeHome } : {},
|
|
66
|
+
...this.options.cwd !== undefined ? { cwd: this.options.cwd } : {},
|
|
67
|
+
log: this.ctx.logger,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/** Mount one plugin root and track it; never throws (failures are logged). */
|
|
71
|
+
async mountOne(plugin) {
|
|
72
|
+
try {
|
|
73
|
+
const mounted = await mountCcPlugin(this.ctx, {
|
|
74
|
+
root: plugin.root,
|
|
75
|
+
nameHint: plugin.nameHint,
|
|
76
|
+
...this.options.resolveModel !== undefined ? { resolveModel: this.options.resolveModel } : {},
|
|
77
|
+
});
|
|
78
|
+
this.mounts.set(plugin.root, {
|
|
79
|
+
root: plugin.root,
|
|
80
|
+
name: mounted.report.name,
|
|
81
|
+
dispose: mounted.dispose,
|
|
82
|
+
report: mounted.report,
|
|
83
|
+
});
|
|
84
|
+
for (const command of mounted.commands) {
|
|
85
|
+
this.commandTable.set(command.info.name, command);
|
|
86
|
+
}
|
|
87
|
+
return { ok: true };
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
const message = String(error);
|
|
91
|
+
this.ctx.logger.warn(`cc-shell-glue: failed to mount CC plugin at ${plugin.root}: ${message}`);
|
|
92
|
+
return { ok: false, error: message };
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Discover and mount every configured plugin root. Returns per-plugin
|
|
97
|
+
* failures without halting the remaining roots.
|
|
98
|
+
*/
|
|
99
|
+
async mountAll() {
|
|
100
|
+
const errors = [];
|
|
101
|
+
for (const plugin of this.discover()) {
|
|
102
|
+
const result = await this.mountOne(plugin);
|
|
103
|
+
if (!result.ok)
|
|
104
|
+
errors.push({ root: plugin.root, error: result.error });
|
|
105
|
+
}
|
|
106
|
+
this.ctx.emit('ccPlugins/change');
|
|
107
|
+
return errors;
|
|
108
|
+
}
|
|
109
|
+
/** Enumerate the currently mounted plugins. */
|
|
110
|
+
list() {
|
|
111
|
+
return Array.from(this.mounts.values()).map(mount => ({
|
|
112
|
+
name: mount.name,
|
|
113
|
+
root: mount.root,
|
|
114
|
+
components: mount.report.components,
|
|
115
|
+
}));
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Dispose all tracked mounts in reverse mount order, then re-run discovery
|
|
119
|
+
* and mount from the same roots. Individual failures are collected and the
|
|
120
|
+
* remaining plugins still mount. The command table is rebuilt wholesale and
|
|
121
|
+
* a `ccPlugins/change` event fires when the rescan settles.
|
|
122
|
+
*/
|
|
123
|
+
async rescan() {
|
|
124
|
+
const errors = [];
|
|
125
|
+
const tracked = Array.from(this.mounts.values()).reverse();
|
|
126
|
+
this.mounts.clear();
|
|
127
|
+
this.commandTable.clear();
|
|
128
|
+
for (const mount of tracked) {
|
|
129
|
+
try {
|
|
130
|
+
mount.dispose();
|
|
131
|
+
}
|
|
132
|
+
catch (error) {
|
|
133
|
+
errors.push({ root: mount.root, name: mount.name, error: String(error) });
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
for (const plugin of this.discover()) {
|
|
137
|
+
const result = await this.mountOne(plugin);
|
|
138
|
+
if (!result.ok)
|
|
139
|
+
errors.push({ root: plugin.root, error: result.error });
|
|
140
|
+
}
|
|
141
|
+
this.ctx.emit('ccPlugins/change');
|
|
142
|
+
return errors;
|
|
143
|
+
}
|
|
144
|
+
/** Enumerate the mounted plugin commands (colon display names). */
|
|
145
|
+
listPluginCommands() {
|
|
146
|
+
return Array.from(this.commandTable.values(), command => command.info);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Run one plugin command by its colon display name: render the command body
|
|
150
|
+
* with the raw input substituted for `$ARGUMENTS` and dispatch it as a user
|
|
151
|
+
* prompt on the given agent. This is the local channel for the
|
|
152
|
+
* `plugin:command` form, which never reaches the harness command registry.
|
|
153
|
+
*/
|
|
154
|
+
async runPluginCommand(name, input) {
|
|
155
|
+
const command = this.commandTable.get(name);
|
|
156
|
+
if (command === undefined)
|
|
157
|
+
return { ok: false, reason: `unknown plugin command "${name}"` };
|
|
158
|
+
const result = await command.run(input);
|
|
159
|
+
if (result.kind === 'success')
|
|
160
|
+
return { ok: true };
|
|
161
|
+
return { ok: false, reason: result.text };
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
//# sourceMappingURL=ccPlugins.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ccPlugins.js","sourceRoot":"","sources":["../src/ccPlugins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAC7C,OAAO,EACL,qBAAqB,EACrB,aAAa,GAMd,MAAM,uBAAuB,CAAA;AAgE9B;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,gBAAgB;IAYR;IAXnB,kDAAkD;IACjC,MAAM,GAAG,IAAI,GAAG,EAAwB,CAAA;IAEzD,iFAAiF;IAChE,YAAY,GAAG,IAAI,GAAG,EAAgC,CAAA;IAEvE,2EAA2E;IAC3D,GAAG,CAAS;IAE5B,YACE,GAAY,EACK,UAAmC,EAAE;QAArC,YAAO,GAAP,OAAO,CAA8B;QAEtD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAA;QACrB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAA;QAClD,MAAM,QAAQ,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAChF,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,IAAI,CAAC,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAA;QACjC,CAAC;aAAM,IAAI,QAAQ,CAAC,KAAK,KAAK,IAAI,EAAE,CAAC;YACnC,mEAAmE;YACnE,iDAAiD;YACjD,I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,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAA;QACzE,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;QACjC,OAAO,MAAM,CAAA;IACf,CAAC;IAED,mEAAmE;IACnE,kBAAkB;QAChB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACxE,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,gBAAgB,CACpB,IAAY,EACZ,KAA2C;QAE3C,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;QAC3C,IAAI,OAAO,KAAK,SAAS;YAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,2BAA2B,IAAI,GAAG,EAAE,CAAA;QAC3F,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,KAA6E,CAAC,CAAA;QAC/G,IAAI,MAAM,CAAC,IAAI,KAAK,SAAS;YAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAA;QAClD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,EAAE,CAAA;IAC3C,CAAC;CACF"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Glue plugin for the cc-shell bundle: mounts the things cordis patch rows
|
|
3
|
+
* cannot express statically — Claude Code plugin directories on disk and MCP
|
|
4
|
+
* server configs from `.mcp.json`. Base CC-agent discovery moved to the
|
|
5
|
+
* subagent/task package (per-workspace), and the `model-aliases` namespace is
|
|
6
|
+
* owned by the `@dsh-cc/model-aliases` routes service. Discovery is
|
|
7
|
+
* best-effort: every absent path simply mounts nothing.
|
|
8
|
+
*
|
|
9
|
+
* MCP config discovery is source-separated: dsh-native config
|
|
10
|
+
* (`<cwd>/.mcp.json` and `$DSH_HOME/.mcp.json`) takes precedence — when a
|
|
11
|
+
* dsh-native file declares at least one server, the Claude Code files
|
|
12
|
+
* (`$CLAUDE_CONFIG_DIR/.mcp.json` / `~/.claude/.mcp.json` and
|
|
13
|
+
* `~/.claude.json`) are NOT loaded, and a notice points at `/mcp migrate`
|
|
14
|
+
* (which imports them into `$DSH_HOME/.mcp.json`; a session restart makes the
|
|
15
|
+
* import effective). The `mcpLoadClaudeFiles: true` knob restores the old
|
|
16
|
+
* all-merge behavior, and an explicit `mcpConfigFiles` list is always honored
|
|
17
|
+
* verbatim with no gating and no notice.
|
|
18
|
+
*
|
|
19
|
+
* @module @dsh-cc/bundle-shell
|
|
20
|
+
*/
|
|
21
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
22
|
+
import z from '@deepseek-ai/schemastery';
|
|
23
|
+
/** Plugin config: which on-disk CC surfaces to mount. */
|
|
24
|
+
export interface Config {
|
|
25
|
+
/**
|
|
26
|
+
* Directories that each carry a plugin.json (or `.claude-plugin/plugin.json`).
|
|
27
|
+
* Absent → installed ∩ enabled under `$CLAUDE_CONFIG_DIR` / `~/.claude`;
|
|
28
|
+
* explicit [] or null disables.
|
|
29
|
+
*/
|
|
30
|
+
pluginDirs?: string[] | null;
|
|
31
|
+
/** `.mcp.json` documents whose accepted servers become mcp-client instances. Absent → discovery defaults; explicit [] or null disables. */
|
|
32
|
+
mcpConfigFiles?: string[] | null;
|
|
33
|
+
/**
|
|
34
|
+
* Restore the old all-merge MCP discovery: `true` loads the dsh files AND
|
|
35
|
+
* the Claude Code files together with no gating and no notice. Absent,
|
|
36
|
+
* `null`, or `false` keeps the new gated discovery — dsh-native config
|
|
37
|
+
* declaring ≥ 1 server takes precedence and Claude Code files are skipped
|
|
38
|
+
* with a notice pointing at `/mcp migrate`. Ignored when `mcpConfigFiles`
|
|
39
|
+
* is set explicitly.
|
|
40
|
+
*/
|
|
41
|
+
mcpLoadClaudeFiles?: boolean | null;
|
|
42
|
+
}
|
|
43
|
+
/** Runtime config schema (all fields optional; discovery prefers explicit lists). */
|
|
44
|
+
export declare const Config: z<Config>;
|
|
45
|
+
/** Cordis plugin id. */
|
|
46
|
+
export declare const name = "cc-shell-glue";
|
|
47
|
+
/**
|
|
48
|
+
* Mount the discovered CC surfaces. Each piece is effect-scoped where the
|
|
49
|
+
* underlying loader supports it.
|
|
50
|
+
* @param ctx - the plug context.
|
|
51
|
+
* @param config - discovery configuration.
|
|
52
|
+
*/
|
|
53
|
+
export declare function apply(ctx: Context, config: Config): Promise<void>;
|
|
54
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,CAAC,MAAM,0BAA0B,CAAA;AAexC,yDAAyD;AACzD,MAAM,WAAW,MAAM;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAC5B,2IAA2I;IAC3I,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAChC;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;CACpC;AAED,qFAAqF;AACrF,eAAO,MAAM,MAAM,EAAE,CAAC,CAAC,MAAM,CAM3B,CAAA;AAEF,wBAAwB;AACxB,eAAO,MAAM,IAAI,kBAAkB,CAAA;AAEnC;;;;;GAKG;AACH,wBAAsB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoIvE"}
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Glue plugin for the cc-shell bundle: mounts the things cordis patch rows
|
|
3
|
+
* cannot express statically — Claude Code plugin directories on disk and MCP
|
|
4
|
+
* server configs from `.mcp.json`. Base CC-agent discovery moved to the
|
|
5
|
+
* subagent/task package (per-workspace), and the `model-aliases` namespace is
|
|
6
|
+
* owned by the `@dsh-cc/model-aliases` routes service. Discovery is
|
|
7
|
+
* best-effort: every absent path simply mounts nothing.
|
|
8
|
+
*
|
|
9
|
+
* MCP config discovery is source-separated: dsh-native config
|
|
10
|
+
* (`<cwd>/.mcp.json` and `$DSH_HOME/.mcp.json`) takes precedence — when a
|
|
11
|
+
* dsh-native file declares at least one server, the Claude Code files
|
|
12
|
+
* (`$CLAUDE_CONFIG_DIR/.mcp.json` / `~/.claude/.mcp.json` and
|
|
13
|
+
* `~/.claude.json`) are NOT loaded, and a notice points at `/mcp migrate`
|
|
14
|
+
* (which imports them into `$DSH_HOME/.mcp.json`; a session restart makes the
|
|
15
|
+
* import effective). The `mcpLoadClaudeFiles: true` knob restores the old
|
|
16
|
+
* all-merge behavior, and an explicit `mcpConfigFiles` list is always honored
|
|
17
|
+
* verbatim with no gating and no notice.
|
|
18
|
+
*
|
|
19
|
+
* @module @dsh-cc/bundle-shell
|
|
20
|
+
*/
|
|
21
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
22
|
+
import z from '@deepseek-ai/schemastery';
|
|
23
|
+
import { createUserMessage } from '@deepseek-ai/dsh-llm';
|
|
24
|
+
import { buildRegistrations, claudeOnlyServers, readMcpServerNames, resolveDefaultMcpPaths, } from '@dsh-cc/mcp-config';
|
|
25
|
+
import * as CcMcpClient from '@dsh-cc/mcp-client';
|
|
26
|
+
import { CcPluginsService } from "./ccPlugins.js";
|
|
27
|
+
/** Runtime config schema (all fields optional; discovery prefers explicit lists). */
|
|
28
|
+
export const Config = z.object({
|
|
29
|
+
// union with null: bare z.array() gets an implicit [] default from schemastery,
|
|
30
|
+
// which would defeat the absent → discovery-fallback semantics below.
|
|
31
|
+
pluginDirs: z.union([z.array(z.string()), z.const(null)]),
|
|
32
|
+
mcpConfigFiles: z.union([z.array(z.string()), z.const(null)]),
|
|
33
|
+
mcpLoadClaudeFiles: z.union([z.boolean(), z.const(null)]),
|
|
34
|
+
});
|
|
35
|
+
/** Cordis plugin id. */
|
|
36
|
+
export const name = 'cc-shell-glue';
|
|
37
|
+
/**
|
|
38
|
+
* Mount the discovered CC surfaces. Each piece is effect-scoped where the
|
|
39
|
+
* underlying loader supports it.
|
|
40
|
+
* @param ctx - the plug context.
|
|
41
|
+
* @param config - discovery configuration.
|
|
42
|
+
*/
|
|
43
|
+
export async function apply(ctx, config) {
|
|
44
|
+
const results = [];
|
|
45
|
+
// The registry must outlive any single mcp-client instance: when an instance with
|
|
46
|
+
// failOnStartupError fails at startup, cordis rolls that fiber back and would
|
|
47
|
+
// dispose a lazily instance-provided registry with it. Provide it from a dedicated
|
|
48
|
+
// child fiber that is ACTIVE before any instance mounts (a direct
|
|
49
|
+
// `new McpConnectionsService(ctx)` here would stay invisible: this fiber is LOADING
|
|
50
|
+
// and ctx.get is strict).
|
|
51
|
+
if (ctx.get('mcpConnections') === undefined) {
|
|
52
|
+
await ctx.plugin({
|
|
53
|
+
name: 'cc-mcp-connections',
|
|
54
|
+
apply(c) {
|
|
55
|
+
new CcMcpClient.McpConnectionsService(c);
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
// The spawn-time model resolver is provided by the `@dsh-cc/model-aliases`
|
|
60
|
+
// routes service (`ccModelRoutes`). Query it lazily on every spawn so mount
|
|
61
|
+
// order doesn't matter and an unmounted routes service degrades to inherit.
|
|
62
|
+
const resolveModel = (model) => ctx.get('ccModelRoutes')?.resolve(model);
|
|
63
|
+
// 1. Claude Code plugins. Absent pluginDirs uses installed ∩ enabled;
|
|
64
|
+
// explicit []/null disables; a non-empty list flattens those dirs.
|
|
65
|
+
const plugins = new CcPluginsService(ctx, {
|
|
66
|
+
...config.pluginDirs !== undefined ? { pluginDirs: config.pluginDirs } : {},
|
|
67
|
+
resolveModel,
|
|
68
|
+
});
|
|
69
|
+
await plugins.mountAll();
|
|
70
|
+
for (const summary of plugins.list()) {
|
|
71
|
+
const tallies = summary.components;
|
|
72
|
+
const loaded = tallies.reduce((n, c) => n + c.loaded, 0);
|
|
73
|
+
const skipped = tallies.reduce((n, c) => n + c.skipped, 0);
|
|
74
|
+
results.push(`cc-plugin ${summary.name}: ${loaded} loaded/${skipped} skipped`);
|
|
75
|
+
}
|
|
76
|
+
// 2. `.mcp.json` documents → per-server @dsh-cc/mcp-client instances.
|
|
77
|
+
// An explicit `mcpConfigFiles` list is honored verbatim — no gating, no
|
|
78
|
+
// notice. Discovery mode resolves the default paths and gates the Claude
|
|
79
|
+
// Code files behind a non-empty dsh-native config (≥ 1 declared server):
|
|
80
|
+
// the dsh config then takes sole effect and skipped Claude Code servers
|
|
81
|
+
// surface as a notice pointing at `/mcp migrate`.
|
|
82
|
+
//
|
|
83
|
+
// Mounts are deferred (`deferStartupConnect`): each plugin instance
|
|
84
|
+
// activates without awaiting its MCP handshake, so the first frame is
|
|
85
|
+
// not blocked on spawned servers; the handshakes still overlap because
|
|
86
|
+
// the serial mounts each spawn their child synchronously.
|
|
87
|
+
const deferredNames = [];
|
|
88
|
+
let files;
|
|
89
|
+
let gatedPaths;
|
|
90
|
+
let noticeSources = [];
|
|
91
|
+
if (config.mcpConfigFiles !== undefined) {
|
|
92
|
+
// Explicit list honored verbatim; []/null disables MCP config mounts.
|
|
93
|
+
files = config.mcpConfigFiles ?? [];
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
const paths = resolveDefaultMcpPaths();
|
|
97
|
+
let dshServerCount = 0;
|
|
98
|
+
for (const file of paths.dsh) {
|
|
99
|
+
const names = readMcpServerNames(file);
|
|
100
|
+
if (names.kind === 'ok')
|
|
101
|
+
dshServerCount += names.names.length;
|
|
102
|
+
}
|
|
103
|
+
const gated = dshServerCount > 0 && config.mcpLoadClaudeFiles !== true;
|
|
104
|
+
files = gated ? paths.dsh : [...paths.dsh, ...paths.claude];
|
|
105
|
+
if (gated) {
|
|
106
|
+
noticeSources = claudeOnlyServers(paths);
|
|
107
|
+
if (noticeSources.length > 0)
|
|
108
|
+
gatedPaths = paths;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
for (const file of files) {
|
|
112
|
+
if (!existsSync(file))
|
|
113
|
+
continue;
|
|
114
|
+
try {
|
|
115
|
+
const body = JSON.parse(readFileSync(file, 'utf8'));
|
|
116
|
+
const registrations = buildRegistrations(body, { env: process.env, deferStartupConnect: true });
|
|
117
|
+
for (const server of registrations) {
|
|
118
|
+
try {
|
|
119
|
+
await ctx.plugin(CcMcpClient, server);
|
|
120
|
+
deferredNames.push(server.serverName);
|
|
121
|
+
results.push(`mcp server ${server.serverName} mounted from ${file}`);
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
ctx.logger.warn(`cc-shell-glue: failed to mount MCP server ${server.serverName} from ${file}: ${String(error)}`);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
ctx.logger.warn(`cc-shell-glue: failed to mount MCP config ${file}: ${String(error)}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// 3. Deferred-connect visibility window: prompts submitted while a deferred
|
|
133
|
+
// server is still handshaking cannot see its `mcp__*` tools. When any
|
|
134
|
+
// deferred server was mounted, register a one-shot `agent/session-start`
|
|
135
|
+
// hook (same pattern as the gating notice below) that lists the servers
|
|
136
|
+
// still `connecting` at that moment. The pending set is evaluated at fire
|
|
137
|
+
// time — fast handshakes settle right after the mount loop, so a boot
|
|
138
|
+
// where everything is ready by the first prompt injects nothing.
|
|
139
|
+
if (deferredNames.length > 0) {
|
|
140
|
+
let fired = false;
|
|
141
|
+
ctx.on('agent/session-start', ({ agent }) => {
|
|
142
|
+
// One shot per process, consumed even when suppressed.
|
|
143
|
+
if (fired)
|
|
144
|
+
return;
|
|
145
|
+
fired = true;
|
|
146
|
+
const registry = ctx.get('mcpConnections');
|
|
147
|
+
const pending = registry === undefined
|
|
148
|
+
? []
|
|
149
|
+
: registry.entries()
|
|
150
|
+
.filter(entry => deferredNames.includes(entry.name) && entry.state === 'connecting')
|
|
151
|
+
.map(entry => entry.name);
|
|
152
|
+
if (pending.length === 0)
|
|
153
|
+
return;
|
|
154
|
+
const text = `MCP: still connecting — ${pending.join(', ')}. Tools from these servers become available once ready.`;
|
|
155
|
+
agent.inject(createUserMessage({ content: [{ type: 'text', text }], source: { kind: 'plugin', plugin: 'cc-shell-glue', form: 'notice', summary: text } }));
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
// 4. Gating notice: warn immediately, then inject once on the first
|
|
159
|
+
// `agent/session-start` (the TUI cannot see logger.warn). The closure
|
|
160
|
+
// flag makes it fire exactly once per process even when subagent/resume
|
|
161
|
+
// fan-out re-emits the event.
|
|
162
|
+
if (gatedPaths !== undefined && noticeSources.length > 0) {
|
|
163
|
+
const skipped = noticeSources.map(source => `${source.path} (${source.names.length} servers)`).join(', ');
|
|
164
|
+
const text = `MCP: dsh config takes precedence — skipped Claude Code MCP config: ${skipped}. Run /mcp migrate to import them into ${gatedPaths.target}, then restart the session.`;
|
|
165
|
+
ctx.logger.warn(`cc-shell-glue: ${text}`);
|
|
166
|
+
let fired = false;
|
|
167
|
+
ctx.on('agent/session-start', ({ agent }) => {
|
|
168
|
+
if (fired)
|
|
169
|
+
return;
|
|
170
|
+
fired = true;
|
|
171
|
+
agent.inject(createUserMessage({ content: [{ type: 'text', text }], source: { kind: 'plugin', plugin: 'cc-shell-glue', form: 'notice', summary: text } }));
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
if (results.length > 0)
|
|
175
|
+
ctx.logger.info(`cc-shell-glue: mounted — ${results.join('; ')}`);
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@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AAI,CAAC,IAAI,CAAC,CAAA;QACzG,MAAM,IAAI,GAAG,sEAAsE,OAAO,0CAA0C,UAAU,CAAC,MAAM,6BAA6B,CAAA;QAClL,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,kBAAkB,IAAI,EAAE,CAAC,CAAA;QACzC,IAAI,KAAK,GAAG,KAAK,CAAA;QACjB,GAAG,CAAC,EAAE,CAAC,qBAAqB,EAAE,CAAC,EAAE,KAAK,EAAiD,EAAE,EAAE;YACzF,IAAI,KAAK;gBAAE,OAAM;YACjB,KAAK,GAAG,IAAI,CAAA;YACZ,KAAK,CAAC,MAAM,CAAC,iBAAiB,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAA;QAC5J,CAAC,CAAC,CAAA;IACJ,CAAC;IAED,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;QAAE,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,4BAA4B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAC3F,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dsh-cc/bundle-shell",
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "CC shell host-plane infra: tools registry swap (deferred-name support) + settings migrations; the glue plugin code lives here but is mounted by the CC preset (packages/preset/cc)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"types": "lib/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"lib",
|
|
10
|
+
"cordis.patch.yml"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./lib/index.d.ts",
|
|
15
|
+
"default": "./lib/index.js"
|
|
16
|
+
},
|
|
17
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
18
|
+
"./src/*": "./src/*",
|
|
19
|
+
"./package.json": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
"dsh": {
|
|
22
|
+
"bundle": {
|
|
23
|
+
"patch": "./cordis.patch.yml"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/dsh-cc/dsh-cc.git",
|
|
29
|
+
"directory": "packages/bundle/cc-shell"
|
|
30
|
+
},
|
|
31
|
+
"license": "Apache-2.0",
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@deepseek-ai/cordis": ">=0.1.1-rc.2",
|
|
34
|
+
"@deepseek-ai/dsh-llm": ">=0.1.1-rc.2",
|
|
35
|
+
"@deepseek-ai/dsh-settings": ">=0.1.1-rc.2"
|
|
36
|
+
},
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@dsh-cc/claude-code-agents": "^0.5.0",
|
|
39
|
+
"@dsh-cc/plugin-loader": "^0.5.0",
|
|
40
|
+
"@dsh-cc/mcp-config": "^0.5.0",
|
|
41
|
+
"@dsh-cc/session-title-provider": "^0.5.0",
|
|
42
|
+
"@dsh-cc/model-aliases": "^0.5.0",
|
|
43
|
+
"@dsh-cc/mcp-client": "^0.5.0",
|
|
44
|
+
"@dsh-cc/web-fetch-http": "^0.5.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@deepseek-ai/dsh-settings": "link:../../../../deepseek-harness/packages/settings/settings",
|
|
48
|
+
"@deepseek-ai/cordis": "link:../../../../deepseek-harness/vendor/cordis",
|
|
49
|
+
"@deepseek-ai/cordis-plugin-loader": "link:../../../../deepseek-harness/vendor/loader",
|
|
50
|
+
"@deepseek-ai/schemastery": "link:../../../../deepseek-harness/vendor/schemastery",
|
|
51
|
+
"@deepseek-ai/dsh-agent": "link:../../../../deepseek-harness/packages/core/agent",
|
|
52
|
+
"@deepseek-ai/dsh-agent-loop": "link:../../../../deepseek-harness/packages/core/agent-loop",
|
|
53
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "link:../../../../deepseek-harness/packages/test-support/agent-loop-testkit",
|
|
54
|
+
"@deepseek-ai/dsh-llm": "link:../../../../deepseek-harness/packages/llm/llm",
|
|
55
|
+
"@deepseek-ai/dsh-schedule": "link:../../../../deepseek-harness/packages/schedule/schedule",
|
|
56
|
+
"@deepseek-ai/dsh-session": "link:../../../../deepseek-harness/packages/core/session",
|
|
57
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "link:../../../../deepseek-harness/packages/session/session-persistence-jsonl",
|
|
58
|
+
"@deepseek-ai/dsh-session-projection": "link:../../../../deepseek-harness/packages/session/session-projection",
|
|
59
|
+
"@deepseek-ai/dsh-subagent": "link:../../../../deepseek-harness/packages/subagent/subagent",
|
|
60
|
+
"@deepseek-ai/dsh-subagent-spawn-in-process": "link:../../../../deepseek-harness/packages/subagent/subagent-spawn-in-process",
|
|
61
|
+
"@deepseek-ai/dsh-tool-subagent-control": "link:../../../../deepseek-harness/packages/subagent/tool-subagent-control",
|
|
62
|
+
"@deepseek-ai/dsh-tool-subagent-report": "link:../../../../deepseek-harness/packages/subagent/tool-subagent-report",
|
|
63
|
+
"@deepseek-ai/dsh-system-prompt": "link:../../../../deepseek-harness/packages/core/system-prompt",
|
|
64
|
+
"@deepseek-ai/dsh-tool-web": "link:../../../../deepseek-harness/packages/web/tool-web",
|
|
65
|
+
"@deepseek-ai/dsh-tools": "link:../../../../deepseek-harness/packages/core/tools",
|
|
66
|
+
"@deepseek-ai/dsh-tool-ask-user": "link:../../../../deepseek-harness/packages/interaction/tool-ask-user",
|
|
67
|
+
"@deepseek-ai/dsh-user-questions": "link:../../../../deepseek-harness/packages/interaction/user-questions",
|
|
68
|
+
"@deepseek-ai/dsh-lsp": "link:../../../../deepseek-harness/packages/lsp/lsp",
|
|
69
|
+
"@deepseek-ai/dsh-lsp-stdio": "link:../../../../deepseek-harness/packages/lsp/lsp-stdio",
|
|
70
|
+
"@deepseek-ai/dsh-tool-lsp": "link:../../../../deepseek-harness/packages/lsp/tool-lsp",
|
|
71
|
+
"@deepseek-ai/dsh-web": "link:../../../../deepseek-harness/packages/web/web",
|
|
72
|
+
"@deepseek-ai/dsh-web-fetch-http": "link:../../../../deepseek-harness/packages/web/web-fetch-http",
|
|
73
|
+
"typescript": "6.0.3",
|
|
74
|
+
"@deepseek-ai/dsh-fs-local": "link:../../../../deepseek-harness/packages/fs/fs-local",
|
|
75
|
+
"@dsh-cc/tool-notebook-edit": "^0.5.0",
|
|
76
|
+
"@dsh-cc/tools": "^0.5.0",
|
|
77
|
+
"@dsh-cc/settings-migrations": "^0.5.0",
|
|
78
|
+
"@dsh-cc/subagent-resume-pins": "^0.5.0",
|
|
79
|
+
"@dsh-cc/tool-structured-output": "^0.5.0",
|
|
80
|
+
"@dsh-cc/tool-sleep": "^0.5.0",
|
|
81
|
+
"@dsh-cc/subagent-task": "^0.5.0"
|
|
82
|
+
},
|
|
83
|
+
"publishConfig": {
|
|
84
|
+
"access": "public"
|
|
85
|
+
}
|
|
86
|
+
}
|