release-skill 0.1.1 → 0.1.4

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 (108) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/.codex-plugin/plugin.json +3 -3
  4. package/CHANGELOG.md +89 -0
  5. package/INSTALL.md +216 -5
  6. package/INSTALL.zh-CN.md +358 -0
  7. package/README.md +411 -67
  8. package/README.zh-CN.md +377 -59
  9. package/adapters/claude/.claude-plugin/marketplace.json +1 -1
  10. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  11. package/adapters/claude/bin/release-skill.bundle.mjs +79284 -0
  12. package/adapters/claude/bin/release-skill.mjs +34 -0
  13. package/adapters/claude/native/safe-write/binding.gyp +40 -0
  14. package/adapters/claude/native/safe-write/prebuilds/darwin-arm64/safe_write.node +0 -0
  15. package/adapters/claude/native/safe-write/prebuilds.json +24 -0
  16. package/adapters/claude/native/safe-write/src/safe_write.cc +2032 -0
  17. package/adapters/claude/schemas/.render-manifest.json +37 -0
  18. package/adapters/claude/schemas/approval-record.schema.json +115 -0
  19. package/adapters/claude/schemas/artifact-lock.schema.json +111 -0
  20. package/adapters/claude/schemas/artifact-plan.schema.json +52 -0
  21. package/adapters/claude/schemas/artifact-policy.schema.json +76 -0
  22. package/adapters/claude/schemas/evidence-event.schema.json +89 -0
  23. package/adapters/claude/schemas/release-plan.schema.json +860 -0
  24. package/adapters/claude/schemas/release-project.schema.json +736 -0
  25. package/adapters/claude/schemas/release-run.schema.json +342 -0
  26. package/adapters/claude/skills/release-assess/SKILL.md +5 -6
  27. package/adapters/claude/skills/release-help/SKILL.md +14 -18
  28. package/adapters/claude/skills/release-prepare/SKILL.md +16 -6
  29. package/adapters/claude/skills/release-publish/SKILL.md +7 -7
  30. package/adapters/claude/skills/release-reconcile/SKILL.md +6 -6
  31. package/adapters/claude/skills/release-setup/SKILL.md +95 -0
  32. package/adapters/claude/skills/release-verify/SKILL.md +7 -7
  33. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  34. package/adapters/codex/bin/release-skill.bundle.mjs +79284 -0
  35. package/adapters/codex/bin/release-skill.mjs +34 -0
  36. package/adapters/codex/native/safe-write/binding.gyp +40 -0
  37. package/adapters/codex/native/safe-write/prebuilds/darwin-arm64/safe_write.node +0 -0
  38. package/adapters/codex/native/safe-write/prebuilds.json +24 -0
  39. package/adapters/codex/native/safe-write/src/safe_write.cc +2032 -0
  40. package/adapters/codex/schemas/.render-manifest.json +37 -0
  41. package/adapters/codex/schemas/approval-record.schema.json +115 -0
  42. package/adapters/codex/schemas/artifact-lock.schema.json +111 -0
  43. package/adapters/codex/schemas/artifact-plan.schema.json +52 -0
  44. package/adapters/codex/schemas/artifact-policy.schema.json +76 -0
  45. package/adapters/codex/schemas/evidence-event.schema.json +89 -0
  46. package/adapters/codex/schemas/release-plan.schema.json +860 -0
  47. package/adapters/codex/schemas/release-project.schema.json +736 -0
  48. package/adapters/codex/schemas/release-run.schema.json +342 -0
  49. package/adapters/codex/skills/release-assess/SKILL.md +12 -6
  50. package/adapters/codex/skills/release-help/SKILL.md +21 -18
  51. package/adapters/codex/skills/release-prepare/SKILL.md +23 -6
  52. package/adapters/codex/skills/release-publish/SKILL.md +14 -7
  53. package/adapters/codex/skills/release-reconcile/SKILL.md +13 -6
  54. package/adapters/codex/skills/release-setup/SKILL.md +102 -0
  55. package/adapters/codex/skills/release-verify/SKILL.md +14 -7
  56. package/bin/release-skill-cli.mjs +807 -0
  57. package/bin/release-skill.bundle.mjs +79284 -0
  58. package/bin/release-skill.mjs +23 -732
  59. package/native/safe-write/prebuilds/darwin-arm64/safe_write.node +0 -0
  60. package/native/safe-write/prebuilds.json +22 -2
  61. package/native/safe-write/src/safe_write.cc +11 -2
  62. package/package.json +8 -2
  63. package/references/02-project-config.md +55 -4
  64. package/references/05-evidence-and-errors.md +6 -2
  65. package/schemas/release-plan.schema.json +556 -65
  66. package/schemas/release-project.schema.json +406 -29
  67. package/schemas/release-run.schema.json +165 -18
  68. package/scripts/build-bundle.mjs +133 -0
  69. package/skills/release-assess/SKILL.md +5 -6
  70. package/skills/release-help/SKILL.md +14 -18
  71. package/skills/release-prepare/SKILL.md +16 -6
  72. package/skills/release-publish/SKILL.md +7 -7
  73. package/skills/release-reconcile/SKILL.md +6 -6
  74. package/skills/release-setup/SKILL.md +95 -0
  75. package/skills/release-verify/SKILL.md +7 -7
  76. package/skills-src/release-assess/SKILL.md +5 -6
  77. package/skills-src/release-help/SKILL.md +14 -18
  78. package/skills-src/release-prepare/SKILL.md +16 -6
  79. package/skills-src/release-publish/SKILL.md +7 -7
  80. package/skills-src/release-reconcile/SKILL.md +6 -6
  81. package/skills-src/release-setup/SKILL.md +95 -0
  82. package/skills-src/release-verify/SKILL.md +7 -7
  83. package/src/adapters/contract.mjs +3 -0
  84. package/src/adapters/git-github.mjs +84 -2
  85. package/src/adapters/npm.mjs +5 -13
  86. package/src/adapters/plugin-marketplace.mjs +132 -52
  87. package/src/adapters/push-snapshot.mjs +84 -17
  88. package/src/artifacts/policy.mjs +4 -7
  89. package/src/artifacts/safe-fs-backend-internal.mjs +69 -21
  90. package/src/commands/prepare.mjs +244 -20
  91. package/src/commands/publish.mjs +46 -0
  92. package/src/commands/reconcile.mjs +152 -0
  93. package/src/commands/setup.mjs +1525 -0
  94. package/src/commands/verify.mjs +122 -26
  95. package/src/core/approval.mjs +4 -6
  96. package/src/core/config.mjs +42 -8
  97. package/src/core/errors.mjs +4 -0
  98. package/src/core/pkg-root.mjs +22 -0
  99. package/src/core/plan.mjs +132 -4
  100. package/src/core/previous-public-baseline.mjs +21 -1
  101. package/src/core/run.mjs +4 -4
  102. package/src/core/trusted-resource.mjs +96 -0
  103. package/src/core/verification-gates.mjs +451 -0
  104. package/src/docs/version-gate.mjs +164 -0
  105. package/src/producers/build-adapters.mjs +512 -55
  106. package/src/snapshot/frozen.mjs +221 -7
  107. package/src/snapshot/public-map.mjs +7 -4
  108. package/src/snapshot/scan.mjs +2 -1
@@ -4,7 +4,13 @@
4
4
  "title": "Release Plan",
5
5
  "description": "Schema for frozen release plan produced by the prepare phase",
6
6
  "type": "object",
7
- "required": ["planVersion", "status", "baseline", "units", "externalActions"],
7
+ "required": [
8
+ "planVersion",
9
+ "status",
10
+ "baseline",
11
+ "units",
12
+ "externalActions"
13
+ ],
8
14
  "additionalProperties": false,
9
15
  "properties": {
10
16
  "planVersion": {
@@ -28,16 +34,26 @@
28
34
  },
29
35
  "production": {
30
36
  "type": "object",
31
- "required": ["mode", "assetRoot"],
37
+ "required": [
38
+ "mode",
39
+ "assetRoot"
40
+ ],
32
41
  "additionalProperties": false,
33
42
  "properties": {
34
- "mode": { "const": "github-npm-v1" },
35
- "assetRoot": { "type": "string", "minLength": 1 }
43
+ "mode": {
44
+ "const": "github-npm-v1"
45
+ },
46
+ "assetRoot": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ }
36
50
  }
37
51
  },
38
52
  "baseline": {
39
53
  "type": "object",
40
- "required": ["gitTreeHash"],
54
+ "required": [
55
+ "gitTreeHash"
56
+ ],
41
57
  "additionalProperties": false,
42
58
  "properties": {
43
59
  "gitTreeHash": {
@@ -59,7 +75,9 @@
59
75
  },
60
76
  "dirtyFiles": {
61
77
  "type": "array",
62
- "items": { "type": "string" }
78
+ "items": {
79
+ "type": "string"
80
+ }
63
81
  },
64
82
  "capturedAt": {
65
83
  "type": "string",
@@ -72,7 +90,11 @@
72
90
  "minItems": 1,
73
91
  "items": {
74
92
  "type": "object",
75
- "required": ["id", "targetVersion", "previousPublicBaseline"],
93
+ "required": [
94
+ "id",
95
+ "targetVersion",
96
+ "previousPublicBaseline"
97
+ ],
76
98
  "additionalProperties": false,
77
99
  "properties": {
78
100
  "id": {
@@ -99,53 +121,235 @@
99
121
  },
100
122
  "productionConfig": {
101
123
  "type": "object",
124
+ "required": [
125
+ "githubHost",
126
+ "branchTemplate",
127
+ "branchStrategy"
128
+ ],
102
129
  "additionalProperties": false,
103
130
  "properties": {
104
- "githubHost": { "type": "string" },
105
- "branchTemplate": { "type": "string" },
106
- "releaseTitleTemplate": { "type": "string" },
107
- "releaseNotes": { "type": "string" }
108
- }
131
+ "githubHost": {
132
+ "type": "string"
133
+ },
134
+ "branchTemplate": {
135
+ "type": "string"
136
+ },
137
+ "releaseTitleTemplate": {
138
+ "type": "string"
139
+ },
140
+ "releaseNotes": {
141
+ "type": "string"
142
+ },
143
+ "branchStrategy": {
144
+ "type": "string",
145
+ "enum": [
146
+ "create-release-branch",
147
+ "advance-existing-branch",
148
+ "initialize-default-branch"
149
+ ]
150
+ },
151
+ "setAsDefaultBranch": {
152
+ "type": "boolean"
153
+ },
154
+ "expectedCurrentDefaultBranch": {
155
+ "type": "string",
156
+ "minLength": 1
157
+ }
158
+ },
159
+ "allOf": [
160
+ {
161
+ "if": {
162
+ "properties": {
163
+ "branchStrategy": {
164
+ "const": "initialize-default-branch"
165
+ }
166
+ },
167
+ "required": [
168
+ "branchStrategy"
169
+ ]
170
+ },
171
+ "then": {
172
+ "required": [
173
+ "setAsDefaultBranch",
174
+ "expectedCurrentDefaultBranch"
175
+ ],
176
+ "properties": {
177
+ "setAsDefaultBranch": {
178
+ "const": true
179
+ }
180
+ }
181
+ }
182
+ },
183
+ {
184
+ "if": {
185
+ "properties": {
186
+ "setAsDefaultBranch": {
187
+ "const": true
188
+ }
189
+ },
190
+ "required": [
191
+ "setAsDefaultBranch"
192
+ ]
193
+ },
194
+ "then": {
195
+ "properties": {
196
+ "branchStrategy": {
197
+ "const": "initialize-default-branch"
198
+ }
199
+ }
200
+ }
201
+ }
202
+ ]
109
203
  },
110
204
  "frozenSnapshot": {
111
205
  "type": "object",
112
- "required": ["path", "manifestDigest", "gitObjectDir", "branch", "commit", "tree"],
206
+ "required": [
207
+ "path",
208
+ "manifestDigest",
209
+ "gitObjectDir",
210
+ "branch",
211
+ "branchStrategy",
212
+ "commit",
213
+ "tree",
214
+ "commitTimestamp"
215
+ ],
113
216
  "additionalProperties": false,
114
217
  "properties": {
115
- "path": { "type": "string", "minLength": 1 },
116
- "manifestDigest": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
117
- "gitObjectDir": { "type": "string", "minLength": 1 },
118
- "branch": { "type": "string", "minLength": 1 },
119
- "commit": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
120
- "tree": { "type": "string", "pattern": "^[a-f0-9]{40,64}$" },
218
+ "path": {
219
+ "type": "string",
220
+ "minLength": 1
221
+ },
222
+ "manifestDigest": {
223
+ "type": "string",
224
+ "pattern": "^[a-f0-9]{64}$"
225
+ },
226
+ "gitObjectDir": {
227
+ "type": "string",
228
+ "minLength": 1
229
+ },
230
+ "branch": {
231
+ "type": "string",
232
+ "minLength": 1
233
+ },
234
+ "commit": {
235
+ "type": "string",
236
+ "pattern": "^[a-f0-9]{40,64}$"
237
+ },
238
+ "tree": {
239
+ "type": "string",
240
+ "pattern": "^[a-f0-9]{40,64}$"
241
+ },
242
+ "commitTimestamp": {
243
+ "type": "string",
244
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\+00:00$",
245
+ "description": "Plan freeze timestamp sampled exactly once during production prepare, 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, and must equal the plan's createdAt."
246
+ },
247
+ "parentCommit": {
248
+ "type": "string",
249
+ "pattern": "^[a-f0-9]{40,64}$"
250
+ },
251
+ "branchStrategy": {
252
+ "type": "string",
253
+ "enum": [
254
+ "create-release-branch",
255
+ "advance-existing-branch",
256
+ "initialize-default-branch"
257
+ ]
258
+ },
121
259
  "npm": {
122
260
  "anyOf": [
123
- { "type": "null" },
261
+ {
262
+ "type": "null"
263
+ },
124
264
  {
125
265
  "type": "object",
126
- "required": ["tarballPath", "tarballSha256", "integrity", "size"],
266
+ "required": [
267
+ "tarballPath",
268
+ "tarballSha256",
269
+ "integrity",
270
+ "size"
271
+ ],
127
272
  "additionalProperties": false,
128
273
  "properties": {
129
- "tarballPath": { "type": "string", "minLength": 1 },
130
- "tarballSha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
131
- "integrity": { "type": "string", "minLength": 1 },
132
- "size": { "type": "integer", "minimum": 1 }
274
+ "tarballPath": {
275
+ "type": "string",
276
+ "minLength": 1
277
+ },
278
+ "tarballSha256": {
279
+ "type": "string",
280
+ "pattern": "^[a-f0-9]{64}$"
281
+ },
282
+ "integrity": {
283
+ "type": "string",
284
+ "minLength": 1
285
+ },
286
+ "size": {
287
+ "type": "integer",
288
+ "minimum": 1
289
+ }
133
290
  }
134
291
  }
135
292
  ]
136
293
  }
137
- }
294
+ },
295
+ "allOf": [
296
+ {
297
+ "if": {
298
+ "properties": {
299
+ "branchStrategy": {
300
+ "enum": [
301
+ "advance-existing-branch",
302
+ "initialize-default-branch"
303
+ ]
304
+ }
305
+ },
306
+ "required": [
307
+ "branchStrategy"
308
+ ]
309
+ },
310
+ "then": {
311
+ "required": [
312
+ "parentCommit"
313
+ ]
314
+ }
315
+ },
316
+ {
317
+ "if": {
318
+ "properties": {
319
+ "branchStrategy": {
320
+ "const": "create-release-branch"
321
+ }
322
+ },
323
+ "required": [
324
+ "branchStrategy"
325
+ ]
326
+ },
327
+ "then": {
328
+ "not": {
329
+ "required": [
330
+ "parentCommit"
331
+ ]
332
+ }
333
+ }
334
+ }
335
+ ]
138
336
  },
139
337
  "distributions": {
140
338
  "type": "array",
141
339
  "items": {
142
340
  "type": "object",
143
- "required": ["type"],
341
+ "required": [
342
+ "type"
343
+ ],
144
344
  "additionalProperties": false,
145
345
  "properties": {
146
346
  "type": {
147
347
  "type": "string",
148
- "enum": ["npm", "claude-plugin", "codex-plugin"]
348
+ "enum": [
349
+ "npm",
350
+ "claude-plugin",
351
+ "codex-plugin"
352
+ ]
149
353
  },
150
354
  "package": {
151
355
  "type": "string",
@@ -154,7 +358,10 @@
154
358
  },
155
359
  "access": {
156
360
  "type": "string",
157
- "enum": ["public", "restricted"]
361
+ "enum": [
362
+ "public",
363
+ "restricted"
364
+ ]
158
365
  },
159
366
  "provenance": {
160
367
  "type": "boolean"
@@ -196,7 +403,9 @@
196
403
  },
197
404
  "smokeArgs": {
198
405
  "type": "array",
199
- "items": { "type": "string" }
406
+ "items": {
407
+ "type": "string"
408
+ }
200
409
  },
201
410
  "smokeExpectedJson": {
202
411
  "type": "object"
@@ -205,61 +414,199 @@
205
414
  "allOf": [
206
415
  {
207
416
  "if": {
208
- "properties": { "type": { "const": "npm" } }
417
+ "properties": {
418
+ "type": {
419
+ "const": "npm"
420
+ }
421
+ }
209
422
  },
210
- "then": { "required": ["package", "registry", "publisher"] }
423
+ "then": {
424
+ "required": [
425
+ "package",
426
+ "registry",
427
+ "publisher"
428
+ ]
429
+ }
211
430
  },
212
431
  {
213
432
  "if": {
214
- "properties": { "type": { "enum": ["claude-plugin", "codex-plugin"] } }
433
+ "properties": {
434
+ "type": {
435
+ "enum": [
436
+ "claude-plugin",
437
+ "codex-plugin"
438
+ ]
439
+ }
440
+ }
215
441
  },
216
- "then": { "required": ["plugin", "marketplace", "entrySkill"] }
442
+ "then": {
443
+ "required": [
444
+ "plugin",
445
+ "marketplace",
446
+ "entrySkill"
447
+ ]
448
+ }
217
449
  },
218
450
  {
219
451
  "if": {
220
- "required": ["smokeExpectedJson"],
221
- "properties": { "smokeBin": { "minLength": 1 } }
452
+ "required": [
453
+ "smokeExpectedJson"
454
+ ],
455
+ "properties": {
456
+ "smokeBin": {
457
+ "minLength": 1
458
+ }
459
+ }
222
460
  },
223
- "then": { "required": ["smokeBin"] }
461
+ "then": {
462
+ "required": [
463
+ "smokeBin"
464
+ ]
465
+ }
224
466
  },
225
467
  {
226
468
  "if": {
227
- "required": ["smokeArgs"],
228
- "properties": { "smokeBin": { "minLength": 1 } }
469
+ "required": [
470
+ "smokeArgs"
471
+ ],
472
+ "properties": {
473
+ "smokeBin": {
474
+ "minLength": 1
475
+ }
476
+ }
229
477
  },
230
- "then": { "required": ["smokeBin"] }
478
+ "then": {
479
+ "required": [
480
+ "smokeBin"
481
+ ]
482
+ }
231
483
  }
232
484
  ]
233
485
  }
234
486
  },
235
487
  "previousPublicBaseline": {
236
488
  "type": "object",
237
- "required": ["mode", "status"],
489
+ "required": [
490
+ "mode",
491
+ "status"
492
+ ],
238
493
  "additionalProperties": false,
239
494
  "properties": {
240
- "mode": { "type": "string", "enum": ["none", "bound"] },
241
- "githubHost": { "type": "string" },
242
- "repo": { "type": "string" },
243
- "ref": { "type": "string" },
244
- "commit": { "type": "string" },
245
- "tree": { "type": "string" },
246
- "manifestDigest": { "type": "string" },
247
- "observedCommit": { "type": "string" },
248
- "observedAt": { "type": "string", "format": "date-time" },
249
- "status": { "type": "string", "enum": ["consistent", "drifted", "unknown", "unobserved-offline", "blocking"] }
495
+ "mode": {
496
+ "type": "string",
497
+ "enum": [
498
+ "none",
499
+ "bound"
500
+ ]
501
+ },
502
+ "githubHost": {
503
+ "type": "string"
504
+ },
505
+ "repo": {
506
+ "type": "string"
507
+ },
508
+ "ref": {
509
+ "type": "string"
510
+ },
511
+ "commit": {
512
+ "type": "string"
513
+ },
514
+ "tree": {
515
+ "type": "string"
516
+ },
517
+ "manifestDigest": {
518
+ "type": "string"
519
+ },
520
+ "observedCommit": {
521
+ "type": "string"
522
+ },
523
+ "observedAt": {
524
+ "type": "string",
525
+ "format": "date-time"
526
+ },
527
+ "status": {
528
+ "type": "string",
529
+ "enum": [
530
+ "consistent",
531
+ "drifted",
532
+ "unknown",
533
+ "unobserved-offline",
534
+ "blocking"
535
+ ]
536
+ }
537
+ },
538
+ "if": {
539
+ "properties": {
540
+ "mode": {
541
+ "const": "bound"
542
+ }
543
+ }
544
+ },
545
+ "then": {
546
+ "required": [
547
+ "repo",
548
+ "ref",
549
+ "commit"
550
+ ]
250
551
  },
251
- "if": { "properties": { "mode": { "const": "bound" } } },
252
- "then": { "required": ["repo", "ref", "commit"] },
253
552
  "else": {
254
553
  "allOf": [
255
- { "not": { "required": ["repo"] } },
256
- { "not": { "required": ["githubHost"] } },
257
- { "not": { "required": ["ref"] } },
258
- { "not": { "required": ["commit"] } },
259
- { "not": { "required": ["tree"] } },
260
- { "not": { "required": ["manifestDigest"] } },
261
- { "not": { "required": ["observedCommit"] } },
262
- { "not": { "required": ["observedAt"] } }
554
+ {
555
+ "not": {
556
+ "required": [
557
+ "repo"
558
+ ]
559
+ }
560
+ },
561
+ {
562
+ "not": {
563
+ "required": [
564
+ "githubHost"
565
+ ]
566
+ }
567
+ },
568
+ {
569
+ "not": {
570
+ "required": [
571
+ "ref"
572
+ ]
573
+ }
574
+ },
575
+ {
576
+ "not": {
577
+ "required": [
578
+ "commit"
579
+ ]
580
+ }
581
+ },
582
+ {
583
+ "not": {
584
+ "required": [
585
+ "tree"
586
+ ]
587
+ }
588
+ },
589
+ {
590
+ "not": {
591
+ "required": [
592
+ "manifestDigest"
593
+ ]
594
+ }
595
+ },
596
+ {
597
+ "not": {
598
+ "required": [
599
+ "observedCommit"
600
+ ]
601
+ }
602
+ },
603
+ {
604
+ "not": {
605
+ "required": [
606
+ "observedAt"
607
+ ]
608
+ }
609
+ }
263
610
  ]
264
611
  }
265
612
  }
@@ -271,12 +618,22 @@
271
618
  "minLength": 1,
272
619
  "description": "Digest of the project configuration at plan freeze time"
273
620
  },
621
+ "verificationGates": {
622
+ "type": "array",
623
+ "items": {
624
+ "$ref": "#/definitions/verificationGate"
625
+ }
626
+ },
274
627
  "externalActions": {
275
628
  "type": "array",
276
629
  "minItems": 1,
277
630
  "items": {
278
631
  "type": "object",
279
- "required": ["id", "type", "adapter"],
632
+ "required": [
633
+ "id",
634
+ "type",
635
+ "adapter"
636
+ ],
280
637
  "additionalProperties": false,
281
638
  "properties": {
282
639
  "id": {
@@ -292,7 +649,8 @@
292
649
  "npm-publish",
293
650
  "github-release",
294
651
  "claude-marketplace-install",
295
- "codex-marketplace-install"
652
+ "codex-marketplace-install",
653
+ "set-default-branch"
296
654
  ]
297
655
  },
298
656
  "adapter": {
@@ -311,7 +669,12 @@
311
669
  },
312
670
  "status": {
313
671
  "type": "string",
314
- "enum": ["PENDING", "SUCCEEDED", "FAILED", "SKIPPED"],
672
+ "enum": [
673
+ "PENDING",
674
+ "SUCCEEDED",
675
+ "FAILED",
676
+ "SKIPPED"
677
+ ],
315
678
  "description": "Action execution status"
316
679
  }
317
680
  }
@@ -343,7 +706,12 @@
343
706
  "type": "array",
344
707
  "items": {
345
708
  "type": "object",
346
- "required": ["rule", "reason", "responsible", "expiresAt"],
709
+ "required": [
710
+ "rule",
711
+ "reason",
712
+ "responsible",
713
+ "expiresAt"
714
+ ],
347
715
  "additionalProperties": false,
348
716
  "properties": {
349
717
  "rule": {
@@ -365,5 +733,128 @@
365
733
  }
366
734
  }
367
735
  }
736
+ },
737
+ "definitions": {
738
+ "verificationGate": {
739
+ "type": "object",
740
+ "required": [
741
+ "id",
742
+ "phase",
743
+ "scope",
744
+ "command",
745
+ "cwd",
746
+ "timeoutMs",
747
+ "envAllowlist"
748
+ ],
749
+ "additionalProperties": false,
750
+ "properties": {
751
+ "id": {
752
+ "type": "string",
753
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
754
+ },
755
+ "phase": {
756
+ "type": "string",
757
+ "enum": [
758
+ "snapshot-verify",
759
+ "consumer-verify"
760
+ ]
761
+ },
762
+ "scope": {
763
+ "type": "object",
764
+ "required": [
765
+ "unit"
766
+ ],
767
+ "additionalProperties": false,
768
+ "properties": {
769
+ "unit": {
770
+ "type": "string",
771
+ "pattern": "^(?!\\.{1,2}$)[A-Za-z0-9][A-Za-z0-9._-]*$"
772
+ },
773
+ "distribution": {
774
+ "type": "string",
775
+ "enum": [
776
+ "npm",
777
+ "claude-plugin",
778
+ "codex-plugin"
779
+ ]
780
+ }
781
+ }
782
+ },
783
+ "command": {
784
+ "type": "array",
785
+ "minItems": 1,
786
+ "items": {
787
+ "type": "string"
788
+ }
789
+ },
790
+ "cwd": {
791
+ "type": "string",
792
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
793
+ },
794
+ "timeoutMs": {
795
+ "type": "integer",
796
+ "minimum": 1000,
797
+ "maximum": 7200000
798
+ },
799
+ "envAllowlist": {
800
+ "type": "array",
801
+ "items": {
802
+ "type": "string",
803
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
804
+ },
805
+ "uniqueItems": true
806
+ },
807
+ "expectedJson": {
808
+ "type": "object"
809
+ }
810
+ },
811
+ "allOf": [
812
+ {
813
+ "if": {
814
+ "properties": {
815
+ "phase": {
816
+ "const": "consumer-verify"
817
+ }
818
+ },
819
+ "required": [
820
+ "phase"
821
+ ]
822
+ },
823
+ "then": {
824
+ "properties": {
825
+ "scope": {
826
+ "required": [
827
+ "unit",
828
+ "distribution"
829
+ ]
830
+ }
831
+ }
832
+ }
833
+ },
834
+ {
835
+ "if": {
836
+ "properties": {
837
+ "phase": {
838
+ "const": "snapshot-verify"
839
+ }
840
+ },
841
+ "required": [
842
+ "phase"
843
+ ]
844
+ },
845
+ "then": {
846
+ "properties": {
847
+ "scope": {
848
+ "not": {
849
+ "required": [
850
+ "distribution"
851
+ ]
852
+ }
853
+ }
854
+ }
855
+ }
856
+ }
857
+ ]
858
+ }
368
859
  }
369
860
  }