dsh-agent-team-playbook 1.36.0 → 1.36.1
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 +8 -0
- package/dsh-go/local-atp/lib/index.js +13 -9
- package/lib/index.js +17 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
|
|
5
5
|
## 插件包
|
|
6
6
|
|
|
7
|
+
### 1.36.1
|
|
8
|
+
|
|
9
|
+
- 修 dsh-go「处理同名文件」面板文案误导:已装过且内容一致时,原来显示「没有同名冲突,可以直接安装」,
|
|
10
|
+
让人以为要再装一遍。现在区分三种状态:
|
|
11
|
+
**未安装** / **已安装且内容一致(重复安装不会改动)** / **有 N 项冲突**
|
|
12
|
+
- 后端服务新增 `agentTeamPlaybook.inspect(cwd)`:一次返回冲突 + 是否已安装(核心签名 + 分册存在),
|
|
13
|
+
面板仍只做桥接
|
|
14
|
+
|
|
7
15
|
### 1.36.0
|
|
8
16
|
|
|
9
17
|
- dsh-go 原生界面加「处理同名文件」面板:逐项点 覆盖 / 备份,全部定案后自动执行 `/atp apply`
|
|
@@ -30,15 +30,15 @@ export function apply(ctx) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
/**
|
|
33
|
+
/** 读工作区状态(后端服务 inspect:冲突 + 是否已安装);返回结构化状态供视图使用。 */
|
|
34
34
|
const readConflicts = async (scope) => {
|
|
35
35
|
const svc = optional('agentTeamPlaybook')
|
|
36
36
|
if (svc === undefined) return { state: 'service-missing' }
|
|
37
37
|
const dir = workingDirOf(scope)
|
|
38
38
|
if (dir === undefined) return { state: 'no-workspace' }
|
|
39
39
|
try {
|
|
40
|
-
const
|
|
41
|
-
return { state: 'ok', dir, conflicts, svc }
|
|
40
|
+
const info = typeof svc.inspect === 'function' ? await svc.inspect(dir) : { conflicts: await svc.scan(dir), installed: false }
|
|
41
|
+
return { state: 'ok', dir, conflicts: info.conflicts ?? [], installed: info.installed === true, svc }
|
|
42
42
|
} catch (error) {
|
|
43
43
|
return { state: 'error', message: String(error?.message ?? error) }
|
|
44
44
|
}
|
|
@@ -166,18 +166,22 @@ export function apply(ctx) {
|
|
|
166
166
|
const total = got.conflicts.length
|
|
167
167
|
const pending = got.conflicts.map((c, i) => ({ ...c, index: i })).filter((c) => !entry.map.has(c.index))
|
|
168
168
|
const current = pending[0]
|
|
169
|
+
const notInstalled = total === 0 && got.installed === false
|
|
170
|
+
const installedClean = total === 0 && got.installed === true
|
|
169
171
|
emit({
|
|
170
|
-
headline:
|
|
171
|
-
|
|
172
|
-
|
|
172
|
+
headline: notInstalled
|
|
173
|
+
? '未安装:点「安装到工作区」即可写入。'
|
|
174
|
+
: installedClean
|
|
175
|
+
? '已安装,且内容与当前版本一致——重复安装不会改动任何文件。'
|
|
173
176
|
: `共 ${total} 项冲突,已决定 ${total - pending.length} 项`,
|
|
174
177
|
dir: got.dir,
|
|
175
178
|
remaining: `${pending.length} / ${total}`,
|
|
176
179
|
current: current === undefined ? '—' : `${current.index + 1}. ${current.rel}`,
|
|
177
180
|
reason: current?.reason ?? '',
|
|
178
|
-
hint:
|
|
179
|
-
|
|
180
|
-
|
|
181
|
+
hint: notInstalled
|
|
182
|
+
? '回到「协作规程」面板点「安装到工作区」。'
|
|
183
|
+
: installedClean
|
|
184
|
+
? '想把文件强制刷成当前版本,用「协作规程」里的「覆盖式安装」。'
|
|
181
185
|
: '每点一项即定案;全部定案后自动执行 /atp apply。要改名请用命令:/atp apply 1=改名:新名字',
|
|
182
186
|
})
|
|
183
187
|
return () => {}
|
package/lib/index.js
CHANGED
|
@@ -472,6 +472,23 @@ export function apply(ctx) {
|
|
|
472
472
|
const { conflicts } = await scan({ sourceRoot: PLAYBOOK_DIR, targetDir })
|
|
473
473
|
return conflicts.map((c) => ({ rel: c.rel, reason: c.reason, target: c.target, ours: c.ours === true }))
|
|
474
474
|
},
|
|
475
|
+
/**
|
|
476
|
+
* 工作区状态:冲突清单 + 是否已安装(按内容判定,与 scan 同一套规则)。
|
|
477
|
+
* 面板据此区分「未安装 / 已安装且一致 / 有冲突」,避免把幂等误说成"无冲突"。
|
|
478
|
+
* @param {string} targetDir 工作区绝对路径
|
|
479
|
+
*/
|
|
480
|
+
async inspect(targetDir) {
|
|
481
|
+
const { conflicts } = await scan({ sourceRoot: PLAYBOOK_DIR, targetDir })
|
|
482
|
+
const corePath = path.join(targetDir, CORE_FILE)
|
|
483
|
+
const coreInstalled = existsSync(corePath) && readFileSyncSafe(corePath).includes(OURS_SIGNATURE)
|
|
484
|
+
const docsInstalled = existsSync(path.join(targetDir, DOCS_DIR, 'workflow', 'rules', '01-总纲细则.md'))
|
|
485
|
+
return {
|
|
486
|
+
conflicts: conflicts.map((c) => ({ rel: c.rel, reason: c.reason, target: c.target, ours: c.ours === true })),
|
|
487
|
+
coreInstalled,
|
|
488
|
+
docsInstalled,
|
|
489
|
+
installed: coreInstalled && docsInstalled,
|
|
490
|
+
}
|
|
491
|
+
},
|
|
475
492
|
/**
|
|
476
493
|
* 由决策生成 `/atp apply` 的参数串——与命令层同一套编号规则,
|
|
477
494
|
* 下游(如 dsh-go 面板)只负责收集决策,不自己拼格式。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-agent-team-playbook",
|
|
3
|
-
"version": "1.36.
|
|
3
|
+
"version": "1.36.1",
|
|
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",
|