@toolproof-core/schema 1.0.0

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