release-skill 0.9.35 → 0.9.36

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 (53) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codebuddy-plugin/plugin.json +1 -1
  3. package/.codex-plugin/plugin.json +2 -2
  4. package/.cursor-plugin/plugin.json +1 -1
  5. package/.kimi-plugin/plugin.json +1 -1
  6. package/.qoder-plugin/plugin.json +1 -1
  7. package/CHANGELOG.md +21 -0
  8. package/INSTALL.md +2 -2
  9. package/INSTALL.zh-CN.md +2 -2
  10. package/README.md +10 -9
  11. package/README.zh-CN.md +10 -9
  12. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  13. package/adapters/claude/bin/release-skill.bundle.mjs +162 -47
  14. package/adapters/claude/schemas/.render-manifest.json +6 -2
  15. package/adapters/claude/skills/release-finish/SKILL.md +2 -2
  16. package/adapters/claude/skills/release-help/SKILL.md +1 -1
  17. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  18. package/adapters/codex/bin/release-skill.bundle.mjs +162 -47
  19. package/adapters/codex/schemas/.render-manifest.json +6 -2
  20. package/adapters/codex/skills/release-finish/SKILL.md +2 -2
  21. package/adapters/codex/skills/release-help/SKILL.md +1 -1
  22. package/adapters/cursor/.cursor-plugin/plugin.json +1 -1
  23. package/adapters/cursor/bin/release-skill.bundle.mjs +162 -47
  24. package/adapters/cursor/schemas/.render-manifest.json +6 -2
  25. package/adapters/cursor/skills/release-finish/SKILL.md +2 -2
  26. package/adapters/cursor/skills/release-help/SKILL.md +1 -1
  27. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  28. package/adapters/kimi/bin/release-skill.bundle.mjs +162 -47
  29. package/adapters/kimi/schemas/.render-manifest.json +6 -2
  30. package/adapters/kimi/skills/release-finish/SKILL.md +2 -2
  31. package/adapters/kimi/skills/release-help/SKILL.md +1 -1
  32. package/adapters/qoder/.qoder-plugin/plugin.json +1 -1
  33. package/adapters/qoder/bin/release-skill.bundle.mjs +162 -47
  34. package/adapters/qoder/schemas/.render-manifest.json +6 -2
  35. package/adapters/qoder/skills/release-finish/SKILL.md +2 -2
  36. package/adapters/qoder/skills/release-help/SKILL.md +1 -1
  37. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  38. package/adapters/workbuddy/bin/release-skill.bundle.mjs +162 -47
  39. package/adapters/workbuddy/schemas/.render-manifest.json +6 -2
  40. package/adapters/workbuddy/skills/release-finish/SKILL.md +2 -2
  41. package/adapters/workbuddy/skills/release-help/SKILL.md +1 -1
  42. package/bin/release-skill.bundle.mjs +162 -47
  43. package/package.json +1 -1
  44. package/platform-manifest.json +4 -4
  45. package/references/.render-manifest.json +2 -2
  46. package/references/02-project-config.md +3 -1
  47. package/schemas/.render-manifest.json +6 -2
  48. package/skills/release-finish/SKILL.md +2 -2
  49. package/skills/release-help/SKILL.md +1 -1
  50. package/skills-src/release-finish/SKILL.md +2 -2
  51. package/skills-src/release-help/SKILL.md +1 -1
  52. package/src/adapters/plugin-marketplace.mjs +152 -43
  53. package/src/commands/post-release-local.mjs +41 -22
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "release-skill",
3
- "version": "0.9.35",
3
+ "version": "0.9.36",
4
4
  "description": "Safe preparation and frozen GitHub/npm production publishing with full happy end verification",
5
5
  "author": {
6
6
  "name": "广州市风荷科技有限公司"
@@ -2,11 +2,11 @@
2
2
  "schemaVersion": "1.0.0",
3
3
  "platformId": "release-skill",
4
4
  "platformName": "release-skill Plugin Platform",
5
- "version": "0.9.35",
5
+ "version": "0.9.36",
6
6
  "logicalRoot": "skills-src/",
7
- "logicalRootDigest": "05adb1b81257f99a74b7736f13a174095f79b0745f4c1a5947bb7d95ee9cf8ad",
8
- "projectionDigest": "9ae26428567a5d7eaf2586626dcd503e0035205e99c3ec3c335f13b94ffa58c4",
9
- "projectionId": "release-skill:platform:0.9.35",
7
+ "logicalRootDigest": "7ea5732a23d0b214990070bb6d3d9201cb5881f29efcfb2cbe4af5dd54531272",
8
+ "projectionDigest": "1e2ae0eeb42be53db44d4e1de02aea4034a68f6aa530afc681a53f24bd4c4622",
9
+ "projectionId": "release-skill:platform:0.9.36",
10
10
  "manifestRequired": true,
11
11
  "projectionSources": {
12
12
  "skills-src-root": {
@@ -10,8 +10,8 @@
10
10
  "bytes": 16742
11
11
  },
12
12
  "02-project-config.md": {
13
- "digest": "95ef58bcf788636c2b0300955e095a050829b51f6e5b4fc1a8d618d6b8a18021",
14
- "bytes": 34314
13
+ "digest": "3e19eedbabb7e17d8afd4d9efc6a43309b7cc04e72866d44bd1afac787c8b462",
14
+ "bytes": 34998
15
15
  },
16
16
  "03-readme-quality.md": {
17
17
  "digest": "d74e41052592443ebbd450d0ace5f9b9b19c7a94db50f952b17c1c5a4c5dc230",
@@ -247,7 +247,9 @@ releaseUnits:
247
247
 
248
248
  Qoder 保持 build-only 分发边界,不新增发布计划内的 distribution 或安装检查点。本机收尾更新 Qoder 有四个前提:冻结计划已声明、用户显式选择、Hub 来源匹配、既有用户范围安装核对通过。流程不添加市场或执行首次安装。更新完成仅表示安装载荷已变更,不表示当前会话已加载新版,后续仍须重新加载或新开会话,并完成一次真实的只读业务调用。
249
249
 
250
- 冻结与安装两侧均核验原生 `.qoder-plugin/plugin.json` 与 Claude 兼容 `.claude-plugin/plugin.json`:原生清单缺失时方可启用兼容清单,原生清单存在但无效时不得回退;两清单同时存在时,均须可解析为有效对象,且 `name/version/skills` 完全一致,以原生清单为优先。安装侧结果须与冻结侧选定的相对清单路径及 `skills` 一致,不得忽略额外出现的损坏或冲突清单。写入前复验冻结快照摘要,安装后须完整比较声明载荷与冻结来源,现有 `external-marketplace-v1` 合同允许宿主额外文件,因此完整载荷比较不得替代双清单的独立核验。
250
+ 在已核对的市场安装根内,分别读取 `marketplace.json` 的 `url` 来源与 `.claude-plugin/marketplace.json` 的 `github` 来源;至少一个存在,且所有存在候选都须有效并绑定同一冻结目标。根目录来源核对 `source.url/source.sha`;兼容来源沿现有 Claude 断言核对仓库、冻结标签、提交和版本。任一损坏或冲突均拒绝,不猜测优先级。
251
+
252
+ 冻结与安装两侧均核验原生 `.qoder-plugin/plugin.json` 与 Claude 兼容 `.claude-plugin/plugin.json`:原生清单缺失时方可启用兼容清单,原生清单存在但无效时不得回退;两清单同时存在时,均须可解析为有效对象,以原生清单为优先。每个已存在候选(包括未选候选)都须核对目标 `name/version`;其 `skills` 必须为非空字符串,经 `Foundation 0.25.0` 的 `resolveContained` 解析为根内真实目录。跨候选只比较 `name/version`,允许各自合法 `skills` 不同;原生正常不能遮蔽兼容无效。安装侧结果须与冻结侧选定的相对清单路径及 `skills` 一致,不得忽略额外出现的损坏或冲突清单。写入前复验冻结快照摘要,安装后须完整比较声明载荷与冻结来源,现有 `external-marketplace-v1` 合同允许宿主额外文件,因此完整载荷比较不得替代双清单的独立核验。
251
253
 
252
254
  0.9.21 起,同一声明也能执行 Claude、Codex、Kimi、CodeBuddy 和 WorkBuddy 的本机更新,无需恢复旧宿主 distribution。插件仓库、标签、提交和快照摘要必须来自冻结 unit 与对应标签动作。Claude、Codex 和 CodeBuddy 家族使用已有同源 Hub 市场;刷新前后分别核对宿主专用条目,安装后比较完整冻结载荷。CodeBuddy/WorkBuddy 只升级已有插件,并在插件写入前再次确认 Hub 分支未漂移。Kimi 直接使用冻结 GitHub Release 和终端交互,其只有仓库 URL 的 Hub 文件不承担标签或提交证明。启动进程保留三个代理变量 `http_proxy`、`https_proxy`、`all_proxy`。
253
255
 
@@ -17,6 +17,10 @@
17
17
  "digest": "86c9cab024ebe9c7f8ec3358fcc12d05b8ed246ab59da2b0acc6a517f31274ea",
18
18
  "bytes": 2488
19
19
  },
20
+ "evidence-event-v2.schema.json": {
21
+ "digest": "693430e636afc85bf4a79e3f7bf3fb87254cbd62f2e3f35c35d6f84e5e8e0be1",
22
+ "bytes": 6058
23
+ },
20
24
  "evidence-event.schema.json": {
21
25
  "digest": "b7e14522a5aba818cab191545f23d2323be0e4c80566e9d3e4da576103a00490",
22
26
  "bytes": 2390
@@ -34,8 +38,8 @@
34
38
  "bytes": 57111
35
39
  },
36
40
  "release-run.schema.json": {
37
- "digest": "4a041b8f6488e7d61b7eb271ebdbc2e043731df41c4437783ef63e77f664c192",
38
- "bytes": 19002
41
+ "digest": "26c44ddf1ed42f266a2ddee7f6132cee94c59593e37f24359c9c48f12612ec22",
42
+ "bytes": 21874
39
43
  },
40
44
  "test-intake.schema.json": {
41
45
  "digest": "654e91ce518cb2b8aca84947d0c3bb8c4262ab047d86081e7e93dc07a9c6c739",
@@ -72,9 +72,9 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
72
72
  - Claude/Codex 的 Hub 目标只使用已经登记的同源市场。升级前先读取声明的 Hub 分支,并核对宿主专用索引中的插件仓库、标签、提交及存在的版本字段。刷新市场后再次核对实际目录和条目,再执行原有更新或重装命令。Claude 精确当前安装会离线核对真实载荷;Codex 列表不提供安装根时,仍须正式重装,从安装输出取得 `installedPath` 后核对载荷。旧安装动作继续使用冻结市场引用预检;远端不可达或引用不符时返回 `MANUAL_REQUIRED`。每个宿主单独保留结果,失败不会中断其他已选宿主。
73
73
  - Kimi 的精确当前安装会在返回 `ALREADY_CURRENT` 前核对真实载荷;发生安装或迁移时,只在操作完成后核对结果。配置根依次取显式 `kimiHome`、`KIMI_CODE_HOME`、用户主目录下的 `.kimi-code`,TUI 与安装后观察使用同一根。release-finish 当前只采用并验证 Kimi Code 的受控终端交互界面(TUI)路径,并把 TUI 工作目录固定为 `--root` 指定的当前发布项目。用户已确认冻结计划、显式选择更新且 `--hosts` 包含 `kimi` 时,流程读取完整的初始 `Trust this folder?` 对话框,要求其中只有一个正向项 `Trust this folder` 和一个选中项。正向项已经选中时不发送方向键,直接确认;已知拒绝项选中时,按它与正向项的相对位置移动一次,重新读取完整对话框并确认正向项已选中,然后才提交。插件命令发出后再次出现目录信任、界面或选中项未知、正向项缺失或重复、移动后无法确认、超时或提前退出时,该宿主失败并停止后续安装步骤。若后续 Kimi 版本出现新的可复现界面差异,先记录 Kimi 版本、可见选项、选中项及选项关系;这些事实足以唯一确认当前目录、正向信任项和选择结果时,在最近测试补回归与兼容并继续,目录身份或选项语义不明时仍停止并交回主会话。插件信任仍先清理 ANSI/OSC 控制序列和软换行,再分别核对冻结仓库与标签;只有选中 `Trust and install` 才提交并重新加载。包名、版本、发布标签、已安装修订号和受管安装根必须与冻结计划一致;`.git` 只提供附加诊断,不是通过条件。旧的本地路径安装会在同一 TUI 会话中先移除,再按发布标签安装。
74
74
  - CodeBuddy/WorkBuddy 只升级既有安装,不自动首装。CodeBuddy 仅探测全局 `codebuddy`/`cbc`,配置根固定为有效 `HOME` 下的 `.codebuddy`;WorkBuddy 仅在 macOS 探测应用内嵌 CLI,配置根固定为有效 `HOME` 下的 `.workbuddy`,两者不互作回退。Hub 目标先核对各自 `plugins/marketplaces/<hub>` 的远端和分支,再核对 `.codebuddy-plugin/marketplace.json` 条目。刷新市场后确认远端分支未漂移,才更新插件;最后核对列表中的版本、`gitCommitSha` 和 `plugins/cache/<hub>/<plugin>/<version>` 的完整载荷。旧 bundled-family 目标继续要求插件标签和市场分支均指向冻结提交。非 macOS 的 WorkBuddy 返回 `SKIPPED_UNSUPPORTED_PLATFORM`。
75
- - Qoder 首先通过 `qoder plugins marketplace list --json` 验证目标 Hub 的名称、仓库地址、分支信息及本机 checkout 状态,随后使用 `qoder plugins list --json` 核对唯一插件条目的市场归属、`scope=user`、版本号与 `installPath`。若目标市场或插件未安装,返回 `MANUAL_REQUIRED`,禁止自动添加市场或执行首次安装。对于旧版已安装情况,仅执行 `qoder plugins marketplace update <name>` 与 `qoder plugins update <plugin@marketplace> --scope user`。在市场刷新后、插件更新前,必须从 Hub 的 `marketplace.json` 中校验目标条目的 `source.url` 与 `source.sha`。
75
+ - Qoder 首先通过 `qoder plugins marketplace list --json` 验证目标 Hub 的名称、仓库地址、分支信息及本机 checkout 状态,随后使用 `qoder plugins list --json` 核对唯一插件条目的市场归属、`scope=user`、版本号与 `installPath`。若目标市场或插件未安装,返回 `MANUAL_REQUIRED`,禁止自动添加市场或执行首次安装。对于旧版已安装情况,仅执行 `qoder plugins marketplace update <name>` 与 `qoder plugins update <plugin@marketplace> --scope user`。在市场刷新后、插件更新前,必须完成以下来源核验。在已核对的市场安装根内,分别读取 `marketplace.json` 的 `url` 来源与 `.claude-plugin/marketplace.json` 的 `github` 来源;至少一个存在,且所有存在候选都须有效并绑定同一冻结目标。根目录来源核对 `source.url/source.sha`;兼容来源沿现有 Claude 断言核对仓库、冻结标签、提交和版本。任一损坏或冲突均拒绝,不猜测优先级。
76
76
 
77
- 冻结快照与真实 `installPath` 均需比对 `.qoder-plugin/plugin.json` 与 `.claude-plugin/plugin.json` 两个候选清单。仅当原生清单缺失时,方可启用兼容清单;原生清单存在但无效时不得回退。存在的清单均须可解析为有效对象,并满足插件身份与根内技能目录要求,双清单的 `name/version/skills` 必须完全一致,且以原生清单为优先。安装侧选择的相对清单路径及 `skills` 必须与冻结侧选择一致。安装侧额外出现的损坏或冲突清单不得忽略;允许宿主附加文件的 `external-marketplace-v1` 载荷完整比较,不可替代对清单的独立核验。
77
+ 冻结快照与真实 `installPath` 均需比对 `.qoder-plugin/plugin.json` 与 `.claude-plugin/plugin.json` 两个候选清单。仅当原生清单缺失时,方可启用兼容清单;原生清单存在但无效时不得回退。存在的清单均须可解析为有效对象,且以原生清单为优先。每个已存在候选(包括未选候选)都须核对目标 `name/version`;其 `skills` 必须为非空字符串,经 `Foundation 0.25.0` 的 `resolveContained` 解析为根内真实目录。跨候选只比较 `name/version`,允许各自合法 `skills` 不同;原生正常不能遮蔽兼容无效。安装侧选择的相对清单路径及 `skills` 必须与冻结侧选择一致。安装侧额外出现的损坏或冲突清单不得忽略;允许宿主附加文件的 `external-marketplace-v1` 载荷完整比较,不可替代对清单的独立核验。
78
78
 
79
79
  冻结快照摘要须在宿主写入前完成复验,安装后仍需复验完整声明载荷与冻结来源;即使版本已为目标版本,也必须完成全部复验后方可返回 `ALREADY_CURRENT`。市场在检查与更新之间可能发生变更,若事后身份校验失败,报告错误,不进行自动降级、卸载或覆盖。
80
80
 
@@ -29,7 +29,7 @@ description: "Discoverable entry point for release-skill: dependency and environ
29
29
 
30
30
  治理诊断只运行 release-skill 自己的只读检查程序,不运行目标 Skill、业务脚本、构建、hook 或发布动作,也不把 `prepare`、`verify`、`release-finish` 当作静态治理入口。用户要求实际接入或发布时,把已有授权带到对应原业务入口;各入口继续执行原有确认、副作用和状态机合同。
31
31
 
32
- ## 0.9.35 能力与证据边界
32
+ ## 0.9.36 能力与证据边界
33
33
 
34
34
  四类工程材料接到现有 `release-project` 字段。公开正式材料写入 `publicFiles`(`sourceScope` / `from` / `to` / `mode`)。运行必需资源写入 `requiredPublicFiles`,必须被同一单元 `publicFiles[].to` 精确覆盖。私有正式材料与非正式运行材料不列入 `publicFiles`,需要挡住时使用 `forbiddenPaths` / `forbiddenContentPatterns`。正式不等于公开。是否进入公开快照由 `publicFiles` 是否列出决定。npm 是载荷渠道。`package.json` 的 `files` 与入口闭包和公开映射同时约束。`delivery.include` / `delivery.exclude` 只选择宿主,不是文件包含或排除。排除不得拿掉运行必需资源。互相冲突的配置必须失败关闭。
35
35
 
@@ -72,9 +72,9 @@ node "${CLAUDE_PLUGIN_ROOT}/bin/release-skill-local-finish.mjs" \
72
72
  - Claude/Codex 的 Hub 目标只使用已经登记的同源市场。升级前先读取声明的 Hub 分支,并核对宿主专用索引中的插件仓库、标签、提交及存在的版本字段。刷新市场后再次核对实际目录和条目,再执行原有更新或重装命令。Claude 精确当前安装会离线核对真实载荷;Codex 列表不提供安装根时,仍须正式重装,从安装输出取得 `installedPath` 后核对载荷。旧安装动作继续使用冻结市场引用预检;远端不可达或引用不符时返回 `MANUAL_REQUIRED`。每个宿主单独保留结果,失败不会中断其他已选宿主。
73
73
  - Kimi 的精确当前安装会在返回 `ALREADY_CURRENT` 前核对真实载荷;发生安装或迁移时,只在操作完成后核对结果。配置根依次取显式 `kimiHome`、`KIMI_CODE_HOME`、用户主目录下的 `.kimi-code`,TUI 与安装后观察使用同一根。release-finish 当前只采用并验证 Kimi Code 的受控终端交互界面(TUI)路径,并把 TUI 工作目录固定为 `--root` 指定的当前发布项目。用户已确认冻结计划、显式选择更新且 `--hosts` 包含 `kimi` 时,流程读取完整的初始 `Trust this folder?` 对话框,要求其中只有一个正向项 `Trust this folder` 和一个选中项。正向项已经选中时不发送方向键,直接确认;已知拒绝项选中时,按它与正向项的相对位置移动一次,重新读取完整对话框并确认正向项已选中,然后才提交。插件命令发出后再次出现目录信任、界面或选中项未知、正向项缺失或重复、移动后无法确认、超时或提前退出时,该宿主失败并停止后续安装步骤。若后续 Kimi 版本出现新的可复现界面差异,先记录 Kimi 版本、可见选项、选中项及选项关系;这些事实足以唯一确认当前目录、正向信任项和选择结果时,在最近测试补回归与兼容并继续,目录身份或选项语义不明时仍停止并交回主会话。插件信任仍先清理 ANSI/OSC 控制序列和软换行,再分别核对冻结仓库与标签;只有选中 `Trust and install` 才提交并重新加载。包名、版本、发布标签、已安装修订号和受管安装根必须与冻结计划一致;`.git` 只提供附加诊断,不是通过条件。旧的本地路径安装会在同一 TUI 会话中先移除,再按发布标签安装。
74
74
  - CodeBuddy/WorkBuddy 只升级既有安装,不自动首装。CodeBuddy 仅探测全局 `codebuddy`/`cbc`,配置根固定为有效 `HOME` 下的 `.codebuddy`;WorkBuddy 仅在 macOS 探测应用内嵌 CLI,配置根固定为有效 `HOME` 下的 `.workbuddy`,两者不互作回退。Hub 目标先核对各自 `plugins/marketplaces/<hub>` 的远端和分支,再核对 `.codebuddy-plugin/marketplace.json` 条目。刷新市场后确认远端分支未漂移,才更新插件;最后核对列表中的版本、`gitCommitSha` 和 `plugins/cache/<hub>/<plugin>/<version>` 的完整载荷。旧 bundled-family 目标继续要求插件标签和市场分支均指向冻结提交。非 macOS 的 WorkBuddy 返回 `SKIPPED_UNSUPPORTED_PLATFORM`。
75
- - Qoder 首先通过 `qoder plugins marketplace list --json` 验证目标 Hub 的名称、仓库地址、分支信息及本机 checkout 状态,随后使用 `qoder plugins list --json` 核对唯一插件条目的市场归属、`scope=user`、版本号与 `installPath`。若目标市场或插件未安装,返回 `MANUAL_REQUIRED`,禁止自动添加市场或执行首次安装。对于旧版已安装情况,仅执行 `qoder plugins marketplace update <name>` 与 `qoder plugins update <plugin@marketplace> --scope user`。在市场刷新后、插件更新前,必须从 Hub 的 `marketplace.json` 中校验目标条目的 `source.url` 与 `source.sha`。
75
+ - Qoder 首先通过 `qoder plugins marketplace list --json` 验证目标 Hub 的名称、仓库地址、分支信息及本机 checkout 状态,随后使用 `qoder plugins list --json` 核对唯一插件条目的市场归属、`scope=user`、版本号与 `installPath`。若目标市场或插件未安装,返回 `MANUAL_REQUIRED`,禁止自动添加市场或执行首次安装。对于旧版已安装情况,仅执行 `qoder plugins marketplace update <name>` 与 `qoder plugins update <plugin@marketplace> --scope user`。在市场刷新后、插件更新前,必须完成以下来源核验。在已核对的市场安装根内,分别读取 `marketplace.json` 的 `url` 来源与 `.claude-plugin/marketplace.json` 的 `github` 来源;至少一个存在,且所有存在候选都须有效并绑定同一冻结目标。根目录来源核对 `source.url/source.sha`;兼容来源沿现有 Claude 断言核对仓库、冻结标签、提交和版本。任一损坏或冲突均拒绝,不猜测优先级。
76
76
 
77
- 冻结快照与真实 `installPath` 均需比对 `.qoder-plugin/plugin.json` 与 `.claude-plugin/plugin.json` 两个候选清单。仅当原生清单缺失时,方可启用兼容清单;原生清单存在但无效时不得回退。存在的清单均须可解析为有效对象,并满足插件身份与根内技能目录要求,双清单的 `name/version/skills` 必须完全一致,且以原生清单为优先。安装侧选择的相对清单路径及 `skills` 必须与冻结侧选择一致。安装侧额外出现的损坏或冲突清单不得忽略;允许宿主附加文件的 `external-marketplace-v1` 载荷完整比较,不可替代对清单的独立核验。
77
+ 冻结快照与真实 `installPath` 均需比对 `.qoder-plugin/plugin.json` 与 `.claude-plugin/plugin.json` 两个候选清单。仅当原生清单缺失时,方可启用兼容清单;原生清单存在但无效时不得回退。存在的清单均须可解析为有效对象,且以原生清单为优先。每个已存在候选(包括未选候选)都须核对目标 `name/version`;其 `skills` 必须为非空字符串,经 `Foundation 0.25.0` 的 `resolveContained` 解析为根内真实目录。跨候选只比较 `name/version`,允许各自合法 `skills` 不同;原生正常不能遮蔽兼容无效。安装侧选择的相对清单路径及 `skills` 必须与冻结侧选择一致。安装侧额外出现的损坏或冲突清单不得忽略;允许宿主附加文件的 `external-marketplace-v1` 载荷完整比较,不可替代对清单的独立核验。
78
78
 
79
79
  冻结快照摘要须在宿主写入前完成复验,安装后仍需复验完整声明载荷与冻结来源;即使版本已为目标版本,也必须完成全部复验后方可返回 `ALREADY_CURRENT`。市场在检查与更新之间可能发生变更,若事后身份校验失败,报告错误,不进行自动降级、卸载或覆盖。
80
80
 
@@ -29,7 +29,7 @@ description: "Discoverable entry point for release-skill: dependency and environ
29
29
 
30
30
  治理诊断只运行 release-skill 自己的只读检查程序,不运行目标 Skill、业务脚本、构建、hook 或发布动作,也不把 `prepare`、`verify`、`release-finish` 当作静态治理入口。用户要求实际接入或发布时,把已有授权带到对应原业务入口;各入口继续执行原有确认、副作用和状态机合同。
31
31
 
32
- ## 0.9.35 能力与证据边界
32
+ ## 0.9.36 能力与证据边界
33
33
 
34
34
  四类工程材料接到现有 `release-project` 字段。公开正式材料写入 `publicFiles`(`sourceScope` / `from` / `to` / `mode`)。运行必需资源写入 `requiredPublicFiles`,必须被同一单元 `publicFiles[].to` 精确覆盖。私有正式材料与非正式运行材料不列入 `publicFiles`,需要挡住时使用 `forbiddenPaths` / `forbiddenContentPatterns`。正式不等于公开。是否进入公开快照由 `publicFiles` 是否列出决定。npm 是载荷渠道。`package.json` 的 `files` 与入口闭包和公开映射同时约束。`delivery.include` / `delivery.exclude` 只选择宿主,不是文件包含或排除。排除不得拿掉运行必需资源。互相冲突的配置必须失败关闭。
35
35
 
@@ -823,6 +823,88 @@ export function normalizeCodeBuddySkillsRel(skillsRaw) {
823
823
  return rel;
824
824
  }
825
825
 
826
+ /**
827
+ * Resolve a Codex entry skill using the plugin manifest at the actual plugin
828
+ * root. An omitted `skills` field keeps Codex's conventional `skills/` root;
829
+ * an explicit declaration is authoritative and must be valid and present.
830
+ *
831
+ * The short-name layout keeps priority over the plugin-prefixed layout, but
832
+ * fallback is allowed only when the short-name candidate is absent. Existing
833
+ * unsafe candidates are errors and cannot be hidden by a second layout.
834
+ *
835
+ * @param {string} pluginRoot - Real plugin root derived from source or install.
836
+ * @param {string} entrySkill - Frozen entry-skill id.
837
+ * @param {string} pluginName - Frozen plugin id used by the legacy prefix.
838
+ * @returns {Promise<string>} Absolute path to a regular, non-symlink SKILL.md.
839
+ */
840
+ async function resolveCodexEntrySkillFile(pluginRoot, entrySkill, pluginName) {
841
+ const { normalizeGenericSkillsRel } = await import('../core/surface-host-bindings.mjs');
842
+ if (!entrySkill || typeof entrySkill !== 'string' || !SAFE_ID_RE.test(entrySkill)) {
843
+ throw new Error(`unsafe entrySkill: "${entrySkill}"`);
844
+ }
845
+
846
+ const platform = getPlatform('codex');
847
+ const manifestPath = await resolveContained(pluginRoot, platform.manifestPaths.plugin);
848
+ let manifest;
849
+ try {
850
+ manifest = JSON.parse(await readFile(manifestPath, 'utf8'));
851
+ } catch (err) {
852
+ throw new Error(`Codex plugin manifest cannot be read: ${err.message}`);
853
+ }
854
+ if (!manifest || typeof manifest !== 'object' || Array.isArray(manifest)) {
855
+ throw new Error('Codex plugin manifest must be an object');
856
+ }
857
+
858
+ const skillsRel = Object.hasOwn(manifest, 'skills')
859
+ ? normalizeGenericSkillsRel(manifest.skills)
860
+ : 'skills';
861
+ const skillsRoot = await resolveContained(pluginRoot, skillsRel);
862
+ let skillsRootStat;
863
+ try {
864
+ skillsRootStat = await lstat(skillsRoot);
865
+ } catch {
866
+ throw new Error(`Codex manifest skills root does not exist: ${manifest.skills ?? skillsRel}`);
867
+ }
868
+ if (skillsRootStat.isSymbolicLink() || !skillsRootStat.isDirectory()) {
869
+ throw new Error(`Codex manifest skills root must be a real directory: ${manifest.skills ?? skillsRel}`);
870
+ }
871
+
872
+ const findCandidate = async (skillDirName) => {
873
+ const skillDir = await resolveContained(pluginRoot, `${skillsRel}/${skillDirName}`);
874
+ let skillDirStat;
875
+ try {
876
+ skillDirStat = await lstat(skillDir);
877
+ } catch (err) {
878
+ if (err?.code === 'ENOENT') return null;
879
+ throw err;
880
+ }
881
+ if (skillDirStat.isSymbolicLink() || !skillDirStat.isDirectory()) {
882
+ throw new Error(`Codex entry skill directory must be a real directory: ${skillsRel}/${skillDirName}`);
883
+ }
884
+
885
+ const skillFile = await resolveContained(pluginRoot, `${skillsRel}/${skillDirName}/SKILL.md`);
886
+ let skillStat;
887
+ try {
888
+ skillStat = await lstat(skillFile);
889
+ } catch (err) {
890
+ if (err?.code === 'ENOENT') return null;
891
+ throw err;
892
+ }
893
+ if (skillStat.isSymbolicLink() || !skillStat.isFile()) {
894
+ throw new Error(`Codex entry skill must be a regular non-symlink file: ${skillsRel}/${skillDirName}/SKILL.md`);
895
+ }
896
+ return skillFile;
897
+ };
898
+
899
+ const shortNameEntry = await findCandidate(entrySkill);
900
+ if (shortNameEntry) return shortNameEntry;
901
+ if (pluginName && SAFE_ID_RE.test(pluginName)) {
902
+ const prefixedEntry = await findCandidate(`${pluginName}-${entrySkill}`);
903
+ if (prefixedEntry) return prefixedEntry;
904
+ }
905
+ throw new Error(`Codex entry skill not found: ${skillsRel}/${entrySkill}/SKILL.md`);
906
+ }
907
+
826
908
  /**
827
909
  * CodeBuddy equivalent of resolveKimiEntrySkillFile (parallel implementation,
828
910
  * codebuddy wording; the kimi helper above is intentionally left untouched).
@@ -2110,8 +2192,8 @@ export function createPluginMarketplaceAdapter(deps = {}) {
2110
2192
  // snapshot, so the snapshot marketplace-manifest section is skipped
2111
2193
  // entirely. The plugin manifest is read directly from the snapshot
2112
2194
  // root and the frozen external identity fields are validated. ref was
2113
- // already injection-checked above (step 2); the entry skill reuses the
2114
- // automatable fixed layout validated below.
2195
+ // already injection-checked above (step 2); Codex entry lookup reads
2196
+ // the plugin manifest from this snapshot root.
2115
2197
  if (
2116
2198
  typeof action.marketplaceCommitSha !== 'string'
2117
2199
  || !/^[0-9a-f]{40}$/.test(action.marketplaceCommitSha)
@@ -2315,13 +2397,10 @@ export function createPluginMarketplaceAdapter(deps = {}) {
2315
2397
  }
2316
2398
  }
2317
2399
 
2318
- // Verify the entry skill exists in the snapshot.
2319
- // Structured-cli platforms' manifests always declare ./skills/, so the
2320
- // fixed skills/<entrySkill>/SKILL.md layout is authoritative for
2321
- // them. A human-attestation platform (kimi, codebuddy) resolves the
2322
- // entry skill via the manifest-declared skills root (MAJOR-4): the
2323
- // root is validated + realpath-contained, and omitted `skills` means
2324
- // the official single-skill root SKILL.md.
2400
+ // Verify the entry skill exists in the snapshot. Kimi/CodeBuddy use
2401
+ // their existing manifest-specific rules; Codex resolves its own
2402
+ // manifest-declared skills root below. Claude keeps its established
2403
+ // conventional skills/ lookup and prefixed fallback.
2325
2404
  if (platformRoute.route === 'human-attestation') {
2326
2405
  const resolveEntrySkillFile = consumer === 'codebuddy'
2327
2406
  ? resolveCodeBuddyEntrySkillFile
@@ -2335,6 +2414,17 @@ export function createPluginMarketplaceAdapter(deps = {}) {
2335
2414
  error: `entry skill not resolvable in snapshot: ${entryErr.message}`,
2336
2415
  });
2337
2416
  }
2417
+ } else if (consumer === 'codex') {
2418
+ const pluginRootForSkill = pluginRootForEntrySkill || snapshotDirReal;
2419
+ try {
2420
+ await resolveCodexEntrySkillFile(pluginRootForSkill, action.entrySkill, action.plugin);
2421
+ } catch (entryErr) {
2422
+ return createResult({
2423
+ actionType,
2424
+ status: ActionStatus.PREFLIGHT_FAILED,
2425
+ error: `entry skill not resolvable in snapshot: ${entryErr.message}`,
2426
+ });
2427
+ }
2338
2428
  } else {
2339
2429
  // Entry skill 相对插件根解析(嵌套布局时 pluginRoot != snapshotRoot)。
2340
2430
  // pluginRootForEntrySkill 在非 external 结构化 CLI 路径中已确定;
@@ -3735,48 +3825,67 @@ export function createPluginMarketplaceAdapter(deps = {}) {
3735
3825
  }
3736
3826
 
3737
3827
  // Verify entry skill exists as a regular file in install dir.
3738
- // Prefixed skill-directory fallback (0.5.1 entry-skill-prefix fix):
3739
- // mirror the preflight resolution — `skills/<entrySkill>` first,
3740
- // then `skills/<plugin>-<entrySkill>` when the plugin is known.
3741
- let entrySkillPath = resolve(installPath, 'skills', action.entrySkill, 'SKILL.md');
3742
- let entrySkillFound = false;
3743
- try {
3744
- const skillStat = await lstat(entrySkillPath);
3745
- if (skillStat.isFile() && !skillStat.isSymbolicLink()) {
3746
- entrySkillFound = true;
3828
+ // Codex uses its actual installed plugin manifest for the skills
3829
+ // root, keeping observation aligned with frozen-source preflight.
3830
+ if (consumer === 'codex') {
3831
+ try {
3832
+ await resolveCodexEntrySkillFile(installPath, action.entrySkill, action.plugin);
3833
+ } catch (entryErr) {
3834
+ return createResult({
3835
+ actionType,
3836
+ status: ActionStatus.OBSERVED,
3837
+ observation: {
3838
+ installed: true,
3839
+ installPath,
3840
+ entrySkillFound: false,
3841
+ error: `entry skill not resolvable in installed plugin: ${entryErr.message}`,
3842
+ },
3843
+ });
3747
3844
  }
3748
- } catch {
3749
- // entry skill not found in unprefixed layout
3750
- }
3751
- if (!entrySkillFound && action.plugin) {
3752
- const prefixedPath = resolve(
3753
- installPath,
3754
- 'skills',
3755
- `${action.plugin}-${action.entrySkill}`,
3756
- 'SKILL.md',
3757
- );
3845
+ } else {
3846
+ // Prefixed skill-directory fallback (0.5.1 entry-skill-prefix fix):
3847
+ // mirror the preflight resolution — `skills/<entrySkill>` first,
3848
+ // then `skills/<plugin>-<entrySkill>` when the plugin is known.
3849
+ let entrySkillPath = resolve(installPath, 'skills', action.entrySkill, 'SKILL.md');
3850
+ let entrySkillFound = false;
3758
3851
  try {
3759
- const skillStat = await lstat(prefixedPath);
3852
+ const skillStat = await lstat(entrySkillPath);
3760
3853
  if (skillStat.isFile() && !skillStat.isSymbolicLink()) {
3761
- entrySkillPath = prefixedPath;
3762
3854
  entrySkillFound = true;
3763
3855
  }
3764
3856
  } catch {
3765
- // both layouts miss; report below
3857
+ // entry skill not found in unprefixed layout
3766
3858
  }
3767
- }
3768
-
3769
- if (!entrySkillFound) {
3770
- return createResult({
3771
- actionType,
3772
- status: ActionStatus.OBSERVED,
3773
- observation: {
3774
- installed: true,
3859
+ if (!entrySkillFound && action.plugin) {
3860
+ const prefixedPath = resolve(
3775
3861
  installPath,
3776
- entrySkillFound: false,
3777
- error: `entry skill not found: skills/${action.entrySkill}/SKILL.md`,
3778
- },
3779
- });
3862
+ 'skills',
3863
+ `${action.plugin}-${action.entrySkill}`,
3864
+ 'SKILL.md',
3865
+ );
3866
+ try {
3867
+ const skillStat = await lstat(prefixedPath);
3868
+ if (skillStat.isFile() && !skillStat.isSymbolicLink()) {
3869
+ entrySkillPath = prefixedPath;
3870
+ entrySkillFound = true;
3871
+ }
3872
+ } catch {
3873
+ // both layouts miss; report below
3874
+ }
3875
+ }
3876
+
3877
+ if (!entrySkillFound) {
3878
+ return createResult({
3879
+ actionType,
3880
+ status: ActionStatus.OBSERVED,
3881
+ observation: {
3882
+ installed: true,
3883
+ installPath,
3884
+ entrySkillFound: false,
3885
+ error: `entry skill not found: skills/${action.entrySkill}/SKILL.md`,
3886
+ },
3887
+ });
3888
+ }
3780
3889
  }
3781
3890
 
3782
3891
  // Bind the installed payload back to the sealed authority while
@@ -846,7 +846,7 @@ async function observeQoderPlugin(target, command, env, run) {
846
846
  };
847
847
  }
848
848
 
849
- async function readQoderManifest(root, label) {
849
+ async function readQoderManifest(root, label, target) {
850
850
  const candidates = [];
851
851
  for (const manifestPath of ['.qoder-plugin/plugin.json', '.claude-plugin/plugin.json']) {
852
852
  let text;
@@ -860,10 +860,11 @@ async function readQoderManifest(root, label) {
860
860
  if (!manifest || typeof manifest !== 'object' || Array.isArray(manifest)) {
861
861
  throw new Error(`${label} (${manifestPath}) did not return an object`);
862
862
  }
863
+ await assertQoderPluginManifest(target, manifest, `${label} (${manifestPath})`, root);
863
864
  candidates.push({ manifestPath, manifest });
864
865
  }
865
866
  if (candidates.length === 0) throw new Error(`${label} has no native or compatible plugin manifest`);
866
- if (candidates.length === 2 && ['name', 'version', 'skills'].some((field) => (
867
+ if (candidates.length === 2 && ['name', 'version'].some((field) => (
867
868
  candidates[0].manifest[field] !== candidates[1].manifest[field]
868
869
  ))) {
869
870
  throw new Error(`${label} does not match the frozen Qoder plugin identity and projection path: conflicting native and compatible manifests`);
@@ -894,31 +895,49 @@ async function assertFrozenQoderManifest(target, root) {
894
895
  snapshotPath: target.snapshotPath,
895
896
  expectedDigest: target.manifestDigest,
896
897
  });
897
- const { manifestPath, manifest } = await readQoderManifest(snapshotRoot, 'frozen Qoder plugin manifest');
898
+ const { manifestPath, manifest } = await readQoderManifest(snapshotRoot, 'frozen Qoder plugin manifest', target);
898
899
  const skills = await assertQoderPluginManifest(target, manifest, 'frozen Qoder plugin manifest', snapshotRoot);
899
900
  return { manifestPath, skills };
900
901
  }
901
902
 
902
903
  async function assertQoderHubEntry(target, marketplaceRoot) {
903
- const marketplace = parseJson(
904
- await readFileContained(marketplaceRoot, 'marketplace.json', { encoding: 'utf8' }),
905
- 'Qoder Hub marketplace manifest',
906
- );
907
- if (marketplace?.name !== target.marketplace || !Array.isArray(marketplace.plugins)) {
908
- throw new Error('Qoder Hub marketplace manifest does not match the frozen marketplace');
909
- }
910
- const matches = marketplace.plugins.filter((entry) => entry?.name === target.plugin);
911
- if (matches.length !== 1) {
912
- throw new Error(`Qoder Hub marketplace manifest must contain exactly one ${target.plugin} entry`);
913
- }
914
- const source = matches[0]?.source;
915
- if (
916
- source?.source !== 'url'
917
- || normalizeHubGitSource(source.url, target.hub.githubHost) !== target.pluginRepo
918
- || source.sha !== target.pluginCommit
919
- ) {
920
- throw new Error('Qoder Hub entry does not match the frozen public source identity');
904
+ let found = false;
905
+ for (const indexPath of ['marketplace.json', '.claude-plugin/marketplace.json']) {
906
+ let text;
907
+ try {
908
+ text = await readFileContained(marketplaceRoot, indexPath, { encoding: 'utf8' });
909
+ } catch (error) {
910
+ if (error?.code === 'SFC2004' && error?.details?.kind === 'missing-resource') continue;
911
+ throw error;
912
+ }
913
+ found = true;
914
+ const marketplace = parseJson(text, `Qoder Hub marketplace manifest (${indexPath})`);
915
+ if (!marketplace || typeof marketplace !== 'object' || Array.isArray(marketplace)
916
+ || marketplace.name !== target.marketplace || !Array.isArray(marketplace.plugins)) {
917
+ throw new Error('Qoder Hub marketplace manifest does not match the frozen marketplace');
918
+ }
919
+ if (indexPath === '.claude-plugin/marketplace.json') {
920
+ if (target.hub.githubHost !== 'github.com' || typeof target.frozenTag !== 'string' || target.frozenTag.length === 0) {
921
+ throw new Error('Qoder compatible Hub entry requires a frozen GitHub tag identity');
922
+ }
923
+ await assertHubHostEntry({ ...target, host: 'claude', pluginTag: target.frozenTag, githubHost: target.hub.githubHost }, marketplaceRoot);
924
+ continue;
925
+ }
926
+ const matches = marketplace.plugins.filter((entry) => entry?.name === target.plugin);
927
+ if (matches.length !== 1) {
928
+ throw new Error(`Qoder Hub marketplace manifest must contain exactly one ${target.plugin} entry`);
929
+ }
930
+ const entry = matches[0];
931
+ const source = entry.source;
932
+ if (source?.source !== 'url'
933
+ || normalizeHubGitSource(source.url, target.hub.githubHost) !== target.pluginRepo
934
+ || source.sha !== target.pluginCommit
935
+ || (entry.version !== undefined && entry.version !== target.version)
936
+ || (source.ref !== undefined && (typeof target.frozenTag !== 'string' || source.ref !== target.frozenTag))) {
937
+ throw new Error('Qoder Hub entry does not match the frozen public source identity');
938
+ }
921
939
  }
940
+ if (!found) throw new Error('Qoder Hub has no native or compatible marketplace manifest');
922
941
  }
923
942
 
924
943
  async function verifyQoderInstalledPayload({
@@ -928,7 +947,7 @@ async function verifyQoderInstalledPayload({
928
947
  frozenManifest,
929
948
  verifyInstalledPayload,
930
949
  }) {
931
- const { manifestPath, manifest } = await readQoderManifest(installPath, 'installed Qoder plugin manifest');
950
+ const { manifestPath, manifest } = await readQoderManifest(installPath, 'installed Qoder plugin manifest', target);
932
951
  if (manifestPath !== frozenManifest.manifestPath) {
933
952
  throw new Error('installed Qoder plugin manifest path differs from the frozen manifest selection');
934
953
  }