@toolproof-core/schema 1.0.9 → 1.0.10

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 (54) hide show
  1. package/dist/generated/artifacts/constants.d.ts +120 -0
  2. package/dist/generated/artifacts/constants.js +120 -0
  3. package/dist/generated/artifacts/mappings.d.ts +23 -0
  4. package/dist/generated/artifacts/mappings.js +23 -0
  5. package/dist/generated/normalized/Genesis.json +67 -53
  6. package/dist/generated/resources/Genesis.json +424 -236
  7. package/dist/generated/schemas/Genesis.json +56 -42
  8. package/dist/generated/schemas/standalone/Job.json +2 -0
  9. package/dist/generated/schemas/standalone/RawStrategy.json +86 -110
  10. package/dist/generated/schemas/standalone/RunnableStrategy.json +108 -132
  11. package/dist/generated/schemas/standalone/StrategyRun.json +86 -110
  12. package/dist/generated/types/types.d.ts +34 -34
  13. package/dist/index.d.ts +6 -3
  14. package/dist/index.js +5 -2
  15. package/dist/scripts/_lib/config.d.ts +3 -5
  16. package/dist/scripts/_lib/config.js +8 -14
  17. package/dist/scripts/generateConstantsAndMappings.d.ts +31 -0
  18. package/dist/scripts/generateConstantsAndMappings.js +243 -0
  19. package/dist/scripts/generateDependencies.js +1 -1
  20. package/dist/scripts/generateTerminals.js +2 -2
  21. package/dist/scripts/generateTypes.js +47 -2
  22. package/dist/scripts/wrapResourceTypesWithResourceShells.js +7 -3
  23. package/package.json +9 -10
  24. package/src/Genesis.json +1847 -1833
  25. package/src/generated/artifacts/constants.ts +121 -0
  26. package/src/generated/{dependencies → artifacts}/dependencyMap.json +16 -18
  27. package/src/generated/artifacts/mappings.ts +24 -0
  28. package/src/generated/{dependencies → artifacts}/terminals.json +1 -0
  29. package/src/generated/normalized/Genesis.json +1760 -1746
  30. package/src/generated/resources/Genesis.json +2796 -2608
  31. package/src/generated/schemas/Genesis.json +1329 -1315
  32. package/src/generated/schemas/standalone/Job.json +2 -0
  33. package/src/generated/schemas/standalone/RawStrategy.json +580 -604
  34. package/src/generated/schemas/standalone/RunnableStrategy.json +645 -669
  35. package/src/generated/schemas/standalone/StrategyRun.json +913 -937
  36. package/src/generated/types/types.d.ts +709 -709
  37. package/src/index.ts +75 -70
  38. package/src/scripts/_lib/config.ts +207 -215
  39. package/src/scripts/extractSchemasFromResourceTypeShells.ts +261 -261
  40. package/src/scripts/generateConstantsAndMappings.ts +309 -0
  41. package/src/scripts/generateDependencies.ts +121 -121
  42. package/src/scripts/generateSchemaShims.ts +127 -127
  43. package/src/scripts/generateStandaloneSchema.ts +185 -185
  44. package/src/scripts/generateStandaloneType.ts +127 -127
  45. package/src/scripts/generateTerminals.ts +73 -73
  46. package/src/scripts/generateTypes.ts +587 -531
  47. package/src/scripts/normalizeAnchorsToPointers.ts +141 -141
  48. package/src/scripts/wrapResourceTypesWithResourceShells.ts +86 -82
  49. package/dist/generated/constants/constants.d.ts +0 -60
  50. package/dist/generated/constants/constants.js +0 -60
  51. package/dist/scripts/generateConstants.d.ts +0 -12
  52. package/dist/scripts/generateConstants.js +0 -179
  53. package/src/generated/constants/constants.ts +0 -61
  54. package/src/scripts/generateConstants.ts +0 -217
@@ -1,937 +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
- "$ref": "#/$defs/Resource"
451
- }
452
- },
453
- "JobStep": {
454
- "$schema": "https://json-schema.org/draft/2020-12/schema",
455
- "type": "object",
456
- "required": [
457
- "identity",
458
- "stepKind",
459
- "jobHandle"
460
- ],
461
- "properties": {
462
- "identity": {
463
- "$ref": "#/$defs/JobStepIdentity"
464
- },
465
- "stepKind": {
466
- "const": "job"
467
- },
468
- "jobHandle": {
469
- "$ref": "#/$defs/JobIdentity"
470
- }
471
- },
472
- "allOf": [
473
- {
474
- "$ref": "#/$defs/StepKindFacet"
475
- },
476
- {
477
- "$comment": "This will be overlayed dynamically to specify roleBindings corresponding to the roles of the underlying job.",
478
- "$ref": "#/$defs/RoleBindingsFacet"
479
- }
480
- ]
481
- },
482
- "BranchStep": {
483
- "$schema": "https://json-schema.org/draft/2020-12/schema",
484
- "type": "object",
485
- "required": [
486
- "identity",
487
- "stepKind",
488
- "cases"
489
- ],
490
- "properties": {
491
- "identity": {
492
- "$ref": "#/$defs/BranchStepIdentity"
493
- },
494
- "stepKind": {
495
- "const": "branch"
496
- },
497
- "cases": {
498
- "type": "array",
499
- "items": {
500
- "$ref": "#/$defs/Conditional"
501
- },
502
- "minItems": 1,
503
- "uniqueItems": true
504
- }
505
- },
506
- "allOf": [
507
- {
508
- "$ref": "#/$defs/StepKindFacet"
509
- }
510
- ]
511
- },
512
- "WhileStep": {
513
- "$schema": "https://json-schema.org/draft/2020-12/schema",
514
- "type": "object",
515
- "required": [
516
- "identity",
517
- "stepKind",
518
- "case"
519
- ],
520
- "properties": {
521
- "identity": {
522
- "$ref": "#/$defs/WhileStepIdentity"
523
- },
524
- "stepKind": {
525
- "const": "while"
526
- },
527
- "case": {
528
- "$ref": "#/$defs/Conditional"
529
- }
530
- },
531
- "allOf": [
532
- {
533
- "$ref": "#/$defs/StepKindFacet"
534
- }
535
- ]
536
- },
537
- "ForStep": {
538
- "$schema": "https://json-schema.org/draft/2020-12/schema",
539
- "type": "object",
540
- "required": [
541
- "identity",
542
- "stepKind",
543
- "case"
544
- ],
545
- "properties": {
546
- "identity": {
547
- "$ref": "#/$defs/ForStepIdentity"
548
- },
549
- "stepKind": {
550
- "const": "for"
551
- },
552
- "case": {
553
- "$ref": "#/$defs/Conditional"
554
- }
555
- },
556
- "allOf": [
557
- {
558
- "$ref": "#/$defs/StepKindFacet"
559
- }
560
- ]
561
- },
562
- "ResourceRoleIdentity": {
563
- "$schema": "https://json-schema.org/draft/2020-12/schema",
564
- "type": "string",
565
- "pattern": "^ROLE-.+$"
566
- },
567
- "Resource": {
568
- "$schema": "https://json-schema.org/draft/2020-12/schema",
569
- "type": "object",
570
- "oneOf": [
571
- {
572
- "$ref": "#/$defs/ResourceMissing"
573
- },
574
- {
575
- "$ref": "#/$defs/ResourceInputPotential"
576
- },
577
- {
578
- "$ref": "#/$defs/ResourceOutputPotential"
579
- },
580
- {
581
- "$ref": "#/$defs/ResourceMaterialized"
582
- }
583
- ],
584
- "unevaluatedProperties": false
585
- },
586
- "JobIdentity": {
587
- "$schema": "https://json-schema.org/draft/2020-12/schema",
588
- "type": "string",
589
- "pattern": "^JOB-.+$"
590
- },
591
- "StepKindFacet": {
592
- "$schema": "https://json-schema.org/draft/2020-12/schema",
593
- "type": "object",
594
- "required": [
595
- "stepKind"
596
- ],
597
- "properties": {
598
- "stepKind": {
599
- "$ref": "#/$defs/StepKind"
600
- }
601
- }
602
- },
603
- "RoleBindingsFacet": {
604
- "$schema": "https://json-schema.org/draft/2020-12/schema",
605
- "type": "object",
606
- "required": [
607
- "roleBindings"
608
- ],
609
- "properties": {
610
- "roleBindings": {
611
- "$ref": "#/$defs/RoleBindings"
612
- }
613
- }
614
- },
615
- "Conditional": {
616
- "$schema": "https://json-schema.org/draft/2020-12/schema",
617
- "type": "object",
618
- "required": [
619
- "when",
620
- "what"
621
- ],
622
- "properties": {
623
- "when": {
624
- "$ref": "#/$defs/JobStep"
625
- },
626
- "what": {
627
- "$ref": "#/$defs/JobStep"
628
- }
629
- },
630
- "unevaluatedProperties": false
631
- },
632
- "ResourceMissing": {
633
- "$schema": "https://json-schema.org/draft/2020-12/schema",
634
- "type": "object",
635
- "$ref": "#/$defs/ShellMissing",
636
- "unevaluatedProperties": false
637
- },
638
- "ResourceInputPotential": {
639
- "$schema": "https://json-schema.org/draft/2020-12/schema",
640
- "type": "object",
641
- "$ref": "#/$defs/ShellInputPotential",
642
- "unevaluatedProperties": false
643
- },
644
- "ResourceOutputPotential": {
645
- "$schema": "https://json-schema.org/draft/2020-12/schema",
646
- "type": "object",
647
- "$ref": "#/$defs/ShellOutputPotential",
648
- "unevaluatedProperties": false
649
- },
650
- "ResourceMaterialized": {
651
- "$schema": "https://json-schema.org/draft/2020-12/schema",
652
- "type": "object",
653
- "allOf": [
654
- {
655
- "$ref": "#/$defs/ShellMaterializedBase"
656
- },
657
- {
658
- "$comment": "This will be overlayed dynamically to match the data structure of the underlying ResourceType's nucleusSchema.",
659
- "$ref": "#/$defs/NucleusFacet"
660
- }
661
- ],
662
- "unevaluatedProperties": false
663
- },
664
- "RoleBindings": {
665
- "$schema": "https://json-schema.org/draft/2020-12/schema",
666
- "type": "object",
667
- "required": [
668
- "inputBindings",
669
- "outputBindings"
670
- ],
671
- "properties": {
672
- "inputBindings": {
673
- "$ref": "#/$defs/RoleBindingArray"
674
- },
675
- "outputBindings": {
676
- "$ref": "#/$defs/RoleBindingArray"
677
- }
678
- }
679
- },
680
- "ShellMissing": {
681
- "$schema": "https://json-schema.org/draft/2020-12/schema",
682
- "type": "object",
683
- "properties": {
684
- "resourceKind": {
685
- "const": "missing"
686
- }
687
- },
688
- "allOf": [
689
- {
690
- "$ref": "#/$defs/ResourceShellBase"
691
- },
692
- {
693
- "$ref": "#/$defs/ResourceKindFacet"
694
- }
695
- ],
696
- "unevaluatedProperties": false
697
- },
698
- "ShellInputPotential": {
699
- "$schema": "https://json-schema.org/draft/2020-12/schema",
700
- "type": "object",
701
- "properties": {
702
- "resourceKind": {
703
- "const": "inputPotential"
704
- }
705
- },
706
- "allOf": [
707
- {
708
- "$ref": "#/$defs/ResourceShellBase"
709
- },
710
- {
711
- "$ref": "#/$defs/CreationContextFacet"
712
- },
713
- {
714
- "$ref": "#/$defs/ResourceKindFacet"
715
- }
716
- ],
717
- "unevaluatedProperties": false
718
- },
719
- "ShellOutputPotential": {
720
- "$schema": "https://json-schema.org/draft/2020-12/schema",
721
- "type": "object",
722
- "properties": {
723
- "resourceKind": {
724
- "const": "outputPotential"
725
- }
726
- },
727
- "allOf": [
728
- {
729
- "$ref": "#/$defs/ResourceShellBase"
730
- },
731
- {
732
- "$ref": "#/$defs/CreationContextFacet"
733
- },
734
- {
735
- "$ref": "#/$defs/ResourceKindFacet"
736
- }
737
- ],
738
- "unevaluatedProperties": false
739
- },
740
- "ShellMaterializedBase": {
741
- "$schema": "https://json-schema.org/draft/2020-12/schema",
742
- "type": "object",
743
- "required": [
744
- "version"
745
- ],
746
- "properties": {
747
- "version": {
748
- "const": 1
749
- },
750
- "resourceKind": {
751
- "const": "materialized"
752
- }
753
- },
754
- "allOf": [
755
- {
756
- "$ref": "#/$defs/ResourceShellBase"
757
- },
758
- {
759
- "$ref": "#/$defs/CreationContextFacet"
760
- },
761
- {
762
- "$ref": "#/$defs/ResourceKindFacet"
763
- },
764
- {
765
- "$ref": "#/$defs/TimestampFacet"
766
- },
767
- {
768
- "$ref": "#/$defs/PathFacet"
769
- }
770
- ]
771
- },
772
- "NucleusFacet": {
773
- "$schema": "https://json-schema.org/draft/2020-12/schema",
774
- "type": "object",
775
- "required": [
776
- "nucleus"
777
- ],
778
- "properties": {
779
- "nucleus": {
780
- "$ref": "#/$defs/Nucleus"
781
- }
782
- }
783
- },
784
- "RoleBindingArray": {
785
- "$schema": "https://json-schema.org/draft/2020-12/schema",
786
- "type": "array",
787
- "items": {
788
- "$ref": "#/$defs/ResourceRoleIdentity"
789
- }
790
- },
791
- "ResourceShellBase": {
792
- "$schema": "https://json-schema.org/draft/2020-12/schema",
793
- "type": "object",
794
- "required": [
795
- "identity",
796
- "resourceTypeHandle",
797
- "resourceKind"
798
- ],
799
- "properties": {
800
- "identity": {
801
- "$ref": "#/$defs/ResourceIdentity"
802
- },
803
- "resourceTypeHandle": {
804
- "$ref": "#/$defs/ResourceTypeIdentity"
805
- },
806
- "resourceKind": {
807
- "$ref": "#/$defs/ResourceKind"
808
- }
809
- }
810
- },
811
- "ResourceKindFacet": {
812
- "$schema": "https://json-schema.org/draft/2020-12/schema",
813
- "type": "object",
814
- "required": [
815
- "resourceKind"
816
- ],
817
- "properties": {
818
- "resourceKind": {
819
- "$ref": "#/$defs/ResourceKind"
820
- }
821
- }
822
- },
823
- "CreationContextFacet": {
824
- "$schema": "https://json-schema.org/draft/2020-12/schema",
825
- "type": "object",
826
- "required": [
827
- "creationContext"
828
- ],
829
- "properties": {
830
- "creationContext": {
831
- "$ref": "#/$defs/CreationContext"
832
- }
833
- }
834
- },
835
- "TimestampFacet": {
836
- "$schema": "https://json-schema.org/draft/2020-12/schema",
837
- "type": "object",
838
- "required": [
839
- "timestamp"
840
- ],
841
- "properties": {
842
- "timestamp": {
843
- "$ref": "#/$defs/Timestamp"
844
- }
845
- }
846
- },
847
- "PathFacet": {
848
- "$schema": "https://json-schema.org/draft/2020-12/schema",
849
- "type": "object",
850
- "required": [
851
- "path"
852
- ],
853
- "properties": {
854
- "path": {
855
- "$ref": "#/$defs/Path"
856
- }
857
- }
858
- },
859
- "Nucleus": {
860
- "$schema": "https://json-schema.org/draft/2020-12/schema",
861
- "type": "object",
862
- "additionalProperties": {
863
- "$ref": "#/$defs/JsonData"
864
- }
865
- },
866
- "ResourceIdentity": {
867
- "$schema": "https://json-schema.org/draft/2020-12/schema",
868
- "type": "string",
869
- "pattern": "^RESOURCE-.+$"
870
- },
871
- "ResourceTypeIdentity": {
872
- "$schema": "https://json-schema.org/draft/2020-12/schema",
873
- "type": "string",
874
- "pattern": "^TYPE-.+$"
875
- },
876
- "ResourceKind": {
877
- "$schema": "https://json-schema.org/draft/2020-12/schema",
878
- "type": "string",
879
- "enum": [
880
- "missing",
881
- "inputPotential",
882
- "outputPotential",
883
- "materialized"
884
- ]
885
- },
886
- "CreationContext": {
887
- "$schema": "https://json-schema.org/draft/2020-12/schema",
888
- "type": "object",
889
- "required": [
890
- "resourceRoleHandle",
891
- "jobStepHandle"
892
- ],
893
- "properties": {
894
- "resourceRoleHandle": {
895
- "$ref": "#/$defs/ResourceRoleIdentity"
896
- },
897
- "jobStepHandle": {
898
- "$ref": "#/$defs/JobStepIdentity"
899
- }
900
- }
901
- },
902
- "Path": {
903
- "$schema": "https://json-schema.org/draft/2020-12/schema",
904
- "type": "string",
905
- "format": "uri-reference"
906
- },
907
- "JsonData": {
908
- "$schema": "https://json-schema.org/draft/2020-12/schema",
909
- "oneOf": [
910
- {
911
- "type": "null"
912
- },
913
- {
914
- "type": "boolean"
915
- },
916
- {
917
- "type": "number"
918
- },
919
- {
920
- "type": "string"
921
- },
922
- {
923
- "type": "array",
924
- "items": {
925
- "$ref": "#/$defs/JsonData"
926
- }
927
- },
928
- {
929
- "type": "object",
930
- "additionalProperties": {
931
- "$ref": "#/$defs/JsonData"
932
- }
933
- }
934
- ]
935
- }
936
- }
937
- }
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
+ }