@toolproof-core/schema 1.0.11 → 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.
@@ -1,645 +1,645 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "type": "object",
4
- "required": [
5
- "identity",
6
- "runnableStrategyContext"
7
- ],
8
- "properties": {
9
- "identity": {
10
- "$ref": "#/$defs/RunnableStrategyIdentity"
11
- },
12
- "runnableStrategyContext": {
13
- "$ref": "#/$defs/RunnableStrategyContext"
14
- }
15
- },
16
- "allOf": [
17
- {
18
- "$comment": "The Engine runs jobs specified by steps in strategyThreadDict. The Engine also injects repeted steps when encountering loops.",
19
- "$ref": "#/$defs/StrategyThreadDictFacet"
20
- },
21
- {
22
- "$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.",
23
- "$ref": "#/$defs/StrategyStateFacet"
24
- }
25
- ],
26
- "unevaluatedProperties": false,
27
- "$defs": {
28
- "RunnableStrategyIdentity": {
29
- "$schema": "https://json-schema.org/draft/2020-12/schema",
30
- "type": "string",
31
- "pattern": "^RUNNABLE_STRATEGY-.+$"
32
- },
33
- "RunnableStrategyContext": {
34
- "$schema": "https://json-schema.org/draft/2020-12/schema",
35
- "type": "object",
36
- "required": [
37
- "status"
38
- ],
39
- "properties": {
40
- "status": {
41
- "$ref": "#/$defs/RunnableStrategyStatus"
42
- },
43
- "startedAt": {
44
- "$ref": "#/$defs/Timestamp"
45
- },
46
- "completedAt": {
47
- "$ref": "#/$defs/Timestamp"
48
- }
49
- },
50
- "unevaluatedProperties": false
51
- },
52
- "StrategyThreadDictFacet": {
53
- "$schema": "https://json-schema.org/draft/2020-12/schema",
54
- "type": "object",
55
- "required": [
56
- "strategyThreadDict"
57
- ],
58
- "properties": {
59
- "strategyThreadDict": {
60
- "$ref": "#/$defs/StrategyThreadDict"
61
- }
62
- }
63
- },
64
- "StrategyStateFacet": {
65
- "$schema": "https://json-schema.org/draft/2020-12/schema",
66
- "type": "object",
67
- "required": [
68
- "strategyState"
69
- ],
70
- "properties": {
71
- "strategyState": {
72
- "$ref": "#/$defs/StrategyState"
73
- }
74
- }
75
- },
76
- "RunnableStrategyStatus": {
77
- "$schema": "https://json-schema.org/draft/2020-12/schema",
78
- "type": "string",
79
- "enum": [
80
- "pending",
81
- "running",
82
- "completed",
83
- "failed",
84
- "cancelled"
85
- ]
86
- },
87
- "Timestamp": {
88
- "$schema": "https://json-schema.org/draft/2020-12/schema",
89
- "type": "string",
90
- "format": "date-time"
91
- },
92
- "StrategyThreadDict": {
93
- "$schema": "https://json-schema.org/draft/2020-12/schema",
94
- "type": "object",
95
- "propertyNames": {
96
- "$ref": "#/$defs/StrategyThreadIdentity"
97
- },
98
- "additionalProperties": {
99
- "$ref": "#/$defs/StepArray"
100
- },
101
- "$comment": "Each thread contains an array of steps, allowing for sequential execution within a thread while supporting parallel execution across multiple threads."
102
- },
103
- "StrategyState": {
104
- "$schema": "https://json-schema.org/draft/2020-12/schema",
105
- "type": "object",
106
- "propertyNames": {
107
- "$ref": "#/$defs/JobStepIdentity"
108
- },
109
- "additionalProperties": {
110
- "$ref": "#/$defs/JobStepSocket"
111
- }
112
- },
113
- "StrategyThreadIdentity": {
114
- "$schema": "https://json-schema.org/draft/2020-12/schema",
115
- "type": "string",
116
- "pattern": "^STRATEGY_THREAD-.+$"
117
- },
118
- "StepArray": {
119
- "$schema": "https://json-schema.org/draft/2020-12/schema",
120
- "type": "array",
121
- "items": {
122
- "$ref": "#/$defs/Step"
123
- },
124
- "uniqueItems": true
125
- },
126
- "JobStepIdentity": {
127
- "$schema": "https://json-schema.org/draft/2020-12/schema",
128
- "type": "string",
129
- "pattern": "^JOB_STEP-.+$"
130
- },
131
- "JobStepSocket": {
132
- "$schema": "https://json-schema.org/draft/2020-12/schema",
133
- "type": "object",
134
- "propertyNames": {
135
- "$ref": "#/$defs/ResourceRoleIdentity"
136
- },
137
- "additionalProperties": {
138
- "oneOf": [
139
- {
140
- "$ref": "#/$defs/ResourcePotential"
141
- },
142
- {
143
- "$ref": "#/$defs/Resource"
144
- }
145
- ]
146
- }
147
- },
148
- "Step": {
149
- "$schema": "https://json-schema.org/draft/2020-12/schema",
150
- "type": "object",
151
- "oneOf": [
152
- {
153
- "$ref": "#/$defs/JobStep"
154
- },
155
- {
156
- "$ref": "#/$defs/BranchStep"
157
- },
158
- {
159
- "$ref": "#/$defs/WhileStep"
160
- },
161
- {
162
- "$ref": "#/$defs/ForStep"
163
- }
164
- ],
165
- "unevaluatedProperties": false
166
- },
167
- "ResourceRoleIdentity": {
168
- "$schema": "https://json-schema.org/draft/2020-12/schema",
169
- "type": "string",
170
- "pattern": "^ROLE-.+$"
171
- },
172
- "ResourcePotential": {
173
- "$schema": "https://json-schema.org/draft/2020-12/schema",
174
- "type": "object",
175
- "oneOf": [
176
- {
177
- "$ref": "#/$defs/ResourceMissing"
178
- },
179
- {
180
- "$ref": "#/$defs/ResourceInputPotential"
181
- },
182
- {
183
- "$ref": "#/$defs/ResourceOutputPotential"
184
- }
185
- ],
186
- "unevaluatedProperties": false
187
- },
188
- "Resource": {
189
- "$schema": "https://json-schema.org/draft/2020-12/schema",
190
- "type": "object",
191
- "allOf": [
192
- {
193
- "$ref": "#/$defs/ShellMaterializedBase"
194
- },
195
- {
196
- "$comment": "This will be overlayed dynamically to match the data structure of the underlying ResourceType's nucleusSchema.",
197
- "$ref": "#/$defs/NucleusFacet"
198
- }
199
- ],
200
- "unevaluatedProperties": false
201
- },
202
- "JobStep": {
203
- "$schema": "https://json-schema.org/draft/2020-12/schema",
204
- "type": "object",
205
- "required": [
206
- "identity",
207
- "stepKind",
208
- "jobHandle"
209
- ],
210
- "properties": {
211
- "identity": {
212
- "$ref": "#/$defs/JobStepIdentity"
213
- },
214
- "stepKind": {
215
- "const": "job"
216
- },
217
- "jobHandle": {
218
- "$ref": "#/$defs/JobIdentity"
219
- }
220
- },
221
- "allOf": [
222
- {
223
- "$ref": "#/$defs/StepKindFacet"
224
- },
225
- {
226
- "$comment": "This will be overlayed dynamically to specify roleBindings corresponding to the roles of the underlying job.",
227
- "$ref": "#/$defs/RoleBindingsFacet"
228
- }
229
- ]
230
- },
231
- "BranchStep": {
232
- "$schema": "https://json-schema.org/draft/2020-12/schema",
233
- "type": "object",
234
- "required": [
235
- "identity",
236
- "stepKind",
237
- "cases"
238
- ],
239
- "properties": {
240
- "identity": {
241
- "$ref": "#/$defs/BranchStepIdentity"
242
- },
243
- "stepKind": {
244
- "const": "branch"
245
- },
246
- "cases": {
247
- "type": "array",
248
- "items": {
249
- "$ref": "#/$defs/Conditional"
250
- },
251
- "minItems": 1,
252
- "uniqueItems": true
253
- }
254
- },
255
- "allOf": [
256
- {
257
- "$ref": "#/$defs/StepKindFacet"
258
- }
259
- ]
260
- },
261
- "WhileStep": {
262
- "$schema": "https://json-schema.org/draft/2020-12/schema",
263
- "type": "object",
264
- "required": [
265
- "identity",
266
- "stepKind",
267
- "case"
268
- ],
269
- "properties": {
270
- "identity": {
271
- "$ref": "#/$defs/WhileStepIdentity"
272
- },
273
- "stepKind": {
274
- "const": "while"
275
- },
276
- "case": {
277
- "$ref": "#/$defs/Conditional"
278
- }
279
- },
280
- "allOf": [
281
- {
282
- "$ref": "#/$defs/StepKindFacet"
283
- }
284
- ]
285
- },
286
- "ForStep": {
287
- "$schema": "https://json-schema.org/draft/2020-12/schema",
288
- "type": "object",
289
- "required": [
290
- "identity",
291
- "stepKind",
292
- "case"
293
- ],
294
- "properties": {
295
- "identity": {
296
- "$ref": "#/$defs/ForStepIdentity"
297
- },
298
- "stepKind": {
299
- "const": "for"
300
- },
301
- "case": {
302
- "$ref": "#/$defs/Conditional"
303
- }
304
- },
305
- "allOf": [
306
- {
307
- "$ref": "#/$defs/StepKindFacet"
308
- }
309
- ]
310
- },
311
- "ResourceMissing": {
312
- "$schema": "https://json-schema.org/draft/2020-12/schema",
313
- "type": "object",
314
- "$ref": "#/$defs/ShellMissing",
315
- "unevaluatedProperties": false
316
- },
317
- "ResourceInputPotential": {
318
- "$schema": "https://json-schema.org/draft/2020-12/schema",
319
- "type": "object",
320
- "$ref": "#/$defs/ShellInputPotential",
321
- "unevaluatedProperties": false
322
- },
323
- "ResourceOutputPotential": {
324
- "$schema": "https://json-schema.org/draft/2020-12/schema",
325
- "type": "object",
326
- "$ref": "#/$defs/ShellOutputPotential",
327
- "unevaluatedProperties": false
328
- },
329
- "ShellMaterializedBase": {
330
- "$schema": "https://json-schema.org/draft/2020-12/schema",
331
- "type": "object",
332
- "required": [
333
- "version",
334
- "resourceShellKind"
335
- ],
336
- "properties": {
337
- "version": {
338
- "const": 1
339
- },
340
- "resourceShellKind": {
341
- "const": "materialized"
342
- }
343
- },
344
- "allOf": [
345
- {
346
- "$ref": "#/$defs/ResourceShellBase"
347
- },
348
- {
349
- "$ref": "#/$defs/CreationContextFacet"
350
- },
351
- {
352
- "$ref": "#/$defs/ResourceShellKindFacet"
353
- },
354
- {
355
- "$ref": "#/$defs/TimestampFacet"
356
- },
357
- {
358
- "$ref": "#/$defs/PathFacet"
359
- }
360
- ]
361
- },
362
- "NucleusFacet": {
363
- "$schema": "https://json-schema.org/draft/2020-12/schema",
364
- "type": "object",
365
- "required": [
366
- "nucleus"
367
- ],
368
- "properties": {
369
- "nucleus": true
370
- }
371
- },
372
- "JobIdentity": {
373
- "$schema": "https://json-schema.org/draft/2020-12/schema",
374
- "type": "string",
375
- "pattern": "^JOB-.+$"
376
- },
377
- "StepKindFacet": {
378
- "$schema": "https://json-schema.org/draft/2020-12/schema",
379
- "type": "object",
380
- "required": [
381
- "stepKind"
382
- ],
383
- "properties": {
384
- "stepKind": {
385
- "$ref": "#/$defs/StepKind"
386
- }
387
- }
388
- },
389
- "RoleBindingsFacet": {
390
- "$schema": "https://json-schema.org/draft/2020-12/schema",
391
- "type": "object",
392
- "required": [
393
- "roleBindings"
394
- ],
395
- "properties": {
396
- "roleBindings": {
397
- "$ref": "#/$defs/RoleBindings"
398
- }
399
- }
400
- },
401
- "BranchStepIdentity": {
402
- "$schema": "https://json-schema.org/draft/2020-12/schema",
403
- "type": "string",
404
- "pattern": "^BRANCH_STEP-.+$"
405
- },
406
- "Conditional": {
407
- "$schema": "https://json-schema.org/draft/2020-12/schema",
408
- "type": "object",
409
- "required": [
410
- "when",
411
- "what"
412
- ],
413
- "properties": {
414
- "when": {
415
- "$ref": "#/$defs/JobStep"
416
- },
417
- "what": {
418
- "$ref": "#/$defs/JobStep"
419
- }
420
- },
421
- "unevaluatedProperties": false
422
- },
423
- "WhileStepIdentity": {
424
- "$schema": "https://json-schema.org/draft/2020-12/schema",
425
- "type": "string",
426
- "pattern": "^WHILE_STEP-.+$"
427
- },
428
- "ForStepIdentity": {
429
- "$schema": "https://json-schema.org/draft/2020-12/schema",
430
- "type": "string",
431
- "pattern": "^FOR_STEP-.+$"
432
- },
433
- "ShellMissing": {
434
- "$schema": "https://json-schema.org/draft/2020-12/schema",
435
- "type": "object",
436
- "required": [
437
- "resourceShellKind"
438
- ],
439
- "properties": {
440
- "resourceShellKind": {
441
- "const": "missing"
442
- }
443
- },
444
- "allOf": [
445
- {
446
- "$ref": "#/$defs/ResourceShellBase"
447
- },
448
- {
449
- "$ref": "#/$defs/ResourceShellKindFacet"
450
- }
451
- ],
452
- "unevaluatedProperties": false
453
- },
454
- "ShellInputPotential": {
455
- "$schema": "https://json-schema.org/draft/2020-12/schema",
456
- "type": "object",
457
- "required": [
458
- "resourceShellKind"
459
- ],
460
- "properties": {
461
- "resourceShellKind": {
462
- "const": "inputPotential"
463
- }
464
- },
465
- "allOf": [
466
- {
467
- "$ref": "#/$defs/ResourceShellBase"
468
- },
469
- {
470
- "$ref": "#/$defs/CreationContextFacet"
471
- },
472
- {
473
- "$ref": "#/$defs/ResourceShellKindFacet"
474
- }
475
- ],
476
- "unevaluatedProperties": false
477
- },
478
- "ShellOutputPotential": {
479
- "$schema": "https://json-schema.org/draft/2020-12/schema",
480
- "type": "object",
481
- "required": [
482
- "resourceShellKind"
483
- ],
484
- "properties": {
485
- "resourceShellKind": {
486
- "const": "outputPotential"
487
- }
488
- },
489
- "allOf": [
490
- {
491
- "$ref": "#/$defs/ResourceShellBase"
492
- },
493
- {
494
- "$ref": "#/$defs/CreationContextFacet"
495
- },
496
- {
497
- "$ref": "#/$defs/ResourceShellKindFacet"
498
- }
499
- ],
500
- "unevaluatedProperties": false
501
- },
502
- "ResourceShellBase": {
503
- "$schema": "https://json-schema.org/draft/2020-12/schema",
504
- "type": "object",
505
- "required": [
506
- "identity",
507
- "resourceTypeHandle",
508
- "resourceShellKind"
509
- ],
510
- "properties": {
511
- "identity": {
512
- "$ref": "#/$defs/ResourceIdentity"
513
- },
514
- "resourceTypeHandle": {
515
- "$ref": "#/$defs/ResourceTypeIdentity"
516
- },
517
- "resourceShellKind": {
518
- "$ref": "#/$defs/ResourceShellKind"
519
- }
520
- }
521
- },
522
- "CreationContextFacet": {
523
- "$schema": "https://json-schema.org/draft/2020-12/schema",
524
- "type": "object",
525
- "required": [
526
- "creationContext"
527
- ],
528
- "properties": {
529
- "creationContext": {
530
- "$ref": "#/$defs/CreationContext"
531
- }
532
- }
533
- },
534
- "ResourceShellKindFacet": {
535
- "$schema": "https://json-schema.org/draft/2020-12/schema",
536
- "type": "object",
537
- "required": [
538
- "resourceShellKind"
539
- ],
540
- "properties": {
541
- "resourceShellKind": {
542
- "$ref": "#/$defs/ResourceShellKind"
543
- }
544
- }
545
- },
546
- "TimestampFacet": {
547
- "$schema": "https://json-schema.org/draft/2020-12/schema",
548
- "type": "object",
549
- "required": [
550
- "timestamp"
551
- ],
552
- "properties": {
553
- "timestamp": {
554
- "$ref": "#/$defs/Timestamp"
555
- }
556
- }
557
- },
558
- "PathFacet": {
559
- "$schema": "https://json-schema.org/draft/2020-12/schema",
560
- "type": "object",
561
- "required": [
562
- "path"
563
- ],
564
- "properties": {
565
- "path": {
566
- "$ref": "#/$defs/Path"
567
- }
568
- }
569
- },
570
- "StepKind": {
571
- "$schema": "https://json-schema.org/draft/2020-12/schema",
572
- "type": "string",
573
- "enum": [
574
- "job",
575
- "branch",
576
- "while",
577
- "for"
578
- ]
579
- },
580
- "RoleBindings": {
581
- "$schema": "https://json-schema.org/draft/2020-12/schema",
582
- "type": "object",
583
- "required": [
584
- "inputBindings",
585
- "outputBindings"
586
- ],
587
- "properties": {
588
- "inputBindings": {
589
- "$ref": "#/$defs/RoleBindingArray"
590
- },
591
- "outputBindings": {
592
- "$ref": "#/$defs/RoleBindingArray"
593
- }
594
- }
595
- },
596
- "ResourceIdentity": {
597
- "$schema": "https://json-schema.org/draft/2020-12/schema",
598
- "type": "string",
599
- "pattern": "^RESOURCE-.+$"
600
- },
601
- "ResourceTypeIdentity": {
602
- "$schema": "https://json-schema.org/draft/2020-12/schema",
603
- "type": "string",
604
- "pattern": "^TYPE-.+$"
605
- },
606
- "ResourceShellKind": {
607
- "$schema": "https://json-schema.org/draft/2020-12/schema",
608
- "type": "string",
609
- "enum": [
610
- "missing",
611
- "inputPotential",
612
- "outputPotential",
613
- "materialized"
614
- ]
615
- },
616
- "CreationContext": {
617
- "$schema": "https://json-schema.org/draft/2020-12/schema",
618
- "type": "object",
619
- "required": [
620
- "resourceRoleHandle",
621
- "jobStepHandle"
622
- ],
623
- "properties": {
624
- "resourceRoleHandle": {
625
- "$ref": "#/$defs/ResourceRoleIdentity"
626
- },
627
- "jobStepHandle": {
628
- "$ref": "#/$defs/JobStepIdentity"
629
- }
630
- }
631
- },
632
- "Path": {
633
- "$schema": "https://json-schema.org/draft/2020-12/schema",
634
- "type": "string",
635
- "format": "uri-reference"
636
- },
637
- "RoleBindingArray": {
638
- "$schema": "https://json-schema.org/draft/2020-12/schema",
639
- "type": "array",
640
- "items": {
641
- "$ref": "#/$defs/ResourceRoleIdentity"
642
- }
643
- }
644
- }
645
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "type": "object",
4
+ "required": [
5
+ "identity",
6
+ "runnableStrategyContext"
7
+ ],
8
+ "properties": {
9
+ "identity": {
10
+ "$ref": "#/$defs/RunnableStrategyIdentity"
11
+ },
12
+ "runnableStrategyContext": {
13
+ "$ref": "#/$defs/RunnableStrategyContext"
14
+ }
15
+ },
16
+ "allOf": [
17
+ {
18
+ "$comment": "The Engine runs jobs specified by steps in strategyThreadDict. The Engine also injects repeted steps when encountering loops.",
19
+ "$ref": "#/$defs/StrategyThreadDictFacet"
20
+ },
21
+ {
22
+ "$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.",
23
+ "$ref": "#/$defs/StrategyStateFacet"
24
+ }
25
+ ],
26
+ "unevaluatedProperties": false,
27
+ "$defs": {
28
+ "RunnableStrategyIdentity": {
29
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
30
+ "type": "string",
31
+ "pattern": "^RUNNABLE_STRATEGY-.+$"
32
+ },
33
+ "RunnableStrategyContext": {
34
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
35
+ "type": "object",
36
+ "required": [
37
+ "status"
38
+ ],
39
+ "properties": {
40
+ "status": {
41
+ "$ref": "#/$defs/RunnableStrategyStatus"
42
+ },
43
+ "startedAt": {
44
+ "$ref": "#/$defs/Timestamp"
45
+ },
46
+ "completedAt": {
47
+ "$ref": "#/$defs/Timestamp"
48
+ }
49
+ },
50
+ "unevaluatedProperties": false
51
+ },
52
+ "StrategyThreadDictFacet": {
53
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
54
+ "type": "object",
55
+ "required": [
56
+ "strategyThreadDict"
57
+ ],
58
+ "properties": {
59
+ "strategyThreadDict": {
60
+ "$ref": "#/$defs/StrategyThreadDict"
61
+ }
62
+ }
63
+ },
64
+ "StrategyStateFacet": {
65
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
66
+ "type": "object",
67
+ "required": [
68
+ "strategyState"
69
+ ],
70
+ "properties": {
71
+ "strategyState": {
72
+ "$ref": "#/$defs/StrategyState"
73
+ }
74
+ }
75
+ },
76
+ "RunnableStrategyStatus": {
77
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
78
+ "type": "string",
79
+ "enum": [
80
+ "pending",
81
+ "running",
82
+ "completed",
83
+ "failed",
84
+ "cancelled"
85
+ ]
86
+ },
87
+ "Timestamp": {
88
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
89
+ "type": "string",
90
+ "format": "date-time"
91
+ },
92
+ "StrategyThreadDict": {
93
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
94
+ "type": "object",
95
+ "propertyNames": {
96
+ "$ref": "#/$defs/StrategyThreadIdentity"
97
+ },
98
+ "additionalProperties": {
99
+ "$ref": "#/$defs/StepArray"
100
+ },
101
+ "$comment": "Each thread contains an array of steps, allowing for sequential execution within a thread while supporting parallel execution across multiple threads."
102
+ },
103
+ "StrategyState": {
104
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
105
+ "type": "object",
106
+ "propertyNames": {
107
+ "$ref": "#/$defs/JobStepIdentity"
108
+ },
109
+ "additionalProperties": {
110
+ "$ref": "#/$defs/JobStepSocket"
111
+ }
112
+ },
113
+ "StrategyThreadIdentity": {
114
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
115
+ "type": "string",
116
+ "pattern": "^STRATEGY_THREAD-.+$"
117
+ },
118
+ "StepArray": {
119
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
120
+ "type": "array",
121
+ "items": {
122
+ "$ref": "#/$defs/Step"
123
+ },
124
+ "uniqueItems": true
125
+ },
126
+ "JobStepIdentity": {
127
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
128
+ "type": "string",
129
+ "pattern": "^JOB_STEP-.+$"
130
+ },
131
+ "JobStepSocket": {
132
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
133
+ "type": "object",
134
+ "propertyNames": {
135
+ "$ref": "#/$defs/ResourceRoleIdentity"
136
+ },
137
+ "additionalProperties": {
138
+ "oneOf": [
139
+ {
140
+ "$ref": "#/$defs/ResourcePotential"
141
+ },
142
+ {
143
+ "$ref": "#/$defs/Resource"
144
+ }
145
+ ]
146
+ }
147
+ },
148
+ "Step": {
149
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
150
+ "type": "object",
151
+ "oneOf": [
152
+ {
153
+ "$ref": "#/$defs/JobStep"
154
+ },
155
+ {
156
+ "$ref": "#/$defs/BranchStep"
157
+ },
158
+ {
159
+ "$ref": "#/$defs/WhileStep"
160
+ },
161
+ {
162
+ "$ref": "#/$defs/ForStep"
163
+ }
164
+ ],
165
+ "unevaluatedProperties": false
166
+ },
167
+ "ResourceRoleIdentity": {
168
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
169
+ "type": "string",
170
+ "pattern": "^ROLE-.+$"
171
+ },
172
+ "ResourcePotential": {
173
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
174
+ "type": "object",
175
+ "oneOf": [
176
+ {
177
+ "$ref": "#/$defs/ResourceMissing"
178
+ },
179
+ {
180
+ "$ref": "#/$defs/ResourceInputPotential"
181
+ },
182
+ {
183
+ "$ref": "#/$defs/ResourceOutputPotential"
184
+ }
185
+ ],
186
+ "unevaluatedProperties": false
187
+ },
188
+ "Resource": {
189
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
190
+ "type": "object",
191
+ "allOf": [
192
+ {
193
+ "$ref": "#/$defs/ShellMaterializedBase"
194
+ },
195
+ {
196
+ "$comment": "This will be overlayed dynamically to match the data structure of the underlying ResourceType's nucleusSchema.",
197
+ "$ref": "#/$defs/NucleusFacet"
198
+ }
199
+ ],
200
+ "unevaluatedProperties": false
201
+ },
202
+ "JobStep": {
203
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
204
+ "type": "object",
205
+ "required": [
206
+ "identity",
207
+ "stepKind",
208
+ "jobHandle"
209
+ ],
210
+ "properties": {
211
+ "identity": {
212
+ "$ref": "#/$defs/JobStepIdentity"
213
+ },
214
+ "stepKind": {
215
+ "const": "job"
216
+ },
217
+ "jobHandle": {
218
+ "$ref": "#/$defs/JobIdentity"
219
+ }
220
+ },
221
+ "allOf": [
222
+ {
223
+ "$ref": "#/$defs/StepKindFacet"
224
+ },
225
+ {
226
+ "$comment": "This will be overlayed dynamically to specify roleBindings corresponding to the roles of the underlying job.",
227
+ "$ref": "#/$defs/RoleBindingsFacet"
228
+ }
229
+ ]
230
+ },
231
+ "BranchStep": {
232
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
233
+ "type": "object",
234
+ "required": [
235
+ "identity",
236
+ "stepKind",
237
+ "cases"
238
+ ],
239
+ "properties": {
240
+ "identity": {
241
+ "$ref": "#/$defs/BranchStepIdentity"
242
+ },
243
+ "stepKind": {
244
+ "const": "branch"
245
+ },
246
+ "cases": {
247
+ "type": "array",
248
+ "items": {
249
+ "$ref": "#/$defs/Conditional"
250
+ },
251
+ "minItems": 1,
252
+ "uniqueItems": true
253
+ }
254
+ },
255
+ "allOf": [
256
+ {
257
+ "$ref": "#/$defs/StepKindFacet"
258
+ }
259
+ ]
260
+ },
261
+ "WhileStep": {
262
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
263
+ "type": "object",
264
+ "required": [
265
+ "identity",
266
+ "stepKind",
267
+ "case"
268
+ ],
269
+ "properties": {
270
+ "identity": {
271
+ "$ref": "#/$defs/WhileStepIdentity"
272
+ },
273
+ "stepKind": {
274
+ "const": "while"
275
+ },
276
+ "case": {
277
+ "$ref": "#/$defs/Conditional"
278
+ }
279
+ },
280
+ "allOf": [
281
+ {
282
+ "$ref": "#/$defs/StepKindFacet"
283
+ }
284
+ ]
285
+ },
286
+ "ForStep": {
287
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
288
+ "type": "object",
289
+ "required": [
290
+ "identity",
291
+ "stepKind",
292
+ "case"
293
+ ],
294
+ "properties": {
295
+ "identity": {
296
+ "$ref": "#/$defs/ForStepIdentity"
297
+ },
298
+ "stepKind": {
299
+ "const": "for"
300
+ },
301
+ "case": {
302
+ "$ref": "#/$defs/Conditional"
303
+ }
304
+ },
305
+ "allOf": [
306
+ {
307
+ "$ref": "#/$defs/StepKindFacet"
308
+ }
309
+ ]
310
+ },
311
+ "ResourceMissing": {
312
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
313
+ "type": "object",
314
+ "$ref": "#/$defs/ShellMissing",
315
+ "unevaluatedProperties": false
316
+ },
317
+ "ResourceInputPotential": {
318
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
319
+ "type": "object",
320
+ "$ref": "#/$defs/ShellInputPotential",
321
+ "unevaluatedProperties": false
322
+ },
323
+ "ResourceOutputPotential": {
324
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
325
+ "type": "object",
326
+ "$ref": "#/$defs/ShellOutputPotential",
327
+ "unevaluatedProperties": false
328
+ },
329
+ "ShellMaterializedBase": {
330
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
331
+ "type": "object",
332
+ "required": [
333
+ "version",
334
+ "resourceShellKind"
335
+ ],
336
+ "properties": {
337
+ "version": {
338
+ "const": 1
339
+ },
340
+ "resourceShellKind": {
341
+ "const": "materialized"
342
+ }
343
+ },
344
+ "allOf": [
345
+ {
346
+ "$ref": "#/$defs/ResourceShellBase"
347
+ },
348
+ {
349
+ "$ref": "#/$defs/CreationContextFacet"
350
+ },
351
+ {
352
+ "$ref": "#/$defs/ResourceShellKindFacet"
353
+ },
354
+ {
355
+ "$ref": "#/$defs/TimestampFacet"
356
+ },
357
+ {
358
+ "$ref": "#/$defs/PathFacet"
359
+ }
360
+ ]
361
+ },
362
+ "NucleusFacet": {
363
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
364
+ "type": "object",
365
+ "required": [
366
+ "nucleus"
367
+ ],
368
+ "properties": {
369
+ "nucleus": true
370
+ }
371
+ },
372
+ "JobIdentity": {
373
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
374
+ "type": "string",
375
+ "pattern": "^JOB-.+$"
376
+ },
377
+ "StepKindFacet": {
378
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
379
+ "type": "object",
380
+ "required": [
381
+ "stepKind"
382
+ ],
383
+ "properties": {
384
+ "stepKind": {
385
+ "$ref": "#/$defs/StepKind"
386
+ }
387
+ }
388
+ },
389
+ "RoleBindingsFacet": {
390
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
391
+ "type": "object",
392
+ "required": [
393
+ "roleBindings"
394
+ ],
395
+ "properties": {
396
+ "roleBindings": {
397
+ "$ref": "#/$defs/RoleBindings"
398
+ }
399
+ }
400
+ },
401
+ "BranchStepIdentity": {
402
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
403
+ "type": "string",
404
+ "pattern": "^BRANCH_STEP-.+$"
405
+ },
406
+ "Conditional": {
407
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
408
+ "type": "object",
409
+ "required": [
410
+ "when",
411
+ "what"
412
+ ],
413
+ "properties": {
414
+ "when": {
415
+ "$ref": "#/$defs/JobStep"
416
+ },
417
+ "what": {
418
+ "$ref": "#/$defs/JobStep"
419
+ }
420
+ },
421
+ "unevaluatedProperties": false
422
+ },
423
+ "WhileStepIdentity": {
424
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
425
+ "type": "string",
426
+ "pattern": "^WHILE_STEP-.+$"
427
+ },
428
+ "ForStepIdentity": {
429
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
430
+ "type": "string",
431
+ "pattern": "^FOR_STEP-.+$"
432
+ },
433
+ "ShellMissing": {
434
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
435
+ "type": "object",
436
+ "required": [
437
+ "resourceShellKind"
438
+ ],
439
+ "properties": {
440
+ "resourceShellKind": {
441
+ "const": "missing"
442
+ }
443
+ },
444
+ "allOf": [
445
+ {
446
+ "$ref": "#/$defs/ResourceShellBase"
447
+ },
448
+ {
449
+ "$ref": "#/$defs/ResourceShellKindFacet"
450
+ }
451
+ ],
452
+ "unevaluatedProperties": false
453
+ },
454
+ "ShellInputPotential": {
455
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
456
+ "type": "object",
457
+ "required": [
458
+ "resourceShellKind"
459
+ ],
460
+ "properties": {
461
+ "resourceShellKind": {
462
+ "const": "inputPotential"
463
+ }
464
+ },
465
+ "allOf": [
466
+ {
467
+ "$ref": "#/$defs/ResourceShellBase"
468
+ },
469
+ {
470
+ "$ref": "#/$defs/CreationContextFacet"
471
+ },
472
+ {
473
+ "$ref": "#/$defs/ResourceShellKindFacet"
474
+ }
475
+ ],
476
+ "unevaluatedProperties": false
477
+ },
478
+ "ShellOutputPotential": {
479
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
480
+ "type": "object",
481
+ "required": [
482
+ "resourceShellKind"
483
+ ],
484
+ "properties": {
485
+ "resourceShellKind": {
486
+ "const": "outputPotential"
487
+ }
488
+ },
489
+ "allOf": [
490
+ {
491
+ "$ref": "#/$defs/ResourceShellBase"
492
+ },
493
+ {
494
+ "$ref": "#/$defs/CreationContextFacet"
495
+ },
496
+ {
497
+ "$ref": "#/$defs/ResourceShellKindFacet"
498
+ }
499
+ ],
500
+ "unevaluatedProperties": false
501
+ },
502
+ "ResourceShellBase": {
503
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
504
+ "type": "object",
505
+ "required": [
506
+ "identity",
507
+ "resourceTypeHandle",
508
+ "resourceShellKind"
509
+ ],
510
+ "properties": {
511
+ "identity": {
512
+ "$ref": "#/$defs/ResourceIdentity"
513
+ },
514
+ "resourceTypeHandle": {
515
+ "$ref": "#/$defs/ResourceTypeIdentity"
516
+ },
517
+ "resourceShellKind": {
518
+ "$ref": "#/$defs/ResourceShellKind"
519
+ }
520
+ }
521
+ },
522
+ "CreationContextFacet": {
523
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
524
+ "type": "object",
525
+ "required": [
526
+ "creationContext"
527
+ ],
528
+ "properties": {
529
+ "creationContext": {
530
+ "$ref": "#/$defs/CreationContext"
531
+ }
532
+ }
533
+ },
534
+ "ResourceShellKindFacet": {
535
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
536
+ "type": "object",
537
+ "required": [
538
+ "resourceShellKind"
539
+ ],
540
+ "properties": {
541
+ "resourceShellKind": {
542
+ "$ref": "#/$defs/ResourceShellKind"
543
+ }
544
+ }
545
+ },
546
+ "TimestampFacet": {
547
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
548
+ "type": "object",
549
+ "required": [
550
+ "timestamp"
551
+ ],
552
+ "properties": {
553
+ "timestamp": {
554
+ "$ref": "#/$defs/Timestamp"
555
+ }
556
+ }
557
+ },
558
+ "PathFacet": {
559
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
560
+ "type": "object",
561
+ "required": [
562
+ "path"
563
+ ],
564
+ "properties": {
565
+ "path": {
566
+ "$ref": "#/$defs/Path"
567
+ }
568
+ }
569
+ },
570
+ "StepKind": {
571
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
572
+ "type": "string",
573
+ "enum": [
574
+ "job",
575
+ "branch",
576
+ "while",
577
+ "for"
578
+ ]
579
+ },
580
+ "RoleBindings": {
581
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
582
+ "type": "object",
583
+ "required": [
584
+ "inputBindings",
585
+ "outputBindings"
586
+ ],
587
+ "properties": {
588
+ "inputBindings": {
589
+ "$ref": "#/$defs/RoleBindingArray"
590
+ },
591
+ "outputBindings": {
592
+ "$ref": "#/$defs/RoleBindingArray"
593
+ }
594
+ }
595
+ },
596
+ "ResourceIdentity": {
597
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
598
+ "type": "string",
599
+ "pattern": "^RESOURCE-.+$"
600
+ },
601
+ "ResourceTypeIdentity": {
602
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
603
+ "type": "string",
604
+ "pattern": "^TYPE-.+$"
605
+ },
606
+ "ResourceShellKind": {
607
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
608
+ "type": "string",
609
+ "enum": [
610
+ "missing",
611
+ "inputPotential",
612
+ "outputPotential",
613
+ "materialized"
614
+ ]
615
+ },
616
+ "CreationContext": {
617
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
618
+ "type": "object",
619
+ "required": [
620
+ "resourceRoleHandle",
621
+ "jobStepHandle"
622
+ ],
623
+ "properties": {
624
+ "resourceRoleHandle": {
625
+ "$ref": "#/$defs/ResourceRoleIdentity"
626
+ },
627
+ "jobStepHandle": {
628
+ "$ref": "#/$defs/JobStepIdentity"
629
+ }
630
+ }
631
+ },
632
+ "Path": {
633
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
634
+ "type": "string",
635
+ "format": "uri-reference"
636
+ },
637
+ "RoleBindingArray": {
638
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
639
+ "type": "array",
640
+ "items": {
641
+ "$ref": "#/$defs/ResourceRoleIdentity"
642
+ }
643
+ }
644
+ }
645
+ }