dsh-subagent-library 0.3.3 → 0.3.5
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 -1
- package/MIGRATION.md +5 -2
- package/README.en.md +10 -12
- package/README.md +11 -13
- package/assets/readme/hero.svg +1 -1
- package/lib/client.js +14 -2
- package/lib/index.js +706 -69
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,28 @@
|
|
|
4
4
|
|
|
5
5
|
This file documents user-facing changes. Format loosely follows [Keep a Changelog]; versions follow [SemVer].
|
|
6
6
|
|
|
7
|
+
## [0.3.5] — 2026-10-17
|
|
8
|
+
|
|
9
|
+
### 修复 / Fixed
|
|
10
|
+
|
|
11
|
+
- **适配 DSH `0.2.1-rc.2`**:修复可续聊与前台一次性委派的启动失败,以及后台一次性任务报 `has no live agent` 的问题。旧宿主启动分支仍保留,名册与 profile 路由无需迁移。
|
|
12
|
+
- Adapts to DSH `0.2.1-rc.2`: fixes startup failures for continuable and foreground one-shot delegation, and `has no live agent` errors for background one-shot jobs. Legacy start paths remain; no roster or profile-route migration is needed.
|
|
13
|
+
- **取消会停止子代理**:修复后台任务已经启动后取消未生效的问题,并处理取消与启动同时发生的情况;前台调用中止时也会释放子代理。
|
|
14
|
+
- Cancellation now stops the child after a background job has started, including cancellation during startup. Aborting a foreground call also disposes its child.
|
|
15
|
+
- **工具过滤限制会明确提示**:DSH 0.2.1 系列不支持逐条目 `toolFilter`。含该字段的条目会拒绝委派,不会无视限制直接启动;名册列表会标注原因,设置页保存时也会提示。仅删除该字段不能保证只读,请在宿主中配置所需权限。
|
|
16
|
+
- Tool-filter limitations are now explicit: the DSH 0.2.1 series cannot enforce per-entry `toolFilter`. Entries containing it are refused, not started without their restrictions. The roster marks them and saving shows a warning. Removing the field does not guarantee read-only access; configure the required host permissions.
|
|
17
|
+
- **角色提示词的行为有变化**:DSH 0.2.1 系列通过首条任务消息传递角色,不再作为系统 persona,也不插值 `{{…}}` 模板;续聊或上下文压缩后不保证仍保留。README 已同步说明。
|
|
18
|
+
- Role prompts on the DSH 0.2.1 series are sent in the first task message, rather than as a system persona. `{{…}}` templates are not interpolated, and the role is not guaranteed to persist across follow-up turns or compaction. The README documents these limits.
|
|
19
|
+
|
|
20
|
+
## [0.3.4] — 2026-10-14
|
|
21
|
+
|
|
22
|
+
### 修复 / Fixed
|
|
23
|
+
|
|
24
|
+
- 读取名册失败(目录不可读、单文件不可读、YAML 损坏)不会删除任何 profile 的路由覆盖。只有目录列出成功、并且复查确认共享文件确实不存在时,才清理对应覆盖;设置页明确删除仍会清理。
|
|
25
|
+
- 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.
|
|
26
|
+
- **desktop 与 web 不再共用对方的模型路由**。名册文件仍在 `~/.dsh/subagents/`(角色、提示词、工具范围继续共享),但 `provider` / `model` 按当前 profile 解析:本 profile 没注册的 provider 不再拿去调用,子代理改用本会话的模型;在设置页相对当前显示改过的路由才写到 `_profiles/<profile>/<id>.yaml`。只改描述、或保存时回显被隐藏的外端路由,不会写成 `inherit`,之后本 profile 注册了该 provider 仍会用共享路由。不会改写另一个 profile 的路由。
|
|
27
|
+
- 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.
|
|
28
|
+
|
|
7
29
|
## [0.3.3] — 2026-10-09
|
|
8
30
|
|
|
9
31
|
### 变更 / Changed
|
|
@@ -108,7 +130,12 @@ This file documents user-facing changes. Format loosely follows [Keep a Changelo
|
|
|
108
130
|
|
|
109
131
|
- 修复设置页保存 400(移除保存期工具名预检,委派期 `tools.restrict` 为准);新条目卡补齐缺失字段。
|
|
110
132
|
|
|
111
|
-
[Unreleased]: https://github.com/MaRi23333/dsh-subagent-library/compare/v0.3.
|
|
133
|
+
[Unreleased]: https://github.com/MaRi23333/dsh-subagent-library/compare/v0.3.5...HEAD
|
|
134
|
+
[0.3.5]: https://github.com/MaRi23333/dsh-subagent-library/compare/v0.3.4...v0.3.5
|
|
135
|
+
[0.3.4]: https://github.com/MaRi23333/dsh-subagent-library/compare/v0.3.3...v0.3.4
|
|
136
|
+
[0.3.3]: https://github.com/MaRi23333/dsh-subagent-library/compare/v0.3.2...v0.3.3
|
|
137
|
+
[0.3.2]: https://github.com/MaRi23333/dsh-subagent-library/compare/v0.3.1...v0.3.2
|
|
138
|
+
[0.3.1]: https://github.com/MaRi23333/dsh-subagent-library/compare/v0.3.0...v0.3.1
|
|
112
139
|
[0.3.0]: https://github.com/MaRi23333/dsh-subagent-library/compare/v0.2.8...v0.3.0
|
|
113
140
|
[0.2.8]: https://github.com/MaRi23333/dsh-subagent-library/compare/v0.2.7...v0.2.8
|
|
114
141
|
[0.2.7]: https://github.com/MaRi23333/dsh-subagent-library/compare/v0.2.6...v0.2.7
|
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
|
@@ -9,12 +9,12 @@
|
|
|
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.2.
|
|
12
|
+
<img src="https://img.shields.io/badge/DeepSeek%20Harness-0.2.1--rc.2-4d6bfe?style=flat-square" alt="DeepSeek Harness 0.2.1-rc.2" />
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
## Overview
|
|
16
16
|
|
|
17
|
-
A named subagent roster plugin for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) Web GUI: turn your recurring roles (code review, red team, multimodal understanding…) into a persistent named roster
|
|
17
|
+
A named subagent roster plugin for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (DSH) Web GUI: turn your recurring roles (code review, red team, multimodal understanding…) into a persistent named roster with model, role prompt, depth and background-mode settings. Then **just tell the main agent "do this with xxx"** — the model picks and dispatches through two tools by itself:
|
|
18
18
|
|
|
19
19
|
- `list_subagents` — lists roster entries (id / role description / model) so the model can pick a suitable one;
|
|
20
20
|
- `delegate` — dispatches work by `library_id`: foreground wait, background one-shot, or a continuable (resumable) subagent, per the entry's configuration.
|
|
@@ -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
|
|
@@ -85,17 +85,17 @@ subagent-library:
|
|
|
85
85
|
One entry file (`k3-reviewer.yaml`):
|
|
86
86
|
|
|
87
87
|
```yaml
|
|
88
|
-
description:
|
|
88
|
+
description: Code review on Kimi K3-256K, with image walkthroughs
|
|
89
89
|
provider: kimi-coding
|
|
90
90
|
model: k3-256k
|
|
91
91
|
persona: |
|
|
92
92
|
You are an independent review agent running on Kimi K3-256K…
|
|
93
|
-
toolFilter:
|
|
94
|
-
deny: [write, edit, todo_write, create_goal, update_goal, subagent, subagent_fork, send_message, interrupt_agent, workflow, ralph, list_subagents, delegate]
|
|
95
93
|
maxDepth: 1
|
|
96
94
|
backgroundMode: continuable
|
|
97
95
|
```
|
|
98
96
|
|
|
97
|
+
> **DSH 0.2.1-series limitations:** the role prompt is sent in the first task message, not enforced as a system-level permission boundary. Per-entry `toolFilter` is unavailable, and entries containing it are refused. The example above therefore omits tool filtering and **does not guarantee read-only access**. Configure the required permissions in the host for read-only or tool-isolated work; a role name or prompt alone is not enough. The field table below also covers older hosts.
|
|
98
|
+
|
|
99
99
|
Entry fields:
|
|
100
100
|
|
|
101
101
|
| Field | Required | Notes |
|
|
@@ -107,8 +107,8 @@ Entry fields:
|
|
|
107
107
|
| `reasoningEffort` | no | Thinking effort: adapter-owned id (e.g. `max` / `high` / `medium` / `low`); empty follows the parent session default. Rides the official `agentOptions.reasoningEffort` override; when the child model route differs, the harness auto-drops the inherited effort, so unset values never leak across models. Only id-shaped values (alphanumerics and `._-`) are accepted; anything else is rejected on save |
|
|
108
108
|
| `subagentProvider` | no | **Subagent transport** (a `ctx.subagents` provider such as `spawn`); defaults to the plugin-level default `spawn` |
|
|
109
109
|
| `maxTokens` | no | Subagent output cap |
|
|
110
|
-
| `persona` | no | Subagent
|
|
111
|
-
| `toolFilter` | no | `allow`/`deny` tool-name lists (deny write-class tools for read-only roles). **Read-only/restricted roles should also deny `list_subagents`/`delegate`** so children are not taught by the global prompt to re-delegate in a chain. Names are resolved against the **calling session's restrictable set** at delegation (not "visibility"): names that session cannot apply are ignored and annotated with the reason (`本会话不存在` / `本会话专属工具`) in the delegate result and the `list_subagents` catalog — one shared entry never fails a whole delegation because a session lacks a tool. **An `allow` list that no name applies to refuses the delegation** (otherwise "keep only these" would silently become "keep nothing"). Registries without `view()` fall back to visibility, where scope-local names still make delegation fail loudly. Saves are not pre-validated |
|
|
110
|
+
| `persona` | no | Subagent role prompt. **DSH ≤0.2.0 hosts**: deployed as a system persona with strict `{{…}}` template interpolation (same semantics as deployment personas) — an unregistered variable (e.g. `{{user}}`) fails child activation. **DSH ≥0.2.1 hosts**: the start request has no persona field; the role is folded into the first task message under a `Role persona:` prefix — effective for the first turn, does NOT shadow a deployment persona, is not guaranteed to survive continuation turns or context compaction, and `{{…}}` is no longer interpolated (raw concatenation). A standalone `agentPreset` is deliberately not used to carry the role: an independent preset replaces the parent preset composition and drops the parent session's tools |
|
|
111
|
+
| `toolFilter` | no | `allow`/`deny` tool-name lists (deny write-class tools for read-only roles). **Read-only/restricted roles should also deny `list_subagents`/`delegate`** so children are not taught by the global prompt to re-delegate in a chain. Names are resolved against the **calling session's restrictable set** at delegation (not "visibility"): names that session cannot apply are ignored and annotated with the reason (`本会话不存在` / `本会话专属工具`) in the delegate result and the `list_subagents` catalog — one shared entry never fails a whole delegation because a session lacks a tool. **An `allow` list that no name applies to refuses the delegation** (otherwise "keep only these" would silently become "keep nothing"). Registries without `view()` fall back to visibility, where scope-local names still make delegation fail loudly. Saves are not pre-validated. **DSH ≥0.2.1 hosts cannot enforce per-entry tool filters**: entries carrying `toolFilter` are refused at delegate time (marked undelegable in the catalog, warned at save time); such entries only work on ≤0.2.0 hosts |
|
|
112
112
|
| `maxDepth` | no | Delegation depth cap; **when unset, defaults to 3 when the transport supports depthLimit** (aligned with the official subagent tool to prevent chained recursive delegation; the harness itself has no global depth cap). Transports without depthLimit stay uncapped |
|
|
113
113
|
| `backgroundMode` | no | `one-shot` (default, omitted in files) / `continuable` (resumable) |
|
|
114
114
|
| `enabled` | no | Write `enabled: false` to disable an entry (it stays visible in the directory and the settings page; `delegate` refuses it); omit or set `true` to enable |
|
|
@@ -124,11 +124,9 @@ The 0.2.8 legacy `entries` fallback is for DSH ≤0.1.6 only; on DSH ≥0.1.7 th
|
|
|
124
124
|
|
|
125
125
|
## Host and desktop compatibility
|
|
126
126
|
|
|
127
|
-
|
|
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.
|
|
127
|
+
**0.3.5 targets DSH `0.2.1-rc.2`:** fixes startup failures for continuable and one-shot subagents, and cancellation that failed to stop background children. Foreground one-shot, continuable, background startup and cancellation of running jobs have been checked on that desktop host. See the notice and field table above for role-prompt and tool-filter limitations, and [CHANGELOG.md](./CHANGELOG.md) for the full update.
|
|
130
128
|
|
|
131
|
-
The desktop client uses the Web plugin UI, so no separate desktop-specific package is needed.
|
|
129
|
+
The desktop client uses the Web plugin UI, so no separate desktop-specific package is needed. The legacy start paths remain, but this release's live checks target `0.2.1-rc.2`; model calls still depend on each provider's configuration and service. Roster directories, profile routes and migration rules are unchanged, so no new migration is needed.
|
|
132
130
|
|
|
133
131
|
## Install
|
|
134
132
|
|
package/README.md
CHANGED
|
@@ -9,19 +9,19 @@
|
|
|
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.2.
|
|
12
|
+
<img src="https://img.shields.io/badge/DeepSeek%20Harness-0.2.1--rc.2-4d6bfe?style=flat-square" alt="DeepSeek Harness 0.2.1-rc.2" />
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
> **English:** dsh-subagent-library is a named subagent roster plugin for the
|
|
16
16
|
> [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web GUI —
|
|
17
|
-
> manage role entries (model /
|
|
17
|
+
> manage role entries (model / role prompt / depth / background mode)
|
|
18
18
|
> from a settings page, hot-reloaded, then let any conversation pick one with
|
|
19
19
|
> `list_subagents` and dispatch work with `delegate`. See
|
|
20
20
|
> [README.en.md](./README.en.md) for the full English version.
|
|
21
21
|
|
|
22
22
|
## 简介
|
|
23
23
|
|
|
24
|
-
DeepSeek Harness
|
|
24
|
+
DeepSeek Harness 的具名子代理库插件:把常用角色(代码审查、红队、多模态理解……)配成一份持久化的具名子代理名册(模型、角色提示词、深度与后台模式),之后**只需告诉主会话 agent「用 xxx 做这件事」**——模型自己通过两个工具完成选人和派活:
|
|
25
25
|
|
|
26
26
|
- `list_subagents` — 列出名册条目(id / 角色描述 / 模型),模型据此挑选;
|
|
27
27
|
- `delegate` — 按 `library_id` 派活:前台等待、后台 one-shot 任务、或 continuable 可续聊子代理(按条目配置)。
|
|
@@ -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
|
|
@@ -90,17 +90,17 @@ subagent-library:
|
|
|
90
90
|
单个条目文件(`k3-reviewer.yaml`):
|
|
91
91
|
|
|
92
92
|
```yaml
|
|
93
|
-
description: Kimi K3-256K
|
|
93
|
+
description: Kimi K3-256K 代码审查,支持图片视觉走查
|
|
94
94
|
provider: kimi-coding
|
|
95
95
|
model: k3-256k
|
|
96
96
|
persona: |
|
|
97
97
|
你是运行在 Kimi K3-256K 上的独立审核 agent……
|
|
98
|
-
toolFilter:
|
|
99
|
-
deny: [write, edit, todo_write, create_goal, update_goal, subagent, subagent_fork, send_message, interrupt_agent, workflow, ralph, list_subagents, delegate]
|
|
100
98
|
maxDepth: 1
|
|
101
99
|
backgroundMode: continuable
|
|
102
100
|
```
|
|
103
101
|
|
|
102
|
+
> **DSH 0.2.1 系列的限制**:角色提示词随首条任务消息发送,不是系统级权限约束;逐条目 `toolFilter` 暂不可用,含该字段的条目会拒绝委派。上面的示例因此不含工具过滤,**不保证只读**。有只读或工具隔离需求时,应先在宿主中配置相应权限,不能只靠角色名称或提示词。旧宿主的字段行为见下表。
|
|
103
|
+
|
|
104
104
|
条目字段:
|
|
105
105
|
|
|
106
106
|
| 字段 | 必填 | 说明 |
|
|
@@ -112,8 +112,8 @@ backgroundMode: continuable
|
|
|
112
112
|
| `reasoningEffort` | 否 | 思考强度:适配器自有值(如 `max` / `high` / `medium` / `low`),留空随父会话默认。走官方 `agentOptions.reasoningEffort` 覆盖通道;子代理换了模型路由时官方会自动丢弃继承值,未显式设置不会跨模型泄漏。只接受 id 形态(字母数字与 `._-`),其他值保存时被拒绝 |
|
|
113
113
|
| `subagentProvider` | 否 | **子代理传输层**(`spawn` 等 `ctx.subagents` provider);默认取插件级默认 `spawn` |
|
|
114
114
|
| `maxTokens` | 否 | 子代理输出上限 |
|
|
115
|
-
| `persona` | 否 |
|
|
116
|
-
| `toolFilter` | 否 | `allow`/`deny` 工具名单(只读角色用 deny 禁写类工具)。**只读/受限角色建议把 `list_subagents`/`delegate` 也列入 deny**,防止子代理被全局提示词教去链式再派活。名单在**委派时按调用方会话的可限制集合**解析(不是"可见"):不可应用的名字被忽略,并在派活结果与 `list_subagents` 目录里标注原因(`本会话不存在` / `本会话专属工具`)——共享条目不会因为某个会话缺该工具而整次派活失败。**`allow` 名单若在本会话全部不可应用则拒绝委派**(否则"只留这些"会变成"什么都不留")。旧注册表无 `view()` 时退回可见性判定,此时 scope-local
|
|
115
|
+
| `persona` | 否 | 子代理角色提示词。**DSH ≤0.2.0 宿主**:作为系统 persona 部署,走严格的 `{{…}}` 模板插值(与部署 persona 同语义)——出现未注册的变量(如 `{{user}}`)会让子代理激活失败。**DSH ≥0.2.1 宿主**:启动请求已无 persona 字段,角色以 `Role persona:` 前缀折叠进首条任务消息——首轮生效,但不遮蔽部署 persona;续聊回合与上下文压缩后不保证角色仍在;`{{…}}` 不再插值(原文拼接)。不采用独立 `agentPreset` 承载角色:独立 preset 会替换父 preset 组合、丢掉父会话工具 |
|
|
116
|
+
| `toolFilter` | 否 | `allow`/`deny` 工具名单(只读角色用 deny 禁写类工具)。**只读/受限角色建议把 `list_subagents`/`delegate` 也列入 deny**,防止子代理被全局提示词教去链式再派活。名单在**委派时按调用方会话的可限制集合**解析(不是"可见"):不可应用的名字被忽略,并在派活结果与 `list_subagents` 目录里标注原因(`本会话不存在` / `本会话专属工具`)——共享条目不会因为某个会话缺该工具而整次派活失败。**`allow` 名单若在本会话全部不可应用则拒绝委派**(否则"只留这些"会变成"什么都不留")。旧注册表无 `view()` 时退回可见性判定,此时 scope-local 名仍会让委派明确报错。保存阶段不做校验。**DSH ≥0.2.1 宿主无法强制执行逐条目工具过滤**:带 `toolFilter` 的条目会被委派直接拒绝(目录标注「无法强制执行」,保存时附警告);这类条目只适用于 ≤0.2.0 宿主 |
|
|
117
117
|
| `maxDepth` | 否 | 委派深度上限;**缺省 = 传输层支持 depthLimit 时默认 3**(与官方 subagent 工具对齐,防链式递归派活;harness 自身无全局深度上限),不支持 depthLimit 的传输层则不设上限 |
|
|
118
118
|
| `backgroundMode` | 否 | `one-shot`(默认,文件中省略)/ `continuable`(可续聊) |
|
|
119
119
|
| `enabled` | 否 | 文件内写 `enabled: false` 停用该条目(目录与设置页仍可见,`delegate` 拒绝派活);省略或 `true` 为启用 |
|
|
@@ -129,11 +129,9 @@ backgroundMode: continuable
|
|
|
129
129
|
|
|
130
130
|
## 宿主与桌面端兼容
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
**0.3.2** 为插件管理页增加随客户端语言切换的中英文名称与简介,名册和委派行为不变。更新说明见 [CHANGELOG.md](./CHANGELOG.md)。
|
|
132
|
+
**0.3.5 对齐 DSH `0.2.1-rc.2`**:修复可续聊子代理与一次性委派无法启动,以及后台任务取消未能停止子代理的问题。前台一次性、可续聊、后台启动及运行中取消已在该版桌面宿主中复验。角色提示词与工具过滤的限制见上方提示和字段表,完整变化见 [CHANGELOG.md](./CHANGELOG.md)。
|
|
135
133
|
|
|
136
|
-
桌面客户端沿用 Web
|
|
134
|
+
桌面客户端沿用 Web 插件界面,无需另装桌面专用包。旧宿主的启动分支仍保留,但本轮实际运行验证以 `0.2.1-rc.2` 为准;模型调用仍取决于各 Provider 的配置与服务。名册目录、profile 路由和迁移规则不变,无需重新迁移。
|
|
137
135
|
|
|
138
136
|
## 安装
|
|
139
137
|
|
package/assets/readme/hero.svg
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<text x="248" y="192" font-family="'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif"
|
|
28
28
|
font-size="23" fill="#3d4468">DeepSeek Harness 具名子代理库 · 设置页可视化管理</text>
|
|
29
29
|
<text x="248" y="228" font-family="'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif"
|
|
30
|
-
font-size="16" fill="#7c84a8">list_subagents 选人 · delegate 派活 · 模型 /
|
|
30
|
+
font-size="16" fill="#7c84a8">list_subagents 选人 · delegate 派活 · 模型 / 角色提示词 / 深度可配</text>
|
|
31
31
|
<text x="248" y="254" font-family="'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif"
|
|
32
32
|
font-size="16" fill="#7c84a8">named subagent roster for the DSH Web GUI</text>
|
|
33
33
|
|
package/lib/client.js
CHANGED
|
@@ -758,6 +758,7 @@ function LibrarySettings(props) {
|
|
|
758
758
|
const cleanEntry = (entry) => {
|
|
759
759
|
const clean = { ...entry };
|
|
760
760
|
delete clean.source;
|
|
761
|
+
delete clean.routeNote;
|
|
761
762
|
if (clean.enabled === void 0 || clean.enabled) delete clean.enabled;
|
|
762
763
|
if (clean.provider === "") delete clean.provider;
|
|
763
764
|
if (clean.model === "") delete clean.model;
|
|
@@ -1033,6 +1034,14 @@ function LibrarySettings(props) {
|
|
|
1033
1034
|
]
|
|
1034
1035
|
}, index))
|
|
1035
1036
|
}),
|
|
1037
|
+
view.profile !== void 0 && view.profile !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1038
|
+
style: BANNER.info,
|
|
1039
|
+
children: [
|
|
1040
|
+
"当前 profile:",
|
|
1041
|
+
view.profile,
|
|
1042
|
+
"。这里填写的 Provider / 模型只保存到这个 profile,不会改写另一个 profile 的路由。共享名册里的模型若未在这里注册,调用会改用本会话的模型。"
|
|
1043
|
+
]
|
|
1044
|
+
}),
|
|
1036
1045
|
(view.legacyCount ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1037
1046
|
style: BANNER.info,
|
|
1038
1047
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
@@ -1615,6 +1624,7 @@ function LibrarySettings(props) {
|
|
|
1615
1624
|
children: [
|
|
1616
1625
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, {
|
|
1617
1626
|
label: "Provider",
|
|
1627
|
+
hint: entry.routeNote === "foreign-ignored" ? "共享名册里的路由当前 profile 没有,调用会改用本会话模型。留空保存不会改掉共享路由。" : entry.routeNote === "profile" ? `只保存在 profile ${view.profile ?? ""}` : entry.routeNote === "inherit" ? "本 profile 固定使用会话模型,不跟随共享名册路由" : entry.routeNote === "profile-missing" ? "这个 profile 保存的 Provider 未注册" : void 0,
|
|
1618
1628
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
1619
1629
|
value: entry.provider ?? "",
|
|
1620
1630
|
onChange: (event) => patch(id, { provider: event.target.value }),
|
|
@@ -1917,7 +1927,8 @@ const ERROR_TEXT = {
|
|
|
1917
1927
|
"invalid-id": "条目 ID 非法。",
|
|
1918
1928
|
"unknown-op": "未知操作。",
|
|
1919
1929
|
"roster-unreadable": "名册目录读取失败。",
|
|
1920
|
-
"write-failed": "名册文件写入失败。"
|
|
1930
|
+
"write-failed": "名册文件写入失败。",
|
|
1931
|
+
"profile-path": "当前 profile 名称不能保存独立模型路由。"
|
|
1921
1932
|
};
|
|
1922
1933
|
/** Map a wire view onto the UI model. Exported for the wire-contract tests —
|
|
1923
1934
|
* a dropped field here silently kills UI features (k3 review: legacyCount). */
|
|
@@ -1927,7 +1938,8 @@ const parseView = (value) => ({
|
|
|
1927
1938
|
hash: value.hash ?? "",
|
|
1928
1939
|
entries: value.entries ?? {},
|
|
1929
1940
|
diagnostics: value.diagnostics ?? [],
|
|
1930
|
-
legacyCount: value.legacyCount ?? 0
|
|
1941
|
+
legacyCount: value.legacyCount ?? 0,
|
|
1942
|
+
...typeof value.profile === "string" && value.profile !== "" ? { profile: value.profile } : {}
|
|
1931
1943
|
});
|
|
1932
1944
|
async function readView() {
|
|
1933
1945
|
const response = await fetch(API_PATH, { cache: "no-store" });
|