dsh-subagent-library 0.3.2 → 0.3.4
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/CHANGELOG.md +28 -0
- package/MIGRATION.md +5 -2
- package/README.en.md +24 -11
- package/README.md +13 -7
- package/assets/readme/screenshot-settings.png +0 -0
- package/lib/client.js +1454 -748
- package/lib/index.js +595 -45
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,34 @@
|
|
|
4
4
|
|
|
5
5
|
This file documents user-facing changes. Format loosely follows [Keep a Changelog]; versions follow [SemVer].
|
|
6
6
|
|
|
7
|
+
## [0.3.4] — 2026-10-14
|
|
8
|
+
|
|
9
|
+
### 修复 / Fixed
|
|
10
|
+
|
|
11
|
+
- 读取名册失败(目录不可读、单文件不可读、YAML 损坏)不会删除任何 profile 的路由覆盖。只有目录列出成功、并且复查确认共享文件确实不存在时,才清理对应覆盖;设置页明确删除仍会清理。
|
|
12
|
+
- A failed roster read (unreadable directory, unreadable file, or broken YAML) does not delete any profile's route overlay. Overlays are removed on read only after a successful listing and a confirmed ENOENT re-check; an explicit settings delete still cleans them.
|
|
13
|
+
- **desktop 与 web 不再共用对方的模型路由**。名册文件仍在 `~/.dsh/subagents/`(角色、提示词、工具范围继续共享),但 `provider` / `model` 按当前 profile 解析:本 profile 没注册的 provider 不再拿去调用,子代理改用本会话的模型;在设置页相对当前显示改过的路由才写到 `_profiles/<profile>/<id>.yaml`。只改描述、或保存时回显被隐藏的外端路由,不会写成 `inherit`,之后本 profile 注册了该 provider 仍会用共享路由。不会改写另一个 profile 的路由。
|
|
14
|
+
- Desktop and web no longer call each other's model routes. Roster files stay in `~/.dsh/subagents/` (role, persona, and tool scope remain shared), but `provider` / `model` resolve against the current profile. A provider that is not registered here is not sent; the child inherits this session's model. Only a route the user changed relative to what this profile displayed is stored in `_profiles/<profile>/<id>.yaml`. Saving a description, or echoing a hidden foreign route, does not pin `inherit`, so a later registration of that provider still uses the shared route. It does not overwrite the other profile's route.
|
|
15
|
+
|
|
16
|
+
## [0.3.3] — 2026-10-09
|
|
17
|
+
|
|
18
|
+
### 变更 / Changed
|
|
19
|
+
|
|
20
|
+
- **设置页重做为分层折叠卡片**:名称与启用开关、角色描述、模型与 Provider、执行标签各自排布;长名称和路由自动换行,描述最多展示两行,不再与标签争抢宽度。展开后字段按「概述 / 路由与执行 / 工具与提示词」分组,宽面板两列、窄面板单列。
|
|
21
|
+
- **Reworked Settings as layered, collapsible cards**: identity and enable state, description, model/provider, and execution tags each have their own space. Long names and routes wrap; descriptions show up to two lines without competing with tags. The grouped editor uses two columns in wide panels and one in narrow panels.
|
|
22
|
+
- 设置页新增顶部摘要带(条目 / 启用 / 已停用 / 未保存计数 + 名册目录)、筛选框(匹配 id、描述、模型…)、全部展开 / 收起,以及新增条目的折叠卡。
|
|
23
|
+
- Added a summary band (entry / enabled / disabled / unsaved counts + roster directory), a filter box (matches id, description, model…), expand/collapse all, and a collapsed add-entry card.
|
|
24
|
+
- 切换启用状态后,折叠卡片直接显示「未保存 / 还原 / 保存修改」;保存后生效,其他条目的未保存草稿继续保留。停用条目排在列表末尾。
|
|
25
|
+
- Toggling enable state exposes an unsaved badge and Revert / Save changes directly on the collapsed card. Changes take effect on save and other drafts are preserved; disabled entries appear last.
|
|
26
|
+
- 界面使用宿主 `--dsw-alias-*` 主题变量并提供回退;统一间距、字号与标签样式,存储和备份说明移入页尾折叠区。
|
|
27
|
+
- Host theme tokens with fallbacks support light/dark modes; spacing, typography and tags are consistent, with storage and backup details in a footer disclosure.
|
|
28
|
+
- 字段校验失败时自动展开出错的那一行,便于定位。
|
|
29
|
+
- A failed field validation now opens the offending row so the problem is visible.
|
|
30
|
+
- 折叠按钮与启用开关使用独立原生控件,补齐字段标签与键盘焦点提示;修复「还原」无法移除新加可选字段的问题。
|
|
31
|
+
- Separate native disclosure and switch controls improve keyboard operation and field labeling. Revert now removes newly added optional fields.
|
|
32
|
+
- 本次变化限于设置页展示与交互:名册 YAML、委派、迁移、存储位置与 API 均未改动。
|
|
33
|
+
- Changes are confined to Settings presentation and interaction: roster YAML, delegation, migration, storage location, and the API are unchanged.
|
|
34
|
+
|
|
7
35
|
## [0.3.2] — 2026-10-04
|
|
8
36
|
|
|
9
37
|
### 变更 / Changed
|
package/MIGRATION.md
CHANGED
|
@@ -140,8 +140,11 @@ npx @deepseek-ai/dsh plugin --profile web add dsh-subagent-library@latest
|
|
|
140
140
|
**Q:迁移会失败吗?失败了会怎样?**
|
|
141
141
|
单条导出失败只影响那一条(它继续以 legacy 兜底,diagnostics 会说明);整体故障(如目录不可写)时条目全部走 legacy 兜底且设置页有警告横幅——**下次使用名册时会自动重试,重启 dsh web 也可立即重试**,不需要手工干预。
|
|
142
142
|
|
|
143
|
+
**Q:desktop 和 web 会不会用到对方的模型?**
|
|
144
|
+
不会再拿对方没在本 profile 注册的 provider 去调用。名册文件仍然共享(角色、提示词、工具范围),模型路由按当前 profile 解析。本 profile 没有该 provider 时,`delegate` 改用本会话模型;在设置页为本 profile 填写的 Provider/模型写在名册目录的 `_profiles/<profile>/<id>.yaml`,不改共享文件里的另一端路由。
|
|
145
|
+
|
|
143
146
|
**Q:名册目录能换地方吗?**
|
|
144
|
-
能。DSH ≤0.1.6 在 `~/.dsh/settings.yaml` 的 `subagent-library.entriesDir` 设置;DSH ≥0.1.7
|
|
147
|
+
能。DSH ≤0.1.6 在 `~/.dsh/settings.yaml` 的 `subagent-library.entriesDir` 设置;DSH ≥0.1.7 在**当前 profile** `cordis.patch.yml` 的 `- id: subagent-library` → `config` 下设置(支持 `~` 与相对路径,相对路径锚定 `~/.dsh`)。
|
|
145
148
|
|
|
146
149
|
**Q:多台机器怎么同步名册?**
|
|
147
150
|
把名册目录纳入你的 dotfiles/git 即可——每条目一个文件,diff 友好。旧配置里的 `entries` 段不建议同步。
|
|
@@ -167,7 +170,7 @@ subagent-library:
|
|
|
167
170
|
# entries: optional legacy 0.2.x map; remove only this key after verification
|
|
168
171
|
```
|
|
169
172
|
|
|
170
|
-
**DSH ≥0.1.7:** the
|
|
173
|
+
**DSH ≥0.1.7:** the current profile's (`web` or `desktop`) `cordis.patch.yml`, under `config` on `- id: subagent-library`. Model routes are per profile: a shared-roster provider that is not registered here is not called, and a route saved on the settings page is stored only for this profile.
|
|
171
174
|
|
|
172
175
|
```yaml
|
|
173
176
|
- id: subagent-library
|
package/README.en.md
CHANGED
|
@@ -30,8 +30,8 @@ Adding entries needs no hand-written config either: ask the main agent to do it,
|
|
|
30
30
|
## Screenshots
|
|
31
31
|
|
|
32
32
|
<p align="center">
|
|
33
|
-
<img src="./assets/readme/screenshot-settings.png" width="75%" alt="Subagent Library settings
|
|
34
|
-
<em>
|
|
33
|
+
<img src="./assets/readme/screenshot-settings.png" width="75%" alt="Subagent Library settings: layered, collapsible cards and roster filtering" /><br>
|
|
34
|
+
<em>Cards start collapsed for a quick view of roles, models and execution settings. Filter and expand to edit; enable-state changes take effect after saving.</em>
|
|
35
35
|
</p>
|
|
36
36
|
|
|
37
37
|
<p align="center">
|
|
@@ -71,7 +71,7 @@ subagent-library:
|
|
|
71
71
|
# fallback throughout 0.3.x — files win; removal planned for 0.4
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
**DSH ≥0.1.7:** edit the
|
|
74
|
+
**DSH ≥0.1.7:** edit the **current profile's** (`web` or `desktop`) `cordis.patch.yml`, under `config` on its `- id: subagent-library` entry. Desktop and web do not call each other's model routes: a shared-roster `provider` that is not registered in the current profile is not used, and the child inherits this session's model. Provider/model saved on the settings page is stored for the current profile only.
|
|
75
75
|
|
|
76
76
|
```yaml
|
|
77
77
|
- id: subagent-library
|
|
@@ -161,14 +161,27 @@ npx @deepseek-ai/dsh plugin --profile web add /absolute/path/to/dsh-subagent-lib
|
|
|
161
161
|
|
|
162
162
|
## Settings page
|
|
163
163
|
|
|
164
|
-
A **Subagent Library**
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
164
|
+
A **Subagent Library** page appears under Settings. **Each entry is a card, closed by
|
|
165
|
+
default**; click its name to open the editor.
|
|
166
|
+
|
|
167
|
+
- **Layered cards** separate the name and enable switch, a description of up to two lines,
|
|
168
|
+
the model and provider, and a wrapping group of execution settings. Long names and model
|
|
169
|
+
routes wrap without squeezing the description or hiding the switch.
|
|
170
|
+
- A **summary band** stays at the top of the page: entry / enabled / disabled / unsaved counts
|
|
171
|
+
plus the roster directory.
|
|
172
|
+
- A **filter box** matches id, description, model and more; Expand/collapse all helps in a long
|
|
173
|
+
roster.
|
|
174
|
+
- **Expanded**, fields are grouped as Overview (description) / Routing & execution (provider,
|
|
175
|
+
model, transport, background mode, reasoning effort, depth, output cap) / Tools & prompt
|
|
176
|
+
(denied tools, persona), with Revert / Delete / Save at the bottom. Fields use two columns
|
|
177
|
+
in wider panels and one in narrow panels, with host light/dark themes and keyboard support.
|
|
178
|
+
- Toggling enable state creates a draft. The collapsed card exposes an unsaved badge and
|
|
179
|
+
Revert / Save changes; the setting takes effect only after saving. Saving one entry does
|
|
180
|
+
not submit other drafts, and Revert restores the entire saved entry.
|
|
181
|
+
- Disabled entries appear last; entries marked as legacy are promoted to files on save.
|
|
182
|
+
Storage and backup details are available in a disclosure at the bottom of the page.
|
|
183
|
+
|
|
184
|
+
Saved changes are written back to `<id>.yaml` in the roster directory and hot-reloaded.
|
|
172
185
|
|
|
173
186
|
> **Security note:** the roster settings endpoint (`/subagent-library/api`) follows the
|
|
174
187
|
> DSH Web Host's local trust boundary — the plugin itself adds no separate authentication
|
package/README.md
CHANGED
|
@@ -37,8 +37,8 @@ DeepSeek Harness 的具名子代理库插件:把常用角色(代码审查、
|
|
|
37
37
|
## 界面
|
|
38
38
|
|
|
39
39
|
<p align="center">
|
|
40
|
-
<img src="./assets/readme/screenshot-settings.png" width="75%" alt="
|
|
41
|
-
<em
|
|
40
|
+
<img src="./assets/readme/screenshot-settings.png" width="75%" alt="子代理库设置页:分层折叠卡片与名册筛选" /><br>
|
|
41
|
+
<em>默认收起的名册卡片:一眼查看角色、模型与执行设置,筛选后展开编辑;启停修改保存后生效。</em>
|
|
42
42
|
</p>
|
|
43
43
|
|
|
44
44
|
<p align="center">
|
|
@@ -77,7 +77,7 @@ subagent-library:
|
|
|
77
77
|
# entries:(可选,遗留)0.2.x 的内联名册在 0.3.x 仍只读兜底,文件优先生效;0.4 移除
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
**DSH ≥0.1.7
|
|
80
|
+
**DSH ≥0.1.7:**编辑**当前 profile**(`web` 或 `desktop`)的 `cordis.patch.yml`,在 `- id: subagent-library` 的 `config` 下配置。desktop 与 web 的模型路由互不影响:共享名册里的 `provider` 若未在当前 profile 注册,调用会改用本会话模型;设置页保存的 Provider/模型只写入当前 profile。
|
|
81
81
|
|
|
82
82
|
```yaml
|
|
83
83
|
- id: subagent-library
|
|
@@ -165,10 +165,16 @@ npx @deepseek-ai/dsh plugin --profile web add /absolute/path/to/dsh-subagent-lib
|
|
|
165
165
|
|
|
166
166
|
## 设置页
|
|
167
167
|
|
|
168
|
-
Settings → 设置
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
Settings → 设置 里新增「子代理库」页面:**每个条目是一张默认收起的卡片**,点击名称展开编辑。
|
|
169
|
+
|
|
170
|
+
- **分层卡片**:名称与启用开关位于首行,角色描述独占一段(最多两行),模型与 Provider 单独展示;可续聊、思考强度、深度、输出上限、角色提示词与工具限制统一排在下方。长名称和模型路由自动换行,标签不再挤占描述空间。
|
|
171
|
+
- **摘要带**常驻页面顶部:条目 / 启用 / 已停用 / 未保存计数 + 名册目录。
|
|
172
|
+
- **筛选框**匹配 id、描述、模型等,配合 全部展开 / 收起 在长名册里定位。
|
|
173
|
+
- **展开后**字段分组为「概述 / 路由与执行 / 工具与提示词」,宽面板两列、窄面板单列;底部是 还原 / 删除 / 保存。界面随宿主切换明暗主题,并支持键盘操作。
|
|
174
|
+
- 开关修改先保留为草稿:折叠卡片上会出现「未保存」提示和「还原 / 保存修改」,保存后才生效。保存一个条目不会提交其他条目的草稿;还原会完整恢复该条目的已保存配置。
|
|
175
|
+
- 停用条目在列表末尾显示;带「旧版条目」徽标的条目保存时自动晋升为文件。页面底部可展开存储与备份说明。
|
|
176
|
+
|
|
177
|
+
保存后的改动写回名册目录下的 `<id>.yaml`,热生效。
|
|
172
178
|
|
|
173
179
|
> **安全提示**:子代理库的设置接口(`/subagent-library/api`)遵循 DSH Web Host 的本地可信边界,插件自身不含独立身份验证层。若将 DSH Web 绑定到局域网 / 公网 / 反向代理,请在外层配置认证与访问控制,不要把该接口暴露给不可信客户端——子代理 persona 与配置可能包含内部工作规则。
|
|
174
180
|
|
|
Binary file
|