@toolproof-core/schema 1.0.10 → 1.0.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.
Files changed (40) hide show
  1. package/dist/generated/artifacts/constants.d.ts +4 -3
  2. package/dist/generated/artifacts/constants.js +4 -3
  3. package/dist/generated/normalized/Genesis.json +50 -25
  4. package/dist/generated/resources/Genesis.json +68 -31
  5. package/dist/generated/schemas/Genesis.json +38 -19
  6. package/dist/generated/schemas/standalone/Job.json +7 -8
  7. package/dist/generated/schemas/standalone/ResourceType.json +4 -4
  8. package/dist/generated/schemas/standalone/RunnableStrategy.json +7 -7
  9. package/dist/generated/schemas/standalone/StrategyRun.json +7 -7
  10. package/dist/generated/types/standalone/Resource_Genesis.d.ts +1 -1
  11. package/dist/generated/types/standalone/Resource_Job.d.ts +1 -1
  12. package/dist/generated/types/standalone/Resource_RawStrategy.d.ts +1 -1
  13. package/dist/generated/types/standalone/Resource_ResourceType.d.ts +1 -1
  14. package/dist/generated/types/standalone/Resource_RunnableStrategy.d.ts +1 -1
  15. package/dist/generated/types/types.d.ts +229 -221
  16. package/dist/index.d.ts +1 -1
  17. package/dist/scripts/generateStandaloneType.js +2 -1
  18. package/dist/scripts/generateTypes.js +136 -3
  19. package/package.json +1 -1
  20. package/src/Genesis.json +54 -28
  21. package/src/generated/artifacts/constants.ts +4 -3
  22. package/src/generated/artifacts/dependencyMap.json +10 -6
  23. package/src/generated/artifacts/terminals.json +1 -0
  24. package/src/generated/normalized/Genesis.json +1785 -1760
  25. package/src/generated/resources/Genesis.json +2833 -2796
  26. package/src/generated/schemas/Genesis.json +1348 -1329
  27. package/src/generated/schemas/standalone/Job.json +7 -8
  28. package/src/generated/schemas/standalone/RawStrategy.json +580 -580
  29. package/src/generated/schemas/standalone/ResourceType.json +4 -4
  30. package/src/generated/schemas/standalone/RunnableStrategy.json +645 -645
  31. package/src/generated/schemas/standalone/StrategyRun.json +913 -913
  32. package/src/generated/types/standalone/Resource_Genesis.d.ts +1 -1
  33. package/src/generated/types/standalone/Resource_Job.d.ts +1 -1
  34. package/src/generated/types/standalone/Resource_RawStrategy.d.ts +1 -1
  35. package/src/generated/types/standalone/Resource_ResourceType.d.ts +1 -1
  36. package/src/generated/types/standalone/Resource_RunnableStrategy.d.ts +1 -1
  37. package/src/generated/types/types.d.ts +717 -709
  38. package/src/index.ts +48 -45
  39. package/src/scripts/generateStandaloneType.ts +3 -1
  40. package/src/scripts/generateTypes.ts +151 -5
@@ -1,913 +1,913 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "type": "object",
4
- "required": [
5
- "identity",
6
- "runnableStrategyHandle",
7
- "recordedAt",
8
- "runEvents"
9
- ],
10
- "properties": {
11
- "identity": {
12
- "$ref": "#/$defs/StrategyRunIdentity"
13
- },
14
- "runnableStrategyHandle": {
15
- "$comment": "Could be derived from the first event but useful for indexing.",
16
- "$ref": "#/$defs/RunnableStrategyIdentity"
17
- },
18
- "recordedAt": {
19
- "$ref": "#/$defs/Timestamp"
20
- },
21
- "runEvents": {
22
- "type": "array",
23
- "items": {
24
- "$ref": "#/$defs/RunEvent"
25
- }
26
- }
27
- },
28
- "unevaluatedProperties": false,
29
- "$defs": {
30
- "StrategyRunIdentity": {
31
- "$schema": "https://json-schema.org/draft/2020-12/schema",
32
- "type": "string",
33
- "pattern": "^STRATEGY_RUN-.+$"
34
- },
35
- "RunnableStrategyIdentity": {
36
- "$schema": "https://json-schema.org/draft/2020-12/schema",
37
- "type": "string",
38
- "pattern": "^RUNNABLE_STRATEGY-.+$"
39
- },
40
- "Timestamp": {
41
- "$schema": "https://json-schema.org/draft/2020-12/schema",
42
- "type": "string",
43
- "format": "date-time"
44
- },
45
- "RunEvent": {
46
- "$schema": "https://json-schema.org/draft/2020-12/schema",
47
- "type": "object",
48
- "oneOf": [
49
- {
50
- "$ref": "#/$defs/GraphStartRunEvent"
51
- },
52
- {
53
- "$ref": "#/$defs/TickRunEvent"
54
- },
55
- {
56
- "$ref": "#/$defs/InterruptRunEvent"
57
- },
58
- {
59
- "$ref": "#/$defs/GraphEndRunEvent"
60
- }
61
- ]
62
- },
63
- "GraphStartRunEvent": {
64
- "$schema": "https://json-schema.org/draft/2020-12/schema",
65
- "allOf": [
66
- {
67
- "$ref": "#/$defs/RunEventBase"
68
- },
69
- {
70
- "type": "object",
71
- "required": [
72
- "runnableStrategySeed"
73
- ],
74
- "properties": {
75
- "runEventKind": {
76
- "const": "graph_start"
77
- },
78
- "runnableStrategySeed": {
79
- "$ref": "#/$defs/RunnableStrategy"
80
- }
81
- }
82
- }
83
- ]
84
- },
85
- "TickRunEvent": {
86
- "$schema": "https://json-schema.org/draft/2020-12/schema",
87
- "allOf": [
88
- {
89
- "$ref": "#/$defs/RunEventBase"
90
- },
91
- {
92
- "type": "object",
93
- "properties": {
94
- "runEventKind": {
95
- "const": "tick"
96
- }
97
- }
98
- }
99
- ]
100
- },
101
- "InterruptRunEvent": {
102
- "$schema": "https://json-schema.org/draft/2020-12/schema",
103
- "allOf": [
104
- {
105
- "$ref": "#/$defs/RunEventBase"
106
- },
107
- {
108
- "type": "object",
109
- "properties": {
110
- "runEventKind": {
111
- "const": "interrupt"
112
- }
113
- }
114
- }
115
- ]
116
- },
117
- "GraphEndRunEvent": {
118
- "$schema": "https://json-schema.org/draft/2020-12/schema",
119
- "allOf": [
120
- {
121
- "$ref": "#/$defs/RunEventBase"
122
- },
123
- {
124
- "type": "object",
125
- "properties": {
126
- "runEventKind": {
127
- "const": "graph_end"
128
- }
129
- }
130
- }
131
- ]
132
- },
133
- "RunEventBase": {
134
- "$schema": "https://json-schema.org/draft/2020-12/schema",
135
- "type": "object",
136
- "required": [
137
- "runEventKind",
138
- "runnableStrategyHandle",
139
- "strategyThreadHandle",
140
- "createdAt",
141
- "nodeName",
142
- "eventSeq"
143
- ],
144
- "properties": {
145
- "runEventKind": {
146
- "$ref": "#/$defs/RunEventKind"
147
- },
148
- "runnableStrategyHandle": {
149
- "$ref": "#/$defs/RunnableStrategyIdentity"
150
- },
151
- "strategyThreadHandle": {
152
- "$ref": "#/$defs/StrategyThreadIdentity"
153
- },
154
- "createdAt": {
155
- "$ref": "#/$defs/Timestamp"
156
- },
157
- "nodeName": {
158
- "type": "string"
159
- },
160
- "eventSeq": {
161
- "type": "integer"
162
- },
163
- "counters": {
164
- "$ref": "#/$defs/RunEventCounters"
165
- },
166
- "stepMetadata": {
167
- "$ref": "#/$defs/RunEventStepMetadata"
168
- },
169
- "updates": {
170
- "$ref": "#/$defs/RunEventUpdates"
171
- }
172
- }
173
- },
174
- "RunnableStrategy": {
175
- "$schema": "https://json-schema.org/draft/2020-12/schema",
176
- "type": "object",
177
- "required": [
178
- "identity",
179
- "runnableStrategyContext"
180
- ],
181
- "properties": {
182
- "identity": {
183
- "$ref": "#/$defs/RunnableStrategyIdentity"
184
- },
185
- "runnableStrategyContext": {
186
- "$ref": "#/$defs/RunnableStrategyContext"
187
- }
188
- },
189
- "allOf": [
190
- {
191
- "$comment": "The Engine runs jobs specified by steps in strategyThreadMap. The Engine also injects repeted steps when encountering loops.",
192
- "$ref": "#/$defs/StrategyThreadMapFacet"
193
- },
194
- {
195
- "$comment": "The Engine updates strategyState with materialized Resources upon job completions and runtime-provided input events. It also inserts inputPotential and outputPotential Resources upon step injections.",
196
- "$ref": "#/$defs/StrategyStateFacet"
197
- }
198
- ],
199
- "unevaluatedProperties": false
200
- },
201
- "RunEventKind": {
202
- "$schema": "https://json-schema.org/draft/2020-12/schema",
203
- "type": "string",
204
- "enum": [
205
- "graph_start",
206
- "tick",
207
- "interrupt",
208
- "graph_end"
209
- ]
210
- },
211
- "StrategyThreadIdentity": {
212
- "$schema": "https://json-schema.org/draft/2020-12/schema",
213
- "type": "string",
214
- "pattern": "^STRATEGY_THREAD-.+$"
215
- },
216
- "RunEventCounters": {
217
- "$schema": "https://json-schema.org/draft/2020-12/schema",
218
- "type": "object",
219
- "properties": {
220
- "stepCounterAfter": {
221
- "type": "integer"
222
- },
223
- "iterationCounterAfter": {
224
- "type": "integer"
225
- }
226
- }
227
- },
228
- "RunEventStepMetadata": {
229
- "$schema": "https://json-schema.org/draft/2020-12/schema",
230
- "type": "object",
231
- "required": [
232
- "stepHandle",
233
- "stepKind",
234
- "threadStepIndex"
235
- ],
236
- "properties": {
237
- "stepHandle": {
238
- "$ref": "#/$defs/StepIdentity"
239
- },
240
- "stepKind": {
241
- "$ref": "#/$defs/StepKind"
242
- },
243
- "threadStepIndex": {
244
- "type": "integer"
245
- }
246
- }
247
- },
248
- "RunEventUpdates": {
249
- "$schema": "https://json-schema.org/draft/2020-12/schema",
250
- "type": "object",
251
- "properties": {
252
- "stepsMutation": {
253
- "type": "object",
254
- "required": [
255
- "insertAt",
256
- "inserted"
257
- ],
258
- "properties": {
259
- "insertAt": {
260
- "type": "integer"
261
- },
262
- "inserted": {
263
- "$ref": "#/$defs/StepArray"
264
- }
265
- }
266
- },
267
- "interruptData": {
268
- "$comment": "Kept permissive; the engine may evolve interrupt payloads.",
269
- "type": [
270
- "object",
271
- "null"
272
- ]
273
- }
274
- },
275
- "allOf": [
276
- {
277
- "$ref": "#/$defs/StrategyStateDelta"
278
- }
279
- ]
280
- },
281
- "RunnableStrategyContext": {
282
- "$schema": "https://json-schema.org/draft/2020-12/schema",
283
- "type": "object",
284
- "required": [
285
- "status"
286
- ],
287
- "properties": {
288
- "status": {
289
- "$ref": "#/$defs/RunnableStrategyStatus"
290
- },
291
- "startedAt": {
292
- "$ref": "#/$defs/Timestamp"
293
- },
294
- "completedAt": {
295
- "$ref": "#/$defs/Timestamp"
296
- }
297
- },
298
- "unevaluatedProperties": false
299
- },
300
- "StrategyThreadMapFacet": {
301
- "$schema": "https://json-schema.org/draft/2020-12/schema",
302
- "type": "object",
303
- "required": [
304
- "strategyThreadMap"
305
- ],
306
- "properties": {
307
- "strategyThreadMap": {
308
- "$ref": "#/$defs/StrategyThreadMap"
309
- }
310
- }
311
- },
312
- "StrategyStateFacet": {
313
- "$schema": "https://json-schema.org/draft/2020-12/schema",
314
- "type": "object",
315
- "required": [
316
- "strategyState"
317
- ],
318
- "properties": {
319
- "strategyState": {
320
- "$ref": "#/$defs/StrategyState"
321
- }
322
- }
323
- },
324
- "StepIdentity": {
325
- "$schema": "https://json-schema.org/draft/2020-12/schema",
326
- "type": "object",
327
- "oneOf": [
328
- {
329
- "$ref": "#/$defs/JobStepIdentity"
330
- },
331
- {
332
- "$ref": "#/$defs/BranchStepIdentity"
333
- },
334
- {
335
- "$ref": "#/$defs/WhileStepIdentity"
336
- },
337
- {
338
- "$ref": "#/$defs/ForStepIdentity"
339
- }
340
- ]
341
- },
342
- "StepKind": {
343
- "$schema": "https://json-schema.org/draft/2020-12/schema",
344
- "type": "string",
345
- "enum": [
346
- "job",
347
- "branch",
348
- "while",
349
- "for"
350
- ]
351
- },
352
- "StepArray": {
353
- "$schema": "https://json-schema.org/draft/2020-12/schema",
354
- "type": "array",
355
- "items": {
356
- "$ref": "#/$defs/Step"
357
- },
358
- "uniqueItems": true
359
- },
360
- "StrategyStateDelta": {
361
- "$schema": "https://json-schema.org/draft/2020-12/schema",
362
- "type": "object",
363
- "required": [
364
- "strategyStateUpdate"
365
- ],
366
- "properties": {
367
- "strategyStateUpdate": {
368
- "$ref": "#/$defs/StrategyState"
369
- }
370
- }
371
- },
372
- "RunnableStrategyStatus": {
373
- "$schema": "https://json-schema.org/draft/2020-12/schema",
374
- "type": "string",
375
- "enum": [
376
- "pending",
377
- "running",
378
- "completed",
379
- "failed",
380
- "cancelled"
381
- ]
382
- },
383
- "StrategyThreadMap": {
384
- "$schema": "https://json-schema.org/draft/2020-12/schema",
385
- "type": "object",
386
- "propertyNames": {
387
- "$ref": "#/$defs/StrategyThreadIdentity"
388
- },
389
- "additionalProperties": {
390
- "$ref": "#/$defs/StepArray"
391
- },
392
- "$comment": "Each thread contains an array of steps, allowing for sequential execution within a thread while supporting parallel execution across multiple threads."
393
- },
394
- "StrategyState": {
395
- "$schema": "https://json-schema.org/draft/2020-12/schema",
396
- "type": "object",
397
- "propertyNames": {
398
- "$ref": "#/$defs/JobStepIdentity"
399
- },
400
- "additionalProperties": {
401
- "$ref": "#/$defs/JobStepSocket"
402
- }
403
- },
404
- "JobStepIdentity": {
405
- "$schema": "https://json-schema.org/draft/2020-12/schema",
406
- "type": "string",
407
- "pattern": "^JOB_STEP-.+$"
408
- },
409
- "BranchStepIdentity": {
410
- "$schema": "https://json-schema.org/draft/2020-12/schema",
411
- "type": "string",
412
- "pattern": "^BRANCH_STEP-.+$"
413
- },
414
- "WhileStepIdentity": {
415
- "$schema": "https://json-schema.org/draft/2020-12/schema",
416
- "type": "string",
417
- "pattern": "^WHILE_STEP-.+$"
418
- },
419
- "ForStepIdentity": {
420
- "$schema": "https://json-schema.org/draft/2020-12/schema",
421
- "type": "string",
422
- "pattern": "^FOR_STEP-.+$"
423
- },
424
- "Step": {
425
- "$schema": "https://json-schema.org/draft/2020-12/schema",
426
- "type": "object",
427
- "oneOf": [
428
- {
429
- "$ref": "#/$defs/JobStep"
430
- },
431
- {
432
- "$ref": "#/$defs/BranchStep"
433
- },
434
- {
435
- "$ref": "#/$defs/WhileStep"
436
- },
437
- {
438
- "$ref": "#/$defs/ForStep"
439
- }
440
- ],
441
- "unevaluatedProperties": false
442
- },
443
- "JobStepSocket": {
444
- "$schema": "https://json-schema.org/draft/2020-12/schema",
445
- "type": "object",
446
- "propertyNames": {
447
- "$ref": "#/$defs/ResourceRoleIdentity"
448
- },
449
- "additionalProperties": {
450
- "oneOf": [
451
- {
452
- "$ref": "#/$defs/ResourcePotential"
453
- },
454
- {
455
- "$ref": "#/$defs/Resource"
456
- }
457
- ]
458
- }
459
- },
460
- "JobStep": {
461
- "$schema": "https://json-schema.org/draft/2020-12/schema",
462
- "type": "object",
463
- "required": [
464
- "identity",
465
- "stepKind",
466
- "jobHandle"
467
- ],
468
- "properties": {
469
- "identity": {
470
- "$ref": "#/$defs/JobStepIdentity"
471
- },
472
- "stepKind": {
473
- "const": "job"
474
- },
475
- "jobHandle": {
476
- "$ref": "#/$defs/JobIdentity"
477
- }
478
- },
479
- "allOf": [
480
- {
481
- "$ref": "#/$defs/StepKindFacet"
482
- },
483
- {
484
- "$comment": "This will be overlayed dynamically to specify roleBindings corresponding to the roles of the underlying job.",
485
- "$ref": "#/$defs/RoleBindingsFacet"
486
- }
487
- ]
488
- },
489
- "BranchStep": {
490
- "$schema": "https://json-schema.org/draft/2020-12/schema",
491
- "type": "object",
492
- "required": [
493
- "identity",
494
- "stepKind",
495
- "cases"
496
- ],
497
- "properties": {
498
- "identity": {
499
- "$ref": "#/$defs/BranchStepIdentity"
500
- },
501
- "stepKind": {
502
- "const": "branch"
503
- },
504
- "cases": {
505
- "type": "array",
506
- "items": {
507
- "$ref": "#/$defs/Conditional"
508
- },
509
- "minItems": 1,
510
- "uniqueItems": true
511
- }
512
- },
513
- "allOf": [
514
- {
515
- "$ref": "#/$defs/StepKindFacet"
516
- }
517
- ]
518
- },
519
- "WhileStep": {
520
- "$schema": "https://json-schema.org/draft/2020-12/schema",
521
- "type": "object",
522
- "required": [
523
- "identity",
524
- "stepKind",
525
- "case"
526
- ],
527
- "properties": {
528
- "identity": {
529
- "$ref": "#/$defs/WhileStepIdentity"
530
- },
531
- "stepKind": {
532
- "const": "while"
533
- },
534
- "case": {
535
- "$ref": "#/$defs/Conditional"
536
- }
537
- },
538
- "allOf": [
539
- {
540
- "$ref": "#/$defs/StepKindFacet"
541
- }
542
- ]
543
- },
544
- "ForStep": {
545
- "$schema": "https://json-schema.org/draft/2020-12/schema",
546
- "type": "object",
547
- "required": [
548
- "identity",
549
- "stepKind",
550
- "case"
551
- ],
552
- "properties": {
553
- "identity": {
554
- "$ref": "#/$defs/ForStepIdentity"
555
- },
556
- "stepKind": {
557
- "const": "for"
558
- },
559
- "case": {
560
- "$ref": "#/$defs/Conditional"
561
- }
562
- },
563
- "allOf": [
564
- {
565
- "$ref": "#/$defs/StepKindFacet"
566
- }
567
- ]
568
- },
569
- "ResourceRoleIdentity": {
570
- "$schema": "https://json-schema.org/draft/2020-12/schema",
571
- "type": "string",
572
- "pattern": "^ROLE-.+$"
573
- },
574
- "ResourcePotential": {
575
- "$schema": "https://json-schema.org/draft/2020-12/schema",
576
- "type": "object",
577
- "oneOf": [
578
- {
579
- "$ref": "#/$defs/ResourceMissing"
580
- },
581
- {
582
- "$ref": "#/$defs/ResourceInputPotential"
583
- },
584
- {
585
- "$ref": "#/$defs/ResourceOutputPotential"
586
- }
587
- ],
588
- "unevaluatedProperties": false
589
- },
590
- "Resource": {
591
- "$schema": "https://json-schema.org/draft/2020-12/schema",
592
- "type": "object",
593
- "allOf": [
594
- {
595
- "$ref": "#/$defs/ShellMaterializedBase"
596
- },
597
- {
598
- "$comment": "This will be overlayed dynamically to match the data structure of the underlying ResourceType's nucleusSchema.",
599
- "$ref": "#/$defs/NucleusFacet"
600
- }
601
- ],
602
- "unevaluatedProperties": false
603
- },
604
- "JobIdentity": {
605
- "$schema": "https://json-schema.org/draft/2020-12/schema",
606
- "type": "string",
607
- "pattern": "^JOB-.+$"
608
- },
609
- "StepKindFacet": {
610
- "$schema": "https://json-schema.org/draft/2020-12/schema",
611
- "type": "object",
612
- "required": [
613
- "stepKind"
614
- ],
615
- "properties": {
616
- "stepKind": {
617
- "$ref": "#/$defs/StepKind"
618
- }
619
- }
620
- },
621
- "RoleBindingsFacet": {
622
- "$schema": "https://json-schema.org/draft/2020-12/schema",
623
- "type": "object",
624
- "required": [
625
- "roleBindings"
626
- ],
627
- "properties": {
628
- "roleBindings": {
629
- "$ref": "#/$defs/RoleBindings"
630
- }
631
- }
632
- },
633
- "Conditional": {
634
- "$schema": "https://json-schema.org/draft/2020-12/schema",
635
- "type": "object",
636
- "required": [
637
- "when",
638
- "what"
639
- ],
640
- "properties": {
641
- "when": {
642
- "$ref": "#/$defs/JobStep"
643
- },
644
- "what": {
645
- "$ref": "#/$defs/JobStep"
646
- }
647
- },
648
- "unevaluatedProperties": false
649
- },
650
- "ResourceMissing": {
651
- "$schema": "https://json-schema.org/draft/2020-12/schema",
652
- "type": "object",
653
- "$ref": "#/$defs/ShellMissing",
654
- "unevaluatedProperties": false
655
- },
656
- "ResourceInputPotential": {
657
- "$schema": "https://json-schema.org/draft/2020-12/schema",
658
- "type": "object",
659
- "$ref": "#/$defs/ShellInputPotential",
660
- "unevaluatedProperties": false
661
- },
662
- "ResourceOutputPotential": {
663
- "$schema": "https://json-schema.org/draft/2020-12/schema",
664
- "type": "object",
665
- "$ref": "#/$defs/ShellOutputPotential",
666
- "unevaluatedProperties": false
667
- },
668
- "ShellMaterializedBase": {
669
- "$schema": "https://json-schema.org/draft/2020-12/schema",
670
- "type": "object",
671
- "required": [
672
- "version",
673
- "resourceShellKind"
674
- ],
675
- "properties": {
676
- "version": {
677
- "const": 1
678
- },
679
- "resourceShellKind": {
680
- "const": "materialized"
681
- }
682
- },
683
- "allOf": [
684
- {
685
- "$ref": "#/$defs/ResourceShellBase"
686
- },
687
- {
688
- "$ref": "#/$defs/CreationContextFacet"
689
- },
690
- {
691
- "$ref": "#/$defs/ResourceShellKindFacet"
692
- },
693
- {
694
- "$ref": "#/$defs/TimestampFacet"
695
- },
696
- {
697
- "$ref": "#/$defs/PathFacet"
698
- }
699
- ]
700
- },
701
- "NucleusFacet": {
702
- "$schema": "https://json-schema.org/draft/2020-12/schema",
703
- "type": "object",
704
- "required": [
705
- "nucleus"
706
- ],
707
- "properties": {
708
- "nucleus": true
709
- }
710
- },
711
- "RoleBindings": {
712
- "$schema": "https://json-schema.org/draft/2020-12/schema",
713
- "type": "object",
714
- "required": [
715
- "inputBindings",
716
- "outputBindings"
717
- ],
718
- "properties": {
719
- "inputBindings": {
720
- "$ref": "#/$defs/RoleBindingArray"
721
- },
722
- "outputBindings": {
723
- "$ref": "#/$defs/RoleBindingArray"
724
- }
725
- }
726
- },
727
- "ShellMissing": {
728
- "$schema": "https://json-schema.org/draft/2020-12/schema",
729
- "type": "object",
730
- "required": [
731
- "resourceShellKind"
732
- ],
733
- "properties": {
734
- "resourceShellKind": {
735
- "const": "missing"
736
- }
737
- },
738
- "allOf": [
739
- {
740
- "$ref": "#/$defs/ResourceShellBase"
741
- },
742
- {
743
- "$ref": "#/$defs/ResourceShellKindFacet"
744
- }
745
- ],
746
- "unevaluatedProperties": false
747
- },
748
- "ShellInputPotential": {
749
- "$schema": "https://json-schema.org/draft/2020-12/schema",
750
- "type": "object",
751
- "required": [
752
- "resourceShellKind"
753
- ],
754
- "properties": {
755
- "resourceShellKind": {
756
- "const": "inputPotential"
757
- }
758
- },
759
- "allOf": [
760
- {
761
- "$ref": "#/$defs/ResourceShellBase"
762
- },
763
- {
764
- "$ref": "#/$defs/CreationContextFacet"
765
- },
766
- {
767
- "$ref": "#/$defs/ResourceShellKindFacet"
768
- }
769
- ],
770
- "unevaluatedProperties": false
771
- },
772
- "ShellOutputPotential": {
773
- "$schema": "https://json-schema.org/draft/2020-12/schema",
774
- "type": "object",
775
- "required": [
776
- "resourceShellKind"
777
- ],
778
- "properties": {
779
- "resourceShellKind": {
780
- "const": "outputPotential"
781
- }
782
- },
783
- "allOf": [
784
- {
785
- "$ref": "#/$defs/ResourceShellBase"
786
- },
787
- {
788
- "$ref": "#/$defs/CreationContextFacet"
789
- },
790
- {
791
- "$ref": "#/$defs/ResourceShellKindFacet"
792
- }
793
- ],
794
- "unevaluatedProperties": false
795
- },
796
- "ResourceShellBase": {
797
- "$schema": "https://json-schema.org/draft/2020-12/schema",
798
- "type": "object",
799
- "required": [
800
- "identity",
801
- "resourceTypeHandle",
802
- "resourceShellKind"
803
- ],
804
- "properties": {
805
- "identity": {
806
- "$ref": "#/$defs/ResourceIdentity"
807
- },
808
- "resourceTypeHandle": {
809
- "$ref": "#/$defs/ResourceTypeIdentity"
810
- },
811
- "resourceShellKind": {
812
- "$ref": "#/$defs/ResourceShellKind"
813
- }
814
- }
815
- },
816
- "CreationContextFacet": {
817
- "$schema": "https://json-schema.org/draft/2020-12/schema",
818
- "type": "object",
819
- "required": [
820
- "creationContext"
821
- ],
822
- "properties": {
823
- "creationContext": {
824
- "$ref": "#/$defs/CreationContext"
825
- }
826
- }
827
- },
828
- "ResourceShellKindFacet": {
829
- "$schema": "https://json-schema.org/draft/2020-12/schema",
830
- "type": "object",
831
- "required": [
832
- "resourceShellKind"
833
- ],
834
- "properties": {
835
- "resourceShellKind": {
836
- "$ref": "#/$defs/ResourceShellKind"
837
- }
838
- }
839
- },
840
- "TimestampFacet": {
841
- "$schema": "https://json-schema.org/draft/2020-12/schema",
842
- "type": "object",
843
- "required": [
844
- "timestamp"
845
- ],
846
- "properties": {
847
- "timestamp": {
848
- "$ref": "#/$defs/Timestamp"
849
- }
850
- }
851
- },
852
- "PathFacet": {
853
- "$schema": "https://json-schema.org/draft/2020-12/schema",
854
- "type": "object",
855
- "required": [
856
- "path"
857
- ],
858
- "properties": {
859
- "path": {
860
- "$ref": "#/$defs/Path"
861
- }
862
- }
863
- },
864
- "RoleBindingArray": {
865
- "$schema": "https://json-schema.org/draft/2020-12/schema",
866
- "type": "array",
867
- "items": {
868
- "$ref": "#/$defs/ResourceRoleIdentity"
869
- }
870
- },
871
- "ResourceIdentity": {
872
- "$schema": "https://json-schema.org/draft/2020-12/schema",
873
- "type": "string",
874
- "pattern": "^RESOURCE-.+$"
875
- },
876
- "ResourceTypeIdentity": {
877
- "$schema": "https://json-schema.org/draft/2020-12/schema",
878
- "type": "string",
879
- "pattern": "^TYPE-.+$"
880
- },
881
- "ResourceShellKind": {
882
- "$schema": "https://json-schema.org/draft/2020-12/schema",
883
- "type": "string",
884
- "enum": [
885
- "missing",
886
- "inputPotential",
887
- "outputPotential",
888
- "materialized"
889
- ]
890
- },
891
- "CreationContext": {
892
- "$schema": "https://json-schema.org/draft/2020-12/schema",
893
- "type": "object",
894
- "required": [
895
- "resourceRoleHandle",
896
- "jobStepHandle"
897
- ],
898
- "properties": {
899
- "resourceRoleHandle": {
900
- "$ref": "#/$defs/ResourceRoleIdentity"
901
- },
902
- "jobStepHandle": {
903
- "$ref": "#/$defs/JobStepIdentity"
904
- }
905
- }
906
- },
907
- "Path": {
908
- "$schema": "https://json-schema.org/draft/2020-12/schema",
909
- "type": "string",
910
- "format": "uri-reference"
911
- }
912
- }
913
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "required": [
5
+ "identity",
6
+ "runnableStrategyHandle",
7
+ "recordedAt",
8
+ "runEvents"
9
+ ],
10
+ "properties": {
11
+ "identity": {
12
+ "$ref": "#/$defs/StrategyRunIdentity"
13
+ },
14
+ "runnableStrategyHandle": {
15
+ "$comment": "Could be derived from the first event but useful for indexing.",
16
+ "$ref": "#/$defs/RunnableStrategyIdentity"
17
+ },
18
+ "recordedAt": {
19
+ "$ref": "#/$defs/Timestamp"
20
+ },
21
+ "runEvents": {
22
+ "type": "array",
23
+ "items": {
24
+ "$ref": "#/$defs/RunEvent"
25
+ }
26
+ }
27
+ },
28
+ "unevaluatedProperties": false,
29
+ "$defs": {
30
+ "StrategyRunIdentity": {
31
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
32
+ "type": "string",
33
+ "pattern": "^STRATEGY_RUN-.+$"
34
+ },
35
+ "RunnableStrategyIdentity": {
36
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
37
+ "type": "string",
38
+ "pattern": "^RUNNABLE_STRATEGY-.+$"
39
+ },
40
+ "Timestamp": {
41
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
42
+ "type": "string",
43
+ "format": "date-time"
44
+ },
45
+ "RunEvent": {
46
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
47
+ "type": "object",
48
+ "oneOf": [
49
+ {
50
+ "$ref": "#/$defs/GraphStartRunEvent"
51
+ },
52
+ {
53
+ "$ref": "#/$defs/TickRunEvent"
54
+ },
55
+ {
56
+ "$ref": "#/$defs/InterruptRunEvent"
57
+ },
58
+ {
59
+ "$ref": "#/$defs/GraphEndRunEvent"
60
+ }
61
+ ]
62
+ },
63
+ "GraphStartRunEvent": {
64
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
65
+ "allOf": [
66
+ {
67
+ "$ref": "#/$defs/RunEventBase"
68
+ },
69
+ {
70
+ "type": "object",
71
+ "required": [
72
+ "runnableStrategySeed"
73
+ ],
74
+ "properties": {
75
+ "runEventKind": {
76
+ "const": "graph_start"
77
+ },
78
+ "runnableStrategySeed": {
79
+ "$ref": "#/$defs/RunnableStrategy"
80
+ }
81
+ }
82
+ }
83
+ ]
84
+ },
85
+ "TickRunEvent": {
86
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
87
+ "allOf": [
88
+ {
89
+ "$ref": "#/$defs/RunEventBase"
90
+ },
91
+ {
92
+ "type": "object",
93
+ "properties": {
94
+ "runEventKind": {
95
+ "const": "tick"
96
+ }
97
+ }
98
+ }
99
+ ]
100
+ },
101
+ "InterruptRunEvent": {
102
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
103
+ "allOf": [
104
+ {
105
+ "$ref": "#/$defs/RunEventBase"
106
+ },
107
+ {
108
+ "type": "object",
109
+ "properties": {
110
+ "runEventKind": {
111
+ "const": "interrupt"
112
+ }
113
+ }
114
+ }
115
+ ]
116
+ },
117
+ "GraphEndRunEvent": {
118
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
119
+ "allOf": [
120
+ {
121
+ "$ref": "#/$defs/RunEventBase"
122
+ },
123
+ {
124
+ "type": "object",
125
+ "properties": {
126
+ "runEventKind": {
127
+ "const": "graph_end"
128
+ }
129
+ }
130
+ }
131
+ ]
132
+ },
133
+ "RunEventBase": {
134
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
135
+ "type": "object",
136
+ "required": [
137
+ "runEventKind",
138
+ "runnableStrategyHandle",
139
+ "strategyThreadHandle",
140
+ "createdAt",
141
+ "nodeName",
142
+ "eventSeq"
143
+ ],
144
+ "properties": {
145
+ "runEventKind": {
146
+ "$ref": "#/$defs/RunEventKind"
147
+ },
148
+ "runnableStrategyHandle": {
149
+ "$ref": "#/$defs/RunnableStrategyIdentity"
150
+ },
151
+ "strategyThreadHandle": {
152
+ "$ref": "#/$defs/StrategyThreadIdentity"
153
+ },
154
+ "createdAt": {
155
+ "$ref": "#/$defs/Timestamp"
156
+ },
157
+ "nodeName": {
158
+ "type": "string"
159
+ },
160
+ "eventSeq": {
161
+ "type": "integer"
162
+ },
163
+ "counters": {
164
+ "$ref": "#/$defs/RunEventCounters"
165
+ },
166
+ "stepMetadata": {
167
+ "$ref": "#/$defs/RunEventStepMetadata"
168
+ },
169
+ "updates": {
170
+ "$ref": "#/$defs/RunEventUpdates"
171
+ }
172
+ }
173
+ },
174
+ "RunnableStrategy": {
175
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
176
+ "type": "object",
177
+ "required": [
178
+ "identity",
179
+ "runnableStrategyContext"
180
+ ],
181
+ "properties": {
182
+ "identity": {
183
+ "$ref": "#/$defs/RunnableStrategyIdentity"
184
+ },
185
+ "runnableStrategyContext": {
186
+ "$ref": "#/$defs/RunnableStrategyContext"
187
+ }
188
+ },
189
+ "allOf": [
190
+ {
191
+ "$comment": "The Engine runs jobs specified by steps in strategyThreadDict. The Engine also injects repeted steps when encountering loops.",
192
+ "$ref": "#/$defs/StrategyThreadDictFacet"
193
+ },
194
+ {
195
+ "$comment": "The Engine updates strategyState with materialized Resources upon job completions and runtime-provided input events. It also inserts inputPotential and outputPotential Resources upon step injections.",
196
+ "$ref": "#/$defs/StrategyStateFacet"
197
+ }
198
+ ],
199
+ "unevaluatedProperties": false
200
+ },
201
+ "RunEventKind": {
202
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
203
+ "type": "string",
204
+ "enum": [
205
+ "graph_start",
206
+ "tick",
207
+ "interrupt",
208
+ "graph_end"
209
+ ]
210
+ },
211
+ "StrategyThreadIdentity": {
212
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
213
+ "type": "string",
214
+ "pattern": "^STRATEGY_THREAD-.+$"
215
+ },
216
+ "RunEventCounters": {
217
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
218
+ "type": "object",
219
+ "properties": {
220
+ "stepCounterAfter": {
221
+ "type": "integer"
222
+ },
223
+ "iterationCounterAfter": {
224
+ "type": "integer"
225
+ }
226
+ }
227
+ },
228
+ "RunEventStepMetadata": {
229
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
230
+ "type": "object",
231
+ "required": [
232
+ "stepHandle",
233
+ "stepKind",
234
+ "threadStepIndex"
235
+ ],
236
+ "properties": {
237
+ "stepHandle": {
238
+ "$ref": "#/$defs/StepIdentity"
239
+ },
240
+ "stepKind": {
241
+ "$ref": "#/$defs/StepKind"
242
+ },
243
+ "threadStepIndex": {
244
+ "type": "integer"
245
+ }
246
+ }
247
+ },
248
+ "RunEventUpdates": {
249
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
250
+ "type": "object",
251
+ "properties": {
252
+ "stepsMutation": {
253
+ "type": "object",
254
+ "required": [
255
+ "insertAt",
256
+ "inserted"
257
+ ],
258
+ "properties": {
259
+ "insertAt": {
260
+ "type": "integer"
261
+ },
262
+ "inserted": {
263
+ "$ref": "#/$defs/StepArray"
264
+ }
265
+ }
266
+ },
267
+ "interruptData": {
268
+ "$comment": "Kept permissive; the engine may evolve interrupt payloads.",
269
+ "type": [
270
+ "object",
271
+ "null"
272
+ ]
273
+ }
274
+ },
275
+ "allOf": [
276
+ {
277
+ "$ref": "#/$defs/StrategyStateDelta"
278
+ }
279
+ ]
280
+ },
281
+ "RunnableStrategyContext": {
282
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
283
+ "type": "object",
284
+ "required": [
285
+ "status"
286
+ ],
287
+ "properties": {
288
+ "status": {
289
+ "$ref": "#/$defs/RunnableStrategyStatus"
290
+ },
291
+ "startedAt": {
292
+ "$ref": "#/$defs/Timestamp"
293
+ },
294
+ "completedAt": {
295
+ "$ref": "#/$defs/Timestamp"
296
+ }
297
+ },
298
+ "unevaluatedProperties": false
299
+ },
300
+ "StrategyThreadDictFacet": {
301
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
302
+ "type": "object",
303
+ "required": [
304
+ "strategyThreadDict"
305
+ ],
306
+ "properties": {
307
+ "strategyThreadDict": {
308
+ "$ref": "#/$defs/StrategyThreadDict"
309
+ }
310
+ }
311
+ },
312
+ "StrategyStateFacet": {
313
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
314
+ "type": "object",
315
+ "required": [
316
+ "strategyState"
317
+ ],
318
+ "properties": {
319
+ "strategyState": {
320
+ "$ref": "#/$defs/StrategyState"
321
+ }
322
+ }
323
+ },
324
+ "StepIdentity": {
325
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
326
+ "type": "object",
327
+ "oneOf": [
328
+ {
329
+ "$ref": "#/$defs/JobStepIdentity"
330
+ },
331
+ {
332
+ "$ref": "#/$defs/BranchStepIdentity"
333
+ },
334
+ {
335
+ "$ref": "#/$defs/WhileStepIdentity"
336
+ },
337
+ {
338
+ "$ref": "#/$defs/ForStepIdentity"
339
+ }
340
+ ]
341
+ },
342
+ "StepKind": {
343
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
344
+ "type": "string",
345
+ "enum": [
346
+ "job",
347
+ "branch",
348
+ "while",
349
+ "for"
350
+ ]
351
+ },
352
+ "StepArray": {
353
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
354
+ "type": "array",
355
+ "items": {
356
+ "$ref": "#/$defs/Step"
357
+ },
358
+ "uniqueItems": true
359
+ },
360
+ "StrategyStateDelta": {
361
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
362
+ "type": "object",
363
+ "required": [
364
+ "strategyStateUpdate"
365
+ ],
366
+ "properties": {
367
+ "strategyStateUpdate": {
368
+ "$ref": "#/$defs/StrategyState"
369
+ }
370
+ }
371
+ },
372
+ "RunnableStrategyStatus": {
373
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
374
+ "type": "string",
375
+ "enum": [
376
+ "pending",
377
+ "running",
378
+ "completed",
379
+ "failed",
380
+ "cancelled"
381
+ ]
382
+ },
383
+ "StrategyThreadDict": {
384
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
385
+ "type": "object",
386
+ "propertyNames": {
387
+ "$ref": "#/$defs/StrategyThreadIdentity"
388
+ },
389
+ "additionalProperties": {
390
+ "$ref": "#/$defs/StepArray"
391
+ },
392
+ "$comment": "Each thread contains an array of steps, allowing for sequential execution within a thread while supporting parallel execution across multiple threads."
393
+ },
394
+ "StrategyState": {
395
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
396
+ "type": "object",
397
+ "propertyNames": {
398
+ "$ref": "#/$defs/JobStepIdentity"
399
+ },
400
+ "additionalProperties": {
401
+ "$ref": "#/$defs/JobStepSocket"
402
+ }
403
+ },
404
+ "JobStepIdentity": {
405
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
406
+ "type": "string",
407
+ "pattern": "^JOB_STEP-.+$"
408
+ },
409
+ "BranchStepIdentity": {
410
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
411
+ "type": "string",
412
+ "pattern": "^BRANCH_STEP-.+$"
413
+ },
414
+ "WhileStepIdentity": {
415
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
416
+ "type": "string",
417
+ "pattern": "^WHILE_STEP-.+$"
418
+ },
419
+ "ForStepIdentity": {
420
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
421
+ "type": "string",
422
+ "pattern": "^FOR_STEP-.+$"
423
+ },
424
+ "Step": {
425
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
426
+ "type": "object",
427
+ "oneOf": [
428
+ {
429
+ "$ref": "#/$defs/JobStep"
430
+ },
431
+ {
432
+ "$ref": "#/$defs/BranchStep"
433
+ },
434
+ {
435
+ "$ref": "#/$defs/WhileStep"
436
+ },
437
+ {
438
+ "$ref": "#/$defs/ForStep"
439
+ }
440
+ ],
441
+ "unevaluatedProperties": false
442
+ },
443
+ "JobStepSocket": {
444
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
445
+ "type": "object",
446
+ "propertyNames": {
447
+ "$ref": "#/$defs/ResourceRoleIdentity"
448
+ },
449
+ "additionalProperties": {
450
+ "oneOf": [
451
+ {
452
+ "$ref": "#/$defs/ResourcePotential"
453
+ },
454
+ {
455
+ "$ref": "#/$defs/Resource"
456
+ }
457
+ ]
458
+ }
459
+ },
460
+ "JobStep": {
461
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
462
+ "type": "object",
463
+ "required": [
464
+ "identity",
465
+ "stepKind",
466
+ "jobHandle"
467
+ ],
468
+ "properties": {
469
+ "identity": {
470
+ "$ref": "#/$defs/JobStepIdentity"
471
+ },
472
+ "stepKind": {
473
+ "const": "job"
474
+ },
475
+ "jobHandle": {
476
+ "$ref": "#/$defs/JobIdentity"
477
+ }
478
+ },
479
+ "allOf": [
480
+ {
481
+ "$ref": "#/$defs/StepKindFacet"
482
+ },
483
+ {
484
+ "$comment": "This will be overlayed dynamically to specify roleBindings corresponding to the roles of the underlying job.",
485
+ "$ref": "#/$defs/RoleBindingsFacet"
486
+ }
487
+ ]
488
+ },
489
+ "BranchStep": {
490
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
491
+ "type": "object",
492
+ "required": [
493
+ "identity",
494
+ "stepKind",
495
+ "cases"
496
+ ],
497
+ "properties": {
498
+ "identity": {
499
+ "$ref": "#/$defs/BranchStepIdentity"
500
+ },
501
+ "stepKind": {
502
+ "const": "branch"
503
+ },
504
+ "cases": {
505
+ "type": "array",
506
+ "items": {
507
+ "$ref": "#/$defs/Conditional"
508
+ },
509
+ "minItems": 1,
510
+ "uniqueItems": true
511
+ }
512
+ },
513
+ "allOf": [
514
+ {
515
+ "$ref": "#/$defs/StepKindFacet"
516
+ }
517
+ ]
518
+ },
519
+ "WhileStep": {
520
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
521
+ "type": "object",
522
+ "required": [
523
+ "identity",
524
+ "stepKind",
525
+ "case"
526
+ ],
527
+ "properties": {
528
+ "identity": {
529
+ "$ref": "#/$defs/WhileStepIdentity"
530
+ },
531
+ "stepKind": {
532
+ "const": "while"
533
+ },
534
+ "case": {
535
+ "$ref": "#/$defs/Conditional"
536
+ }
537
+ },
538
+ "allOf": [
539
+ {
540
+ "$ref": "#/$defs/StepKindFacet"
541
+ }
542
+ ]
543
+ },
544
+ "ForStep": {
545
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
546
+ "type": "object",
547
+ "required": [
548
+ "identity",
549
+ "stepKind",
550
+ "case"
551
+ ],
552
+ "properties": {
553
+ "identity": {
554
+ "$ref": "#/$defs/ForStepIdentity"
555
+ },
556
+ "stepKind": {
557
+ "const": "for"
558
+ },
559
+ "case": {
560
+ "$ref": "#/$defs/Conditional"
561
+ }
562
+ },
563
+ "allOf": [
564
+ {
565
+ "$ref": "#/$defs/StepKindFacet"
566
+ }
567
+ ]
568
+ },
569
+ "ResourceRoleIdentity": {
570
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
571
+ "type": "string",
572
+ "pattern": "^ROLE-.+$"
573
+ },
574
+ "ResourcePotential": {
575
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
576
+ "type": "object",
577
+ "oneOf": [
578
+ {
579
+ "$ref": "#/$defs/ResourceMissing"
580
+ },
581
+ {
582
+ "$ref": "#/$defs/ResourceInputPotential"
583
+ },
584
+ {
585
+ "$ref": "#/$defs/ResourceOutputPotential"
586
+ }
587
+ ],
588
+ "unevaluatedProperties": false
589
+ },
590
+ "Resource": {
591
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
592
+ "type": "object",
593
+ "allOf": [
594
+ {
595
+ "$ref": "#/$defs/ShellMaterializedBase"
596
+ },
597
+ {
598
+ "$comment": "This will be overlayed dynamically to match the data structure of the underlying ResourceType's nucleusSchema.",
599
+ "$ref": "#/$defs/NucleusFacet"
600
+ }
601
+ ],
602
+ "unevaluatedProperties": false
603
+ },
604
+ "JobIdentity": {
605
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
606
+ "type": "string",
607
+ "pattern": "^JOB-.+$"
608
+ },
609
+ "StepKindFacet": {
610
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
611
+ "type": "object",
612
+ "required": [
613
+ "stepKind"
614
+ ],
615
+ "properties": {
616
+ "stepKind": {
617
+ "$ref": "#/$defs/StepKind"
618
+ }
619
+ }
620
+ },
621
+ "RoleBindingsFacet": {
622
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
623
+ "type": "object",
624
+ "required": [
625
+ "roleBindings"
626
+ ],
627
+ "properties": {
628
+ "roleBindings": {
629
+ "$ref": "#/$defs/RoleBindings"
630
+ }
631
+ }
632
+ },
633
+ "Conditional": {
634
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
635
+ "type": "object",
636
+ "required": [
637
+ "when",
638
+ "what"
639
+ ],
640
+ "properties": {
641
+ "when": {
642
+ "$ref": "#/$defs/JobStep"
643
+ },
644
+ "what": {
645
+ "$ref": "#/$defs/JobStep"
646
+ }
647
+ },
648
+ "unevaluatedProperties": false
649
+ },
650
+ "ResourceMissing": {
651
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
652
+ "type": "object",
653
+ "$ref": "#/$defs/ShellMissing",
654
+ "unevaluatedProperties": false
655
+ },
656
+ "ResourceInputPotential": {
657
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
658
+ "type": "object",
659
+ "$ref": "#/$defs/ShellInputPotential",
660
+ "unevaluatedProperties": false
661
+ },
662
+ "ResourceOutputPotential": {
663
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
664
+ "type": "object",
665
+ "$ref": "#/$defs/ShellOutputPotential",
666
+ "unevaluatedProperties": false
667
+ },
668
+ "ShellMaterializedBase": {
669
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
670
+ "type": "object",
671
+ "required": [
672
+ "version",
673
+ "resourceShellKind"
674
+ ],
675
+ "properties": {
676
+ "version": {
677
+ "const": 1
678
+ },
679
+ "resourceShellKind": {
680
+ "const": "materialized"
681
+ }
682
+ },
683
+ "allOf": [
684
+ {
685
+ "$ref": "#/$defs/ResourceShellBase"
686
+ },
687
+ {
688
+ "$ref": "#/$defs/CreationContextFacet"
689
+ },
690
+ {
691
+ "$ref": "#/$defs/ResourceShellKindFacet"
692
+ },
693
+ {
694
+ "$ref": "#/$defs/TimestampFacet"
695
+ },
696
+ {
697
+ "$ref": "#/$defs/PathFacet"
698
+ }
699
+ ]
700
+ },
701
+ "NucleusFacet": {
702
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
703
+ "type": "object",
704
+ "required": [
705
+ "nucleus"
706
+ ],
707
+ "properties": {
708
+ "nucleus": true
709
+ }
710
+ },
711
+ "RoleBindings": {
712
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
713
+ "type": "object",
714
+ "required": [
715
+ "inputBindings",
716
+ "outputBindings"
717
+ ],
718
+ "properties": {
719
+ "inputBindings": {
720
+ "$ref": "#/$defs/RoleBindingArray"
721
+ },
722
+ "outputBindings": {
723
+ "$ref": "#/$defs/RoleBindingArray"
724
+ }
725
+ }
726
+ },
727
+ "ShellMissing": {
728
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
729
+ "type": "object",
730
+ "required": [
731
+ "resourceShellKind"
732
+ ],
733
+ "properties": {
734
+ "resourceShellKind": {
735
+ "const": "missing"
736
+ }
737
+ },
738
+ "allOf": [
739
+ {
740
+ "$ref": "#/$defs/ResourceShellBase"
741
+ },
742
+ {
743
+ "$ref": "#/$defs/ResourceShellKindFacet"
744
+ }
745
+ ],
746
+ "unevaluatedProperties": false
747
+ },
748
+ "ShellInputPotential": {
749
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
750
+ "type": "object",
751
+ "required": [
752
+ "resourceShellKind"
753
+ ],
754
+ "properties": {
755
+ "resourceShellKind": {
756
+ "const": "inputPotential"
757
+ }
758
+ },
759
+ "allOf": [
760
+ {
761
+ "$ref": "#/$defs/ResourceShellBase"
762
+ },
763
+ {
764
+ "$ref": "#/$defs/CreationContextFacet"
765
+ },
766
+ {
767
+ "$ref": "#/$defs/ResourceShellKindFacet"
768
+ }
769
+ ],
770
+ "unevaluatedProperties": false
771
+ },
772
+ "ShellOutputPotential": {
773
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
774
+ "type": "object",
775
+ "required": [
776
+ "resourceShellKind"
777
+ ],
778
+ "properties": {
779
+ "resourceShellKind": {
780
+ "const": "outputPotential"
781
+ }
782
+ },
783
+ "allOf": [
784
+ {
785
+ "$ref": "#/$defs/ResourceShellBase"
786
+ },
787
+ {
788
+ "$ref": "#/$defs/CreationContextFacet"
789
+ },
790
+ {
791
+ "$ref": "#/$defs/ResourceShellKindFacet"
792
+ }
793
+ ],
794
+ "unevaluatedProperties": false
795
+ },
796
+ "ResourceShellBase": {
797
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
798
+ "type": "object",
799
+ "required": [
800
+ "identity",
801
+ "resourceTypeHandle",
802
+ "resourceShellKind"
803
+ ],
804
+ "properties": {
805
+ "identity": {
806
+ "$ref": "#/$defs/ResourceIdentity"
807
+ },
808
+ "resourceTypeHandle": {
809
+ "$ref": "#/$defs/ResourceTypeIdentity"
810
+ },
811
+ "resourceShellKind": {
812
+ "$ref": "#/$defs/ResourceShellKind"
813
+ }
814
+ }
815
+ },
816
+ "CreationContextFacet": {
817
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
818
+ "type": "object",
819
+ "required": [
820
+ "creationContext"
821
+ ],
822
+ "properties": {
823
+ "creationContext": {
824
+ "$ref": "#/$defs/CreationContext"
825
+ }
826
+ }
827
+ },
828
+ "ResourceShellKindFacet": {
829
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
830
+ "type": "object",
831
+ "required": [
832
+ "resourceShellKind"
833
+ ],
834
+ "properties": {
835
+ "resourceShellKind": {
836
+ "$ref": "#/$defs/ResourceShellKind"
837
+ }
838
+ }
839
+ },
840
+ "TimestampFacet": {
841
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
842
+ "type": "object",
843
+ "required": [
844
+ "timestamp"
845
+ ],
846
+ "properties": {
847
+ "timestamp": {
848
+ "$ref": "#/$defs/Timestamp"
849
+ }
850
+ }
851
+ },
852
+ "PathFacet": {
853
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
854
+ "type": "object",
855
+ "required": [
856
+ "path"
857
+ ],
858
+ "properties": {
859
+ "path": {
860
+ "$ref": "#/$defs/Path"
861
+ }
862
+ }
863
+ },
864
+ "RoleBindingArray": {
865
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
866
+ "type": "array",
867
+ "items": {
868
+ "$ref": "#/$defs/ResourceRoleIdentity"
869
+ }
870
+ },
871
+ "ResourceIdentity": {
872
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
873
+ "type": "string",
874
+ "pattern": "^RESOURCE-.+$"
875
+ },
876
+ "ResourceTypeIdentity": {
877
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
878
+ "type": "string",
879
+ "pattern": "^TYPE-.+$"
880
+ },
881
+ "ResourceShellKind": {
882
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
883
+ "type": "string",
884
+ "enum": [
885
+ "missing",
886
+ "inputPotential",
887
+ "outputPotential",
888
+ "materialized"
889
+ ]
890
+ },
891
+ "CreationContext": {
892
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
893
+ "type": "object",
894
+ "required": [
895
+ "resourceRoleHandle",
896
+ "jobStepHandle"
897
+ ],
898
+ "properties": {
899
+ "resourceRoleHandle": {
900
+ "$ref": "#/$defs/ResourceRoleIdentity"
901
+ },
902
+ "jobStepHandle": {
903
+ "$ref": "#/$defs/JobStepIdentity"
904
+ }
905
+ }
906
+ },
907
+ "Path": {
908
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
909
+ "type": "string",
910
+ "format": "uri-reference"
911
+ }
912
+ }
913
+ }