dsh-lead-mode 0.1.1 → 0.1.3
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.md +135 -87
- package/README.zh-CN.md +220 -0
- package/cordis.patch.yml +5 -1
- package/package.json +3 -3
- package/skills/lead-mode/SKILL.md +80 -8
- package/README.en.md +0 -146
package/README.md
CHANGED
|
@@ -1,137 +1,185 @@
|
|
|
1
1
|
# dsh-lead-mode
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
English | [中文](README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Adds a Lead mode to DSH. One preset, one skill, one self-check command, two reminders.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
2. skill:Lead 工作法写在里面,模型可以自己加载,你也可以手动加载。
|
|
9
|
-
3. 提醒:本会话没有 Team 工具时,模型第一句就告诉你先去开官方 Agent Teams,不硬干。
|
|
7
|
+
Once installed, the model works the way a Lead does: split the work, delegate it, accept the result. It delegates hands-on work instead of doing everything alone.
|
|
10
8
|
|
|
11
|
-
##
|
|
9
|
+
## What you get
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
Four things. None of them touch dsh itself.
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
| Capability | Entry point | What you do |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| Lead mode preset | "Lead 模式" in the preset list | Switch to it |
|
|
16
|
+
| Lead working method skill | `/skill lead-mode`; the model also loads it on its own | Nothing |
|
|
17
|
+
| Dependency self-check | `/lead-mode` | Run it when dependencies look wrong |
|
|
18
|
+
| Two upfront reminders | Automatic | Nothing |
|
|
19
|
+
|
|
20
|
+
### 1. The Lead mode preset
|
|
21
|
+
|
|
22
|
+
Switch to it and the session's model becomes a Lead.
|
|
23
|
+
|
|
24
|
+
The preset is the official `standard` preset row for row, all 22 of them, with only the persona replaced. No tool is dropped: bash, file read/write, search, web, todo, skill, goal, plan, compaction, subagent and workflow are all there.
|
|
25
|
+
|
|
26
|
+
So switching to Lead mode costs you no capability. It changes how the model works, not what it can do.
|
|
27
|
+
|
|
28
|
+
### 2. The Lead working method skill
|
|
29
|
+
|
|
30
|
+
A working method for splitting, delegating and accepting work, shipped inside the package.
|
|
18
31
|
|
|
19
|
-
|
|
32
|
+
It is not tied to the preset. Any session can load it, two ways:
|
|
20
33
|
|
|
21
|
-
|
|
34
|
+
- The model loads it when it judges the task needs it (the skill is marked model-invocable)
|
|
35
|
+
- You run `/skill lead-mode` yourself
|
|
36
|
+
|
|
37
|
+
It covers: agreeing on the goal before starting, making a delegation self-contained, keeping write scopes disjoint, the list/get/claim/complete flow for shared tasks, how to wait on teammates, where a teammate's model comes from, and doing the final verification yourself.
|
|
38
|
+
|
|
39
|
+
Two of those facts only show up when you read the runtime source:
|
|
40
|
+
|
|
41
|
+
| Fact | Consequence |
|
|
42
|
+
|---|---|
|
|
43
|
+
| The only path that wakes the Lead is a teammate's own `send_message` | Omit the report-back requirement from the delegation prompt and the teammate finishes silently; the Lead stays asleep |
|
|
44
|
+
| A task change only wakes a caller currently inside `wait_agent` | Marking a task complete alone cannot wake an idle Lead |
|
|
45
|
+
|
|
46
|
+
So the skill's default is: finish your turn after delegating and let the message wake you (the user sees progress immediately), and use one `wait_agent` only when the current turn cannot continue without the result. Never loop `wait_agent`, and never poll with repeated `list_agents`.
|
|
47
|
+
|
|
48
|
+
### 3. The dependency self-check command
|
|
49
|
+
|
|
50
|
+
`/lead-mode` reports the current dependency state.
|
|
51
|
+
|
|
52
|
+
| Reported | Content |
|
|
53
|
+
|---|---|
|
|
54
|
+
| Team runtime | Mounted or not; its `maxMembers` when mounted |
|
|
55
|
+
| lead-mode preset | Registered or not |
|
|
56
|
+
| Missing pieces | The version-pinned install command |
|
|
22
57
|
|
|
23
|
-
|
|
58
|
+
Everything in place returns success. Anything missing returns error. Nothing is skipped silently.
|
|
24
59
|
|
|
25
|
-
|
|
60
|
+
### 4. Two upfront reminders
|
|
26
61
|
|
|
27
|
-
|
|
62
|
+
This is the main reason the plugin exists: **when the session has no Team tools, it tells you to enable the official Agent Teams instead of letting the model work alone.**
|
|
63
|
+
|
|
64
|
+
Two channels:
|
|
65
|
+
|
|
66
|
+
| Channel | Who sees it | When it appears |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| First persona section | The model | As soon as you switch to Lead mode. It is section 0 of the system prompt |
|
|
69
|
+
| Startup warn and `/lead-mode` | You | When the Team runtime is detected missing |
|
|
70
|
+
|
|
71
|
+
Both say the same thing: without the `spawn_teammate` tool set, stop and tell the user what to install.
|
|
72
|
+
|
|
73
|
+
The model will not pretend it can delegate, and it will not pass `subagent` off as a teammate.
|
|
74
|
+
|
|
75
|
+
## Enable the Team runtime first
|
|
76
|
+
|
|
77
|
+
Lead mode delegates through `spawn_teammate`, `send_message`, and `team_task_*`. Those come from the official dsh Team runtime, which this plugin does not ship.
|
|
28
78
|
|
|
29
79
|
```bash
|
|
30
|
-
dsh plugin --profile
|
|
80
|
+
dsh plugin --profile <your profile name> add @deepseek-ai/dsh-experimental-agent-team-profile@0.2.1-rc.3
|
|
31
81
|
```
|
|
32
82
|
|
|
33
|
-
|
|
83
|
+
**The version pin is required.** Without it npm resolves `latest`, which is 0.1.5-alpha.2 — built for 0.1.x hosts and it will not mount on a 0.2.1 host. `next` points at 0.2.1-rc.3, which is the correct one. Restart dsh afterwards.
|
|
84
|
+
|
|
85
|
+
Not sure whether it is installed? Run `/lead-mode` in dsh; it reports dependency state.
|
|
86
|
+
|
|
87
|
+
## Install this plugin
|
|
88
|
+
|
|
89
|
+
Two routes, pick one.
|
|
90
|
+
|
|
91
|
+
From npm:
|
|
34
92
|
|
|
35
93
|
```bash
|
|
36
|
-
dsh plugin --profile
|
|
94
|
+
dsh plugin --profile <your profile name> add dsh-lead-mode
|
|
37
95
|
```
|
|
38
96
|
|
|
39
|
-
|
|
97
|
+
From GitHub:
|
|
40
98
|
|
|
41
|
-
|
|
99
|
+
```bash
|
|
100
|
+
dsh plugin --profile <your profile name> add https://github.com/xiebaiyuan/dsh-lead-mode
|
|
101
|
+
```
|
|
42
102
|
|
|
43
|
-
|
|
103
|
+
Restart dsh afterwards, then pick "Lead 模式" in the preset list.
|
|
44
104
|
|
|
45
|
-
|
|
105
|
+
## Usage
|
|
46
106
|
|
|
47
|
-
|
|
107
|
+
Three steps.
|
|
48
108
|
|
|
49
|
-
-
|
|
50
|
-
- `lead-mode` 预设注册没注册
|
|
51
|
-
- 缺东西时给带版本号的安装命令
|
|
109
|
+
**1. Switch to Lead mode.** Pick "Lead 模式" in a new session's preset list. The first system-prompt section becomes the Lead persona, and the reminder at its top goes in with it.
|
|
52
110
|
|
|
53
|
-
|
|
111
|
+
**2. Run `/lead-mode` to check dependencies.** This command delegates nothing; it only reports state. When something is missing it prints the version-pinned install command.
|
|
54
112
|
|
|
55
|
-
**3.
|
|
113
|
+
**3. Let the model work.** With the delegation tools in place, the model splits the work, delegates to teammates, and waits for all of them before wrapping up. Without them, its first move is to tell you to enable the Team runtime.
|
|
56
114
|
|
|
57
|
-
##
|
|
115
|
+
## Required official bundles and versions
|
|
58
116
|
|
|
59
|
-
|
|
117
|
+
This plugin ships none of the packages below. The host or an official bundle provides them; this plugin only declares version requirements in `peerDependencies`.
|
|
60
118
|
|
|
61
|
-
|
|
|
119
|
+
| Package | Requirement | Provided by | When missing |
|
|
62
120
|
|---|---|---|---|
|
|
63
|
-
| `@deepseek-ai/dsh-experimental-agent-team-profile` | `0.2.1-rc.3` |
|
|
64
|
-
| `@deepseek-ai/dsh` | `>=0.2.1-rc.2` |
|
|
65
|
-
| `@deepseek-ai/cordis` | `^4.0.5` |
|
|
66
|
-
| `@deepseek-ai/schemastery` | `^3.18.5` |
|
|
67
|
-
| `@deepseek-ai/dsh-agent-preset-registry` | `>=0.2.1-rc.2` |
|
|
68
|
-
| `@deepseek-ai/dsh-skill` | `>=0.2.1-rc.2` |
|
|
69
|
-
| `@deepseek-ai/dsh-commands` | `>=0.2.1-rc.2` |
|
|
121
|
+
| `@deepseek-ai/dsh-experimental-agent-team-profile` | `0.2.1-rc.3` | You install it explicitly | Cannot delegate; `/lead-mode` returns error; startup warn |
|
|
122
|
+
| `@deepseek-ai/dsh` | `>=0.2.1-rc.2` | Host | Will not install |
|
|
123
|
+
| `@deepseek-ai/cordis` | `^4.0.5` | Host | Will not install |
|
|
124
|
+
| `@deepseek-ai/schemastery` | `^3.18.5` | Host | Will not install |
|
|
125
|
+
| `@deepseek-ai/dsh-agent-preset-registry` | `>=0.2.1-rc.2` | Host | Preset row does not take effect; `/lead-mode` reports unknown |
|
|
126
|
+
| `@deepseek-ai/dsh-skill` | `>=0.2.1-rc.2` | Host | Skill not registered; startup warn |
|
|
127
|
+
| `@deepseek-ai/dsh-commands` | `>=0.2.1-rc.2` | Host | `/lead-mode` not registered; startup warn |
|
|
70
128
|
|
|
71
|
-
|
|
129
|
+
The target host version is `dshTarget` in `package.json`: `0.2.1-rc.3`.
|
|
72
130
|
|
|
73
|
-
##
|
|
131
|
+
## Why the install command pins a version
|
|
74
132
|
|
|
75
|
-
`@deepseek-ai/dsh-experimental-agent-team-profile`
|
|
133
|
+
`@deepseek-ai/dsh-experimental-agent-team-profile` has three dist-tags on npm:
|
|
76
134
|
|
|
77
|
-
| dist-tag |
|
|
135
|
+
| dist-tag | Version | Host it fits |
|
|
78
136
|
|---|---|---|
|
|
79
137
|
| `latest` | 0.1.5-alpha.2 | 0.1.x |
|
|
80
|
-
| `alpha` | 0.2.1-alpha.5 | 0.2.1
|
|
138
|
+
| `alpha` | 0.2.1-alpha.5 | the 0.2.1 prerelease line |
|
|
81
139
|
| `next` | 0.2.1-rc.3 | 0.2.1 |
|
|
82
140
|
|
|
83
|
-
|
|
141
|
+
Bare package name resolves `latest`, which installs 0.1.5-alpha.2. That build targets 0.1.x hosts and does not mount on a 0.2.1 host. After installing it, no Team tools appear in dsh and `/lead-mode` still reports "not mounted".
|
|
84
142
|
|
|
85
|
-
|
|
143
|
+
Measured on 2026-10-26 with npm 11.20.0:
|
|
86
144
|
|
|
87
145
|
```
|
|
88
146
|
$ npm view @deepseek-ai/dsh-experimental-agent-team-profile version
|
|
89
147
|
0.1.5-alpha.2
|
|
90
148
|
```
|
|
91
149
|
|
|
92
|
-
|
|
150
|
+
So every install command in this plugin carries `@0.2.1-rc.3`: the persona prefix, the `/lead-mode` output, the startup warn, and SKILL.md. `test/preset.test.mjs` and `test/smoke.test.mjs` both assert that string, so a future edit cannot quietly drop back to the bare name.
|
|
93
151
|
|
|
94
|
-
|
|
152
|
+
For the `alpha` line, pin `@0.2.1-alpha.5` yourself; do not use the bare name.
|
|
95
153
|
|
|
96
|
-
##
|
|
154
|
+
## Difference from the official standard preset
|
|
97
155
|
|
|
98
|
-
|
|
156
|
+
One place only: the persona. The other 21 rows are copied field for field from `standard`.
|
|
99
157
|
|
|
100
|
-
|
|
|
158
|
+
| Item | standard | lead-mode |
|
|
101
159
|
|---|---|---|
|
|
102
|
-
| persona prefix | `You are a coding agent powered by the {{model}} model.` |
|
|
103
|
-
|
|
|
104
|
-
|
|
105
|
-
classic subagent 四行(`tool-subagent-control`、`tool-subagent-list-agents`、`tool-subagent`、`tool-subagent-fork`)保持启用,没有禁用。Team 工具由 host 决定,不由预设决定。
|
|
106
|
-
|
|
107
|
-
## 为什么预设里不塞 Team 运行时
|
|
108
|
-
|
|
109
|
-
`@deepseek-ai/dsh-experimental-tool-agent-team` 的 `apply()` 监听全局 `agent/created`,给每一个 agent 装 Team 工具。它是 host 平面的插件,放进预设会漏到所有会话。
|
|
110
|
-
|
|
111
|
-
所以本插件的定位是:预设 + skill + 提醒。开不开 Team 运行时,用户用官方 profile 包决定。
|
|
160
|
+
| persona prefix | `You are a coding agent powered by the {{model}} model.` | Chinese Lead persona plus an Agent Teams precondition check |
|
|
161
|
+
| other 21 rows | — | identical to standard, field for field |
|
|
112
162
|
|
|
113
|
-
|
|
163
|
+
The four classic subagent rows (`tool-subagent-control`, `tool-subagent-list-agents`, `tool-subagent`, `tool-subagent-fork`) stay enabled. Nothing is disabled. The Team tools are a host decision, not a preset decision.
|
|
114
164
|
|
|
115
|
-
|
|
165
|
+
## Why the preset does not carry the Team runtime
|
|
116
166
|
|
|
117
|
-
-
|
|
118
|
-
- `lead-mode` 预设注册没有
|
|
119
|
-
- 缺东西时给带版本号的安装命令
|
|
167
|
+
`apply()` in `@deepseek-ai/dsh-experimental-tool-agent-team` listens on the global `agent/created` event and installs Team tools on every agent. It is a host-plane plugin; putting it in a preset would leak it into every session.
|
|
120
168
|
|
|
121
|
-
|
|
169
|
+
So this plugin stays at: preset, skill, reminder. Whether the Team runtime is on is decided by the user through the official profile package.
|
|
122
170
|
|
|
123
|
-
##
|
|
171
|
+
## Layout
|
|
124
172
|
|
|
125
173
|
```
|
|
126
|
-
package.json
|
|
127
|
-
cordis.patch.yml
|
|
128
|
-
lib/index.js
|
|
129
|
-
skills/lead-mode/
|
|
130
|
-
dsh-plugin.naming.json
|
|
131
|
-
test/
|
|
174
|
+
package.json package metadata; dsh.bundle.patch points at cordis.patch.yml
|
|
175
|
+
cordis.patch.yml two insert rows: this plugin and the lead-mode preset
|
|
176
|
+
lib/index.js host half: register the skill, register the command, startup check
|
|
177
|
+
skills/lead-mode/ the Lead working method
|
|
178
|
+
dsh-plugin.naming.json naming manifest
|
|
179
|
+
test/ behaviour assertions, zero dependencies
|
|
132
180
|
```
|
|
133
181
|
|
|
134
|
-
##
|
|
182
|
+
## Development
|
|
135
183
|
|
|
136
184
|
```bash
|
|
137
185
|
node --check lib/index.js
|
|
@@ -139,34 +187,34 @@ node --test test/*.test.mjs
|
|
|
139
187
|
node scripts/check-patch.mjs
|
|
140
188
|
```
|
|
141
189
|
|
|
142
|
-
|
|
190
|
+
Tests are zero-dependency. No `npm install` needed. The directory form of `node --test` is accepted only on Node 22+; on Node 20 the shell expands the glob.
|
|
143
191
|
|
|
144
|
-
##
|
|
192
|
+
## Releasing
|
|
145
193
|
|
|
146
|
-
|
|
194
|
+
Push a tag to trigger `.github/workflows/release.yml`. Publishing goes through npm Trusted Publishing (OIDC). No token is stored and no 2FA prompt appears.
|
|
147
195
|
|
|
148
|
-
|
|
196
|
+
Configure the Trusted Publisher once on npmjs.com:
|
|
149
197
|
|
|
150
|
-
|
|
|
198
|
+
| Field | Value |
|
|
151
199
|
|---|---|
|
|
152
200
|
| Organization or user | `xiebaiyuan` |
|
|
153
201
|
| Repository | `dsh-lead-mode` |
|
|
154
202
|
| Workflow filename | `release.yml` |
|
|
155
|
-
| Allowed actions |
|
|
203
|
+
| Allowed actions | Tick `npm publish` |
|
|
156
204
|
|
|
157
|
-
`npm stage publish`
|
|
205
|
+
`npm stage publish` is allowed by default. With only that ticked, CI can stage but a human still has to approve before the version goes live.
|
|
158
206
|
|
|
159
|
-
|
|
207
|
+
Once configured:
|
|
160
208
|
|
|
161
209
|
```bash
|
|
162
|
-
npm version patch --no-git-tag-version
|
|
163
|
-
git commit -am "chore: bump to 0.1.
|
|
164
|
-
git tag v0.1.
|
|
210
|
+
npm version patch --no-git-tag-version
|
|
211
|
+
git commit -am "chore: bump to 0.1.3"
|
|
212
|
+
git tag v0.1.3
|
|
165
213
|
git push origin main --tags
|
|
166
214
|
```
|
|
167
215
|
|
|
168
|
-
tag
|
|
216
|
+
The tag version must equal `package.json`'s version, or the workflow exits without publishing. npm rejects a second publish of the same version, so bump the version every time.
|
|
169
217
|
|
|
170
218
|
## License
|
|
171
219
|
|
|
172
|
-
MIT
|
|
220
|
+
MIT
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# dsh-lead-mode
|
|
2
|
+
|
|
3
|
+
中文 | [English](README.md)
|
|
4
|
+
|
|
5
|
+
给 DSH 加一个 Lead 模式。一个预设、一个 skill、一个自检命令、两条前置提醒。
|
|
6
|
+
|
|
7
|
+
装好后模型能按 Lead 的方式干活:拆活、派活、验收。动手的活尽量派出去。
|
|
8
|
+
|
|
9
|
+
## 提供的能力
|
|
10
|
+
|
|
11
|
+
四样东西,都不碰 dsh 本体。
|
|
12
|
+
|
|
13
|
+
| 能力 | 入口 | 你要做什么 |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| Lead 模式预设 | 预设下拉里的「Lead 模式」 | 切过去 |
|
|
16
|
+
| Lead 工作法 skill | `/skill lead-mode`,模型也会自己加载 | 不用管 |
|
|
17
|
+
| 依赖自检 | `/lead-mode` | 依赖不对时敲一下 |
|
|
18
|
+
| 两层前置提醒 | 自动 | 不用管 |
|
|
19
|
+
|
|
20
|
+
### 一、Lead 模式预设
|
|
21
|
+
|
|
22
|
+
切过去,这个会话的模型就换成 Lead 人设。
|
|
23
|
+
|
|
24
|
+
预设内容等于官方 `standard` 预设的全部 22 行,只把 persona 换掉。工具一个不少:bash、文件读写、搜索、web、todo、skill、goal、plan、compaction、subagent、workflow 全在。
|
|
25
|
+
|
|
26
|
+
也就是说,切到 Lead 模式不会让你少任何能力,只是换了工作方式。
|
|
27
|
+
|
|
28
|
+
### 二、Lead 工作法 skill
|
|
29
|
+
|
|
30
|
+
一套拆活、派活、验收的方法,随包分发。
|
|
31
|
+
|
|
32
|
+
它不绑预设。任何会话都能加载,两条路:
|
|
33
|
+
|
|
34
|
+
- 模型判断需要时自己加载(skill 标记为模型可调用)
|
|
35
|
+
- 你直接敲 `/skill lead-mode`
|
|
36
|
+
|
|
37
|
+
覆盖这些内容:开工前对齐目标、派活必须自包含、写作用域不重叠、共享任务的 list/get/claim/complete 流程、怎么等 teammate、teammate 的模型从哪来、最终验证自己做。
|
|
38
|
+
|
|
39
|
+
其中两条是读源码才确认的,容易踩:
|
|
40
|
+
|
|
41
|
+
| 事实 | 后果 |
|
|
42
|
+
|---|---|
|
|
43
|
+
| 唤醒 Lead 的路径只有 teammate 主动 `send_message` | 派活 prompt 里不写回报要求,teammate 干完不吭声,Lead 一直睡着 |
|
|
44
|
+
| task 变更只唤醒正在 `wait_agent` 的调用方 | 光靠 teammate 把 task 标 complete,唤不醒空闲的 Lead |
|
|
45
|
+
|
|
46
|
+
所以 skill 的默认建议是:派完活就结束回合等消息(用户立刻看到进展),只有本回合内就必须拿到结果时才用一次 `wait_agent`。不要 `wait_agent` 套循环,也不要反复 `list_agents` 轮询。
|
|
47
|
+
|
|
48
|
+
### 三、依赖自检命令
|
|
49
|
+
|
|
50
|
+
`/lead-mode` 报告当前依赖状态。
|
|
51
|
+
|
|
52
|
+
| 报什么 | 内容 |
|
|
53
|
+
|---|---|
|
|
54
|
+
| Team 运行时 | 挂没挂;挂了报 `maxMembers` |
|
|
55
|
+
| lead-mode 预设 | 注册没注册 |
|
|
56
|
+
| 缺东西时 | 给带版本号的安装命令 |
|
|
57
|
+
|
|
58
|
+
依赖齐全返回 success,缺东西返回 error。不会静默跳过。
|
|
59
|
+
|
|
60
|
+
### 四、两层前置提醒
|
|
61
|
+
|
|
62
|
+
这是本插件存在的主要理由:**本会话没有 Team 工具时,提醒你去开官方 Agent Teams,而不是让模型硬干。**
|
|
63
|
+
|
|
64
|
+
走两条路:
|
|
65
|
+
|
|
66
|
+
| 通道 | 谁看得见 | 什么时候出现 |
|
|
67
|
+
|---|---|---|
|
|
68
|
+
| persona 第一段 | 模型 | 一切到 Lead 模式就在。system prompt 的第 0 段 |
|
|
69
|
+
| 启动 warn 与 `/lead-mode` | 用户 | 检测到 Team 运行时缺失时 |
|
|
70
|
+
|
|
71
|
+
两条讲同一件事:没有 `spawn_teammate` 这套工具就先停下来,告诉你装什么、怎么装。
|
|
72
|
+
|
|
73
|
+
模型不会假装能派活,也不会拿 `subagent` 顶替 teammate。
|
|
74
|
+
|
|
75
|
+
## 装之前先开 Team 运行时
|
|
76
|
+
|
|
77
|
+
Lead 模式靠 `spawn_teammate`、`send_message`、`team_task_*` 这些工具派活。它们由 dsh 官方的 Team 运行时提供,本插件不带。
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
dsh plugin --profile <你的 profile 名> add @deepseek-ai/dsh-experimental-agent-team-profile@0.2.1-rc.3
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**必须带版本号。** 不带会装到 `latest` 上的 0.1.5-alpha.2,那是给 0.1.x 宿主用的,在 0.2.1 宿主上挂不上。`next` 指向的 0.2.1-rc.3 才对。装完重启 dsh。
|
|
84
|
+
|
|
85
|
+
不确定装没装?进 dsh 敲 `/lead-mode`,它会报依赖状态。
|
|
86
|
+
|
|
87
|
+
## 装本插件
|
|
88
|
+
|
|
89
|
+
两条路,选一条。
|
|
90
|
+
|
|
91
|
+
从 npm:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
dsh plugin --profile <你的 profile 名> add dsh-lead-mode
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
从 GitHub:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
dsh plugin --profile <你的 profile 名> add https://github.com/xiebaiyuan/dsh-lead-mode
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
装完重启 dsh。在预设列表里选「Lead 模式」。
|
|
104
|
+
|
|
105
|
+
## 用法
|
|
106
|
+
|
|
107
|
+
三步。
|
|
108
|
+
|
|
109
|
+
**1. 切到 Lead 模式。** 新会话的预设列表里选「Lead 模式」。切过去之后,模型 system prompt 的第一段就换成 Lead 人设,开头那段提醒跟着进去。
|
|
110
|
+
|
|
111
|
+
**2. 敲 `/lead-mode` 查依赖。** 这条命令不派活,只报状态。缺东西时它给出带版本号的安装命令。
|
|
112
|
+
|
|
113
|
+
**3. 让模型干活。** 派活工具齐了,模型会自己拆活、派给 teammate、等齐再收尾。工具不齐,它第一句就是让你去开 Team 运行时。
|
|
114
|
+
|
|
115
|
+
## 依赖的官方 bundle 与版本
|
|
116
|
+
|
|
117
|
+
本插件不捆绑下面这些包。它们由宿主或官方 bundle 提供,本插件只在 `peerDependencies` 里声明版本要求。
|
|
118
|
+
|
|
119
|
+
| 包 | 版本要求 | 谁提供 | 缺了会怎样 |
|
|
120
|
+
|---|---|---|---|
|
|
121
|
+
| `@deepseek-ai/dsh-experimental-agent-team-profile` | `0.2.1-rc.3` | 用户显式安装 | 派不了活,`/lead-mode` 报 error,启动 warn |
|
|
122
|
+
| `@deepseek-ai/dsh` | `>=0.2.1-rc.2` | 宿主 | 装不上 |
|
|
123
|
+
| `@deepseek-ai/cordis` | `^4.0.5` | 宿主 | 装不上 |
|
|
124
|
+
| `@deepseek-ai/schemastery` | `^3.18.5` | 宿主 | 装不上 |
|
|
125
|
+
| `@deepseek-ai/dsh-agent-preset-registry` | `>=0.2.1-rc.2` | 宿主 | 预设行不生效,`/lead-mode` 报「查不到」 |
|
|
126
|
+
| `@deepseek-ai/dsh-skill` | `>=0.2.1-rc.2` | 宿主 | skill 不注册,启动 warn |
|
|
127
|
+
| `@deepseek-ai/dsh-commands` | `>=0.2.1-rc.2` | 宿主 | `/lead-mode` 不注册,启动 warn |
|
|
128
|
+
|
|
129
|
+
目标宿主版本写在 `package.json` 的 `dshTarget` 字段:`0.2.1-rc.3`。
|
|
130
|
+
|
|
131
|
+
## 为什么安装命令要带版本号
|
|
132
|
+
|
|
133
|
+
`@deepseek-ai/dsh-experimental-agent-team-profile` 在 npm 上有三个 dist-tag:
|
|
134
|
+
|
|
135
|
+
| dist-tag | 版本 | 配哪个宿主 |
|
|
136
|
+
|---|---|---|
|
|
137
|
+
| `latest` | 0.1.5-alpha.2 | 0.1.x |
|
|
138
|
+
| `alpha` | 0.2.1-alpha.5 | 0.2.1 预发布线 |
|
|
139
|
+
| `next` | 0.2.1-rc.3 | 0.2.1 |
|
|
140
|
+
|
|
141
|
+
裸写包名,npm 解析 `latest`,装到 0.1.5-alpha.2。这个版本是给 0.1.x 宿主用的,在 0.2.1 宿主上挂不上。装完 dsh 里看不到 Team 工具,`/lead-mode` 还是报「未挂载」。
|
|
142
|
+
|
|
143
|
+
实测(2026-10-26,npm 11.20.0):
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
$ npm view @deepseek-ai/dsh-experimental-agent-team-profile version
|
|
147
|
+
0.1.5-alpha.2
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
所以本插件里所有出现安装命令的地方都带 `@0.2.1-rc.3`:persona prefix、`/lead-mode` 输出、启动 warn、SKILL.md。`test/preset.test.mjs` 与 `test/smoke.test.mjs` 都断言这个字符串在,防止以后被改回裸包名。
|
|
151
|
+
|
|
152
|
+
要装 `alpha` 线的话自己换成 `@0.2.1-alpha.5`,别用裸名。
|
|
153
|
+
|
|
154
|
+
## 与官方 standard 预设的差异
|
|
155
|
+
|
|
156
|
+
只有 persona 一处。其余 21 行逐字段照抄 `standard`。
|
|
157
|
+
|
|
158
|
+
| 项 | standard | lead-mode |
|
|
159
|
+
|---|---|---|
|
|
160
|
+
| persona prefix | `You are a coding agent powered by the {{model}} model.` | 中文 Lead 人设 + Agent Teams 前置检查 |
|
|
161
|
+
| 其余 21 行 | — | 与 standard 逐字段相同 |
|
|
162
|
+
|
|
163
|
+
classic subagent 四行(`tool-subagent-control`、`tool-subagent-list-agents`、`tool-subagent`、`tool-subagent-fork`)保持启用,没有禁用。Team 工具由 host 决定,不由预设决定。
|
|
164
|
+
|
|
165
|
+
## 为什么预设里不塞 Team 运行时
|
|
166
|
+
|
|
167
|
+
`@deepseek-ai/dsh-experimental-tool-agent-team` 的 `apply()` 监听全局 `agent/created`,给每一个 agent 装 Team 工具。它是 host 平面的插件,放进预设会漏到所有会话。
|
|
168
|
+
|
|
169
|
+
所以本插件的定位是:预设 + skill + 提醒。开不开 Team 运行时,用户用官方 profile 包决定。
|
|
170
|
+
|
|
171
|
+
## 目录
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
package.json 包元数据,dsh.bundle.patch 指向 cordis.patch.yml
|
|
175
|
+
cordis.patch.yml 两行 insert:本插件 + lead-mode 预设
|
|
176
|
+
lib/index.js host 半边:注册 skill、注册命令、启动自检
|
|
177
|
+
skills/lead-mode/ Lead 工作法正文
|
|
178
|
+
dsh-plugin.naming.json 命名清单
|
|
179
|
+
test/ 行为断言,零依赖
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## 开发
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
node --check lib/index.js
|
|
186
|
+
node --test test/*.test.mjs
|
|
187
|
+
node scripts/check-patch.mjs
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
测试零依赖,不用 `npm install`。`test/` 目录形式只在 Node 22+ 被接受,Node 20 会用 glob 展开。
|
|
191
|
+
|
|
192
|
+
## 发新版本
|
|
193
|
+
|
|
194
|
+
推 tag 触发 `.github/workflows/release.yml`,发布走 npm 的 Trusted Publishing(OIDC)。不存 token,也不弹 2FA。
|
|
195
|
+
|
|
196
|
+
发之前先在 npmjs.com 配一次 Trusted Publisher:
|
|
197
|
+
|
|
198
|
+
| 字段 | 填什么 |
|
|
199
|
+
|---|---|
|
|
200
|
+
| Organization or user | `xiebaiyuan` |
|
|
201
|
+
| Repository | `dsh-lead-mode` |
|
|
202
|
+
| Workflow filename | `release.yml` |
|
|
203
|
+
| Allowed actions | 勾上 `npm publish` |
|
|
204
|
+
|
|
205
|
+
`npm stage publish` 是默认就允许的,只勾它的话 CI 只能暂存,还得人工 approve 才上线。
|
|
206
|
+
|
|
207
|
+
配好后:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
npm version patch --no-git-tag-version
|
|
211
|
+
git commit -am "chore: bump to 0.1.3"
|
|
212
|
+
git tag v0.1.3
|
|
213
|
+
git push origin main --tags
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
tag 的版本必须和 `package.json` 一致,否则 workflow 直接退出,不发。同一个版本发第二次会被 npm 拒掉,所以每次发都要先提版本号。
|
|
217
|
+
|
|
218
|
+
## License
|
|
219
|
+
|
|
220
|
+
MIT
|
package/cordis.patch.yml
CHANGED
|
@@ -50,9 +50,13 @@
|
|
|
50
50
|
有这些工具,就按 Lead 工作法干活:
|
|
51
51
|
|
|
52
52
|
- 派活自包含。teammate 看不到你的上下文,把目标、约束、验收标准、已知失败、绝对路径都写进 prompt。
|
|
53
|
+
- 派活 prompt 里必须要求回报:干完用 send_message 给 lead 发一条。不写这句就不会有任何通知。
|
|
53
54
|
- 写作用域不重叠。一人一块文件。分不开的活排成依赖。
|
|
54
55
|
- 共享任务走 list、get、claim(带 revision)、干、complete。
|
|
55
|
-
-
|
|
56
|
+
- 等活优选结束回合等消息:teammate 给你发消息才会唤醒你。task 变更只唤醒正在 wait_agent 的调用方,不会唤醒空闲的你。
|
|
57
|
+
- 不要用 wait_agent 套循环,也不要反复 list_agents 轮询。只有本回合内就必须拿到结果时才等一次。
|
|
58
|
+
- 等齐必需的 teammate 再给最终答复。
|
|
59
|
+
- teammate 继承你的模型,spawn_teammate 没法单独指定模型。
|
|
56
60
|
- 最终验证自己做:跑测试、看 diff、核数字。不要只信回报。
|
|
57
61
|
- id: agent-instructions
|
|
58
62
|
name: '@deepseek-ai/dsh-agent-instructions'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-lead-mode",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Lead
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Lead mode for DSH: an agent preset, a working-method skill, a dependency self-check, and two reminders that tell you to enable the official Agent Teams. | 给 DSH 加 Lead 模式:预设、skill、依赖自检、两条前置提醒。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"skills",
|
|
14
14
|
"cordis.patch.yml",
|
|
15
15
|
"README.md",
|
|
16
|
-
"README.
|
|
16
|
+
"README.zh-CN.md",
|
|
17
17
|
"LICENSE"
|
|
18
18
|
],
|
|
19
19
|
"engines": {
|
|
@@ -31,18 +31,68 @@ dsh plugin --profile <你的 profile 名> add @deepseek-ai/dsh-experimental-agen
|
|
|
31
31
|
|
|
32
32
|
目标或指令有疑问先问用户。别自己挑一个解释就开始干。
|
|
33
33
|
|
|
34
|
+
## 派活的四个参数
|
|
35
|
+
|
|
36
|
+
`spawn_teammate` 只有 `name`、`description`、`prompt`、`context` 四个参数。
|
|
37
|
+
|
|
38
|
+
| 参数 | 要点 |
|
|
39
|
+
|---|---|
|
|
40
|
+
| `name` | 小写连字符。**永久,不可复用**,创建失败的名字也占着 |
|
|
41
|
+
| `description` | 一行职责,给用户看,也给你后面对账 |
|
|
42
|
+
| `prompt` | 全部指令。teammate 只看到这一段 |
|
|
43
|
+
| `context` | `fresh`(默认)看不到你的历史;`fork` 继承你已完成的回合 |
|
|
44
|
+
|
|
45
|
+
`context` 怎么挑:
|
|
46
|
+
|
|
47
|
+
- **绝大多数用 `fresh`。** 活是自包含的,把上下文写进 prompt 就够。
|
|
48
|
+
- 只有当活依赖你已经掌握、又写不进 prompt 的东西时,才用 `fork`。
|
|
49
|
+
|
|
50
|
+
取名字前先 `list_agents` 看一眼,别撞已占用的名字。
|
|
51
|
+
|
|
34
52
|
## 派活必须自包含
|
|
35
53
|
|
|
36
|
-
teammate
|
|
54
|
+
teammate 看不到你的上下文。它能看到的只有 `prompt`。
|
|
37
55
|
|
|
38
|
-
|
|
56
|
+
把这些写全:
|
|
39
57
|
|
|
40
58
|
- 目标、约束、验收标准
|
|
41
59
|
- 已知的失败现象和报错原文
|
|
42
60
|
- 相关文件路径,用绝对路径
|
|
43
61
|
- 环境坑,比如本机 `diff` 是坏的要用 `/usr/bin/diff`
|
|
44
62
|
|
|
45
|
-
|
|
63
|
+
写「按刚才说的做」等于没派。它不知道「刚才」。
|
|
64
|
+
|
|
65
|
+
### prompt 里必须写回报要求
|
|
66
|
+
|
|
67
|
+
这是最容易漏、后果最严重的一条:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
干完用 send_message 给 lead 发一条,写:结论 + 文件清单 + 验收输出 + 偏离规格的地方。
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
漏了这句,teammate 干完就不吭声,你会一直睡着。原因见下一节。
|
|
74
|
+
|
|
75
|
+
## 等通知,别轮询
|
|
76
|
+
|
|
77
|
+
唤醒 Lead 的路径只有一条:**teammate 主动给你 `send_message`。**
|
|
78
|
+
|
|
79
|
+
三种事件的真实行为:
|
|
80
|
+
|
|
81
|
+
| 事件 | 会不会唤醒空闲的你 |
|
|
82
|
+
|---|---|
|
|
83
|
+
| teammate 给你发消息 | 会。新回合开始 |
|
|
84
|
+
| task 被 claim 或 complete | **不会**。只唤醒正在 `wait_agent` 的调用方 |
|
|
85
|
+
| teammate 静默收工 | **不会**。teammate 是常驻的,收工不结清 |
|
|
86
|
+
|
|
87
|
+
所以等活按这个顺序选:
|
|
88
|
+
|
|
89
|
+
1. **优选:派完活就结束回合。** 把「派了谁、等什么」写清楚,然后收工。用户立刻看到进展,你不空转。teammate 回报时你被唤醒,接着干。
|
|
90
|
+
2. **次选:本回合内就必须拿到结果才继续时,用一次 `wait_agent`。** 它的好处是 task 变更也能唤醒。默认等 30 秒,上限 1 小时。
|
|
91
|
+
3. **禁止:`wait_agent` 套循环,或反复 `list_agents` 轮询。** 那是空转。
|
|
92
|
+
|
|
93
|
+
`list_agents` 只用来回答「谁在跑、谁卡住了」,不用来等。
|
|
94
|
+
|
|
95
|
+
`wait_agent` 返回 `noProgress` 不是错误,是告诉你没人在跑,该换手段。
|
|
46
96
|
|
|
47
97
|
## 写作用域不重叠
|
|
48
98
|
|
|
@@ -52,6 +102,8 @@ teammate 看不到你的上下文。它能看到的只有你写的那段 prompt
|
|
|
52
102
|
|
|
53
103
|
写作用域有重叠时,在 task 描述里写明重叠在哪、谁先谁后。别指望 teammate 自己协调。
|
|
54
104
|
|
|
105
|
+
作用域只是提示,不是锁。bash、格式化工具、代码生成器都绕开文件版本检查,所以派完活要自己看最终 diff。
|
|
106
|
+
|
|
55
107
|
## 共享任务流程
|
|
56
108
|
|
|
57
109
|
每个活都是一个共享任务。流程固定:
|
|
@@ -66,13 +118,33 @@ teammate 看不到你的上下文。它能看到的只有你写的那段 prompt
|
|
|
66
118
|
|
|
67
119
|
task 描述就是完整规格。规格写细一点,teammate 少问一轮。
|
|
68
120
|
|
|
69
|
-
##
|
|
121
|
+
## teammate 用什么模型
|
|
122
|
+
|
|
123
|
+
**不能单独指定。** `spawn_teammate` 没有 model 或 provider 参数。
|
|
124
|
+
|
|
125
|
+
teammate 继承你(Lead)在 spawn 那一刻的 provider 和 model。想换只有两条路:
|
|
126
|
+
|
|
127
|
+
| 想要什么 | 怎么做 |
|
|
128
|
+
|---|---|
|
|
129
|
+
| 整队换模型 | 切 Lead 自己的模型。之后新 spawn 的 teammate 跟着变 |
|
|
130
|
+
| 按任务挑模型 | 用不了 team,改用经典 `subagent` 工具 |
|
|
131
|
+
|
|
132
|
+
经典 `subagent` 支持 `provider`、`model`、`reasoning_effort`、`agent_preset` 四个参数(本插件预设已开 `modelSelectionSettings`)。
|
|
133
|
+
|
|
134
|
+
代价说清楚:经典 `subagent` 是一次性子代理,没有共享任务板,没有持久身份。要用团队就得接受统一模型。
|
|
135
|
+
|
|
136
|
+
## 状态怎么看
|
|
70
137
|
|
|
71
|
-
|
|
138
|
+
| 状态 | 含义 |
|
|
139
|
+
|---|---|
|
|
140
|
+
| `running` | 正在跑一个回合 |
|
|
141
|
+
| `inactive` | 没有回合在执行。**不代表活干完、也不代表失败** |
|
|
142
|
+
| `provisioning` | 正在创建 |
|
|
143
|
+
| `failed` | 创建失败 |
|
|
72
144
|
|
|
73
|
-
|
|
145
|
+
`inactive` 时它不吭声是正常的。想知道它干到哪,`list_agents` 看状态,`team_task_list` 看任务归属。
|
|
74
146
|
|
|
75
|
-
|
|
147
|
+
只有 Lead 能创建和打断 teammate(`interrupt_agent`)。打断不清空它排队的消息。
|
|
76
148
|
|
|
77
149
|
## 给最终答复前
|
|
78
150
|
|
|
@@ -85,4 +157,4 @@ task 描述就是完整规格。规格写细一点,teammate 少问一轮。
|
|
|
85
157
|
|
|
86
158
|
结论在前。文件清单、验收输出、偏离规格三块分开。
|
|
87
159
|
|
|
88
|
-
没实测的数字不写精确值。不知道就写「未验证」。
|
|
160
|
+
没实测的数字不写精确值。不知道就写「未验证」。
|
package/README.en.md
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
# dsh-lead-mode
|
|
2
|
-
|
|
3
|
-
Lead mode for DSH. Adds one `lead-mode` preset, one `lead-mode` skill, and one `/lead-mode` command.
|
|
4
|
-
|
|
5
|
-
It does three things, none of which touch dsh itself:
|
|
6
|
-
|
|
7
|
-
1. Preset: switch to it and the model works as a Lead — decomposing, delegating, accepting.
|
|
8
|
-
2. Skill: the Lead working method, loadable by the model or by you.
|
|
9
|
-
3. Reminder: when the session has no Team tools, the model's first move is to tell you to enable the official Agent Teams instead of doing everything alone.
|
|
10
|
-
|
|
11
|
-
## Enable the Team runtime first
|
|
12
|
-
|
|
13
|
-
Lead mode delegates through `spawn_teammate`, `send_message`, and `team_task_*`. Those come from the official dsh Team runtime, which this plugin does not ship.
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
dsh plugin --profile <your profile name> add @deepseek-ai/dsh-experimental-agent-team-profile@0.2.1-rc.3
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
**The version pin is required.** Without it npm resolves `latest`, which is 0.1.5-alpha.2 — built for 0.1.x hosts and it will not mount on a 0.2.1 host. `next` points at 0.2.1-rc.3, which is the correct one. Restart dsh afterwards.
|
|
20
|
-
|
|
21
|
-
Not sure whether it is installed? Run `/lead-mode` in dsh; it reports dependency state.
|
|
22
|
-
|
|
23
|
-
## Install this plugin
|
|
24
|
-
|
|
25
|
-
Two routes, pick one.
|
|
26
|
-
|
|
27
|
-
From npm:
|
|
28
|
-
|
|
29
|
-
```bash
|
|
30
|
-
dsh plugin --profile <your profile name> add dsh-lead-mode
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
From GitHub (use this before the npm release):
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
dsh plugin --profile <your profile name> add https://github.com/xiebaiyuan/dsh-lead-mode
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Restart dsh afterwards, then pick "Lead 模式" in the preset list.
|
|
40
|
-
|
|
41
|
-
## Usage
|
|
42
|
-
|
|
43
|
-
Three steps.
|
|
44
|
-
|
|
45
|
-
**1. Switch to Lead mode.** Pick "Lead 模式" in a new session's preset list. The model's first system-prompt section becomes the Lead persona, and the reminder at its top goes in with it.
|
|
46
|
-
|
|
47
|
-
**2. Run `/lead-mode` to check dependencies.** This command delegates nothing; it only reports state:
|
|
48
|
-
|
|
49
|
-
- Whether the Team runtime is mounted, and its `maxMembers` when it is
|
|
50
|
-
- Whether the `lead-mode` preset registered
|
|
51
|
-
- The version-pinned install command when something is missing
|
|
52
|
-
|
|
53
|
-
Returns success when everything is in place, error when something is missing.
|
|
54
|
-
|
|
55
|
-
**3. Let the model work.** With the delegation tools in place, the model decomposes, delegates to teammates, and waits for all of them before wrapping up. Without them, its first move is to tell you to enable the Team runtime — it will not do everything alone, and it will not substitute `subagent` for a teammate.
|
|
56
|
-
|
|
57
|
-
## Required official bundles and versions
|
|
58
|
-
|
|
59
|
-
This plugin ships none of the packages below. The host or an official bundle provides them; this plugin only declares version requirements in `peerDependencies`.
|
|
60
|
-
|
|
61
|
-
| Package | Requirement | Provided by | When missing |
|
|
62
|
-
|---|---|---|---|
|
|
63
|
-
| `@deepseek-ai/dsh-experimental-agent-team-profile` | `0.2.1-rc.3` | You install it explicitly | Cannot delegate; `/lead-mode` returns error; startup warn |
|
|
64
|
-
| `@deepseek-ai/dsh` | `>=0.2.1-rc.2` | Host | Will not install |
|
|
65
|
-
| `@deepseek-ai/cordis` | `^4.0.5` | Host | Will not install |
|
|
66
|
-
| `@deepseek-ai/schemastery` | `^3.18.5` | Host | Will not install |
|
|
67
|
-
| `@deepseek-ai/dsh-agent-preset-registry` | `>=0.2.1-rc.2` | Host | Preset row does not take effect; `/lead-mode` reports unknown |
|
|
68
|
-
| `@deepseek-ai/dsh-skill` | `>=0.2.1-rc.2` | Host | Skill not registered; startup warn |
|
|
69
|
-
| `@deepseek-ai/dsh-commands` | `>=0.2.1-rc.2` | Host | `/lead-mode` not registered; startup warn |
|
|
70
|
-
|
|
71
|
-
The target host version is `dshTarget` in `package.json`: `0.2.1-rc.3`.
|
|
72
|
-
|
|
73
|
-
## Why the install command pins a version
|
|
74
|
-
|
|
75
|
-
`@deepseek-ai/dsh-experimental-agent-team-profile` has three dist-tags on npm:
|
|
76
|
-
|
|
77
|
-
| dist-tag | Version | Host it fits |
|
|
78
|
-
|---|---|---|
|
|
79
|
-
| `latest` | 0.1.5-alpha.2 | 0.1.x |
|
|
80
|
-
| `alpha` | 0.2.1-alpha.5 | the 0.2.1 prerelease line |
|
|
81
|
-
| `next` | 0.2.1-rc.3 | 0.2.1 |
|
|
82
|
-
|
|
83
|
-
Bare package name resolves `latest`, which installs 0.1.5-alpha.2. That build targets 0.1.x hosts and does not mount on a 0.2.1 host. After installing it, no Team tools appear in dsh and `/lead-mode` still reports "not mounted".
|
|
84
|
-
|
|
85
|
-
Measured on 2026-10-26 with npm 11.20.0:
|
|
86
|
-
|
|
87
|
-
```
|
|
88
|
-
$ npm view @deepseek-ai/dsh-experimental-agent-team-profile version
|
|
89
|
-
0.1.5-alpha.2
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
So every install command in this plugin carries `@0.2.1-rc.3`: the persona prefix, the `/lead-mode` output, the startup warn, and SKILL.md. `test/preset.test.mjs` and `test/smoke.test.mjs` both assert that string, so a future edit cannot quietly drop back to the bare name.
|
|
93
|
-
|
|
94
|
-
For the `alpha` line, pin `@0.2.1-alpha.5` yourself; do not use the bare name.
|
|
95
|
-
|
|
96
|
-
## Difference from the official standard preset
|
|
97
|
-
|
|
98
|
-
One place only: the persona. The other 21 rows are copied field for field from `standard`.
|
|
99
|
-
|
|
100
|
-
| Item | standard | lead-mode |
|
|
101
|
-
|---|---|---|
|
|
102
|
-
| persona prefix | `You are a coding agent powered by the {{model}} model.` | Chinese Lead persona plus an Agent Teams precondition check |
|
|
103
|
-
| other 21 rows | — | identical to standard, field for field |
|
|
104
|
-
|
|
105
|
-
The four classic subagent rows (`tool-subagent-control`, `tool-subagent-list-agents`, `tool-subagent`, `tool-subagent-fork`) stay enabled. Nothing is disabled. The Team tools are a host decision, not a preset decision.
|
|
106
|
-
|
|
107
|
-
## Why the preset does not carry the Team runtime
|
|
108
|
-
|
|
109
|
-
`apply()` in `@deepseek-ai/dsh-experimental-tool-agent-team` listens on the global `agent/created` event and installs Team tools on every agent. It is a host-plane plugin; putting it in a preset would leak it into every session.
|
|
110
|
-
|
|
111
|
-
So this plugin stays at: preset, skill, reminder. Whether the Team runtime is on is decided by the user through the official profile package.
|
|
112
|
-
|
|
113
|
-
## What `/lead-mode` reports
|
|
114
|
-
|
|
115
|
-
Three facts:
|
|
116
|
-
|
|
117
|
-
- Whether the Team runtime is mounted, and its `maxMembers` when it is
|
|
118
|
-
- Whether the `lead-mode` preset registered
|
|
119
|
-
- The version-pinned install command when something is missing
|
|
120
|
-
|
|
121
|
-
Returns success when everything is in place, error when something is missing. Missing dependencies are never silent.
|
|
122
|
-
|
|
123
|
-
## Layout
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
package.json package metadata; dsh.bundle.patch points at cordis.patch.yml
|
|
127
|
-
cordis.patch.yml two insert rows: this plugin and the lead-mode preset
|
|
128
|
-
lib/index.js host half: register the skill, register the command, startup check
|
|
129
|
-
skills/lead-mode/ the Lead working method
|
|
130
|
-
dsh-plugin.naming.json naming manifest
|
|
131
|
-
test/ behaviour assertions, zero dependencies
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## Development
|
|
135
|
-
|
|
136
|
-
```bash
|
|
137
|
-
node --check lib/index.js
|
|
138
|
-
node --test test/
|
|
139
|
-
node scripts/check-patch.mjs
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
Tests are zero-dependency. No `npm install` needed.
|
|
143
|
-
|
|
144
|
-
## License
|
|
145
|
-
|
|
146
|
-
MIT
|