release-skill 0.2.0 → 0.2.2

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 (72) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/.codebuddy-plugin/plugin.json +10 -0
  4. package/.codex-plugin/plugin.json +2 -2
  5. package/.kimi-plugin/plugin.json +1 -1
  6. package/CHANGELOG.md +35 -0
  7. package/INSTALL.md +186 -4
  8. package/INSTALL.zh-CN.md +166 -4
  9. package/README.md +116 -13
  10. package/README.zh-CN.md +73 -13
  11. package/adapters/claude/.claude-plugin/marketplace.json +1 -1
  12. package/adapters/claude/.claude-plugin/plugin.json +1 -1
  13. package/adapters/claude/bin/release-skill.bundle.mjs +1718 -600
  14. package/adapters/claude/schemas/release-plan.schema.json +44 -2
  15. package/adapters/claude/schemas/release-project.schema.json +46 -4
  16. package/adapters/claude/schemas/release-run.schema.json +1 -0
  17. package/adapters/codex/.codex-plugin/plugin.json +2 -2
  18. package/adapters/codex/bin/release-skill.bundle.mjs +1718 -600
  19. package/adapters/codex/schemas/release-plan.schema.json +44 -2
  20. package/adapters/codex/schemas/release-project.schema.json +46 -4
  21. package/adapters/codex/schemas/release-run.schema.json +1 -0
  22. package/adapters/kimi/.kimi-plugin/plugin.json +1 -1
  23. package/adapters/kimi/bin/release-skill.bundle.mjs +1718 -600
  24. package/adapters/kimi/schemas/release-plan.schema.json +44 -2
  25. package/adapters/kimi/schemas/release-project.schema.json +46 -4
  26. package/adapters/kimi/schemas/release-run.schema.json +1 -0
  27. package/adapters/workbuddy/.codebuddy-plugin/plugin.json +12 -0
  28. package/adapters/workbuddy/bin/release-skill.bundle.mjs +86481 -0
  29. package/adapters/workbuddy/bin/release-skill.mjs +54 -0
  30. package/adapters/workbuddy/native/safe-write/binding.gyp +41 -0
  31. package/adapters/workbuddy/native/safe-write/prebuilds/darwin-arm64/safe_write.node +0 -0
  32. package/adapters/workbuddy/native/safe-write/prebuilds.json +24 -0
  33. package/adapters/workbuddy/native/safe-write/src/safe_write.cc +2032 -0
  34. package/adapters/workbuddy/schemas/.render-manifest.json +37 -0
  35. package/adapters/workbuddy/schemas/approval-record.schema.json +115 -0
  36. package/adapters/workbuddy/schemas/artifact-lock.schema.json +111 -0
  37. package/adapters/workbuddy/schemas/artifact-plan.schema.json +52 -0
  38. package/adapters/workbuddy/schemas/artifact-policy.schema.json +76 -0
  39. package/adapters/workbuddy/schemas/evidence-event.schema.json +89 -0
  40. package/adapters/workbuddy/schemas/release-plan.schema.json +924 -0
  41. package/adapters/workbuddy/schemas/release-project.schema.json +951 -0
  42. package/adapters/workbuddy/schemas/release-run.schema.json +344 -0
  43. package/adapters/workbuddy/skills/release-assess/SKILL.md +51 -0
  44. package/adapters/workbuddy/skills/release-help/SKILL.md +77 -0
  45. package/adapters/workbuddy/skills/release-prepare/SKILL.md +92 -0
  46. package/adapters/workbuddy/skills/release-publish/SKILL.md +57 -0
  47. package/adapters/workbuddy/skills/release-reconcile/SKILL.md +73 -0
  48. package/adapters/workbuddy/skills/release-setup/SKILL.md +95 -0
  49. package/adapters/workbuddy/skills/release-verify/SKILL.md +70 -0
  50. package/bin/release-skill-cli.mjs +46 -4
  51. package/bin/release-skill.bundle.mjs +1718 -600
  52. package/package.json +2 -1
  53. package/references/02-project-config.md +7 -0
  54. package/references/06-adapter-contract.md +21 -2
  55. package/schemas/release-plan.schema.json +44 -2
  56. package/schemas/release-project.schema.json +46 -4
  57. package/schemas/release-run.schema.json +1 -0
  58. package/scripts/sync-public-files.mjs +27 -4
  59. package/src/adapters/contract.mjs +1 -0
  60. package/src/adapters/plugin-marketplace.mjs +536 -23
  61. package/src/commands/assess.mjs +50 -1
  62. package/src/commands/prepare.mjs +273 -9
  63. package/src/commands/publish.mjs +1 -0
  64. package/src/commands/reconcile.mjs +1 -0
  65. package/src/commands/setup.mjs +7 -3
  66. package/src/commands/verify.mjs +2 -0
  67. package/src/core/checkpoints.mjs +7 -2
  68. package/src/core/plan.mjs +97 -4
  69. package/src/core/verification-gates.mjs +1 -1
  70. package/src/platforms/codebuddy.mjs +618 -0
  71. package/src/platforms/registry.mjs +100 -5
  72. package/src/producers/build-adapters.mjs +48 -6
@@ -0,0 +1,951 @@
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
+ }
40
+ },
41
+ "releaseUnits": {
42
+ "type": "array",
43
+ "minItems": 1,
44
+ "items": {
45
+ "type": "object",
46
+ "required": [
47
+ "id",
48
+ "source",
49
+ "publicRepo",
50
+ "version",
51
+ "distributions",
52
+ "publicFiles",
53
+ "requiredPublicFiles",
54
+ "previousPublicBaseline"
55
+ ],
56
+ "additionalProperties": false,
57
+ "properties": {
58
+ "id": {
59
+ "type": "string",
60
+ "minLength": 1,
61
+ "pattern": "^(?!\\.{1,2}$)[A-Za-z0-9][A-Za-z0-9._-]*$"
62
+ },
63
+ "source": {
64
+ "type": "string",
65
+ "minLength": 1,
66
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
67
+ },
68
+ "publicRepo": {
69
+ "type": "string",
70
+ "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$"
71
+ },
72
+ "production": {
73
+ "type": "object",
74
+ "additionalProperties": false,
75
+ "properties": {
76
+ "githubHost": {
77
+ "type": "string",
78
+ "pattern": "^[a-zA-Z0-9.-]+$"
79
+ },
80
+ "branchTemplate": {
81
+ "type": "string",
82
+ "minLength": 1
83
+ },
84
+ "releaseTitleTemplate": {
85
+ "type": "string",
86
+ "minLength": 1
87
+ },
88
+ "releaseNotes": {
89
+ "type": "string"
90
+ },
91
+ "branchStrategy": {
92
+ "type": "string",
93
+ "enum": [
94
+ "create-release-branch",
95
+ "advance-existing-branch",
96
+ "initialize-default-branch"
97
+ ]
98
+ },
99
+ "setAsDefaultBranch": {
100
+ "type": "boolean"
101
+ },
102
+ "expectedCurrentDefaultBranch": {
103
+ "type": "string",
104
+ "minLength": 1
105
+ }
106
+ }
107
+ },
108
+ "version": {
109
+ "type": "object",
110
+ "required": [
111
+ "source",
112
+ "tagTemplate"
113
+ ],
114
+ "additionalProperties": false,
115
+ "properties": {
116
+ "source": {
117
+ "type": "string",
118
+ "minLength": 1
119
+ },
120
+ "tagTemplate": {
121
+ "type": "string",
122
+ "minLength": 1
123
+ }
124
+ }
125
+ },
126
+ "distributions": {
127
+ "type": "array",
128
+ "minItems": 1,
129
+ "items": {
130
+ "type": "object",
131
+ "required": [
132
+ "type"
133
+ ],
134
+ "additionalProperties": false,
135
+ "properties": {
136
+ "type": {
137
+ "type": "string",
138
+ "enum": [
139
+ "npm",
140
+ "claude-plugin",
141
+ "codex-plugin",
142
+ "kimi-plugin",
143
+ "codebuddy-plugin"
144
+ ]
145
+ },
146
+ "package": {
147
+ "type": "string",
148
+ "minLength": 1,
149
+ "maxLength": 214,
150
+ "pattern": "^(?:@[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*|[a-z0-9][a-z0-9._-]*)$"
151
+ },
152
+ "access": {
153
+ "type": "string",
154
+ "enum": [
155
+ "public",
156
+ "restricted"
157
+ ]
158
+ },
159
+ "provenance": {
160
+ "type": "boolean"
161
+ },
162
+ "tag": {
163
+ "type": "string",
164
+ "minLength": 1
165
+ },
166
+ "registry": {
167
+ "type": "string",
168
+ "minLength": 1,
169
+ "pattern": "^https://[^\\s]+$",
170
+ "description": "Normalized HTTPS URL of the npm registry"
171
+ },
172
+ "publisher": {
173
+ "type": "string",
174
+ "minLength": 1,
175
+ "pattern": "^[a-z0-9][a-z0-9._-]*$",
176
+ "description": "Expected npm whoami username for this registry"
177
+ },
178
+ "plugin": {
179
+ "type": "string",
180
+ "minLength": 1,
181
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
182
+ },
183
+ "marketplace": {
184
+ "type": "string",
185
+ "minLength": 1,
186
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
187
+ },
188
+ "marketplaceRepo": {
189
+ "type": "string",
190
+ "pattern": "^[a-z0-9][a-z0-9._-]*/[a-z0-9][a-z0-9._-]*$",
191
+ "description": "外部独立市场仓库 owner/name;存在即启用外部市场形态"
192
+ },
193
+ "entrySkill": {
194
+ "type": "string",
195
+ "minLength": 1,
196
+ "pattern": "^[a-z0-9][a-z0-9-]*$"
197
+ },
198
+ "smokeBin": {
199
+ "type": "string",
200
+ "minLength": 1
201
+ },
202
+ "smokeArgs": {
203
+ "type": "array",
204
+ "items": {
205
+ "type": "string"
206
+ }
207
+ },
208
+ "smokeExpectedJson": {
209
+ "type": "object"
210
+ },
211
+ "timeoutMs": {
212
+ "type": "integer",
213
+ "minimum": 30000,
214
+ "maximum": 900000,
215
+ "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."
216
+ }
217
+ },
218
+ "allOf": [
219
+ {
220
+ "if": {
221
+ "properties": {
222
+ "type": {
223
+ "const": "npm"
224
+ }
225
+ }
226
+ },
227
+ "then": {
228
+ "required": [
229
+ "package",
230
+ "registry",
231
+ "publisher"
232
+ ]
233
+ }
234
+ },
235
+ {
236
+ "if": {
237
+ "required": [
238
+ "timeoutMs"
239
+ ]
240
+ },
241
+ "then": {
242
+ "properties": {
243
+ "type": {
244
+ "enum": [
245
+ "claude-plugin",
246
+ "codex-plugin",
247
+ "kimi-plugin",
248
+ "codebuddy-plugin"
249
+ ]
250
+ }
251
+ }
252
+ }
253
+ },
254
+ {
255
+ "if": {
256
+ "properties": {
257
+ "type": {
258
+ "enum": [
259
+ "claude-plugin",
260
+ "codex-plugin"
261
+ ]
262
+ }
263
+ }
264
+ },
265
+ "then": {
266
+ "required": [
267
+ "plugin",
268
+ "marketplace",
269
+ "entrySkill"
270
+ ]
271
+ }
272
+ },
273
+ {
274
+ "if": {
275
+ "properties": {
276
+ "type": {
277
+ "const": "kimi-plugin"
278
+ }
279
+ }
280
+ },
281
+ "then": {
282
+ "required": [
283
+ "plugin",
284
+ "entrySkill"
285
+ ]
286
+ }
287
+ },
288
+ {
289
+ "if": {
290
+ "properties": {
291
+ "type": {
292
+ "const": "codebuddy-plugin"
293
+ }
294
+ }
295
+ },
296
+ "then": {
297
+ "required": [
298
+ "plugin",
299
+ "entrySkill"
300
+ ]
301
+ }
302
+ },
303
+ {
304
+ "if": {
305
+ "properties": {
306
+ "type": {
307
+ "enum": [
308
+ "kimi-plugin",
309
+ "codebuddy-plugin"
310
+ ]
311
+ }
312
+ }
313
+ },
314
+ "then": {
315
+ "not": {
316
+ "required": [
317
+ "marketplaceRepo"
318
+ ]
319
+ }
320
+ }
321
+ },
322
+ {
323
+ "if": {
324
+ "required": [
325
+ "smokeExpectedJson"
326
+ ],
327
+ "properties": {
328
+ "smokeBin": {
329
+ "minLength": 1
330
+ }
331
+ }
332
+ },
333
+ "then": {
334
+ "required": [
335
+ "smokeBin"
336
+ ]
337
+ }
338
+ },
339
+ {
340
+ "if": {
341
+ "required": [
342
+ "smokeArgs"
343
+ ],
344
+ "properties": {
345
+ "smokeBin": {
346
+ "minLength": 1
347
+ }
348
+ }
349
+ },
350
+ "then": {
351
+ "required": [
352
+ "smokeBin"
353
+ ]
354
+ }
355
+ }
356
+ ]
357
+ }
358
+ },
359
+ "publicFiles": {
360
+ "type": "array",
361
+ "minItems": 1,
362
+ "items": {
363
+ "type": "object",
364
+ "required": [
365
+ "from",
366
+ "to",
367
+ "mode"
368
+ ],
369
+ "additionalProperties": false,
370
+ "properties": {
371
+ "sourceScope": {
372
+ "type": "string",
373
+ "enum": [
374
+ "unit",
375
+ "workspace"
376
+ ],
377
+ "default": "unit"
378
+ },
379
+ "from": {
380
+ "type": "string",
381
+ "minLength": 1,
382
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
383
+ },
384
+ "to": {
385
+ "type": "string",
386
+ "minLength": 1,
387
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
388
+ },
389
+ "mode": {
390
+ "type": "string",
391
+ "enum": [
392
+ "preserve"
393
+ ]
394
+ }
395
+ }
396
+ }
397
+ },
398
+ "requiredPublicFiles": {
399
+ "type": "array",
400
+ "uniqueItems": true,
401
+ "items": {
402
+ "type": "string",
403
+ "minLength": 1,
404
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
405
+ }
406
+ },
407
+ "previousPublicBaseline": {
408
+ "type": "object",
409
+ "required": [
410
+ "mode"
411
+ ],
412
+ "additionalProperties": false,
413
+ "properties": {
414
+ "mode": {
415
+ "type": "string",
416
+ "enum": [
417
+ "none",
418
+ "bound"
419
+ ]
420
+ },
421
+ "githubHost": {
422
+ "type": "string",
423
+ "pattern": "^[a-zA-Z0-9.-]+$"
424
+ },
425
+ "repo": {
426
+ "type": "string",
427
+ "pattern": "^[a-zA-Z0-9._-]+/[a-zA-Z0-9._-]+$"
428
+ },
429
+ "ref": {
430
+ "type": "string",
431
+ "minLength": 1
432
+ },
433
+ "commit": {
434
+ "type": "string",
435
+ "pattern": "^[a-f0-9]{40,64}$"
436
+ },
437
+ "tree": {
438
+ "type": "string",
439
+ "pattern": "^[a-f0-9]{40,64}$"
440
+ },
441
+ "manifestDigest": {
442
+ "type": "string",
443
+ "pattern": "^[a-f0-9]{64}$"
444
+ }
445
+ },
446
+ "if": {
447
+ "properties": {
448
+ "mode": {
449
+ "const": "bound"
450
+ }
451
+ }
452
+ },
453
+ "then": {
454
+ "required": [
455
+ "repo",
456
+ "ref",
457
+ "commit"
458
+ ]
459
+ },
460
+ "else": {
461
+ "allOf": [
462
+ {
463
+ "not": {
464
+ "required": [
465
+ "repo"
466
+ ]
467
+ }
468
+ },
469
+ {
470
+ "not": {
471
+ "required": [
472
+ "githubHost"
473
+ ]
474
+ }
475
+ },
476
+ {
477
+ "not": {
478
+ "required": [
479
+ "ref"
480
+ ]
481
+ }
482
+ },
483
+ {
484
+ "not": {
485
+ "required": [
486
+ "commit"
487
+ ]
488
+ }
489
+ },
490
+ {
491
+ "not": {
492
+ "required": [
493
+ "tree"
494
+ ]
495
+ }
496
+ },
497
+ {
498
+ "not": {
499
+ "required": [
500
+ "manifestDigest"
501
+ ]
502
+ }
503
+ }
504
+ ]
505
+ }
506
+ },
507
+ "releaseDocuments": {
508
+ "$ref": "#/definitions/releaseDocuments"
509
+ }
510
+ },
511
+ "allOf": [
512
+ {
513
+ "if": {
514
+ "required": [
515
+ "production"
516
+ ],
517
+ "properties": {
518
+ "production": {
519
+ "required": [
520
+ "branchStrategy"
521
+ ],
522
+ "properties": {
523
+ "branchStrategy": {
524
+ "enum": [
525
+ "advance-existing-branch",
526
+ "initialize-default-branch"
527
+ ]
528
+ }
529
+ }
530
+ }
531
+ }
532
+ },
533
+ "then": {
534
+ "properties": {
535
+ "previousPublicBaseline": {
536
+ "properties": {
537
+ "mode": {
538
+ "const": "bound"
539
+ }
540
+ },
541
+ "required": [
542
+ "mode"
543
+ ]
544
+ }
545
+ }
546
+ }
547
+ },
548
+ {
549
+ "if": {
550
+ "required": [
551
+ "production"
552
+ ],
553
+ "properties": {
554
+ "production": {
555
+ "required": [
556
+ "branchStrategy"
557
+ ],
558
+ "properties": {
559
+ "branchStrategy": {
560
+ "const": "initialize-default-branch"
561
+ }
562
+ }
563
+ }
564
+ }
565
+ },
566
+ "then": {
567
+ "properties": {
568
+ "production": {
569
+ "required": [
570
+ "setAsDefaultBranch",
571
+ "expectedCurrentDefaultBranch"
572
+ ],
573
+ "properties": {
574
+ "setAsDefaultBranch": {
575
+ "const": true
576
+ }
577
+ }
578
+ }
579
+ }
580
+ }
581
+ },
582
+ {
583
+ "if": {
584
+ "required": [
585
+ "production"
586
+ ],
587
+ "properties": {
588
+ "production": {
589
+ "required": [
590
+ "setAsDefaultBranch"
591
+ ],
592
+ "properties": {
593
+ "setAsDefaultBranch": {
594
+ "const": true
595
+ }
596
+ }
597
+ }
598
+ }
599
+ },
600
+ "then": {
601
+ "properties": {
602
+ "production": {
603
+ "required": [
604
+ "branchStrategy"
605
+ ],
606
+ "properties": {
607
+ "branchStrategy": {
608
+ "const": "initialize-default-branch"
609
+ }
610
+ }
611
+ }
612
+ }
613
+ }
614
+ }
615
+ ]
616
+ }
617
+ },
618
+ "verificationGates": {
619
+ "type": "array",
620
+ "items": {
621
+ "$ref": "#/definitions/verificationGate"
622
+ }
623
+ },
624
+ "hooks": {
625
+ "type": "object",
626
+ "additionalProperties": false,
627
+ "properties": {
628
+ "docs": {
629
+ "$ref": "#/definitions/hook"
630
+ },
631
+ "build": {
632
+ "$ref": "#/definitions/hook"
633
+ },
634
+ "test": {
635
+ "$ref": "#/definitions/hook"
636
+ },
637
+ "typecheck": {
638
+ "$ref": "#/definitions/hook"
639
+ },
640
+ "lint": {
641
+ "$ref": "#/definitions/hook"
642
+ }
643
+ }
644
+ },
645
+ "policy": {
646
+ "type": "object",
647
+ "additionalProperties": false,
648
+ "properties": {
649
+ "forbiddenPaths": {
650
+ "type": "array",
651
+ "items": {
652
+ "type": "string"
653
+ }
654
+ },
655
+ "forbiddenContentPatterns": {
656
+ "type": "array",
657
+ "items": {
658
+ "type": "string"
659
+ }
660
+ }
661
+ }
662
+ }
663
+ },
664
+ "definitions": {
665
+ "hook": {
666
+ "type": "object",
667
+ "required": [
668
+ "command"
669
+ ],
670
+ "additionalProperties": false,
671
+ "properties": {
672
+ "command": {
673
+ "type": "array",
674
+ "minItems": 1,
675
+ "items": {
676
+ "type": "string"
677
+ }
678
+ },
679
+ "cwd": {
680
+ "type": "string",
681
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
682
+ },
683
+ "timeoutMs": {
684
+ "type": "integer",
685
+ "minimum": 1000,
686
+ "maximum": 7200000
687
+ },
688
+ "envAllowlist": {
689
+ "type": "array",
690
+ "items": {
691
+ "type": "string",
692
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
693
+ },
694
+ "uniqueItems": true
695
+ },
696
+ "cacheable": {
697
+ "type": "boolean",
698
+ "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)."
699
+ },
700
+ "cacheInputs": {
701
+ "type": "array",
702
+ "minItems": 1,
703
+ "items": {
704
+ "type": "string",
705
+ "minLength": 1
706
+ },
707
+ "uniqueItems": true,
708
+ "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."
709
+ }
710
+ }
711
+ },
712
+ "releaseDocuments": {
713
+ "type": "object",
714
+ "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.",
715
+ "required": [
716
+ "notesSource",
717
+ "locales",
718
+ "changelogs",
719
+ "readmes"
720
+ ],
721
+ "additionalProperties": false,
722
+ "properties": {
723
+ "notesSource": {
724
+ "type": "string",
725
+ "minLength": 1,
726
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$)(?!.*\\{(?!version\\}))(?!.*(?<!\\{version)\\}).+\\.(?:yaml|yml|json)$"
727
+ },
728
+ "locales": {
729
+ "type": "array",
730
+ "minItems": 1,
731
+ "uniqueItems": true,
732
+ "items": {
733
+ "type": "string",
734
+ "pattern": "^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"
735
+ }
736
+ },
737
+ "changelogs": {
738
+ "type": "array",
739
+ "minItems": 1,
740
+ "items": {
741
+ "$ref": "#/definitions/releaseDocumentsChangelog"
742
+ }
743
+ },
744
+ "readmes": {
745
+ "type": "array",
746
+ "minItems": 1,
747
+ "items": {
748
+ "$ref": "#/definitions/releaseDocumentsReadme"
749
+ }
750
+ }
751
+ }
752
+ },
753
+ "releaseDocumentsChangelog": {
754
+ "type": "object",
755
+ "required": [
756
+ "path",
757
+ "locale"
758
+ ],
759
+ "additionalProperties": false,
760
+ "properties": {
761
+ "path": {
762
+ "type": "string",
763
+ "minLength": 1,
764
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
765
+ },
766
+ "locale": {
767
+ "type": "string",
768
+ "pattern": "^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"
769
+ }
770
+ }
771
+ },
772
+ "releaseDocumentsReadme": {
773
+ "type": "object",
774
+ "required": [
775
+ "path",
776
+ "locale",
777
+ "regions"
778
+ ],
779
+ "additionalProperties": false,
780
+ "properties": {
781
+ "path": {
782
+ "type": "string",
783
+ "minLength": 1,
784
+ "pattern": "^(?!/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(/|$))(?!\\.$)(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/$).*$"
785
+ },
786
+ "locale": {
787
+ "type": "string",
788
+ "pattern": "^[a-zA-Z]{2,3}(?:-[A-Za-z0-9]{2,8})*$"
789
+ },
790
+ "regions": {
791
+ "type": "array",
792
+ "minItems": 1,
793
+ "uniqueItems": true,
794
+ "items": {
795
+ "type": "string",
796
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
797
+ }
798
+ },
799
+ "versionMarkers": {
800
+ "type": "array",
801
+ "minItems": 1,
802
+ "uniqueItems": true,
803
+ "items": {
804
+ "$ref": "#/definitions/releaseDocumentsVersionMarker"
805
+ }
806
+ }
807
+ }
808
+ },
809
+ "releaseDocumentsVersionMarker": {
810
+ "type": "object",
811
+ "required": [
812
+ "id",
813
+ "pattern"
814
+ ],
815
+ "additionalProperties": false,
816
+ "properties": {
817
+ "id": {
818
+ "type": "string",
819
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
820
+ },
821
+ "pattern": {
822
+ "type": "string",
823
+ "minLength": 1
824
+ }
825
+ }
826
+ },
827
+ "verificationGate": {
828
+ "type": "object",
829
+ "required": [
830
+ "id",
831
+ "phase",
832
+ "scope",
833
+ "command",
834
+ "cwd",
835
+ "timeoutMs",
836
+ "envAllowlist"
837
+ ],
838
+ "additionalProperties": false,
839
+ "properties": {
840
+ "id": {
841
+ "type": "string",
842
+ "pattern": "^[a-z0-9][a-z0-9._-]*$"
843
+ },
844
+ "phase": {
845
+ "type": "string",
846
+ "enum": [
847
+ "snapshot-verify",
848
+ "consumer-verify"
849
+ ]
850
+ },
851
+ "scope": {
852
+ "type": "object",
853
+ "required": [
854
+ "unit"
855
+ ],
856
+ "additionalProperties": false,
857
+ "properties": {
858
+ "unit": {
859
+ "type": "string",
860
+ "pattern": "^(?!\\.{1,2}$)[A-Za-z0-9][A-Za-z0-9._-]*$"
861
+ },
862
+ "distribution": {
863
+ "type": "string",
864
+ "enum": [
865
+ "npm",
866
+ "claude-plugin",
867
+ "codex-plugin",
868
+ "kimi-plugin",
869
+ "codebuddy-plugin"
870
+ ]
871
+ }
872
+ }
873
+ },
874
+ "command": {
875
+ "type": "array",
876
+ "minItems": 1,
877
+ "items": {
878
+ "type": "string"
879
+ }
880
+ },
881
+ "cwd": {
882
+ "type": "string",
883
+ "pattern": "^(?:\\.$|(?!\\/)(?!\\.\\/)(?!.*\\\\)(?!.*:)(?!\\.\\.(?:\\/|$))(?!.*\\/\\.\\.\\/)(?!.*\\/\\.\\.$)(?!.*\\/\\.\\/)(?!.*\\/\\/)(?!.*\\0)(?!.*\\/\\.$)(?!.*\\/\\/$)(?!.*\\/$).*)$"
884
+ },
885
+ "timeoutMs": {
886
+ "type": "integer",
887
+ "minimum": 1000,
888
+ "maximum": 7200000
889
+ },
890
+ "envAllowlist": {
891
+ "type": "array",
892
+ "items": {
893
+ "type": "string",
894
+ "pattern": "^[A-Z_][A-Z0-9_]*$"
895
+ },
896
+ "uniqueItems": true
897
+ },
898
+ "expectedJson": {
899
+ "type": "object"
900
+ }
901
+ },
902
+ "allOf": [
903
+ {
904
+ "if": {
905
+ "properties": {
906
+ "phase": {
907
+ "const": "consumer-verify"
908
+ }
909
+ },
910
+ "required": [
911
+ "phase"
912
+ ]
913
+ },
914
+ "then": {
915
+ "properties": {
916
+ "scope": {
917
+ "required": [
918
+ "unit",
919
+ "distribution"
920
+ ]
921
+ }
922
+ }
923
+ }
924
+ },
925
+ {
926
+ "if": {
927
+ "properties": {
928
+ "phase": {
929
+ "const": "snapshot-verify"
930
+ }
931
+ },
932
+ "required": [
933
+ "phase"
934
+ ]
935
+ },
936
+ "then": {
937
+ "properties": {
938
+ "scope": {
939
+ "not": {
940
+ "required": [
941
+ "distribution"
942
+ ]
943
+ }
944
+ }
945
+ }
946
+ }
947
+ }
948
+ ]
949
+ }
950
+ }
951
+ }