dsh-subagent-library 0.3.0 → 0.3.2
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 +29 -0
- package/MIGRATION.md +64 -24
- package/README.en.md +32 -9
- package/README.md +29 -7
- package/assets/readme/screenshot-settings.png +0 -0
- package/lib/index.js +177 -652
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,35 @@
|
|
|
4
4
|
|
|
5
5
|
This file documents user-facing changes. Format loosely follows [Keep a Changelog]; versions follow [SemVer].
|
|
6
6
|
|
|
7
|
+
## [0.3.2] — 2026-10-04
|
|
8
|
+
|
|
9
|
+
### 变更 / Changed
|
|
10
|
+
|
|
11
|
+
- 插件列表和详情页新增随 DeepSeek Harness 界面语言切换的中英文名称与简介。
|
|
12
|
+
- Added localized English and Chinese names and descriptions for the plugin list and detail page.
|
|
13
|
+
- 仅修改展示元数据;YAML 名册、委派、迁移和设置页行为不变。
|
|
14
|
+
- Display metadata only; YAML roster, delegation, migration, and Settings behavior are unchanged.
|
|
15
|
+
|
|
16
|
+
## [0.3.1] — 2026-09-29(DSH 0.1.7-rc.2 适配)
|
|
17
|
+
|
|
18
|
+
### 修复 / Fixed
|
|
19
|
+
|
|
20
|
+
- **适配 DSH 0.1.7-rc.2**:0.3.0 的旧设置 seam 在新宿主上调用不存在的 `register()`,因此插件启动失败并返回整体 503;这不是由 bundle 中的 `settingsNamespace` 命名导入直接造成的。插件现在**运行时结构探测两代宿主**:≤0.1.6 走原 `register()` 通道;≥0.1.7 直接使用 Loader 活配置,旧条目兜底的清除改经官方 `ctx.configEditor` 通道。名册文件(`~/.dsh/subagents/*.yaml`)在两代宿主上行为一致。
|
|
21
|
+
- Adapts to DSH 0.1.7-rc.2: 0.3.0's legacy settings seam called `register()`, which the new host does not provide, so startup failed with an overall 503; the direct cause was not a named `settingsNamespace` import from the bundle. The plugin now detects the host generation at runtime: ≤0.1.6 keeps the `register()` channel; ≥0.1.7 uses the Loader live config plus the official `ctx.configEditor` for legacy cleanup. Roster files behave identically on both.
|
|
22
|
+
- `.yml` 条目收敛死锁修复:内容未变的 `.yml` 条目此前会因跳过写入而永远保持双文件冲突;现在非规范后缀行即使内容未变也会收敛为 `.yaml`,原 `.yml` 的手写注释会丢失。
|
|
23
|
+
- Fixed a convergence deadlock for unchanged `.yml` rows: they now converge to generated `.yaml` even when their content is unchanged, losing hand-written comments from the `.yml` file.
|
|
24
|
+
- 收敛写入失败现在明确返回 HTTP 500(可能已经部分完成);规范 `.yaml` 的跳过路径若残留 `.yml` 清扫失败,则返回 200 并带 warning,故障解除后可重试收敛。
|
|
25
|
+
- Convergence failures now return HTTP 500 and may be partial; a failed `.yml` sweep on the canonical `.yaml` skip path returns 200 with a warning and can be retried after the fault clears.
|
|
26
|
+
- 修复本次未发布适配候选引入的旧宿主(≤0.1.6)回归:`describe()` 恢复方法调用形态(detached 调用会因 `this` 丢失被吞错,导致 legacyCount 误报 0、清除假成功)。
|
|
27
|
+
- Fixed a legacy-host regression introduced in this unreleased compatibility candidate: `describe()` retains its receiver, preventing swallowed errors, a false zero legacy count, and cleanup that reports success without removing legacy copies.
|
|
28
|
+
- 修复本次未发布适配候选中暴露的 SUB-COMPAT-017-004:ConfigEditor 的 raw 配置不含 schema 默认值,整表 reconcile 会丢掉默认 provider(如 `spawn`),清除旧条目后委派报 "provider not registered";现在 reconcile 按配置定义的字段恢复默认值(默认值只进活配置实例,绝不写回 raw patch),并在编辑完成后立即反射到当前实例。
|
|
29
|
+
- Fixed SUB-COMPAT-017-004 exposed by this unreleased compatibility candidate: the raw ConfigEditor layer carries no schema defaults, so a wholesale reconcile dropped the default provider (delegation then failed with "provider not registered"); reconcile now restores defaults for the fields defined by the configuration into the live instance only (never the raw patch) and reflects the result immediately after the edit.
|
|
30
|
+
|
|
31
|
+
### 文档 / Docs
|
|
32
|
+
|
|
33
|
+
- 配置位置与回滚说明按宿主版本分述(≥0.1.7 的插件级配置在 profile `cordis.patch.yml`;0.2.8 仅适用于旧宿主,宿主降级及 `settings.yaml.imported` 恢复路径未经验证,不提供降级操作步骤)。
|
|
34
|
+
- Config-location and rollback docs now distinguish host versions: 0.2.8 requires an older host; host downgrade and `settings.yaml.imported` restoration are unverified, so no downgrade sequence is prescribed.
|
|
35
|
+
|
|
7
36
|
## [0.3.0] — 2026-09-24
|
|
8
37
|
|
|
9
38
|
### 变更 / Changed(重要:存储位置变化)
|
package/MIGRATION.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
1. **升级插件并重启 dsh web** —— 什么都不用改,你的旧配置会自动迁移;
|
|
10
10
|
2. **验证**:`/subagent` 或设置页能看到全部旧条目,且名册目录里多了一批 `<id>.yaml`;
|
|
11
|
-
3.
|
|
11
|
+
3. **清理**(可选但推荐):设置页点「清除旧条目」,或按宿主版本手动删掉配置行/`config` 下的旧 `entries` 键,同时保留同一行的其他插件配置。
|
|
12
12
|
|
|
13
13
|
旧配置在 0.3.x 全程兜底可读,不清除也不影响使用;**0.4 起才停止读取**。
|
|
14
14
|
|
|
@@ -40,26 +40,42 @@ maxDepth: 1
|
|
|
40
40
|
backgroundMode: continuable
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
插件配置只保留插件级键。两代宿主的正确 YAML 形状如下:
|
|
44
|
+
|
|
45
|
+
**DSH ≤0.1.6:** `~/.dsh/settings.yaml`
|
|
44
46
|
|
|
45
47
|
```yaml
|
|
46
48
|
subagent-library:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
entriesDir: ~/.dsh/subagents
|
|
50
|
+
subagentProvider: spawn
|
|
49
51
|
# entries: ← 0.2.x 的旧段,0.3.x 只读兜底,确认迁移成功后可删
|
|
50
52
|
```
|
|
51
53
|
|
|
52
|
-
|
|
54
|
+
**DSH ≥0.1.7:** web profile 的 `cordis.patch.yml`,`- id: subagent-library` 的 `config` 下
|
|
55
|
+
|
|
56
|
+
```yaml
|
|
57
|
+
- id: subagent-library
|
|
58
|
+
config:
|
|
59
|
+
entriesDir: ~/.dsh/subagents
|
|
60
|
+
subagentProvider: spawn
|
|
61
|
+
# entries: ← 0.2.x 的旧段,0.3.x 只读兜底,确认迁移成功后可删
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
> **配置位置随宿主版本不同**:
|
|
65
|
+
> - **DSH ≤0.1.6**:上面这段写在 `~/.dsh/settings.yaml`;
|
|
66
|
+
> - **DSH ≥0.1.7**:`settings.yaml.imported` 是宿主迁移留下的备份,活配置写在 **web profile 的 `cordis.patch.yml`**(`- id: subagent-library` 条目的 `config` 下)。不要把 `settings.yaml.imported` 当作已验证的活配置恢复路径。
|
|
67
|
+
|
|
68
|
+
文件**热生效**:改完保存即可,无需重启。设置页与手编文件的数据**双向等价**,但要注意:通过设置页保存某个条目且内容有变化时,**该条目统一写为 `<id>.yaml`,并移除同 id 的 `<id>.yml`**(这个文件里的手写注释与自定义排版会丢失);**本次保存中内容未变化的规范 `.yaml` 条目一律跳过写入,原文件和注释原样保留;`.yml` 条目即使内容未变也会收敛重写为生成格式 `.yaml`(其注释丢失)**。想保留注释的手编文件,请直接手编,别在设置页里动它。
|
|
53
69
|
|
|
54
70
|
## 自动迁移是怎么工作的
|
|
55
71
|
|
|
56
72
|
升级到 0.3 并重启后,**首次使用名册时**(打开设置页、调用 `list_subagents`、或第一次 `delegate`)插件会:
|
|
57
73
|
|
|
58
|
-
1.
|
|
74
|
+
1. 读取当前宿主配置位置里的旧 `entries`(旧宿主为 `~/.dsh/settings.yaml`;新宿主为 profile `cordis.patch.yml` 的 `- id: subagent-library` → `config`);
|
|
59
75
|
2. 对每个条目:**如果名册目录里同名的 `<id>.yaml` 与 `<id>.yml` 均不存在,就导出一个**;
|
|
60
76
|
- 已存在同名任一后缀文件 → **跳过,绝不覆盖**(你手写的文件是安全的);
|
|
61
77
|
- id 非法(大写、超长、Windows 保留名)→ 跳过并在诊断里说明;
|
|
62
|
-
3.
|
|
78
|
+
3. **当前配置里的旧段在迁移阶段原样保留**——它是你的回滚备份:自动迁移后旧副本仍保留,只有清理才会移除。注意区分两种操作:设置页**删除条目**会清除该 id 的 `.yaml` 与 `.yml` 名册文件,并一并移除其旧副本;点**「清除旧条目」**只移除已被文件覆盖的旧副本,不动任何名册文件。
|
|
63
79
|
|
|
64
80
|
迁移是逐条幂等的:重启多少次都只会导出缺的那几条,重复内容不会翻倍。
|
|
65
81
|
|
|
@@ -83,22 +99,20 @@ npx @deepseek-ai/dsh plugin --profile web add dsh-subagent-library@latest
|
|
|
83
99
|
|
|
84
100
|
### 第 3 步:清理旧段(可选,推荐)
|
|
85
101
|
|
|
86
|
-
|
|
102
|
+
确认名册工作正常后,把当前宿主配置里的旧 `entries` 段清掉,两种方式:
|
|
87
103
|
|
|
88
104
|
- **设置页一键清除(推荐)**:子代理库卡片顶部会出现迁移横幅「N 个旧条目已导出为名册文件……」,点「清除旧条目」即可。该操作只删除**已被文件覆盖**的旧副本,名册文件不受影响;
|
|
89
|
-
-
|
|
105
|
+
- **手动删除(按宿主版本)**:
|
|
106
|
+
- **DSH ≤0.1.6**:编辑 `~/.dsh/settings.yaml`,删掉 `subagent-library.entries:` 整段(保留 `subagentProvider` / `entriesDir` 等插件级键);
|
|
107
|
+
- **DSH ≥0.1.7**:旧段已被宿主导入 web profile 的 `cordis.patch.yml`——删掉其中 `id: subagent-library` 条目 `config` 下的 `entries:` 键即可;**保留同一 `config` 行里的 `entriesDir` / `subagentProvider` 等其他键**,不要删除整个条目,也可以用宿主自带配置编辑器操作。
|
|
90
108
|
|
|
91
109
|
> 不清理会怎样?——什么都不会坏。文件优先生效,旧段只是躺着(设置页会持续显示提示信息)。0.4 起插件停止读取旧段,届时再删也行。
|
|
92
110
|
|
|
93
111
|
## 回滚(想退回 0.2.x)
|
|
94
112
|
|
|
95
|
-
|
|
113
|
+
**前提:插件降级必须与宿主版本匹配。** 0.2.8 的旧 `entries` 回滚副本只适用于 DSH ≤0.1.6;在 DSH ≥0.1.7 上不能单独降级插件,旧设置 seam 可能导致整体 503。宿主降级和 `settings.yaml.imported` 数据恢复均未验证,因此这里不提供「先降宿主再恢复 imported」的操作步骤。
|
|
96
114
|
|
|
97
|
-
|
|
98
|
-
npx @deepseek-ai/dsh plugin --profile web add dsh-subagent-library@0.2.8
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
0.2.x 只读 settings.yaml——只要你不曾删除旧 `entries` 段,回滚后名册原样可用(0.3 之后手编的名册文件它看不见;所以**清理旧段之前请想清楚是否还要回滚**)。旧副本就是回滚的数据源:手动编辑或删除旧副本(含删除条目、一键清除)会让回滚回到删除/编辑当时的旧快照——0.3 期间在名册文件里做的修改不会跟着回去。
|
|
115
|
+
自动迁移后仍保留的旧 `entries` 是回滚数据源;一旦删除或编辑旧副本(包括删除条目或一键清除),回滚只能回到当时的快照,0.3 名册文件中的后续修改不会自动回写。若只是恢复名册内容,请从你自己建立的 `~/.dsh/subagents/_backups/` 备份恢复并自行核对;无需为此降级插件或宿主。
|
|
102
116
|
|
|
103
117
|
## FAQ
|
|
104
118
|
|
|
@@ -106,13 +120,16 @@ npx @deepseek-ai/dsh plugin --profile web add dsh-subagent-library@0.2.8
|
|
|
106
120
|
不会。迁移只导出名册目录里**不存在**的 id;已有文件一律跳过。
|
|
107
121
|
|
|
108
122
|
**Q:文件名有什么要求?**
|
|
109
|
-
`<id>.yaml` 或 `<id>.yml` 都会被读取;id 必须全小写、匹配 `[a-z0-9][a-z0-9-]*`、长度 ≤ 64,且不能是 Windows 保留设备名(`con`、`nul`、`aux`…)。同一 id
|
|
123
|
+
`<id>.yaml` 或 `<id>.yml` 都会被读取;id 必须全小写、匹配 `[a-z0-9][a-z0-9-]*`、长度 ≤ 64,且不能是 Windows 保留设备名(`con`、`nul`、`aux`…)。同一 id 的两个后缀并存会报冲突诊断,先修好冲突(只保留一个)再在设置页操作。规范 `.yaml` 内容未变时会跳过写入并保留原文件及注释;`.yml` 内容即使未变也会统一重写为生成的 `<id>.yaml` 并移除同 id 的 `<id>.yml`,原注释会丢失。删除条目会清除同 id 的两个后缀。
|
|
110
124
|
|
|
111
125
|
**Q:写入或删除失败时会怎样?**
|
|
112
|
-
|
|
126
|
+
这些操作按文件逐个进行,不是目录级多文件事务;写入或收敛失败返回 HTTP 500,且可能已经部分完成。规范 `.yaml` 内容未变时会跳过写入并保留原文件和注释;`.yml` 内容即使未变也会收敛重写为生成的 `.yaml`,原 `.yml` 注释会丢失。若跳过路径的同名 `.yml` 清扫失败,保存仍返回 200 但带 warning,冲突诊断会持续到清扫成功;解除占用后重试保存。遇到错误先检查名册目录和 diagnostics,再重试。
|
|
113
127
|
|
|
114
128
|
**Q:某个文件写坏了会怎样?**
|
|
115
|
-
只有那一个条目失效:它被跳过,并在 `list_subagents`、`/subagent`、设置页 diagnostics
|
|
129
|
+
只有那一个条目失效:它被跳过,并在 `list_subagents`、`/subagent`、设置页 diagnostics 里给出原因,其余条目照常。改好文件即恢复。**特别注意**:如果同名条目在当前宿主配置里还有旧副本(自动迁移后旧副本仍保留;点「清除旧条目」或删除条目后才移除),插件会用**旧副本兜底继续服务**,并在 diagnostics 里以 error 标明「delegate 使用的是旧配置」——看到这条请先修文件。
|
|
130
|
+
|
|
131
|
+
**Q:`.yml` 文件会一直保持 `.yml` 吗?**
|
|
132
|
+
会正常读取;但设置页保存触达该条目时,即使内容未变也会收敛为生成格式的 `.yaml`(原 `.yml` 移除,避免同 id 双文件),因此原手写注释会丢失。内容未变的规范 `.yaml` 则会跳过写入并保留注释。
|
|
116
133
|
|
|
117
134
|
**Q:怎么临时停用一个子代理(不删文件)?**
|
|
118
135
|
文件里加一行 `enabled: false`(或设置页关掉「启用」开关)。停用的条目仍可见,但 `delegate` 会拒绝并提示。注意:仍以 **legacy 兜底**方式服务的条目(见上一条)不支持停用——先在设置页保存一次让它晋升为文件,再停用。
|
|
@@ -124,10 +141,10 @@ npx @deepseek-ai/dsh plugin --profile web add dsh-subagent-library@0.2.8
|
|
|
124
141
|
单条导出失败只影响那一条(它继续以 legacy 兜底,diagnostics 会说明);整体故障(如目录不可写)时条目全部走 legacy 兜底且设置页有警告横幅——**下次使用名册时会自动重试,重启 dsh web 也可立即重试**,不需要手工干预。
|
|
125
142
|
|
|
126
143
|
**Q:名册目录能换地方吗?**
|
|
127
|
-
能。settings.yaml
|
|
144
|
+
能。DSH ≤0.1.6 在 `~/.dsh/settings.yaml` 的 `subagent-library.entriesDir` 设置;DSH ≥0.1.7 在 web profile `cordis.patch.yml` 的 `- id: subagent-library` → `config` 下设置(支持 `~` 与相对路径,相对路径锚定 `~/.dsh`)。
|
|
128
145
|
|
|
129
146
|
**Q:多台机器怎么同步名册?**
|
|
130
|
-
把名册目录纳入你的 dotfiles/git 即可——每条目一个文件,diff
|
|
147
|
+
把名册目录纳入你的 dotfiles/git 即可——每条目一个文件,diff 友好。旧配置里的 `entries` 段不建议同步。
|
|
131
148
|
|
|
132
149
|
---
|
|
133
150
|
|
|
@@ -137,15 +154,38 @@ npx @deepseek-ai/dsh plugin --profile web add dsh-subagent-library@0.2.8
|
|
|
137
154
|
|
|
138
155
|
1. **Upgrade and restart dsh web** — nothing to change by hand; your legacy config migrates automatically.
|
|
139
156
|
2. **Verify**: run `/subagent` or open the settings page — all old entries are listed, and the roster directory now holds one `<id>.yaml` per entry.
|
|
140
|
-
3. **Clean up (optional but recommended)**: click “清除旧条目” on the settings card, or delete the legacy `entries`
|
|
157
|
+
3. **Clean up (optional but recommended)**: click “清除旧条目” on the settings card, or delete only the legacy `entries` key from the host-specific config shape, keeping the other keys on the same config row.
|
|
158
|
+
|
|
159
|
+
**Config location depends on the host version.** Use the matching shape:
|
|
160
|
+
|
|
161
|
+
**DSH ≤0.1.6:** `~/.dsh/settings.yaml`
|
|
162
|
+
|
|
163
|
+
```yaml
|
|
164
|
+
subagent-library:
|
|
165
|
+
entriesDir: ~/.dsh/subagents
|
|
166
|
+
subagentProvider: spawn
|
|
167
|
+
# entries: optional legacy 0.2.x map; remove only this key after verification
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**DSH ≥0.1.7:** the web profile's `cordis.patch.yml`, under `config` on `- id: subagent-library`
|
|
171
|
+
|
|
172
|
+
```yaml
|
|
173
|
+
- id: subagent-library
|
|
174
|
+
config:
|
|
175
|
+
entriesDir: ~/.dsh/subagents
|
|
176
|
+
subagentProvider: spawn
|
|
177
|
+
# entries: optional legacy 0.2.x map; remove only this key after verification
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
On the newer host, `settings.yaml.imported` is a migration backup, not a verified active configuration or rollback procedure.
|
|
141
181
|
|
|
142
|
-
**What changed** — the roster
|
|
182
|
+
**What changed** — on the old host the roster was the inline `subagent-library.entries` map in `~/.dsh/settings.yaml`; on the newer host that legacy map is under the profile patch row shown above. It now lives as **one YAML file per named subagent** under `~/.dsh/subagents/` (configurable via `subagent-library.entriesDir`). Files are hot-reloaded. Entry DATA is equivalent between the settings page and hand-edited files, but saving an entry from the settings page **when its content has changed** writes that entry as canonical `<id>.yaml` and removes the same-id `<id>.yml` (hand-written comments in that file are lost); an unchanged canonical `.yaml` row is skipped, so its original file and comments stay intact, while an unchanged `.yml` row is still rewritten as generated `.yaml` and loses its comments.
|
|
143
183
|
|
|
144
|
-
**File-name lifecycle** — Both `<id>.yaml` and `<id>.yml` are read. If both spellings already exist for one id, fix that conflict (keep one) before using the settings page. Deleting an entry removes both suffixes. Writes and deletes run per file, not as a directory-wide multi-file transaction: a failure
|
|
184
|
+
**File-name lifecycle** — Both `<id>.yaml` and `<id>.yml` are read. If both spellings already exist for one id, fix that conflict (keep one) before using the settings page. Deleting an entry removes both suffixes. Writes and deletes run per file, not as a directory-wide multi-file transaction: a write or convergence failure returns HTTP 500 and may leave a partial result. If the unchanged canonical `.yaml` skip path cannot sweep a same-id `.yml`, the save returns 200 with a warning and the duplicate diagnostic remains until a retry succeeds; inspect the roster before retrying.
|
|
145
185
|
|
|
146
186
|
**Automatic migration** — on the first roster use after upgrading, each legacy entry is exported to `<id>.yaml` **only when neither `<id>.yaml` nor `<id>.yml` exists** (if either spelling exists, hand-written files are never overwritten; re-runs are idempotent). The legacy settings copies are **kept** as a rollback fallback; files take precedence. Legacy reading stays working throughout 0.3.x and is **removed in 0.4**. Deleting an entry from the settings page removes both its `<id>.yaml` and `<id>.yml` roster files **and** its legacy copy; the one-click cleanup only removes legacy copies that files already shadow and never touches roster files. Legacy copies persist after automatic migration until you clear them.
|
|
147
187
|
|
|
148
|
-
**Rollback** —
|
|
188
|
+
**Rollback** — the 0.2.8 legacy `entries` fallback is for DSH ≤0.1.6 only; on DSH ≥0.1.7 the plugin cannot be downgraded by itself, and the old settings seam may return 503. Host downgrade and restoration of `settings.yaml.imported` data are unverified, so no downgrade sequence is prescribed. Legacy copies are the rollback data source: editing or deleting them (including deleting entries or one-click cleanup) makes rollback return to the snapshot as of that moment. To restore roster content, use your own `_backups/` copies and verify them manually.
|
|
149
189
|
|
|
150
190
|
**New in 0.3** — per-entry `enabled` (disable without deleting) and `reasoningEffort` (adapter-owned thinking-effort id such as `max`, passed through the official `agentOptions` override); broken roster files are skipped with visible diagnostics instead of breaking the roster.
|
|
151
191
|
|
package/README.en.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<img src="https://img.shields.io/github/actions/workflow/status/MaRi23333/dsh-subagent-library/ci.yml?style=flat-square&label=CI" alt="CI" />
|
|
11
11
|
<img src="https://img.shields.io/github/license/MaRi23333/dsh-subagent-library?style=flat-square" alt="License: MIT" />
|
|
12
|
-
<img src="https://img.shields.io/badge/DeepSeek%20Harness-0.
|
|
12
|
+
<img src="https://img.shields.io/badge/DeepSeek%20Harness-0.2.0--rc.2-4d6bfe?style=flat-square" alt="DeepSeek Harness 0.2.0-rc.2" />
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
## Overview
|
|
@@ -25,13 +25,13 @@ Adding entries needs no hand-written config either: ask the main agent to do it,
|
|
|
25
25
|
|
|
26
26
|
> Distinction from the official capabilities: the official `subagent` tool dispatches ad-hoc tasks (you describe the task each time), and the official `list_agents` lists *running* child instances; this plugin maintains a **persistent named roster** (edited visually in a settings page, hot-reloaded). The model picks an entry with `list_subagents` and dispatches by id with `delegate`.
|
|
27
27
|
|
|
28
|
-
> **Upgrading from 0.2.x?** Since 0.3 the roster is directory-backed (one YAML file per subagent). Your legacy config **migrates automatically
|
|
28
|
+
> **Upgrading from 0.2.x?** Since 0.3 the roster is directory-backed (one YAML file per subagent). Your legacy config **migrates automatically**; after verifying it, clear the old `entries` section for your host generation. [MIGRATION.md](./MIGRATION.md) documents the config locations, failure/retry behavior, and rollback limits; [CHANGELOG.md](./CHANGELOG.md) lists all changes.
|
|
29
29
|
|
|
30
30
|
## Screenshots
|
|
31
31
|
|
|
32
32
|
<p align="center">
|
|
33
33
|
<img src="./assets/readme/screenshot-settings.png" width="75%" alt="Subagent Library settings card: edit roster entries visually" /><br>
|
|
34
|
-
<em>The Subagent Library settings card: add
|
|
34
|
+
<em>The Subagent Library settings card: visually add, edit, remove, enable or disable entries; configure the model, transport, output limit, depth, denied tools, reasoning effort, background mode and persona.</em>
|
|
35
35
|
</p>
|
|
36
36
|
|
|
37
37
|
<p align="center">
|
|
@@ -59,14 +59,27 @@ Since 0.3 the roster is a directory with **one file per named subagent** (hot-re
|
|
|
59
59
|
|
|
60
60
|
> **Backup convention** — the plugin never auto-backs up. By convention, agents (or humans) copy the original file into `_backups/` before editing (suggested name `<id>.<yyyymmdd-hhmm>.yaml`). Anything `_`-prefixed is treated as non-roster content and silently ignored.
|
|
61
61
|
|
|
62
|
-
|
|
62
|
+
Where the plugin-level options live **depends on the host version**. Use one of these two shapes:
|
|
63
|
+
|
|
64
|
+
**DSH ≤0.1.6:** edit `~/.dsh/settings.yaml`.
|
|
63
65
|
|
|
64
66
|
```yaml
|
|
65
67
|
subagent-library:
|
|
66
|
-
# Roster directory; default ~/.dsh/subagents, supports ~ and paths relative to ~/.dsh
|
|
67
68
|
entriesDir: ~/.dsh/subagents
|
|
68
|
-
|
|
69
|
-
#
|
|
69
|
+
subagentProvider: spawn
|
|
70
|
+
# entries: (optional, legacy) the 0.2.x inline roster remains a read-only
|
|
71
|
+
# fallback throughout 0.3.x — files win; removal planned for 0.4
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**DSH ≥0.1.7:** edit the web profile's `cordis.patch.yml`, under `config` on its `- id: subagent-library` entry.
|
|
75
|
+
|
|
76
|
+
```yaml
|
|
77
|
+
- id: subagent-library
|
|
78
|
+
config:
|
|
79
|
+
entriesDir: ~/.dsh/subagents
|
|
80
|
+
subagentProvider: spawn
|
|
81
|
+
# entries: (optional, legacy) the 0.2.x inline roster remains a read-only
|
|
82
|
+
# fallback throughout 0.3.x — files win; removal planned for 0.4
|
|
70
83
|
```
|
|
71
84
|
|
|
72
85
|
One entry file (`k3-reviewer.yaml`):
|
|
@@ -102,11 +115,21 @@ Entry fields:
|
|
|
102
115
|
|
|
103
116
|
**Broken files never brick the roster**: files that fail to parse or validate are skipped, and the reason is surfaced as diagnostics in `list_subagents`, the `/subagent` command, and the settings page; `.yaml`/`.yml` duplicate ids and wrongly-cased file names are reported the same way.
|
|
104
117
|
|
|
105
|
-
**Migrating from 0.2.x**: on first roster use, the
|
|
118
|
+
**Migrating from 0.2.x**: on first roster use, the old `entries` section is exported **entry by entry** to `<id>.yaml` (ids with an existing file are skipped — hand-written files are never overwritten); legacy copies are KEPT as a rollback, and files take precedence. When saving through the settings page, an unchanged canonical `.yaml` row is skipped so its hand-written comments stay intact; an unchanged `.yml` row is still rewritten as generated `.yaml` and loses its comments. A write/convergence failure returns HTTP 500 and may leave a partial result. If the canonical `.yaml` skip path cannot sweep a same-id `.yml`, the save returns 200 with a warning and the duplicate diagnostic remains until a retry succeeds. Once confirmed, clear only the legacy `entries` key and keep the other keys on that same config row (reading is removed in 0.4).
|
|
119
|
+
|
|
120
|
+
The 0.2.8 legacy `entries` fallback is for DSH ≤0.1.6 only; on DSH ≥0.1.7 the plugin cannot be downgraded by itself. Host downgrade and restoration of `settings.yaml.imported` data are unverified, so no downgrade sequence is prescribed. To restore roster content, use your own `_backups/` copies and verify them manually.
|
|
106
121
|
|
|
107
122
|
> Mind the two provider concepts: `provider` is the LLM route (`agentOptions.provider`),
|
|
108
123
|
> while `subagentProvider` is the subagent transport (`ctx.subagents` registration name, e.g. `spawn`/`fork`/`acp`).
|
|
109
124
|
|
|
125
|
+
## Host and desktop compatibility
|
|
126
|
+
|
|
127
|
+
`0.3.1` adapts to the SettingsForms mechanism introduced in DSH `0.1.7-rc.2`. On 2026-09-30, the development team additionally reported it working with DSH `0.2.0-rc.2` and the desktop client of the same version. The roster retains the 0.3 series directory-backed storage and migration rules; this documentation update does not migrate data again.
|
|
128
|
+
|
|
129
|
+
**0.3.2** adds English and Chinese names and descriptions to the plugin manager, following the client language. Roster and delegation behavior are unchanged. See [CHANGELOG.md](./CHANGELOG.md) for update notes.
|
|
130
|
+
|
|
131
|
+
The desktop client uses the Web plugin UI, so no separate desktop-specific package is needed. This compatibility statement reflects maintainer usage feedback. Online model calls still depend on each provider's configuration and service; a working settings page does not establish acceptance of every model or cross-platform scenario.
|
|
132
|
+
|
|
110
133
|
## Install
|
|
111
134
|
|
|
112
135
|
One command, from npm (recommended):
|
|
@@ -167,7 +190,7 @@ pnpm run typecheck
|
|
|
167
190
|
pnpm run build # host: lib/index.js; client: lib/client.js
|
|
168
191
|
```
|
|
169
192
|
|
|
170
|
-
- Dev dependencies remain pinned to DSH `0.1.0-rc.6` (see package.json devDependencies); the
|
|
193
|
+
- Dev dependencies remain pinned to DSH `0.1.0-rc.6` (see package.json devDependencies); this is not the current runtime host version. See "Host and desktop compatibility" above for current support and usage feedback. If the interfaces drift on other versions, adjust against the corresponding tag of the [deepseek-harness repo](https://github.com/deepseek-ai/deepseek-harness).
|
|
171
194
|
|
|
172
195
|
## License
|
|
173
196
|
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<p align="center">
|
|
10
10
|
<img src="https://img.shields.io/github/actions/workflow/status/MaRi23333/dsh-subagent-library/ci.yml?style=flat-square&label=CI" alt="CI" />
|
|
11
11
|
<img src="https://img.shields.io/github/license/MaRi23333/dsh-subagent-library?style=flat-square" alt="License: MIT" />
|
|
12
|
-
<img src="https://img.shields.io/badge/DeepSeek%20Harness-0.
|
|
12
|
+
<img src="https://img.shields.io/badge/DeepSeek%20Harness-0.2.0--rc.2-4d6bfe?style=flat-square" alt="DeepSeek Harness 0.2.0-rc.2" />
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
> **English:** dsh-subagent-library is a named subagent roster plugin for the
|
|
@@ -32,13 +32,13 @@ DeepSeek Harness 的具名子代理库插件:把常用角色(代码审查、
|
|
|
32
32
|
|
|
33
33
|
> 与官方能力的区分:官方 `subagent` 工具是临时派活(每次现场描述任务),官方 `list_agents` 列的是正在运行的子代实例;本插件维护的是**持久化的具名角色名册**(设置页可视化编辑、热生效),模型用 `list_subagents` 选人、`delegate` 按 id 派活。
|
|
34
34
|
|
|
35
|
-
> **从 0.2.x 升级?** 0.3 起名册目录化(一个子代理一个 YAML
|
|
35
|
+
> **从 0.2.x 升级?** 0.3 起名册目录化(一个子代理一个 YAML 文件),旧配置**自动迁移**;确认无误后可按宿主版本清除旧 `entries` 段。配置位置、失败重试和回滚边界见 [MIGRATION.md](./MIGRATION.md),完整变更见 [CHANGELOG.md](./CHANGELOG.md)。
|
|
36
36
|
|
|
37
37
|
## 界面
|
|
38
38
|
|
|
39
39
|
<p align="center">
|
|
40
40
|
<img src="./assets/readme/screenshot-settings.png" width="75%" alt="设置页「子代理库」卡片:可视化编辑名册条目" /><br>
|
|
41
|
-
<em
|
|
41
|
+
<em>设置页「子代理库」卡片:可视化增删改与启停,配置模型、传输层、输出上限、深度、禁用工具、思考强度、后台模式和角色提示词。</em>
|
|
42
42
|
</p>
|
|
43
43
|
|
|
44
44
|
<p align="center">
|
|
@@ -66,15 +66,27 @@ DeepSeek Harness 的具名子代理库插件:把常用角色(代码审查、
|
|
|
66
66
|
|
|
67
67
|
> **备份约定**:插件不做自动备份;按惯例,agent(或人)在修改条目前先把原文件复制进 `_backups/`(命名建议 `<id>.<yyyymmdd-hhmm>.yaml`)。`_` 前缀的文件/目录一律视为非名册内容,插件静默忽略。名册目录里可放一份 `README.md` 给操作该目录的 agent 立规矩。
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
上面的插件级配置存放位置**随宿主版本不同**。两种正确的配置形状如下:
|
|
70
|
+
|
|
71
|
+
**DSH ≤0.1.6:**编辑 `~/.dsh/settings.yaml`。
|
|
70
72
|
|
|
71
73
|
```yaml
|
|
72
74
|
subagent-library:
|
|
73
|
-
# 名册目录;默认 ~/.dsh/subagents,支持 ~ 与相对路径(相对 ~/.dsh)
|
|
74
75
|
entriesDir: ~/.dsh/subagents
|
|
76
|
+
subagentProvider: spawn
|
|
75
77
|
# entries:(可选,遗留)0.2.x 的内联名册在 0.3.x 仍只读兜底,文件优先生效;0.4 移除
|
|
76
78
|
```
|
|
77
79
|
|
|
80
|
+
**DSH ≥0.1.7:**编辑 web profile 的 `cordis.patch.yml`,在 `- id: subagent-library` 的 `config` 下配置。
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
- id: subagent-library
|
|
84
|
+
config:
|
|
85
|
+
entriesDir: ~/.dsh/subagents
|
|
86
|
+
subagentProvider: spawn
|
|
87
|
+
# entries:(可选,遗留)0.2.x 的内联名册在 0.3.x 仍只读兜底,文件优先生效;0.4 移除
|
|
88
|
+
```
|
|
89
|
+
|
|
78
90
|
单个条目文件(`k3-reviewer.yaml`):
|
|
79
91
|
|
|
80
92
|
```yaml
|
|
@@ -108,11 +120,21 @@ backgroundMode: continuable
|
|
|
108
120
|
|
|
109
121
|
**坏文件不炸名册**:解析/校验失败的文件被跳过,错误进入 `list_subagents` 输出、`/subagent` 命令与设置页的 diagnostics;`.yaml`/`.yml` 同名冲突、大写文件名等也会以诊断形式报出。
|
|
110
122
|
|
|
111
|
-
**从 0.2.x
|
|
123
|
+
**从 0.2.x 迁移**:首次使用名册时,旧配置里的 `entries` 会**逐条**导出为 `<id>.yaml`(已存在同名文件的条目跳过,绝不覆盖手写文件);旧条目保留作回滚副本,文件优先生效。通过设置页保存时,规范 `.yaml` 内容未变时会跳过写入并保留手写注释;`.yml` 内容即使未变也会重写为生成的 `.yaml` 并移除 `.yml`,原注释会丢失。写入或收敛失败返回 HTTP 500,可能已有部分文件完成;规范 `.yaml` 的跳过路径若清扫同名 `.yml` 失败则返回 200 并带 warning,冲突诊断会持续到下次重试成功。确认无误后按宿主版本清除旧 `entries` 段(0.4 将停止读取)。
|
|
124
|
+
|
|
125
|
+
清理时只删除 `entries` 键:旧宿主保留同一 `subagent-library` 行的 `subagentProvider` / `entriesDir` 等其他键;新宿主保留同一 `config` 行的这些键,不要删除整个配置条目。0.2.8 的旧 `entries` 回滚副本只适用于 DSH ≤0.1.6;在 DSH ≥0.1.7 上不能单独降级插件。宿主降级和 `settings.yaml.imported` 数据恢复均未验证;如果需要恢复 0.3 名册内容,请从你自己建立的名册 `_backups/` 备份恢复并自行核对。
|
|
112
126
|
|
|
113
127
|
> 注意区分两个 provider 概念:`provider` 指 LLM 路由(`agentOptions.provider`),
|
|
114
128
|
> `subagentProvider` 指子代理传输层(`ctx.subagents` 注册名,如 `spawn`/`fork`/`acp`)。
|
|
115
129
|
|
|
130
|
+
## 宿主与桌面端兼容
|
|
131
|
+
|
|
132
|
+
`0.3.1` 已适配 DSH `0.1.7-rc.2` 引入的 SettingsForms 设置机制;开发侧于 2026-09-30 进一步报告,它在 DSH `0.2.0-rc.2` 与同版本桌面客户端中可用。名册仍采用 0.3 系列的目录化存储与原有迁移规则,没有因本次说明更新再次迁移数据。
|
|
133
|
+
|
|
134
|
+
**0.3.2** 为插件管理页增加随客户端语言切换的中英文名称与简介,名册和委派行为不变。更新说明见 [CHANGELOG.md](./CHANGELOG.md)。
|
|
135
|
+
|
|
136
|
+
桌面客户端沿用 Web 插件界面,无需另装桌面专用包。该兼容说明依据维护者使用反馈;模型在线调用仍取决于各 Provider 的配置与服务,不能由设置页可用推断全部模型或跨平台场景已验收。
|
|
137
|
+
|
|
116
138
|
## 安装
|
|
117
139
|
|
|
118
140
|
一条命令,从 npm 安装(推荐):
|
|
@@ -164,7 +186,7 @@ pnpm run typecheck
|
|
|
164
186
|
pnpm run build # host: lib/index.js;client: lib/client.js
|
|
165
187
|
```
|
|
166
188
|
|
|
167
|
-
- 开发依赖仍锁定 DSH `0.1.0-rc.6`(见 package.json devDependencies
|
|
189
|
+
- 开发依赖仍锁定 DSH `0.1.0-rc.6`(见 package.json devDependencies),不等于当前使用宿主版本;当前兼容范围与反馈见上方「宿主与桌面端兼容」。其他版本如接口漂移请对照 [deepseek-harness 仓库](https://github.com/deepseek-ai/deepseek-harness) 相应 tag 调整。
|
|
168
190
|
|
|
169
191
|
## License
|
|
170
192
|
|
|
Binary file
|