dsh-subagent-library 0.2.2 → 0.2.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/README.en.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# dsh-subagent-library
|
|
2
|
+
|
|
3
|
+
**[中文](./README.md) | English**
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<img src="./assets/readme/hero.svg" width="100%" alt="dsh-subagent-library — named subagent roster plugin for DeepSeek Harness" />
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
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
|
+
<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.1.1--rc.1-4d6bfe?style=flat-square" alt="DeepSeek Harness 0.1.1-rc.1" />
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
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 (model + persona + tool filter). Then **just tell the main agent "do this with xxx"** — the model picks and dispatches through two tools by itself:
|
|
18
|
+
|
|
19
|
+
- `list_subagents` — lists roster entries (id / role description / model) so the model can pick a suitable one;
|
|
20
|
+
- `delegate` — dispatches work by `library_id`: foreground wait, background one-shot, or a continuable (resumable) subagent, per the entry's configuration.
|
|
21
|
+
|
|
22
|
+
Available in every conversation (any agent preset), **no slash command needed**; the `/subagent` command is only for humans to peek at the roster in the command palette.
|
|
23
|
+
|
|
24
|
+
Adding entries needs no hand-written YAML either: ask the main agent to do it (it edits `$DSH_HOME/settings.yaml`, hot-reloaded), or edit visually in the settings page.
|
|
25
|
+
|
|
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
|
+
|
|
28
|
+
## Screenshots
|
|
29
|
+
|
|
30
|
+
<p align="center">
|
|
31
|
+
<img src="./assets/readme/screenshot-settings.png" width="75%" alt="Subagent Library settings card: edit roster entries visually" /><br>
|
|
32
|
+
<em>The Subagent Library settings card: add/edit/remove entries visually (model / transport / depth / denied tools / persona)</em>
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
<p align="center">
|
|
36
|
+
<img src="./assets/readme/screenshot-command-palette.png" alt="The /subagent command in the command palette" /><br>
|
|
37
|
+
<em>The <code>/subagent</code> command (quick roster viewer)</em>
|
|
38
|
+
</p>
|
|
39
|
+
|
|
40
|
+
<p align="center">
|
|
41
|
+
<img src="./assets/readme/screenshot-roster.png" width="75%" alt="/subagent output: the named subagent roster" /><br>
|
|
42
|
+
<em>Roster output example: one-line role description + model route + continuable marker per entry</em>
|
|
43
|
+
</p>
|
|
44
|
+
|
|
45
|
+
## Configuration
|
|
46
|
+
|
|
47
|
+
`$DSH_HOME/settings.yaml` (hot-reloaded, no restart needed):
|
|
48
|
+
|
|
49
|
+
```yaml
|
|
50
|
+
subagent-library:
|
|
51
|
+
entries:
|
|
52
|
+
k3-reviewer:
|
|
53
|
+
description: Independent read-only review on Kimi K3-256K, with image walkthroughs
|
|
54
|
+
provider: kimi-coding
|
|
55
|
+
model: k3-256k
|
|
56
|
+
persona: |
|
|
57
|
+
You are an independent review agent running on Kimi K3-256K…
|
|
58
|
+
toolFilter:
|
|
59
|
+
deny: [write, edit, todo_write, create_goal, update_goal, subagent, subagent_fork, send_message, interrupt_agent, workflow, ralph, list_subagents, delegate]
|
|
60
|
+
maxDepth: 1
|
|
61
|
+
backgroundMode: continuable
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Entry fields:
|
|
65
|
+
|
|
66
|
+
| Field | Required | Notes |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| `id` (dict key) | yes | `[a-z0-9][a-z0-9-]*`, e.g. `k3-reviewer` |
|
|
69
|
+
| `description` | yes | Role description, shown to the model by `list_subagents` |
|
|
70
|
+
| `provider` | no | **LLM route** (e.g. `deepseek-official`, `kimi-coding`); defaults to the caller's default |
|
|
71
|
+
| `model` | no | LLM model id; defaults to the caller's session model |
|
|
72
|
+
| `subagentProvider` | no | **Subagent transport** (a `ctx.subagents` provider such as `spawn`); defaults to the plugin-level default `spawn` |
|
|
73
|
+
| `maxTokens` | no | Subagent output cap |
|
|
74
|
+
| `persona` | no | Subagent system prompt. Personas go through strict `{{…}}` template interpolation (same semantics as deployment personas) — an unregistered variable (e.g. `{{user}}`) fails child activation |
|
|
75
|
+
| `toolFilter` | no | `allow`/`deny` tool-name lists (deny write-class tools for read-only roles; every name must be a registered tool or the save is rejected). **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 |
|
|
76
|
+
| `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 |
|
|
77
|
+
| `backgroundMode` | no | `one-shot` (default) / `continuable` (resumable) |
|
|
78
|
+
|
|
79
|
+
> Mind the two provider concepts: `provider` is the LLM route (`agentOptions.provider`),
|
|
80
|
+
> while `subagentProvider` is the subagent transport (`ctx.subagents` registration name, e.g. `spawn`/`fork`/`acp`).
|
|
81
|
+
|
|
82
|
+
## Install
|
|
83
|
+
|
|
84
|
+
One command, from npm (recommended):
|
|
85
|
+
|
|
86
|
+
```sh
|
|
87
|
+
npx @deepseek-ai/dsh plugin --profile web add dsh-subagent-library
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Then **restart `dsh web`** (stop the process, run `dsh web` again) and refresh the page.
|
|
91
|
+
|
|
92
|
+
Other install sources:
|
|
93
|
+
|
|
94
|
+
```sh
|
|
95
|
+
# From GitHub (git-hosted plugin; lib/ build artifacts are committed, no local build needed)
|
|
96
|
+
npx @deepseek-ai/dsh plugin --profile web add github:MaRi23333/dsh-subagent-library
|
|
97
|
+
|
|
98
|
+
# From a local checkout
|
|
99
|
+
git clone https://github.com/MaRi23333/dsh-subagent-library.git
|
|
100
|
+
cd dsh-subagent-library
|
|
101
|
+
pnpm install && pnpm run build
|
|
102
|
+
npx @deepseek-ai/dsh plugin --profile web add /absolute/path/to/dsh-subagent-library
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
> The repo commits `lib/` build artifacts, so git installs need no local build; after
|
|
106
|
+
> changing sources run `pnpm run build` and restart.
|
|
107
|
+
> Adding/removing/editing roster entries (`$DSH_HOME/settings.yaml`) is **hot-reloaded** — no restart.
|
|
108
|
+
|
|
109
|
+
## Settings page
|
|
110
|
+
|
|
111
|
+
A **Subagent Library** card appears under Settings: visually add/edit/remove entries
|
|
112
|
+
(description / provider / model / subagentProvider transport / maxTokens / denied tools /
|
|
113
|
+
depth / background mode / persona), written back to `$DSH_HOME/settings.yaml`, hot-reloaded.
|
|
114
|
+
The add card takes the common fields (ID / description / provider / model / transport /
|
|
115
|
+
output cap); the rest (denied tools / depth / background mode / persona) are edited inside
|
|
116
|
+
the entry card.
|
|
117
|
+
|
|
118
|
+
> **Security note:** the roster settings endpoint (`/subagent-library/api`) follows the
|
|
119
|
+
> DSH Web Host's local trust boundary — the plugin itself adds no separate authentication
|
|
120
|
+
> layer. If you bind DSH Web to a LAN, the public internet, or a reverse proxy, put proper
|
|
121
|
+
> authentication and access control in front of it; do not expose this endpoint to
|
|
122
|
+
> untrusted clients — subagent personas and configuration may contain internal working rules.
|
|
123
|
+
|
|
124
|
+
## Design notes
|
|
125
|
+
|
|
126
|
+
- Tools register on the **host plane**: no dependency on any agent preset, and switching presets never loses them;
|
|
127
|
+
- Dispatch goes through the standard `ctx.subagents` seam (providers such as `spawn`), so subagents keep harness semantics: approval pinned to never, sandbox inherited from the parent session, depth caps, continuable support;
|
|
128
|
+
- Entries are re-resolved from settings on every operation — hot edits take effect immediately.
|
|
129
|
+
|
|
130
|
+
## Development
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
pnpm install
|
|
134
|
+
pnpm run typecheck
|
|
135
|
+
pnpm run build # host: lib/index.js; client: lib/client.js
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
- Dev dependencies are pinned to DSH `0.1.0-rc.6` (see package.json devDependencies); verified compatible up to `0.1.1-rc.1`. If the interfaces drift on other versions, adjust against the corresponding tag of the [deepseek-harness repo](https://github.com/deepseek-ai/deepseek-harness).
|
|
139
|
+
|
|
140
|
+
## License
|
|
141
|
+
|
|
142
|
+
[MIT](./LICENSE). Third-party license notices for code inlined into the build artifacts are in [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md).
|
|
143
|
+
|
|
144
|
+
This is an independent community project, not affiliated with or endorsed by DeepSeek; the `DeepSeek Harness` name is used only to identify the compatible platform.
|
package/README.md
CHANGED
|
@@ -1,14 +1,54 @@
|
|
|
1
1
|
# dsh-subagent-library
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**中文 | [English](./README.en.md)**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<p align="center">
|
|
6
|
+
<img src="./assets/readme/hero.svg" width="100%" alt="dsh-subagent-library — DeepSeek Harness 具名子代理库插件" />
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
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
|
+
<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.1.1--rc.1-4d6bfe?style=flat-square" alt="DeepSeek Harness 0.1.1-rc.1" />
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
> **English:** dsh-subagent-library is a named subagent roster plugin for the
|
|
16
|
+
> [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) Web GUI —
|
|
17
|
+
> manage role entries (model / persona / tool filter / depth / background mode)
|
|
18
|
+
> from a settings page, hot-reloaded, then let any conversation pick one with
|
|
19
|
+
> `list_subagents` and dispatch work with `delegate`. See
|
|
20
|
+
> [README.en.md](./README.en.md) for the full English version.
|
|
21
|
+
|
|
22
|
+
## 简介
|
|
23
|
+
|
|
24
|
+
DeepSeek Harness 的具名子代理库插件:把常用角色(代码审查、红队、多模态理解……)配成一份持久化的具名子代理名册(模型 + persona + 工具过滤),之后**只需告诉主会话 agent「用 xxx 做这件事」**——模型自己通过两个工具完成选人和派活:
|
|
25
|
+
|
|
26
|
+
- `list_subagents` — 列出名册条目(id / 角色描述 / 模型),模型据此挑选;
|
|
6
27
|
- `delegate` — 按 `library_id` 派活:前台等待、后台 one-shot 任务、或 continuable 可续聊子代理(按条目配置)。
|
|
7
28
|
|
|
8
|
-
|
|
29
|
+
任何会话(任意 agent preset)直接可用,**不需要 slash 命令**;`/subagent` 命令只是给人类在命令面板里快速查看名册用的。
|
|
30
|
+
|
|
31
|
+
新增条目也不用手写 YAML:直接让主会话 agent 帮你配(它编辑 `$DSH_HOME/settings.yaml`,热生效),或在设置页里可视化编辑。
|
|
9
32
|
|
|
10
33
|
> 与官方能力的区分:官方 `subagent` 工具是临时派活(每次现场描述任务),官方 `list_agents` 列的是正在运行的子代实例;本插件维护的是**持久化的具名角色名册**(设置页可视化编辑、热生效),模型用 `list_subagents` 选人、`delegate` 按 id 派活。
|
|
11
34
|
|
|
35
|
+
## 界面
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<img src="./assets/readme/screenshot-settings.png" width="75%" alt="设置页「子代理库」卡片:可视化编辑名册条目" /><br>
|
|
39
|
+
<em>设置页「子代理库」卡片:可视化增删改条目(模型 / 传输层 / 深度 / 禁用工具 / persona)</em>
|
|
40
|
+
</p>
|
|
41
|
+
|
|
42
|
+
<p align="center">
|
|
43
|
+
<img src="./assets/readme/screenshot-command-palette.png" alt="命令面板里的 /subagent 命令" /><br>
|
|
44
|
+
<em><code>/subagent</code> 命令(快速查看子代理库名册)</em>
|
|
45
|
+
</p>
|
|
46
|
+
|
|
47
|
+
<p align="center">
|
|
48
|
+
<img src="./assets/readme/screenshot-roster.png" width="75%" alt="/subagent 输出:具名子代理名册一览" /><br>
|
|
49
|
+
<em>名册输出示例:每个条目一句话角色描述 + 模型路由 + 可续聊标记</em>
|
|
50
|
+
</p>
|
|
51
|
+
|
|
12
52
|
## 配置
|
|
13
53
|
|
|
14
54
|
`$DSH_HOME/settings.yaml`(热生效,无需重启):
|
|
@@ -94,8 +134,10 @@ pnpm run typecheck
|
|
|
94
134
|
pnpm run build # host: lib/index.js;client: lib/client.js
|
|
95
135
|
```
|
|
96
136
|
|
|
97
|
-
-
|
|
137
|
+
- 开发依赖锁定 DSH `0.1.0-rc.6`(见 package.json devDependencies),实机验证兼容至 `0.1.1-rc.1`;其他版本如接口漂移请对照 [deepseek-harness 仓库](https://github.com/deepseek-ai/deepseek-harness) 相应 tag 调整。
|
|
98
138
|
|
|
99
139
|
## License
|
|
100
140
|
|
|
101
|
-
[MIT](./LICENSE)
|
|
141
|
+
[MIT](./LICENSE)。本仓库内联构建产物的第三方许可证声明见 [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md)。
|
|
142
|
+
|
|
143
|
+
本插件是独立社区项目,与 DeepSeek 无任何隶属或背书关系;`DeepSeek Harness` 名称仅用于标明兼容平台。
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 320" width="1200" height="320">
|
|
2
|
+
<defs>
|
|
3
|
+
<linearGradient id="bg" x1="0" y1="0" x2="1" y2="1">
|
|
4
|
+
<stop offset="0" stop-color="#f8faff"/>
|
|
5
|
+
<stop offset="1" stop-color="#eef2fe"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
|
|
9
|
+
<!-- canvas -->
|
|
10
|
+
<rect x="0.5" y="0.5" width="1199" height="319" rx="18" fill="url(#bg)" stroke="#dfe6fb"/>
|
|
11
|
+
|
|
12
|
+
<!-- brand badge: roster glyph (one coordinator node dispatching to three named agents) -->
|
|
13
|
+
<g transform="translate(100,124) scale(4.5)">
|
|
14
|
+
<rect x="-2.2" y="-2.2" width="20.4" height="20.4" rx="4.6" fill="#4d6bfe"/>
|
|
15
|
+
<g fill="none" stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round">
|
|
16
|
+
<circle cx="5" cy="8" r="1.9" stroke-width="1.05"/>
|
|
17
|
+
<circle cx="12.4" cy="4.6" r="1.6" stroke-width="1"/>
|
|
18
|
+
<circle cx="12.4" cy="8" r="1.6" stroke-width="1"/>
|
|
19
|
+
<circle cx="12.4" cy="11.4" r="1.6" stroke-width="1"/>
|
|
20
|
+
<path d="M6.7 7.1L10.9 5.1M6.9 8h3.9M6.7 8.9l4.2 2" stroke-width="0.9"/>
|
|
21
|
+
</g>
|
|
22
|
+
</g>
|
|
23
|
+
|
|
24
|
+
<!-- title / tagline -->
|
|
25
|
+
<text x="248" y="148" font-family="ui-monospace, 'Cascadia Code', Consolas, 'Courier New', monospace"
|
|
26
|
+
font-size="42" font-weight="700" fill="#16204a" letter-spacing="-0.5">dsh-subagent-library</text>
|
|
27
|
+
<text x="248" y="192" font-family="'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif"
|
|
28
|
+
font-size="23" fill="#3d4468">DeepSeek Harness 具名子代理库 · 设置页可视化管理</text>
|
|
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 派活 · 模型 / persona / 工具过滤 / 深度可配</text>
|
|
31
|
+
<text x="248" y="254" font-family="'Segoe UI', 'Microsoft YaHei', system-ui, sans-serif"
|
|
32
|
+
font-size="16" fill="#7c84a8">named subagent roster for the DSH Web GUI</text>
|
|
33
|
+
|
|
34
|
+
<!-- roster tree, right side -->
|
|
35
|
+
<g stroke="#4d6bfe" fill="none" stroke-linecap="round">
|
|
36
|
+
<path d="M970 160h40M1010 160c25 0 25-64 50-64M1010 160h50M1010 160c25 0 25 64 50 64M1010 160c25 0 25 128 50 128" stroke-width="3" opacity="0.45"/>
|
|
37
|
+
<circle cx="950" cy="160" r="20" stroke-width="4"/>
|
|
38
|
+
<circle cx="1082" cy="96" r="15" stroke-width="3.5" opacity="0.9"/>
|
|
39
|
+
<circle cx="1082" cy="160" r="15" stroke-width="3.5" opacity="0.7"/>
|
|
40
|
+
<circle cx="1082" cy="224" r="15" stroke-width="3.5" opacity="0.55"/>
|
|
41
|
+
<circle cx="1082" cy="288" r="15" stroke-width="3.5" opacity="0.4"/>
|
|
42
|
+
</g>
|
|
43
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-subagent-library",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Named subagent library for DeepSeek Harness: a settings-driven roster of role subagents (model + persona + tool filter), exposed to every session through the list_subagents and delegate tools, a /subagent command, and a Settings page.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"deepseek-harness",
|
|
@@ -38,8 +38,10 @@
|
|
|
38
38
|
"lib/client.js",
|
|
39
39
|
"cordis.patch.yml",
|
|
40
40
|
"README.md",
|
|
41
|
+
"README.en.md",
|
|
41
42
|
"LICENSE",
|
|
42
|
-
"THIRD_PARTY_NOTICES.md"
|
|
43
|
+
"THIRD_PARTY_NOTICES.md",
|
|
44
|
+
"assets/readme"
|
|
43
45
|
],
|
|
44
46
|
"dsh": {
|
|
45
47
|
"bundle": {
|
|
@@ -64,9 +66,11 @@
|
|
|
64
66
|
"prepack": "pnpm run build"
|
|
65
67
|
},
|
|
66
68
|
"license": "MIT",
|
|
69
|
+
"dependencies": {
|
|
70
|
+
"@deepseek-ai/schemastery": "^3.18.1"
|
|
71
|
+
},
|
|
67
72
|
"peerDependencies": {
|
|
68
|
-
"@deepseek-ai/cordis": "^4.0.1"
|
|
69
|
-
"@deepseek-ai/schemastery": "^3.0.0"
|
|
73
|
+
"@deepseek-ai/cordis": "^4.0.1"
|
|
70
74
|
},
|
|
71
75
|
"devDependencies": {
|
|
72
76
|
"@deepseek-ai/cordis": "4.0.1",
|
|
@@ -86,7 +90,6 @@
|
|
|
86
90
|
"@deepseek-ai/dsh-settings": "0.1.0-rc.6",
|
|
87
91
|
"@deepseek-ai/dsh-subagent": "0.1.0-rc.6",
|
|
88
92
|
"@deepseek-ai/dsh-tools": "0.1.0-rc.6",
|
|
89
|
-
"@deepseek-ai/schemastery": "3.18.1",
|
|
90
93
|
"@types/node": "^26.2.0",
|
|
91
94
|
"@types/react": "~18.3.1",
|
|
92
95
|
"@types/react-dom": "~18.3.0",
|