release-skill 0.9.16 → 0.9.17

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