dsh-lead-mode 0.1.3 → 0.1.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/README.md CHANGED
@@ -38,12 +38,14 @@ It covers: agreeing on the goal before starting, making a delegation self-contai
38
38
 
39
39
  Two of those facts only show up when you read the runtime source:
40
40
 
41
- | Fact | Consequence |
41
+ | Fact | Why it matters |
42
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 |
43
+ | A teammate settling notifies you automatically, carrying its closing message | Finish your turn after delegating; you do not need to sit and watch |
44
+ | A task change does not wake an idle Lead | Do not count on "it marked the task complete, so I know"; that path only wakes a caller currently inside `wait_agent` |
45
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`.
46
+ So the skill's default is: finish your turn after delegating and let the notification 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
+ Tell the teammate to put the **deliverable in its closing message** — that message is what comes back to you with the notification.
47
49
 
48
50
  ### 3. The dependency self-check command
49
51
 
@@ -112,6 +114,28 @@ Three steps.
112
114
 
113
115
  **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.
114
116
 
117
+ ## Watching work and comms: pair with dsh-context
118
+
119
+ Tool calls read one at a time. To see the whole Team's state and traffic on one page, install **dsh-context** (a separate plugin, not shipped here):
120
+
121
+ ```bash
122
+ dsh plugin --profile <your profile name> add dsh-context
123
+ ```
124
+
125
+ It adds a **Fleet / 编队** tab to every session (right of **Context**), and the right sidebar's **Context** panel carries the same card.
126
+
127
+ | Surface | Shows |
128
+ |---|---|
129
+ | Summary | Member status, live context, estimated cost, task progress |
130
+ | Agent Network | The current agent, its parents, every subagent, one card each |
131
+ | Fleet Members | Each member's role, model, latest reply, run time, steps, active task count |
132
+ | Tasks | Team tasks and subagent delegations together, grouped by owner, with blocked-by chains |
133
+ | Agent Comms | Who said what to whom. Team relays, mailbox deliveries, and the runtime's settlement notices |
134
+
135
+ Picking a member on the graph or the member board narrows Tasks and Agent Comms to that one agent. Opening a message in Agent Comms shows the full record: which session log it came from, its sequence, whether the runtime wrote the settlement notice or the child sent it, and the complete closing report.
136
+
137
+ The Lead mode skill names this entry point too, so the model points you here instead of restating progress itself.
138
+
115
139
  ## Required official bundles and versions
116
140
 
117
141
  This plugin ships none of the packages below. The host or an official bundle provides them; this plugin only declares version requirements in `peerDependencies`.
package/README.zh-CN.md CHANGED
@@ -38,12 +38,14 @@
38
38
 
39
39
  其中两条是读源码才确认的,容易踩:
40
40
 
41
- | 事实 | 后果 |
41
+ | 事实 | 为什么重要 |
42
42
  |---|---|
43
- | 唤醒 Lead 的路径只有 teammate 主动 `send_message` | 派活 prompt 里不写回报要求,teammate 干完不吭声,Lead 一直睡着 |
44
- | task 变更只唤醒正在 `wait_agent` 的调用方 | 光靠 teammate 把 task 标 complete,唤不醒空闲的 Lead |
43
+ | teammate 收工会自动通知你,通知里带它收尾那条消息 | 派完活结束回合就够,不用盯着等 |
44
+ | task 变更不会唤醒空闲的 Lead | 别指望「它把 task 标 complete 了我就知道了」,那条路只唤醒正在 `wait_agent` 的调用方 |
45
45
 
46
- 所以 skill 的默认建议是:派完活就结束回合等消息(用户立刻看到进展),只有本回合内就必须拿到结果时才用一次 `wait_agent`。不要 `wait_agent` 套循环,也不要反复 `list_agents` 轮询。
46
+ 所以 skill 的默认建议是:派完活就结束回合等通知(用户立刻看到进展),只有本回合内就必须拿到结果时才用一次 `wait_agent`。不要 `wait_agent` 套循环,也不要反复 `list_agents` 轮询。
47
+
48
+ 派活 prompt 里要要求 teammate **把交付物写进收尾那条消息**——那条消息会随通知回到你手上。
47
49
 
48
50
  ### 三、依赖自检命令
49
51
 
@@ -112,6 +114,28 @@ dsh plugin --profile <你的 profile 名> add https://github.com/xiebaiyuan/dsh-
112
114
 
113
115
  **3. 让模型干活。** 派活工具齐了,模型会自己拆活、派给 teammate、等齐再收尾。工具不齐,它第一句就是让你去开 Team 运行时。
114
116
 
117
+ ## 看工作和通信状态:配 dsh-context
118
+
119
+ 工具调用只能一条条读,Team 的状态与通信要一页看全,装 **dsh-context**(另一个插件,不随本插件安装):
120
+
121
+ ```bash
122
+ dsh plugin --profile <你的 profile 名> add dsh-context
123
+ ```
124
+
125
+ 它在每个会话里加一个 **编队 / Fleet** 标签页(在 **Context** 右边),右栏的 **Context** 面板里有同一张卡。
126
+
127
+ | 区块 | 看什么 |
128
+ |---|---|
129
+ | 概要 | 成员状态、实时上下文、预估花费、任务进度 |
130
+ | Agent Network | 当前 agent、它的父级、全部子代理,一人一张卡 |
131
+ | Fleet Members | 每个成员的角色、模型、最新回复、运行时长、步数、在办任务数 |
132
+ | Tasks | 团队任务与子代理派活放一起,按 owner 分组,带 blocked-by 链 |
133
+ | Agent Comms | 谁跟谁说了什么。团队消息、邮箱投递、运行时的结算通知都在这里 |
134
+
135
+ 点图上的成员或成员卡,Tasks 与 Agent Comms 会收窄到那一个人。Agent Comms 里点开一条,能看到完整记录:来自哪个会话日志、第几号事件、是运行时写的结算通知还是子代理自己发的、完整收尾报告。
136
+
137
+ Lead 模式 skill 里也写了这个入口,所以派活时模型会直接让你去这儿看进度。
138
+
115
139
  ## 依赖的官方 bundle 与版本
116
140
 
117
141
  本插件不捆绑下面这些包。它们由宿主或官方 bundle 提供,本插件只在 `peerDependencies` 里声明版本要求。
package/cordis.patch.yml CHANGED
@@ -50,10 +50,10 @@
50
50
  有这些工具,就按 Lead 工作法干活:
51
51
 
52
52
  - 派活自包含。teammate 看不到你的上下文,把目标、约束、验收标准、已知失败、绝对路径都写进 prompt。
53
- - 派活 prompt 里必须要求回报:干完用 send_message 给 lead 发一条。不写这句就不会有任何通知。
53
+ - 要求它收尾那条消息写清交付物。它收工时那条消息会随通知回到你手上。
54
54
  - 写作用域不重叠。一人一块文件。分不开的活排成依赖。
55
- - 共享任务走 list、get、claim(带 revision)、干、complete。
56
- - 等活优选结束回合等消息:teammate 给你发消息才会唤醒你。task 变更只唤醒正在 wait_agent 的调用方,不会唤醒空闲的你。
55
+ - 共享任务走 list、get、claim(带 revision)、干、complete。task 只是账本,不是唤醒通道。
56
+ - 等活就结束回合等通知:teammate 收工、或给你发消息,都会唤醒你。task 变更只唤醒正在 wait_agent 的调用方,不会唤醒空闲的你。
57
57
  - 不要用 wait_agent 套循环,也不要反复 list_agents 轮询。只有本回合内就必须拿到结果时才等一次。
58
58
  - 等齐必需的 teammate 再给最终答复。
59
59
  - teammate 继承你的模型,spawn_teammate 没法单独指定模型。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-lead-mode",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
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",
@@ -31,6 +31,29 @@ dsh plugin --profile <你的 profile 名> add @deepseek-ai/dsh-experimental-agen
31
31
 
32
32
  目标或指令有疑问先问用户。别自己挑一个解释就开始干。
33
33
 
34
+ ## 等通知,别轮询
35
+
36
+ teammate 干完你**会被唤醒**,不用自己盯着。
37
+
38
+ | 事件 | 唤醒空闲的你吗 | 带回什么 |
39
+ |---|---|---|
40
+ | teammate 一轮干完、没有新消息 | 会 | 它收尾那条消息 |
41
+ | teammate 主动 `send_message` 给你 | 会 | 那条消息 |
42
+ | task 被 claim 或 complete | **不会** | 只唤醒正在 `wait_agent` 的调用方 |
43
+
44
+ 所以默认这么做:**派完活就结束回合。** 把「派了谁、等什么」写清楚,然后收工。用户立刻看到进展,你不空转。teammate 收工时你被唤醒,接着干。
45
+
46
+ `wait_agent` 只在「本回合内就必须拿到结果才能继续」时用一次。它的好处是 task 变更也能唤醒它。默认等 30 秒,上限 1 小时。
47
+
48
+ 禁止这两件事:
49
+
50
+ - 用 `wait_agent` 套循环
51
+ - 反复 `list_agents` 轮询
52
+
53
+ `list_agents` 只用来回答「谁在跑、谁卡住了」,不用来等。
54
+
55
+ `wait_agent` 返回 `noProgress` 不是错误,是告诉你没人在跑,该换手段。
56
+
34
57
  ## 派活的四个参数
35
58
 
36
59
  `spawn_teammate` 只有 `name`、`description`、`prompt`、`context` 四个参数。
@@ -49,7 +72,7 @@ dsh plugin --profile <你的 profile 名> add @deepseek-ai/dsh-experimental-agen
49
72
 
50
73
  取名字前先 `list_agents` 看一眼,别撞已占用的名字。
51
74
 
52
- ## 派活必须自包含
75
+ ## prompt 怎么写
53
76
 
54
77
  teammate 看不到你的上下文。它能看到的只有 `prompt`。
55
78
 
@@ -62,37 +85,25 @@ teammate 看不到你的上下文。它能看到的只有 `prompt`。
62
85
 
63
86
  写「按刚才说的做」等于没派。它不知道「刚才」。
64
87
 
65
- ### prompt 里必须写回报要求
88
+ ### 收尾那条消息就是交付物
66
89
 
67
- 这是最容易漏、后果最严重的一条:
90
+ teammate 收工时,它**最后那条消息**会随通知回到你手上,格式是「Its closing message:」加正文。
91
+
92
+ 所以派活时直接要求它收尾写清:
68
93
 
69
94
  ```
70
- 干完用 send_message 给 lead 发一条,写:结论 + 文件清单 + 验收输出 + 偏离规格的地方。
95
+ 收尾那条消息写四块:结论 / 文件清单 / 验收输出 / 偏离规格的地方。
71
96
  ```
72
97
 
73
- 漏了这句,teammate 干完就不吭声,你会一直睡着。原因见下一节。
98
+ 这比你额外要求一次 `send_message` 省事,而且是你默认拿得到的东西。
74
99
 
75
- ## 等通知,别轮询
100
+ 需要**中途**进度(干到一半问一句、或者要它先确认再继续)时,才另外要求它 `send_message` 给你。
76
101
 
77
- 唤醒 Lead 的路径只有一条:**teammate 主动给你 `send_message`。**
102
+ ### 收尾消息可能被省掉
78
103
 
79
- 三种事件的真实行为:
104
+ 如果 teammate 在收工前刚给你发过 `send_message`,通知里不会重复它的收尾正文,而是写「It sent you a message just before finishing, so its closing message is omitted.」。
80
105
 
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` 不是错误,是告诉你没人在跑,该换手段。
106
+ 也就是说:你要么拿到收尾消息,要么拿到它发的那条,不会两个都没。
96
107
 
97
108
  ## 写作用域不重叠
98
109
 
@@ -118,6 +129,8 @@ teammate 看不到你的上下文。它能看到的只有 `prompt`。
118
129
 
119
130
  task 描述就是完整规格。规格写细一点,teammate 少问一轮。
120
131
 
132
+ task 是给人看的账本,不是唤醒通道。别指望「它把 task 标 complete 了我就知道了」。
133
+
121
134
  ## teammate 用什么模型
122
135
 
123
136
  **不能单独指定。** `spawn_teammate` 没有 model 或 provider 参数。
@@ -142,10 +155,28 @@ teammate 继承你(Lead)在 spawn 那一刻的 provider 和 model。想换
142
155
  | `provisioning` | 正在创建 |
143
156
  | `failed` | 创建失败 |
144
157
 
145
- `inactive` 时它不吭声是正常的。想知道它干到哪,`list_agents` 看状态,`team_task_list` 看任务归属。
158
+ `inactive` 有两种情况:teammate 已经收工(你收到过它的通知),或者它被存档了、等你再给它发消息才醒来。
146
159
 
147
160
  只有 Lead 能创建和打断 teammate(`interrupt_agent`)。打断不清空它排队的消息。
148
161
 
162
+ ### 想看全局,用 dsh-context 的编队页
163
+
164
+ 工具调用只能一条条读。要看整队的工作与通信,让用户开 **dsh-context** 的编队页(另一个插件,不随本插件安装):
165
+
166
+ | 区块 | 看什么 |
167
+ |---|---|
168
+ | 概要 | 成员状态、实时上下文、预估花费、任务进度 |
169
+ | Agent Network | 当前 agent、父级、全部子代理,一人一张卡 |
170
+ | Fleet Members | 每个成员的角色、模型、最新回复、运行时长、步数、在办任务数 |
171
+ | Tasks | 团队任务与子代理派活放一起,按 owner 分组,带 blocked-by 链 |
172
+ | Agent Comms | 谁跟谁说了什么。团队消息、邮箱投递、运行时的结算通知都在这里 |
173
+
174
+ 入口:任意会话点 **编队 / Fleet** 标签页(在 **Context** 右边)。右栏的 **Context** 面板里有同一张卡。
175
+
176
+ 装法:`dsh plugin --profile <你的 profile 名> add dsh-context`
177
+
178
+ 派活时可以直接告诉用户去这儿看进度,比自己复述一遍更清楚。
179
+
149
180
  ## 给最终答复前
150
181
 
151
182
  - 必需的 teammate 都等齐了再答。没等齐就说「还在跑」,别把半成品当结论。