release-skill 0.9.17 → 0.9.18

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 (257) 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 +36 -2
  8. package/INSTALL.md +56 -9
  9. package/INSTALL.zh-CN.md +41 -7
  10. package/README.md +31 -20
  11. package/README.zh-CN.md +29 -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 +3560 -1200
  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 +17 -4
  29. package/adapters/claude/skills/release-help/SKILL.md +40 -39
  30. package/adapters/claude/src/schemas/host-descriptor.schema.json +9 -2
  31. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  32. package/adapters/codex/bin/consumer-contract-vectors.json +7 -7
  33. package/adapters/codex/bin/error-codes.json +1 -1
  34. package/adapters/codex/bin/foundation-resource-binding.json +1 -1
  35. package/adapters/codex/bin/prebuild-manifest.json +8 -4
  36. package/adapters/codex/bin/prebuilds/darwin-arm64/bound_read.darwin-arm64.node +0 -0
  37. package/adapters/codex/bin/prebuilds/darwin-x64/bound_read.darwin-x64.node +0 -0
  38. package/adapters/codex/bin/prebuilds/linux-arm64-gnu/bound_read.linux-arm64-gnu.node +0 -0
  39. package/adapters/codex/bin/prebuilds/linux-x64-gnu/bound_read.linux-x64-gnu.node +0 -0
  40. package/adapters/codex/bin/registry.json +1 -1
  41. package/adapters/codex/bin/release-skill.bundle.mjs +3560 -1200
  42. package/adapters/codex/bin/rules.json +1 -1
  43. package/adapters/codex/data/hosts/cursor/host-descriptor.json +34 -0
  44. package/adapters/codex/data/hosts/registry.json +1 -0
  45. package/adapters/codex/schemas/release-plan.schema.json +255 -25
  46. package/adapters/codex/schemas/release-project.schema.json +228 -26
  47. package/adapters/codex/skills/release-finish/SKILL.md +17 -4
  48. package/adapters/codex/skills/release-help/SKILL.md +40 -39
  49. package/adapters/codex/src/schemas/host-descriptor.schema.json +9 -2
  50. package/adapters/cursor/.cursor-plugin/plugin.json +10 -0
  51. package/adapters/cursor/bin/consumer-contract-vectors.json +110 -0
  52. package/adapters/cursor/bin/error-codes.json +161 -0
  53. package/adapters/cursor/bin/foundation-legal/skill-family-contracts/LICENSE +202 -0
  54. package/adapters/cursor/bin/foundation-legal/skill-family-contracts/NOTICE +10 -0
  55. package/adapters/cursor/bin/foundation-legal/skill-family-engineering-kit/LICENSE +202 -0
  56. package/adapters/cursor/bin/foundation-legal/skill-family-engineering-kit/NOTICE +10 -0
  57. package/adapters/cursor/bin/foundation-legal/skill-family-engineering-kit/THIRD_PARTY_NOTICES +142 -0
  58. package/adapters/cursor/bin/foundation-legal/skill-family-harness-node/LICENSE +202 -0
  59. package/adapters/cursor/bin/foundation-legal/skill-family-harness-node/NOTICE +10 -0
  60. package/adapters/cursor/bin/foundation-legal/skill-family-harness-node/native-NOTICE +2 -0
  61. package/adapters/cursor/bin/foundation-resource-binding.json +1 -0
  62. package/adapters/cursor/bin/kernel-protocol.json +60 -0
  63. package/adapters/cursor/bin/license-texts/Apache-2.0.txt +201 -0
  64. package/adapters/cursor/bin/license-texts/MIT.txt +21 -0
  65. package/adapters/cursor/bin/prebuild-manifest.json +83 -0
  66. package/adapters/cursor/bin/prebuilds/darwin-arm64/bound_read.darwin-arm64.node +0 -0
  67. package/adapters/cursor/bin/prebuilds/darwin-x64/bound_read.darwin-x64.node +0 -0
  68. package/adapters/cursor/bin/prebuilds/linux-arm64-gnu/bound_read.linux-arm64-gnu.node +0 -0
  69. package/adapters/cursor/bin/prebuilds/linux-x64-gnu/bound_read.linux-x64-gnu.node +0 -0
  70. package/adapters/cursor/bin/registry.json +347 -0
  71. package/adapters/cursor/bin/release-skill-local-finish.mjs +4 -0
  72. package/adapters/cursor/bin/release-skill.bundle.mjs +151806 -0
  73. package/adapters/cursor/bin/release-skill.mjs +54 -0
  74. package/adapters/cursor/bin/rules.json +104 -0
  75. package/adapters/cursor/bin/schemas/consumer-contract-vector.schema.json +149 -0
  76. package/adapters/cursor/data/hosts/claude/host-descriptor.json +45 -0
  77. package/adapters/cursor/data/hosts/codebuddy/host-descriptor.json +26 -0
  78. package/adapters/cursor/data/hosts/codex/host-descriptor.json +45 -0
  79. package/adapters/cursor/data/hosts/cursor/host-descriptor.json +34 -0
  80. package/adapters/cursor/data/hosts/deepseek-harness/host-descriptor.json +23 -0
  81. package/adapters/cursor/data/hosts/kimi-code/host-descriptor.json +36 -0
  82. package/adapters/cursor/data/hosts/qoder/host-descriptor.json +26 -0
  83. package/adapters/cursor/data/hosts/registry.json +14 -0
  84. package/adapters/cursor/data/hosts/workbuddy/host-descriptor.json +34 -0
  85. package/adapters/cursor/data/licensing/registry.json +211 -0
  86. package/adapters/cursor/data/licensing/schema.json +207 -0
  87. package/adapters/cursor/native/safe-write/binding.gyp +41 -0
  88. package/adapters/cursor/native/safe-write/prebuilds/darwin-arm64/safe_write.node +0 -0
  89. package/adapters/cursor/native/safe-write/prebuilds.json +24 -0
  90. package/adapters/cursor/native/safe-write/src/safe_write.cc +2032 -0
  91. package/adapters/cursor/schemas/.render-manifest.json +41 -0
  92. package/adapters/cursor/schemas/approval-record.schema.json +115 -0
  93. package/adapters/cursor/schemas/artifact-lock.schema.json +111 -0
  94. package/adapters/cursor/schemas/artifact-plan.schema.json +52 -0
  95. package/adapters/cursor/schemas/artifact-policy.schema.json +76 -0
  96. package/adapters/cursor/schemas/evidence-event-v2.schema.json +164 -0
  97. package/adapters/cursor/schemas/evidence-event.schema.json +89 -0
  98. package/adapters/cursor/schemas/postpublish-approval-record.schema.json +47 -0
  99. package/adapters/cursor/schemas/release-plan.schema.json +2226 -0
  100. package/adapters/cursor/schemas/release-project.schema.json +1815 -0
  101. package/adapters/cursor/schemas/release-run.schema.json +777 -0
  102. package/adapters/cursor/skills/release-assess/SKILL.md +61 -0
  103. package/adapters/cursor/skills/release-config/SKILL.md +151 -0
  104. package/adapters/cursor/skills/release-docs/SKILL.md +120 -0
  105. package/adapters/cursor/skills/release-finish/SKILL.md +155 -0
  106. package/adapters/cursor/skills/release-help/SKILL.md +155 -0
  107. package/adapters/cursor/skills/release-marketplace/SKILL.md +157 -0
  108. package/adapters/cursor/skills/release-prepare/SKILL.md +136 -0
  109. package/adapters/cursor/skills/release-publish/SKILL.md +92 -0
  110. package/adapters/cursor/skills/release-reconcile/SKILL.md +81 -0
  111. package/adapters/cursor/skills/release-setup/SKILL.md +132 -0
  112. package/adapters/cursor/skills/release-verify/SKILL.md +110 -0
  113. package/adapters/cursor/src/schemas/adapter-build-manifest.schema.json +41 -0
  114. package/adapters/cursor/src/schemas/adapter-peer-verification-request.schema.json +54 -0
  115. package/adapters/cursor/src/schemas/adapter-peer-verification-result.schema.json +54 -0
  116. package/adapters/cursor/src/schemas/adapter-source.schema.json +47 -0
  117. package/adapters/cursor/src/schemas/audit-baseline-pin.schema.json +163 -0
  118. package/adapters/cursor/src/schemas/declared-read-surface-result.schema.json +61 -0
  119. package/adapters/cursor/src/schemas/engineering-baseline.schema.json +77 -0
  120. package/adapters/cursor/src/schemas/executable-identity-observation.schema.json +162 -0
  121. package/adapters/cursor/src/schemas/filesystem-root-binding.schema.json +14 -0
  122. package/adapters/cursor/src/schemas/filesystem-tree-observation.schema.json +71 -0
  123. package/adapters/cursor/src/schemas/fixed-set-publication-manifest.schema.json +108 -0
  124. package/adapters/cursor/src/schemas/fixed-set-publication-receipt.schema.json +148 -0
  125. package/adapters/cursor/src/schemas/host-capability-fact.schema.json +31 -0
  126. package/adapters/cursor/src/schemas/host-descriptor.schema.json +144 -0
  127. package/adapters/cursor/src/schemas/host-operation-plan.schema.json +57 -0
  128. package/adapters/cursor/src/schemas/host-operation-receipt.schema.json +81 -0
  129. package/adapters/cursor/src/schemas/host-probe-result.schema.json +30 -0
  130. package/adapters/cursor/src/schemas/host-registry.schema.json +18 -0
  131. package/adapters/cursor/src/schemas/host-verification-request.schema.json +67 -0
  132. package/adapters/cursor/src/schemas/host-verification-result.schema.json +149 -0
  133. package/adapters/cursor/src/schemas/managed-file-lock.schema.json +77 -0
  134. package/adapters/cursor/src/schemas/migration-manifest.schema.json +412 -0
  135. package/adapters/cursor/src/schemas/observation-scope.schema.json +91 -0
  136. package/adapters/cursor/src/schemas/operation-request.schema.json +58 -0
  137. package/adapters/cursor/src/schemas/operation-result.schema.json +130 -0
  138. package/adapters/cursor/src/schemas/platform-difference-registry.schema.json +110 -0
  139. package/adapters/cursor/src/schemas/plugin-verification-request.schema.json +499 -0
  140. package/adapters/cursor/src/schemas/plugin-verification-result.schema.json +1217 -0
  141. package/adapters/cursor/src/schemas/profile-adoption-declaration.schema.json +111 -0
  142. package/adapters/cursor/src/schemas/profile-descriptor.schema.json +99 -0
  143. package/adapters/cursor/src/schemas/project-manifest.schema.json +67 -0
  144. package/adapters/cursor/src/schemas/project-profile.schema.json +25 -0
  145. package/adapters/cursor/src/schemas/public-boundary-declaration.schema.json +73 -0
  146. package/adapters/cursor/src/schemas/report-binding.schema.json +42 -0
  147. package/adapters/cursor/src/schemas/report-model.schema.json +308 -0
  148. package/adapters/cursor/src/schemas/skill-family-directory-verification-request.schema.json +100 -0
  149. package/adapters/cursor/src/schemas/skill-family-directory-verification-result.schema.json +193 -0
  150. package/adapters/cursor/src/schemas/source-authority-receipt.schema.json +31 -0
  151. package/adapters/cursor/src/schemas/state-event-envelope.schema.json +38 -0
  152. package/adapters/cursor/src/schemas/state-snapshot-metadata.schema.json +25 -0
  153. package/adapters/cursor/src/schemas/structured-scan-policy.schema.json +97 -0
  154. package/adapters/cursor/src/schemas/surface-scan-policy.schema.json +42 -0
  155. package/adapters/cursor/src/schemas/timeout-policy.schema.json +24 -0
  156. package/adapters/cursor/src/schemas/token-estimate-record.schema.json +75 -0
  157. package/adapters/cursor/src/schemas/token-estimate-result.schema.json +43 -0
  158. package/adapters/cursor/src/schemas/watchdog-termination-envelope.schema.json +156 -0
  159. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  160. package/adapters/kimi/bin/consumer-contract-vectors.json +7 -7
  161. package/adapters/kimi/bin/error-codes.json +1 -1
  162. package/adapters/kimi/bin/foundation-resource-binding.json +1 -1
  163. package/adapters/kimi/bin/prebuild-manifest.json +8 -4
  164. package/adapters/kimi/bin/prebuilds/darwin-arm64/bound_read.darwin-arm64.node +0 -0
  165. package/adapters/kimi/bin/prebuilds/darwin-x64/bound_read.darwin-x64.node +0 -0
  166. package/adapters/kimi/bin/prebuilds/linux-arm64-gnu/bound_read.linux-arm64-gnu.node +0 -0
  167. package/adapters/kimi/bin/prebuilds/linux-x64-gnu/bound_read.linux-x64-gnu.node +0 -0
  168. package/adapters/kimi/bin/registry.json +1 -1
  169. package/adapters/kimi/bin/release-skill.bundle.mjs +3560 -1200
  170. package/adapters/kimi/bin/rules.json +1 -1
  171. package/adapters/kimi/data/hosts/cursor/host-descriptor.json +34 -0
  172. package/adapters/kimi/data/hosts/registry.json +1 -0
  173. package/adapters/kimi/schemas/release-plan.schema.json +255 -25
  174. package/adapters/kimi/schemas/release-project.schema.json +228 -26
  175. package/adapters/kimi/skills/release-finish/SKILL.md +17 -4
  176. package/adapters/kimi/skills/release-help/SKILL.md +40 -39
  177. package/adapters/kimi/src/schemas/host-descriptor.schema.json +9 -2
  178. package/adapters/qoder/.qoder-plugin/plugin.json +1 -1
  179. package/adapters/qoder/bin/consumer-contract-vectors.json +7 -7
  180. package/adapters/qoder/bin/error-codes.json +1 -1
  181. package/adapters/qoder/bin/foundation-resource-binding.json +1 -1
  182. package/adapters/qoder/bin/prebuild-manifest.json +8 -4
  183. package/adapters/qoder/bin/prebuilds/darwin-arm64/bound_read.darwin-arm64.node +0 -0
  184. package/adapters/qoder/bin/prebuilds/darwin-x64/bound_read.darwin-x64.node +0 -0
  185. package/adapters/qoder/bin/prebuilds/linux-arm64-gnu/bound_read.linux-arm64-gnu.node +0 -0
  186. package/adapters/qoder/bin/prebuilds/linux-x64-gnu/bound_read.linux-x64-gnu.node +0 -0
  187. package/adapters/qoder/bin/registry.json +1 -1
  188. package/adapters/qoder/bin/release-skill.bundle.mjs +3560 -1200
  189. package/adapters/qoder/bin/rules.json +1 -1
  190. package/adapters/qoder/data/hosts/cursor/host-descriptor.json +34 -0
  191. package/adapters/qoder/data/hosts/registry.json +1 -0
  192. package/adapters/qoder/schemas/release-plan.schema.json +255 -25
  193. package/adapters/qoder/schemas/release-project.schema.json +228 -26
  194. package/adapters/qoder/skills/release-finish/SKILL.md +17 -4
  195. package/adapters/qoder/skills/release-help/SKILL.md +40 -39
  196. package/adapters/qoder/src/schemas/host-descriptor.schema.json +9 -2
  197. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +1 -1
  198. package/adapters/workbuddy/bin/consumer-contract-vectors.json +7 -7
  199. package/adapters/workbuddy/bin/error-codes.json +1 -1
  200. package/adapters/workbuddy/bin/foundation-resource-binding.json +1 -1
  201. package/adapters/workbuddy/bin/prebuild-manifest.json +8 -4
  202. package/adapters/workbuddy/bin/prebuilds/darwin-arm64/bound_read.darwin-arm64.node +0 -0
  203. package/adapters/workbuddy/bin/prebuilds/darwin-x64/bound_read.darwin-x64.node +0 -0
  204. package/adapters/workbuddy/bin/prebuilds/linux-arm64-gnu/bound_read.linux-arm64-gnu.node +0 -0
  205. package/adapters/workbuddy/bin/prebuilds/linux-x64-gnu/bound_read.linux-x64-gnu.node +0 -0
  206. package/adapters/workbuddy/bin/registry.json +1 -1
  207. package/adapters/workbuddy/bin/release-skill.bundle.mjs +3560 -1200
  208. package/adapters/workbuddy/bin/rules.json +1 -1
  209. package/adapters/workbuddy/data/hosts/cursor/host-descriptor.json +34 -0
  210. package/adapters/workbuddy/data/hosts/registry.json +1 -0
  211. package/adapters/workbuddy/schemas/release-plan.schema.json +255 -25
  212. package/adapters/workbuddy/schemas/release-project.schema.json +228 -26
  213. package/adapters/workbuddy/skills/release-finish/SKILL.md +17 -4
  214. package/adapters/workbuddy/skills/release-help/SKILL.md +40 -39
  215. package/adapters/workbuddy/src/schemas/host-descriptor.schema.json +9 -2
  216. package/bin/consumer-contract-vectors.json +7 -7
  217. package/bin/error-codes.json +1 -1
  218. package/bin/foundation-resource-binding.json +1 -1
  219. package/bin/prebuild-manifest.json +8 -4
  220. package/bin/prebuilds/darwin-arm64/bound_read.darwin-arm64.node +0 -0
  221. package/bin/prebuilds/darwin-x64/bound_read.darwin-x64.node +0 -0
  222. package/bin/prebuilds/linux-arm64-gnu/bound_read.linux-arm64-gnu.node +0 -0
  223. package/bin/prebuilds/linux-x64-gnu/bound_read.linux-x64-gnu.node +0 -0
  224. package/bin/registry.json +1 -1
  225. package/bin/release-skill-cli.mjs +25 -1
  226. package/bin/release-skill.bundle.mjs +3560 -1200
  227. package/bin/rules.json +1 -1
  228. package/data/hosts/cursor/host-descriptor.json +34 -0
  229. package/data/hosts/registry.json +1 -0
  230. package/package.json +7 -5
  231. package/platform-manifest.json +75 -9
  232. package/schemas/release-plan.schema.json +255 -25
  233. package/schemas/release-project.schema.json +228 -26
  234. package/scripts/sync-public-files.mjs +3 -22
  235. package/skills/release-finish/SKILL.md +17 -4
  236. package/skills/release-help/SKILL.md +40 -39
  237. package/skills-src/release-finish/SKILL.md +17 -4
  238. package/skills-src/release-help/SKILL.md +40 -39
  239. package/src/adapters/contract.mjs +1 -0
  240. package/src/adapters/plugin-marketplace.mjs +201 -9
  241. package/src/commands/post-release-local.mjs +290 -34
  242. package/src/commands/prepare.mjs +74 -9
  243. package/src/commands/publish.mjs +4 -1
  244. package/src/commands/ship.mjs +2 -0
  245. package/src/commands/verify.mjs +73 -0
  246. package/src/core/checkpoints.mjs +5 -2
  247. package/src/core/config.mjs +1 -1
  248. package/src/core/foundation-host-verification.mjs +168 -0
  249. package/src/core/plan.mjs +19 -1
  250. package/src/core/postpublish.mjs +9 -1
  251. package/src/core/run-retention.mjs +1 -1
  252. package/src/core/surface-host-bindings.mjs +1 -0
  253. package/src/core/verification-gates.mjs +1 -1
  254. package/src/platforms/registry.mjs +225 -16
  255. package/src/producers/build-adapters.mjs +21 -26
  256. package/src/producers/foundation-resource-projection.mjs +3 -3
  257. package/src/schemas/host-descriptor.schema.json +9 -2
@@ -0,0 +1,2226 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://release-skill.dev/schemas/release-plan/v1",
4
+ "title": "Release Plan",
5
+ "description": "Schema for frozen release plan produced by the prepare phase",
6
+ "type": "object",
7
+ "required": [
8
+ "planVersion",
9
+ "status",
10
+ "baseline",
11
+ "units",
12
+ "externalActions"
13
+ ],
14
+ "additionalProperties": false,
15
+ "properties": {
16
+ "planVersion": {
17
+ "type": "integer",
18
+ "enum": [
19
+ 1,
20
+ 2,
21
+ 3
22
+ ],
23
+ "description": "Plan format and digest-scoping version. 1: legacy (every field except the top-level digest binds; commitTimestamp must equal createdAt). 2: T1.2 digest layering (record-layer fields status/createdAt/baseline/per-action status are excluded from the plan digest; commitTimestamp is derived from the HEAD commit committer date). 3: multi-release-unit postPublish v3 (postPublish is a declaration ARRAY, one entry per declaring unit in plan.units order, possibly empty; v3 inherits the v2 record-layer semantics and only changes the postPublish shape)."
24
+ },
25
+ "status": {
26
+ "type": "string",
27
+ "enum": [
28
+ "DISCOVERED",
29
+ "ASSESSED",
30
+ "PREPARED",
31
+ "APPROVED",
32
+ "PUBLISHING",
33
+ "PUBLISHED",
34
+ "VERIFIED",
35
+ "NEEDS_INPUT",
36
+ "BLOCKED",
37
+ "PARTIAL"
38
+ ]
39
+ },
40
+ "production": {
41
+ "type": "object",
42
+ "required": [
43
+ "mode",
44
+ "assetRoot"
45
+ ],
46
+ "additionalProperties": false,
47
+ "properties": {
48
+ "mode": {
49
+ "const": "github-npm-v1"
50
+ },
51
+ "assetRoot": {
52
+ "type": "string",
53
+ "minLength": 1
54
+ }
55
+ }
56
+ },
57
+ "publicSourceAuthorityReceipt": {
58
+ "type": "object",
59
+ "required": [
60
+ "coordinatorUnitId",
61
+ "subjectUnitIds",
62
+ "asset"
63
+ ],
64
+ "additionalProperties": false,
65
+ "properties": {
66
+ "coordinatorUnitId": {
67
+ "type": "string",
68
+ "pattern": "^(?!\\.{1,2}$)[A-Za-z0-9][A-Za-z0-9._-]*$"
69
+ },
70
+ "subjectUnitIds": {
71
+ "type": "array",
72
+ "minItems": 1,
73
+ "uniqueItems": true,
74
+ "items": {
75
+ "type": "string",
76
+ "pattern": "^(?!\\.{1,2}$)[A-Za-z0-9][A-Za-z0-9._-]*$"
77
+ }
78
+ },
79
+ "asset": {
80
+ "type": "object",
81
+ "required": [
82
+ "name",
83
+ "path",
84
+ "sha256"
85
+ ],
86
+ "additionalProperties": false,
87
+ "properties": {
88
+ "name": {
89
+ "const": "source-authority-receipt.json"
90
+ },
91
+ "path": {
92
+ "type": "string",
93
+ "minLength": 1,
94
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\).+$"
95
+ },
96
+ "sha256": {
97
+ "type": "string",
98
+ "pattern": "^[a-f0-9]{64}$"
99
+ }
100
+ }
101
+ }
102
+ }
103
+ },
104
+ "baseline": {
105
+ "type": "object",
106
+ "required": [
107
+ "gitTreeHash"
108
+ ],
109
+ "additionalProperties": false,
110
+ "properties": {
111
+ "gitTreeHash": {
112
+ "type": "string",
113
+ "minLength": 1
114
+ },
115
+ "workspaceDigest": {
116
+ "type": "string",
117
+ "minLength": 1,
118
+ "description": "Deterministic digest of workspace file state at plan freeze time"
119
+ },
120
+ "workspaceDigestAlgorithm": {
121
+ "type": "string",
122
+ "const": "git-workspace-v2",
123
+ "description": "Versioned algorithm authority for workspaceDigest"
124
+ },
125
+ "headCommit": {
126
+ "type": "string"
127
+ },
128
+ "dirtyFiles": {
129
+ "type": "array",
130
+ "items": {
131
+ "type": "string"
132
+ }
133
+ },
134
+ "capturedAt": {
135
+ "type": "string",
136
+ "format": "date-time"
137
+ }
138
+ }
139
+ },
140
+ "units": {
141
+ "type": "array",
142
+ "minItems": 1,
143
+ "items": {
144
+ "type": "object",
145
+ "required": [
146
+ "id",
147
+ "targetVersion",
148
+ "previousPublicBaseline"
149
+ ],
150
+ "additionalProperties": false,
151
+ "properties": {
152
+ "id": {
153
+ "type": "string",
154
+ "minLength": 1,
155
+ "pattern": "^(?!\\.{1,2}$)[A-Za-z0-9][A-Za-z0-9._-]*$"
156
+ },
157
+ "targetVersion": {
158
+ "type": "string",
159
+ "minLength": 1
160
+ },
161
+ "source": {
162
+ "type": "string"
163
+ },
164
+ "publicRepo": {
165
+ "type": "string"
166
+ },
167
+ "tagTemplate": {
168
+ "type": "string"
169
+ },
170
+ "snapshotDigest": {
171
+ "type": "string",
172
+ "description": "SHA-256 digest of the snapshot content"
173
+ },
174
+ "productionConfig": {
175
+ "type": "object",
176
+ "required": [
177
+ "githubHost",
178
+ "branchTemplate",
179
+ "branchStrategy"
180
+ ],
181
+ "additionalProperties": false,
182
+ "properties": {
183
+ "githubHost": {
184
+ "type": "string"
185
+ },
186
+ "branchTemplate": {
187
+ "type": "string"
188
+ },
189
+ "releaseTitleTemplate": {
190
+ "type": "string"
191
+ },
192
+ "releaseNotes": {
193
+ "type": "string"
194
+ },
195
+ "branchStrategy": {
196
+ "type": "string",
197
+ "enum": [
198
+ "create-release-branch",
199
+ "advance-existing-branch",
200
+ "initialize-default-branch"
201
+ ]
202
+ },
203
+ "setAsDefaultBranch": {
204
+ "type": "boolean"
205
+ },
206
+ "expectedCurrentDefaultBranch": {
207
+ "type": "string",
208
+ "minLength": 1
209
+ }
210
+ },
211
+ "allOf": [
212
+ {
213
+ "if": {
214
+ "properties": {
215
+ "branchStrategy": {
216
+ "const": "initialize-default-branch"
217
+ }
218
+ },
219
+ "required": [
220
+ "branchStrategy"
221
+ ]
222
+ },
223
+ "then": {
224
+ "required": [
225
+ "setAsDefaultBranch",
226
+ "expectedCurrentDefaultBranch"
227
+ ],
228
+ "properties": {
229
+ "setAsDefaultBranch": {
230
+ "const": true
231
+ }
232
+ }
233
+ }
234
+ },
235
+ {
236
+ "if": {
237
+ "properties": {
238
+ "setAsDefaultBranch": {
239
+ "const": true
240
+ }
241
+ },
242
+ "required": [
243
+ "setAsDefaultBranch"
244
+ ]
245
+ },
246
+ "then": {
247
+ "properties": {
248
+ "branchStrategy": {
249
+ "const": "initialize-default-branch"
250
+ }
251
+ }
252
+ }
253
+ }
254
+ ]
255
+ },
256
+ "frozenSnapshot": {
257
+ "type": "object",
258
+ "required": [
259
+ "path",
260
+ "manifestDigest",
261
+ "gitObjectDir",
262
+ "branch",
263
+ "branchStrategy",
264
+ "commit",
265
+ "tree",
266
+ "commitTimestamp"
267
+ ],
268
+ "additionalProperties": false,
269
+ "properties": {
270
+ "path": {
271
+ "type": "string",
272
+ "minLength": 1
273
+ },
274
+ "manifestDigest": {
275
+ "type": "string",
276
+ "pattern": "^[a-f0-9]{64}$"
277
+ },
278
+ "gitObjectDir": {
279
+ "type": "string",
280
+ "minLength": 1
281
+ },
282
+ "branch": {
283
+ "type": "string",
284
+ "minLength": 1
285
+ },
286
+ "commit": {
287
+ "type": "string",
288
+ "pattern": "^[a-f0-9]{40,64}$"
289
+ },
290
+ "tree": {
291
+ "type": "string",
292
+ "pattern": "^[a-f0-9]{40,64}$"
293
+ },
294
+ "commitTimestamp": {
295
+ "type": "string",
296
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\+00:00$",
297
+ "description": "Frozen release commit timestamp in canonical UTC second precision. Written verbatim to GIT_AUTHOR_DATE and GIT_COMMITTER_DATE of the frozen release commit, so it always equals the commit's %aI and %cI byte-for-byte. v1 plans: the freeze timestamp sampled exactly once during production prepare, equal to the plan's createdAt. planVersion 2 plans: derived deterministically from the baseline headCommit's committer date, so identical sources freeze identical commits (not equal to createdAt, which remains the record-layer real clock)."
298
+ },
299
+ "parentCommit": {
300
+ "type": "string",
301
+ "pattern": "^[a-f0-9]{40,64}$"
302
+ },
303
+ "branchStrategy": {
304
+ "type": "string",
305
+ "enum": [
306
+ "create-release-branch",
307
+ "advance-existing-branch",
308
+ "initialize-default-branch"
309
+ ]
310
+ },
311
+ "npm": {
312
+ "anyOf": [
313
+ {
314
+ "type": "null"
315
+ },
316
+ {
317
+ "type": "object",
318
+ "required": [
319
+ "tarballPath",
320
+ "tarballSha256",
321
+ "integrity",
322
+ "size"
323
+ ],
324
+ "additionalProperties": false,
325
+ "properties": {
326
+ "tarballPath": {
327
+ "type": "string",
328
+ "minLength": 1
329
+ },
330
+ "tarballSha256": {
331
+ "type": "string",
332
+ "pattern": "^[a-f0-9]{64}$"
333
+ },
334
+ "integrity": {
335
+ "type": "string",
336
+ "minLength": 1
337
+ },
338
+ "size": {
339
+ "type": "integer",
340
+ "minimum": 1
341
+ }
342
+ }
343
+ }
344
+ ]
345
+ }
346
+ },
347
+ "allOf": [
348
+ {
349
+ "if": {
350
+ "properties": {
351
+ "branchStrategy": {
352
+ "enum": [
353
+ "advance-existing-branch",
354
+ "initialize-default-branch"
355
+ ]
356
+ }
357
+ },
358
+ "required": [
359
+ "branchStrategy"
360
+ ]
361
+ },
362
+ "then": {
363
+ "required": [
364
+ "parentCommit"
365
+ ]
366
+ }
367
+ },
368
+ {
369
+ "if": {
370
+ "properties": {
371
+ "branchStrategy": {
372
+ "const": "create-release-branch"
373
+ }
374
+ },
375
+ "required": [
376
+ "branchStrategy"
377
+ ]
378
+ },
379
+ "then": {
380
+ "not": {
381
+ "required": [
382
+ "parentCommit"
383
+ ]
384
+ }
385
+ }
386
+ }
387
+ ]
388
+ },
389
+ "distributions": {
390
+ "type": "array",
391
+ "items": {
392
+ "type": "object",
393
+ "required": [
394
+ "type"
395
+ ],
396
+ "additionalProperties": false,
397
+ "properties": {
398
+ "type": {
399
+ "type": "string",
400
+ "enum": [
401
+ "npm",
402
+ "claude-plugin",
403
+ "codex-plugin",
404
+ "kimi-plugin",
405
+ "codebuddy-plugin",
406
+ "qoder-plugin",
407
+ "cursor-plugin"
408
+ ]
409
+ },
410
+ "package": {
411
+ "type": "string",
412
+ "maxLength": 214,
413
+ "pattern": "^(?:@[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*|[a-z0-9][a-z0-9._-]*)$"
414
+ },
415
+ "access": {
416
+ "type": "string",
417
+ "enum": [
418
+ "public",
419
+ "restricted"
420
+ ]
421
+ },
422
+ "provenance": {
423
+ "type": "boolean"
424
+ },
425
+ "tag": {
426
+ "type": "string",
427
+ "minLength": 1
428
+ },
429
+ "registry": {
430
+ "type": "string",
431
+ "minLength": 1,
432
+ "pattern": "^https://[^\\s]+$",
433
+ "description": "Normalized HTTPS URL of the npm registry"
434
+ },
435
+ "publisher": {
436
+ "type": "string",
437
+ "minLength": 1,
438
+ "pattern": "^[a-z0-9][a-z0-9._-]*$",
439
+ "description": "Expected npm whoami username for this registry"
440
+ },
441
+ "plugin": {
442
+ "type": "string",
443
+ "minLength": 1,
444
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
445
+ },
446
+ "marketplace": {
447
+ "type": "string",
448
+ "minLength": 1,
449
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
450
+ },
451
+ "marketplaceSource": {
452
+ "type": "string",
453
+ "minLength": 1,
454
+ "description": "消费者添加统一市场所用的来源 URL(如 codebuddy plugin marketplace add);可选,仅在可知时声明"
455
+ },
456
+ "marketplaceRepo": {
457
+ "type": "string",
458
+ "pattern": "^[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$",
459
+ "description": "外部独立市场仓库 owner/name;存在即启用外部市场形态"
460
+ },
461
+ "entrySkill": {
462
+ "type": "string",
463
+ "minLength": 1,
464
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
465
+ },
466
+ "smokeBin": {
467
+ "type": "string",
468
+ "minLength": 1
469
+ },
470
+ "smokeArgs": {
471
+ "type": "array",
472
+ "items": {
473
+ "type": "string"
474
+ }
475
+ },
476
+ "smokeExpectedJson": {
477
+ "type": "object"
478
+ },
479
+ "installationContract": {
480
+ "type": "object",
481
+ "description": "可审计的安装契约规范对象",
482
+ "additionalProperties": false,
483
+ "properties": {
484
+ "algorithmVersion": {
485
+ "type": "integer",
486
+ "minimum": 1
487
+ },
488
+ "distributionType": {
489
+ "type": "string",
490
+ "minLength": 1
491
+ },
492
+ "manifestRelativePath": {
493
+ "type": "string",
494
+ "minLength": 1
495
+ },
496
+ "normalizedManifest": {
497
+ "type": "object"
498
+ },
499
+ "marketplaceSourceType": {
500
+ "type": "string",
501
+ "enum": [
502
+ "bundled-family",
503
+ "standalone-index"
504
+ ]
505
+ },
506
+ "includeMarketplaceEntry": {
507
+ "type": "boolean"
508
+ },
509
+ "marketplaceIndexRelativePath": {
510
+ "type": "string",
511
+ "minLength": 1
512
+ },
513
+ "normalizedSelectedEntry": {
514
+ "type": "object"
515
+ },
516
+ "verificationRecipeVersion": {
517
+ "type": "string",
518
+ "minLength": 1
519
+ }
520
+ },
521
+ "required": [
522
+ "algorithmVersion",
523
+ "distributionType",
524
+ "manifestRelativePath",
525
+ "normalizedManifest",
526
+ "marketplaceSourceType",
527
+ "includeMarketplaceEntry",
528
+ "verificationRecipeVersion"
529
+ ]
530
+ },
531
+ "installationContractDigest": {
532
+ "type": "string",
533
+ "pattern": "^[a-f0-9]{64}$",
534
+ "description": "安装契约摘要,用于在远端状态未变化时跳过重复验证"
535
+ },
536
+ "marketplaceSourceType": {
537
+ "type": "string",
538
+ "enum": [
539
+ "bundled-family",
540
+ "standalone-index"
541
+ ],
542
+ "description": "市场来源类型:bundled-family(技能族自带市场文件)或 standalone-index(独立市场仓库);每个平台每次发布只冻结一种来源"
543
+ },
544
+ "firstReleaseBootstrap": {
545
+ "type": "string",
546
+ "enum": [
547
+ "manual-index-checkpoint"
548
+ ],
549
+ "description": "首次 standalone-index 发布的人工索引停点;仅显式 opt-in 时启用"
550
+ },
551
+ "marketplaceIndexSha": {
552
+ "type": [
553
+ "string",
554
+ "null"
555
+ ],
556
+ "pattern": "^[0-9a-f]{40}$",
557
+ "description": "最终市场索引提交 SHA;首次 bootstrap prepare 阶段必须保持 null,verify 仅记录实际观察值"
558
+ },
559
+ "marketplaceCommitSha": {
560
+ "type": "string",
561
+ "pattern": "^[0-9a-f]{40}$",
562
+ "description": "独立市场仓库冻结提交 SHA(standalone-index 专用)"
563
+ },
564
+ "marketplaceRef": {
565
+ "type": "string",
566
+ "minLength": 1,
567
+ "description": "独立市场仓库冻结引用(standalone-index 专用)"
568
+ },
569
+ "marketplaceIndexPath": {
570
+ "type": "string",
571
+ "minLength": 1,
572
+ "description": "独立市场索引相对路径(standalone-index 专用)"
573
+ },
574
+ "marketplaceName": {
575
+ "type": "string",
576
+ "minLength": 1,
577
+ "description": "独立市场名称(standalone-index 专用)"
578
+ },
579
+ "selectedEntry": {
580
+ "type": "object",
581
+ "description": "冻结的唯一选中市场条目(standalone-index 专用)"
582
+ },
583
+ "hostVerificationContract": {
584
+ "type": "object",
585
+ "description": "项目级单 Skill 宿主原生验证的冻结领域绑定;进程与工作区合同由 Foundation 管理",
586
+ "additionalProperties": false,
587
+ "properties": {
588
+ "hostId": {
589
+ "const": "cursor"
590
+ },
591
+ "payloadDigest": {
592
+ "type": "string",
593
+ "pattern": "^[a-f0-9]{64}$"
594
+ },
595
+ "manifestRelativePath": {
596
+ "type": "string",
597
+ "pattern": "^skills/[a-z0-9][a-z0-9-]*/SKILL\\.md$"
598
+ },
599
+ "entrySkill": {
600
+ "type": "string",
601
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
602
+ },
603
+ "contractVersion": {
604
+ "const": 1
605
+ },
606
+ "scenario": {
607
+ "$ref": "#/definitions/cursorHostScenario"
608
+ }
609
+ },
610
+ "required": [
611
+ "hostId",
612
+ "payloadDigest",
613
+ "manifestRelativePath",
614
+ "entrySkill",
615
+ "contractVersion",
616
+ "scenario"
617
+ ]
618
+ },
619
+ "timeoutMs": {
620
+ "type": "integer",
621
+ "minimum": 30000,
622
+ "maximum": 900000
623
+ }
624
+ },
625
+ "allOf": [
626
+ {
627
+ "if": {
628
+ "properties": {
629
+ "type": {
630
+ "const": "npm"
631
+ }
632
+ }
633
+ },
634
+ "then": {
635
+ "required": [
636
+ "package",
637
+ "registry",
638
+ "publisher"
639
+ ]
640
+ }
641
+ },
642
+ {
643
+ "if": {
644
+ "properties": {
645
+ "type": {
646
+ "enum": [
647
+ "claude-plugin",
648
+ "codex-plugin",
649
+ "qoder-plugin"
650
+ ]
651
+ }
652
+ }
653
+ },
654
+ "then": {
655
+ "required": [
656
+ "plugin",
657
+ "marketplace",
658
+ "entrySkill"
659
+ ]
660
+ }
661
+ },
662
+ {
663
+ "if": {
664
+ "properties": {
665
+ "type": {
666
+ "const": "kimi-plugin"
667
+ }
668
+ }
669
+ },
670
+ "then": {
671
+ "required": [
672
+ "plugin",
673
+ "entrySkill"
674
+ ]
675
+ }
676
+ },
677
+ {
678
+ "if": {
679
+ "properties": {
680
+ "type": {
681
+ "const": "cursor-plugin"
682
+ }
683
+ }
684
+ },
685
+ "then": {
686
+ "required": [
687
+ "entrySkill",
688
+ "hostVerificationContract"
689
+ ],
690
+ "not": {
691
+ "anyOf": [
692
+ {
693
+ "required": [
694
+ "marketplace"
695
+ ]
696
+ },
697
+ {
698
+ "required": [
699
+ "marketplaceSource"
700
+ ]
701
+ },
702
+ {
703
+ "required": [
704
+ "marketplaceRepo"
705
+ ]
706
+ },
707
+ {
708
+ "required": [
709
+ "marketplaceSourceType"
710
+ ]
711
+ },
712
+ {
713
+ "required": [
714
+ "marketplaceIndexPath"
715
+ ]
716
+ },
717
+ {
718
+ "required": [
719
+ "firstReleaseBootstrap"
720
+ ]
721
+ }
722
+ ]
723
+ }
724
+ }
725
+ },
726
+ {
727
+ "if": {
728
+ "properties": {
729
+ "type": {
730
+ "const": "codebuddy-plugin"
731
+ }
732
+ }
733
+ },
734
+ "then": {
735
+ "required": [
736
+ "plugin",
737
+ "entrySkill"
738
+ ]
739
+ }
740
+ },
741
+ {
742
+ "if": {
743
+ "properties": {
744
+ "type": {
745
+ "enum": [
746
+ "claude-plugin",
747
+ "codex-plugin",
748
+ "kimi-plugin",
749
+ "codebuddy-plugin",
750
+ "qoder-plugin"
751
+ ]
752
+ }
753
+ }
754
+ },
755
+ "then": {}
756
+ },
757
+ {
758
+ "if": {
759
+ "properties": {
760
+ "type": {
761
+ "enum": [
762
+ "claude-plugin",
763
+ "codex-plugin",
764
+ "kimi-plugin",
765
+ "codebuddy-plugin",
766
+ "qoder-plugin"
767
+ ]
768
+ },
769
+ "marketplaceSourceType": {
770
+ "const": "bundled-family"
771
+ }
772
+ },
773
+ "required": [
774
+ "marketplaceSourceType"
775
+ ]
776
+ },
777
+ "then": {
778
+ "not": {
779
+ "required": [
780
+ "marketplaceRepo"
781
+ ]
782
+ }
783
+ }
784
+ },
785
+ {
786
+ "if": {
787
+ "properties": {
788
+ "type": {
789
+ "enum": [
790
+ "claude-plugin",
791
+ "codex-plugin",
792
+ "kimi-plugin",
793
+ "codebuddy-plugin",
794
+ "qoder-plugin"
795
+ ]
796
+ },
797
+ "marketplaceSourceType": {
798
+ "const": "standalone-index"
799
+ }
800
+ },
801
+ "required": [
802
+ "marketplaceSourceType"
803
+ ]
804
+ },
805
+ "then": {
806
+ "required": [
807
+ "marketplaceRepo"
808
+ ]
809
+ }
810
+ },
811
+ {
812
+ "if": {
813
+ "required": [
814
+ "firstReleaseBootstrap"
815
+ ]
816
+ },
817
+ "then": {
818
+ "required": [
819
+ "marketplaceSourceType",
820
+ "marketplaceRepo"
821
+ ],
822
+ "properties": {
823
+ "type": {
824
+ "enum": [
825
+ "claude-plugin",
826
+ "codex-plugin"
827
+ ]
828
+ },
829
+ "marketplaceSourceType": {
830
+ "const": "standalone-index"
831
+ }
832
+ }
833
+ }
834
+ },
835
+ {
836
+ "if": {
837
+ "required": [
838
+ "smokeExpectedJson"
839
+ ],
840
+ "properties": {
841
+ "smokeBin": {
842
+ "minLength": 1
843
+ }
844
+ }
845
+ },
846
+ "then": {
847
+ "required": [
848
+ "smokeBin"
849
+ ]
850
+ }
851
+ },
852
+ {
853
+ "if": {
854
+ "required": [
855
+ "smokeArgs"
856
+ ],
857
+ "properties": {
858
+ "smokeBin": {
859
+ "minLength": 1
860
+ }
861
+ }
862
+ },
863
+ "then": {
864
+ "required": [
865
+ "smokeBin"
866
+ ]
867
+ }
868
+ }
869
+ ]
870
+ }
871
+ },
872
+ "previousPublicBaseline": {
873
+ "type": "object",
874
+ "required": [
875
+ "mode",
876
+ "status"
877
+ ],
878
+ "additionalProperties": false,
879
+ "properties": {
880
+ "mode": {
881
+ "type": "string",
882
+ "enum": [
883
+ "none",
884
+ "bound"
885
+ ]
886
+ },
887
+ "githubHost": {
888
+ "type": "string"
889
+ },
890
+ "repo": {
891
+ "type": "string"
892
+ },
893
+ "ref": {
894
+ "type": "string"
895
+ },
896
+ "commit": {
897
+ "type": "string"
898
+ },
899
+ "tree": {
900
+ "type": "string"
901
+ },
902
+ "manifestDigest": {
903
+ "type": "string"
904
+ },
905
+ "observedCommit": {
906
+ "type": "string"
907
+ },
908
+ "observedAt": {
909
+ "type": "string",
910
+ "format": "date-time"
911
+ },
912
+ "status": {
913
+ "type": "string",
914
+ "enum": [
915
+ "consistent",
916
+ "drifted",
917
+ "unknown",
918
+ "unobserved-offline",
919
+ "blocking"
920
+ ]
921
+ }
922
+ },
923
+ "if": {
924
+ "properties": {
925
+ "mode": {
926
+ "const": "bound"
927
+ }
928
+ }
929
+ },
930
+ "then": {
931
+ "required": [
932
+ "repo",
933
+ "ref",
934
+ "commit"
935
+ ]
936
+ },
937
+ "else": {
938
+ "allOf": [
939
+ {
940
+ "not": {
941
+ "required": [
942
+ "repo"
943
+ ]
944
+ }
945
+ },
946
+ {
947
+ "not": {
948
+ "required": [
949
+ "githubHost"
950
+ ]
951
+ }
952
+ },
953
+ {
954
+ "not": {
955
+ "required": [
956
+ "ref"
957
+ ]
958
+ }
959
+ },
960
+ {
961
+ "not": {
962
+ "required": [
963
+ "commit"
964
+ ]
965
+ }
966
+ },
967
+ {
968
+ "not": {
969
+ "required": [
970
+ "tree"
971
+ ]
972
+ }
973
+ },
974
+ {
975
+ "not": {
976
+ "required": [
977
+ "manifestDigest"
978
+ ]
979
+ }
980
+ },
981
+ {
982
+ "not": {
983
+ "required": [
984
+ "observedCommit"
985
+ ]
986
+ }
987
+ },
988
+ {
989
+ "not": {
990
+ "required": [
991
+ "observedAt"
992
+ ]
993
+ }
994
+ }
995
+ ]
996
+ }
997
+ }
998
+ }
999
+ }
1000
+ },
1001
+ "configDigest": {
1002
+ "type": "string",
1003
+ "minLength": 1,
1004
+ "description": "Digest of the project configuration at plan freeze time"
1005
+ },
1006
+ "skillResourceClosure": {
1007
+ "type": "object",
1008
+ "description": "Skill resource closure gate receipts from prepare phase (per-unit bound)",
1009
+ "additionalProperties": false,
1010
+ "properties": {
1011
+ "unitReceipts": {
1012
+ "type": "array",
1013
+ "minItems": 1,
1014
+ "items": {
1015
+ "type": "object",
1016
+ "additionalProperties": false,
1017
+ "properties": {
1018
+ "unitId": {
1019
+ "type": "string",
1020
+ "minLength": 1
1021
+ },
1022
+ "checkerVersion": {
1023
+ "type": "string",
1024
+ "minLength": 1
1025
+ },
1026
+ "inputDigest": {
1027
+ "type": "string",
1028
+ "pattern": "^[a-f0-9]{64}$"
1029
+ },
1030
+ "surfaceCount": {
1031
+ "type": "integer",
1032
+ "minimum": 0
1033
+ },
1034
+ "skillCount": {
1035
+ "type": "integer",
1036
+ "minimum": 0
1037
+ },
1038
+ "referenceCount": {
1039
+ "type": "integer",
1040
+ "minimum": 0
1041
+ },
1042
+ "sourceOnlyCount": {
1043
+ "type": "integer",
1044
+ "minimum": 0
1045
+ },
1046
+ "findingCount": {
1047
+ "const": 0
1048
+ },
1049
+ "preparedAt": {
1050
+ "type": [
1051
+ "string",
1052
+ "null"
1053
+ ],
1054
+ "description": "Deterministic freeze timestamp of the prepare run that produced this receipt (production: the baseline HEAD commit committer date in canonical UTC form; non-production: null). Never a wall-clock sample, so identical sources freeze byte-identical receipts."
1055
+ },
1056
+ "exitCode": {
1057
+ "const": 0
1058
+ },
1059
+ "receiptDigest": {
1060
+ "type": "string",
1061
+ "pattern": "^[a-f0-9]{64}$"
1062
+ }
1063
+ },
1064
+ "required": [
1065
+ "unitId",
1066
+ "checkerVersion",
1067
+ "inputDigest",
1068
+ "surfaceCount",
1069
+ "skillCount",
1070
+ "referenceCount",
1071
+ "sourceOnlyCount",
1072
+ "findingCount",
1073
+ "preparedAt",
1074
+ "exitCode",
1075
+ "receiptDigest"
1076
+ ]
1077
+ }
1078
+ },
1079
+ "checkerVersion": {
1080
+ "type": "string",
1081
+ "minLength": 1
1082
+ },
1083
+ "totalSkillCount": {
1084
+ "type": "integer",
1085
+ "minimum": 0
1086
+ },
1087
+ "totalReferenceCount": {
1088
+ "type": "integer",
1089
+ "minimum": 0
1090
+ },
1091
+ "totalSourceOnlyCount": {
1092
+ "type": "integer",
1093
+ "minimum": 0
1094
+ },
1095
+ "totalFindingCount": {
1096
+ "type": "integer",
1097
+ "minimum": 0
1098
+ }
1099
+ },
1100
+ "required": [
1101
+ "unitReceipts",
1102
+ "checkerVersion",
1103
+ "totalSkillCount",
1104
+ "totalReferenceCount",
1105
+ "totalSourceOnlyCount",
1106
+ "totalFindingCount"
1107
+ ]
1108
+ },
1109
+ "verificationGates": {
1110
+ "type": "array",
1111
+ "items": {
1112
+ "$ref": "#/definitions/verificationGate"
1113
+ }
1114
+ },
1115
+ "externalActions": {
1116
+ "type": "array",
1117
+ "items": {
1118
+ "type": "object",
1119
+ "required": [
1120
+ "id",
1121
+ "type",
1122
+ "adapter"
1123
+ ],
1124
+ "additionalProperties": false,
1125
+ "properties": {
1126
+ "id": {
1127
+ "type": "string",
1128
+ "minLength": 1
1129
+ },
1130
+ "type": {
1131
+ "type": "string",
1132
+ "enum": [
1133
+ "push-commit",
1134
+ "push-snapshot",
1135
+ "create-tag",
1136
+ "npm-publish",
1137
+ "github-release",
1138
+ "claude-marketplace-install",
1139
+ "codex-marketplace-install",
1140
+ "kimi-marketplace-install",
1141
+ "codebuddy-marketplace-install",
1142
+ "qoder-marketplace-install",
1143
+ "set-default-branch"
1144
+ ]
1145
+ },
1146
+ "adapter": {
1147
+ "type": "string",
1148
+ "minLength": 1
1149
+ },
1150
+ "unitId": {
1151
+ "type": "string"
1152
+ },
1153
+ "parameters": {
1154
+ "type": "object"
1155
+ },
1156
+ "expected": {
1157
+ "type": "object",
1158
+ "description": "Expected observation state for verification"
1159
+ },
1160
+ "status": {
1161
+ "type": "string",
1162
+ "enum": [
1163
+ "PENDING",
1164
+ "SUCCEEDED",
1165
+ "FAILED",
1166
+ "SKIPPED"
1167
+ ],
1168
+ "description": "Action execution status"
1169
+ }
1170
+ }
1171
+ }
1172
+ },
1173
+ "createdAt": {
1174
+ "type": "string",
1175
+ "format": "date-time"
1176
+ },
1177
+ "publishedAt": {
1178
+ "type": "string",
1179
+ "format": "date-time",
1180
+ "description": "ISO 8601 timestamp when the plan was published"
1181
+ },
1182
+ "reconciledAt": {
1183
+ "type": "string",
1184
+ "format": "date-time",
1185
+ "description": "ISO 8601 timestamp when the plan was last reconciled"
1186
+ },
1187
+ "snapshotDigest": {
1188
+ "type": "string",
1189
+ "description": "Overall snapshot digest across all units"
1190
+ },
1191
+ "humanConsumersStrategy": {
1192
+ "type": "string",
1193
+ "enum": [
1194
+ "manualFollowUps",
1195
+ "foundationPayloadThenManualFollowUps"
1196
+ ],
1197
+ "description": "Human consumer strategy marker. 'foundationPayloadThenManualFollowUps': verify first observes the complete frozen plugin through Foundation, then preserves non-blocking Kimi/CodeBuddy marketplace/invocation follow-ups. 'manualFollowUps': legacy 0.8 behavior without the Foundation payload observation. Absent: legacy attestation closed loop."
1198
+ },
1199
+ "workflowKind": {
1200
+ "type": "string",
1201
+ "enum": [
1202
+ "full",
1203
+ "docs",
1204
+ "config",
1205
+ "marketplace"
1206
+ ],
1207
+ "description": "Workflow profile (H5). 'full' runs the complete gate set; 'docs'/'config'/'marketplace' deterministically trim code-class gates (declared hooks, snapshot-verify gates, source-authority closure, skill-resource-closure) and record the trim in workflowDecision. Binding-layer field: included in the plan digest."
1208
+ },
1209
+ "workflowDecision": {
1210
+ "type": "object",
1211
+ "description": "Workflow trim decision bound into the plan digest. Present when workflowKind != 'full'. For config workflows it also reports whether the public bytes are unchanged (no publish path) or changed/indeterminable (publish needed, fail-safe).",
1212
+ "required": [
1213
+ "workflowKind",
1214
+ "decision",
1215
+ "publishPath",
1216
+ "trimmedGates"
1217
+ ],
1218
+ "additionalProperties": false,
1219
+ "properties": {
1220
+ "workflowKind": {
1221
+ "type": "string",
1222
+ "enum": [
1223
+ "docs",
1224
+ "config",
1225
+ "marketplace"
1226
+ ]
1227
+ },
1228
+ "decision": {
1229
+ "type": "string",
1230
+ "enum": [
1231
+ "code-gates-trimmed",
1232
+ "public-bytes-unchanged",
1233
+ "public-bytes-changed",
1234
+ "indeterminable"
1235
+ ]
1236
+ },
1237
+ "publishPath": {
1238
+ "type": "string",
1239
+ "enum": [
1240
+ "publish-needed",
1241
+ "no-publish-needed"
1242
+ ]
1243
+ },
1244
+ "trimmedGates": {
1245
+ "type": "array",
1246
+ "items": {
1247
+ "type": "string",
1248
+ "enum": [
1249
+ "declared-hooks",
1250
+ "snapshot-verify-gates",
1251
+ "source-authority-closure",
1252
+ "skill-resource-closure"
1253
+ ]
1254
+ }
1255
+ },
1256
+ "comparedPlan": {
1257
+ "type": "string",
1258
+ "minLength": 1,
1259
+ "description": "Digest-addressed immutable plan file compared for the config publish-path decision"
1260
+ }
1261
+ }
1262
+ },
1263
+ "postPublish": {
1264
+ "type": [
1265
+ "object",
1266
+ "array"
1267
+ ],
1268
+ "description": "Frozen post-release distribution block. planVersion 1/2: a single declaration object, or absent (normalized to the empty array view at runtime). planVersion 3: a declaration ARRAY, one entry per declaring unit in plan.units order, possibly empty — never a single object, never absent. The exact allowed shape is enforced conditionally on planVersion (root allOf); readers must never guess the shape from the field value."
1269
+ },
1270
+ "digest": {
1271
+ "type": "string",
1272
+ "minLength": 1
1273
+ },
1274
+ "sourceAuthority": {
1275
+ "type": "object",
1276
+ "description": "Source authority content closure gate binding: proves frozen source inputs exist in the workspace remote default branch",
1277
+ "required": [
1278
+ "sourceRepository",
1279
+ "defaultBranch",
1280
+ "entries",
1281
+ "inputDigest",
1282
+ "algorithmVersion"
1283
+ ],
1284
+ "additionalProperties": false,
1285
+ "properties": {
1286
+ "sourceRepository": {
1287
+ "type": "string",
1288
+ "minLength": 1,
1289
+ "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$",
1290
+ "description": "GitHub owner/repo of the workspace source repository"
1291
+ },
1292
+ "defaultBranch": {
1293
+ "type": "string",
1294
+ "minLength": 1,
1295
+ "description": "Workspace remote default branch name"
1296
+ },
1297
+ "entries": {
1298
+ "type": "array",
1299
+ "minItems": 1,
1300
+ "description": "Frozen workspace-relative source inputs compared with the remote default branch",
1301
+ "items": {
1302
+ "type": "object",
1303
+ "required": [
1304
+ "path",
1305
+ "digest",
1306
+ "mode"
1307
+ ],
1308
+ "additionalProperties": false,
1309
+ "properties": {
1310
+ "path": {
1311
+ "type": "string",
1312
+ "minLength": 1,
1313
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\).+$"
1314
+ },
1315
+ "digest": {
1316
+ "type": "string",
1317
+ "pattern": "^[a-f0-9]{64}$"
1318
+ },
1319
+ "mode": {
1320
+ "type": "string",
1321
+ "enum": [
1322
+ "100644",
1323
+ "100755"
1324
+ ]
1325
+ }
1326
+ }
1327
+ }
1328
+ },
1329
+ "inputDigest": {
1330
+ "type": "string",
1331
+ "pattern": "^[a-f0-9]{64}$",
1332
+ "description": "SHA-256 digest of the deterministic source-input closure"
1333
+ },
1334
+ "algorithmVersion": {
1335
+ "type": "integer",
1336
+ "minimum": 1,
1337
+ "description": "Source-input closure algorithm version"
1338
+ }
1339
+ }
1340
+ },
1341
+ "waivers": {
1342
+ "type": "array",
1343
+ "items": {
1344
+ "type": "object",
1345
+ "required": [
1346
+ "rule",
1347
+ "reason",
1348
+ "responsible",
1349
+ "expiresAt"
1350
+ ],
1351
+ "additionalProperties": false,
1352
+ "properties": {
1353
+ "rule": {
1354
+ "type": "string",
1355
+ "minLength": 1
1356
+ },
1357
+ "reason": {
1358
+ "type": "string",
1359
+ "minLength": 1
1360
+ },
1361
+ "responsible": {
1362
+ "type": "string",
1363
+ "minLength": 1
1364
+ },
1365
+ "expiresAt": {
1366
+ "type": "string",
1367
+ "format": "date-time"
1368
+ }
1369
+ }
1370
+ }
1371
+ }
1372
+ },
1373
+ "definitions": {
1374
+ "verificationGate": {
1375
+ "type": "object",
1376
+ "required": [
1377
+ "id",
1378
+ "phase",
1379
+ "scope",
1380
+ "command",
1381
+ "cwd",
1382
+ "timeoutMs",
1383
+ "envAllowlist"
1384
+ ],
1385
+ "additionalProperties": false,
1386
+ "properties": {
1387
+ "id": {
1388
+ "type": "string",
1389
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
1390
+ },
1391
+ "phase": {
1392
+ "type": "string",
1393
+ "enum": [
1394
+ "snapshot-verify",
1395
+ "consumer-verify"
1396
+ ]
1397
+ },
1398
+ "scope": {
1399
+ "type": "object",
1400
+ "required": [
1401
+ "unit"
1402
+ ],
1403
+ "additionalProperties": false,
1404
+ "properties": {
1405
+ "unit": {
1406
+ "type": "string",
1407
+ "pattern": "^(?!\\.{1,2}$)[A-Za-z0-9][A-Za-z0-9._-]*$"
1408
+ },
1409
+ "distribution": {
1410
+ "type": "string",
1411
+ "enum": [
1412
+ "npm",
1413
+ "claude-plugin",
1414
+ "codex-plugin",
1415
+ "kimi-plugin",
1416
+ "codebuddy-plugin",
1417
+ "qoder-plugin"
1418
+ ]
1419
+ }
1420
+ }
1421
+ },
1422
+ "command": {
1423
+ "type": "array",
1424
+ "minItems": 1,
1425
+ "items": {
1426
+ "type": "string"
1427
+ }
1428
+ },
1429
+ "cwd": {
1430
+ "type": "string",
1431
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
1432
+ },
1433
+ "timeoutMs": {
1434
+ "type": "integer",
1435
+ "minimum": 1000,
1436
+ "maximum": 7200000
1437
+ },
1438
+ "envAllowlist": {
1439
+ "type": "array",
1440
+ "items": {
1441
+ "type": "string",
1442
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
1443
+ },
1444
+ "uniqueItems": true
1445
+ },
1446
+ "expectedJson": {
1447
+ "type": "object"
1448
+ }
1449
+ },
1450
+ "allOf": [
1451
+ {
1452
+ "if": {
1453
+ "properties": {
1454
+ "phase": {
1455
+ "const": "consumer-verify"
1456
+ }
1457
+ },
1458
+ "required": [
1459
+ "phase"
1460
+ ]
1461
+ },
1462
+ "then": {
1463
+ "properties": {
1464
+ "scope": {
1465
+ "required": [
1466
+ "unit",
1467
+ "distribution"
1468
+ ]
1469
+ }
1470
+ }
1471
+ }
1472
+ },
1473
+ {
1474
+ "if": {
1475
+ "properties": {
1476
+ "phase": {
1477
+ "const": "snapshot-verify"
1478
+ }
1479
+ },
1480
+ "required": [
1481
+ "phase"
1482
+ ]
1483
+ },
1484
+ "then": {
1485
+ "properties": {
1486
+ "scope": {
1487
+ "not": {
1488
+ "required": [
1489
+ "distribution"
1490
+ ]
1491
+ }
1492
+ }
1493
+ }
1494
+ }
1495
+ }
1496
+ ]
1497
+ },
1498
+ "planPostPublish": {
1499
+ "type": "object",
1500
+ "description": "冻结的发布后分发块:声明本身 + tag/tagCommit/unitId/payloadSource 绑定。整体参与 plan digest(planVersion 2 记录层剥离不包含该块),任何配置变更都会改变 planDigest。tagCommit 仅在 prepare 能冻结 create-tag 预期 commit 时存在(production 资产);缺省时 distribute fail-closed。materialize 钩子自 T6 起可选:载荷物化要么由消费者 materialize 钩子完成,要么由冻结 executionBundle.publicFiles 经 Foundation Engineering Kit 托管投影完成(两者至少其一,见 anyOf)。",
1501
+ "required": [
1502
+ "commitIdentity",
1503
+ "tag",
1504
+ "unitId",
1505
+ "payloadSource"
1506
+ ],
1507
+ "additionalProperties": false,
1508
+ "properties": {
1509
+ "materialize": {
1510
+ "$ref": "#/definitions/planPostPublishMaterialize"
1511
+ },
1512
+ "targets": {
1513
+ "type": "array",
1514
+ "minItems": 1,
1515
+ "items": {
1516
+ "$ref": "#/definitions/planPostPublishTarget"
1517
+ }
1518
+ },
1519
+ "hooks": {
1520
+ "type": "array",
1521
+ "description": "冻结的发布后钩子声明(v0.6.3 R1);随整块参与 plan digest",
1522
+ "items": {
1523
+ "$ref": "#/definitions/planPostPublishHook"
1524
+ }
1525
+ },
1526
+ "commitIdentity": {
1527
+ "type": "object",
1528
+ "required": [
1529
+ "name",
1530
+ "email"
1531
+ ],
1532
+ "additionalProperties": false,
1533
+ "properties": {
1534
+ "name": {
1535
+ "type": "string",
1536
+ "minLength": 1
1537
+ },
1538
+ "email": {
1539
+ "type": "string",
1540
+ "minLength": 1
1541
+ }
1542
+ }
1543
+ },
1544
+ "steps": {
1545
+ "type": "array",
1546
+ "items": {
1547
+ "$ref": "#/definitions/planPostPublishStep"
1548
+ }
1549
+ },
1550
+ "assertMainVersionAhead": {
1551
+ "type": "boolean"
1552
+ },
1553
+ "tag": {
1554
+ "type": "string",
1555
+ "minLength": 1,
1556
+ "description": "冻结的分发 tag(tagTemplate 以 targetVersion 渲染)"
1557
+ },
1558
+ "tagCommit": {
1559
+ "type": "string",
1560
+ "pattern": "^[a-f0-9]{40}$",
1561
+ "description": "create-tag 预期 commit(production prepare 冻结);distribute 以 git rev-parse --verify <tag>^{commit} 校验相等"
1562
+ },
1563
+ "unitId": {
1564
+ "type": "string",
1565
+ "pattern": "^(?!\\.{1,2}$)[A-Za-z0-9][A-Za-z0-9._-]*$",
1566
+ "description": "声明该 postPublish 的发布单元 id"
1567
+ },
1568
+ "payloadSource": {
1569
+ "const": "tag-worktree",
1570
+ "description": "时序契约:载荷只能来自 tagCommit 处的 detached worktree,绝不读取工作区状态"
1571
+ },
1572
+ "localHostUpdate": {
1573
+ "$ref": "#/definitions/planLocalHostUpdate"
1574
+ },
1575
+ "executionBundle": {
1576
+ "type": "object",
1577
+ "description": "冻结的私有执行包(F-01/T1):closure 直接采用 Foundation computeResourceClosure() 的返回(排序、去重、受收容读取与摘要均由 Foundation 完成),publicFiles 是从发布单元投影的公开映射。计划是该执行包的唯一事实源:随整个 plan digest 绑定,不维护平行 manifest,也不另造 bundle digest。字节写入计划权威 .release-skill 的 postpublish-bundles/<closure.digest>/<resource.path>;distribute/postVerify 在任何 hook/外部写之前经 Foundation 严格复验并重算闭包,任何不一致即失败。",
1578
+ "required": [
1579
+ "foundationMechanism",
1580
+ "closure",
1581
+ "publicFiles"
1582
+ ],
1583
+ "additionalProperties": false,
1584
+ "properties": {
1585
+ "foundationMechanism": {
1586
+ "const": "foundation.harness.resource-closure"
1587
+ },
1588
+ "closure": {
1589
+ "type": "object",
1590
+ "description": "Foundation skill-family.resource-closure(schemaVersion 1)原样冻结",
1591
+ "required": [
1592
+ "schemaVersion",
1593
+ "kind",
1594
+ "digestAlgorithm",
1595
+ "digest",
1596
+ "resources"
1597
+ ],
1598
+ "additionalProperties": false,
1599
+ "properties": {
1600
+ "schemaVersion": {
1601
+ "const": 1
1602
+ },
1603
+ "kind": {
1604
+ "const": "skill-family.resource-closure"
1605
+ },
1606
+ "digestAlgorithm": {
1607
+ "const": "sha256"
1608
+ },
1609
+ "digest": {
1610
+ "type": "string",
1611
+ "pattern": "^[a-f0-9]{64}$"
1612
+ },
1613
+ "resources": {
1614
+ "type": "array",
1615
+ "items": {
1616
+ "type": "object",
1617
+ "required": [
1618
+ "path",
1619
+ "role",
1620
+ "exists",
1621
+ "sha256"
1622
+ ],
1623
+ "additionalProperties": false,
1624
+ "properties": {
1625
+ "path": {
1626
+ "type": "string",
1627
+ "minLength": 1,
1628
+ "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$))(?!.*\\\\).+$"
1629
+ },
1630
+ "role": {
1631
+ "const": "input",
1632
+ "description": "私有执行输入只有 input 资源;output 角色不属于执行包"
1633
+ },
1634
+ "exists": {
1635
+ "const": true
1636
+ },
1637
+ "sha256": {
1638
+ "type": "string",
1639
+ "pattern": "^[a-f0-9]{64}$"
1640
+ }
1641
+ }
1642
+ }
1643
+ }
1644
+ }
1645
+ },
1646
+ "publicFiles": {
1647
+ "type": "array",
1648
+ "description": "从已通过 schema 与运行时校验的发布单元投影进冻结计划的公开映射(T6 托管投影输入)",
1649
+ "items": {
1650
+ "type": "object",
1651
+ "required": [
1652
+ "from",
1653
+ "to",
1654
+ "mode"
1655
+ ],
1656
+ "additionalProperties": false,
1657
+ "properties": {
1658
+ "sourceScope": {
1659
+ "type": "string",
1660
+ "enum": [
1661
+ "unit",
1662
+ "workspace"
1663
+ ]
1664
+ },
1665
+ "from": {
1666
+ "type": "string",
1667
+ "minLength": 1,
1668
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
1669
+ },
1670
+ "to": {
1671
+ "type": "string",
1672
+ "minLength": 1,
1673
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
1674
+ },
1675
+ "mode": {
1676
+ "type": "string",
1677
+ "enum": [
1678
+ "preserve"
1679
+ ]
1680
+ }
1681
+ }
1682
+ }
1683
+ }
1684
+ }
1685
+ }
1686
+ },
1687
+ "anyOf": [
1688
+ {
1689
+ "required": [
1690
+ "materialize"
1691
+ ]
1692
+ },
1693
+ {
1694
+ "description": "无 materialize 钩子时,冻结的 executionBundle.publicFiles 必须非空:载荷由 Foundation 托管投影物化(F-06/T6)",
1695
+ "required": [
1696
+ "executionBundle"
1697
+ ],
1698
+ "properties": {
1699
+ "executionBundle": {
1700
+ "properties": {
1701
+ "publicFiles": {
1702
+ "minItems": 1
1703
+ }
1704
+ }
1705
+ }
1706
+ }
1707
+ }
1708
+ ],
1709
+ "allOf": [
1710
+ {
1711
+ "if": {
1712
+ "required": [
1713
+ "localHostUpdate"
1714
+ ]
1715
+ },
1716
+ "then": {
1717
+ "required": [
1718
+ "hooks"
1719
+ ],
1720
+ "properties": {
1721
+ "hooks": {
1722
+ "contains": {
1723
+ "type": "object",
1724
+ "required": [
1725
+ "phase"
1726
+ ],
1727
+ "properties": {
1728
+ "phase": {
1729
+ "const": "postVerify"
1730
+ }
1731
+ }
1732
+ }
1733
+ }
1734
+ }
1735
+ }
1736
+ }
1737
+ ]
1738
+ },
1739
+ "planLocalHostUpdate": {
1740
+ "type": "object",
1741
+ "additionalProperties": false,
1742
+ "required": [
1743
+ "plugin",
1744
+ "hosts",
1745
+ "hub"
1746
+ ],
1747
+ "properties": {
1748
+ "plugin": {
1749
+ "type": "string",
1750
+ "minLength": 1,
1751
+ "pattern": ".*\\S.*"
1752
+ },
1753
+ "hosts": {
1754
+ "type": "array",
1755
+ "minItems": 1,
1756
+ "uniqueItems": true,
1757
+ "items": {
1758
+ "type": "string",
1759
+ "enum": [
1760
+ "claude",
1761
+ "codex",
1762
+ "kimi",
1763
+ "codebuddy",
1764
+ "workbuddy",
1765
+ "qoder",
1766
+ "cursor"
1767
+ ]
1768
+ }
1769
+ },
1770
+ "hub": {
1771
+ "$ref": "#/definitions/planLocalHostHub"
1772
+ },
1773
+ "cursor": {
1774
+ "$ref": "#/definitions/cursorLocalPlugin"
1775
+ }
1776
+ },
1777
+ "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"] } } }]
1778
+ },
1779
+ "cursorLocalPlugin": {
1780
+ "type": "object",
1781
+ "additionalProperties": false,
1782
+ "required": ["sourcePath"],
1783
+ "properties": {
1784
+ "sourcePath": { "type": "string", "pattern": "^(?!/)(?!.*\\\\)(?!.*:)(?!.*\\u0000)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)(?!.*\\/$).+$" },
1785
+ "dependencyInstall": { "const": "npm-ci-ignore-scripts" }
1786
+ }
1787
+ },
1788
+ "planLocalHostHub": {
1789
+ "type": "object",
1790
+ "additionalProperties": false,
1791
+ "required": [
1792
+ "name",
1793
+ "repo",
1794
+ "ref"
1795
+ ],
1796
+ "properties": {
1797
+ "name": {
1798
+ "type": "string",
1799
+ "minLength": 1,
1800
+ "pattern": ".*\\S.*"
1801
+ },
1802
+ "githubHost": {
1803
+ "type": "string",
1804
+ "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9.-]*[A-Za-z0-9])?$"
1805
+ },
1806
+ "repo": {
1807
+ "type": "string",
1808
+ "pattern": "^[A-Za-z0-9._-]+\\/[A-Za-z0-9._-]+$"
1809
+ },
1810
+ "ref": {
1811
+ "type": "string",
1812
+ "pattern": "^refs\\/heads\\/[A-Za-z0-9][A-Za-z0-9._-]*(?:\\/[A-Za-z0-9][A-Za-z0-9._-]*)*$"
1813
+ }
1814
+ }
1815
+ },
1816
+ "planPostPublishHook": {
1817
+ "type": "object",
1818
+ "description": "冻结的发布后钩子声明项(v0.6.3 R1):preset 与 command 运行时互斥;phase 缺省 distribute;blocksVerified 缺省 true 且仅 preset 可声明 false",
1819
+ "required": [
1820
+ "id"
1821
+ ],
1822
+ "additionalProperties": false,
1823
+ "properties": {
1824
+ "id": {
1825
+ "type": "string",
1826
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
1827
+ },
1828
+ "preset": {
1829
+ "type": "string",
1830
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
1831
+ },
1832
+ "command": {
1833
+ "type": "array",
1834
+ "minItems": 1,
1835
+ "items": {
1836
+ "type": "string"
1837
+ }
1838
+ },
1839
+ "phase": {
1840
+ "type": "string",
1841
+ "enum": [
1842
+ "distribute",
1843
+ "postVerify"
1844
+ ]
1845
+ },
1846
+ "config": {
1847
+ "type": "object"
1848
+ },
1849
+ "cwd": {
1850
+ "type": "string",
1851
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
1852
+ },
1853
+ "timeoutMs": {
1854
+ "type": "integer",
1855
+ "minimum": 1000,
1856
+ "maximum": 7200000
1857
+ },
1858
+ "envAllowlist": {
1859
+ "type": "array",
1860
+ "items": {
1861
+ "type": "string",
1862
+ "pattern": "^(?!.*(?:TOKEN|SECRET|PASSWORD|PASSPHRASE|API_KEY|CREDENTIAL))[A-Z_][A-Z0-9_]*$"
1863
+ },
1864
+ "uniqueItems": true
1865
+ },
1866
+ "requiresApproval": {
1867
+ "type": "boolean"
1868
+ },
1869
+ "blocksVerified": {
1870
+ "type": "boolean"
1871
+ }
1872
+ }
1873
+ },
1874
+ "planPostPublishMaterialize": {
1875
+ "type": "object",
1876
+ "required": [
1877
+ "command",
1878
+ "outputMarker"
1879
+ ],
1880
+ "additionalProperties": false,
1881
+ "properties": {
1882
+ "command": {
1883
+ "type": "array",
1884
+ "minItems": 1,
1885
+ "items": {
1886
+ "type": "string"
1887
+ }
1888
+ },
1889
+ "cwd": {
1890
+ "type": "string",
1891
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
1892
+ },
1893
+ "timeoutMs": {
1894
+ "type": "integer",
1895
+ "minimum": 1000,
1896
+ "maximum": 7200000
1897
+ },
1898
+ "envAllowlist": {
1899
+ "type": "array",
1900
+ "items": {
1901
+ "type": "string",
1902
+ "pattern": "^(?!.*(?:TOKEN|SECRET|PASSWORD|PASSPHRASE|API_KEY|CREDENTIAL))[A-Z_][A-Z0-9_]*$"
1903
+ },
1904
+ "uniqueItems": true
1905
+ },
1906
+ "outputMarker": {
1907
+ "type": "string",
1908
+ "minLength": 1
1909
+ },
1910
+ "requireReport": {
1911
+ "type": "object",
1912
+ "required": [
1913
+ "parse"
1914
+ ],
1915
+ "additionalProperties": false,
1916
+ "properties": {
1917
+ "parse": {
1918
+ "const": "stdout-first-json"
1919
+ },
1920
+ "equals": {
1921
+ "type": "object"
1922
+ }
1923
+ }
1924
+ }
1925
+ }
1926
+ },
1927
+ "planPostPublishStep": {
1928
+ "type": "object",
1929
+ "required": [
1930
+ "name",
1931
+ "command"
1932
+ ],
1933
+ "additionalProperties": false,
1934
+ "properties": {
1935
+ "name": {
1936
+ "type": "string",
1937
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
1938
+ },
1939
+ "command": {
1940
+ "type": "array",
1941
+ "minItems": 1,
1942
+ "items": {
1943
+ "type": "string"
1944
+ }
1945
+ },
1946
+ "cwd": {
1947
+ "type": "string",
1948
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
1949
+ },
1950
+ "timeoutMs": {
1951
+ "type": "integer",
1952
+ "minimum": 1000,
1953
+ "maximum": 7200000
1954
+ },
1955
+ "envAllowlist": {
1956
+ "type": "array",
1957
+ "items": {
1958
+ "type": "string",
1959
+ "pattern": "^(?!.*(?:TOKEN|SECRET|PASSWORD|PASSPHRASE|API_KEY|CREDENTIAL))[A-Z_][A-Z0-9_]*$"
1960
+ },
1961
+ "uniqueItems": true
1962
+ }
1963
+ }
1964
+ },
1965
+ "planPostPublishTarget": {
1966
+ "type": "object",
1967
+ "required": [
1968
+ "id",
1969
+ "kind",
1970
+ "remoteUrl",
1971
+ "visibility",
1972
+ "branch"
1973
+ ],
1974
+ "additionalProperties": false,
1975
+ "properties": {
1976
+ "id": {
1977
+ "type": "string",
1978
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
1979
+ },
1980
+ "kind": {
1981
+ "type": "string",
1982
+ "enum": [
1983
+ "payload-mirror",
1984
+ "marketplace-index"
1985
+ ]
1986
+ },
1987
+ "remoteUrl": {
1988
+ "type": "string",
1989
+ "pattern": "^(?:https?|file)://[^@]+\\.git$"
1990
+ },
1991
+ "visibility": {
1992
+ "type": "string",
1993
+ "enum": [
1994
+ "internal",
1995
+ "public"
1996
+ ]
1997
+ },
1998
+ "branch": {
1999
+ "type": "string",
2000
+ "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]*$"
2001
+ },
2002
+ "dependsOn": {
2003
+ "type": "string",
2004
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
2005
+ },
2006
+ "marketplace": {
2007
+ "type": "object",
2008
+ "required": [
2009
+ "form",
2010
+ "name",
2011
+ "owner"
2012
+ ],
2013
+ "additionalProperties": false,
2014
+ "properties": {
2015
+ "form": {
2016
+ "type": "string",
2017
+ "enum": [
2018
+ "github",
2019
+ "url"
2020
+ ]
2021
+ },
2022
+ "name": {
2023
+ "type": "string",
2024
+ "minLength": 1
2025
+ },
2026
+ "owner": {
2027
+ "type": "string",
2028
+ "minLength": 1
2029
+ },
2030
+ "sourceRepo": {
2031
+ "type": "string",
2032
+ "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$"
2033
+ }
2034
+ }
2035
+ },
2036
+ "staticFiles": {
2037
+ "type": "array",
2038
+ "items": {
2039
+ "type": "object",
2040
+ "required": [
2041
+ "from",
2042
+ "to"
2043
+ ],
2044
+ "additionalProperties": false,
2045
+ "properties": {
2046
+ "from": {
2047
+ "type": "string",
2048
+ "minLength": 1,
2049
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
2050
+ },
2051
+ "to": {
2052
+ "type": "string",
2053
+ "minLength": 1,
2054
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
2055
+ }
2056
+ }
2057
+ }
2058
+ }
2059
+ },
2060
+ "allOf": [
2061
+ {
2062
+ "if": {
2063
+ "properties": {
2064
+ "kind": {
2065
+ "const": "marketplace-index"
2066
+ }
2067
+ },
2068
+ "required": [
2069
+ "kind"
2070
+ ]
2071
+ },
2072
+ "then": {
2073
+ "required": [
2074
+ "marketplace"
2075
+ ]
2076
+ }
2077
+ },
2078
+ {
2079
+ "if": {
2080
+ "properties": {
2081
+ "kind": {
2082
+ "const": "payload-mirror"
2083
+ }
2084
+ },
2085
+ "required": [
2086
+ "kind"
2087
+ ]
2088
+ },
2089
+ "then": {
2090
+ "not": {
2091
+ "required": [
2092
+ "marketplace"
2093
+ ]
2094
+ }
2095
+ }
2096
+ }
2097
+ ]
2098
+ },
2099
+ "cursorHostScenario": {
2100
+ "type": "object",
2101
+ "additionalProperties": false,
2102
+ "required": [
2103
+ "workloadDocument",
2104
+ "fixtureFiles",
2105
+ "protectedWorkspaceFiles",
2106
+ "platformManifest",
2107
+ "effectivePrompt",
2108
+ "expectedResult"
2109
+ ],
2110
+ "properties": {
2111
+ "workloadDocument": {
2112
+ "type": "string",
2113
+ "minLength": 1
2114
+ },
2115
+ "fixtureFiles": {
2116
+ "$ref": "#/definitions/cursorScenarioFiles"
2117
+ },
2118
+ "protectedWorkspaceFiles": {
2119
+ "$ref": "#/definitions/cursorScenarioFiles"
2120
+ },
2121
+ "platformManifest": {
2122
+ "type": "object"
2123
+ },
2124
+ "effectivePrompt": {
2125
+ "type": "string",
2126
+ "minLength": 1,
2127
+ "pattern": "^[^\\u0000]*$"
2128
+ },
2129
+ "expectedResult": {
2130
+ "type": "string"
2131
+ }
2132
+ }
2133
+ },
2134
+ "cursorScenarioFiles": {
2135
+ "type": "array",
2136
+ "minItems": 1,
2137
+ "items": {
2138
+ "type": "object",
2139
+ "additionalProperties": false,
2140
+ "required": [
2141
+ "path",
2142
+ "content"
2143
+ ],
2144
+ "properties": {
2145
+ "path": {
2146
+ "type": "string",
2147
+ "minLength": 1,
2148
+ "pattern": "^(?!/)(?!.*\\\\)(?!.*:)(?!.*\\u0000)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*(?:^|/)\\.cursor(?:/|$))(?!.*//)(?!.*\\/$).+$"
2149
+ },
2150
+ "content": {
2151
+ "type": "string"
2152
+ }
2153
+ }
2154
+ }
2155
+ }
2156
+ },
2157
+ "allOf": [
2158
+ {
2159
+ "if": {
2160
+ "properties": {
2161
+ "planVersion": {
2162
+ "const": 3
2163
+ }
2164
+ },
2165
+ "required": [
2166
+ "planVersion"
2167
+ ]
2168
+ },
2169
+ "then": {
2170
+ "properties": {
2171
+ "postPublish": {
2172
+ "type": "array",
2173
+ "items": {
2174
+ "$ref": "#/definitions/planPostPublish"
2175
+ }
2176
+ }
2177
+ },
2178
+ "required": [
2179
+ "postPublish"
2180
+ ]
2181
+ },
2182
+ "else": {
2183
+ "properties": {
2184
+ "postPublish": {
2185
+ "$ref": "#/definitions/planPostPublish"
2186
+ }
2187
+ }
2188
+ }
2189
+ },
2190
+ {
2191
+ "if": {
2192
+ "properties": {
2193
+ "workflowDecision": {
2194
+ "properties": {
2195
+ "decision": {
2196
+ "const": "public-bytes-unchanged"
2197
+ }
2198
+ },
2199
+ "required": [
2200
+ "decision"
2201
+ ]
2202
+ }
2203
+ },
2204
+ "required": [
2205
+ "workflowDecision"
2206
+ ]
2207
+ },
2208
+ "then": {
2209
+ "properties": {
2210
+ "externalActions": {
2211
+ "type": "array",
2212
+ "minItems": 0
2213
+ }
2214
+ }
2215
+ },
2216
+ "else": {
2217
+ "properties": {
2218
+ "externalActions": {
2219
+ "type": "array",
2220
+ "minItems": 1
2221
+ }
2222
+ }
2223
+ }
2224
+ }
2225
+ ]
2226
+ }