release-skill 0.2.5 → 0.2.7

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.
Files changed (76) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codebuddy-plugin/plugin.json +1 -1
  4. package/.codex-plugin/plugin.json +2 -2
  5. package/.kimi-plugin/plugin.json +1 -1
  6. package/CHANGELOG.md +42 -0
  7. package/INSTALL.md +40 -16
  8. package/INSTALL.zh-CN.md +34 -12
  9. package/README.md +42 -15
  10. package/README.zh-CN.md +36 -15
  11. package/adapters/claude/.claude-plugin/marketplace.json +1 -1
  12. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  13. package/adapters/claude/bin/release-skill.bundle.mjs +2671 -1552
  14. package/adapters/claude/schemas/.render-manifest.json +6 -6
  15. package/adapters/claude/schemas/release-plan.schema.json +67 -0
  16. package/adapters/claude/schemas/release-project.schema.json +6 -0
  17. package/adapters/claude/schemas/release-run.schema.json +65 -0
  18. package/adapters/claude/skills/release-prepare/SKILL.md +5 -0
  19. package/adapters/claude/skills/release-setup/SKILL.md +10 -1
  20. package/adapters/claude/skills/release-verify/SKILL.md +4 -2
  21. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  22. package/adapters/codex/bin/release-skill.bundle.mjs +2671 -1552
  23. package/adapters/codex/schemas/.render-manifest.json +6 -6
  24. package/adapters/codex/schemas/release-plan.schema.json +67 -0
  25. package/adapters/codex/schemas/release-project.schema.json +6 -0
  26. package/adapters/codex/schemas/release-run.schema.json +65 -0
  27. package/adapters/codex/skills/release-prepare/SKILL.md +5 -0
  28. package/adapters/codex/skills/release-setup/SKILL.md +10 -1
  29. package/adapters/codex/skills/release-verify/SKILL.md +4 -2
  30. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  31. package/adapters/kimi/bin/release-skill.bundle.mjs +2671 -1552
  32. package/adapters/kimi/schemas/.render-manifest.json +6 -6
  33. package/adapters/kimi/schemas/release-plan.schema.json +67 -0
  34. package/adapters/kimi/schemas/release-project.schema.json +6 -0
  35. package/adapters/kimi/schemas/release-run.schema.json +65 -0
  36. package/adapters/kimi/skills/release-prepare/SKILL.md +5 -0
  37. package/adapters/kimi/skills/release-setup/SKILL.md +10 -1
  38. package/adapters/kimi/skills/release-verify/SKILL.md +4 -2
  39. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  40. package/adapters/workbuddy/bin/release-skill.bundle.mjs +2671 -1552
  41. package/adapters/workbuddy/schemas/.render-manifest.json +6 -6
  42. package/adapters/workbuddy/schemas/release-plan.schema.json +67 -0
  43. package/adapters/workbuddy/schemas/release-project.schema.json +6 -0
  44. package/adapters/workbuddy/schemas/release-run.schema.json +65 -0
  45. package/adapters/workbuddy/skills/release-prepare/SKILL.md +5 -0
  46. package/adapters/workbuddy/skills/release-setup/SKILL.md +10 -1
  47. package/adapters/workbuddy/skills/release-verify/SKILL.md +4 -2
  48. package/bin/release-skill.bundle.mjs +2671 -1552
  49. package/package.json +1 -1
  50. package/references/.render-manifest.json +4 -4
  51. package/references/02-project-config.md +28 -2
  52. package/references/05-evidence-and-errors.md +6 -0
  53. package/schemas/.render-manifest.json +6 -6
  54. package/schemas/release-plan.schema.json +67 -0
  55. package/schemas/release-project.schema.json +6 -0
  56. package/schemas/release-run.schema.json +65 -0
  57. package/skills/release-prepare/SKILL.md +5 -0
  58. package/skills/release-setup/SKILL.md +10 -1
  59. package/skills/release-verify/SKILL.md +4 -2
  60. package/skills-src/release-prepare/SKILL.md +5 -0
  61. package/skills-src/release-setup/SKILL.md +10 -1
  62. package/skills-src/release-verify/SKILL.md +4 -2
  63. package/src/adapters/npm.mjs +54 -2
  64. package/src/adapters/plugin-marketplace.mjs +4 -29
  65. package/src/commands/prepare.mjs +161 -4
  66. package/src/commands/publish.mjs +74 -2
  67. package/src/commands/reconcile.mjs +58 -0
  68. package/src/commands/setup.mjs +194 -0
  69. package/src/commands/verify.mjs +60 -1
  70. package/src/core/errors.mjs +12 -0
  71. package/src/core/source-authority.mjs +547 -0
  72. package/src/npm/npm-entry-closure.mjs +195 -0
  73. package/src/platforms/codebuddy.mjs +19 -11
  74. package/src/platforms/codex.mjs +18 -10
  75. package/src/platforms/kimi.mjs +26 -39
  76. package/src/snapshot/frozen.mjs +51 -19
@@ -22,16 +22,16 @@
22
22
  "bytes": 2390
23
23
  },
24
24
  "release-plan.schema.json": {
25
- "digest": "d7869cdb335618754eb787fe352c4c1775c799900f3bb926197c51359699a648",
26
- "bytes": 24088
25
+ "digest": "01c96659223918b5ce0e2d0d01d1ce5095baeb056de401babb8928add4d2a221",
26
+ "bytes": 35256
27
27
  },
28
28
  "release-project.schema.json": {
29
- "digest": "53efe202fc5e2bf63c8d846cf4d50648991163b270536c1450c4be44e45d4b93",
30
- "bytes": 25761
29
+ "digest": "a3d46be1e1e8105103a505c6d58d14f3733c8da91ab8289e097ffd259bf1cd93",
30
+ "bytes": 30982
31
31
  },
32
32
  "release-run.schema.json": {
33
- "digest": "f453845fd2aab02c7b0812b1f62fd1ab7fa37104b8e752914906551c0e8c2637",
34
- "bytes": 8959
33
+ "digest": "bf3c8fb4ca2fc078272a45a6ee6bf663fd2420a722b2f995dbaabf2635e2179e",
34
+ "bytes": 14824
35
35
  }
36
36
  }
37
37
  }
@@ -992,6 +992,73 @@
992
992
  "type": "string",
993
993
  "minLength": 1
994
994
  },
995
+ "sourceAuthority": {
996
+ "type": "object",
997
+ "description": "Source authority content closure gate binding: proves frozen source inputs exist in the workspace remote default branch",
998
+ "required": [
999
+ "sourceRepository",
1000
+ "defaultBranch",
1001
+ "entries",
1002
+ "inputDigest",
1003
+ "algorithmVersion"
1004
+ ],
1005
+ "additionalProperties": false,
1006
+ "properties": {
1007
+ "sourceRepository": {
1008
+ "type": "string",
1009
+ "minLength": 1,
1010
+ "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$",
1011
+ "description": "GitHub owner/repo of the workspace source repository"
1012
+ },
1013
+ "defaultBranch": {
1014
+ "type": "string",
1015
+ "minLength": 1,
1016
+ "description": "Workspace remote default branch name"
1017
+ },
1018
+ "entries": {
1019
+ "type": "array",
1020
+ "minItems": 1,
1021
+ "description": "Frozen workspace-relative source inputs compared with the remote default branch",
1022
+ "items": {
1023
+ "type": "object",
1024
+ "required": [
1025
+ "path",
1026
+ "digest",
1027
+ "mode"
1028
+ ],
1029
+ "additionalProperties": false,
1030
+ "properties": {
1031
+ "path": {
1032
+ "type": "string",
1033
+ "minLength": 1,
1034
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\).+$"
1035
+ },
1036
+ "digest": {
1037
+ "type": "string",
1038
+ "pattern": "^[a-f0-9]{64}$"
1039
+ },
1040
+ "mode": {
1041
+ "type": "string",
1042
+ "enum": [
1043
+ "100644",
1044
+ "100755"
1045
+ ]
1046
+ }
1047
+ }
1048
+ }
1049
+ },
1050
+ "inputDigest": {
1051
+ "type": "string",
1052
+ "pattern": "^[a-f0-9]{64}$",
1053
+ "description": "SHA-256 digest of the deterministic source-input closure"
1054
+ },
1055
+ "algorithmVersion": {
1056
+ "type": "integer",
1057
+ "minimum": 1,
1058
+ "description": "Source-input closure algorithm version"
1059
+ }
1060
+ }
1061
+ },
995
1062
  "waivers": {
996
1063
  "type": "array",
997
1064
  "items": {
@@ -35,6 +35,12 @@
35
35
  "defaultBranch": {
36
36
  "type": "string",
37
37
  "minLength": 1
38
+ },
39
+ "sourceRepository": {
40
+ "type": "string",
41
+ "minLength": 1,
42
+ "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$",
43
+ "description": "GitHub owner/repo of the workspace source repository for source authority content gate"
38
44
  }
39
45
  }
40
46
  },
@@ -227,6 +227,71 @@
227
227
  }
228
228
  }
229
229
  },
230
+ "sourceAuthorityReceipts": {
231
+ "type": "array",
232
+ "description": "Source authority content closure receipts: one per publish run proving remote content matches frozen inputs",
233
+ "items": {
234
+ "type": "object",
235
+ "required": [
236
+ "sourceRepository",
237
+ "defaultBranch",
238
+ "inputDigest",
239
+ "algorithmVersion",
240
+ "entryCount",
241
+ "planDigest",
242
+ "verifiedAt",
243
+ "result"
244
+ ],
245
+ "additionalProperties": false,
246
+ "properties": {
247
+ "sourceRepository": {
248
+ "type": "string",
249
+ "minLength": 1
250
+ },
251
+ "defaultBranch": {
252
+ "type": "string",
253
+ "minLength": 1
254
+ },
255
+ "inputDigest": {
256
+ "type": "string",
257
+ "pattern": "^[a-f0-9]{64}$"
258
+ },
259
+ "algorithmVersion": {
260
+ "type": "integer",
261
+ "minimum": 1
262
+ },
263
+ "entryCount": {
264
+ "type": "integer",
265
+ "minimum": 1
266
+ },
267
+ "planDigest": {
268
+ "type": "string",
269
+ "minLength": 1
270
+ },
271
+ "verifiedAt": {
272
+ "type": "string",
273
+ "format": "date-time"
274
+ },
275
+ "result": {
276
+ "type": "string",
277
+ "enum": [
278
+ "CONSISTENT",
279
+ "MISMATCH"
280
+ ]
281
+ },
282
+ "observedCommit": {
283
+ "type": "string",
284
+ "pattern": "^[a-f0-9]{40,64}$"
285
+ },
286
+ "mismatchedPaths": {
287
+ "type": "array",
288
+ "items": {
289
+ "type": "string"
290
+ }
291
+ }
292
+ }
293
+ }
294
+ },
230
295
  "consumerVerificationReceipts": {
231
296
  "type": "array",
232
297
  "description": "消费端验证收据,每个 marketplace action 一条记录",
@@ -36,6 +36,10 @@ description: Freeze an immutable release plan with local configuration, document
36
36
 
37
37
  若用户明确要求 GitHub+npm 生产发布,加入 `--production`。该模式还会封存独立
38
38
  Git commit/tree 和 npm tarball,并把路径、SHA/integrity、branch/tag 写入计划。
39
+ 每个 npm tarball 在计划落盘前必须静态验证 `package.json` 的具体
40
+ `bin`/`main`/`module`/`types`/`typings`/`exports` 入口均为 tarball 内普通文件;
41
+ 该门禁不依赖项目是否配置 `requiredPublicFiles` 或 `smokeBin`。通配符 exports 不做
42
+ 猜测展开;它与 fallback array 都属于首版最小边界外的阻断形态。
39
43
  每个 release unit 必须显式配置 `previousPublicBaseline`。只有确认不存在前序公开
40
44
  版本时用 `mode: none`;已有版本必须用 `mode: bound` + 精确 repo/ref/commit,并以
41
45
  `--online --production` 逐 unit 观察 ref→commit mapping。默认 observer 不下载远端
@@ -79,6 +83,7 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" prepare --root <path> --offli
79
83
  | GATE_FAILED (gate 授权) | 向用户展示 snapshot gate 命令和风险,获得授权后加 `--acknowledge-gate-side-effects` 重试 |
80
84
  | GATE_FAILED (bound + offline) | 改用 `--online --production`,不得把 unobserved-offline plan 交给 publish |
81
85
  | GATE_FAILED (前序基线漂移) | 先取得并比较实际远端内容;人工选择 merge/adopt/reject。merge/adopt 都必须把接受内容落回 human-owned 权威源,并把 `previousPublicBaseline` 更新为接受状态的精确 repo/ref/commit 后重新 online production prepare;reject 停止调查,禁止改 `mode: none` 绕过 |
86
+ | GATE_FAILED (`npm-entry-closure`) | 修复打包内容或入口声明后重新 prepare;不得用 `requiredPublicFiles`/`smokeBin` 缺省绕过 |
82
87
  | GATE_FAILED (其他) | 修复门失败原因后重试;以 CLI exit code 为准 |
83
88
  | RELEASE_DOCS_STALE | 文档相对说明源已陈旧;按详情运行只读演练,展示文件/语种/版本/摘要,经用户授权“本地发布文档写入”后执行写入,审阅提交再重新 prepare |
84
89
  | RELEASE_DOCS_INVALID / TRANSLATION_MISSING / CONFLICT / REFRESH_STALE | 修复配置/说明源/目标或重新演练取得新 `refreshDigest`;不得扩大写入范围绕过 |
@@ -14,6 +14,9 @@ description: "首次接入 release-skill:只读发现发布单元与个性化
14
14
  - 默认只读。README、slogan、CHANGELOG、业务脚本和已有配置均为人工权威内容,不得重写或覆盖。
15
15
  - 发现脚本不等于选择或授权。间接脚本以 `SIDE_EFFECTS_UNPROVEN` 排除;项目特有 hook/gate 只能人工增量注册。
16
16
  - 仓库、公开文件等证据冲突时停止自动提案,交给人工修正权威事实后重新发现。
17
+ - npm 单元只读提取 `package.json` 的具体入口和旧 `npmRequiredPackagePaths`,报告
18
+ tracked/untracked/ignored/missing/non-regular 状态与覆盖漂移;这些是人工复核候选,
19
+ 不得自动写入 `publicFiles` 或 `requiredPublicFiles`。
17
20
  - 写入只允许 create-once(仅创建一次),必须同时提供 answers 与精确 `setupDigest`;无安全原生写入能力时失败关闭。
18
21
  - Agent 的多次 shell 调用彼此独立;只能用首轮打印的会话目录绝对路径续接,不得假设变量仍存在。
19
22
 
@@ -43,7 +46,13 @@ node -e 'const fs=require("node:fs");const r=JSON.parse(fs.readFileSync(process.
43
46
  node -e 'const fs=require("node:fs");const r=JSON.parse(fs.readFileSync(process.argv[1],"utf8"));if((r.proposalConflicts??[]).length){console.error("proposal conflicts require human resolution");process.exit(2)}if(!r.recommendedAnswers){console.error("recommendedAnswers missing");process.exit(2)}fs.writeFileSync(process.argv[2],JSON.stringify(r.recommendedAnswers,null,2)+"\n",{flag:"wx",mode:0o600})' "$REPORT" "$ANSWERS"
44
47
  ```
45
48
 
46
- 若 `proposalConflicts` 非空,暂停,让用户修正仓库/映射权威事实,删除本会话目录后从第 2 步重跑,不得猜测选边。无冲突时可人工增量编辑 `answers.json`:hook 写入 `recommendedAnswers.projectConfig.hooks` 对应的 `projectConfig.hooks`;gate 写入 `verificationGates`,并把同一 id 加入 `selectedGateIds`。人工文件保持 `mode: preserve`,跨单元共享源使用 `sourceScope: workspace`。
49
+ 若 `proposalConflicts` 非空,暂停,让用户修正仓库/映射权威事实或 npm 入口候选,
50
+ 删除本会话目录后从第 2 步重跑,不得猜测选边。构建后才产生且被忽略的入口应先由
51
+ 人工确认构建流程与最终 tarball 边界,不能因为 setup 发现了路径就自动信任或纳入公开
52
+ 配置。无冲突时可人工增量编辑 `answers.json`:hook 写入
53
+ `recommendedAnswers.projectConfig.hooks` 对应的 `projectConfig.hooks`;gate 写入
54
+ `verificationGates`,并把同一 id 加入 `selectedGateIds`。人工文件保持
55
+ `mode: preserve`,跨单元共享源使用 `sourceScope: workspace`。
47
56
 
48
57
  3. 使用上一步打印的两个绝对字面量重新赋值,运行绑定 dry-run;任何人工编辑后都必须重跑本步:
49
58
 
@@ -17,7 +17,7 @@ verify 只接受 `PUBLISHED` 状态的源 run;`VERIFIED` 是终态,不会再
17
17
 
18
18
  ## 职责与边界
19
19
 
20
- 验证远端所有 action 的实际状态与冻结计划一致。执行精确 `<package>@<version>` npm 安装到隔离目录,验证包名、版本、bin 路径安全和 CLI 烟雾输出。对每个声明的 marketplace distribution 执行全新隔离消费者安装验证。
20
+ 验证远端所有 action 的实际状态与冻结计划一致。执行精确 `<package>@<version>` npm 安装到隔离目录,验证包名、版本、静态入口闭包,并在配置时验证 bin 路径安全和 CLI 烟雾输出。对每个声明的 marketplace distribution 执行全新隔离消费者安装验证。
21
21
 
22
22
  **阶段通过规则**: 只有 CLI exit code 0 和结构化状态码 `VERIFIED` 才是完整终态。
23
23
 
@@ -55,8 +55,10 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill.mjs" verify --root <path> --plan <
55
55
  - 在 `os.tmpdir()` 创建隔离目录
56
56
  - 执行 `npm install <package>@<version>` 带安全标志
57
57
  - 验证安装的 `package.json` name 和 version 精确匹配
58
+ - 无条件静态验证已安装包中具体 `bin`/`main`/`module`/`types`/`typings`/`exports`
59
+ 目标是普通文件;失败时不得写入 `VERIFIED`
58
60
  - 若配置了 `smokeBin`:验证 bin 路径安全(无逃逸、无 symlink),从精确安装根、隔离 HOME 和最小环境执行并验证输出;这会运行已安装代码,必须显式授权
59
- - 若未配置 `smokeBin`:仅安装 + name/version 检查即通过
61
+ - 若未配置 `smokeBin`:跳过运行代码,但静态入口闭包检查仍然强制执行
60
62
 
61
63
  ## 常见错误
62
64
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-skill",
3
- "version": "0.2.5",
3
+ "version": "0.2.7",
4
4
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
@@ -19,7 +19,7 @@
19
19
  ],
20
20
  "defaultPrompt": [
21
21
  "Assess this project for release readiness.",
22
- "Prepare a release plan for version 0.2.5.",
22
+ "Prepare a release plan for version 0.2.7.",
23
23
  "Help me understand the release workflow."
24
24
  ]
25
25
  }