@toolproof-npm/schema 0.1.81 → 0.1.83

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 (28) hide show
  1. package/dist/genesis/generated/dependencies_ordered.json +69 -21
  2. package/dist/genesis/generated/resourceTypes/Genesis.json +46 -76
  3. package/dist/genesis/generated/resources/Genesis.json +56 -96
  4. package/dist/genesis/generated/schemas/Genesis.json +104 -128
  5. package/dist/genesis/generated/schemas/RunRecording.d.ts +2 -0
  6. package/dist/genesis/generated/schemas/RunRecording.js +2 -0
  7. package/dist/genesis/generated/schemas/RunRecording.json +998 -0
  8. package/dist/genesis/generated/schemas/RunnableStrategy.d.ts +2 -0
  9. package/dist/genesis/generated/schemas/RunnableStrategy.js +2 -0
  10. package/dist/genesis/generated/schemas/{StrategyRun.json → RunnableStrategy.json} +21 -23
  11. package/dist/genesis/generated/schemas/StatefulStrategy.json +0 -2
  12. package/dist/genesis/generated/terminals.json +2 -1
  13. package/dist/genesis/generated/types/ResourceTypeGenesis.d.ts +5 -6
  14. package/dist/genesis/generated/types/Resource_RunnableStrategy.d.ts +3 -0
  15. package/dist/genesis/generated/types/types.d.ts +661 -209
  16. package/dist/index.d.ts +4 -3
  17. package/dist/index.js +2 -1
  18. package/package.json +2 -2
  19. package/dist/genesis/generated/resource-envelopes/Genesis.d.ts +0 -2
  20. package/dist/genesis/generated/resource-envelopes/Genesis.js +0 -2
  21. package/dist/genesis/generated/resource-envelopes/Genesis.json +0 -2337
  22. package/dist/genesis/generated/resource-type-envelopes/Genesis.d.ts +0 -2
  23. package/dist/genesis/generated/resource-type-envelopes/Genesis.js +0 -2
  24. package/dist/genesis/generated/resource-type-envelopes/Genesis.json +0 -1757
  25. package/dist/genesis/generated/schemas/StrategyRun.d.ts +0 -2
  26. package/dist/genesis/generated/schemas/StrategyRun.js +0 -2
  27. package/dist/genesis/generated/types/Resource_StrategyRun.d.ts +0 -3
  28. /package/dist/genesis/generated/types/{Resource_StrategyRun.js → Resource_RunnableStrategy.js} +0 -0
@@ -0,0 +1,998 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "properties": {
5
+ "recordedAt": {
6
+ "$comment": "Optional recording timestamp.",
7
+ "$ref": "#/$defs/Timestamp"
8
+ },
9
+ "runEvents": {
10
+ "type": "array",
11
+ "items": {
12
+ "$ref": "#/$defs/RunEvent"
13
+ }
14
+ },
15
+ "runnableStrategyRef": {
16
+ "$comment": "Optional; derived from the first event but useful for indexing.",
17
+ "$ref": "#/$defs/RunnableStrategyIdentity"
18
+ },
19
+ "strategyThreadRef": {
20
+ "$comment": "Optional; derived from the first event but useful for indexing.",
21
+ "$ref": "#/$defs/StrategyThreadIdentity"
22
+ }
23
+ },
24
+ "required": [
25
+ "runEvents"
26
+ ],
27
+ "unevaluatedProperties": false,
28
+ "$anchor": "RunRecording",
29
+ "$defs": {
30
+ "Timestamp": {
31
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
32
+ "type": "object",
33
+ "properties": {
34
+ "timestamp": {
35
+ "type": "string",
36
+ "format": "date-time"
37
+ }
38
+ },
39
+ "required": [
40
+ "timestamp"
41
+ ],
42
+ "$anchor": "Timestamp"
43
+ },
44
+ "RunEvent": {
45
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
46
+ "oneOf": [
47
+ {
48
+ "$ref": "#/$defs/GraphStartRunEvent"
49
+ },
50
+ {
51
+ "$ref": "#/$defs/TickRunEvent"
52
+ },
53
+ {
54
+ "$ref": "#/$defs/InterruptRunEvent"
55
+ },
56
+ {
57
+ "$ref": "#/$defs/GraphEndRunEvent"
58
+ }
59
+ ],
60
+ "$anchor": "RunEvent"
61
+ },
62
+ "RunnableStrategyIdentity": {
63
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
64
+ "type": "string",
65
+ "$anchor": "RunnableStrategyIdentity",
66
+ "pattern": "^RUNNABLE_STRATEGY-.+$"
67
+ },
68
+ "StrategyThreadIdentity": {
69
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
70
+ "type": "string",
71
+ "$anchor": "StrategyThreadIdentity",
72
+ "pattern": "^STRATEGY_THREAD-.+$"
73
+ },
74
+ "GraphStartRunEvent": {
75
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
76
+ "allOf": [
77
+ {
78
+ "$ref": "#/$defs/RunEventBase"
79
+ },
80
+ {
81
+ "type": "object",
82
+ "properties": {
83
+ "kind": {
84
+ "const": "graph_start"
85
+ },
86
+ "runnableStrategySeed": {
87
+ "$ref": "#/$defs/RunnableStrategy"
88
+ }
89
+ },
90
+ "required": [
91
+ "runnableStrategySeed"
92
+ ]
93
+ }
94
+ ],
95
+ "$anchor": "GraphStartRunEvent"
96
+ },
97
+ "TickRunEvent": {
98
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
99
+ "allOf": [
100
+ {
101
+ "$ref": "#/$defs/RunEventBase"
102
+ },
103
+ {
104
+ "type": "object",
105
+ "properties": {
106
+ "kind": {
107
+ "const": "tick"
108
+ }
109
+ }
110
+ }
111
+ ],
112
+ "$anchor": "TickRunEvent"
113
+ },
114
+ "InterruptRunEvent": {
115
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
116
+ "allOf": [
117
+ {
118
+ "$ref": "#/$defs/RunEventBase"
119
+ },
120
+ {
121
+ "type": "object",
122
+ "properties": {
123
+ "kind": {
124
+ "const": "interrupt"
125
+ }
126
+ }
127
+ }
128
+ ],
129
+ "$anchor": "InterruptRunEvent"
130
+ },
131
+ "GraphEndRunEvent": {
132
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
133
+ "allOf": [
134
+ {
135
+ "$ref": "#/$defs/RunEventBase"
136
+ },
137
+ {
138
+ "type": "object",
139
+ "properties": {
140
+ "kind": {
141
+ "const": "graph_end"
142
+ }
143
+ }
144
+ }
145
+ ],
146
+ "$anchor": "GraphEndRunEvent"
147
+ },
148
+ "RunEventBase": {
149
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
150
+ "type": "object",
151
+ "properties": {
152
+ "counters": {
153
+ "$ref": "#/$defs/RunEventCounters"
154
+ },
155
+ "createdAt": {
156
+ "$ref": "#/$defs/Timestamp"
157
+ },
158
+ "eventSeq": {
159
+ "type": "integer"
160
+ },
161
+ "kind": {
162
+ "$ref": "#/$defs/RunEventKind"
163
+ },
164
+ "nodeName": {
165
+ "type": "string"
166
+ },
167
+ "runnableStrategyRef": {
168
+ "$ref": "#/$defs/RunnableStrategyIdentity"
169
+ },
170
+ "stepMetaData": {
171
+ "$ref": "#/$defs/RunEventStepMetaData"
172
+ },
173
+ "strategyThreadRef": {
174
+ "$ref": "#/$defs/StrategyThreadIdentity"
175
+ },
176
+ "updates": {
177
+ "$ref": "#/$defs/RunEventUpdates"
178
+ }
179
+ },
180
+ "required": [
181
+ "kind",
182
+ "runnableStrategyRef",
183
+ "strategyThreadRef",
184
+ "createdAt",
185
+ "nodeName",
186
+ "eventSeq"
187
+ ],
188
+ "$anchor": "RunEventBase"
189
+ },
190
+ "RunnableStrategy": {
191
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
192
+ "type": "object",
193
+ "allOf": [
194
+ {
195
+ "$comment": "The Engine will convert the statelessStrategy.steps array of the referenced StatefulStrategy into this map before the run. This is to allow jobs that do not depend on previous-step inputs to run in parallel.The Engine will also inject internal steps to prompt for runtime-provided inputs and handle other orchestration tasks such as repeted steps when encountering a loop.",
196
+ "$ref": "#/$defs/StrategyThreadMapWrapper"
197
+ },
198
+ {
199
+ "$comment": "Reusing StrategyStateWrapper to include the strategy state in the RunnableStrategy. The Engine will update it with materialized Resources (i.e. runtime-provided inputs and job-created outputs) during the run.",
200
+ "$ref": "#/$defs/StrategyStateWrapper"
201
+ }
202
+ ],
203
+ "properties": {
204
+ "identity": {
205
+ "$ref": "#/$defs/RunnableStrategyIdentity"
206
+ },
207
+ "runnableStrategyContext": {
208
+ "$ref": "#/$defs/RunnableStrategyContext"
209
+ },
210
+ "statefulStrategyRef": {
211
+ "$ref": "#/$defs/StatefulStrategyIdentity"
212
+ }
213
+ },
214
+ "required": [
215
+ "identity",
216
+ "statefulStrategyRef",
217
+ "runnableStrategyContext"
218
+ ],
219
+ "unevaluatedProperties": false,
220
+ "$anchor": "RunnableStrategy"
221
+ },
222
+ "RunEventCounters": {
223
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
224
+ "type": "object",
225
+ "properties": {
226
+ "iterationCounterAfter": {
227
+ "type": "integer"
228
+ },
229
+ "stepCounterAfter": {
230
+ "type": "integer"
231
+ }
232
+ },
233
+ "$anchor": "RunEventCounters"
234
+ },
235
+ "RunEventKind": {
236
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
237
+ "type": "string",
238
+ "$anchor": "RunEventKind",
239
+ "enum": [
240
+ "graph_start",
241
+ "tick",
242
+ "interrupt",
243
+ "graph_end"
244
+ ]
245
+ },
246
+ "RunEventStepMetaData": {
247
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
248
+ "type": "object",
249
+ "properties": {
250
+ "executionRef": {
251
+ "$ref": "#/$defs/ExecutionIdentity"
252
+ },
253
+ "jobRef": {
254
+ "$ref": "#/$defs/JobIdentity"
255
+ },
256
+ "stepKind": {
257
+ "$ref": "#/$defs/RunEventStepKind"
258
+ },
259
+ "stepRef": {
260
+ "oneOf": [
261
+ {
262
+ "$ref": "#/$defs/WorkStepIdentity"
263
+ },
264
+ {
265
+ "$ref": "#/$defs/BranchStepIdentity"
266
+ },
267
+ {
268
+ "$ref": "#/$defs/WhileStepIdentity"
269
+ },
270
+ {
271
+ "$ref": "#/$defs/ForStepIdentity"
272
+ }
273
+ ]
274
+ },
275
+ "threadStepIndex": {
276
+ "type": "integer"
277
+ }
278
+ },
279
+ "required": [
280
+ "stepRef",
281
+ "stepKind",
282
+ "threadStepIndex"
283
+ ],
284
+ "$anchor": "RunEventStepMetaData"
285
+ },
286
+ "RunEventUpdates": {
287
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
288
+ "type": "object",
289
+ "allOf": [
290
+ {
291
+ "$ref": "#/$defs/StrategyStateDelta"
292
+ }
293
+ ],
294
+ "properties": {
295
+ "interruptData": {
296
+ "type": [
297
+ "object",
298
+ "null"
299
+ ],
300
+ "$comment": "Kept permissive; the engine may evolve interrupt payloads."
301
+ },
302
+ "stepsMutation": {
303
+ "type": "object",
304
+ "properties": {
305
+ "insertAt": {
306
+ "type": "integer"
307
+ },
308
+ "inserted": {
309
+ "type": "array",
310
+ "items": {
311
+ "$ref": "#/$defs/Step"
312
+ }
313
+ }
314
+ },
315
+ "required": [
316
+ "insertAt",
317
+ "inserted"
318
+ ]
319
+ }
320
+ },
321
+ "$anchor": "RunEventUpdates"
322
+ },
323
+ "StrategyThreadMapWrapper": {
324
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
325
+ "type": "object",
326
+ "properties": {
327
+ "strategyThreadMap": {
328
+ "$ref": "#/$defs/StrategyThreadMap"
329
+ }
330
+ },
331
+ "required": [
332
+ "strategyThreadMap"
333
+ ],
334
+ "$anchor": "StrategyThreadMapWrapper"
335
+ },
336
+ "StrategyStateWrapper": {
337
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
338
+ "type": "object",
339
+ "properties": {
340
+ "strategyState": {
341
+ "$ref": "#/$defs/StrategyState"
342
+ }
343
+ },
344
+ "required": [
345
+ "strategyState"
346
+ ],
347
+ "$anchor": "StrategyStateWrapper"
348
+ },
349
+ "RunnableStrategyContext": {
350
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
351
+ "type": "object",
352
+ "properties": {
353
+ "completedAt": {
354
+ "$ref": "#/$defs/Timestamp"
355
+ },
356
+ "startedAt": {
357
+ "$ref": "#/$defs/Timestamp"
358
+ },
359
+ "status": {
360
+ "$ref": "#/$defs/RunnableStrategyStatus"
361
+ }
362
+ },
363
+ "required": [
364
+ "status"
365
+ ],
366
+ "unevaluatedProperties": false,
367
+ "$anchor": "RunnableStrategyContext"
368
+ },
369
+ "StatefulStrategyIdentity": {
370
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
371
+ "type": "string",
372
+ "$anchor": "StatefulStrategyIdentity",
373
+ "pattern": "^STATEFUL_STRATEGY-.+$"
374
+ },
375
+ "ExecutionIdentity": {
376
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
377
+ "type": "string",
378
+ "$anchor": "ExecutionIdentity",
379
+ "pattern": "^EXECUTION-.+$"
380
+ },
381
+ "JobIdentity": {
382
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
383
+ "type": "string",
384
+ "$anchor": "JobIdentity",
385
+ "$comment": "",
386
+ "pattern": "^JOB-.+$"
387
+ },
388
+ "RunEventStepKind": {
389
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
390
+ "type": "string",
391
+ "$anchor": "RunEventStepKind",
392
+ "enum": [
393
+ "work",
394
+ "branch",
395
+ "while",
396
+ "for"
397
+ ]
398
+ },
399
+ "WorkStepIdentity": {
400
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
401
+ "type": "string",
402
+ "$anchor": "WorkStepIdentity",
403
+ "pattern": "^WORKSTEP-.+$"
404
+ },
405
+ "BranchStepIdentity": {
406
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
407
+ "type": "string",
408
+ "$anchor": "BranchStepIdentity",
409
+ "pattern": "^BRANCHSTEP-.+$"
410
+ },
411
+ "WhileStepIdentity": {
412
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
413
+ "type": "string",
414
+ "$anchor": "WhileStepIdentity",
415
+ "pattern": "^WHILESTEP-.+$"
416
+ },
417
+ "ForStepIdentity": {
418
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
419
+ "type": "string",
420
+ "$anchor": "ForStepIdentity",
421
+ "pattern": "^FORSTEP-.+$"
422
+ },
423
+ "StrategyStateDelta": {
424
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
425
+ "type": "object",
426
+ "properties": {
427
+ "strategyStateUpdate": {
428
+ "type": "object",
429
+ "additionalProperties": {
430
+ "$ref": "#/$defs/ExecutionSocket"
431
+ },
432
+ "unevaluatedProperties": false,
433
+ "propertyNames": {
434
+ "$ref": "#/$defs/ExecutionIdentity"
435
+ }
436
+ }
437
+ },
438
+ "$anchor": "StrategyStateDelta",
439
+ "$comment": "Shared delta payload for strategy state updates; used both as standalone updates and embedded within run events."
440
+ },
441
+ "Step": {
442
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
443
+ "type": "object",
444
+ "oneOf": [
445
+ {
446
+ "$ref": "#/$defs/WorkStep"
447
+ },
448
+ {
449
+ "$ref": "#/$defs/BranchStep"
450
+ },
451
+ {
452
+ "$ref": "#/$defs/WhileStep"
453
+ },
454
+ {
455
+ "$ref": "#/$defs/ForStep"
456
+ }
457
+ ],
458
+ "unevaluatedProperties": false,
459
+ "$anchor": "Step"
460
+ },
461
+ "StrategyThreadMap": {
462
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
463
+ "type": "object",
464
+ "additionalProperties": {
465
+ "type": "array",
466
+ "items": {
467
+ "$ref": "#/$defs/Step"
468
+ }
469
+ },
470
+ "$anchor": "StrategyThreadMap",
471
+ "$comment": "Each thread contains an array of steps, allowing for sequential execution within a thread while supporting parallel execution across multiple threads.",
472
+ "propertyNames": {
473
+ "$ref": "#/$defs/StrategyThreadIdentity"
474
+ }
475
+ },
476
+ "StrategyState": {
477
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
478
+ "type": "object",
479
+ "additionalProperties": {
480
+ "$ref": "#/$defs/ExecutionSocket"
481
+ },
482
+ "$anchor": "StrategyState",
483
+ "propertyNames": {
484
+ "$ref": "#/$defs/ExecutionIdentity"
485
+ }
486
+ },
487
+ "RunnableStrategyStatus": {
488
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
489
+ "type": "string",
490
+ "$anchor": "RunnableStrategyStatus",
491
+ "enum": [
492
+ "pending",
493
+ "running",
494
+ "completed",
495
+ "failed",
496
+ "cancelled"
497
+ ]
498
+ },
499
+ "ExecutionSocket": {
500
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
501
+ "type": "object",
502
+ "additionalProperties": {
503
+ "oneOf": [
504
+ {
505
+ "$ref": "#/$defs/ResourceMissing"
506
+ },
507
+ {
508
+ "$ref": "#/$defs/ResourcePotentialInput"
509
+ },
510
+ {
511
+ "$ref": "#/$defs/ResourcePotentialOutput"
512
+ },
513
+ {
514
+ "$ref": "#/$defs/Resource"
515
+ }
516
+ ]
517
+ },
518
+ "unevaluatedProperties": false,
519
+ "$anchor": "ExecutionSocket",
520
+ "propertyNames": {
521
+ "$ref": "#/$defs/ResourceRoleIdentity"
522
+ }
523
+ },
524
+ "WorkStep": {
525
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
526
+ "type": "object",
527
+ "allOf": [
528
+ {
529
+ "$ref": "#/$defs/StepKind"
530
+ }
531
+ ],
532
+ "properties": {
533
+ "execution": {
534
+ "$ref": "#/$defs/Execution"
535
+ },
536
+ "identity": {
537
+ "$ref": "#/$defs/WorkStepIdentity"
538
+ },
539
+ "kind": {
540
+ "const": "work"
541
+ }
542
+ },
543
+ "required": [
544
+ "identity",
545
+ "kind",
546
+ "execution"
547
+ ],
548
+ "$anchor": "WorkStep"
549
+ },
550
+ "BranchStep": {
551
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
552
+ "type": "object",
553
+ "allOf": [
554
+ {
555
+ "$ref": "#/$defs/StepKind"
556
+ }
557
+ ],
558
+ "properties": {
559
+ "cases": {
560
+ "type": "array",
561
+ "items": {
562
+ "$ref": "#/$defs/Conditional"
563
+ },
564
+ "minItems": 1,
565
+ "uniqueItems": true
566
+ },
567
+ "identity": {
568
+ "$ref": "#/$defs/BranchStepIdentity"
569
+ },
570
+ "kind": {
571
+ "const": "branch"
572
+ }
573
+ },
574
+ "required": [
575
+ "identity",
576
+ "kind",
577
+ "cases"
578
+ ],
579
+ "$anchor": "BranchStep"
580
+ },
581
+ "WhileStep": {
582
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
583
+ "type": "object",
584
+ "allOf": [
585
+ {
586
+ "$ref": "#/$defs/StepKind"
587
+ }
588
+ ],
589
+ "properties": {
590
+ "case": {
591
+ "$ref": "#/$defs/Conditional"
592
+ },
593
+ "identity": {
594
+ "$ref": "#/$defs/WhileStepIdentity"
595
+ },
596
+ "kind": {
597
+ "const": "while"
598
+ }
599
+ },
600
+ "required": [
601
+ "identity",
602
+ "kind",
603
+ "case"
604
+ ],
605
+ "$anchor": "WhileStep"
606
+ },
607
+ "ForStep": {
608
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
609
+ "type": "object",
610
+ "allOf": [
611
+ {
612
+ "$ref": "#/$defs/StepKind"
613
+ }
614
+ ],
615
+ "properties": {
616
+ "case": {
617
+ "$ref": "#/$defs/Conditional"
618
+ },
619
+ "identity": {
620
+ "$ref": "#/$defs/ForStepIdentity"
621
+ },
622
+ "kind": {
623
+ "const": "for"
624
+ }
625
+ },
626
+ "required": [
627
+ "identity",
628
+ "kind",
629
+ "case"
630
+ ],
631
+ "$anchor": "ForStep"
632
+ },
633
+ "ResourceMissing": {
634
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
635
+ "type": "object",
636
+ "allOf": [
637
+ {
638
+ "$ref": "#/$defs/ResourceBase"
639
+ },
640
+ {
641
+ "$ref": "#/$defs/ResourceKind"
642
+ },
643
+ {
644
+ "properties": {
645
+ "kind": {
646
+ "const": "missing"
647
+ }
648
+ },
649
+ "required": [
650
+ "kind"
651
+ ]
652
+ }
653
+ ],
654
+ "unevaluatedProperties": false,
655
+ "$anchor": "ResourceMissing"
656
+ },
657
+ "ResourcePotentialInput": {
658
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
659
+ "type": "object",
660
+ "allOf": [
661
+ {
662
+ "$ref": "#/$defs/ResourceBase"
663
+ },
664
+ {
665
+ "$ref": "#/$defs/CreationContextWrapper"
666
+ },
667
+ {
668
+ "$ref": "#/$defs/ResourceKind"
669
+ },
670
+ {
671
+ "properties": {
672
+ "kind": {
673
+ "const": "potential-input"
674
+ }
675
+ },
676
+ "required": [
677
+ "kind"
678
+ ]
679
+ }
680
+ ],
681
+ "unevaluatedProperties": false,
682
+ "$anchor": "ResourcePotentialInput"
683
+ },
684
+ "ResourcePotentialOutput": {
685
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
686
+ "type": "object",
687
+ "allOf": [
688
+ {
689
+ "$ref": "#/$defs/ResourceBase"
690
+ },
691
+ {
692
+ "$ref": "#/$defs/CreationContextWrapper"
693
+ },
694
+ {
695
+ "$ref": "#/$defs/ResourceKind"
696
+ },
697
+ {
698
+ "properties": {
699
+ "kind": {
700
+ "const": "potential-output"
701
+ }
702
+ },
703
+ "required": [
704
+ "kind"
705
+ ]
706
+ }
707
+ ],
708
+ "unevaluatedProperties": false,
709
+ "$anchor": "ResourcePotentialOutput"
710
+ },
711
+ "Resource": {
712
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
713
+ "type": "object",
714
+ "allOf": [
715
+ {
716
+ "$ref": "#/$defs/ResourceMetaBase"
717
+ },
718
+ {
719
+ "properties": {
720
+ "extractedData": {
721
+ "type": "object",
722
+ "additionalProperties": {
723
+ "$ref": "#/$defs/JsonData"
724
+ },
725
+ "$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."
726
+ }
727
+ },
728
+ "required": [
729
+ "extractedData"
730
+ ]
731
+ }
732
+ ],
733
+ "unevaluatedProperties": false,
734
+ "$anchor": "Resource"
735
+ },
736
+ "ResourceRoleIdentity": {
737
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
738
+ "type": "string",
739
+ "$anchor": "ResourceRoleIdentity",
740
+ "pattern": "^ROLE-.+$"
741
+ },
742
+ "StepKind": {
743
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
744
+ "type": "object",
745
+ "properties": {
746
+ "kind": {
747
+ "type": "string",
748
+ "enum": [
749
+ "work",
750
+ "branch",
751
+ "while",
752
+ "for"
753
+ ]
754
+ }
755
+ },
756
+ "required": [
757
+ "kind"
758
+ ],
759
+ "$anchor": "StepKind"
760
+ },
761
+ "Execution": {
762
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
763
+ "type": "object",
764
+ "allOf": [
765
+ {
766
+ "$comment": "This will be overlayed at runtime to specify roleBindings corresponding to the roles of the underlying job.",
767
+ "$ref": "#/$defs/RoleBindingsWrapper"
768
+ }
769
+ ],
770
+ "properties": {
771
+ "identity": {
772
+ "$ref": "#/$defs/ExecutionIdentity"
773
+ },
774
+ "jobRef": {
775
+ "$ref": "#/$defs/JobIdentity"
776
+ }
777
+ },
778
+ "required": [
779
+ "identity",
780
+ "jobRef"
781
+ ],
782
+ "$anchor": "Execution"
783
+ },
784
+ "Conditional": {
785
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
786
+ "type": "object",
787
+ "properties": {
788
+ "what": {
789
+ "$ref": "#/$defs/WorkStep"
790
+ },
791
+ "when": {
792
+ "$ref": "#/$defs/WorkStep"
793
+ }
794
+ },
795
+ "required": [
796
+ "when",
797
+ "what"
798
+ ],
799
+ "unevaluatedProperties": false,
800
+ "$anchor": "Conditional"
801
+ },
802
+ "ResourceBase": {
803
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
804
+ "type": "object",
805
+ "properties": {
806
+ "identity": {
807
+ "$ref": "#/$defs/ResourceIdentity"
808
+ },
809
+ "resourceTypeRef": {
810
+ "$ref": "#/$defs/ResourceTypeIdentity"
811
+ }
812
+ },
813
+ "required": [
814
+ "identity",
815
+ "resourceTypeRef"
816
+ ],
817
+ "$anchor": "ResourceBase"
818
+ },
819
+ "ResourceKind": {
820
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
821
+ "type": "object",
822
+ "properties": {
823
+ "kind": {
824
+ "enum": [
825
+ "missing",
826
+ "potential-input",
827
+ "potential-output",
828
+ "materialized"
829
+ ]
830
+ }
831
+ },
832
+ "required": [
833
+ "kind"
834
+ ],
835
+ "$anchor": "ResourceKind"
836
+ },
837
+ "CreationContextWrapper": {
838
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
839
+ "type": "object",
840
+ "properties": {
841
+ "creationContext": {
842
+ "$ref": "#/$defs/CreationContext"
843
+ }
844
+ },
845
+ "required": [
846
+ "creationContext"
847
+ ],
848
+ "$anchor": "CreationContextWrapper"
849
+ },
850
+ "ResourceMetaBase": {
851
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
852
+ "type": "object",
853
+ "allOf": [
854
+ {
855
+ "$ref": "#/$defs/ResourceBase"
856
+ },
857
+ {
858
+ "$ref": "#/$defs/CreationContextWrapper"
859
+ },
860
+ {
861
+ "$ref": "#/$defs/ResourceKind"
862
+ },
863
+ {
864
+ "properties": {
865
+ "kind": {
866
+ "const": "materialized"
867
+ }
868
+ },
869
+ "required": [
870
+ "kind"
871
+ ]
872
+ },
873
+ {
874
+ "$ref": "#/$defs/Timestamp"
875
+ },
876
+ {
877
+ "$ref": "#/$defs/Path"
878
+ }
879
+ ],
880
+ "$anchor": "ResourceMetaBase"
881
+ },
882
+ "JsonData": {
883
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
884
+ "oneOf": [
885
+ {
886
+ "type": "null"
887
+ },
888
+ {
889
+ "type": "boolean"
890
+ },
891
+ {
892
+ "type": "number"
893
+ },
894
+ {
895
+ "type": "string"
896
+ },
897
+ {
898
+ "type": "array",
899
+ "items": {
900
+ "$ref": "#/$defs/JsonData"
901
+ }
902
+ },
903
+ {
904
+ "type": "object",
905
+ "additionalProperties": {
906
+ "$ref": "#/$defs/JsonData"
907
+ }
908
+ }
909
+ ],
910
+ "$anchor": "JsonData"
911
+ },
912
+ "RoleBindingsWrapper": {
913
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
914
+ "type": "object",
915
+ "properties": {
916
+ "roleBindings": {
917
+ "$ref": "#/$defs/RoleBindings"
918
+ }
919
+ },
920
+ "required": [
921
+ "roleBindings"
922
+ ],
923
+ "$anchor": "RoleBindingsWrapper"
924
+ },
925
+ "ResourceIdentity": {
926
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
927
+ "type": "string",
928
+ "$anchor": "ResourceIdentity",
929
+ "$comment": "",
930
+ "pattern": "^RESOURCE-.+$"
931
+ },
932
+ "ResourceTypeIdentity": {
933
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
934
+ "type": "string",
935
+ "$anchor": "ResourceTypeIdentity",
936
+ "pattern": "^TYPE-.+$"
937
+ },
938
+ "CreationContext": {
939
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
940
+ "type": "object",
941
+ "properties": {
942
+ "executionRef": {
943
+ "$ref": "#/$defs/ExecutionIdentity"
944
+ },
945
+ "resourceRoleRef": {
946
+ "$ref": "#/$defs/ResourceRoleIdentity"
947
+ }
948
+ },
949
+ "required": [
950
+ "resourceRoleRef",
951
+ "executionRef"
952
+ ],
953
+ "$anchor": "CreationContext"
954
+ },
955
+ "Path": {
956
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
957
+ "type": "object",
958
+ "properties": {
959
+ "path": {
960
+ "type": "string"
961
+ }
962
+ },
963
+ "required": [
964
+ "path"
965
+ ],
966
+ "$anchor": "Path"
967
+ },
968
+ "RoleBindings": {
969
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
970
+ "type": "object",
971
+ "properties": {
972
+ "inputBindingMap": {
973
+ "$ref": "#/$defs/RoleBindingMap"
974
+ },
975
+ "outputBindingMap": {
976
+ "$ref": "#/$defs/RoleBindingMap"
977
+ }
978
+ },
979
+ "required": [
980
+ "inputBindingMap",
981
+ "outputBindingMap"
982
+ ],
983
+ "unevaluatedProperties": false,
984
+ "$anchor": "RoleBindings"
985
+ },
986
+ "RoleBindingMap": {
987
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
988
+ "type": "object",
989
+ "additionalProperties": {
990
+ "$ref": "#/$defs/ResourceIdentity"
991
+ },
992
+ "$anchor": "RoleBindingMap",
993
+ "propertyNames": {
994
+ "$ref": "#/$defs/ResourceRoleIdentity"
995
+ }
996
+ }
997
+ }
998
+ }