release-skill 0.8.1 → 0.9.0
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/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codebuddy-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +2 -2
- package/.kimi-plugin/plugin.json +1 -1
- package/CHANGELOG.md +31 -0
- package/INSTALL.md +14 -2
- package/INSTALL.zh-CN.md +12 -2
- package/README.md +28 -16
- package/README.zh-CN.md +23 -14
- package/adapters/claude/.claude-plugin/marketplace.json +1 -1
- package/adapters/claude/.claude-plugin/plugin.json +1 -1
- package/adapters/claude/bin/release-skill-local-finish.mjs +4 -0
- package/adapters/claude/bin/release-skill.bundle.mjs +2416 -1320
- package/adapters/claude/schemas/release-plan.schema.json +40 -3
- package/adapters/claude/skills/release-finish/SKILL.md +65 -0
- package/adapters/claude/skills/release-verify/SKILL.md +6 -1
- package/adapters/codex/.codex-plugin/plugin.json +2 -2
- package/adapters/codex/bin/release-skill-local-finish.mjs +4 -0
- package/adapters/codex/bin/release-skill.bundle.mjs +2416 -1320
- package/adapters/codex/schemas/release-plan.schema.json +40 -3
- package/adapters/codex/skills/release-finish/SKILL.md +72 -0
- package/adapters/codex/skills/release-verify/SKILL.md +6 -1
- package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
- package/adapters/kimi/bin/release-skill-local-finish.mjs +4 -0
- package/adapters/kimi/bin/release-skill.bundle.mjs +2416 -1320
- package/adapters/kimi/schemas/release-plan.schema.json +40 -3
- package/adapters/kimi/skills/release-finish/SKILL.md +72 -0
- package/adapters/kimi/skills/release-verify/SKILL.md +6 -1
- package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
- package/adapters/workbuddy/bin/release-skill-local-finish.mjs +4 -0
- package/adapters/workbuddy/bin/release-skill.bundle.mjs +2416 -1320
- package/adapters/workbuddy/schemas/release-plan.schema.json +40 -3
- package/adapters/workbuddy/skills/release-finish/SKILL.md +65 -0
- package/adapters/workbuddy/skills/release-verify/SKILL.md +6 -1
- package/bin/release-skill-cli.mjs +126 -1
- package/bin/release-skill-local-finish.mjs +4 -0
- package/bin/release-skill.bundle.mjs +2416 -1320
- package/package.json +1 -1
- package/platform-manifest.json +30 -4
- package/schemas/release-plan.schema.json +40 -3
- package/skills/release-finish/SKILL.md +65 -0
- package/skills/release-verify/SKILL.md +6 -1
- package/skills-src/release-finish/SKILL.md +65 -0
- package/skills-src/release-verify/SKILL.md +6 -1
- package/src/commands/approve.mjs +14 -2
- package/src/commands/distribute.mjs +562 -321
- package/src/commands/post-release-local.mjs +611 -0
- package/src/commands/postverify.mjs +262 -155
- package/src/commands/prepare.mjs +67 -52
- package/src/commands/publish.mjs +11 -10
- package/src/commands/reconcile.mjs +11 -10
- package/src/commands/setup.mjs +26 -13
- package/src/commands/ship.mjs +45 -12
- package/src/commands/verify.mjs +19 -8
- package/src/core/adoption-assessment.mjs +0 -3
- package/src/core/approval.mjs +11 -8
- package/src/core/hooks.mjs +0 -16
- package/src/core/plan.mjs +19 -11
- package/src/core/postpublish-approval.mjs +12 -2
- package/src/core/postpublish-bundle.mjs +51 -13
- package/src/core/postpublish.mjs +146 -6
- package/src/core/preset-executor.mjs +53 -0
- package/src/core/proposal-inbox.mjs +91 -27
- package/src/core/recovery.mjs +27 -12
- package/src/producers/build-adapters.mjs +10 -1
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
"type": "integer",
|
|
18
18
|
"enum": [
|
|
19
19
|
1,
|
|
20
|
-
2
|
|
20
|
+
2,
|
|
21
|
+
3
|
|
21
22
|
],
|
|
22
|
-
"description": "Plan format and digest-scoping version. 1: legacy (every field except the top-level digest binds; commitTimestamp must equal createdAt). 2: T1.2 digest layering (record-layer fields status/createdAt/baseline/per-action status are excluded from the plan digest; commitTimestamp is derived from the HEAD commit committer date)."
|
|
23
|
+
"description": "Plan format and digest-scoping version. 1: legacy (every field except the top-level digest binds; commitTimestamp must equal createdAt). 2: T1.2 digest layering (record-layer fields status/createdAt/baseline/per-action status are excluded from the plan digest; commitTimestamp is derived from the HEAD commit committer date). 3: multi-release-unit postPublish v3 (postPublish is a declaration ARRAY, one entry per declaring unit in plan.units order, possibly empty; v3 inherits the v2 record-layer semantics and only changes the postPublish shape)."
|
|
23
24
|
},
|
|
24
25
|
"status": {
|
|
25
26
|
"type": "string",
|
|
@@ -1121,7 +1122,11 @@
|
|
|
1121
1122
|
}
|
|
1122
1123
|
},
|
|
1123
1124
|
"postPublish": {
|
|
1124
|
-
"
|
|
1125
|
+
"type": [
|
|
1126
|
+
"object",
|
|
1127
|
+
"array"
|
|
1128
|
+
],
|
|
1129
|
+
"description": "Frozen post-release distribution block. planVersion 1/2: a single declaration object, or absent (normalized to the empty array view at runtime). planVersion 3: a declaration ARRAY, one entry per declaring unit in plan.units order, possibly empty — never a single object, never absent. The exact allowed shape is enforced conditionally on planVersion (root allOf); readers must never guess the shape from the field value."
|
|
1125
1130
|
},
|
|
1126
1131
|
"digest": {
|
|
1127
1132
|
"type": "string",
|
|
@@ -1844,6 +1849,38 @@
|
|
|
1844
1849
|
}
|
|
1845
1850
|
},
|
|
1846
1851
|
"allOf": [
|
|
1852
|
+
{
|
|
1853
|
+
"if": {
|
|
1854
|
+
"properties": {
|
|
1855
|
+
"planVersion": {
|
|
1856
|
+
"const": 3
|
|
1857
|
+
}
|
|
1858
|
+
},
|
|
1859
|
+
"required": [
|
|
1860
|
+
"planVersion"
|
|
1861
|
+
]
|
|
1862
|
+
},
|
|
1863
|
+
"then": {
|
|
1864
|
+
"properties": {
|
|
1865
|
+
"postPublish": {
|
|
1866
|
+
"type": "array",
|
|
1867
|
+
"items": {
|
|
1868
|
+
"$ref": "#/definitions/planPostPublish"
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
},
|
|
1872
|
+
"required": [
|
|
1873
|
+
"postPublish"
|
|
1874
|
+
]
|
|
1875
|
+
},
|
|
1876
|
+
"else": {
|
|
1877
|
+
"properties": {
|
|
1878
|
+
"postPublish": {
|
|
1879
|
+
"$ref": "#/definitions/planPostPublish"
|
|
1880
|
+
}
|
|
1881
|
+
}
|
|
1882
|
+
}
|
|
1883
|
+
},
|
|
1847
1884
|
{
|
|
1848
1885
|
"if": {
|
|
1849
1886
|
"properties": {
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: release-finish
|
|
3
|
+
description: 发布达到 VERIFIED 后处理可选的本地收尾:按发布分支策略决定是否询问合并,并在用户确认后更新本机 Claude、Codex、Kimi、CodeBuddy/WorkBuddy 插件
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
> **Kimi Code 安装入口解析协议**:Kimi Code 官方技能契约提供正文占位符 `${KIMI_SKILL_DIR}`,宿主在向 Agent 发送正文前会将其展开为当前 `SKILL.md` 所在目录的绝对路径。必须把展开后的字面量作为当前技能目录的唯一权威输入,记为 `SKILL_DIR`。
|
|
7
|
+
> 禁止从工作目录、可执行搜索路径、源码仓库、shell 调用上下文或任何未记载的宿主元数据路径猜测技能目录。若正文中的 `${KIMI_SKILL_DIR}` 未被宿主展开(仍是字面量占位符),立即停止并报告安装定位失败。
|
|
8
|
+
> 对 `SKILL_DIR` 执行 `realpath`,取其目录向上两级得到 `PLUGIN_ROOT`;校验真实技能路径匹配 `PLUGIN_ROOT/skills/*/SKILL.md` 且仍位于插件根内(路径包含检查)。
|
|
9
|
+
> 令 `RELEASE_SKILL_LOCAL_FINISH_ENTRY=PLUGIN_ROOT/bin/release-skill-local-finish.mjs`,对入口执行 `realpath` containment、`lstat` 非符号链接且为普通文件校验。
|
|
10
|
+
> 每一次 shell 工具调用都必须在同一个调用中用上述已验证绝对值设置 `RELEASE_SKILL_LOCAL_FINISH_ENTRY`,然后执行 `node "$RELEASE_SKILL_LOCAL_FINISH_ENTRY" ...`;不得依赖前一次 shell 的变量。
|
|
11
|
+
>
|
|
12
|
+
|
|
13
|
+
# release-finish
|
|
14
|
+
|
|
15
|
+
## 触发
|
|
16
|
+
|
|
17
|
+
发布刚达到 `VERIFIED`(已完成发布后验证),或用户要求处理发布后的分支合并、本机宿主插件更新。
|
|
18
|
+
|
|
19
|
+
## 边界
|
|
20
|
+
|
|
21
|
+
这是发布后的独立收尾,不属于 `prepare → approve → publish → verify` 状态机。它不能把本机更新结果写成新的发布状态,也不能因为本机更新失败而降低 `VERIFIED`。
|
|
22
|
+
|
|
23
|
+
默认只读取冻结计划和 verify run。没有用户明确同意,不合并分支,不更新插件,不接受 Kimi 的安装信任提示。
|
|
24
|
+
|
|
25
|
+
## 先生成收尾清单
|
|
26
|
+
|
|
27
|
+
从插件根执行:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
node "$RELEASE_SKILL_LOCAL_FINISH_ENTRY" \
|
|
31
|
+
--plan <plan-path> \
|
|
32
|
+
--run <verified-run-path> \
|
|
33
|
+
--json
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
脚本只接受状态为 `VERIFIED`、且 `planDigest` 与冻结计划一致的 verify run。
|
|
37
|
+
|
|
38
|
+
## 主动询问
|
|
39
|
+
|
|
40
|
+
读取返回的 `merge` 和 `localHostUpdate`:
|
|
41
|
+
|
|
42
|
+
1. `merge.promptRequired=false` 时,发布工作流已经推进或初始化目标分支,不再询问合并。
|
|
43
|
+
2. `merge.promptRequired=true` 时,向用户说明尚未覆盖的发布分支,并询问是否需要合并。用户同意后,先只读核对源分支、目标分支、工作区状态和项目既有合并方式,再用明确的分支名执行;本脚本不猜分支,也不自动推送。
|
|
44
|
+
3. `localHostUpdate.promptRequired=true` 时,列出计划覆盖的宿主,询问是否更新本机插件。两个问题可以一次问完。
|
|
45
|
+
|
|
46
|
+
## 用户同意更新本机宿主
|
|
47
|
+
|
|
48
|
+
把用户选择的宿主和清单返回的精确 `planDigest` 传回脚本:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
node "$RELEASE_SKILL_LOCAL_FINISH_ENTRY" \
|
|
52
|
+
--plan <plan-path> \
|
|
53
|
+
--run <verified-run-path> \
|
|
54
|
+
--update-local-hosts \
|
|
55
|
+
--hosts claude,codex,kimi,codebuddy,workbuddy \
|
|
56
|
+
--confirm-plan <planDigest> \
|
|
57
|
+
--json
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
只传用户选择且计划声明的宿主。宿主 CLI 不存在时返回 `SKIPPED_NOT_INSTALLED`。各宿主按以下规则处理:
|
|
61
|
+
|
|
62
|
+
- Claude、Codex 绑定冻结的 Git 引用,并在安装后核对插件、市场、版本和市场检出提交。
|
|
63
|
+
- Kimi 先核对发布标签对应的提交,再通过受控的终端交互界面(TUI)安装,并读取本机安装根的版本、标签与修订号。
|
|
64
|
+
- CodeBuddy/WorkBuddy 的 CLI 不能精确绑定 Git 引用。本机已是目标提交时返回 `ALREADY_CURRENT`,否则返回 `MANUAL_REQUIRED`,不执行“更新到最新”。
|
|
65
|
+
|
|
66
|
+
任何宿主失败都保留其他宿主的实际结果,不回滚,也不把失败冒充成功。
|
|
67
|
+
|
|
68
|
+
完成后报告每个宿主的状态,并提醒用户重启已更新的宿主。
|
|
69
|
+
|
|
70
|
+
## 临时归属
|
|
71
|
+
|
|
72
|
+
本能力目前只服务发布后的本机收尾,因此保留在 release-skill。第二个技能族需要复用宿主更新或 TUI 驱动,或 Foundation 发布等价公共入口时,再把通用机制上收 Foundation并删除这里的通用部分。release-skill 只保留发布计划到宿主更新输入的领域映射。
|
|
@@ -49,7 +49,8 @@ verify 只接受 `PUBLISHED` 状态的源 run;`VERIFIED` 是终态,不会再
|
|
|
49
49
|
1. 确认有 `--run` 路径(必需),且源 run 状态为 PUBLISHED
|
|
50
50
|
2. 使用插件根相对路径运行 CLI;命令调用本身即授权执行已配置的 verification gate 和 smoke process
|
|
51
51
|
3. 检查 exit code 和结构化状态:`VERIFIED`(全部通过)/ 失败(具体错误)
|
|
52
|
-
4. 只有 `VERIFIED`
|
|
52
|
+
4. 只有 `VERIFIED` 才是发布 happy end
|
|
53
|
+
5. 达到 `VERIFIED` 后立即路由 `release-finish`:先生成只读收尾清单,再按清单主动询问分支合并和本机宿主插件更新;发布策略已包含分支动作时略过合并询问
|
|
53
54
|
|
|
54
55
|
## 确定性脚本调用
|
|
55
56
|
|
|
@@ -67,6 +68,10 @@ node "$RELEASE_SKILL_ENTRY" verify --root <path> --plan <plan-path> --run <run-p
|
|
|
67
68
|
5. 对 Claude/Codex marketplace distribution 执行全新隔离消费者安装验证;收集 Kimi/CodeBuddy 的非阻塞 `manualFollowUps`
|
|
68
69
|
6. 全部通过 → `VERIFIED`
|
|
69
70
|
|
|
71
|
+
## 发布后收尾
|
|
72
|
+
|
|
73
|
+
`VERIFIED` 不代表要自动修改开发分支或本机宿主。进入 `release-finish` 后,只有用户明确同意,才执行对应的本地动作。本机插件更新失败不会改变发布终态。
|
|
74
|
+
|
|
70
75
|
## 烟雾测试
|
|
71
76
|
|
|
72
77
|
- 在 `os.tmpdir()` 创建隔离目录
|