@toolproof-npm/schema 0.1.12

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.
@@ -0,0 +1,1241 @@
1
+ {
2
+ "$id": "https://schemas.toolproof.com/v0/Genesis.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "$defs": {
5
+ "BranchStep": {
6
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
7
+ "type": "object",
8
+ "allOf": [
9
+ {
10
+ "$ref": "#/$defs/Identifiable"
11
+ },
12
+ {
13
+ "$ref": "#/$defs/StepKind"
14
+ },
15
+ {
16
+ "type": "object",
17
+ "properties": {
18
+ "cases": {
19
+ "type": "array",
20
+ "items": {
21
+ "$ref": "#/$defs/ConditionalWrapper"
22
+ },
23
+ "minItems": 1,
24
+ "uniqueItems": true
25
+ },
26
+ "id": {
27
+ "$ref": "#/$defs/BranchStepId"
28
+ },
29
+ "kind": {
30
+ "const": "branch"
31
+ }
32
+ },
33
+ "required": [
34
+ "id",
35
+ "kind",
36
+ "cases"
37
+ ]
38
+ }
39
+ ],
40
+ "$anchor": "BranchStep"
41
+ },
42
+ "BranchStepId": {
43
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
44
+ "type": "string",
45
+ "$anchor": "BranchStepId",
46
+ "pattern": "^BRANCHSTEP-.+$"
47
+ },
48
+ "ConditionalWrapper": {
49
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
50
+ "type": "object",
51
+ "properties": {
52
+ "what": {
53
+ "$ref": "#/$defs/WorkStep"
54
+ },
55
+ "when": {
56
+ "$ref": "#/$defs/WorkStep"
57
+ }
58
+ },
59
+ "required": [
60
+ "when",
61
+ "what"
62
+ ],
63
+ "unevaluatedProperties": false,
64
+ "$anchor": "ConditionalWrapper"
65
+ },
66
+ "CreationContext": {
67
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
68
+ "type": "object",
69
+ "properties": {
70
+ "creationContext": {
71
+ "$ref": "#/$defs/ResourceSocket"
72
+ }
73
+ },
74
+ "required": [
75
+ "creationContext"
76
+ ],
77
+ "$anchor": "CreationContext"
78
+ },
79
+ "Description": {
80
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
81
+ "type": "object",
82
+ "properties": {
83
+ "description": {
84
+ "type": "string",
85
+ "$comment": "Validation is intercepted by an AI Agent that verifies the description against Toolproof's documentation standards.",
86
+ "minLength": 1,
87
+ "semanticValidation": "Ajv custom keyword to verify description."
88
+ }
89
+ },
90
+ "required": [
91
+ "description"
92
+ ],
93
+ "$anchor": "Description"
94
+ },
95
+ "Documented": {
96
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
97
+ "type": "object",
98
+ "allOf": [
99
+ {
100
+ "$ref": "#/$defs/Name"
101
+ },
102
+ {
103
+ "$ref": "#/$defs/Description"
104
+ }
105
+ ],
106
+ "$anchor": "Documented"
107
+ },
108
+ "Execution": {
109
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
110
+ "type": "object",
111
+ "allOf": [
112
+ {
113
+ "$ref": "#/$defs/Identifiable"
114
+ },
115
+ {
116
+ "type": "object",
117
+ "properties": {
118
+ "id": {
119
+ "$ref": "#/$defs/ExecutionId"
120
+ },
121
+ "jobId": {
122
+ "$ref": "#/$defs/ResourceId"
123
+ }
124
+ },
125
+ "required": [
126
+ "id",
127
+ "jobId"
128
+ ]
129
+ },
130
+ {
131
+ "$comment": "This will be overlayed at runtime to specify roleBindings corresponding to the roles of the underlying job.",
132
+ "$ref": "#/$defs/RoleBindingsOuter"
133
+ }
134
+ ],
135
+ "$anchor": "Execution"
136
+ },
137
+ "ExecutionId": {
138
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
139
+ "type": "string",
140
+ "$anchor": "ExecutionId",
141
+ "pattern": "^EXECUTION-.+$"
142
+ },
143
+ "ExtractionSchema": {
144
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
145
+ "type": "object",
146
+ "properties": {
147
+ "extractionSchema": {
148
+ "$ref": "#/$defs/ExtractionSchemaValue"
149
+ }
150
+ },
151
+ "required": [
152
+ "extractionSchema"
153
+ ],
154
+ "$anchor": "ExtractionSchema"
155
+ },
156
+ "ExtractionSchemaValue": {
157
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
158
+ "type": "object",
159
+ "allOf": [
160
+ {
161
+ "anyOf": [
162
+ {
163
+ "required": [
164
+ "$id"
165
+ ]
166
+ },
167
+ {
168
+ "required": [
169
+ "$anchor"
170
+ ]
171
+ },
172
+ true
173
+ ]
174
+ },
175
+ {
176
+ "$ref": "#/$defs/IdentityProp"
177
+ },
178
+ {
179
+ "$ref": "#/$defs/MeritProp"
180
+ },
181
+ {
182
+ "oneOf": [
183
+ {
184
+ "required": [
185
+ "additionalProperties"
186
+ ]
187
+ },
188
+ {
189
+ "required": [
190
+ "unevaluatedProperties"
191
+ ]
192
+ }
193
+ ]
194
+ }
195
+ ],
196
+ "properties": {
197
+ "$id": {
198
+ "type": "string",
199
+ "format": "uri"
200
+ },
201
+ "$schema": {
202
+ "const": "https://json-schema.org/draft/2020-12/schema"
203
+ },
204
+ "$defs": {
205
+ "type": "object"
206
+ },
207
+ "type": {
208
+ "const": "object"
209
+ },
210
+ "allOf": {
211
+ "type": "array",
212
+ "items": {
213
+ "type": "object"
214
+ }
215
+ },
216
+ "properties": {
217
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
218
+ "type": "object"
219
+ },
220
+ "additionalProperties": {
221
+ "const": false
222
+ },
223
+ "unevaluatedProperties": {
224
+ "const": false
225
+ },
226
+ "$anchor": {
227
+ "type": "string",
228
+ "pattern": "^[A-Za-z][A-Za-z0-9._-]*$"
229
+ }
230
+ },
231
+ "required": [
232
+ "$schema",
233
+ "type"
234
+ ],
235
+ "unevaluatedProperties": false,
236
+ "$anchor": "ExtractionSchemaValue"
237
+ },
238
+ "ForStep": {
239
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
240
+ "type": "object",
241
+ "allOf": [
242
+ {
243
+ "$ref": "#/$defs/Identifiable"
244
+ },
245
+ {
246
+ "$ref": "#/$defs/StepKind"
247
+ },
248
+ {
249
+ "type": "object",
250
+ "properties": {
251
+ "case": {
252
+ "$ref": "#/$defs/ConditionalWrapper"
253
+ },
254
+ "id": {
255
+ "$ref": "#/$defs/ForStepId"
256
+ },
257
+ "kind": {
258
+ "const": "for"
259
+ }
260
+ },
261
+ "required": [
262
+ "id",
263
+ "kind",
264
+ "case"
265
+ ]
266
+ }
267
+ ],
268
+ "$anchor": "ForStep"
269
+ },
270
+ "ForStepId": {
271
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
272
+ "type": "string",
273
+ "$anchor": "ForStepId",
274
+ "pattern": "^FORSTEP-.+$"
275
+ },
276
+ "FormatBase": {
277
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
278
+ "type": "object",
279
+ "allOf": [
280
+ {
281
+ "$ref": "#/$defs/IdentifiableDocumented"
282
+ },
283
+ {
284
+ "properties": {
285
+ "id": {
286
+ "$ref": "#/$defs/FormatId"
287
+ }
288
+ },
289
+ "required": [
290
+ "id"
291
+ ]
292
+ }
293
+ ],
294
+ "$anchor": "FormatBase"
295
+ },
296
+ "FormatData": {
297
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
298
+ "type": "object",
299
+ "allOf": [
300
+ {
301
+ "$ref": "#/$defs/FormatBase"
302
+ }
303
+ ],
304
+ "unevaluatedProperties": false,
305
+ "$anchor": "FormatData"
306
+ },
307
+ "FormatId": {
308
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
309
+ "type": "string",
310
+ "$anchor": "FormatId",
311
+ "pattern": "^FORMAT-.+$"
312
+ },
313
+ "FormatMeta": {
314
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
315
+ "type": "object",
316
+ "allOf": [
317
+ {
318
+ "$ref": "#/$defs/FormatBase"
319
+ },
320
+ {
321
+ "$ref": "#/$defs/Path"
322
+ }
323
+ ],
324
+ "unevaluatedProperties": false,
325
+ "$anchor": "FormatMeta"
326
+ },
327
+ "Identifiable": {
328
+ "type": "object",
329
+ "required": [
330
+ "id"
331
+ ],
332
+ "$anchor": "Identifiable"
333
+ },
334
+ "IdentifiableDocumented": {
335
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
336
+ "type": "object",
337
+ "allOf": [
338
+ {
339
+ "$ref": "#/$defs/Identifiable"
340
+ },
341
+ {
342
+ "$ref": "#/$defs/Documented"
343
+ }
344
+ ],
345
+ "$anchor": "IdentifiableDocumented"
346
+ },
347
+ "IdentityProp": {
348
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
349
+ "type": "object",
350
+ "properties": {
351
+ "properties": {
352
+ "type": "object",
353
+ "properties": {
354
+ "identity": {
355
+ "$ref": "#/$defs/IdentityValue"
356
+ }
357
+ },
358
+ "required": [
359
+ "identity"
360
+ ]
361
+ },
362
+ "required": {
363
+ "type": "array",
364
+ "contains": {
365
+ "const": "identity"
366
+ },
367
+ "items": {
368
+ "type": "string"
369
+ },
370
+ "uniqueItems": true
371
+ }
372
+ },
373
+ "required": [
374
+ "required",
375
+ "properties"
376
+ ],
377
+ "$anchor": "IdentityProp"
378
+ },
379
+ "IdentityValue": {
380
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
381
+ "type": "object",
382
+ "oneOf": [
383
+ {
384
+ "properties": {
385
+ "type": {
386
+ "enum": [
387
+ "string",
388
+ "integer",
389
+ "boolean"
390
+ ]
391
+ }
392
+ },
393
+ "required": [
394
+ "type"
395
+ ]
396
+ },
397
+ {
398
+ "properties": {
399
+ "enum": {
400
+ "type": "array",
401
+ "items": {
402
+ "type": "string"
403
+ },
404
+ "minItems": 1
405
+ }
406
+ },
407
+ "required": [
408
+ "enum"
409
+ ]
410
+ }
411
+ ],
412
+ "$anchor": "IdentityValue"
413
+ },
414
+ "Job": {
415
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
416
+ "type": "object",
417
+ "allOf": [
418
+ {
419
+ "$ref": "#/$defs/Documented"
420
+ },
421
+ {
422
+ "$ref": "#/$defs/RolesOuter"
423
+ },
424
+ {
425
+ "$ref": "#/$defs/Uri"
426
+ }
427
+ ],
428
+ "properties": {
429
+ "identity": {
430
+ "type": "string"
431
+ }
432
+ },
433
+ "required": [
434
+ "identity"
435
+ ],
436
+ "unevaluatedProperties": false,
437
+ "$anchor": "Job"
438
+ },
439
+ "JsonValue": {
440
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
441
+ "oneOf": [
442
+ {
443
+ "type": "null"
444
+ },
445
+ {
446
+ "type": "boolean"
447
+ },
448
+ {
449
+ "type": "number"
450
+ },
451
+ {
452
+ "type": "string"
453
+ },
454
+ {
455
+ "type": "array",
456
+ "items": {
457
+ "$ref": "#/$defs/JsonValue"
458
+ }
459
+ },
460
+ {
461
+ "type": "object",
462
+ "additionalProperties": {
463
+ "$ref": "#/$defs/JsonValue"
464
+ }
465
+ }
466
+ ],
467
+ "$anchor": "JsonValue"
468
+ },
469
+ "MeritProp": {
470
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
471
+ "type": "object",
472
+ "properties": {
473
+ "properties": {
474
+ "type": "object",
475
+ "properties": {
476
+ "merit": {
477
+ "$ref": "#/$defs/MeritValue"
478
+ }
479
+ }
480
+ }
481
+ },
482
+ "$anchor": "MeritProp"
483
+ },
484
+ "MeritValue": {
485
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
486
+ "type": "object",
487
+ "oneOf": [
488
+ {
489
+ "properties": {
490
+ "type": {
491
+ "enum": [
492
+ "number",
493
+ "integer"
494
+ ]
495
+ }
496
+ },
497
+ "required": [
498
+ "type"
499
+ ]
500
+ },
501
+ {
502
+ "properties": {
503
+ "enum": {
504
+ "type": "array",
505
+ "items": {
506
+ "type": "number"
507
+ },
508
+ "minItems": 1
509
+ }
510
+ },
511
+ "required": [
512
+ "enum"
513
+ ]
514
+ }
515
+ ],
516
+ "$anchor": "MeritValue"
517
+ },
518
+ "Name": {
519
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
520
+ "type": "object",
521
+ "properties": {
522
+ "name": {
523
+ "type": "string",
524
+ "$comment": "Validation is intercepted by an AI Agent that verifies the name against Toolproof's naming conventions.",
525
+ "minLength": 1,
526
+ "pattern": "^(?:[A-Z].*|[a-z]+/[a-z0-9.+-]+)$",
527
+ "semanticValidation": "Ajv custom keyword to verify name."
528
+ }
529
+ },
530
+ "required": [
531
+ "name"
532
+ ],
533
+ "$anchor": "Name"
534
+ },
535
+ "Path": {
536
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
537
+ "type": "object",
538
+ "properties": {
539
+ "path": {
540
+ "type": "string"
541
+ }
542
+ },
543
+ "required": [
544
+ "path"
545
+ ],
546
+ "$anchor": "Path"
547
+ },
548
+ "ResourceBase": {
549
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
550
+ "type": "object",
551
+ "allOf": [
552
+ {
553
+ "$ref": "#/$defs/Identifiable"
554
+ },
555
+ {
556
+ "properties": {
557
+ "id": {
558
+ "$ref": "#/$defs/ResourceId"
559
+ }
560
+ },
561
+ "required": [
562
+ "id"
563
+ ]
564
+ },
565
+ {
566
+ "properties": {
567
+ "typeId": {
568
+ "$ref": "#/$defs/TypeId"
569
+ }
570
+ },
571
+ "required": [
572
+ "typeId"
573
+ ]
574
+ },
575
+ {
576
+ "$ref": "#/$defs/CreationContext"
577
+ }
578
+ ],
579
+ "$anchor": "ResourceBase"
580
+ },
581
+ "ResourceData": {
582
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
583
+ "type": "object",
584
+ "allOf": [
585
+ {
586
+ "$ref": "#/$defs/ResourceDataMetaBase"
587
+ },
588
+ {
589
+ "properties": {
590
+ "extractedData": {
591
+ "type": "object",
592
+ "properties": {
593
+ "identity": {
594
+ "type": [
595
+ "string",
596
+ "integer",
597
+ "boolean"
598
+ ]
599
+ }
600
+ },
601
+ "required": [
602
+ "identity"
603
+ ],
604
+ "additionalProperties": {
605
+ "$ref": "#/$defs/JsonValue"
606
+ },
607
+ "$comment": "This will be overlayed at runtime to match the data structure of the underlying type's extractionSchema. At compile time, we guarantee it has an identity property."
608
+ }
609
+ },
610
+ "required": [
611
+ "extractedData"
612
+ ]
613
+ }
614
+ ],
615
+ "unevaluatedProperties": false,
616
+ "$anchor": "ResourceData"
617
+ },
618
+ "ResourceDataMeta": {
619
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
620
+ "type": "object",
621
+ "unevaluatedProperties": false,
622
+ "$anchor": "ResourceDataMeta",
623
+ "$ref": "#/$defs/ResourceDataMetaBase"
624
+ },
625
+ "ResourceDataMetaBase": {
626
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
627
+ "type": "object",
628
+ "allOf": [
629
+ {
630
+ "$ref": "#/$defs/ResourceBase"
631
+ },
632
+ {
633
+ "$ref": "#/$defs/ResourceKind"
634
+ },
635
+ {
636
+ "properties": {
637
+ "kind": {
638
+ "const": "realized"
639
+ }
640
+ },
641
+ "required": [
642
+ "kind"
643
+ ]
644
+ },
645
+ {
646
+ "$ref": "#/$defs/Path"
647
+ },
648
+ {
649
+ "$ref": "#/$defs/Timestamp"
650
+ }
651
+ ],
652
+ "$anchor": "ResourceDataMetaBase"
653
+ },
654
+ "ResourceId": {
655
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
656
+ "type": "string",
657
+ "$anchor": "ResourceId",
658
+ "$comment": "",
659
+ "pattern": "^RESOURCE-.+$"
660
+ },
661
+ "ResourceKind": {
662
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
663
+ "type": "object",
664
+ "properties": {
665
+ "kind": {
666
+ "enum": [
667
+ "potential-input",
668
+ "potential-output",
669
+ "realized"
670
+ ]
671
+ }
672
+ },
673
+ "required": [
674
+ "kind"
675
+ ],
676
+ "$anchor": "ResourceKind"
677
+ },
678
+ "ResourceMap": {
679
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
680
+ "type": "object",
681
+ "additionalProperties": {
682
+ "type": "object",
683
+ "additionalProperties": {
684
+ "oneOf": [
685
+ {
686
+ "$ref": "#/$defs/ResourcePotentialInput"
687
+ },
688
+ {
689
+ "$ref": "#/$defs/ResourcePotentialOutput"
690
+ },
691
+ {
692
+ "$ref": "#/$defs/ResourceData"
693
+ }
694
+ ]
695
+ },
696
+ "propertyNames": {
697
+ "$ref": "#/$defs/RoleId"
698
+ }
699
+ },
700
+ "$anchor": "ResourceMap",
701
+ "propertyNames": {
702
+ "$ref": "#/$defs/ExecutionId"
703
+ }
704
+ },
705
+ "ResourceMapPointer": {
706
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
707
+ "type": "object",
708
+ "properties": {
709
+ "resourceMapPointer": {
710
+ "$comment": "This points to a resource created at a previous step in the same workflow. This resource is not yet realized at the time of defining the workflow, but will be realized when the step using this resource is executed.The Engine resolves this pointer at runtime.",
711
+ "$ref": "#/$defs/ResourceSocket"
712
+ }
713
+ },
714
+ "required": [
715
+ "resourceMapPointer"
716
+ ],
717
+ "$anchor": "ResourceMapPointer"
718
+ },
719
+ "ResourceMeta": {
720
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
721
+ "type": "object",
722
+ "allOf": [
723
+ {
724
+ "$ref": "#/$defs/ResourceBase"
725
+ },
726
+ {
727
+ "$ref": "#/$defs/ResourceStoragePointer"
728
+ },
729
+ {
730
+ "$ref": "#/$defs/Timestamp"
731
+ }
732
+ ],
733
+ "unevaluatedProperties": false,
734
+ "$anchor": "ResourceMeta"
735
+ },
736
+ "ResourcePotentialInput": {
737
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
738
+ "type": "object",
739
+ "allOf": [
740
+ {
741
+ "$ref": "#/$defs/ResourceBase"
742
+ },
743
+ {
744
+ "$ref": "#/$defs/ResourceKind"
745
+ },
746
+ {
747
+ "properties": {
748
+ "kind": {
749
+ "const": "potential-input"
750
+ }
751
+ },
752
+ "required": [
753
+ "kind"
754
+ ]
755
+ },
756
+ {
757
+ "$ref": "#/$defs/ResourceMapPointer"
758
+ }
759
+ ],
760
+ "unevaluatedProperties": false,
761
+ "$anchor": "ResourcePotentialInput"
762
+ },
763
+ "ResourcePotentialOutput": {
764
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
765
+ "type": "object",
766
+ "allOf": [
767
+ {
768
+ "$ref": "#/$defs/ResourceBase"
769
+ },
770
+ {
771
+ "$ref": "#/$defs/ResourceKind"
772
+ },
773
+ {
774
+ "properties": {
775
+ "kind": {
776
+ "const": "potential-output"
777
+ }
778
+ },
779
+ "required": [
780
+ "kind"
781
+ ]
782
+ }
783
+ ],
784
+ "unevaluatedProperties": false,
785
+ "$anchor": "ResourcePotentialOutput"
786
+ },
787
+ "ResourceSocket": {
788
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
789
+ "type": "object",
790
+ "properties": {
791
+ "executionId": {
792
+ "$ref": "#/$defs/ExecutionId"
793
+ },
794
+ "roleId": {
795
+ "$ref": "#/$defs/RoleId"
796
+ }
797
+ },
798
+ "required": [
799
+ "roleId",
800
+ "executionId"
801
+ ],
802
+ "$anchor": "ResourceSocket"
803
+ },
804
+ "ResourceStoragePointer": {
805
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
806
+ "type": "object",
807
+ "properties": {
808
+ "resourceStoragePointer": {
809
+ "$comment": "This points to the canonical resource with an identical contentHash as this one. If no such resource exists, this resource will itself be the canonical resource and point to itself (i.e. resourceStoragePointer = id).",
810
+ "$ref": "#/$defs/ResourceId"
811
+ }
812
+ },
813
+ "required": [
814
+ "resourceStoragePointer"
815
+ ],
816
+ "$anchor": "ResourceStoragePointer"
817
+ },
818
+ "RoleBindingMap": {
819
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
820
+ "type": "object",
821
+ "additionalProperties": {
822
+ "$ref": "#/$defs/ResourceId"
823
+ },
824
+ "$anchor": "RoleBindingMap",
825
+ "propertyNames": {
826
+ "$ref": "#/$defs/RoleId"
827
+ }
828
+ },
829
+ "RoleBindingsInner": {
830
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
831
+ "type": "object",
832
+ "properties": {
833
+ "inputBindingMap": {
834
+ "$ref": "#/$defs/RoleBindingMap"
835
+ },
836
+ "outputBindingMap": {
837
+ "$ref": "#/$defs/RoleBindingMap"
838
+ }
839
+ },
840
+ "required": [
841
+ "inputBindingMap",
842
+ "outputBindingMap"
843
+ ],
844
+ "unevaluatedProperties": false,
845
+ "$anchor": "RoleBindingsInner"
846
+ },
847
+ "RoleBindingsOuter": {
848
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
849
+ "type": "object",
850
+ "properties": {
851
+ "roleBindings": {
852
+ "$ref": "#/$defs/RoleBindingsInner"
853
+ }
854
+ },
855
+ "required": [
856
+ "roleBindings"
857
+ ],
858
+ "$anchor": "RoleBindingsOuter"
859
+ },
860
+ "RoleId": {
861
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
862
+ "type": "string",
863
+ "$anchor": "RoleId",
864
+ "pattern": "^ROLE-.+$"
865
+ },
866
+ "RoleLiteral": {
867
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
868
+ "type": "object",
869
+ "allOf": [
870
+ {
871
+ "properties": {
872
+ "typeId": {
873
+ "$ref": "#/$defs/TypeId"
874
+ }
875
+ },
876
+ "required": [
877
+ "typeId"
878
+ ]
879
+ },
880
+ {
881
+ "$ref": "#/$defs/Documented"
882
+ }
883
+ ],
884
+ "$anchor": "RoleLiteral"
885
+ },
886
+ "RoleMap": {
887
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
888
+ "type": "object",
889
+ "additionalProperties": {
890
+ "$ref": "#/$defs/RoleLiteral"
891
+ },
892
+ "$anchor": "RoleMap",
893
+ "propertyNames": {
894
+ "$ref": "#/$defs/RoleId"
895
+ }
896
+ },
897
+ "RolesInner": {
898
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
899
+ "type": "object",
900
+ "properties": {
901
+ "inputMap": {
902
+ "$ref": "#/$defs/RoleMap"
903
+ },
904
+ "outputMap": {
905
+ "$ref": "#/$defs/RoleMap"
906
+ }
907
+ },
908
+ "required": [
909
+ "inputMap",
910
+ "outputMap"
911
+ ],
912
+ "unevaluatedProperties": false,
913
+ "$anchor": "RolesInner"
914
+ },
915
+ "RolesOuter": {
916
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
917
+ "type": "object",
918
+ "properties": {
919
+ "roles": {
920
+ "$ref": "#/$defs/RolesInner"
921
+ }
922
+ },
923
+ "required": [
924
+ "roles"
925
+ ],
926
+ "$anchor": "RolesOuter"
927
+ },
928
+ "Step": {
929
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
930
+ "type": "object",
931
+ "oneOf": [
932
+ {
933
+ "$ref": "#/$defs/WorkStep"
934
+ },
935
+ {
936
+ "$ref": "#/$defs/BranchStep"
937
+ },
938
+ {
939
+ "$ref": "#/$defs/WhileStep"
940
+ },
941
+ {
942
+ "$ref": "#/$defs/ForStep"
943
+ }
944
+ ],
945
+ "unevaluatedProperties": false,
946
+ "$anchor": "Step"
947
+ },
948
+ "StepId": {
949
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
950
+ "type": "object",
951
+ "oneOf": [
952
+ {
953
+ "$ref": "#/$defs/WorkStepId"
954
+ },
955
+ {
956
+ "$ref": "#/$defs/BranchStepId"
957
+ },
958
+ {
959
+ "$ref": "#/$defs/WhileStepId"
960
+ },
961
+ {
962
+ "$ref": "#/$defs/ForStepId"
963
+ }
964
+ ],
965
+ "$anchor": "StepId"
966
+ },
967
+ "StepKind": {
968
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
969
+ "type": "object",
970
+ "properties": {
971
+ "kind": {
972
+ "type": "string",
973
+ "enum": [
974
+ "work",
975
+ "branch",
976
+ "while",
977
+ "for"
978
+ ]
979
+ }
980
+ },
981
+ "required": [
982
+ "kind"
983
+ ],
984
+ "$anchor": "StepKind"
985
+ },
986
+ "Timestamp": {
987
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
988
+ "type": "object",
989
+ "properties": {
990
+ "timestamp": {
991
+ "type": "string",
992
+ "format": "date-time"
993
+ }
994
+ },
995
+ "required": [
996
+ "timestamp"
997
+ ],
998
+ "$anchor": "Timestamp"
999
+ },
1000
+ "TypeBase": {
1001
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1002
+ "type": "object",
1003
+ "allOf": [
1004
+ {
1005
+ "$ref": "#/$defs/IdentifiableDocumented"
1006
+ },
1007
+ {
1008
+ "properties": {
1009
+ "formatId": {
1010
+ "$ref": "#/$defs/FormatId"
1011
+ },
1012
+ "id": {
1013
+ "$ref": "#/$defs/TypeId"
1014
+ }
1015
+ },
1016
+ "required": [
1017
+ "id",
1018
+ "formatId"
1019
+ ]
1020
+ }
1021
+ ],
1022
+ "$anchor": "TypeBase"
1023
+ },
1024
+ "TypeData": {
1025
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1026
+ "type": "object",
1027
+ "allOf": [
1028
+ {
1029
+ "$ref": "#/$defs/TypeBase"
1030
+ },
1031
+ {
1032
+ "$ref": "#/$defs/ExtractionSchema"
1033
+ }
1034
+ ],
1035
+ "$anchor": "TypeData"
1036
+ },
1037
+ "TypeId": {
1038
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1039
+ "type": "string",
1040
+ "$anchor": "TypeId",
1041
+ "pattern": "^TYPE-.+$"
1042
+ },
1043
+ "TypeMeta": {
1044
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1045
+ "type": "object",
1046
+ "allOf": [
1047
+ {
1048
+ "$ref": "#/$defs/TypeBase"
1049
+ },
1050
+ {
1051
+ "$ref": "#/$defs/Path"
1052
+ },
1053
+ {
1054
+ "if": {
1055
+ "properties": {
1056
+ "formatId": {
1057
+ "const": "FORMAT-ApplicationJson"
1058
+ }
1059
+ },
1060
+ "$comment": "If formatId is FORMAT-ApplicationJson, then uri must not be present, but if formatId is not FORMAT-ApplicationJson, then uri must be present. This is because resources of types with format FORMAT-ApplicationJson are self-contained and do not need an extractor."
1061
+ },
1062
+ "then": {
1063
+ "not": {
1064
+ "$ref": "#/$defs/Uri"
1065
+ }
1066
+ },
1067
+ "else": {
1068
+ "$ref": "#/$defs/Uri"
1069
+ }
1070
+ }
1071
+ ],
1072
+ "unevaluatedProperties": false,
1073
+ "$anchor": "TypeMeta"
1074
+ },
1075
+ "Uri": {
1076
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1077
+ "type": "object",
1078
+ "properties": {
1079
+ "uri": {
1080
+ "type": "string",
1081
+ "format": "uri"
1082
+ }
1083
+ },
1084
+ "required": [
1085
+ "uri"
1086
+ ],
1087
+ "$anchor": "Uri"
1088
+ },
1089
+ "WhileStep": {
1090
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1091
+ "type": "object",
1092
+ "allOf": [
1093
+ {
1094
+ "$ref": "#/$defs/Identifiable"
1095
+ },
1096
+ {
1097
+ "$ref": "#/$defs/StepKind"
1098
+ },
1099
+ {
1100
+ "type": "object",
1101
+ "properties": {
1102
+ "case": {
1103
+ "$ref": "#/$defs/ConditionalWrapper"
1104
+ },
1105
+ "id": {
1106
+ "$ref": "#/$defs/WhileStepId"
1107
+ },
1108
+ "kind": {
1109
+ "const": "while"
1110
+ }
1111
+ },
1112
+ "required": [
1113
+ "id",
1114
+ "kind",
1115
+ "case"
1116
+ ]
1117
+ }
1118
+ ],
1119
+ "$anchor": "WhileStep"
1120
+ },
1121
+ "WhileStepId": {
1122
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1123
+ "type": "string",
1124
+ "$anchor": "WhileStepId",
1125
+ "pattern": "^WHILESTEP-.+$"
1126
+ },
1127
+ "WorkStep": {
1128
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1129
+ "type": "object",
1130
+ "allOf": [
1131
+ {
1132
+ "$ref": "#/$defs/Identifiable"
1133
+ },
1134
+ {
1135
+ "$ref": "#/$defs/StepKind"
1136
+ },
1137
+ {
1138
+ "type": "object",
1139
+ "properties": {
1140
+ "execution": {
1141
+ "$ref": "#/$defs/Execution"
1142
+ },
1143
+ "id": {
1144
+ "$ref": "#/$defs/WorkStepId"
1145
+ },
1146
+ "kind": {
1147
+ "const": "work"
1148
+ }
1149
+ },
1150
+ "required": [
1151
+ "id",
1152
+ "kind",
1153
+ "execution"
1154
+ ]
1155
+ }
1156
+ ],
1157
+ "$anchor": "WorkStep"
1158
+ },
1159
+ "WorkStepId": {
1160
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1161
+ "type": "string",
1162
+ "$anchor": "WorkStepId",
1163
+ "pattern": "^WORKSTEP-.+$"
1164
+ },
1165
+ "Workflow": {
1166
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1167
+ "type": "object",
1168
+ "allOf": [
1169
+ {
1170
+ "$ref": "#/$defs/Identifiable"
1171
+ },
1172
+ {
1173
+ "type": "object",
1174
+ "properties": {
1175
+ "id": {
1176
+ "$ref": "#/$defs/WorkflowId"
1177
+ },
1178
+ "steps": {
1179
+ "type": "array",
1180
+ "items": {
1181
+ "$ref": "#/$defs/Step"
1182
+ },
1183
+ "uniqueItems": true
1184
+ }
1185
+ },
1186
+ "required": [
1187
+ "id",
1188
+ "steps"
1189
+ ]
1190
+ }
1191
+ ],
1192
+ "unevaluatedProperties": false,
1193
+ "$anchor": "Workflow"
1194
+ },
1195
+ "WorkflowId": {
1196
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1197
+ "type": "string",
1198
+ "$anchor": "WorkflowId",
1199
+ "pattern": "^WORKFLOW-.+$"
1200
+ },
1201
+ "WorkflowSpec": {
1202
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1203
+ "type": "object",
1204
+ "allOf": [
1205
+ {
1206
+ "$ref": "#/$defs/Identifiable"
1207
+ },
1208
+ {
1209
+ "properties": {
1210
+ "id": {
1211
+ "$ref": "#/$defs/WorkflowSpecId"
1212
+ },
1213
+ "resourceMaps": {
1214
+ "type": "array",
1215
+ "items": {
1216
+ "$ref": "#/$defs/ResourceMap"
1217
+ },
1218
+ "uniqueItems": true
1219
+ },
1220
+ "workflow": {
1221
+ "$ref": "#/$defs/Workflow"
1222
+ }
1223
+ },
1224
+ "required": [
1225
+ "id",
1226
+ "workflow",
1227
+ "resourceMaps"
1228
+ ]
1229
+ }
1230
+ ],
1231
+ "$anchor": "WorkflowSpec"
1232
+ },
1233
+ "WorkflowSpecId": {
1234
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1235
+ "type": "string",
1236
+ "$anchor": "WorkflowSpecId",
1237
+ "pattern": "^WORKFLOWSPEC-.+$"
1238
+ }
1239
+ },
1240
+ "$comment": "This schema defines all genesis schemas used throughout the Toolproof ecosystem. The genesis schemas themselves are defined in $defs.<ResourceType>.extractionSchema. The build process (via extractSchemas.js) extracts these schemas and writes them to a separate file (src/schemas/Genesis.json). The reason for this indirection is to have all these schema envelopes validate positively against the schema at $defs/TypeData, effectively making them ResourceTypes, which are first-class citizens in the Toolproof ecosystem."
1241
+ }