dsh-agent-team-playbook 1.37.0 → 1.37.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 CHANGED
@@ -4,6 +4,18 @@
4
4
 
5
5
  ## 插件包
6
6
 
7
+ ### 1.37.2
8
+
9
+ - CONTRIBUTING 记录 dsh-go 原生界面的两个真机坑:`command` 名称不能含空格、`data` 结果被桥接缓存
10
+ (`refresh` 不重跑 `data`,必须自行 emit)
11
+
12
+ ### 1.37.1
13
+
14
+ - 修原生「处理同名文件」面板状态不更新:桥接会缓存 `data` 的结果(Feed),`refresh` 只重取视图,
15
+ 文件变化后面板仍显示旧状态(实测:注入差异后仍显示"已安装且一致")。
16
+ 现在面板打开期间每 4 秒重扫并 emit,关闭时(cleanup)停止轮询
17
+ - 本地实测:干净安装 → 「已安装且一致」;注入差异 → 4 秒内变「共 1 项冲突」;关闭后不再 emit
18
+
7
19
  ### 1.37.0
8
20
 
9
21
  - **原生界面并入主包**:`package.json` 增加顶层 `dshGo` 清单,桥接代码移到 `lib/dshgo.js`
package/CONTRIBUTING.md CHANGED
@@ -97,7 +97,13 @@ npm run check:dshgo # 用桥接自己的校验器跑遍每个按钮
97
97
  node "$DSH_HOME/skills/dsh-go-plugin/kit/bin/check.mjs" . --load # 视图能否被画出来
98
98
  ```
99
99
 
100
- 踩过的坑:`{ command: 'atp install' }` 会被拒(命令名不能含空格),必须写 `{ command: { name: 'atp', args: 'install' } }`。
100
+ **真机验证踩过的两个坑**(静态校验查不出来,只有点了才知道):
101
+
102
+ 1. `{ command: 'atp install' }` 会被桥接拒掉(`COMMAND` 正则不接受空格),表现为"点了没反应"。
103
+ 必须写 `{ command: { name: 'atp', args: 'install' } }`。
104
+ 2. 面板的 `data` 结果会被桥接**缓存**(Feed),`refresh` 效果只重取 view、不会重跑 `data`。
105
+ 文件系统变了要面板跟着变,必须由 `data` 自己再次 `emit`(本项目用 4 秒轮询 + cleanup 停表)。
106
+
101
107
 
102
108
  ## 发布前检查清单
103
109
 
package/lib/dshgo.js CHANGED
@@ -172,46 +172,58 @@ export function attachDshGo(ctx, { playbookDir }) {
172
172
  ],
173
173
  }
174
174
  },
175
- data: async (scope, emit) => {
176
- const got = await readState(scope)
177
- if (got.state !== 'ok') {
175
+ data: (scope, emit) => {
176
+ // 桥接会缓存 data 的结果(Feed),refresh 只重取视图;文件变化必须靠再次 emit。
177
+ // 面板打开期间每 4 秒重扫一次,关闭时(cleanup)停掉。
178
+ let stopped = false
179
+ const render = async () => {
180
+ if (stopped) return
181
+ const got = await readState(scope)
182
+ if (stopped) return
183
+ if (got.state !== 'ok') {
184
+ emit({
185
+ headline:
186
+ got.state === 'no-workspace'
187
+ ? '拿不到当前工作区:请在这个对话里打开一个项目'
188
+ : `扫描失败:${got.message ?? ''}`,
189
+ dir: '—',
190
+ remaining: '—',
191
+ current: '—',
192
+ reason: '',
193
+ hint: '也可以直接用命令:/atp install',
194
+ })
195
+ return
196
+ }
197
+ const key = got.conflicts.map((c) => c.rel).join('|')
198
+ const entry = decisionState(scope, key)
199
+ const total = got.conflicts.length
200
+ const pending = got.conflicts.map((c, i) => ({ ...c, index: i })).filter((c) => !entry.map.has(c.index))
201
+ const current = pending[0]
202
+ const notInstalled = total === 0 && got.installed === false
203
+ const installedClean = total === 0 && got.installed === true
178
204
  emit({
179
- headline:
180
- got.state === 'no-workspace'
181
- ? '拿不到当前工作区:请在这个对话里打开一个项目'
182
- : `扫描失败:${got.message ?? ''}`,
183
- dir: '—',
184
- remaining: '—',
185
- current: '—',
186
- reason: '',
187
- hint: '也可以直接用命令:/atp install',
205
+ headline: notInstalled
206
+ ? '未安装:点「安装到工作区」即可写入。'
207
+ : installedClean
208
+ ? '已安装,且内容与当前版本一致——重复安装不会改动任何文件。'
209
+ : `共 ${total} 项冲突,已决定 ${total - pending.length} 项`,
210
+ dir: got.dir,
211
+ remaining: `${pending.length} / ${total}`,
212
+ current: current === undefined ? '—' : `${current.index + 1}. ${current.rel}`,
213
+ reason: current?.reason ?? '',
214
+ hint: notInstalled
215
+ ? '回到「协作规程」面板点「安装到工作区」。'
216
+ : installedClean
217
+ ? '想把文件强制刷成当前版本,用「协作规程」里的「覆盖式安装」。'
218
+ : '每点一项即定案;全部定案后自动执行 /atp apply。要改名请用命令:/atp apply 1=改名:新名字',
188
219
  })
189
- return () => {}
190
220
  }
191
- const key = got.conflicts.map((c) => c.rel).join('|')
192
- const entry = decisionState(scope, key)
193
- const total = got.conflicts.length
194
- const pending = got.conflicts.map((c, i) => ({ ...c, index: i })).filter((c) => !entry.map.has(c.index))
195
- const current = pending[0]
196
- const notInstalled = total === 0 && got.installed === false
197
- const installedClean = total === 0 && got.installed === true
198
- emit({
199
- headline: notInstalled
200
- ? '未安装:点「安装到工作区」即可写入。'
201
- : installedClean
202
- ? '已安装,且内容与当前版本一致——重复安装不会改动任何文件。'
203
- : `共 ${total} 项冲突,已决定 ${total - pending.length} 项`,
204
- dir: got.dir,
205
- remaining: `${pending.length} / ${total}`,
206
- current: current === undefined ? '—' : `${current.index + 1}. ${current.rel}`,
207
- reason: current?.reason ?? '',
208
- hint: notInstalled
209
- ? '回到「协作规程」面板点「安装到工作区」。'
210
- : installedClean
211
- ? '想把文件强制刷成当前版本,用「协作规程」里的「覆盖式安装」。'
212
- : '每点一项即定案;全部定案后自动执行 /atp apply。要改名请用命令:/atp apply 1=改名:新名字',
213
- })
214
- return () => {}
221
+ void render()
222
+ const timer = setInterval(() => void render(), 4000)
223
+ return () => {
224
+ stopped = true
225
+ clearInterval(timer)
226
+ }
215
227
  },
216
228
  actions: {
217
229
  reload: () => ({ refresh: true }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-agent-team-playbook",
3
- "version": "1.37.0",
3
+ "version": "1.37.2",
4
4
  "description": "DeepSeek Harness plugin that brings an executable multi-agent collaboration workflow (charter, triage tiers, six-stage pipeline, audit gates, experience library): a read-only /agent-team command plus a collision-aware installer for the documents.",
5
5
  "type": "module",
6
6
  "license": "MIT",