@toolproof-core/schema 1.0.8 → 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 (49) 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 +3 -3
  24. package/src/Genesis.json +71 -57
  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 +8 -2
  38. package/src/scripts/_lib/config.ts +9 -17
  39. package/src/scripts/generateConstantsAndMappings.ts +309 -0
  40. package/src/scripts/generateDependencies.ts +1 -1
  41. package/src/scripts/generateTerminals.ts +2 -2
  42. package/src/scripts/generateTypes.ts +58 -2
  43. package/src/scripts/wrapResourceTypesWithResourceShells.ts +7 -3
  44. package/dist/generated/constants/constants.d.ts +0 -60
  45. package/dist/generated/constants/constants.js +0 -60
  46. package/dist/scripts/generateConstants.d.ts +0 -12
  47. package/dist/scripts/generateConstants.js +0 -179
  48. package/src/generated/constants/constants.ts +0 -61
  49. package/src/scripts/generateConstants.ts +0 -217
@@ -1,669 +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 strategyThreadMap. The Engine also injects repeted steps when encountering loops.",
19
- "$ref": "#/$defs/StrategyThreadMapFacet"
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
- "StrategyThreadMapFacet": {
53
- "$schema": "https://json-schema.org/draft/2020-12/schema",
54
- "type": "object",
55
- "required": [
56
- "strategyThreadMap"
57
- ],
58
- "properties": {
59
- "strategyThreadMap": {
60
- "$ref": "#/$defs/StrategyThreadMap"
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
- "StrategyThreadMap": {
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
- "$ref": "#/$defs/Resource"
139
- }
140
- },
141
- "Step": {
142
- "$schema": "https://json-schema.org/draft/2020-12/schema",
143
- "type": "object",
144
- "oneOf": [
145
- {
146
- "$ref": "#/$defs/JobStep"
147
- },
148
- {
149
- "$ref": "#/$defs/BranchStep"
150
- },
151
- {
152
- "$ref": "#/$defs/WhileStep"
153
- },
154
- {
155
- "$ref": "#/$defs/ForStep"
156
- }
157
- ],
158
- "unevaluatedProperties": false
159
- },
160
- "ResourceRoleIdentity": {
161
- "$schema": "https://json-schema.org/draft/2020-12/schema",
162
- "type": "string",
163
- "pattern": "^ROLE-.+$"
164
- },
165
- "Resource": {
166
- "$schema": "https://json-schema.org/draft/2020-12/schema",
167
- "type": "object",
168
- "oneOf": [
169
- {
170
- "$ref": "#/$defs/ResourceMissing"
171
- },
172
- {
173
- "$ref": "#/$defs/ResourceInputPotential"
174
- },
175
- {
176
- "$ref": "#/$defs/ResourceOutputPotential"
177
- },
178
- {
179
- "$ref": "#/$defs/ResourceMaterialized"
180
- }
181
- ],
182
- "unevaluatedProperties": false
183
- },
184
- "JobStep": {
185
- "$schema": "https://json-schema.org/draft/2020-12/schema",
186
- "type": "object",
187
- "required": [
188
- "identity",
189
- "stepKind",
190
- "jobHandle"
191
- ],
192
- "properties": {
193
- "identity": {
194
- "$ref": "#/$defs/JobStepIdentity"
195
- },
196
- "stepKind": {
197
- "const": "job"
198
- },
199
- "jobHandle": {
200
- "$ref": "#/$defs/JobIdentity"
201
- }
202
- },
203
- "allOf": [
204
- {
205
- "$ref": "#/$defs/StepKindFacet"
206
- },
207
- {
208
- "$comment": "This will be overlayed dynamically to specify roleBindings corresponding to the roles of the underlying job.",
209
- "$ref": "#/$defs/RoleBindingsFacet"
210
- }
211
- ]
212
- },
213
- "BranchStep": {
214
- "$schema": "https://json-schema.org/draft/2020-12/schema",
215
- "type": "object",
216
- "required": [
217
- "identity",
218
- "stepKind",
219
- "cases"
220
- ],
221
- "properties": {
222
- "identity": {
223
- "$ref": "#/$defs/BranchStepIdentity"
224
- },
225
- "stepKind": {
226
- "const": "branch"
227
- },
228
- "cases": {
229
- "type": "array",
230
- "items": {
231
- "$ref": "#/$defs/Conditional"
232
- },
233
- "minItems": 1,
234
- "uniqueItems": true
235
- }
236
- },
237
- "allOf": [
238
- {
239
- "$ref": "#/$defs/StepKindFacet"
240
- }
241
- ]
242
- },
243
- "WhileStep": {
244
- "$schema": "https://json-schema.org/draft/2020-12/schema",
245
- "type": "object",
246
- "required": [
247
- "identity",
248
- "stepKind",
249
- "case"
250
- ],
251
- "properties": {
252
- "identity": {
253
- "$ref": "#/$defs/WhileStepIdentity"
254
- },
255
- "stepKind": {
256
- "const": "while"
257
- },
258
- "case": {
259
- "$ref": "#/$defs/Conditional"
260
- }
261
- },
262
- "allOf": [
263
- {
264
- "$ref": "#/$defs/StepKindFacet"
265
- }
266
- ]
267
- },
268
- "ForStep": {
269
- "$schema": "https://json-schema.org/draft/2020-12/schema",
270
- "type": "object",
271
- "required": [
272
- "identity",
273
- "stepKind",
274
- "case"
275
- ],
276
- "properties": {
277
- "identity": {
278
- "$ref": "#/$defs/ForStepIdentity"
279
- },
280
- "stepKind": {
281
- "const": "for"
282
- },
283
- "case": {
284
- "$ref": "#/$defs/Conditional"
285
- }
286
- },
287
- "allOf": [
288
- {
289
- "$ref": "#/$defs/StepKindFacet"
290
- }
291
- ]
292
- },
293
- "ResourceMissing": {
294
- "$schema": "https://json-schema.org/draft/2020-12/schema",
295
- "type": "object",
296
- "$ref": "#/$defs/ShellMissing",
297
- "unevaluatedProperties": false
298
- },
299
- "ResourceInputPotential": {
300
- "$schema": "https://json-schema.org/draft/2020-12/schema",
301
- "type": "object",
302
- "$ref": "#/$defs/ShellInputPotential",
303
- "unevaluatedProperties": false
304
- },
305
- "ResourceOutputPotential": {
306
- "$schema": "https://json-schema.org/draft/2020-12/schema",
307
- "type": "object",
308
- "$ref": "#/$defs/ShellOutputPotential",
309
- "unevaluatedProperties": false
310
- },
311
- "ResourceMaterialized": {
312
- "$schema": "https://json-schema.org/draft/2020-12/schema",
313
- "type": "object",
314
- "allOf": [
315
- {
316
- "$ref": "#/$defs/ShellMaterializedBase"
317
- },
318
- {
319
- "$comment": "This will be overlayed dynamically to match the data structure of the underlying ResourceType's nucleusSchema.",
320
- "$ref": "#/$defs/NucleusFacet"
321
- }
322
- ],
323
- "unevaluatedProperties": false
324
- },
325
- "JobIdentity": {
326
- "$schema": "https://json-schema.org/draft/2020-12/schema",
327
- "type": "string",
328
- "pattern": "^JOB-.+$"
329
- },
330
- "StepKindFacet": {
331
- "$schema": "https://json-schema.org/draft/2020-12/schema",
332
- "type": "object",
333
- "required": [
334
- "stepKind"
335
- ],
336
- "properties": {
337
- "stepKind": {
338
- "$ref": "#/$defs/StepKind"
339
- }
340
- }
341
- },
342
- "RoleBindingsFacet": {
343
- "$schema": "https://json-schema.org/draft/2020-12/schema",
344
- "type": "object",
345
- "required": [
346
- "roleBindings"
347
- ],
348
- "properties": {
349
- "roleBindings": {
350
- "$ref": "#/$defs/RoleBindings"
351
- }
352
- }
353
- },
354
- "BranchStepIdentity": {
355
- "$schema": "https://json-schema.org/draft/2020-12/schema",
356
- "type": "string",
357
- "pattern": "^BRANCH_STEP-.+$"
358
- },
359
- "Conditional": {
360
- "$schema": "https://json-schema.org/draft/2020-12/schema",
361
- "type": "object",
362
- "required": [
363
- "when",
364
- "what"
365
- ],
366
- "properties": {
367
- "when": {
368
- "$ref": "#/$defs/JobStep"
369
- },
370
- "what": {
371
- "$ref": "#/$defs/JobStep"
372
- }
373
- },
374
- "unevaluatedProperties": false
375
- },
376
- "WhileStepIdentity": {
377
- "$schema": "https://json-schema.org/draft/2020-12/schema",
378
- "type": "string",
379
- "pattern": "^WHILE_STEP-.+$"
380
- },
381
- "ForStepIdentity": {
382
- "$schema": "https://json-schema.org/draft/2020-12/schema",
383
- "type": "string",
384
- "pattern": "^FOR_STEP-.+$"
385
- },
386
- "ShellMissing": {
387
- "$schema": "https://json-schema.org/draft/2020-12/schema",
388
- "type": "object",
389
- "properties": {
390
- "resourceKind": {
391
- "const": "missing"
392
- }
393
- },
394
- "allOf": [
395
- {
396
- "$ref": "#/$defs/ResourceShellBase"
397
- },
398
- {
399
- "$ref": "#/$defs/ResourceKindFacet"
400
- }
401
- ],
402
- "unevaluatedProperties": false
403
- },
404
- "ShellInputPotential": {
405
- "$schema": "https://json-schema.org/draft/2020-12/schema",
406
- "type": "object",
407
- "properties": {
408
- "resourceKind": {
409
- "const": "inputPotential"
410
- }
411
- },
412
- "allOf": [
413
- {
414
- "$ref": "#/$defs/ResourceShellBase"
415
- },
416
- {
417
- "$ref": "#/$defs/CreationContextFacet"
418
- },
419
- {
420
- "$ref": "#/$defs/ResourceKindFacet"
421
- }
422
- ],
423
- "unevaluatedProperties": false
424
- },
425
- "ShellOutputPotential": {
426
- "$schema": "https://json-schema.org/draft/2020-12/schema",
427
- "type": "object",
428
- "properties": {
429
- "resourceKind": {
430
- "const": "outputPotential"
431
- }
432
- },
433
- "allOf": [
434
- {
435
- "$ref": "#/$defs/ResourceShellBase"
436
- },
437
- {
438
- "$ref": "#/$defs/CreationContextFacet"
439
- },
440
- {
441
- "$ref": "#/$defs/ResourceKindFacet"
442
- }
443
- ],
444
- "unevaluatedProperties": false
445
- },
446
- "ShellMaterializedBase": {
447
- "$schema": "https://json-schema.org/draft/2020-12/schema",
448
- "type": "object",
449
- "required": [
450
- "version"
451
- ],
452
- "properties": {
453
- "version": {
454
- "const": 1
455
- },
456
- "resourceKind": {
457
- "const": "materialized"
458
- }
459
- },
460
- "allOf": [
461
- {
462
- "$ref": "#/$defs/ResourceShellBase"
463
- },
464
- {
465
- "$ref": "#/$defs/CreationContextFacet"
466
- },
467
- {
468
- "$ref": "#/$defs/ResourceKindFacet"
469
- },
470
- {
471
- "$ref": "#/$defs/TimestampFacet"
472
- },
473
- {
474
- "$ref": "#/$defs/PathFacet"
475
- }
476
- ]
477
- },
478
- "NucleusFacet": {
479
- "$schema": "https://json-schema.org/draft/2020-12/schema",
480
- "type": "object",
481
- "required": [
482
- "nucleus"
483
- ],
484
- "properties": {
485
- "nucleus": {
486
- "$ref": "#/$defs/Nucleus"
487
- }
488
- }
489
- },
490
- "StepKind": {
491
- "$schema": "https://json-schema.org/draft/2020-12/schema",
492
- "type": "string",
493
- "enum": [
494
- "job",
495
- "branch",
496
- "while",
497
- "for"
498
- ]
499
- },
500
- "RoleBindings": {
501
- "$schema": "https://json-schema.org/draft/2020-12/schema",
502
- "type": "object",
503
- "required": [
504
- "inputBindings",
505
- "outputBindings"
506
- ],
507
- "properties": {
508
- "inputBindings": {
509
- "$ref": "#/$defs/RoleBindingArray"
510
- },
511
- "outputBindings": {
512
- "$ref": "#/$defs/RoleBindingArray"
513
- }
514
- }
515
- },
516
- "ResourceShellBase": {
517
- "$schema": "https://json-schema.org/draft/2020-12/schema",
518
- "type": "object",
519
- "required": [
520
- "identity",
521
- "resourceTypeHandle",
522
- "resourceKind"
523
- ],
524
- "properties": {
525
- "identity": {
526
- "$ref": "#/$defs/ResourceIdentity"
527
- },
528
- "resourceTypeHandle": {
529
- "$ref": "#/$defs/ResourceTypeIdentity"
530
- },
531
- "resourceKind": {
532
- "$ref": "#/$defs/ResourceKind"
533
- }
534
- }
535
- },
536
- "ResourceKindFacet": {
537
- "$schema": "https://json-schema.org/draft/2020-12/schema",
538
- "type": "object",
539
- "required": [
540
- "resourceKind"
541
- ],
542
- "properties": {
543
- "resourceKind": {
544
- "$ref": "#/$defs/ResourceKind"
545
- }
546
- }
547
- },
548
- "CreationContextFacet": {
549
- "$schema": "https://json-schema.org/draft/2020-12/schema",
550
- "type": "object",
551
- "required": [
552
- "creationContext"
553
- ],
554
- "properties": {
555
- "creationContext": {
556
- "$ref": "#/$defs/CreationContext"
557
- }
558
- }
559
- },
560
- "TimestampFacet": {
561
- "$schema": "https://json-schema.org/draft/2020-12/schema",
562
- "type": "object",
563
- "required": [
564
- "timestamp"
565
- ],
566
- "properties": {
567
- "timestamp": {
568
- "$ref": "#/$defs/Timestamp"
569
- }
570
- }
571
- },
572
- "PathFacet": {
573
- "$schema": "https://json-schema.org/draft/2020-12/schema",
574
- "type": "object",
575
- "required": [
576
- "path"
577
- ],
578
- "properties": {
579
- "path": {
580
- "$ref": "#/$defs/Path"
581
- }
582
- }
583
- },
584
- "Nucleus": {
585
- "$schema": "https://json-schema.org/draft/2020-12/schema",
586
- "type": "object",
587
- "additionalProperties": {
588
- "$ref": "#/$defs/JsonData"
589
- }
590
- },
591
- "RoleBindingArray": {
592
- "$schema": "https://json-schema.org/draft/2020-12/schema",
593
- "type": "array",
594
- "items": {
595
- "$ref": "#/$defs/ResourceRoleIdentity"
596
- }
597
- },
598
- "ResourceIdentity": {
599
- "$schema": "https://json-schema.org/draft/2020-12/schema",
600
- "type": "string",
601
- "pattern": "^RESOURCE-.+$"
602
- },
603
- "ResourceTypeIdentity": {
604
- "$schema": "https://json-schema.org/draft/2020-12/schema",
605
- "type": "string",
606
- "pattern": "^TYPE-.+$"
607
- },
608
- "ResourceKind": {
609
- "$schema": "https://json-schema.org/draft/2020-12/schema",
610
- "type": "string",
611
- "enum": [
612
- "missing",
613
- "inputPotential",
614
- "outputPotential",
615
- "materialized"
616
- ]
617
- },
618
- "CreationContext": {
619
- "$schema": "https://json-schema.org/draft/2020-12/schema",
620
- "type": "object",
621
- "required": [
622
- "resourceRoleHandle",
623
- "jobStepHandle"
624
- ],
625
- "properties": {
626
- "resourceRoleHandle": {
627
- "$ref": "#/$defs/ResourceRoleIdentity"
628
- },
629
- "jobStepHandle": {
630
- "$ref": "#/$defs/JobStepIdentity"
631
- }
632
- }
633
- },
634
- "Path": {
635
- "$schema": "https://json-schema.org/draft/2020-12/schema",
636
- "type": "string",
637
- "format": "uri-reference"
638
- },
639
- "JsonData": {
640
- "$schema": "https://json-schema.org/draft/2020-12/schema",
641
- "oneOf": [
642
- {
643
- "type": "null"
644
- },
645
- {
646
- "type": "boolean"
647
- },
648
- {
649
- "type": "number"
650
- },
651
- {
652
- "type": "string"
653
- },
654
- {
655
- "type": "array",
656
- "items": {
657
- "$ref": "#/$defs/JsonData"
658
- }
659
- },
660
- {
661
- "type": "object",
662
- "additionalProperties": {
663
- "$ref": "#/$defs/JsonData"
664
- }
665
- }
666
- ]
667
- }
668
- }
669
- }
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 strategyThreadMap. The Engine also injects repeted steps when encountering loops.",
19
+ "$ref": "#/$defs/StrategyThreadMapFacet"
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
+ "StrategyThreadMapFacet": {
53
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
54
+ "type": "object",
55
+ "required": [
56
+ "strategyThreadMap"
57
+ ],
58
+ "properties": {
59
+ "strategyThreadMap": {
60
+ "$ref": "#/$defs/StrategyThreadMap"
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
+ "StrategyThreadMap": {
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
+ }