release-skill 0.9.17 → 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.
Files changed (266) 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 +10 -0
  5. package/.kimi-plugin/plugin.json +1 -1
  6. package/.qoder-plugin/plugin.json +1 -1
  7. package/CHANGELOG.md +70 -2
  8. package/INSTALL.md +66 -9
  9. package/INSTALL.zh-CN.md +49 -8
  10. package/README.md +41 -20
  11. package/README.zh-CN.md +31 -19
  12. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  13. package/adapters/claude/bin/consumer-contract-vectors.json +7 -7
  14. package/adapters/claude/bin/error-codes.json +1 -1
  15. package/adapters/claude/bin/foundation-resource-binding.json +1 -1
  16. package/adapters/claude/bin/prebuild-manifest.json +8 -4
  17. package/adapters/claude/bin/prebuilds/darwin-arm64/bound_read.darwin-arm64.node +0 -0
  18. package/adapters/claude/bin/prebuilds/darwin-x64/bound_read.darwin-x64.node +0 -0
  19. package/adapters/claude/bin/prebuilds/linux-arm64-gnu/bound_read.linux-arm64-gnu.node +0 -0
  20. package/adapters/claude/bin/prebuilds/linux-x64-gnu/bound_read.linux-x64-gnu.node +0 -0
  21. package/adapters/claude/bin/registry.json +1 -1
  22. package/adapters/claude/bin/release-skill.bundle.mjs +4425 -1519
  23. package/adapters/claude/bin/rules.json +1 -1
  24. package/adapters/claude/data/hosts/cursor/host-descriptor.json +34 -0
  25. package/adapters/claude/data/hosts/registry.json +1 -0
  26. package/adapters/claude/schemas/release-plan.schema.json +255 -25
  27. package/adapters/claude/schemas/release-project.schema.json +228 -26
  28. package/adapters/claude/skills/release-finish/SKILL.md +46 -7
  29. package/adapters/claude/skills/release-help/SKILL.md +47 -103
  30. package/adapters/claude/skills/release-verify/SKILL.md +2 -2
  31. package/adapters/claude/src/schemas/host-descriptor.schema.json +9 -2
  32. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  33. package/adapters/codex/bin/consumer-contract-vectors.json +7 -7
  34. package/adapters/codex/bin/error-codes.json +1 -1
  35. package/adapters/codex/bin/foundation-resource-binding.json +1 -1
  36. package/adapters/codex/bin/prebuild-manifest.json +8 -4
  37. package/adapters/codex/bin/prebuilds/darwin-arm64/bound_read.darwin-arm64.node +0 -0
  38. package/adapters/codex/bin/prebuilds/darwin-x64/bound_read.darwin-x64.node +0 -0
  39. package/adapters/codex/bin/prebuilds/linux-arm64-gnu/bound_read.linux-arm64-gnu.node +0 -0
  40. package/adapters/codex/bin/prebuilds/linux-x64-gnu/bound_read.linux-x64-gnu.node +0 -0
  41. package/adapters/codex/bin/registry.json +1 -1
  42. package/adapters/codex/bin/release-skill.bundle.mjs +4425 -1519
  43. package/adapters/codex/bin/rules.json +1 -1
  44. package/adapters/codex/data/hosts/cursor/host-descriptor.json +34 -0
  45. package/adapters/codex/data/hosts/registry.json +1 -0
  46. package/adapters/codex/schemas/release-plan.schema.json +255 -25
  47. package/adapters/codex/schemas/release-project.schema.json +228 -26
  48. package/adapters/codex/skills/release-finish/SKILL.md +46 -7
  49. package/adapters/codex/skills/release-help/SKILL.md +49 -105
  50. package/adapters/codex/skills/release-verify/SKILL.md +2 -2
  51. package/adapters/codex/src/schemas/host-descriptor.schema.json +9 -2
  52. package/adapters/cursor/.cursor-plugin/plugin.json +10 -0
  53. package/adapters/cursor/bin/consumer-contract-vectors.json +110 -0
  54. package/adapters/cursor/bin/error-codes.json +161 -0
  55. package/adapters/cursor/bin/foundation-legal/skill-family-contracts/LICENSE +202 -0
  56. package/adapters/cursor/bin/foundation-legal/skill-family-contracts/NOTICE +10 -0
  57. package/adapters/cursor/bin/foundation-legal/skill-family-engineering-kit/LICENSE +202 -0
  58. package/adapters/cursor/bin/foundation-legal/skill-family-engineering-kit/NOTICE +10 -0
  59. package/adapters/cursor/bin/foundation-legal/skill-family-engineering-kit/THIRD_PARTY_NOTICES +142 -0
  60. package/adapters/cursor/bin/foundation-legal/skill-family-harness-node/LICENSE +202 -0
  61. package/adapters/cursor/bin/foundation-legal/skill-family-harness-node/NOTICE +10 -0
  62. package/adapters/cursor/bin/foundation-legal/skill-family-harness-node/native-NOTICE +2 -0
  63. package/adapters/cursor/bin/foundation-resource-binding.json +1 -0
  64. package/adapters/cursor/bin/kernel-protocol.json +60 -0
  65. package/adapters/cursor/bin/license-texts/Apache-2.0.txt +201 -0
  66. package/adapters/cursor/bin/license-texts/MIT.txt +21 -0
  67. package/adapters/cursor/bin/prebuild-manifest.json +83 -0
  68. package/adapters/cursor/bin/prebuilds/darwin-arm64/bound_read.darwin-arm64.node +0 -0
  69. package/adapters/cursor/bin/prebuilds/darwin-x64/bound_read.darwin-x64.node +0 -0
  70. package/adapters/cursor/bin/prebuilds/linux-arm64-gnu/bound_read.linux-arm64-gnu.node +0 -0
  71. package/adapters/cursor/bin/prebuilds/linux-x64-gnu/bound_read.linux-x64-gnu.node +0 -0
  72. package/adapters/cursor/bin/registry.json +347 -0
  73. package/adapters/cursor/bin/release-skill-local-finish.mjs +4 -0
  74. package/adapters/cursor/bin/release-skill.bundle.mjs +152352 -0
  75. package/adapters/cursor/bin/release-skill.mjs +54 -0
  76. package/adapters/cursor/bin/rules.json +104 -0
  77. package/adapters/cursor/bin/schemas/consumer-contract-vector.schema.json +149 -0
  78. package/adapters/cursor/data/hosts/claude/host-descriptor.json +45 -0
  79. package/adapters/cursor/data/hosts/codebuddy/host-descriptor.json +26 -0
  80. package/adapters/cursor/data/hosts/codex/host-descriptor.json +45 -0
  81. package/adapters/cursor/data/hosts/cursor/host-descriptor.json +34 -0
  82. package/adapters/cursor/data/hosts/deepseek-harness/host-descriptor.json +23 -0
  83. package/adapters/cursor/data/hosts/kimi-code/host-descriptor.json +36 -0
  84. package/adapters/cursor/data/hosts/qoder/host-descriptor.json +26 -0
  85. package/adapters/cursor/data/hosts/registry.json +14 -0
  86. package/adapters/cursor/data/hosts/workbuddy/host-descriptor.json +34 -0
  87. package/adapters/cursor/data/licensing/registry.json +211 -0
  88. package/adapters/cursor/data/licensing/schema.json +207 -0
  89. package/adapters/cursor/native/safe-write/binding.gyp +41 -0
  90. package/adapters/cursor/native/safe-write/prebuilds/darwin-arm64/safe_write.node +0 -0
  91. package/adapters/cursor/native/safe-write/prebuilds.json +24 -0
  92. package/adapters/cursor/native/safe-write/src/safe_write.cc +2032 -0
  93. package/adapters/cursor/schemas/.render-manifest.json +41 -0
  94. package/adapters/cursor/schemas/approval-record.schema.json +115 -0
  95. package/adapters/cursor/schemas/artifact-lock.schema.json +111 -0
  96. package/adapters/cursor/schemas/artifact-plan.schema.json +52 -0
  97. package/adapters/cursor/schemas/artifact-policy.schema.json +76 -0
  98. package/adapters/cursor/schemas/evidence-event-v2.schema.json +164 -0
  99. package/adapters/cursor/schemas/evidence-event.schema.json +89 -0
  100. package/adapters/cursor/schemas/postpublish-approval-record.schema.json +47 -0
  101. package/adapters/cursor/schemas/release-plan.schema.json +2226 -0
  102. package/adapters/cursor/schemas/release-project.schema.json +1815 -0
  103. package/adapters/cursor/schemas/release-run.schema.json +777 -0
  104. package/adapters/cursor/skills/release-assess/SKILL.md +61 -0
  105. package/adapters/cursor/skills/release-config/SKILL.md +151 -0
  106. package/adapters/cursor/skills/release-docs/SKILL.md +120 -0
  107. package/adapters/cursor/skills/release-finish/SKILL.md +181 -0
  108. package/adapters/cursor/skills/release-help/SKILL.md +98 -0
  109. package/adapters/cursor/skills/release-marketplace/SKILL.md +157 -0
  110. package/adapters/cursor/skills/release-prepare/SKILL.md +136 -0
  111. package/adapters/cursor/skills/release-publish/SKILL.md +92 -0
  112. package/adapters/cursor/skills/release-reconcile/SKILL.md +81 -0
  113. package/adapters/cursor/skills/release-setup/SKILL.md +132 -0
  114. package/adapters/cursor/skills/release-verify/SKILL.md +110 -0
  115. package/adapters/cursor/src/schemas/adapter-build-manifest.schema.json +41 -0
  116. package/adapters/cursor/src/schemas/adapter-peer-verification-request.schema.json +54 -0
  117. package/adapters/cursor/src/schemas/adapter-peer-verification-result.schema.json +54 -0
  118. package/adapters/cursor/src/schemas/adapter-source.schema.json +47 -0
  119. package/adapters/cursor/src/schemas/audit-baseline-pin.schema.json +163 -0
  120. package/adapters/cursor/src/schemas/declared-read-surface-result.schema.json +61 -0
  121. package/adapters/cursor/src/schemas/engineering-baseline.schema.json +77 -0
  122. package/adapters/cursor/src/schemas/executable-identity-observation.schema.json +162 -0
  123. package/adapters/cursor/src/schemas/filesystem-root-binding.schema.json +14 -0
  124. package/adapters/cursor/src/schemas/filesystem-tree-observation.schema.json +71 -0
  125. package/adapters/cursor/src/schemas/fixed-set-publication-manifest.schema.json +108 -0
  126. package/adapters/cursor/src/schemas/fixed-set-publication-receipt.schema.json +148 -0
  127. package/adapters/cursor/src/schemas/host-capability-fact.schema.json +31 -0
  128. package/adapters/cursor/src/schemas/host-descriptor.schema.json +144 -0
  129. package/adapters/cursor/src/schemas/host-operation-plan.schema.json +57 -0
  130. package/adapters/cursor/src/schemas/host-operation-receipt.schema.json +81 -0
  131. package/adapters/cursor/src/schemas/host-probe-result.schema.json +30 -0
  132. package/adapters/cursor/src/schemas/host-registry.schema.json +18 -0
  133. package/adapters/cursor/src/schemas/host-verification-request.schema.json +67 -0
  134. package/adapters/cursor/src/schemas/host-verification-result.schema.json +149 -0
  135. package/adapters/cursor/src/schemas/managed-file-lock.schema.json +77 -0
  136. package/adapters/cursor/src/schemas/migration-manifest.schema.json +412 -0
  137. package/adapters/cursor/src/schemas/observation-scope.schema.json +91 -0
  138. package/adapters/cursor/src/schemas/operation-request.schema.json +58 -0
  139. package/adapters/cursor/src/schemas/operation-result.schema.json +130 -0
  140. package/adapters/cursor/src/schemas/platform-difference-registry.schema.json +110 -0
  141. package/adapters/cursor/src/schemas/plugin-verification-request.schema.json +499 -0
  142. package/adapters/cursor/src/schemas/plugin-verification-result.schema.json +1217 -0
  143. package/adapters/cursor/src/schemas/profile-adoption-declaration.schema.json +111 -0
  144. package/adapters/cursor/src/schemas/profile-descriptor.schema.json +99 -0
  145. package/adapters/cursor/src/schemas/project-manifest.schema.json +67 -0
  146. package/adapters/cursor/src/schemas/project-profile.schema.json +25 -0
  147. package/adapters/cursor/src/schemas/public-boundary-declaration.schema.json +73 -0
  148. package/adapters/cursor/src/schemas/report-binding.schema.json +42 -0
  149. package/adapters/cursor/src/schemas/report-model.schema.json +308 -0
  150. package/adapters/cursor/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
  151. package/adapters/cursor/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
  152. package/adapters/cursor/src/schemas/source-authority-receipt.schema.json +31 -0
  153. package/adapters/cursor/src/schemas/state-event-envelope.schema.json +38 -0
  154. package/adapters/cursor/src/schemas/state-snapshot-metadata.schema.json +25 -0
  155. package/adapters/cursor/src/schemas/structured-scan-policy.schema.json +97 -0
  156. package/adapters/cursor/src/schemas/surface-scan-policy.schema.json +42 -0
  157. package/adapters/cursor/src/schemas/timeout-policy.schema.json +24 -0
  158. package/adapters/cursor/src/schemas/token-estimate-record.schema.json +75 -0
  159. package/adapters/cursor/src/schemas/token-estimate-result.schema.json +43 -0
  160. package/adapters/cursor/src/schemas/watchdog-termination-envelope.schema.json +156 -0
  161. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  162. package/adapters/kimi/bin/consumer-contract-vectors.json +7 -7
  163. package/adapters/kimi/bin/error-codes.json +1 -1
  164. package/adapters/kimi/bin/foundation-resource-binding.json +1 -1
  165. package/adapters/kimi/bin/prebuild-manifest.json +8 -4
  166. package/adapters/kimi/bin/prebuilds/darwin-arm64/bound_read.darwin-arm64.node +0 -0
  167. package/adapters/kimi/bin/prebuilds/darwin-x64/bound_read.darwin-x64.node +0 -0
  168. package/adapters/kimi/bin/prebuilds/linux-arm64-gnu/bound_read.linux-arm64-gnu.node +0 -0
  169. package/adapters/kimi/bin/prebuilds/linux-x64-gnu/bound_read.linux-x64-gnu.node +0 -0
  170. package/adapters/kimi/bin/registry.json +1 -1
  171. package/adapters/kimi/bin/release-skill.bundle.mjs +4425 -1519
  172. package/adapters/kimi/bin/rules.json +1 -1
  173. package/adapters/kimi/data/hosts/cursor/host-descriptor.json +34 -0
  174. package/adapters/kimi/data/hosts/registry.json +1 -0
  175. package/adapters/kimi/schemas/release-plan.schema.json +255 -25
  176. package/adapters/kimi/schemas/release-project.schema.json +228 -26
  177. package/adapters/kimi/skills/release-finish/SKILL.md +46 -7
  178. package/adapters/kimi/skills/release-help/SKILL.md +49 -105
  179. package/adapters/kimi/skills/release-verify/SKILL.md +2 -2
  180. package/adapters/kimi/src/schemas/host-descriptor.schema.json +9 -2
  181. package/adapters/qoder/.qoder-plugin/plugin.json +1 -1
  182. package/adapters/qoder/bin/consumer-contract-vectors.json +7 -7
  183. package/adapters/qoder/bin/error-codes.json +1 -1
  184. package/adapters/qoder/bin/foundation-resource-binding.json +1 -1
  185. package/adapters/qoder/bin/prebuild-manifest.json +8 -4
  186. package/adapters/qoder/bin/prebuilds/darwin-arm64/bound_read.darwin-arm64.node +0 -0
  187. package/adapters/qoder/bin/prebuilds/darwin-x64/bound_read.darwin-x64.node +0 -0
  188. package/adapters/qoder/bin/prebuilds/linux-arm64-gnu/bound_read.linux-arm64-gnu.node +0 -0
  189. package/adapters/qoder/bin/prebuilds/linux-x64-gnu/bound_read.linux-x64-gnu.node +0 -0
  190. package/adapters/qoder/bin/registry.json +1 -1
  191. package/adapters/qoder/bin/release-skill.bundle.mjs +4425 -1519
  192. package/adapters/qoder/bin/rules.json +1 -1
  193. package/adapters/qoder/data/hosts/cursor/host-descriptor.json +34 -0
  194. package/adapters/qoder/data/hosts/registry.json +1 -0
  195. package/adapters/qoder/schemas/release-plan.schema.json +255 -25
  196. package/adapters/qoder/schemas/release-project.schema.json +228 -26
  197. package/adapters/qoder/skills/release-finish/SKILL.md +46 -7
  198. package/adapters/qoder/skills/release-help/SKILL.md +49 -105
  199. package/adapters/qoder/skills/release-verify/SKILL.md +2 -2
  200. package/adapters/qoder/src/schemas/host-descriptor.schema.json +9 -2
  201. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  202. package/adapters/workbuddy/bin/consumer-contract-vectors.json +7 -7
  203. package/adapters/workbuddy/bin/error-codes.json +1 -1
  204. package/adapters/workbuddy/bin/foundation-resource-binding.json +1 -1
  205. package/adapters/workbuddy/bin/prebuild-manifest.json +8 -4
  206. package/adapters/workbuddy/bin/prebuilds/darwin-arm64/bound_read.darwin-arm64.node +0 -0
  207. package/adapters/workbuddy/bin/prebuilds/darwin-x64/bound_read.darwin-x64.node +0 -0
  208. package/adapters/workbuddy/bin/prebuilds/linux-arm64-gnu/bound_read.linux-arm64-gnu.node +0 -0
  209. package/adapters/workbuddy/bin/prebuilds/linux-x64-gnu/bound_read.linux-x64-gnu.node +0 -0
  210. package/adapters/workbuddy/bin/registry.json +1 -1
  211. package/adapters/workbuddy/bin/release-skill.bundle.mjs +4425 -1519
  212. package/adapters/workbuddy/bin/rules.json +1 -1
  213. package/adapters/workbuddy/data/hosts/cursor/host-descriptor.json +34 -0
  214. package/adapters/workbuddy/data/hosts/registry.json +1 -0
  215. package/adapters/workbuddy/schemas/release-plan.schema.json +255 -25
  216. package/adapters/workbuddy/schemas/release-project.schema.json +228 -26
  217. package/adapters/workbuddy/skills/release-finish/SKILL.md +46 -7
  218. package/adapters/workbuddy/skills/release-help/SKILL.md +47 -103
  219. package/adapters/workbuddy/skills/release-verify/SKILL.md +2 -2
  220. package/adapters/workbuddy/src/schemas/host-descriptor.schema.json +9 -2
  221. package/bin/consumer-contract-vectors.json +7 -7
  222. package/bin/error-codes.json +1 -1
  223. package/bin/foundation-resource-binding.json +1 -1
  224. package/bin/prebuild-manifest.json +8 -4
  225. package/bin/prebuilds/darwin-arm64/bound_read.darwin-arm64.node +0 -0
  226. package/bin/prebuilds/darwin-x64/bound_read.darwin-x64.node +0 -0
  227. package/bin/prebuilds/linux-arm64-gnu/bound_read.linux-arm64-gnu.node +0 -0
  228. package/bin/prebuilds/linux-x64-gnu/bound_read.linux-x64-gnu.node +0 -0
  229. package/bin/registry.json +1 -1
  230. package/bin/release-skill-cli.mjs +115 -15
  231. package/bin/release-skill.bundle.mjs +4425 -1519
  232. package/bin/rules.json +1 -1
  233. package/data/hosts/cursor/host-descriptor.json +34 -0
  234. package/data/hosts/registry.json +1 -0
  235. package/package.json +7 -5
  236. package/platform-manifest.json +75 -9
  237. package/references/02-project-config.md +4 -0
  238. package/schemas/release-plan.schema.json +255 -25
  239. package/schemas/release-project.schema.json +228 -26
  240. package/scripts/sync-public-files.mjs +3 -22
  241. package/skills/release-finish/SKILL.md +46 -7
  242. package/skills/release-help/SKILL.md +47 -103
  243. package/skills/release-verify/SKILL.md +2 -2
  244. package/skills-src/release-finish/SKILL.md +46 -7
  245. package/skills-src/release-help/SKILL.md +47 -103
  246. package/skills-src/release-verify/SKILL.md +2 -2
  247. package/src/adapters/contract.mjs +1 -0
  248. package/src/adapters/plugin-marketplace.mjs +201 -9
  249. package/src/commands/post-release-finish.mjs +448 -0
  250. package/src/commands/post-release-local.mjs +312 -36
  251. package/src/commands/prepare.mjs +74 -9
  252. package/src/commands/publish.mjs +4 -1
  253. package/src/commands/ship.mjs +3 -0
  254. package/src/commands/verify.mjs +73 -0
  255. package/src/core/checkpoints.mjs +5 -2
  256. package/src/core/config.mjs +1 -1
  257. package/src/core/foundation-host-verification.mjs +168 -0
  258. package/src/core/plan.mjs +19 -1
  259. package/src/core/postpublish.mjs +9 -1
  260. package/src/core/run-retention.mjs +1 -1
  261. package/src/core/surface-host-bindings.mjs +1 -0
  262. package/src/core/verification-gates.mjs +1 -1
  263. package/src/platforms/registry.mjs +225 -16
  264. package/src/producers/build-adapters.mjs +21 -26
  265. package/src/producers/foundation-resource-projection.mjs +3 -3
  266. package/src/schemas/host-descriptor.schema.json +9 -2
@@ -0,0 +1,1815 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://release-skill.dev/schemas/release-project/v1",
4
+ "title": "Release Project Configuration",
5
+ "description": "Schema for .release-skill/project.yaml project configuration file",
6
+ "type": "object",
7
+ "required": [
8
+ "apiVersion",
9
+ "kind",
10
+ "project",
11
+ "releaseUnits"
12
+ ],
13
+ "additionalProperties": false,
14
+ "properties": {
15
+ "apiVersion": {
16
+ "type": "string",
17
+ "const": "release-skill/v1"
18
+ },
19
+ "kind": {
20
+ "type": "string",
21
+ "const": "ReleaseProject"
22
+ },
23
+ "project": {
24
+ "type": "object",
25
+ "required": [
26
+ "name",
27
+ "defaultBranch"
28
+ ],
29
+ "additionalProperties": false,
30
+ "properties": {
31
+ "name": {
32
+ "type": "string",
33
+ "minLength": 1
34
+ },
35
+ "defaultBranch": {
36
+ "type": "string",
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"
44
+ }
45
+ }
46
+ },
47
+ "releaseFinish": {
48
+ "type": "object",
49
+ "description": "Optional local post-release finish settings. Omitted sourceBranchCheck defaults to remind.",
50
+ "additionalProperties": false,
51
+ "properties": {
52
+ "sourceBranchCheck": {
53
+ "type": "string",
54
+ "enum": [
55
+ "remind",
56
+ "skip"
57
+ ]
58
+ },
59
+ "setupSkill": {
60
+ "type": "string",
61
+ "pattern": "^[a-z0-9][a-z0-9-]*(?::[a-z0-9][a-z0-9-]*)?$"
62
+ }
63
+ }
64
+ },
65
+ "publicSourceAuthorityReceipt": {
66
+ "type": "object",
67
+ "description": "Optional public source-authority receipt uploaded to one coordinator GitHub Release after all subject npm tarballs are frozen.",
68
+ "required": [
69
+ "coordinatorUnitId",
70
+ "subjectUnitIds"
71
+ ],
72
+ "additionalProperties": false,
73
+ "properties": {
74
+ "coordinatorUnitId": {
75
+ "type": "string",
76
+ "pattern": "^(?!\\.{1,2}$)[A-Za-z0-9][A-Za-z0-9._-]*$"
77
+ },
78
+ "subjectUnitIds": {
79
+ "type": "array",
80
+ "minItems": 1,
81
+ "uniqueItems": true,
82
+ "items": {
83
+ "type": "string",
84
+ "pattern": "^(?!\\.{1,2}$)[A-Za-z0-9][A-Za-z0-9._-]*$"
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "releaseUnits": {
90
+ "type": "array",
91
+ "minItems": 1,
92
+ "items": {
93
+ "type": "object",
94
+ "required": [
95
+ "id",
96
+ "source",
97
+ "publicRepo",
98
+ "version",
99
+ "distributions",
100
+ "publicFiles",
101
+ "requiredPublicFiles",
102
+ "previousPublicBaseline"
103
+ ],
104
+ "additionalProperties": false,
105
+ "properties": {
106
+ "id": {
107
+ "type": "string",
108
+ "minLength": 1,
109
+ "pattern": "^(?!\\.{1,2}$)[A-Za-z0-9][A-Za-z0-9._-]*$"
110
+ },
111
+ "source": {
112
+ "type": "string",
113
+ "minLength": 1,
114
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
115
+ },
116
+ "publicRepo": {
117
+ "type": "string",
118
+ "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$"
119
+ },
120
+ "production": {
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "properties": {
124
+ "githubHost": {
125
+ "type": "string",
126
+ "pattern": "^[a-zA-Z0-9.-]+$"
127
+ },
128
+ "branchTemplate": {
129
+ "type": "string",
130
+ "minLength": 1
131
+ },
132
+ "releaseTitleTemplate": {
133
+ "type": "string",
134
+ "minLength": 1
135
+ },
136
+ "releaseNotes": {
137
+ "type": "string"
138
+ },
139
+ "branchStrategy": {
140
+ "type": "string",
141
+ "enum": [
142
+ "create-release-branch",
143
+ "advance-existing-branch",
144
+ "initialize-default-branch"
145
+ ]
146
+ },
147
+ "setAsDefaultBranch": {
148
+ "type": "boolean"
149
+ },
150
+ "expectedCurrentDefaultBranch": {
151
+ "type": "string",
152
+ "minLength": 1
153
+ }
154
+ }
155
+ },
156
+ "version": {
157
+ "type": "object",
158
+ "required": [
159
+ "source",
160
+ "tagTemplate"
161
+ ],
162
+ "additionalProperties": false,
163
+ "properties": {
164
+ "source": {
165
+ "type": "string",
166
+ "minLength": 1
167
+ },
168
+ "tagTemplate": {
169
+ "type": "string",
170
+ "minLength": 1
171
+ }
172
+ }
173
+ },
174
+ "distributions": {
175
+ "type": "array",
176
+ "description": "Distribution-specific publish and consumer checks. An explicit empty array publishes only the release unit's GitHub snapshot, tag, and GitHub Release; postPublish declarations, including postVerify-phase hooks, remain independent.",
177
+ "items": {
178
+ "type": "object",
179
+ "required": [
180
+ "type"
181
+ ],
182
+ "additionalProperties": false,
183
+ "properties": {
184
+ "type": {
185
+ "type": "string",
186
+ "enum": [
187
+ "npm",
188
+ "claude-plugin",
189
+ "codex-plugin",
190
+ "kimi-plugin",
191
+ "codebuddy-plugin",
192
+ "qoder-plugin",
193
+ "cursor-plugin"
194
+ ]
195
+ },
196
+ "package": {
197
+ "type": "string",
198
+ "minLength": 1,
199
+ "maxLength": 214,
200
+ "pattern": "^(?:@[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*|[a-z0-9][a-z0-9._-]*)$"
201
+ },
202
+ "access": {
203
+ "type": "string",
204
+ "enum": [
205
+ "public",
206
+ "restricted"
207
+ ]
208
+ },
209
+ "provenance": {
210
+ "type": "boolean"
211
+ },
212
+ "tag": {
213
+ "type": "string",
214
+ "minLength": 1
215
+ },
216
+ "registry": {
217
+ "type": "string",
218
+ "minLength": 1,
219
+ "pattern": "^https://[^\\s]+$",
220
+ "description": "Normalized HTTPS URL of the npm registry"
221
+ },
222
+ "publisher": {
223
+ "type": "string",
224
+ "minLength": 1,
225
+ "pattern": "^[a-z0-9][a-z0-9._-]*$",
226
+ "description": "Expected npm whoami username for this registry"
227
+ },
228
+ "plugin": {
229
+ "type": "string",
230
+ "minLength": 1,
231
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
232
+ },
233
+ "marketplace": {
234
+ "type": "string",
235
+ "minLength": 1,
236
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
237
+ },
238
+ "marketplaceSource": {
239
+ "type": "string",
240
+ "minLength": 1,
241
+ "description": "消费者添加统一市场所用的来源 URL(如 codebuddy plugin marketplace add);可选,仅在可知时声明"
242
+ },
243
+ "marketplaceRepo": {
244
+ "type": "string",
245
+ "pattern": "^[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$",
246
+ "description": "外部独立市场仓库 owner/name;存在即启用外部市场形态"
247
+ },
248
+ "entrySkill": {
249
+ "type": "string",
250
+ "minLength": 1,
251
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
252
+ },
253
+ "smokeBin": {
254
+ "type": "string",
255
+ "minLength": 1
256
+ },
257
+ "smokeArgs": {
258
+ "type": "array",
259
+ "items": {
260
+ "type": "string"
261
+ }
262
+ },
263
+ "smokeExpectedJson": {
264
+ "type": "object"
265
+ },
266
+ "timeoutMs": {
267
+ "type": "integer",
268
+ "minimum": 30000,
269
+ "maximum": 900000,
270
+ "description": "Maximum time in milliseconds for plugin installation or host verification. Kimi Code has no scriptable install command that can pin the frozen ref, nor does CodeBuddy; for these hosts this bounds read-only observation or read-only verification only. Cursor uses this limit for its frozen single-Skill invocation."
271
+ },
272
+ "marketplaceSourceType": {
273
+ "type": "string",
274
+ "enum": [
275
+ "bundled-family",
276
+ "standalone-index"
277
+ ],
278
+ "description": "市场来源类型:bundled-family(技能族自带市场文件)或 standalone-index(独立市场仓库);每个平台每次发布只冻结一种来源"
279
+ },
280
+ "firstReleaseBootstrap": {
281
+ "type": "string",
282
+ "enum": [
283
+ "manual-index-checkpoint"
284
+ ],
285
+ "description": "首次 standalone-index 发布的人工索引停点;仅显式 opt-in 时启用"
286
+ },
287
+ "marketplaceIndexPath": {
288
+ "type": "string",
289
+ "minLength": 1,
290
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$",
291
+ "description": "Bundled marketplace index relative path override;仅插件 distribution 允许"
292
+ },
293
+ "hostVerification": {
294
+ "$ref": "#/definitions/cursorHostScenario"
295
+ }
296
+ },
297
+ "allOf": [
298
+ {
299
+ "if": {
300
+ "properties": {
301
+ "type": {
302
+ "const": "npm"
303
+ }
304
+ }
305
+ },
306
+ "then": {
307
+ "required": [
308
+ "package",
309
+ "registry",
310
+ "publisher"
311
+ ]
312
+ }
313
+ },
314
+ {
315
+ "if": {
316
+ "required": [
317
+ "timeoutMs"
318
+ ]
319
+ },
320
+ "then": {
321
+ "properties": {
322
+ "type": {
323
+ "enum": [
324
+ "claude-plugin",
325
+ "codex-plugin",
326
+ "kimi-plugin",
327
+ "codebuddy-plugin",
328
+ "qoder-plugin",
329
+ "cursor-plugin"
330
+ ]
331
+ }
332
+ }
333
+ }
334
+ },
335
+ {
336
+ "if": {
337
+ "properties": {
338
+ "type": {
339
+ "enum": [
340
+ "claude-plugin",
341
+ "codex-plugin",
342
+ "qoder-plugin"
343
+ ]
344
+ }
345
+ }
346
+ },
347
+ "then": {
348
+ "required": [
349
+ "plugin",
350
+ "marketplace",
351
+ "entrySkill"
352
+ ]
353
+ }
354
+ },
355
+ {
356
+ "if": {
357
+ "properties": {
358
+ "type": {
359
+ "const": "kimi-plugin"
360
+ }
361
+ }
362
+ },
363
+ "then": {
364
+ "required": [
365
+ "plugin",
366
+ "entrySkill"
367
+ ]
368
+ }
369
+ },
370
+ {
371
+ "if": {
372
+ "properties": {
373
+ "type": {
374
+ "const": "cursor-plugin"
375
+ }
376
+ }
377
+ },
378
+ "then": {
379
+ "required": [
380
+ "entrySkill",
381
+ "hostVerification"
382
+ ],
383
+ "not": {
384
+ "anyOf": [
385
+ {
386
+ "required": [
387
+ "marketplace"
388
+ ]
389
+ },
390
+ {
391
+ "required": [
392
+ "marketplaceSource"
393
+ ]
394
+ },
395
+ {
396
+ "required": [
397
+ "marketplaceRepo"
398
+ ]
399
+ },
400
+ {
401
+ "required": [
402
+ "marketplaceSourceType"
403
+ ]
404
+ },
405
+ {
406
+ "required": [
407
+ "marketplaceIndexPath"
408
+ ]
409
+ },
410
+ {
411
+ "required": [
412
+ "firstReleaseBootstrap"
413
+ ]
414
+ }
415
+ ]
416
+ }
417
+ }
418
+ },
419
+ {
420
+ "if": {
421
+ "properties": {
422
+ "type": {
423
+ "const": "codebuddy-plugin"
424
+ }
425
+ }
426
+ },
427
+ "then": {
428
+ "required": [
429
+ "plugin",
430
+ "marketplace",
431
+ "entrySkill"
432
+ ]
433
+ }
434
+ },
435
+ {
436
+ "if": {
437
+ "properties": {
438
+ "type": {
439
+ "enum": [
440
+ "claude-plugin",
441
+ "codex-plugin",
442
+ "kimi-plugin",
443
+ "codebuddy-plugin",
444
+ "qoder-plugin"
445
+ ]
446
+ }
447
+ }
448
+ },
449
+ "then": {
450
+ "required": [
451
+ "marketplaceSourceType"
452
+ ]
453
+ }
454
+ },
455
+ {
456
+ "if": {
457
+ "properties": {
458
+ "type": {
459
+ "enum": [
460
+ "claude-plugin",
461
+ "codex-plugin",
462
+ "kimi-plugin",
463
+ "codebuddy-plugin",
464
+ "qoder-plugin"
465
+ ]
466
+ },
467
+ "marketplaceSourceType": {
468
+ "const": "bundled-family"
469
+ }
470
+ },
471
+ "required": [
472
+ "marketplaceSourceType"
473
+ ]
474
+ },
475
+ "then": {
476
+ "not": {
477
+ "required": [
478
+ "marketplaceRepo"
479
+ ]
480
+ }
481
+ }
482
+ },
483
+ {
484
+ "if": {
485
+ "properties": {
486
+ "type": {
487
+ "enum": [
488
+ "claude-plugin",
489
+ "codex-plugin",
490
+ "kimi-plugin",
491
+ "codebuddy-plugin",
492
+ "qoder-plugin"
493
+ ]
494
+ },
495
+ "marketplaceSourceType": {
496
+ "const": "bundled-family"
497
+ }
498
+ },
499
+ "required": [
500
+ "marketplaceSourceType"
501
+ ]
502
+ },
503
+ "then": {
504
+ "not": {
505
+ "required": [
506
+ "marketplaceRepo"
507
+ ]
508
+ }
509
+ }
510
+ },
511
+ {
512
+ "if": {
513
+ "properties": {
514
+ "type": {
515
+ "enum": [
516
+ "claude-plugin",
517
+ "codex-plugin",
518
+ "kimi-plugin",
519
+ "codebuddy-plugin",
520
+ "qoder-plugin"
521
+ ]
522
+ },
523
+ "marketplaceSourceType": {
524
+ "const": "standalone-index"
525
+ }
526
+ },
527
+ "required": [
528
+ "marketplaceSourceType"
529
+ ]
530
+ },
531
+ "then": {
532
+ "required": [
533
+ "marketplaceRepo"
534
+ ]
535
+ }
536
+ },
537
+ {
538
+ "if": {
539
+ "required": [
540
+ "firstReleaseBootstrap"
541
+ ]
542
+ },
543
+ "then": {
544
+ "required": [
545
+ "marketplaceSourceType",
546
+ "marketplaceRepo"
547
+ ],
548
+ "properties": {
549
+ "type": {
550
+ "enum": [
551
+ "claude-plugin",
552
+ "codex-plugin"
553
+ ]
554
+ },
555
+ "marketplaceSourceType": {
556
+ "const": "standalone-index"
557
+ }
558
+ }
559
+ }
560
+ },
561
+ {
562
+ "if": {
563
+ "required": [
564
+ "smokeExpectedJson"
565
+ ],
566
+ "properties": {
567
+ "smokeBin": {
568
+ "minLength": 1
569
+ }
570
+ }
571
+ },
572
+ "then": {
573
+ "required": [
574
+ "smokeBin"
575
+ ]
576
+ }
577
+ },
578
+ {
579
+ "if": {
580
+ "required": [
581
+ "smokeArgs"
582
+ ],
583
+ "properties": {
584
+ "smokeBin": {
585
+ "minLength": 1
586
+ }
587
+ }
588
+ },
589
+ "then": {
590
+ "required": [
591
+ "smokeBin"
592
+ ]
593
+ }
594
+ },
595
+ {
596
+ "if": {
597
+ "required": [
598
+ "hostVerification"
599
+ ]
600
+ },
601
+ "then": {
602
+ "properties": {
603
+ "type": {
604
+ "const": "cursor-plugin"
605
+ }
606
+ }
607
+ }
608
+ }
609
+ ]
610
+ }
611
+ },
612
+ "expectedPublicSurface": {
613
+ "$ref": "#/definitions/expectedPublicSurface"
614
+ },
615
+ "publicFiles": {
616
+ "type": "array",
617
+ "minItems": 1,
618
+ "items": {
619
+ "type": "object",
620
+ "required": [
621
+ "from",
622
+ "to",
623
+ "mode"
624
+ ],
625
+ "additionalProperties": false,
626
+ "properties": {
627
+ "sourceScope": {
628
+ "type": "string",
629
+ "enum": [
630
+ "unit",
631
+ "workspace"
632
+ ],
633
+ "default": "unit"
634
+ },
635
+ "from": {
636
+ "type": "string",
637
+ "minLength": 1,
638
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
639
+ },
640
+ "to": {
641
+ "type": "string",
642
+ "minLength": 1,
643
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
644
+ },
645
+ "mode": {
646
+ "type": "string",
647
+ "enum": [
648
+ "preserve"
649
+ ]
650
+ }
651
+ }
652
+ }
653
+ },
654
+ "requiredPublicFiles": {
655
+ "type": "array",
656
+ "uniqueItems": true,
657
+ "items": {
658
+ "type": "string",
659
+ "minLength": 1,
660
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
661
+ }
662
+ },
663
+ "previousPublicBaseline": {
664
+ "type": "object",
665
+ "required": [
666
+ "mode"
667
+ ],
668
+ "additionalProperties": false,
669
+ "properties": {
670
+ "mode": {
671
+ "type": "string",
672
+ "enum": [
673
+ "none",
674
+ "bound"
675
+ ]
676
+ },
677
+ "githubHost": {
678
+ "type": "string",
679
+ "pattern": "^[a-zA-Z0-9.-]+$"
680
+ },
681
+ "repo": {
682
+ "type": "string",
683
+ "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$"
684
+ },
685
+ "ref": {
686
+ "type": "string",
687
+ "minLength": 1
688
+ },
689
+ "commit": {
690
+ "type": "string",
691
+ "pattern": "^[a-f0-9]{40,64}$"
692
+ },
693
+ "tree": {
694
+ "type": "string",
695
+ "pattern": "^[a-f0-9]{40,64}$"
696
+ },
697
+ "manifestDigest": {
698
+ "type": "string",
699
+ "pattern": "^[a-f0-9]{64}$"
700
+ }
701
+ },
702
+ "if": {
703
+ "properties": {
704
+ "mode": {
705
+ "const": "bound"
706
+ }
707
+ }
708
+ },
709
+ "then": {
710
+ "required": [
711
+ "repo",
712
+ "ref",
713
+ "commit"
714
+ ]
715
+ },
716
+ "else": {
717
+ "allOf": [
718
+ {
719
+ "not": {
720
+ "required": [
721
+ "repo"
722
+ ]
723
+ }
724
+ },
725
+ {
726
+ "not": {
727
+ "required": [
728
+ "githubHost"
729
+ ]
730
+ }
731
+ },
732
+ {
733
+ "not": {
734
+ "required": [
735
+ "ref"
736
+ ]
737
+ }
738
+ },
739
+ {
740
+ "not": {
741
+ "required": [
742
+ "commit"
743
+ ]
744
+ }
745
+ },
746
+ {
747
+ "not": {
748
+ "required": [
749
+ "tree"
750
+ ]
751
+ }
752
+ },
753
+ {
754
+ "not": {
755
+ "required": [
756
+ "manifestDigest"
757
+ ]
758
+ }
759
+ }
760
+ ]
761
+ }
762
+ },
763
+ "releaseDocuments": {
764
+ "$ref": "#/definitions/releaseDocuments"
765
+ },
766
+ "postPublish": {
767
+ "$ref": "#/definitions/postPublish"
768
+ }
769
+ },
770
+ "allOf": [
771
+ {
772
+ "if": {
773
+ "required": [
774
+ "production"
775
+ ],
776
+ "properties": {
777
+ "production": {
778
+ "required": [
779
+ "branchStrategy"
780
+ ],
781
+ "properties": {
782
+ "branchStrategy": {
783
+ "enum": [
784
+ "advance-existing-branch",
785
+ "initialize-default-branch"
786
+ ]
787
+ }
788
+ }
789
+ }
790
+ }
791
+ },
792
+ "then": {
793
+ "properties": {
794
+ "previousPublicBaseline": {
795
+ "properties": {
796
+ "mode": {
797
+ "const": "bound"
798
+ }
799
+ },
800
+ "required": [
801
+ "mode"
802
+ ]
803
+ }
804
+ }
805
+ }
806
+ },
807
+ {
808
+ "if": {
809
+ "required": [
810
+ "production"
811
+ ],
812
+ "properties": {
813
+ "production": {
814
+ "required": [
815
+ "branchStrategy"
816
+ ],
817
+ "properties": {
818
+ "branchStrategy": {
819
+ "const": "initialize-default-branch"
820
+ }
821
+ }
822
+ }
823
+ }
824
+ },
825
+ "then": {
826
+ "properties": {
827
+ "production": {
828
+ "required": [
829
+ "setAsDefaultBranch",
830
+ "expectedCurrentDefaultBranch"
831
+ ],
832
+ "properties": {
833
+ "setAsDefaultBranch": {
834
+ "const": true
835
+ }
836
+ }
837
+ }
838
+ }
839
+ }
840
+ },
841
+ {
842
+ "if": {
843
+ "required": [
844
+ "production"
845
+ ],
846
+ "properties": {
847
+ "production": {
848
+ "required": [
849
+ "setAsDefaultBranch"
850
+ ],
851
+ "properties": {
852
+ "setAsDefaultBranch": {
853
+ "const": true
854
+ }
855
+ }
856
+ }
857
+ }
858
+ },
859
+ "then": {
860
+ "properties": {
861
+ "production": {
862
+ "required": [
863
+ "branchStrategy"
864
+ ],
865
+ "properties": {
866
+ "branchStrategy": {
867
+ "const": "initialize-default-branch"
868
+ }
869
+ }
870
+ }
871
+ }
872
+ }
873
+ }
874
+ ]
875
+ }
876
+ },
877
+ "verificationGates": {
878
+ "type": "array",
879
+ "items": {
880
+ "$ref": "#/definitions/verificationGate"
881
+ }
882
+ },
883
+ "hooks": {
884
+ "type": "object",
885
+ "additionalProperties": false,
886
+ "properties": {
887
+ "docs": {
888
+ "$ref": "#/definitions/hook"
889
+ },
890
+ "build": {
891
+ "$ref": "#/definitions/hook"
892
+ },
893
+ "test": {
894
+ "$ref": "#/definitions/hook"
895
+ },
896
+ "typecheck": {
897
+ "$ref": "#/definitions/hook"
898
+ },
899
+ "lint": {
900
+ "$ref": "#/definitions/hook"
901
+ }
902
+ }
903
+ },
904
+ "policy": {
905
+ "type": "object",
906
+ "additionalProperties": false,
907
+ "properties": {
908
+ "forbiddenPaths": {
909
+ "type": "array",
910
+ "items": {
911
+ "type": "string"
912
+ }
913
+ },
914
+ "forbiddenContentPatterns": {
915
+ "type": "array",
916
+ "items": {
917
+ "type": "string"
918
+ }
919
+ },
920
+ "preHookPublicSurfaceCheck": {
921
+ "type": "boolean",
922
+ "description": "Run the ephemeral public-surface closure gate before declared hooks"
923
+ }
924
+ }
925
+ }
926
+ },
927
+ "definitions": {
928
+ "expectedPublicSurface": {
929
+ "type": "object",
930
+ "additionalProperties": false,
931
+ "required": [
932
+ "scanRoots"
933
+ ],
934
+ "properties": {
935
+ "scanRoots": {
936
+ "type": "array",
937
+ "minItems": 1,
938
+ "items": {
939
+ "$ref": "#/definitions/publicSurfaceScanRoot"
940
+ }
941
+ }
942
+ }
943
+ },
944
+ "publicSurfaceScanRoot": {
945
+ "type": "object",
946
+ "additionalProperties": false,
947
+ "required": [
948
+ "include",
949
+ "exclude"
950
+ ],
951
+ "properties": {
952
+ "sourceScope": {
953
+ "type": "string",
954
+ "enum": [
955
+ "unit",
956
+ "workspace"
957
+ ],
958
+ "default": "unit"
959
+ },
960
+ "root": {
961
+ "type": "string",
962
+ "minLength": 1,
963
+ "default": ".",
964
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
965
+ },
966
+ "include": {
967
+ "type": "array",
968
+ "minItems": 1,
969
+ "uniqueItems": true,
970
+ "items": {
971
+ "type": "string",
972
+ "minLength": 1
973
+ }
974
+ },
975
+ "exclude": {
976
+ "type": "array",
977
+ "uniqueItems": true,
978
+ "items": {
979
+ "type": "string",
980
+ "minLength": 1
981
+ }
982
+ }
983
+ }
984
+ },
985
+ "hook": {
986
+ "type": "object",
987
+ "required": [
988
+ "command"
989
+ ],
990
+ "additionalProperties": false,
991
+ "properties": {
992
+ "command": {
993
+ "type": "array",
994
+ "minItems": 1,
995
+ "items": {
996
+ "type": "string"
997
+ }
998
+ },
999
+ "cwd": {
1000
+ "type": "string",
1001
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
1002
+ },
1003
+ "timeoutMs": {
1004
+ "type": "integer",
1005
+ "minimum": 1000,
1006
+ "maximum": 7200000
1007
+ },
1008
+ "envAllowlist": {
1009
+ "type": "array",
1010
+ "items": {
1011
+ "type": "string",
1012
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
1013
+ },
1014
+ "uniqueItems": true
1015
+ },
1016
+ "cacheable": {
1017
+ "type": "boolean",
1018
+ "description": "Opt this hook into the incremental result cache: when its cacheInputs fingerprint is unchanged and the last run succeeded, prepare replays the cached outcome instead of re-executing. Absence means the hook always runs in full. cacheable=true requires a non-empty cacheInputs (enforced at runtime)."
1019
+ },
1020
+ "cacheInputs": {
1021
+ "type": "array",
1022
+ "minItems": 1,
1023
+ "items": {
1024
+ "type": "string",
1025
+ "minLength": 1
1026
+ },
1027
+ "uniqueItems": true,
1028
+ "description": "Root-relative globs declaring the hook's full input set (source, scripts, config, lockfiles). The cache key fingerprints the content of every matched file; a glob that matches nothing fails closed. Must cover ALL inputs or the cache can return a false hit."
1029
+ },
1030
+ "testSelection": {
1031
+ "type": "string",
1032
+ "enum": [
1033
+ "full",
1034
+ "incremental"
1035
+ ],
1036
+ "description": "Only meaningful for the test hook: which test selection the hook command runs. Absence or 'full' means the hook runs the full suite, which prepare's built-in full-test freeze gate requires before the plan digest is computed. 'incremental' is reserved for a future preflight mode and is rejected at freeze time ('incremental selection is not allowed at freeze time'). Built-in gate; cannot be disabled by project overlays."
1037
+ }
1038
+ }
1039
+ },
1040
+ "postPublish": {
1041
+ "type": "object",
1042
+ "description": "发布后分发声明:载荷要么由 materialize 钩子从冻结 tag 工作树物化,要么(省略 materialize 时)由冻结的 publicFiles 映射经 Foundation Engineering Kit 托管投影物化(F-06/T6);targets 将载荷镜像或渲染市场索引推送到独立 git 远端。分发在 publish 之后由 distribute 命令执行,时序契约禁止读取工作区状态。",
1043
+ "required": [
1044
+ "commitIdentity"
1045
+ ],
1046
+ "additionalProperties": false,
1047
+ "properties": {
1048
+ "materialize": {
1049
+ "$ref": "#/definitions/postPublishMaterialize"
1050
+ },
1051
+ "targets": {
1052
+ "type": "array",
1053
+ "minItems": 1,
1054
+ "items": {
1055
+ "$ref": "#/definitions/postPublishTarget"
1056
+ }
1057
+ },
1058
+ "hooks": {
1059
+ "type": "array",
1060
+ "description": "发布后钩子声明(v0.6.3 R1):每项为命名 preset(+config)或自定义 command 钩子(executable+参数数组,禁止 shell 字符串)。schema 层只校验形状;preset 与 command 互斥、preset 注册表归属等语义在运行时 fail-closed 校验(POSTPUBLISH_HOOK_INVALID)",
1061
+ "items": {
1062
+ "$ref": "#/definitions/postPublishHook"
1063
+ }
1064
+ },
1065
+ "commitIdentity": {
1066
+ "type": "object",
1067
+ "description": "分发仓库提交者身份(bot 身份),通过 git -c user.name/-c user.email 注入,绝不读取或修改全局 git 配置",
1068
+ "required": [
1069
+ "name",
1070
+ "email"
1071
+ ],
1072
+ "additionalProperties": false,
1073
+ "properties": {
1074
+ "name": {
1075
+ "type": "string",
1076
+ "minLength": 1
1077
+ },
1078
+ "email": {
1079
+ "type": "string",
1080
+ "minLength": 1
1081
+ }
1082
+ }
1083
+ },
1084
+ "steps": {
1085
+ "type": "array",
1086
+ "description": "物化之后、推送之前按序执行的只读检查步骤;任一步失败即 fail-closed",
1087
+ "items": {
1088
+ "$ref": "#/definitions/postPublishStep"
1089
+ }
1090
+ },
1091
+ "assertMainVersionAhead": {
1092
+ "type": "boolean",
1093
+ "description": "分发前校验主干版本源仍领先于目标版本,防止在已推进的主干上分发旧版本"
1094
+ },
1095
+ "executionFiles": {
1096
+ "type": "array",
1097
+ "description": "私有执行输入闭世界清单(F-01):仅列出发布后命令需要、但冻结 tag 中不存在的父工作区领域文件;辅助文件(helper)必须显式列入,执行时不做任何临时发现。每个路径经 Foundation 路径分类与受收容读取;列表排序去重后随计划冻结为 executionBundle.closure,字节发布到计划权威 .release-skill 下的摘要寻址目录。tag 中已有的文件继续由 tagCommit 绑定,不得在此声明(执行包不得覆盖 tag 文件)。路径语法只由 schema 做第一层形状检查,最终以运行时 Foundation 分类为准。",
1098
+ "items": {
1099
+ "type": "string",
1100
+ "minLength": 1,
1101
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\).+$"
1102
+ },
1103
+ "uniqueItems": true
1104
+ },
1105
+ "localHostUpdate": {
1106
+ "$ref": "#/definitions/localHostUpdate"
1107
+ }
1108
+ },
1109
+ "allOf": [
1110
+ {
1111
+ "if": {
1112
+ "required": [
1113
+ "localHostUpdate"
1114
+ ]
1115
+ },
1116
+ "then": {
1117
+ "required": [
1118
+ "hooks"
1119
+ ],
1120
+ "properties": {
1121
+ "hooks": {
1122
+ "contains": {
1123
+ "type": "object",
1124
+ "required": [
1125
+ "phase"
1126
+ ],
1127
+ "properties": {
1128
+ "phase": {
1129
+ "const": "postVerify"
1130
+ }
1131
+ }
1132
+ }
1133
+ }
1134
+ }
1135
+ }
1136
+ }
1137
+ ]
1138
+ },
1139
+ "localHostUpdate": {
1140
+ "type": "object",
1141
+ "additionalProperties": false,
1142
+ "required": [
1143
+ "plugin",
1144
+ "hosts",
1145
+ "hub"
1146
+ ],
1147
+ "properties": {
1148
+ "plugin": {
1149
+ "type": "string",
1150
+ "minLength": 1,
1151
+ "pattern": ".*\\S.*"
1152
+ },
1153
+ "hosts": {
1154
+ "type": "array",
1155
+ "minItems": 1,
1156
+ "uniqueItems": true,
1157
+ "items": {
1158
+ "type": "string",
1159
+ "enum": [
1160
+ "claude",
1161
+ "codex",
1162
+ "kimi",
1163
+ "codebuddy",
1164
+ "workbuddy",
1165
+ "qoder",
1166
+ "cursor"
1167
+ ]
1168
+ }
1169
+ },
1170
+ "hub": {
1171
+ "$ref": "#/definitions/localHostHub"
1172
+ },
1173
+ "cursor": {
1174
+ "$ref": "#/definitions/cursorLocalPlugin"
1175
+ }
1176
+ },
1177
+ "allOf": [{ "if": { "properties": { "hosts": { "contains": { "const": "cursor" } } } }, "then": { "required": ["cursor"], "properties": { "plugin": { "pattern": "^[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?$" } } }, "else": { "not": { "required": ["cursor"] } } }]
1178
+ },
1179
+ "cursorLocalPlugin": {
1180
+ "type": "object",
1181
+ "additionalProperties": false,
1182
+ "required": ["sourcePath"],
1183
+ "properties": {
1184
+ "sourcePath": { "type": "string", "pattern": "^(?!/)(?!.*\\\\)(?!.*:)(?!.*\\u0000)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)(?!.*\\/$).+$" },
1185
+ "dependencyInstall": { "const": "npm-ci-ignore-scripts" }
1186
+ }
1187
+ },
1188
+ "localHostHub": {
1189
+ "type": "object",
1190
+ "additionalProperties": false,
1191
+ "required": [
1192
+ "name",
1193
+ "repo",
1194
+ "ref"
1195
+ ],
1196
+ "properties": {
1197
+ "name": {
1198
+ "type": "string",
1199
+ "minLength": 1,
1200
+ "pattern": ".*\\S.*"
1201
+ },
1202
+ "githubHost": {
1203
+ "type": "string",
1204
+ "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?$"
1205
+ },
1206
+ "repo": {
1207
+ "type": "string",
1208
+ "pattern": "^[A-Za-z0-9._-]+\\/[A-Za-z0-9._-]+$"
1209
+ },
1210
+ "ref": {
1211
+ "type": "string",
1212
+ "pattern": "^refs\\/heads\\/[A-Za-z0-9][A-Za-z0-9._-]*(?:\\/[A-Za-z0-9][A-Za-z0-9._-]*)*$"
1213
+ }
1214
+ }
1215
+ },
1216
+ "postPublishHook": {
1217
+ "type": "object",
1218
+ "description": "发布后钩子声明项:preset(命名预设 + config)与 command(自定义命令)在运行时互斥校验;phase 缺省为 distribute(VERIFIED 之前执行),postVerify 在 verify 通过后作为独立 run 执行(R3);blocksVerified 缺省 true,仅 preset 可声明 false",
1219
+ "required": [
1220
+ "id"
1221
+ ],
1222
+ "additionalProperties": false,
1223
+ "properties": {
1224
+ "id": {
1225
+ "type": "string",
1226
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
1227
+ },
1228
+ "preset": {
1229
+ "type": "string",
1230
+ "pattern": "^[a-z0-9][a-z0-9._-]*$",
1231
+ "description": "预设注册表中的预设名(R2 起);R1 无注册表,任何 preset 引用在运行时 fail-closed"
1232
+ },
1233
+ "command": {
1234
+ "type": "array",
1235
+ "minItems": 1,
1236
+ "items": {
1237
+ "type": "string"
1238
+ },
1239
+ "description": "executable+参数数组(禁止 shell 字符串);在冻结 tag 工作树中执行"
1240
+ },
1241
+ "phase": {
1242
+ "type": "string",
1243
+ "enum": [
1244
+ "distribute",
1245
+ "postVerify"
1246
+ ],
1247
+ "description": "执行阶段;缺省 distribute"
1248
+ },
1249
+ "config": {
1250
+ "type": "object",
1251
+ "description": "preset 钩子的配置对象;语义由预设注册表校验(R2 起)"
1252
+ },
1253
+ "cwd": {
1254
+ "type": "string",
1255
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$",
1256
+ "description": "command 钩子执行目录(相对冻结 tag 工作树);preset 钩子禁止声明(运行时 fail-closed)"
1257
+ },
1258
+ "timeoutMs": {
1259
+ "type": "integer",
1260
+ "minimum": 1000,
1261
+ "maximum": 7200000
1262
+ },
1263
+ "envAllowlist": {
1264
+ "type": "array",
1265
+ "items": {
1266
+ "type": "string",
1267
+ "pattern": "^(?!.*(?:TOKEN|SECRET|PASSWORD|PASSPHRASE|API_KEY|CREDENTIAL))[A-Z_][A-Z0-9_]*$"
1268
+ },
1269
+ "uniqueItems": true,
1270
+ "description": "允许透传给钩子进程的环境变量白名单;TOKEN/SECRET 等敏感子串在 schema 层即被拒绝"
1271
+ },
1272
+ "requiresApproval": {
1273
+ "type": "boolean",
1274
+ "description": "执行前需要 checkpoint 级批准(绑定 planDigest + hookId);public-write preset 缺省 true"
1275
+ },
1276
+ "blocksVerified": {
1277
+ "type": "boolean",
1278
+ "description": "失败时是否阻断 VERIFIED;缺省 true;仅 preset 可声明 false(运行时 fail-closed 校验)"
1279
+ }
1280
+ }
1281
+ },
1282
+ "postPublishMaterialize": {
1283
+ "type": "object",
1284
+ "description": "载荷物化钩子:executable+参数数组(禁止 shell 字符串),stdout 中 outputMarker 行之后为载荷目录路径;可选 requireReport 对 stdout 首个 JSON 对象做字段断言",
1285
+ "required": [
1286
+ "command",
1287
+ "outputMarker"
1288
+ ],
1289
+ "additionalProperties": false,
1290
+ "properties": {
1291
+ "command": {
1292
+ "type": "array",
1293
+ "minItems": 1,
1294
+ "items": {
1295
+ "type": "string"
1296
+ }
1297
+ },
1298
+ "cwd": {
1299
+ "type": "string",
1300
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
1301
+ },
1302
+ "timeoutMs": {
1303
+ "type": "integer",
1304
+ "minimum": 1000,
1305
+ "maximum": 7200000
1306
+ },
1307
+ "envAllowlist": {
1308
+ "type": "array",
1309
+ "items": {
1310
+ "type": "string",
1311
+ "pattern": "^(?!.*(?:TOKEN|SECRET|PASSWORD|PASSPHRASE|API_KEY|CREDENTIAL))[A-Z_][A-Z0-9_]*$"
1312
+ },
1313
+ "uniqueItems": true
1314
+ },
1315
+ "outputMarker": {
1316
+ "type": "string",
1317
+ "minLength": 1,
1318
+ "description": "stdout 中标识载荷目录路径的前缀标记(如 \"isolated dir kept: \")"
1319
+ },
1320
+ "requireReport": {
1321
+ "type": "object",
1322
+ "required": [
1323
+ "parse"
1324
+ ],
1325
+ "additionalProperties": false,
1326
+ "properties": {
1327
+ "parse": {
1328
+ "const": "stdout-first-json",
1329
+ "description": "解析 stdout 中第一个完整 JSON 对象作为报告"
1330
+ },
1331
+ "equals": {
1332
+ "type": "object",
1333
+ "description": "报告字段等值断言;任一字段缺失或不等即 fail-closed"
1334
+ }
1335
+ }
1336
+ }
1337
+ }
1338
+ },
1339
+ "postPublishStep": {
1340
+ "type": "object",
1341
+ "description": "物化后按序执行的检查步骤;executable+参数数组(禁止 shell 字符串)",
1342
+ "required": [
1343
+ "name",
1344
+ "command"
1345
+ ],
1346
+ "additionalProperties": false,
1347
+ "properties": {
1348
+ "name": {
1349
+ "type": "string",
1350
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
1351
+ },
1352
+ "command": {
1353
+ "type": "array",
1354
+ "minItems": 1,
1355
+ "items": {
1356
+ "type": "string"
1357
+ }
1358
+ },
1359
+ "cwd": {
1360
+ "type": "string",
1361
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
1362
+ },
1363
+ "timeoutMs": {
1364
+ "type": "integer",
1365
+ "minimum": 1000,
1366
+ "maximum": 7200000
1367
+ },
1368
+ "envAllowlist": {
1369
+ "type": "array",
1370
+ "items": {
1371
+ "type": "string",
1372
+ "pattern": "^(?!.*(?:TOKEN|SECRET|PASSWORD|PASSPHRASE|API_KEY|CREDENTIAL))[A-Z_][A-Z0-9_]*$"
1373
+ },
1374
+ "uniqueItems": true
1375
+ }
1376
+ }
1377
+ },
1378
+ "postPublishTarget": {
1379
+ "type": "object",
1380
+ "description": "分发目标 git 远端:payload-mirror 镜像载荷,marketplace-index 渲染市场索引清单;dependsOn 语义(引用、无环)在运行时 fail-closed 校验",
1381
+ "required": [
1382
+ "id",
1383
+ "kind",
1384
+ "remoteUrl",
1385
+ "visibility",
1386
+ "branch"
1387
+ ],
1388
+ "additionalProperties": false,
1389
+ "properties": {
1390
+ "id": {
1391
+ "type": "string",
1392
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
1393
+ },
1394
+ "kind": {
1395
+ "type": "string",
1396
+ "enum": [
1397
+ "payload-mirror",
1398
+ "marketplace-index"
1399
+ ]
1400
+ },
1401
+ "remoteUrl": {
1402
+ "type": "string",
1403
+ "pattern": "^(?:https?|file)://[^@]+\\.git$",
1404
+ "description": "仅允许 http(s) 或 file(测试传输)且以 .git 结尾的远端 URL;禁止任何 userinfo(user:password@)形态——凭证只属于宿主 git credential helper。schema 只是第一道门,运行时 Git URL 策略(new URL 解析)是最终权威"
1405
+ },
1406
+ "visibility": {
1407
+ "type": "string",
1408
+ "enum": [
1409
+ "internal",
1410
+ "public"
1411
+ ]
1412
+ },
1413
+ "branch": {
1414
+ "type": "string",
1415
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]*$"
1416
+ },
1417
+ "dependsOn": {
1418
+ "type": "string",
1419
+ "pattern": "^[a-z0-9][a-z0-9._-]*$",
1420
+ "description": "消费另一目标(须为 payload-mirror)推送后的 commit sha;运行时校验引用存在且无环"
1421
+ },
1422
+ "marketplace": {
1423
+ "type": "object",
1424
+ "description": "marketplace-index 目标必填:渲染 .claude-plugin/marketplace.json 所用的市场元数据",
1425
+ "required": [
1426
+ "form",
1427
+ "name",
1428
+ "owner"
1429
+ ],
1430
+ "additionalProperties": false,
1431
+ "properties": {
1432
+ "form": {
1433
+ "type": "string",
1434
+ "enum": [
1435
+ "github",
1436
+ "url"
1437
+ ]
1438
+ },
1439
+ "name": {
1440
+ "type": "string",
1441
+ "minLength": 1
1442
+ },
1443
+ "owner": {
1444
+ "type": "string",
1445
+ "minLength": 1
1446
+ },
1447
+ "sourceRepo": {
1448
+ "type": "string",
1449
+ "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$",
1450
+ "description": "可选 owner/repo;github form 缺省时以 owner/name 组装"
1451
+ }
1452
+ }
1453
+ },
1454
+ "staticFiles": {
1455
+ "type": "array",
1456
+ "description": "随目标一起写入的静态文件(from 为源仓库相对路径,to 为目标仓库相对路径)",
1457
+ "items": {
1458
+ "type": "object",
1459
+ "required": [
1460
+ "from",
1461
+ "to"
1462
+ ],
1463
+ "additionalProperties": false,
1464
+ "properties": {
1465
+ "from": {
1466
+ "type": "string",
1467
+ "minLength": 1,
1468
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
1469
+ },
1470
+ "to": {
1471
+ "type": "string",
1472
+ "minLength": 1,
1473
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
1474
+ }
1475
+ }
1476
+ }
1477
+ }
1478
+ },
1479
+ "allOf": [
1480
+ {
1481
+ "if": {
1482
+ "properties": {
1483
+ "kind": {
1484
+ "const": "marketplace-index"
1485
+ }
1486
+ },
1487
+ "required": [
1488
+ "kind"
1489
+ ]
1490
+ },
1491
+ "then": {
1492
+ "required": [
1493
+ "marketplace"
1494
+ ]
1495
+ }
1496
+ },
1497
+ {
1498
+ "if": {
1499
+ "properties": {
1500
+ "kind": {
1501
+ "const": "payload-mirror"
1502
+ }
1503
+ },
1504
+ "required": [
1505
+ "kind"
1506
+ ]
1507
+ },
1508
+ "then": {
1509
+ "not": {
1510
+ "required": [
1511
+ "marketplace"
1512
+ ]
1513
+ }
1514
+ }
1515
+ }
1516
+ ]
1517
+ },
1518
+ "releaseDocuments": {
1519
+ "type": "object",
1520
+ "description": "Optional configuration-driven multilingual release-document refresh for one release unit. Absence preserves legacy behaviour. Lexical layer only; runtime path, locale-membership and collision checks apply additionally.",
1521
+ "required": [
1522
+ "notesSource",
1523
+ "locales",
1524
+ "changelogs",
1525
+ "readmes"
1526
+ ],
1527
+ "additionalProperties": false,
1528
+ "properties": {
1529
+ "notesSource": {
1530
+ "type": "string",
1531
+ "minLength": 1,
1532
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$)(?!.*\\{(?!version\\}))(?!.*(?<!\\{version)\\}).+\\.(?:yaml|yml|json)$"
1533
+ },
1534
+ "locales": {
1535
+ "type": "array",
1536
+ "minItems": 1,
1537
+ "uniqueItems": true,
1538
+ "items": {
1539
+ "type": "string",
1540
+ "pattern": "^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"
1541
+ }
1542
+ },
1543
+ "changelogs": {
1544
+ "type": "array",
1545
+ "minItems": 1,
1546
+ "items": {
1547
+ "$ref": "#/definitions/releaseDocumentsChangelog"
1548
+ }
1549
+ },
1550
+ "readmes": {
1551
+ "type": "array",
1552
+ "minItems": 1,
1553
+ "items": {
1554
+ "$ref": "#/definitions/releaseDocumentsReadme"
1555
+ }
1556
+ }
1557
+ }
1558
+ },
1559
+ "releaseDocumentsChangelog": {
1560
+ "type": "object",
1561
+ "required": [
1562
+ "path",
1563
+ "locale"
1564
+ ],
1565
+ "additionalProperties": false,
1566
+ "properties": {
1567
+ "path": {
1568
+ "type": "string",
1569
+ "minLength": 1,
1570
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
1571
+ },
1572
+ "locale": {
1573
+ "type": "string",
1574
+ "pattern": "^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"
1575
+ }
1576
+ }
1577
+ },
1578
+ "releaseDocumentsReadme": {
1579
+ "type": "object",
1580
+ "required": [
1581
+ "path",
1582
+ "locale",
1583
+ "regions"
1584
+ ],
1585
+ "additionalProperties": false,
1586
+ "properties": {
1587
+ "path": {
1588
+ "type": "string",
1589
+ "minLength": 1,
1590
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
1591
+ },
1592
+ "locale": {
1593
+ "type": "string",
1594
+ "pattern": "^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"
1595
+ },
1596
+ "regions": {
1597
+ "type": "array",
1598
+ "minItems": 1,
1599
+ "uniqueItems": true,
1600
+ "items": {
1601
+ "type": "string",
1602
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
1603
+ }
1604
+ },
1605
+ "versionMarkers": {
1606
+ "type": "array",
1607
+ "minItems": 1,
1608
+ "uniqueItems": true,
1609
+ "items": {
1610
+ "$ref": "#/definitions/releaseDocumentsVersionMarker"
1611
+ }
1612
+ }
1613
+ }
1614
+ },
1615
+ "releaseDocumentsVersionMarker": {
1616
+ "type": "object",
1617
+ "required": [
1618
+ "id",
1619
+ "pattern"
1620
+ ],
1621
+ "additionalProperties": false,
1622
+ "properties": {
1623
+ "id": {
1624
+ "type": "string",
1625
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
1626
+ },
1627
+ "pattern": {
1628
+ "type": "string",
1629
+ "minLength": 1
1630
+ }
1631
+ }
1632
+ },
1633
+ "verificationGate": {
1634
+ "type": "object",
1635
+ "required": [
1636
+ "id",
1637
+ "phase",
1638
+ "scope",
1639
+ "command",
1640
+ "cwd",
1641
+ "timeoutMs",
1642
+ "envAllowlist"
1643
+ ],
1644
+ "additionalProperties": false,
1645
+ "properties": {
1646
+ "id": {
1647
+ "type": "string",
1648
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
1649
+ },
1650
+ "phase": {
1651
+ "type": "string",
1652
+ "enum": [
1653
+ "snapshot-verify",
1654
+ "consumer-verify"
1655
+ ]
1656
+ },
1657
+ "scope": {
1658
+ "type": "object",
1659
+ "required": [
1660
+ "unit"
1661
+ ],
1662
+ "additionalProperties": false,
1663
+ "properties": {
1664
+ "unit": {
1665
+ "type": "string",
1666
+ "pattern": "^(?!\\.{1,2}$)[A-Za-z0-9][A-Za-z0-9._-]*$"
1667
+ },
1668
+ "distribution": {
1669
+ "type": "string",
1670
+ "enum": [
1671
+ "npm",
1672
+ "claude-plugin",
1673
+ "codex-plugin",
1674
+ "kimi-plugin",
1675
+ "codebuddy-plugin",
1676
+ "qoder-plugin"
1677
+ ]
1678
+ }
1679
+ }
1680
+ },
1681
+ "command": {
1682
+ "type": "array",
1683
+ "minItems": 1,
1684
+ "items": {
1685
+ "type": "string"
1686
+ }
1687
+ },
1688
+ "cwd": {
1689
+ "type": "string",
1690
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
1691
+ },
1692
+ "timeoutMs": {
1693
+ "type": "integer",
1694
+ "minimum": 1000,
1695
+ "maximum": 7200000
1696
+ },
1697
+ "envAllowlist": {
1698
+ "type": "array",
1699
+ "items": {
1700
+ "type": "string",
1701
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
1702
+ },
1703
+ "uniqueItems": true
1704
+ },
1705
+ "expectedJson": {
1706
+ "type": "object"
1707
+ }
1708
+ },
1709
+ "allOf": [
1710
+ {
1711
+ "if": {
1712
+ "properties": {
1713
+ "phase": {
1714
+ "const": "consumer-verify"
1715
+ }
1716
+ },
1717
+ "required": [
1718
+ "phase"
1719
+ ]
1720
+ },
1721
+ "then": {
1722
+ "properties": {
1723
+ "scope": {
1724
+ "required": [
1725
+ "unit",
1726
+ "distribution"
1727
+ ]
1728
+ }
1729
+ }
1730
+ }
1731
+ },
1732
+ {
1733
+ "if": {
1734
+ "properties": {
1735
+ "phase": {
1736
+ "const": "snapshot-verify"
1737
+ }
1738
+ },
1739
+ "required": [
1740
+ "phase"
1741
+ ]
1742
+ },
1743
+ "then": {
1744
+ "properties": {
1745
+ "scope": {
1746
+ "not": {
1747
+ "required": [
1748
+ "distribution"
1749
+ ]
1750
+ }
1751
+ }
1752
+ }
1753
+ }
1754
+ }
1755
+ ]
1756
+ },
1757
+ "cursorHostScenario": {
1758
+ "type": "object",
1759
+ "additionalProperties": false,
1760
+ "required": [
1761
+ "workloadDocument",
1762
+ "fixtureFiles",
1763
+ "protectedWorkspaceFiles",
1764
+ "platformManifest",
1765
+ "effectivePrompt",
1766
+ "expectedResult"
1767
+ ],
1768
+ "properties": {
1769
+ "workloadDocument": {
1770
+ "type": "string",
1771
+ "minLength": 1
1772
+ },
1773
+ "fixtureFiles": {
1774
+ "$ref": "#/definitions/cursorScenarioFiles"
1775
+ },
1776
+ "protectedWorkspaceFiles": {
1777
+ "$ref": "#/definitions/cursorScenarioFiles"
1778
+ },
1779
+ "platformManifest": {
1780
+ "type": "object"
1781
+ },
1782
+ "effectivePrompt": {
1783
+ "type": "string",
1784
+ "minLength": 1,
1785
+ "pattern": "^[^\\u0000]*$"
1786
+ },
1787
+ "expectedResult": {
1788
+ "type": "string"
1789
+ }
1790
+ }
1791
+ },
1792
+ "cursorScenarioFiles": {
1793
+ "type": "array",
1794
+ "minItems": 1,
1795
+ "items": {
1796
+ "type": "object",
1797
+ "additionalProperties": false,
1798
+ "required": [
1799
+ "path",
1800
+ "content"
1801
+ ],
1802
+ "properties": {
1803
+ "path": {
1804
+ "type": "string",
1805
+ "minLength": 1,
1806
+ "pattern": "^(?!/)(?!.*\\\\)(?!.*:)(?!.*\\u0000)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*(?:^|/)\\.cursor(?:/|$))(?!.*//)(?!.*\\/$).+$"
1807
+ },
1808
+ "content": {
1809
+ "type": "string"
1810
+ }
1811
+ }
1812
+ }
1813
+ }
1814
+ }
1815
+ }