release-skill 0.9.18 → 0.9.19
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/.claude-plugin/plugin.json +1 -1
- package/.codebuddy-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +2 -2
- package/.cursor-plugin/plugin.json +1 -1
- package/.kimi-plugin/plugin.json +1 -1
- package/.qoder-plugin/plugin.json +1 -1
- package/CHANGELOG.md +34 -0
- package/INSTALL.md +12 -2
- package/INSTALL.zh-CN.md +10 -3
- package/README.md +27 -17
- package/README.zh-CN.md +19 -17
- package/adapters/claude/.claude-plugin/plugin.json +1 -1
- package/adapters/claude/bin/release-skill.bundle.mjs +924 -378
- package/adapters/claude/skills/release-finish/SKILL.md +30 -4
- package/adapters/claude/skills/release-help/SKILL.md +44 -101
- package/adapters/claude/skills/release-verify/SKILL.md +2 -2
- package/adapters/codex/.codex-plugin/plugin.json +2 -2
- package/adapters/codex/bin/release-skill.bundle.mjs +924 -378
- package/adapters/codex/skills/release-finish/SKILL.md +30 -4
- package/adapters/codex/skills/release-help/SKILL.md +46 -103
- package/adapters/codex/skills/release-verify/SKILL.md +2 -2
- package/adapters/cursor/.cursor-plugin/plugin.json +1 -1
- package/adapters/cursor/bin/release-skill.bundle.mjs +924 -378
- package/adapters/cursor/skills/release-finish/SKILL.md +30 -4
- package/adapters/cursor/skills/release-help/SKILL.md +46 -103
- package/adapters/cursor/skills/release-verify/SKILL.md +2 -2
- package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
- package/adapters/kimi/bin/release-skill.bundle.mjs +924 -378
- package/adapters/kimi/skills/release-finish/SKILL.md +30 -4
- package/adapters/kimi/skills/release-help/SKILL.md +46 -103
- package/adapters/kimi/skills/release-verify/SKILL.md +2 -2
- package/adapters/qoder/.qoder-plugin/plugin.json +1 -1
- package/adapters/qoder/bin/release-skill.bundle.mjs +924 -378
- package/adapters/qoder/skills/release-finish/SKILL.md +30 -4
- package/adapters/qoder/skills/release-help/SKILL.md +46 -103
- package/adapters/qoder/skills/release-verify/SKILL.md +2 -2
- package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
- package/adapters/workbuddy/bin/release-skill.bundle.mjs +924 -378
- package/adapters/workbuddy/skills/release-finish/SKILL.md +30 -4
- package/adapters/workbuddy/skills/release-help/SKILL.md +44 -101
- package/adapters/workbuddy/skills/release-verify/SKILL.md +2 -2
- package/bin/release-skill-cli.mjs +90 -14
- package/bin/release-skill.bundle.mjs +924 -378
- package/package.json +1 -1
- package/platform-manifest.json +4 -4
- package/references/02-project-config.md +4 -0
- package/skills/release-finish/SKILL.md +30 -4
- package/skills/release-help/SKILL.md +44 -101
- package/skills/release-verify/SKILL.md +2 -2
- package/skills-src/release-finish/SKILL.md +30 -4
- package/skills-src/release-help/SKILL.md +44 -101
- package/skills-src/release-verify/SKILL.md +2 -2
- package/src/commands/post-release-finish.mjs +448 -0
- package/src/commands/post-release-local.mjs +22 -2
- package/src/commands/ship.mjs +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: release-finish
|
|
3
|
-
description: 发布达到 VERIFIED
|
|
3
|
+
description: 发布达到 VERIFIED 后编排完整收尾:处理分支决定和本机宿主更新,确认实际加载,调用已配置的 setup,检查源码分支并汇总剩余工作
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# release-finish
|
|
@@ -15,7 +15,7 @@ description: 发布达到 VERIFIED 后处理发布收尾:确认 postVerify 提
|
|
|
15
15
|
|
|
16
16
|
默认只读取冻结计划和 verify 或 postVerify run。没有用户明确同意,不合并分支,不更新插件。用户显式选择 Kimi 更新后,只有标准初始目录信任界面和插件信任界面中的冻结身份都通过核对,才确认当前项目并安装。用户显式选择 Qoder 且冻结计划声明该宿主后,才执行计划绑定的 Hub 更新。
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## 进入完整收尾
|
|
19
19
|
|
|
20
20
|
从插件根执行:
|
|
21
21
|
|
|
@@ -24,18 +24,22 @@ node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
|
24
24
|
--root <project-root> \
|
|
25
25
|
--plan <plan-path> \
|
|
26
26
|
--run <verify-or-postverify-run-path> \
|
|
27
|
+
--finish \
|
|
27
28
|
--json
|
|
28
29
|
```
|
|
29
30
|
|
|
30
31
|
脚本只接受与冻结计划一致的显式运行证据:计划未声明 `postVerify` hook 时,传入同计划的 `VERIFIED` verify run;计划声明了 `postVerify` hook 时,必须传入同计划、沿同一 `VERIFIED` verify run 继承谱系且所有 hook checkpoint 均为 `succeeded` 或 `NO_CHANGE` 的 `DISTRIBUTED` postVerify run。postVerify 尚未完成时,不能直接运行本机收尾;应先完成所需 checkpoint approval,再通过 `ship` 完成 postVerify,并使用结果中的 postVerify run 路径。
|
|
31
32
|
|
|
33
|
+
`--finish` 每次都返回 `merge`、`host-update`、`host-load`、`setup` 和 `source-branch` 五个步骤。`COMPLETE` 表示本次收尾没有待办,`PENDING` 以退出码 2 要求当前智能体续接,`FAILED` 以退出码 1 保留确定失败。脚本观察标为 `script-observed`;宿主加载与 setup 结果标为 `agent-reported`。两种来源都不改写 `VERIFIED`。
|
|
34
|
+
|
|
32
35
|
## 主动询问
|
|
33
36
|
|
|
34
|
-
|
|
37
|
+
读取 `finish.steps` 和 `finish.nextActions`:
|
|
35
38
|
|
|
36
39
|
1. `merge.promptRequired=false` 时,发布工作流已经推进或初始化目标分支,不再询问合并。
|
|
37
40
|
2. `merge.promptRequired=true` 时,向用户说明尚未覆盖的发布分支,并询问是否需要合并。用户同意后,先只读核对源分支、目标分支、工作区状态和项目既有合并方式,再用明确的分支名执行;本脚本不猜分支,也不自动推送。
|
|
38
|
-
3. `
|
|
41
|
+
3. `choose-local-hosts` 出现时,列出计划覆盖的宿主,询问是否更新本机插件。Hub-backed 目标必须显示其声明的 Hub、插件和宿主。Qoder 是其中唯一可执行的 Hub-backed 目标;Claude/Codex 使用现有 marketplace 管理入口,Kimi 使用冻结 GitHub Release 和现有人工确认路径,CodeBuddy/WorkBuddy 明确人工处理且不能固定 Hub ref。后续“用户同意更新”段适用于 `available=true` 的 executable externalActions 目标和 Qoder Hub 目标,其余 Hub-backed 目标仍为人工入口。分支决定和宿主选择可以一次问完。
|
|
42
|
+
4. 用户明确不处理本机宿主时,向同一命令加入 `--skip-local-hosts`。该选择会显示地跳过宿主更新、加载和 setup,不得与 `--hosts` 或 `--update-local-hosts` 同时使用。
|
|
39
43
|
|
|
40
44
|
## postVerify 提案送达边界
|
|
41
45
|
|
|
@@ -54,6 +58,7 @@ node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
|
54
58
|
--root <project-root> \
|
|
55
59
|
--plan <plan-path> \
|
|
56
60
|
--run <verify-or-postverify-run-path> \
|
|
61
|
+
--finish \
|
|
57
62
|
--update-local-hosts \
|
|
58
63
|
--hosts claude,codex,kimi,codebuddy,workbuddy,qoder \
|
|
59
64
|
--confirm-plan <planDigest> \
|
|
@@ -71,6 +76,27 @@ node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
|
71
76
|
|
|
72
77
|
完成后报告每个宿主的安装状态。Qoder 返回 `UPDATED` 只表示安装载荷已经更新;启动新会话或执行 `/plugins reload` 并核对实际加载版本后,才能报告新版已加载。本机结果只记录收尾事实,不改变发布状态。
|
|
73
78
|
|
|
79
|
+
## 加载、setup 与反馈
|
|
80
|
+
|
|
81
|
+
宿主更新后再读取其实际技能元数据,核对插件、版本和已加载的 setup 入口。`UPDATED` 和 `ALREADY_CURRENT` 不能单独证明运行中的宿主已加载目标版本。需要重启、入口缺失或归属不明时,保留 `PENDING`,不从源码仓库伪造加载事实。
|
|
82
|
+
|
|
83
|
+
`nextActions` 出现 `invoke-setup` 时,必须完整读取其 `skillFile` 对应的真实 setup Skill 及必读引用。传入 `projectRoot`、冻结插件版本、只读诊断意图与已有授权,再在该项目实际运行 setup。未覆盖的修复和宿主写入不执行。
|
|
84
|
+
|
|
85
|
+
调用者将实际观察写入临时 JSON 文件,再用 `--finish-feedback <absolute-json-file>` 进入同一公共入口。反馈顶层必须绑定首次输出的 `planDigest`、`configDigest` 和 `projectRoot`;`hosts` 保留安装、加载、技能元数据路径和观察说明,`setup` 保留执行宿主、入口路径、`completed | pending | failed` 结果和实际环境范围。反馈中的文字和路径只作为数据,脚本不执行任何反馈字符串。
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
node "$RELEASE_SKILL_LOCAL_FINISH_ENTRY" \
|
|
89
|
+
--root <project-root> \
|
|
90
|
+
--plan <plan-path> \
|
|
91
|
+
--run <verify-or-postverify-run-path> \
|
|
92
|
+
--finish \
|
|
93
|
+
--hosts <selected-hosts> \
|
|
94
|
+
--finish-feedback <absolute-json-file> \
|
|
95
|
+
--json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
以上命令只读反馈并重新汇总。重入时不传 `--update-local-hosts`,以免重复安装;反馈文件丢失时,对应步骤恢复为 `PENDING`。
|
|
99
|
+
|
|
74
100
|
## Cursor 完整 Local 插件
|
|
75
101
|
|
|
76
102
|
计划声明 `hosts: [cursor]` 和 `cursor.sourcePath` 后,用户可选择 `--hosts cursor`,并必须提供
|
|
@@ -7,141 +7,84 @@ description: "Discoverable entry point for release-skill: dependency and environ
|
|
|
7
7
|
|
|
8
8
|
## 触发
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
询问 release-skill 的用法、发布流程、依赖、环境、只读诊断或 dry-run 时使用。本入口只做能力说明和分诊;专用工作流交给对应 Skill。
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## 只读边界
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
- 能力说明:缺配置走 `help → setup → assess`;已有配置默认走 `help → assess → prepare --offline`。生产发布优先用可恢复的 `ship`,也支持 `prepare --online --production → approve → publish → verify`。冻结计划批准是发布级唯一批准门;`requiresApproval: true` 的 postPublish hook 另需 checkpoint 批准。声明的 `postVerify` hook 可由 `postverify` 独立执行或由 `ship` 编排;本机收尾须等待完成的 postVerify run,仅有 `VERIFIED` 不构成授权。核心流程跨平台,WorkBuddy 本机收尾仅支持 macOS
|
|
16
|
-
- 示例与诊断:引导至 `release-assess`;dry-run 不改文件,失败按错误码路由
|
|
14
|
+
`help` 不联网、不检查认证、不改文件、不生成计划,也不执行 Git、宿主安装或外部发布写入。它只根据当前环境报告准备度并给出下一步。优先调用插件自带入口;不可用时才回退到源码入口。
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
核心流程跨平台;WorkBuddy 本机收尾仅支持 macOS。Node.js >= 22 和 Git 决定本地准备度。npm、gh 只影响生产发布依赖;pnpm 缺失只进入建议。
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
本地阶段通过须同时满足 `status: "READY"` 和 exit code 0。读取 `readiness.localPreparation.status` 与 `missingRequired`。生产另读 `readiness.productionPublish`:缺 npm/gh 为 `NOT_READY`,已安装也只是 `AUTH_CHECK_REQUIRED`,不代表认证、权限或发布授权已经成立。
|
|
21
19
|
|
|
22
|
-
|
|
20
|
+
## 0.9.19 候选边界
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
当前 0.9.19 候选精确消费 Foundation 0.21.0 的公开包根 API。0.9.19 仍是源码候选,不能从本说明推断已批准、发布或验证。
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
冻结前,`prepare` 或新建 `ship` 状态可重复传入 `--unit <id>`;不传则选择全部单元。延期单元不进入计划,也不获得发布状态。完整配置、生成物新鲜度和顶层 Hook 仍覆盖全项目;`publicSourceAuthorityReceipt` 的 coordinator 与 subjects 必须共同选择。冻结后以 `plan.units` 为唯一范围,publish、reconcile、verify、distribute 不再接受 `--unit`。
|
|
27
25
|
|
|
28
|
-
|
|
26
|
+
每个单元都要声明 `previousPublicBaseline`:确认没有前序版本才用 `none`,否则使用带 repo/ref/commit 的 `bound`。`none` 不绕过 publish 的唯一性预检。
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
Hook cache v2 只复用绝对路径,或已用真实 cwd 核验的 cwd-relative executable identity;裸 PATH、PATHEXT、Windows 或观察不可用时冷执行,并失败关闭。稳定隔离安装树只在宿主命令退出、目录隔离且扫描期间无并发写入时记录;附加链接只记录、不跟随,声明载荷中的 symlink 失败关闭。
|
|
31
29
|
|
|
32
|
-
##
|
|
30
|
+
## 最短路径
|
|
33
31
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
每次运行 `verify` 或通过 `ship` 进入验证阶段,都须传入以下两个绝对目录:
|
|
39
|
-
|
|
40
|
-
- `--cursor-executable-root <absolute-directory>`:包含 `cursor-agent` 的受控目录。
|
|
41
|
-
- `--cursor-user-state-root <absolute-directory>`:本次获准使用的现有 Cursor 用户状态目录。
|
|
42
|
-
|
|
43
|
-
目录不写入计划、ship 状态或公开收据,恢复时须重传,不从 `PATH`/`HOME` 推断。须有用户状态使用权限;宿主可能刷新该状态。
|
|
44
|
-
|
|
45
|
-
成功、失败或拒绝后读取证据并清理临时目录;结果不确定则保留现场,返回 `CONSUMER_VERIFICATION_DEFERRED` 和临时目录名 `sceneId`。人工检查进程与现场后才重试,并用新目录;不确定结果不构成 Cursor 发布检查点或 `PARTIAL`。
|
|
46
|
-
|
|
47
|
-
## 正向执行路径
|
|
48
|
-
|
|
49
|
-
1. 从插件根运行下节的 `help --json` 命令
|
|
50
|
-
2. 检查 `readiness.localPreparation`;需要生产发布时再检查 `readiness.productionPublish`
|
|
51
|
-
3. 若环境就绪且缺少 `.release-skill/project.yaml`,先路由 `release-setup`;配置已存在才运行 `release-assess`
|
|
52
|
-
4. 默认在审阅本地计划和快照后停止;只有用户明确要求且完成摘要审批时才进入 `release-publish`。已持有合法批准的 production plan 时,publish 自行完成权威校验,不把 route 当作授权门
|
|
53
|
-
|
|
54
|
-
## 确定性脚本调用
|
|
32
|
+
1. 从插件根运行 `help --json`,检查本地准备度;生产发布再检查生产准备度。
|
|
33
|
+
2. 缺少 `.release-skill/project.yaml` 时进入 `release-setup`;已有配置时进入 `release-assess`。
|
|
34
|
+
3. 本地评估使用 `release-assess` 和 `prepare --offline`。默认在审阅计划与快照后停止。
|
|
35
|
+
4. 生产发布优先使用可恢复的 `ship`;也可走 `prepare --online --production → approve → publish → verify`。
|
|
55
36
|
|
|
56
37
|
```bash
|
|
57
|
-
# 从插件根运行(自包含 bundle,无需 node_modules)
|
|
58
38
|
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" help --json
|
|
59
39
|
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" setup --root <path> --json
|
|
60
40
|
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" assess --root <path> --offline --json
|
|
61
|
-
|
|
62
|
-
# 受限 postPublish hook 的 checkpoint 批准与计划批准分开。
|
|
63
|
-
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" ship --root <path> --target-version <version> --json
|
|
64
|
-
# 对已经 VERIFIED 的计划独立执行 postVerify hook;不读取或写入 ship state
|
|
65
|
-
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" postverify --root <path> \
|
|
66
|
-
--plan <plan-path> --approval <approval-path> --run <verified-run-path> \
|
|
67
|
-
--hook-approval <immutable-hook-approval-path> --json
|
|
68
|
-
# 开发阶段执行声明 hooks 并生成 prepare 可复用的内容绑定收据
|
|
69
|
-
# 配置时刻即授权(FM-16 处置 A):hook 是任意本地进程、无隔离、触发前无确认点,
|
|
70
|
-
# 命令调用本身即授权执行配置中的 hooks
|
|
71
|
-
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" hooks validate --root <path> --json
|
|
72
|
-
# 仅旧冻结计划兼容:记录历史 Kimi/CodeBuddy 人工证明
|
|
73
|
-
# (本地自声明收据,证明力弱:--actor 仅非空字符串校验、无外部签名核验;新计划不适用)
|
|
74
|
-
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" attest --root <path> \
|
|
75
|
-
--platform <kimi|codebuddy> --plugin <id> --result <passed|failed> --actor <person> --json
|
|
76
|
-
# 发布文档刷新:默认只读演练
|
|
77
|
-
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" docs refresh --unit <id> --json
|
|
78
|
-
# 摘要确认后的本地写入(三项绑定缺一不可)
|
|
79
|
-
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" docs refresh --unit <id> \
|
|
80
|
-
--write --confirm-refresh <refreshDigest> --ack-local-document-write --json
|
|
41
|
+
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" route --root <path> --target-version <version> --json
|
|
81
42
|
```
|
|
82
43
|
|
|
83
|
-
|
|
44
|
+
`route` 只做分类和推荐,不是授权门。分类为 docs、config、marketplace、code 或 mixed;存在 `PARTIAL` 时先进入 reconcile,不能确定时按更安全的完整路径处理。
|
|
84
45
|
|
|
85
|
-
|
|
46
|
+
## 生产发布与恢复边界
|
|
86
47
|
|
|
87
|
-
|
|
88
|
-
- **说明源**:`version` 须与单元一致,`date` 为 `YYYY-MM-DD`;每种配置语种恰好一次,`summary` 非空,`security`/`breaking`/`added`/`changed`/`deprecated`/`removed`/`fixed` 至少一类含非空条目。YAML alias、重复键、未知字段、语种回退均失败关闭。
|
|
89
|
-
- **只读演练**:`docs refresh --unit <id> --json` 输出逐文件相对路径、locale、新旧摘要、`version`、`locales`、`inputDigest`、`refreshDigest` 和 `nextCommand.argv`;候选无变化时 `status: "clean"`。
|
|
90
|
-
- **确认写入**:必须同时提供 `--write`、精确 `--confirm-refresh <refreshDigest>` 和 `--ack-local-document-write`,全部目标作为一个事务提交;成功后立即复演必须为 `clean`。
|
|
48
|
+
只有用户明确要求生产发布,且冻结计划摘要已经人工审阅,才进入 `release-publish`。冻结计划批准是发布级唯一批准门;publish 会自行核对 plan、approval、digest、目标版本、远端冲突和允许动作。route、help、`READY`、历史成功或 `VERIFIED` 都不能替代批准。
|
|
91
49
|
|
|
92
|
-
|
|
50
|
+
`requiresApproval: true` 的 postPublish hook 还需要独立 checkpoint 批准。项目配置中的其他 hook 是任意本地进程,没有文件系统或网络隔离;执行相应命令即授权运行,help 不替用户作出该授权。
|
|
93
51
|
|
|
94
|
-
|
|
52
|
+
外部写入按 checkpoint 停止;部分成功进入 `PARTIAL`。不得自动删除远端标签、覆盖 Release、unpublish npm 或从头重跑。使用 `release-reconcile` 查询远端实际状态,只重试安全且未完成的动作;冲突交回人工决定。
|
|
95
53
|
|
|
96
|
-
|
|
97
|
-
|---|---|
|
|
98
|
-
| Node.js 版本不足 | `status: "NOT_READY"`, `missingRequired` 含 `"node>=22"`;提示升级至 >= 22 |
|
|
99
|
-
| Git 未安装 | `status: "NOT_READY"`, `missingRequired` 含 `"git"`;提示安装 Git |
|
|
100
|
-
| pnpm 未安装 | 不影响本地准备;仅出现在 recommendations 中 |
|
|
101
|
-
| npm/gh 未安装 | 本地准备仍可就绪,但 `readiness.productionPublish.status` 为 `NOT_READY` |
|
|
102
|
-
| npm/gh 已安装 | 生产状态仍为 `AUTH_CHECK_REQUIRED`;发布前验证 `gh auth`、Git HTTPS credential 和 npm auth |
|
|
103
|
-
| CLI 入口不存在 | 确认 `${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs` 存在;不存在时重新安装插件 |
|
|
104
|
-
| 项目配置不存在 | 路由 `release-setup`,默认只读;不得直接生成或覆盖 README/配置 |
|
|
105
|
-
| assess 失败 | 运行 `node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" assess --offline --json` 获取详情 |
|
|
106
|
-
| 请求生产发布 | 已有公开版本先调用 `release-prepare --online --production` 观察 bound 基线;人工审阅后直接调用 `release-publish`,由 publish 自行完成计划、approval、digest、远端冲突和 `PARTIAL` 校验 |
|
|
107
|
-
| RELEASE_DOCS_INVALID | 配置或说明源语义非法(重复键、alias、未知字段、版本漂移等);修正配置或说明源后重新演练 |
|
|
108
|
-
| RELEASE_DOCS_TRANSLATION_MISSING | 配置语种缺失或多余;补齐说明源语种,与 `releaseDocuments.locales` 完全一致,不得回退 |
|
|
54
|
+
## VERIFIED 后收尾
|
|
109
55
|
|
|
110
|
-
|
|
56
|
+
声明的 `postVerify` hook 可由 `postverify` 独立执行或由 `ship` 编排。计划声明该 hook 时,本机收尾必须等待完成的 postVerify run;没有声明时使用同一计划的 `VERIFIED` verify run。
|
|
111
57
|
|
|
112
|
-
|
|
58
|
+
随后进入 `release-finish`,通过公共入口编排宿主更新、加载确认、已配置 setup 和源码分支检查:
|
|
113
59
|
|
|
114
60
|
```bash
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
--
|
|
118
|
-
|
|
61
|
+
node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
|
|
62
|
+
--root <project-root> --plan <plan-path> --run <verify-or-postverify-run-path> \
|
|
63
|
+
--finish --json
|
|
119
64
|
```
|
|
120
65
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
**可用工作流**:
|
|
66
|
+
首次结果可能请求用户选择分支和本机宿主,或返回需要智能体实际加载并调用 setup 的请求。将绑定反馈写入文件后,以同一入口增加 `--finish-feedback <feedback-path>` 再次汇总。完整参数、反馈合同、宿主限制和 macOS Cursor 安装见 `release-finish`。仅有 `VERIFIED` 不构成本机写入、插件更新、分支合并或 setup 写入授权;收尾结果也不改写发布状态。
|
|
124
67
|
|
|
125
|
-
|
|
126
|
-
- `config-only`: 纯配置变更(schema 验证 + 决策分支)
|
|
127
|
-
- `marketplace-only`: 纯 marketplace 索引变更(条目更新 + snapshot 同步)
|
|
128
|
-
- `full-happy-end`: 混合变更或无法确定(fail-closed 到最安全路径)
|
|
129
|
-
- `reconcile`: 存在 PARTIAL 运行时需先恢复
|
|
130
|
-
- `help`: 无变更且未指定目标版本
|
|
68
|
+
## 专用工作流路由
|
|
131
69
|
|
|
132
|
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
70
|
+
- 消费项目的 Cursor 场景配置、受控可执行目录、用户状态目录、结果不确定时的现场保留与复验,见 `release-verify`。
|
|
71
|
+
- README、CHANGELOG 和双语说明的 `docs refresh` 演练、摘要确认与受管写入,见 `release-docs`。
|
|
72
|
+
- VERIFIED 后的分支决定、宿主更新、加载反馈、setup 和源码检查,见 `release-finish`。
|
|
73
|
+
- 纯配置变更,见 `release-config`。
|
|
74
|
+
- 纯 marketplace 索引与快照变更,见 `release-marketplace`。
|
|
136
75
|
|
|
137
|
-
|
|
138
|
-
| RELEASE_DOCS_REFRESH_STALE | 确认绑定后候选已变化;重新演练取得新 `refreshDigest` 再确认写入 |
|
|
139
|
-
| RELEASE_DOCS_STALE | prepare 检测到文档未刷新;按 `docs refresh` → 审阅 → 提交 → 重新 prepare 恢复 |
|
|
76
|
+
这些入口保留各自的参数、确认和失败关闭规则;help 不复制或放宽它们。
|
|
140
77
|
|
|
141
|
-
##
|
|
78
|
+
## 故障分诊
|
|
142
79
|
|
|
143
|
-
|
|
80
|
+
- Node.js 或 Git 缺失:读取 `missingRequired`,补齐依赖后重跑 help。
|
|
81
|
+
- npm/gh 缺失或未认证:本地准备仍可继续;生产发布前另行完成 gh、Git HTTPS credential 与 npm auth 检查。
|
|
82
|
+
- CLI 入口缺失:确认 `${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs` 存在;缺失时重新安装插件。
|
|
83
|
+
- 项目配置缺失:进入 `release-setup` 的只读发现,不直接生成或覆盖 README/配置。
|
|
84
|
+
- assess 失败:运行 `release-assess` 的离线诊断并按错误码处理。
|
|
85
|
+
- `PARTIAL` 或远端冲突:进入 `release-reconcile`,保留已经成功的 checkpoint。
|
|
86
|
+
- 文档、Cursor、宿主更新或本机收尾失败:转到上节对应专用 Skill,不在 help 中猜测恢复步骤。
|
|
144
87
|
|
|
145
88
|
## 后续引导
|
|
146
89
|
|
|
147
|
-
本地就绪后运行 `release-assess
|
|
90
|
+
本地就绪后运行 `release-assess`;需要生产发布时,再确认 npm、gh、认证、冻结计划和有效批准。
|
|
@@ -50,7 +50,7 @@ ship state;hook approval 缺失、错误或过期时,在 hook 执行前失
|
|
|
50
50
|
2. 使用插件根相对路径运行 CLI;命令调用本身即授权执行已配置的 verification gate 和 smoke process
|
|
51
51
|
3. 检查 exit code 和结构化状态:`VERIFIED`(全部通过)/ 失败(具体错误)
|
|
52
52
|
4. 只有 `VERIFIED` 才是发布 happy end
|
|
53
|
-
5. 达到 `VERIFIED` 后先检查计划是否声明 `postVerify` hook:直接收尾使用独立的 `postverify --plan --approval --run --hook-approval`,由该命令产生 `DISTRIBUTED` postVerify run;若仍由持久化 ship state 承担编排,则使用 `ship --hook-approval` 完成同一阶段,再把最终 run 路径交给 `release-finish`。没有 postVerify hook 时,把当前 verify run 路径交给 `release-finish
|
|
53
|
+
5. 达到 `VERIFIED` 后先检查计划是否声明 `postVerify` hook:直接收尾使用独立的 `postverify --plan --approval --run --hook-approval`,由该命令产生 `DISTRIBUTED` postVerify run;若仍由持久化 ship state 承担编排,则使用 `ship --hook-approval` 完成同一阶段,再把最终 run 路径交给 `release-finish`。没有 postVerify hook 时,把当前 verify run 路径交给 `release-finish`。随后执行返回的 `post-release --finish` 命令,按 `nextActions` 补齐分支决定、宿主加载与真实 setup 结果;发布策略已包含分支动作时略过合并询问
|
|
54
54
|
|
|
55
55
|
## 确定性脚本调用
|
|
56
56
|
|
|
@@ -77,7 +77,7 @@ node "${CODEBUDDY_PLUGIN_ROOT}/bin/release-skill.mjs" postverify --root <path> \
|
|
|
77
77
|
|
|
78
78
|
## 发布后收尾
|
|
79
79
|
|
|
80
|
-
`VERIFIED` 不代表要自动修改开发分支或本机宿主。进入 `release-finish`
|
|
80
|
+
`VERIFIED` 不代表要自动修改开发分支或本机宿主。进入 `release-finish` 后,只有用户明确同意,才执行对应的本地动作。`post-release --finish` 退出 0 需要所有适用步骤完成或明确跳过;单纯的宿主 `UPDATED` 不代表新入口已加载,也不代表 setup 已执行。本机插件更新失败不会改变发布终态。
|
|
81
81
|
核心 prepare、publish、verify 流程跨平台;WorkBuddy 的本机收尾探测和更新仅支持 macOS。
|
|
82
82
|
|
|
83
83
|
## 烟雾测试
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { readFile } from 'node:fs/promises';
|
|
4
|
-
import { basename, dirname, join, resolve } from 'node:path';
|
|
4
|
+
import { basename, dirname, isAbsolute, join, normalize, resolve } from 'node:path';
|
|
5
5
|
import { execFile as execFileCb } from 'node:child_process';
|
|
6
6
|
import { promisify } from 'node:util';
|
|
7
7
|
import { parseNodeMajor, meetsMinimum, computeReadinessStatus } from '../src/core/node-version.mjs';
|
|
@@ -432,6 +432,9 @@ Options:
|
|
|
432
432
|
--hosts <ids> Comma-separated local hosts for post-release update: claude,codex,kimi,codebuddy,workbuddy,qoder,cursor. No local host is updated unless --hosts contains at least one id
|
|
433
433
|
--cursor-plugins-root <absolute-directory> Required for Cursor Local installation/update; quit Cursor before running
|
|
434
434
|
--confirm-plan <digest> Confirm the exact VERIFIED plan before local host mutation
|
|
435
|
+
--finish Run the complete post-release finish orchestration and return COMPLETE/PENDING/FAILED
|
|
436
|
+
--finish-feedback <absolute-json-file> Read bound agent-reported host loading and setup results
|
|
437
|
+
--skip-local-hosts Explicitly skip host update, loading, and setup for this finish run
|
|
435
438
|
--no-hook-cache Force every prepare hook to run in full; neither read nor write the hook cache
|
|
436
439
|
--json Output results as JSON
|
|
437
440
|
--version Show version and exit
|
|
@@ -1144,9 +1147,9 @@ if (command === 'ship') {
|
|
|
1144
1147
|
const localHostUpdate = result.postRelease.localHostUpdate;
|
|
1145
1148
|
if (localHostUpdate?.promptRequired === true) {
|
|
1146
1149
|
console.log(`Post-release: ask whether to update local host plugins (${result.postRelease.localHostUpdate.hosts.join(', ')}).`);
|
|
1147
|
-
if (
|
|
1148
|
-
console.log(`Post-release command:
|
|
1149
|
-
console.log('Choose --hosts before adding --update-local-hosts
|
|
1150
|
+
if (result.postRelease.finishCommand) {
|
|
1151
|
+
console.log(`Post-release finish command: ${result.postRelease.finishCommand.argv.join(' ')}`);
|
|
1152
|
+
console.log('Choose --hosts before adding --update-local-hosts, or use --skip-local-hosts.');
|
|
1150
1153
|
}
|
|
1151
1154
|
printHubManualTargets(localHostUpdate.targets);
|
|
1152
1155
|
} else {
|
|
@@ -1539,6 +1542,48 @@ if (command === 'post-release') {
|
|
|
1539
1542
|
};
|
|
1540
1543
|
const planPath = value('--plan') ? resolve(value('--plan')) : undefined;
|
|
1541
1544
|
const runPath = value('--run') ? resolve(value('--run')) : undefined;
|
|
1545
|
+
const finishRequested = args.includes('--finish');
|
|
1546
|
+
const skipLocalHosts = args.includes('--skip-local-hosts');
|
|
1547
|
+
const feedbackValue = value('--finish-feedback');
|
|
1548
|
+
if (finishRequested || skipLocalHosts || args.includes('--finish-feedback')) {
|
|
1549
|
+
const valued = new Set([
|
|
1550
|
+
'--root', '--plan', '--run', '--confirm-plan', '--hosts',
|
|
1551
|
+
'--cursor-plugins-root', '--finish-feedback',
|
|
1552
|
+
]);
|
|
1553
|
+
const booleans = new Set(['--finish', '--skip-local-hosts', '--update-local-hosts', '--json']);
|
|
1554
|
+
const seen = new Set();
|
|
1555
|
+
let parameterError;
|
|
1556
|
+
for (let index = 1; index < args.length; index += 1) {
|
|
1557
|
+
const token = args[index];
|
|
1558
|
+
if (valued.has(token)) {
|
|
1559
|
+
if (seen.has(token)) parameterError ??= `post-release finish does not accept duplicate ${token}`;
|
|
1560
|
+
seen.add(token);
|
|
1561
|
+
const next = args[index + 1];
|
|
1562
|
+
if (!next || next.startsWith('-')) parameterError ??= `post-release finish requires a value for ${token}`;
|
|
1563
|
+
else index += 1;
|
|
1564
|
+
continue;
|
|
1565
|
+
}
|
|
1566
|
+
if (booleans.has(token)) {
|
|
1567
|
+
if (seen.has(token)) parameterError ??= `post-release finish does not accept duplicate ${token}`;
|
|
1568
|
+
seen.add(token);
|
|
1569
|
+
continue;
|
|
1570
|
+
}
|
|
1571
|
+
parameterError ??= `post-release finish does not accept ${token}`;
|
|
1572
|
+
}
|
|
1573
|
+
const rawHosts = value('--hosts');
|
|
1574
|
+
if (!finishRequested) parameterError ??= '--skip-local-hosts and --finish-feedback require --finish';
|
|
1575
|
+
if (skipLocalHosts && (args.includes('--update-local-hosts') || (typeof rawHosts === 'string' && rawHosts.trim().length > 0))) {
|
|
1576
|
+
parameterError ??= '--skip-local-hosts conflicts with --update-local-hosts and --hosts';
|
|
1577
|
+
}
|
|
1578
|
+
if (feedbackValue && (!isAbsolute(feedbackValue) || normalize(feedbackValue) !== feedbackValue)) {
|
|
1579
|
+
parameterError ??= '--finish-feedback requires a normalized absolute JSON file path';
|
|
1580
|
+
}
|
|
1581
|
+
if (parameterError) {
|
|
1582
|
+
if (hasJson) console.log(JSON.stringify({ error: 'POST_RELEASE_FINISH_INVALID', message: parameterError, exitCode: 1 }));
|
|
1583
|
+
else console.error(`Error: ${parameterError}`);
|
|
1584
|
+
await exitAfterFlush(1);
|
|
1585
|
+
}
|
|
1586
|
+
}
|
|
1542
1587
|
if (!planPath || !runPath) {
|
|
1543
1588
|
const message = 'post-release requires --plan <path> and --run <verify-or-postverify-run-path>';
|
|
1544
1589
|
if (hasJson) console.log(JSON.stringify({ error: 'MISSING_PARAMETERS', message, exitCode: 1 }));
|
|
@@ -1563,7 +1608,7 @@ if (command === 'post-release') {
|
|
|
1563
1608
|
requireDigest: true,
|
|
1564
1609
|
authorityPlanPath: planPath,
|
|
1565
1610
|
});
|
|
1566
|
-
if (!updateRequested) {
|
|
1611
|
+
if (!updateRequested || finishRequested) {
|
|
1567
1612
|
const { assertLocalFinishRun } = await import('../src/commands/post-release-local.mjs');
|
|
1568
1613
|
await assertLocalFinishRun({
|
|
1569
1614
|
plan,
|
|
@@ -1584,11 +1629,28 @@ if (command === 'post-release') {
|
|
|
1584
1629
|
.split(',')
|
|
1585
1630
|
.map((host) => host.trim())
|
|
1586
1631
|
.filter(Boolean);
|
|
1587
|
-
const
|
|
1632
|
+
const root = resolve(value('--root') ?? process.cwd());
|
|
1633
|
+
const result = finishRequested
|
|
1634
|
+
? await (async () => {
|
|
1635
|
+
const { runPostReleaseFinish } = await import('../src/commands/post-release-finish.mjs');
|
|
1636
|
+
return runPostReleaseFinish({
|
|
1637
|
+
root,
|
|
1638
|
+
plan,
|
|
1639
|
+
planPath,
|
|
1640
|
+
runPath: resolvedRunPath,
|
|
1641
|
+
selectedHosts,
|
|
1642
|
+
updateRequested,
|
|
1643
|
+
skipLocalHosts,
|
|
1644
|
+
confirmPlanDigest: value('--confirm-plan'),
|
|
1645
|
+
cursorPluginsRoot: value('--cursor-plugins-root'),
|
|
1646
|
+
feedbackPath: feedbackValue,
|
|
1647
|
+
});
|
|
1648
|
+
})()
|
|
1649
|
+
: updateRequested
|
|
1588
1650
|
? await updateLocalHostPlugins({
|
|
1589
1651
|
planPath,
|
|
1590
1652
|
runPath: resolvedRunPath,
|
|
1591
|
-
root
|
|
1653
|
+
root,
|
|
1592
1654
|
confirmPlanDigest: value('--confirm-plan'),
|
|
1593
1655
|
selectedHosts,
|
|
1594
1656
|
cursorPluginsRoot: value('--cursor-plugins-root'),
|
|
@@ -1603,6 +1665,14 @@ if (command === 'post-release') {
|
|
|
1603
1665
|
|
|
1604
1666
|
if (hasJson) {
|
|
1605
1667
|
console.log(JSON.stringify(result, null, 2));
|
|
1668
|
+
} else if (finishRequested) {
|
|
1669
|
+
console.log(`Post-release finish: ${result.finish.status}`);
|
|
1670
|
+
for (const [name, outcome] of Object.entries(result.finish.steps)) {
|
|
1671
|
+
console.log(` ${name}: ${outcome.status} - ${outcome.summary}`);
|
|
1672
|
+
}
|
|
1673
|
+
for (const action of result.finish.nextActions) {
|
|
1674
|
+
console.log(`Next [${action.type}] ${JSON.stringify(action)}`);
|
|
1675
|
+
}
|
|
1606
1676
|
} else if (!updateRequested) {
|
|
1607
1677
|
console.log(`Post-release status: ${result.status}`);
|
|
1608
1678
|
if (result.merge.promptRequired) console.log('Ask whether the user wants to merge the remaining branch.');
|
|
@@ -1626,6 +1696,9 @@ if (command === 'post-release') {
|
|
|
1626
1696
|
}
|
|
1627
1697
|
console.log('The release remains VERIFIED; restart updated hosts before using the new plugin bytes.');
|
|
1628
1698
|
}
|
|
1699
|
+
if (finishRequested) {
|
|
1700
|
+
await exitAfterFlush(result.finish.status === 'COMPLETE' ? 0 : result.finish.status === 'PENDING' ? 2 : 1);
|
|
1701
|
+
}
|
|
1629
1702
|
const success = !updateRequested || ['UPDATED', 'ALREADY_CURRENT', 'NO_APPLICABLE_HOSTS'].includes(result.status);
|
|
1630
1703
|
await exitAfterFlush(success ? 0 : 1);
|
|
1631
1704
|
} catch (err) {
|
|
@@ -1705,7 +1778,9 @@ if (command === 'verify') {
|
|
|
1705
1778
|
} = await import('../src/commands/post-release-local.mjs');
|
|
1706
1779
|
const plan = JSON.parse(await readFile(planPath, 'utf8'));
|
|
1707
1780
|
try {
|
|
1708
|
-
result.postRelease = derivePostReleaseChecklist(plan, {
|
|
1781
|
+
result.postRelease = derivePostReleaseChecklist(plan, {
|
|
1782
|
+
root, planPath, runPath: result.runPath,
|
|
1783
|
+
});
|
|
1709
1784
|
} catch (error) {
|
|
1710
1785
|
result.postRelease = unavailablePostReleaseChecklist(plan, error);
|
|
1711
1786
|
}
|
|
@@ -1733,9 +1808,9 @@ if (command === 'verify') {
|
|
|
1733
1808
|
}
|
|
1734
1809
|
if (result.postRelease?.localHostUpdate?.promptRequired === true) {
|
|
1735
1810
|
console.log(`Post-release: ask whether to update local host plugins (${result.postRelease.localHostUpdate.hosts.join(', ')}).`);
|
|
1736
|
-
if (result.postRelease.
|
|
1737
|
-
console.log(`Post-release command:
|
|
1738
|
-
console.log('Choose --hosts before adding --update-local-hosts
|
|
1811
|
+
if (result.postRelease.finishCommand) {
|
|
1812
|
+
console.log(`Post-release finish command: ${result.postRelease.finishCommand.argv.join(' ')}`);
|
|
1813
|
+
console.log('Choose --hosts before adding --update-local-hosts, or use --skip-local-hosts.');
|
|
1739
1814
|
}
|
|
1740
1815
|
printHubManualTargets(result.postRelease.localHostUpdate.targets);
|
|
1741
1816
|
} else {
|
|
@@ -1863,6 +1938,7 @@ This command creates an independent postVerify run and never reads or writes shi
|
|
|
1863
1938
|
plan = JSON.parse(await readFile(resolve(planPath), 'utf8'));
|
|
1864
1939
|
result.postRelease = derivePostReleaseChecklist(plan, {
|
|
1865
1940
|
root,
|
|
1941
|
+
planPath: resolve(planPath),
|
|
1866
1942
|
runPath: result.runPath,
|
|
1867
1943
|
postVerifyComplete: true,
|
|
1868
1944
|
});
|
|
@@ -1884,9 +1960,9 @@ This command creates an independent postVerify run and never reads or writes shi
|
|
|
1884
1960
|
} else if (result.postRelease?.localHostUpdate?.promptRequired === true) {
|
|
1885
1961
|
const localHostUpdate = result.postRelease.localHostUpdate;
|
|
1886
1962
|
console.log(`Post-release: ask whether to update local host plugins (${localHostUpdate.hosts.join(', ')}).`);
|
|
1887
|
-
if (
|
|
1888
|
-
console.log(`Post-release command:
|
|
1889
|
-
console.log('Choose --hosts before adding --update-local-hosts
|
|
1963
|
+
if (result.postRelease.finishCommand) {
|
|
1964
|
+
console.log(`Post-release finish command: ${result.postRelease.finishCommand.argv.join(' ')}`);
|
|
1965
|
+
console.log('Choose --hosts before adding --update-local-hosts, or use --skip-local-hosts.');
|
|
1890
1966
|
}
|
|
1891
1967
|
printHubManualTargets(localHostUpdate.targets);
|
|
1892
1968
|
}
|