@behavproof/cli 0.0.0-stage → 0.1.0

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 (67) hide show
  1. package/README.md +14 -2
  2. package/dist/api.d.ts +6 -0
  3. package/dist/api.d.ts.map +1 -0
  4. package/dist/api.js +5 -0
  5. package/dist/api.js.map +1 -0
  6. package/dist/check.d.ts +272 -0
  7. package/dist/check.d.ts.map +1 -0
  8. package/dist/check.js +220 -0
  9. package/dist/check.js.map +1 -0
  10. package/dist/formal-evaluation.d.ts +108 -0
  11. package/dist/formal-evaluation.d.ts.map +1 -0
  12. package/dist/formal-evaluation.js +78 -0
  13. package/dist/formal-evaluation.js.map +1 -0
  14. package/dist/formal-worker.d.ts +2 -0
  15. package/dist/formal-worker.d.ts.map +1 -0
  16. package/dist/formal-worker.js +32 -0
  17. package/dist/formal-worker.js.map +1 -0
  18. package/dist/formal.d.ts +148 -0
  19. package/dist/formal.d.ts.map +1 -0
  20. package/dist/formal.js +99 -0
  21. package/dist/formal.js.map +1 -0
  22. package/dist/impact.d.ts +20 -0
  23. package/dist/impact.d.ts.map +1 -0
  24. package/dist/impact.js +23 -0
  25. package/dist/impact.js.map +1 -0
  26. package/dist/index.d.ts +3 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +151 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/pipeline.d.ts +38 -0
  31. package/dist/pipeline.d.ts.map +1 -0
  32. package/dist/pipeline.js +46 -0
  33. package/dist/pipeline.js.map +1 -0
  34. package/dist/project.d.ts +97 -0
  35. package/dist/project.d.ts.map +1 -0
  36. package/dist/project.js +101 -0
  37. package/dist/project.js.map +1 -0
  38. package/dist/registration.d.ts +595 -0
  39. package/dist/registration.d.ts.map +1 -0
  40. package/dist/registration.js +112 -0
  41. package/dist/registration.js.map +1 -0
  42. package/dist/report.d.ts +23 -0
  43. package/dist/report.d.ts.map +1 -0
  44. package/dist/report.js +34 -0
  45. package/dist/report.js.map +1 -0
  46. package/dist/scopes.d.ts +48 -0
  47. package/dist/scopes.d.ts.map +1 -0
  48. package/dist/scopes.js +60 -0
  49. package/dist/scopes.js.map +1 -0
  50. package/dist/trust.d.ts +533 -0
  51. package/dist/trust.d.ts.map +1 -0
  52. package/dist/trust.js +130 -0
  53. package/dist/trust.js.map +1 -0
  54. package/package.json +51 -4
  55. package/presets/basic-v1.json +21 -0
  56. package/presets/critical-v1.json +39 -0
  57. package/presets/standard-v1.json +21 -0
  58. package/schemas/config.schema.json +492 -0
  59. package/schemas/evidence.schema.json +3612 -0
  60. package/schemas/manifest.schema.json +225 -0
  61. package/schemas/policy.schema.json +21 -0
  62. package/schemas/registration.schema.json +1065 -0
  63. package/schemas/registry.schema.json +307 -0
  64. package/schemas/trust-root.schema.json +1445 -0
  65. package/templates/audit.yml +28 -0
  66. package/templates/protected-github-producer.yml +58 -0
  67. package/templates/protected-github-publisher.yml +111 -0
@@ -0,0 +1,1065 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "schemaVersion": {
6
+ "type": "number",
7
+ "const": 1
8
+ },
9
+ "repository": {
10
+ "type": "object",
11
+ "properties": {
12
+ "id": {
13
+ "type": "string",
14
+ "pattern": "^\\d+$"
15
+ },
16
+ "fullName": {
17
+ "type": "string",
18
+ "pattern": "^[\\w-]+\\/[\\w.-]+$"
19
+ }
20
+ },
21
+ "required": [
22
+ "id",
23
+ "fullName"
24
+ ],
25
+ "additionalProperties": false
26
+ },
27
+ "source": {
28
+ "type": "object",
29
+ "properties": {
30
+ "commitSha": {
31
+ "type": "string",
32
+ "pattern": "^[a-f0-9]{40}$"
33
+ },
34
+ "prNumber": {
35
+ "type": "integer",
36
+ "exclusiveMinimum": 0,
37
+ "maximum": 9007199254740991
38
+ },
39
+ "projectPath": {
40
+ "anyOf": [
41
+ {
42
+ "type": "string",
43
+ "const": "."
44
+ },
45
+ {
46
+ "type": "string",
47
+ "minLength": 1
48
+ }
49
+ ]
50
+ },
51
+ "policyRef": {
52
+ "type": "string",
53
+ "minLength": 1
54
+ },
55
+ "configRef": {
56
+ "type": "string",
57
+ "minLength": 1
58
+ },
59
+ "fileHashes": {
60
+ "type": "object",
61
+ "propertyNames": {
62
+ "type": "string",
63
+ "minLength": 1
64
+ },
65
+ "additionalProperties": {
66
+ "type": "string",
67
+ "pattern": "^[a-f0-9]{64}$"
68
+ }
69
+ }
70
+ },
71
+ "required": [
72
+ "commitSha",
73
+ "prNumber",
74
+ "projectPath",
75
+ "policyRef",
76
+ "fileHashes"
77
+ ],
78
+ "additionalProperties": false
79
+ },
80
+ "policyId": {
81
+ "type": "string",
82
+ "minLength": 1
83
+ },
84
+ "policy": {
85
+ "type": "object",
86
+ "properties": {
87
+ "schemaVersion": {
88
+ "type": "number",
89
+ "const": 1
90
+ },
91
+ "profileVersion": {
92
+ "type": "string",
93
+ "const": "1"
94
+ },
95
+ "rules": {}
96
+ },
97
+ "required": [
98
+ "schemaVersion",
99
+ "profileVersion",
100
+ "rules"
101
+ ],
102
+ "additionalProperties": false
103
+ },
104
+ "config": {
105
+ "type": "object",
106
+ "properties": {
107
+ "schemaVersion": {
108
+ "type": "number",
109
+ "const": 1
110
+ },
111
+ "formal": {
112
+ "type": "object",
113
+ "properties": {
114
+ "models": {
115
+ "minItems": 1,
116
+ "maxItems": 100,
117
+ "type": "array",
118
+ "items": {
119
+ "type": "object",
120
+ "properties": {
121
+ "id": {
122
+ "type": "string",
123
+ "minLength": 1
124
+ },
125
+ "contractId": {
126
+ "type": "string",
127
+ "minLength": 1
128
+ },
129
+ "model": {
130
+ "type": "string",
131
+ "minLength": 1
132
+ },
133
+ "modelSources": {
134
+ "default": [],
135
+ "maxItems": 10000,
136
+ "type": "array",
137
+ "items": {
138
+ "type": "string",
139
+ "minLength": 1
140
+ }
141
+ },
142
+ "quint": {
143
+ "type": "object",
144
+ "properties": {
145
+ "entry": {
146
+ "type": "string",
147
+ "minLength": 1
148
+ },
149
+ "version": {
150
+ "type": "string",
151
+ "minLength": 1
152
+ },
153
+ "apalacheVersion": {
154
+ "type": "string",
155
+ "minLength": 1
156
+ }
157
+ },
158
+ "required": [
159
+ "entry",
160
+ "version"
161
+ ],
162
+ "additionalProperties": false
163
+ },
164
+ "properties": {
165
+ "maxItems": 10000,
166
+ "type": "array",
167
+ "items": {
168
+ "type": "string",
169
+ "minLength": 1
170
+ }
171
+ },
172
+ "checks": {
173
+ "minItems": 1,
174
+ "maxItems": 10000,
175
+ "type": "array",
176
+ "items": {
177
+ "type": "string",
178
+ "enum": [
179
+ "parse",
180
+ "typecheck",
181
+ "test",
182
+ "run",
183
+ "verify"
184
+ ]
185
+ }
186
+ },
187
+ "maxSteps": {
188
+ "type": "integer",
189
+ "minimum": 1,
190
+ "maximum": 10000
191
+ },
192
+ "maxSamples": {
193
+ "default": 100,
194
+ "type": "integer",
195
+ "minimum": 1,
196
+ "maximum": 100000
197
+ },
198
+ "seed": {
199
+ "type": "string",
200
+ "minLength": 1
201
+ },
202
+ "timeoutMs": {
203
+ "default": 60000,
204
+ "type": "integer",
205
+ "minimum": 1,
206
+ "maximum": 3600000
207
+ },
208
+ "report": {
209
+ "type": "string",
210
+ "minLength": 1
211
+ },
212
+ "driver": {
213
+ "type": "string",
214
+ "minLength": 1
215
+ },
216
+ "driverSources": {
217
+ "maxItems": 10000,
218
+ "type": "array",
219
+ "items": {
220
+ "type": "string",
221
+ "minLength": 1
222
+ }
223
+ },
224
+ "implementation": {
225
+ "type": "string",
226
+ "minLength": 1
227
+ },
228
+ "implementationSources": {
229
+ "default": [],
230
+ "maxItems": 10000,
231
+ "type": "array",
232
+ "items": {
233
+ "type": "string",
234
+ "minLength": 1
235
+ }
236
+ },
237
+ "conformanceReport": {
238
+ "type": "string",
239
+ "minLength": 1
240
+ },
241
+ "traceReceipt": {
242
+ "type": "string",
243
+ "minLength": 1
244
+ },
245
+ "traceDirectory": {
246
+ "type": "string",
247
+ "minLength": 1
248
+ },
249
+ "requiredActions": {
250
+ "default": [],
251
+ "maxItems": 10000,
252
+ "type": "array",
253
+ "items": {
254
+ "type": "string",
255
+ "minLength": 1
256
+ }
257
+ },
258
+ "minTraces": {
259
+ "default": 1,
260
+ "type": "integer",
261
+ "minimum": 1,
262
+ "maximum": 9007199254740991
263
+ },
264
+ "minComparisons": {
265
+ "default": 1,
266
+ "type": "integer",
267
+ "minimum": 1,
268
+ "maximum": 9007199254740991
269
+ },
270
+ "requireCanary": {
271
+ "default": true,
272
+ "type": "boolean"
273
+ },
274
+ "canary": {
275
+ "type": "object",
276
+ "properties": {
277
+ "faultId": {
278
+ "type": "string",
279
+ "minLength": 1
280
+ },
281
+ "implementation": {
282
+ "type": "string",
283
+ "minLength": 1
284
+ },
285
+ "targetRef": {
286
+ "type": "string",
287
+ "minLength": 1
288
+ }
289
+ },
290
+ "required": [
291
+ "faultId",
292
+ "implementation",
293
+ "targetRef"
294
+ ],
295
+ "additionalProperties": false
296
+ }
297
+ },
298
+ "required": [
299
+ "id",
300
+ "contractId",
301
+ "model",
302
+ "quint",
303
+ "properties",
304
+ "checks",
305
+ "maxSteps",
306
+ "seed",
307
+ "report"
308
+ ],
309
+ "additionalProperties": false
310
+ }
311
+ }
312
+ },
313
+ "required": [
314
+ "models"
315
+ ],
316
+ "additionalProperties": false
317
+ },
318
+ "mode": {
319
+ "default": "audit",
320
+ "type": "string",
321
+ "enum": [
322
+ "audit",
323
+ "gate"
324
+ ]
325
+ },
326
+ "profile": {
327
+ "default": "standard",
328
+ "type": "string",
329
+ "enum": [
330
+ "basic",
331
+ "standard",
332
+ "critical"
333
+ ]
334
+ },
335
+ "profileVersion": {
336
+ "default": "1",
337
+ "type": "string",
338
+ "const": "1"
339
+ },
340
+ "riskOverrides": {
341
+ "default": [],
342
+ "type": "array",
343
+ "items": {
344
+ "type": "object",
345
+ "properties": {
346
+ "selector": {
347
+ "oneOf": [
348
+ {
349
+ "type": "object",
350
+ "properties": {
351
+ "kind": {
352
+ "type": "string",
353
+ "const": "path"
354
+ },
355
+ "value": {
356
+ "type": "string",
357
+ "minLength": 1
358
+ }
359
+ },
360
+ "required": [
361
+ "kind",
362
+ "value"
363
+ ],
364
+ "additionalProperties": false
365
+ },
366
+ {
367
+ "type": "object",
368
+ "properties": {
369
+ "kind": {
370
+ "type": "string",
371
+ "const": "module"
372
+ },
373
+ "value": {
374
+ "type": "string",
375
+ "minLength": 1
376
+ }
377
+ },
378
+ "required": [
379
+ "kind",
380
+ "value"
381
+ ],
382
+ "additionalProperties": false
383
+ },
384
+ {
385
+ "type": "object",
386
+ "properties": {
387
+ "kind": {
388
+ "type": "string",
389
+ "const": "contract-kind"
390
+ },
391
+ "value": {
392
+ "type": "string",
393
+ "enum": [
394
+ "examples",
395
+ "invariant",
396
+ "state_machine",
397
+ "api_contract",
398
+ "external"
399
+ ]
400
+ }
401
+ },
402
+ "required": [
403
+ "kind",
404
+ "value"
405
+ ],
406
+ "additionalProperties": false
407
+ }
408
+ ]
409
+ },
410
+ "profile": {
411
+ "type": "string",
412
+ "enum": [
413
+ "basic",
414
+ "standard",
415
+ "critical"
416
+ ]
417
+ }
418
+ },
419
+ "required": [
420
+ "selector",
421
+ "profile"
422
+ ],
423
+ "additionalProperties": false
424
+ }
425
+ },
426
+ "git": {
427
+ "default": {
428
+ "base": "origin/main"
429
+ },
430
+ "type": "object",
431
+ "properties": {
432
+ "base": {
433
+ "default": "origin/main",
434
+ "type": "string",
435
+ "minLength": 1
436
+ }
437
+ },
438
+ "additionalProperties": false
439
+ },
440
+ "reports": {
441
+ "default": {},
442
+ "type": "object",
443
+ "properties": {
444
+ "vitest": {
445
+ "type": "string",
446
+ "minLength": 1
447
+ },
448
+ "coverage": {
449
+ "type": "string",
450
+ "minLength": 1
451
+ },
452
+ "mutation": {
453
+ "type": "string",
454
+ "minLength": 1
455
+ }
456
+ },
457
+ "additionalProperties": false
458
+ },
459
+ "executionManifests": {
460
+ "default": [],
461
+ "type": "array",
462
+ "items": {
463
+ "type": "string",
464
+ "minLength": 1
465
+ }
466
+ },
467
+ "rules": {
468
+ "default": {}
469
+ },
470
+ "contracts": {
471
+ "default": {
472
+ "enabled": false,
473
+ "sources": [],
474
+ "requireExecutionEvidence": true,
475
+ "approval": {
476
+ "provider": "github-protected-review",
477
+ "requiredForRisk": [
478
+ "critical"
479
+ ],
480
+ "onUnverifiable": "unknown"
481
+ },
482
+ "documents": {
483
+ "output": ".behavproof/generated",
484
+ "commit": false
485
+ }
486
+ },
487
+ "type": "object",
488
+ "properties": {
489
+ "enabled": {
490
+ "default": false,
491
+ "type": "boolean"
492
+ },
493
+ "sources": {
494
+ "default": [],
495
+ "type": "array",
496
+ "items": {
497
+ "type": "object",
498
+ "properties": {
499
+ "type": {
500
+ "type": "string",
501
+ "enum": [
502
+ "vitest-inline",
503
+ "manifest",
504
+ "external",
505
+ "gherkin",
506
+ "openapi"
507
+ ]
508
+ },
509
+ "include": {
510
+ "type": "array",
511
+ "items": {
512
+ "type": "string",
513
+ "minLength": 1
514
+ }
515
+ }
516
+ },
517
+ "required": [
518
+ "type",
519
+ "include"
520
+ ],
521
+ "additionalProperties": false
522
+ }
523
+ },
524
+ "requireExecutionEvidence": {
525
+ "default": true,
526
+ "type": "boolean"
527
+ },
528
+ "approval": {
529
+ "default": {
530
+ "provider": "github-protected-review",
531
+ "requiredForRisk": [
532
+ "critical"
533
+ ],
534
+ "onUnverifiable": "unknown"
535
+ },
536
+ "type": "object",
537
+ "properties": {
538
+ "provider": {
539
+ "type": "string",
540
+ "const": "github-protected-review"
541
+ },
542
+ "requiredForRisk": {
543
+ "default": [
544
+ "critical"
545
+ ],
546
+ "type": "array",
547
+ "items": {
548
+ "type": "string",
549
+ "enum": [
550
+ "basic",
551
+ "standard",
552
+ "critical"
553
+ ]
554
+ }
555
+ },
556
+ "onUnverifiable": {
557
+ "default": "unknown",
558
+ "type": "string",
559
+ "const": "unknown"
560
+ }
561
+ },
562
+ "required": [
563
+ "provider"
564
+ ],
565
+ "additionalProperties": false
566
+ },
567
+ "documents": {
568
+ "default": {
569
+ "output": ".behavproof/generated",
570
+ "commit": false
571
+ },
572
+ "type": "object",
573
+ "properties": {
574
+ "output": {
575
+ "default": ".behavproof/generated",
576
+ "type": "string",
577
+ "minLength": 1
578
+ },
579
+ "commit": {
580
+ "default": false,
581
+ "type": "boolean"
582
+ }
583
+ },
584
+ "additionalProperties": false
585
+ }
586
+ },
587
+ "additionalProperties": false
588
+ }
589
+ },
590
+ "required": [
591
+ "schemaVersion"
592
+ ],
593
+ "additionalProperties": false
594
+ },
595
+ "baseline": {
596
+ "type": "object",
597
+ "properties": {
598
+ "schemaVersion": {
599
+ "type": "number",
600
+ "const": 1
601
+ },
602
+ "repositoryId": {
603
+ "type": "string",
604
+ "minLength": 1
605
+ },
606
+ "commitSha": {
607
+ "type": "string",
608
+ "minLength": 1
609
+ },
610
+ "contracts": {
611
+ "type": "array",
612
+ "items": {
613
+ "type": "object",
614
+ "properties": {
615
+ "id": {
616
+ "type": "string",
617
+ "minLength": 1
618
+ },
619
+ "formal": {
620
+ "type": "object",
621
+ "properties": {
622
+ "modelId": {
623
+ "type": "string",
624
+ "minLength": 1
625
+ },
626
+ "modelHash": {
627
+ "type": "string",
628
+ "pattern": "^[a-f0-9]{64}$"
629
+ },
630
+ "driverHash": {
631
+ "type": "string",
632
+ "pattern": "^[a-f0-9]{64}$"
633
+ },
634
+ "propertyIds": {
635
+ "minItems": 1,
636
+ "maxItems": 10000,
637
+ "type": "array",
638
+ "items": {
639
+ "type": "string",
640
+ "minLength": 1
641
+ }
642
+ }
643
+ },
644
+ "required": [
645
+ "modelId",
646
+ "modelHash",
647
+ "propertyIds"
648
+ ],
649
+ "additionalProperties": false
650
+ },
651
+ "kind": {
652
+ "type": "string",
653
+ "enum": [
654
+ "examples",
655
+ "invariant",
656
+ "state_machine",
657
+ "api_contract",
658
+ "external"
659
+ ]
660
+ },
661
+ "intentIds": {
662
+ "type": "array",
663
+ "items": {
664
+ "type": "string",
665
+ "minLength": 1
666
+ }
667
+ },
668
+ "revisionHash": {
669
+ "type": "string",
670
+ "pattern": "^[a-f0-9]{64}$"
671
+ },
672
+ "sourceRef": {
673
+ "type": "string",
674
+ "minLength": 1
675
+ },
676
+ "caseIds": {
677
+ "type": "array",
678
+ "items": {
679
+ "type": "string",
680
+ "minLength": 1
681
+ }
682
+ },
683
+ "risk": {
684
+ "type": "string",
685
+ "enum": [
686
+ "basic",
687
+ "standard",
688
+ "critical"
689
+ ]
690
+ },
691
+ "cases": {
692
+ "type": "array",
693
+ "items": {
694
+ "type": "object",
695
+ "properties": {
696
+ "id": {
697
+ "type": "string",
698
+ "minLength": 1
699
+ },
700
+ "input": {
701
+ "$ref": "#/$defs/__schema0"
702
+ },
703
+ "expected": {
704
+ "$ref": "#/$defs/__schema1"
705
+ },
706
+ "negative": {
707
+ "type": "boolean"
708
+ }
709
+ },
710
+ "required": [
711
+ "id",
712
+ "input",
713
+ "expected"
714
+ ],
715
+ "additionalProperties": false
716
+ }
717
+ }
718
+ },
719
+ "required": [
720
+ "id",
721
+ "kind",
722
+ "intentIds",
723
+ "revisionHash",
724
+ "sourceRef"
725
+ ],
726
+ "additionalProperties": false
727
+ }
728
+ },
729
+ "intents": {
730
+ "type": "array",
731
+ "items": {
732
+ "type": "object",
733
+ "properties": {
734
+ "id": {
735
+ "type": "string",
736
+ "minLength": 1
737
+ },
738
+ "statement": {
739
+ "type": "string",
740
+ "minLength": 1
741
+ },
742
+ "risk": {
743
+ "type": "string",
744
+ "enum": [
745
+ "basic",
746
+ "standard",
747
+ "critical"
748
+ ]
749
+ },
750
+ "contentHash": {
751
+ "type": "string",
752
+ "pattern": "^[a-f0-9]{64}$"
753
+ },
754
+ "origin": {
755
+ "type": "object",
756
+ "properties": {
757
+ "kind": {
758
+ "type": "string",
759
+ "enum": [
760
+ "inline",
761
+ "manifest",
762
+ "external"
763
+ ]
764
+ },
765
+ "ref": {
766
+ "type": "string",
767
+ "minLength": 1
768
+ }
769
+ },
770
+ "required": [
771
+ "kind",
772
+ "ref"
773
+ ],
774
+ "additionalProperties": false
775
+ }
776
+ },
777
+ "required": [
778
+ "id",
779
+ "statement",
780
+ "risk",
781
+ "contentHash",
782
+ "origin"
783
+ ],
784
+ "additionalProperties": false
785
+ }
786
+ },
787
+ "policyHash": {
788
+ "type": "string",
789
+ "pattern": "^[a-f0-9]{64}$"
790
+ },
791
+ "extractorVersion": {
792
+ "type": "string",
793
+ "minLength": 1
794
+ },
795
+ "scope": {
796
+ "type": "array",
797
+ "items": {
798
+ "type": "string",
799
+ "minLength": 1
800
+ }
801
+ },
802
+ "discoveryDiagnostics": {
803
+ "type": "array",
804
+ "items": {
805
+ "type": "object",
806
+ "properties": {
807
+ "code": {
808
+ "type": "string",
809
+ "minLength": 1
810
+ },
811
+ "sourceRef": {
812
+ "type": "string",
813
+ "minLength": 1
814
+ },
815
+ "message": {
816
+ "type": "string",
817
+ "minLength": 1
818
+ }
819
+ },
820
+ "required": [
821
+ "code",
822
+ "sourceRef",
823
+ "message"
824
+ ],
825
+ "additionalProperties": false
826
+ }
827
+ }
828
+ },
829
+ "required": [
830
+ "schemaVersion",
831
+ "commitSha",
832
+ "contracts",
833
+ "intents"
834
+ ],
835
+ "additionalProperties": false
836
+ },
837
+ "inputs": {
838
+ "minItems": 1,
839
+ "type": "array",
840
+ "items": {
841
+ "type": "string",
842
+ "minLength": 1
843
+ }
844
+ },
845
+ "configPaths": {
846
+ "type": "array",
847
+ "items": {
848
+ "type": "string",
849
+ "minLength": 1
850
+ }
851
+ },
852
+ "claimScopes": {
853
+ "type": "array",
854
+ "items": {
855
+ "type": "object",
856
+ "properties": {
857
+ "contractId": {
858
+ "type": "string",
859
+ "minLength": 1
860
+ },
861
+ "caseIds": {
862
+ "minItems": 1,
863
+ "type": "array",
864
+ "items": {
865
+ "type": "string",
866
+ "minLength": 1
867
+ }
868
+ },
869
+ "targetRef": {
870
+ "type": "string",
871
+ "minLength": 1
872
+ },
873
+ "method": {
874
+ "type": "string",
875
+ "minLength": 1
876
+ }
877
+ },
878
+ "required": [
879
+ "contractId",
880
+ "caseIds",
881
+ "targetRef",
882
+ "method"
883
+ ],
884
+ "additionalProperties": false
885
+ }
886
+ },
887
+ "approvals": {
888
+ "type": "array",
889
+ "items": {
890
+ "type": "object",
891
+ "properties": {
892
+ "schemaVersion": {
893
+ "type": "number",
894
+ "const": 1
895
+ },
896
+ "id": {
897
+ "type": "string",
898
+ "minLength": 1
899
+ },
900
+ "target": {
901
+ "type": "object",
902
+ "properties": {
903
+ "kind": {
904
+ "type": "string",
905
+ "enum": [
906
+ "intent",
907
+ "contract",
908
+ "policy",
909
+ "registry"
910
+ ]
911
+ },
912
+ "id": {
913
+ "type": "string",
914
+ "minLength": 1
915
+ },
916
+ "contentHash": {
917
+ "type": "string",
918
+ "pattern": "^[a-f0-9]{64}$"
919
+ }
920
+ },
921
+ "required": [
922
+ "kind",
923
+ "id",
924
+ "contentHash"
925
+ ],
926
+ "additionalProperties": false
927
+ },
928
+ "status": {
929
+ "type": "string",
930
+ "enum": [
931
+ "pass",
932
+ "fail",
933
+ "unknown",
934
+ "not_applicable"
935
+ ]
936
+ },
937
+ "source": {
938
+ "type": "object",
939
+ "properties": {
940
+ "provider": {
941
+ "type": "string",
942
+ "minLength": 1
943
+ },
944
+ "ref": {
945
+ "type": "string",
946
+ "minLength": 1
947
+ }
948
+ },
949
+ "required": [
950
+ "provider",
951
+ "ref"
952
+ ],
953
+ "additionalProperties": false
954
+ },
955
+ "approvedBy": {
956
+ "type": "array",
957
+ "items": {
958
+ "type": "string",
959
+ "minLength": 1
960
+ }
961
+ },
962
+ "subjectCommitSha": {
963
+ "type": "string",
964
+ "minLength": 1
965
+ },
966
+ "reasons": {
967
+ "type": "array",
968
+ "items": {
969
+ "type": "string",
970
+ "minLength": 1
971
+ }
972
+ }
973
+ },
974
+ "required": [
975
+ "schemaVersion",
976
+ "id",
977
+ "target",
978
+ "status",
979
+ "source",
980
+ "approvedBy",
981
+ "reasons"
982
+ ],
983
+ "additionalProperties": false
984
+ }
985
+ }
986
+ },
987
+ "required": [
988
+ "schemaVersion",
989
+ "repository",
990
+ "source",
991
+ "policyId",
992
+ "policy",
993
+ "config",
994
+ "baseline",
995
+ "inputs",
996
+ "configPaths",
997
+ "claimScopes",
998
+ "approvals"
999
+ ],
1000
+ "additionalProperties": false,
1001
+ "$defs": {
1002
+ "__schema0": {
1003
+ "anyOf": [
1004
+ {
1005
+ "type": "string"
1006
+ },
1007
+ {
1008
+ "type": "number"
1009
+ },
1010
+ {
1011
+ "type": "boolean"
1012
+ },
1013
+ {
1014
+ "type": "null"
1015
+ },
1016
+ {
1017
+ "type": "array",
1018
+ "items": {
1019
+ "$ref": "#/$defs/__schema0"
1020
+ }
1021
+ },
1022
+ {
1023
+ "type": "object",
1024
+ "propertyNames": {
1025
+ "type": "string"
1026
+ },
1027
+ "additionalProperties": {
1028
+ "$ref": "#/$defs/__schema0"
1029
+ }
1030
+ }
1031
+ ]
1032
+ },
1033
+ "__schema1": {
1034
+ "anyOf": [
1035
+ {
1036
+ "type": "string"
1037
+ },
1038
+ {
1039
+ "type": "number"
1040
+ },
1041
+ {
1042
+ "type": "boolean"
1043
+ },
1044
+ {
1045
+ "type": "null"
1046
+ },
1047
+ {
1048
+ "type": "array",
1049
+ "items": {
1050
+ "$ref": "#/$defs/__schema1"
1051
+ }
1052
+ },
1053
+ {
1054
+ "type": "object",
1055
+ "propertyNames": {
1056
+ "type": "string"
1057
+ },
1058
+ "additionalProperties": {
1059
+ "$ref": "#/$defs/__schema1"
1060
+ }
1061
+ }
1062
+ ]
1063
+ }
1064
+ }
1065
+ }