@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,1747 +1,1761 @@
1
- {
2
- "identity": "TYPE-Genesis",
3
- "name": "Genesis",
4
- "description": "dummy-description",
5
- "nucleusSchema": {
6
- "$comment": "This file defines all schemas used internally by ToolProof.",
7
- "$id": "https://schemas.toolproof.com/v2/Genesis.json",
8
- "$schema": "https://json-schema.org/draft/2020-12/schema",
9
- "$defs": {
10
- "Name": {
11
- "identity": "TYPE-Name",
12
- "name": "Name",
13
- "description": "dummy-description",
14
- "nucleusSchema": {
15
- "$schema": "https://json-schema.org/draft/2020-12/schema",
16
- "type": "string",
17
- "minLength": 1,
18
- "pattern": "^(?:[A-Z][^0-9]*|[a-z]+/[a-z.+&-]+)$",
19
- "$comment": "Validation is intercepted by an AI Agent that verifies the name against Toolproof's naming conventions.",
20
- "semanticValidation": "Ajv custom keyword to verify name."
21
- }
22
- },
23
- "NameFacet": {
24
- "identity": "TYPE-NameFacet",
25
- "name": "NameFacet",
26
- "description": "dummy-description",
27
- "nucleusSchema": {
28
- "$schema": "https://json-schema.org/draft/2020-12/schema",
29
- "type": "object",
30
- "required": [
31
- "name"
32
- ],
33
- "properties": {
34
- "name": {
35
- "$ref": "#/$defs/Name"
36
- }
37
- }
38
- }
39
- },
40
- "Description": {
41
- "identity": "TYPE-Description",
42
- "name": "Description",
43
- "description": "dummy-description",
44
- "nucleusSchema": {
45
- "$schema": "https://json-schema.org/draft/2020-12/schema",
46
- "type": "string",
47
- "minLength": 1,
48
- "$comment": "Validation is intercepted by an AI Agent that verifies the description against Toolproof's documentation standards.",
49
- "semanticValidation": "Ajv custom keyword to verify description."
50
- }
51
- },
52
- "DescriptionFacet": {
53
- "identity": "TYPE-DescriptionFacet",
54
- "name": "DescriptionFacet",
55
- "description": "dummy-description",
56
- "nucleusSchema": {
57
- "$schema": "https://json-schema.org/draft/2020-12/schema",
58
- "type": "object",
59
- "required": [
60
- "description"
61
- ],
62
- "properties": {
63
- "description": {
64
- "$ref": "#/$defs/Description"
65
- }
66
- }
67
- }
68
- },
69
- "DocumentationFacet": {
70
- "identity": "TYPE-DocumentationFacet",
71
- "name": "DocumentationFacet",
72
- "description": "dummy-description",
73
- "nucleusSchema": {
74
- "$schema": "https://json-schema.org/draft/2020-12/schema",
75
- "type": "object",
76
- "allOf": [
77
- {
78
- "$ref": "#/$defs/NameFacet"
79
- },
80
- {
81
- "$ref": "#/$defs/DescriptionFacet"
82
- }
83
- ]
84
- }
85
- },
86
- "Uri": {
87
- "identity": "TYPE-Uri",
88
- "name": "Uri",
89
- "description": "dummy-description",
90
- "nucleusSchema": {
91
- "$schema": "https://json-schema.org/draft/2020-12/schema",
92
- "type": "string",
93
- "format": "uri"
94
- }
95
- },
96
- "ResourceTypeIdentity": {
97
- "identity": "TYPE-ResourceTypeIdentity",
98
- "name": "ResourceTypeIdentity",
99
- "description": "dummy-description",
100
- "nucleusSchema": {
101
- "$schema": "https://json-schema.org/draft/2020-12/schema",
102
- "type": "string",
103
- "pattern": "^TYPE-.+$"
104
- }
105
- },
106
- "ResourceType": {
107
- "identity": "TYPE-ResourceType",
108
- "name": "ResourceType",
109
- "description": "dummy-description",
110
- "nucleusSchema": {
111
- "$schema": "https://json-schema.org/draft/2020-12/schema",
112
- "type": "object",
113
- "required": [
114
- "identity",
115
- "nucleusSchema"
116
- ],
117
- "properties": {
118
- "identity": {
119
- "$ref": "#/$defs/ResourceTypeIdentity"
120
- },
121
- "nucleusSchema": true,
122
- "embeddingUriMap": {
123
- "type": "object",
124
- "propertyNames": {
125
- "type": "string",
126
- "pattern": "^EMBEDDING-.+$"
127
- },
128
- "additionalProperties": {
129
- "$ref": "#/$defs/Uri"
130
- },
131
- "minProperties": 1,
132
- "$comment": "A ResourceType may specify a set of embedding models that convert the raw data (or one of its alternative representations) into vector embeddings. The build process enforces that the keys of this map are members of a set of predefined embedding models."
133
- },
134
- "generatorUriMap": {
135
- "type": "object",
136
- "propertyNames": {
137
- "type": "string",
138
- "pattern": "^GENERATOR-.+$"
139
- },
140
- "additionalProperties": {
141
- "$ref": "#/$defs/Uri"
142
- },
143
- "minProperties": 1,
144
- "$comment": "A ResourceType may specify a set of generators that generate different representations of its instances from the raw file. A ToolProof Resource is always backed by a raw file. This is also true for the Resources (of type ResourceType) defined in this file! The build process enforces that the keys of this map are members of a set of predefined generators. GENERATOR-Json is an identifier for a generator that generates JSON data from the raw file. If the raw file is a JSON file, GENERATOR-Json is an implicit identity operation (i.e. an operation that does nothing) and must not be present in the map. A ResourceType may also specify other generators, such as GENERATOR-LeanTerm, which generates an instance (or 'term' in Lean jargon) of a corresponding Lean type from the raw file. ResourceTypes that specify GENERATOR-LeanTerm must also specify a corresponding GENERATOR-LeanType. While the term-version runs when data instances enter the ecosystem, the type-version runs when the ResourceType itself enters the ecosystem."
145
- }
146
- },
147
- "allOf": [
148
- {
149
- "$ref": "#/$defs/DocumentationFacet"
150
- }
151
- ]
152
- }
153
- },
154
- "ResourceRoleIdentity": {
155
- "identity": "TYPE-ResourceRoleIdentity",
156
- "name": "ResourceRoleIdentity",
157
- "description": "dummy-description",
158
- "nucleusSchema": {
159
- "$schema": "https://json-schema.org/draft/2020-12/schema",
160
- "type": "string",
161
- "pattern": "^ROLE-.+$"
162
- }
163
- },
164
- "ResourceRoleValue": {
165
- "identity": "TYPE-ResourceRoleValue",
166
- "name": "ResourceRoleValue",
167
- "description": "dummy-description",
168
- "nucleusSchema": {
169
- "$schema": "https://json-schema.org/draft/2020-12/schema",
170
- "type": "object",
171
- "allOf": [
172
- {
173
- "$comment": "A ResourceRole does not have a self-contained identity, as it is always defined in the context of a RoleMap. ResourceRoleValue uses the Value suffix to mean 'the value stored in this map' (RoleMap.additionalProperties).",
174
- "required": [
175
- "resourceTypeHandle"
176
- ],
177
- "properties": {
178
- "resourceTypeHandle": {
179
- "$ref": "#/$defs/ResourceTypeIdentity"
180
- }
181
- }
182
- },
183
- {
184
- "$ref": "#/$defs/DocumentationFacet"
185
- }
186
- ]
187
- },
188
- "unevaluatedProperties": false
189
- },
190
- "RoleMap": {
191
- "identity": "TYPE-RoleMap",
192
- "name": "RoleMap",
193
- "description": "dummy-description",
194
- "nucleusSchema": {
195
- "$schema": "https://json-schema.org/draft/2020-12/schema",
196
- "type": "object",
197
- "propertyNames": {
198
- "$ref": "#/$defs/ResourceRoleIdentity"
199
- },
200
- "additionalProperties": {
201
- "$ref": "#/$defs/ResourceRoleValue"
202
- }
203
- }
204
- },
205
- "Error": {
206
- "identity": "TYPE-Error",
207
- "name": "Error",
208
- "description": "dummy-description",
209
- "nucleusSchema": {
210
- "$schema": "https://json-schema.org/draft/2020-12/schema",
211
- "type": "object",
212
- "allOf": [
213
- {
214
- "$ref": "#/$defs/DocumentationFacet"
215
- },
216
- {
217
- "properties": {
218
- "details": {
219
- "type": "object"
220
- }
221
- }
222
- }
223
- ],
224
- "unevaluatedProperties": false
225
- }
226
- },
227
- "Roles": {
228
- "identity": "TYPE-Roles",
229
- "name": "Roles",
230
- "description": "dummy-description",
231
- "nucleusSchema": {
232
- "$schema": "https://json-schema.org/draft/2020-12/schema",
233
- "type": "object",
234
- "required": [
235
- "inputMap",
236
- "outputMap"
237
- ],
238
- "properties": {
239
- "inputMap": {
240
- "$ref": "#/$defs/RoleMap"
241
- },
242
- "outputMap": {
243
- "allOf": [
244
- {
245
- "$ref": "#/$defs/RoleMap"
246
- },
247
- {
248
- "required": [
249
- "ROLE-ErrorOutput"
250
- ],
251
- "properties": {
252
- "ROLE-ErrorOutput": {
253
- "type": "object",
254
- "allOf": [
255
- {
256
- "$ref": "#/$defs/ResourceRoleValue"
257
- },
258
- {
259
- "required": [
260
- "resourceTypeHandle",
261
- "name",
262
- "description"
263
- ],
264
- "properties": {
265
- "resourceTypeHandle": {
266
- "const": "TYPE-Error"
267
- },
268
- "name": {
269
- "const": "ErrorOutput"
270
- },
271
- "description": {
272
- "const": "Represents error outputs from job runs."
273
- }
274
- }
275
- }
276
- ]
277
- }
278
- }
279
- }
280
- ]
281
- }
282
- },
283
- "unevaluatedProperties": false
284
- }
285
- },
286
- "RolesFacet": {
287
- "identity": "TYPE-RolesFacet",
288
- "name": "RolesFacet",
289
- "description": "dummy-description",
290
- "nucleusSchema": {
291
- "$schema": "https://json-schema.org/draft/2020-12/schema",
292
- "type": "object",
293
- "required": [
294
- "roles"
295
- ],
296
- "properties": {
297
- "roles": {
298
- "$ref": "#/$defs/Roles"
299
- }
300
- }
301
- }
302
- },
303
- "JobIdentity": {
304
- "identity": "TYPE-JobIdentity",
305
- "name": "JobIdentity",
306
- "description": "dummy-description",
307
- "nucleusSchema": {
308
- "$schema": "https://json-schema.org/draft/2020-12/schema",
309
- "type": "string",
310
- "pattern": "^JOB-.+$"
311
- }
312
- },
313
- "Job": {
314
- "identity": "TYPE-Job",
315
- "name": "Job",
316
- "description": "dummy-description",
317
- "nucleusSchema": {
318
- "$schema": "https://json-schema.org/draft/2020-12/schema",
319
- "type": "object",
320
- "required": [
321
- "identity",
322
- "implementationUri"
323
- ],
324
- "properties": {
325
- "identity": {
326
- "$ref": "#/$defs/JobIdentity"
327
- },
328
- "implementationUri": {
329
- "$ref": "#/$defs/Uri"
330
- }
331
- },
332
- "allOf": [
333
- {
334
- "$ref": "#/$defs/DocumentationFacet"
335
- },
336
- {
337
- "$ref": "#/$defs/RolesFacet"
338
- }
339
- ],
340
- "unevaluatedProperties": false
341
- }
342
- },
343
- "RoleBindingArray": {
344
- "identity": "TYPE-RoleBindingArray",
345
- "name": "RoleBindingArray",
346
- "description": "dummy-description",
347
- "nucleusSchema": {
348
- "$schema": "https://json-schema.org/draft/2020-12/schema",
349
- "type": "array",
350
- "items": {
351
- "$ref": "#/$defs/ResourceRoleIdentity"
352
- }
353
- }
354
- },
355
- "RoleBindings": {
356
- "identity": "TYPE-RoleBindings",
357
- "name": "RoleBindings",
358
- "description": "dummy-description",
359
- "nucleusSchema": {
360
- "$schema": "https://json-schema.org/draft/2020-12/schema",
361
- "type": "object",
362
- "required": [
363
- "inputBindings",
364
- "outputBindings"
365
- ],
366
- "properties": {
367
- "inputBindings": {
368
- "$ref": "#/$defs/RoleBindingArray"
369
- },
370
- "outputBindings": {
371
- "$ref": "#/$defs/RoleBindingArray"
372
- }
373
- }
374
- },
375
- "unevaluatedProperties": false
376
- },
377
- "RoleBindingsFacet": {
378
- "identity": "TYPE-RoleBindingsFacet",
379
- "name": "RoleBindingsFacet",
380
- "description": "dummy-description",
381
- "nucleusSchema": {
382
- "$schema": "https://json-schema.org/draft/2020-12/schema",
383
- "type": "object",
384
- "required": [
385
- "roleBindings"
386
- ],
387
- "properties": {
388
- "roleBindings": {
389
- "$ref": "#/$defs/RoleBindings"
390
- }
391
- }
392
- }
393
- },
394
- "StepKind": {
395
- "identity": "TYPE-StepKind",
396
- "name": "StepKind",
397
- "description": "dummy-description",
398
- "nucleusSchema": {
399
- "$schema": "https://json-schema.org/draft/2020-12/schema",
400
- "type": "string",
401
- "enum": [
402
- "job",
403
- "branch",
404
- "while",
405
- "for"
406
- ]
407
- }
408
- },
409
- "StepKindFacet": {
410
- "identity": "TYPE-StepKindFacet",
411
- "name": "StepKindFacet",
412
- "description": "dummy-description",
413
- "nucleusSchema": {
414
- "$schema": "https://json-schema.org/draft/2020-12/schema",
415
- "type": "object",
416
- "required": [
417
- "stepKind"
418
- ],
419
- "properties": {
420
- "stepKind": {
421
- "$ref": "#/$defs/StepKind"
422
- }
423
- }
424
- }
425
- },
426
- "JobStepIdentity": {
427
- "identity": "TYPE-JobStepIdentity",
428
- "name": "JobStepIdentity",
429
- "description": "dummy-description",
430
- "nucleusSchema": {
431
- "$schema": "https://json-schema.org/draft/2020-12/schema",
432
- "type": "string",
433
- "pattern": "^JOB_STEP-.+$"
434
- }
435
- },
436
- "JobStep": {
437
- "identity": "TYPE-JobStep",
438
- "name": "JobStep",
439
- "description": "dummy-description",
440
- "nucleusSchema": {
441
- "$schema": "https://json-schema.org/draft/2020-12/schema",
442
- "type": "object",
443
- "required": [
444
- "identity",
445
- "stepKind",
446
- "jobHandle"
447
- ],
448
- "properties": {
449
- "identity": {
450
- "$ref": "#/$defs/JobStepIdentity"
451
- },
452
- "stepKind": {
453
- "const": "job"
454
- },
455
- "jobHandle": {
456
- "$ref": "#/$defs/JobIdentity"
457
- }
458
- },
459
- "allOf": [
460
- {
461
- "$ref": "#/$defs/StepKindFacet"
462
- },
463
- {
464
- "$comment": "This will be overlayed dynamically to specify roleBindings corresponding to the roles of the underlying job.",
465
- "$ref": "#/$defs/RoleBindingsFacet"
466
- }
467
- ]
468
- }
469
- },
470
- "Conditional": {
471
- "identity": "TYPE-Conditional",
472
- "name": "Conditional",
473
- "description": "dummy-description",
474
- "nucleusSchema": {
475
- "$schema": "https://json-schema.org/draft/2020-12/schema",
476
- "type": "object",
477
- "required": [
478
- "when",
479
- "what"
480
- ],
481
- "properties": {
482
- "when": {
483
- "$ref": "#/$defs/JobStep"
484
- },
485
- "what": {
486
- "$ref": "#/$defs/JobStep"
487
- }
488
- },
489
- "unevaluatedProperties": false
490
- }
491
- },
492
- "BranchStepIdentity": {
493
- "identity": "TYPE-BranchStepIdentity",
494
- "name": "BranchStepIdentity",
495
- "description": "dummy-description",
496
- "nucleusSchema": {
497
- "$schema": "https://json-schema.org/draft/2020-12/schema",
498
- "type": "string",
499
- "pattern": "^BRANCH_STEP-.+$"
500
- }
501
- },
502
- "BranchStep": {
503
- "identity": "TYPE-BranchStep",
504
- "name": "BranchStep",
505
- "description": "dummy-description",
506
- "nucleusSchema": {
507
- "$schema": "https://json-schema.org/draft/2020-12/schema",
508
- "type": "object",
509
- "required": [
510
- "identity",
511
- "stepKind",
512
- "cases"
513
- ],
514
- "properties": {
515
- "identity": {
516
- "$ref": "#/$defs/BranchStepIdentity"
517
- },
518
- "stepKind": {
519
- "const": "branch"
520
- },
521
- "cases": {
522
- "type": "array",
523
- "items": {
524
- "$ref": "#/$defs/Conditional"
525
- },
526
- "minItems": 1,
527
- "uniqueItems": true
528
- }
529
- },
530
- "allOf": [
531
- {
532
- "$ref": "#/$defs/StepKindFacet"
533
- }
534
- ]
535
- }
536
- },
537
- "WhileStepIdentity": {
538
- "identity": "TYPE-WhileStepIdentity",
539
- "name": "WhileStepIdentity",
540
- "description": "dummy-description",
541
- "nucleusSchema": {
542
- "$schema": "https://json-schema.org/draft/2020-12/schema",
543
- "type": "string",
544
- "pattern": "^WHILE_STEP-.+$"
545
- }
546
- },
547
- "WhileStep": {
548
- "identity": "TYPE-WhileStep",
549
- "name": "WhileStep",
550
- "description": "dummy-description",
551
- "nucleusSchema": {
552
- "$schema": "https://json-schema.org/draft/2020-12/schema",
553
- "type": "object",
554
- "required": [
555
- "identity",
556
- "stepKind",
557
- "case"
558
- ],
559
- "properties": {
560
- "identity": {
561
- "$ref": "#/$defs/WhileStepIdentity"
562
- },
563
- "stepKind": {
564
- "const": "while"
565
- },
566
- "case": {
567
- "$ref": "#/$defs/Conditional"
568
- }
569
- },
570
- "allOf": [
571
- {
572
- "$ref": "#/$defs/StepKindFacet"
573
- }
574
- ]
575
- }
576
- },
577
- "ForStepIdentity": {
578
- "identity": "TYPE-ForStepIdentity",
579
- "name": "ForStepIdentity",
580
- "description": "dummy-description",
581
- "nucleusSchema": {
582
- "$schema": "https://json-schema.org/draft/2020-12/schema",
583
- "type": "string",
584
- "pattern": "^FOR_STEP-.+$"
585
- }
586
- },
587
- "ForStep": {
588
- "identity": "TYPE-ForStep",
589
- "name": "ForStep",
590
- "description": "dummy-description",
591
- "nucleusSchema": {
592
- "$schema": "https://json-schema.org/draft/2020-12/schema",
593
- "type": "object",
594
- "required": [
595
- "identity",
596
- "stepKind",
597
- "case"
598
- ],
599
- "properties": {
600
- "identity": {
601
- "$ref": "#/$defs/ForStepIdentity"
602
- },
603
- "stepKind": {
604
- "const": "for"
605
- },
606
- "case": {
607
- "$ref": "#/$defs/Conditional"
608
- }
609
- },
610
- "allOf": [
611
- {
612
- "$ref": "#/$defs/StepKindFacet"
613
- }
614
- ]
615
- }
616
- },
617
- "StepIdentity": {
618
- "identity": "TYPE-StepIdentity",
619
- "name": "StepIdentity",
620
- "description": "dummy-description",
621
- "nucleusSchema": {
622
- "$schema": "https://json-schema.org/draft/2020-12/schema",
623
- "type": "object",
624
- "oneOf": [
625
- {
626
- "$ref": "#/$defs/JobStepIdentity"
627
- },
628
- {
629
- "$ref": "#/$defs/BranchStepIdentity"
630
- },
631
- {
632
- "$ref": "#/$defs/WhileStepIdentity"
633
- },
634
- {
635
- "$ref": "#/$defs/ForStepIdentity"
636
- }
637
- ]
638
- }
639
- },
640
- "Step": {
641
- "identity": "TYPE-Step",
642
- "name": "Step",
643
- "description": "dummy-description",
644
- "nucleusSchema": {
645
- "$schema": "https://json-schema.org/draft/2020-12/schema",
646
- "type": "object",
647
- "oneOf": [
648
- {
649
- "$ref": "#/$defs/JobStep"
650
- },
651
- {
652
- "$ref": "#/$defs/BranchStep"
653
- },
654
- {
655
- "$ref": "#/$defs/WhileStep"
656
- },
657
- {
658
- "$ref": "#/$defs/ForStep"
659
- }
660
- ],
661
- "unevaluatedProperties": false
662
- }
663
- },
664
- "CreationContext": {
665
- "identity": "TYPE-CreationContext",
666
- "name": "CreationContext",
667
- "description": "dummy-description",
668
- "nucleusSchema": {
669
- "$schema": "https://json-schema.org/draft/2020-12/schema",
670
- "type": "object",
671
- "required": [
672
- "resourceRoleHandle",
673
- "jobStepHandle"
674
- ],
675
- "properties": {
676
- "resourceRoleHandle": {
677
- "$ref": "#/$defs/ResourceRoleIdentity"
678
- },
679
- "jobStepHandle": {
680
- "$ref": "#/$defs/JobStepIdentity"
681
- }
682
- }
683
- }
684
- },
685
- "CreationContextFacet": {
686
- "identity": "TYPE-CreationContextFacet",
687
- "name": "CreationContextFacet",
688
- "description": "dummy-description",
689
- "nucleusSchema": {
690
- "$schema": "https://json-schema.org/draft/2020-12/schema",
691
- "type": "object",
692
- "required": [
693
- "creationContext"
694
- ],
695
- "properties": {
696
- "creationContext": {
697
- "$ref": "#/$defs/CreationContext"
698
- }
699
- }
700
- }
701
- },
702
- "ResourceIdentity": {
703
- "identity": "TYPE-ResourceIdentity",
704
- "name": "ResourceIdentity",
705
- "description": "dummy-description",
706
- "nucleusSchema": {
707
- "$schema": "https://json-schema.org/draft/2020-12/schema",
708
- "type": "string",
709
- "pattern": "^RESOURCE-.+$"
710
- }
711
- },
712
- "ResourceShellBase": {
713
- "identity": "TYPE-ResourceShellBase",
714
- "name": "ResourceShellBase",
715
- "description": "dummy-description",
716
- "nucleusSchema": {
717
- "$schema": "https://json-schema.org/draft/2020-12/schema",
718
- "type": "object",
719
- "required": [
720
- "identity",
721
- "resourceTypeHandle",
722
- "resourceKind"
723
- ],
724
- "properties": {
725
- "identity": {
726
- "$ref": "#/$defs/ResourceIdentity"
727
- },
728
- "resourceTypeHandle": {
729
- "$ref": "#/$defs/ResourceTypeIdentity"
730
- },
731
- "resourceKind": {
732
- "$ref": "#/$defs/ResourceKind"
733
- }
734
- }
735
- }
736
- },
737
- "ResourceKind": {
738
- "identity": "TYPE-ResourceKind",
739
- "name": "ResourceKind",
740
- "description": "dummy-description",
741
- "nucleusSchema": {
742
- "$schema": "https://json-schema.org/draft/2020-12/schema",
743
- "type": "string",
744
- "enum": [
745
- "missing",
746
- "inputPotential",
747
- "outputPotential",
748
- "materialized"
749
- ]
750
- }
751
- },
752
- "ResourceKindFacet": {
753
- "identity": "TYPE-ResourceKindFacet",
754
- "name": "ResourceKindFacet",
755
- "description": "dummy-description",
756
- "nucleusSchema": {
757
- "$schema": "https://json-schema.org/draft/2020-12/schema",
758
- "type": "object",
759
- "required": [
760
- "resourceKind"
761
- ],
762
- "properties": {
763
- "resourceKind": {
764
- "$ref": "#/$defs/ResourceKind"
765
- }
766
- }
767
- }
768
- },
769
- "ShellMissing": {
770
- "identity": "TYPE-ShellMissing",
771
- "name": "ShellMissing",
772
- "description": "dummy-description",
773
- "nucleusSchema": {
774
- "$schema": "https://json-schema.org/draft/2020-12/schema",
775
- "type": "object",
776
- "properties": {
777
- "resourceKind": {
778
- "const": "missing"
779
- }
780
- },
781
- "allOf": [
782
- {
783
- "$ref": "#/$defs/ResourceShellBase"
784
- },
785
- {
786
- "$ref": "#/$defs/ResourceKindFacet"
787
- }
788
- ],
789
- "unevaluatedProperties": false
790
- }
791
- },
792
- "ShellInputPotential": {
793
- "identity": "TYPE-ShellInputPotential",
794
- "name": "ShellInputPotential",
795
- "description": "dummy-description",
796
- "nucleusSchema": {
797
- "$schema": "https://json-schema.org/draft/2020-12/schema",
798
- "type": "object",
799
- "properties": {
800
- "resourceKind": {
801
- "const": "inputPotential"
802
- }
803
- },
804
- "allOf": [
805
- {
806
- "$ref": "#/$defs/ResourceShellBase"
807
- },
808
- {
809
- "$ref": "#/$defs/CreationContextFacet"
810
- },
811
- {
812
- "$ref": "#/$defs/ResourceKindFacet"
813
- }
814
- ],
815
- "unevaluatedProperties": false
816
- }
817
- },
818
- "ShellOutputPotential": {
819
- "identity": "TYPE-ShellOutputPotential",
820
- "name": "ShellOutputPotential",
821
- "description": "dummy-description",
822
- "nucleusSchema": {
823
- "$schema": "https://json-schema.org/draft/2020-12/schema",
824
- "type": "object",
825
- "properties": {
826
- "resourceKind": {
827
- "const": "outputPotential"
828
- }
829
- },
830
- "allOf": [
831
- {
832
- "$ref": "#/$defs/ResourceShellBase"
833
- },
834
- {
835
- "$ref": "#/$defs/CreationContextFacet"
836
- },
837
- {
838
- "$ref": "#/$defs/ResourceKindFacet"
839
- }
840
- ],
841
- "unevaluatedProperties": false
842
- }
843
- },
844
- "Timestamp": {
845
- "identity": "TYPE-Timestamp",
846
- "name": "Timestamp",
847
- "description": "dummy-description",
848
- "nucleusSchema": {
849
- "$schema": "https://json-schema.org/draft/2020-12/schema",
850
- "type": "string",
851
- "format": "date-time"
852
- }
853
- },
854
- "TimestampFacet": {
855
- "identity": "TYPE-TimestampFacet",
856
- "name": "TimestampFacet",
857
- "description": "dummy-description",
858
- "nucleusSchema": {
859
- "$schema": "https://json-schema.org/draft/2020-12/schema",
860
- "type": "object",
861
- "required": [
862
- "timestamp"
863
- ],
864
- "properties": {
865
- "timestamp": {
866
- "$ref": "#/$defs/Timestamp"
867
- }
868
- }
869
- }
870
- },
871
- "Path": {
872
- "identity": "TYPE-Path",
873
- "name": "Path",
874
- "description": "dummy-description",
875
- "nucleusSchema": {
876
- "$schema": "https://json-schema.org/draft/2020-12/schema",
877
- "type": "string",
878
- "format": "uri-reference"
879
- }
880
- },
881
- "PathFacet": {
882
- "identity": "TYPE-PathFacet",
883
- "name": "PathFacet",
884
- "description": "dummy-description",
885
- "nucleusSchema": {
886
- "$schema": "https://json-schema.org/draft/2020-12/schema",
887
- "type": "object",
888
- "required": [
889
- "path"
890
- ],
891
- "properties": {
892
- "path": {
893
- "$ref": "#/$defs/Path"
894
- }
895
- }
896
- }
897
- },
898
- "ShellMaterializedBase": {
899
- "identity": "TYPE-ShellMaterializedBase",
900
- "name": "ShellMaterializedBase",
901
- "description": "dummy-description",
902
- "nucleusSchema": {
903
- "$schema": "https://json-schema.org/draft/2020-12/schema",
904
- "type": "object",
905
- "required": [
906
- "version"
907
- ],
908
- "properties": {
909
- "version": {
910
- "const": 1
911
- },
912
- "resourceKind": {
913
- "const": "materialized"
914
- }
915
- },
916
- "allOf": [
917
- {
918
- "$ref": "#/$defs/ResourceShellBase"
919
- },
920
- {
921
- "$ref": "#/$defs/CreationContextFacet"
922
- },
923
- {
924
- "$ref": "#/$defs/ResourceKindFacet"
925
- },
926
- {
927
- "$ref": "#/$defs/TimestampFacet"
928
- },
929
- {
930
- "$ref": "#/$defs/PathFacet"
931
- }
932
- ]
933
- }
934
- },
935
- "ShellMaterialized": {
936
- "identity": "TYPE-ShellMaterialized",
937
- "name": "ShellMaterialized",
938
- "description": "dummy-description",
939
- "nucleusSchema": {
940
- "$schema": "https://json-schema.org/draft/2020-12/schema",
941
- "type": "object",
942
- "$ref": "#/$defs/ShellMaterializedBase",
943
- "unevaluatedProperties": false
944
- }
945
- },
946
- "ResourceMissing": {
947
- "identity": "TYPE-ResourceMissing",
948
- "name": "ResourceMissing",
949
- "description": "dummy-description",
950
- "nucleusSchema": {
951
- "$schema": "https://json-schema.org/draft/2020-12/schema",
952
- "type": "object",
953
- "$ref": "#/$defs/ShellMissing",
954
- "unevaluatedProperties": false
955
- }
956
- },
957
- "ResourceInputPotential": {
958
- "identity": "TYPE-ResourceInputPotential",
959
- "name": "ResourceInputPotential",
960
- "description": "dummy-description",
961
- "nucleusSchema": {
962
- "$schema": "https://json-schema.org/draft/2020-12/schema",
963
- "type": "object",
964
- "$ref": "#/$defs/ShellInputPotential",
965
- "unevaluatedProperties": false
966
- }
967
- },
968
- "ResourceOutputPotential": {
969
- "identity": "TYPE-ResourceOutputPotential",
970
- "name": "ResourceOutputPotential",
971
- "description": "dummy-description",
972
- "nucleusSchema": {
973
- "$schema": "https://json-schema.org/draft/2020-12/schema",
974
- "type": "object",
975
- "$ref": "#/$defs/ShellOutputPotential",
976
- "unevaluatedProperties": false
977
- }
978
- },
979
- "JsonData": {
980
- "identity": "TYPE-JsonData",
981
- "name": "JsonData",
982
- "description": "dummy-description",
983
- "nucleusSchema": {
984
- "$schema": "https://json-schema.org/draft/2020-12/schema",
985
- "oneOf": [
986
- {
987
- "type": "null"
988
- },
989
- {
990
- "type": "boolean"
991
- },
992
- {
993
- "type": "number"
994
- },
995
- {
996
- "type": "string"
997
- },
998
- {
999
- "type": "array",
1000
- "items": {
1001
- "$ref": "#/$defs/JsonData"
1002
- }
1003
- },
1004
- {
1005
- "type": "object",
1006
- "additionalProperties": {
1007
- "$ref": "#/$defs/JsonData"
1008
- }
1009
- }
1010
- ]
1011
- }
1012
- },
1013
- "Nucleus": {
1014
- "identity": "TYPE-Nucleus",
1015
- "name": "Nucleus",
1016
- "description": "dummy-description",
1017
- "nucleusSchema": {
1018
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1019
- "type": "object",
1020
- "additionalProperties": {
1021
- "$ref": "#/$defs/JsonData"
1022
- }
1023
- }
1024
- },
1025
- "NucleusFacet": {
1026
- "identity": "TYPE-NucleusFacet",
1027
- "name": "NucleusFacet",
1028
- "description": "dummy-description",
1029
- "nucleusSchema": {
1030
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1031
- "type": "object",
1032
- "required": [
1033
- "nucleus"
1034
- ],
1035
- "properties": {
1036
- "nucleus": {
1037
- "$ref": "#/$defs/Nucleus"
1038
- }
1039
- }
1040
- }
1041
- },
1042
- "ResourceMaterialized": {
1043
- "identity": "TYPE-ResourceMaterialized",
1044
- "name": "ResourceMaterialized",
1045
- "description": "dummy-description",
1046
- "nucleusSchema": {
1047
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1048
- "type": "object",
1049
- "allOf": [
1050
- {
1051
- "$ref": "#/$defs/ShellMaterializedBase"
1052
- },
1053
- {
1054
- "$comment": "This will be overlayed dynamically to match the data structure of the underlying ResourceType's nucleusSchema.",
1055
- "$ref": "#/$defs/NucleusFacet"
1056
- }
1057
- ],
1058
- "unevaluatedProperties": false
1059
- }
1060
- },
1061
- "Resource": {
1062
- "identity": "TYPE-Resource",
1063
- "name": "Resource",
1064
- "description": "dummy-description",
1065
- "nucleusSchema": {
1066
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1067
- "type": "object",
1068
- "oneOf": [
1069
- {
1070
- "$ref": "#/$defs/ResourceMissing"
1071
- },
1072
- {
1073
- "$ref": "#/$defs/ResourceInputPotential"
1074
- },
1075
- {
1076
- "$ref": "#/$defs/ResourceOutputPotential"
1077
- },
1078
- {
1079
- "$ref": "#/$defs/ResourceMaterialized"
1080
- }
1081
- ],
1082
- "unevaluatedProperties": false
1083
- }
1084
- },
1085
- "JobStepSocket": {
1086
- "identity": "TYPE-JobStepSocket",
1087
- "name": "JobStepSocket",
1088
- "description": "dummy-description",
1089
- "nucleusSchema": {
1090
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1091
- "type": "object",
1092
- "propertyNames": {
1093
- "$ref": "#/$defs/ResourceRoleIdentity"
1094
- },
1095
- "additionalProperties": {
1096
- "$ref": "#/$defs/Resource"
1097
- }
1098
- }
1099
- },
1100
- "StrategyState": {
1101
- "identity": "TYPE-StrategyState",
1102
- "name": "StrategyState",
1103
- "description": "dummy-description",
1104
- "nucleusSchema": {
1105
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1106
- "type": "object",
1107
- "propertyNames": {
1108
- "$ref": "#/$defs/JobStepIdentity"
1109
- },
1110
- "additionalProperties": {
1111
- "$ref": "#/$defs/JobStepSocket"
1112
- }
1113
- }
1114
- },
1115
- "StrategyStateFacet": {
1116
- "identity": "TYPE-StrategyStateFacet",
1117
- "name": "StrategyStateFacet",
1118
- "description": "dummy-description",
1119
- "nucleusSchema": {
1120
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1121
- "type": "object",
1122
- "required": [
1123
- "strategyState"
1124
- ],
1125
- "properties": {
1126
- "strategyState": {
1127
- "$ref": "#/$defs/StrategyState"
1128
- }
1129
- }
1130
- }
1131
- },
1132
- "StepArray": {
1133
- "identity": "TYPE-StepArray",
1134
- "name": "StepArray",
1135
- "description": "dummy-description",
1136
- "nucleusSchema": {
1137
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1138
- "type": "array",
1139
- "items": {
1140
- "$ref": "#/$defs/Step"
1141
- },
1142
- "uniqueItems": true
1143
- }
1144
- },
1145
- "StepsFacet": {
1146
- "identity": "TYPE-StepsFacet",
1147
- "name": "StepsFacet",
1148
- "description": "dummy-description",
1149
- "nucleusSchema": {
1150
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1151
- "type": "object",
1152
- "required": [
1153
- "steps"
1154
- ],
1155
- "properties": {
1156
- "steps": {
1157
- "$ref": "#/$defs/StepArray"
1158
- }
1159
- }
1160
- }
1161
- },
1162
- "RawStrategy": {
1163
- "identity": "TYPE-RawStrategy",
1164
- "name": "RawStrategy",
1165
- "description": "dummy-description",
1166
- "nucleusSchema": {
1167
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1168
- "type": "object",
1169
- "allOf": [
1170
- {
1171
- "$ref": "#/$defs/StepsFacet"
1172
- },
1173
- {
1174
- "$ref": "#/$defs/StrategyStateFacet"
1175
- }
1176
- ],
1177
- "unevaluatedProperties": false
1178
- }
1179
- },
1180
- "RunnableStrategyIdentity": {
1181
- "identity": "TYPE-RunnableStrategyIdentity",
1182
- "name": "RunnableStrategyIdentity",
1183
- "description": "dummy-description",
1184
- "nucleusSchema": {
1185
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1186
- "type": "string",
1187
- "pattern": "^RUNNABLE_STRATEGY-.+$"
1188
- }
1189
- },
1190
- "RunnableStrategyStatus": {
1191
- "identity": "TYPE-RunnableStrategyStatus",
1192
- "name": "RunnableStrategyStatus",
1193
- "description": "dummy-description",
1194
- "nucleusSchema": {
1195
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1196
- "type": "string",
1197
- "enum": [
1198
- "pending",
1199
- "running",
1200
- "completed",
1201
- "failed",
1202
- "cancelled"
1203
- ]
1204
- }
1205
- },
1206
- "RunnableStrategyContext": {
1207
- "identity": "TYPE-RunnableStrategyContext",
1208
- "name": "RunnableStrategyContext",
1209
- "description": "dummy-description",
1210
- "nucleusSchema": {
1211
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1212
- "type": "object",
1213
- "required": [
1214
- "status"
1215
- ],
1216
- "properties": {
1217
- "status": {
1218
- "$ref": "#/$defs/RunnableStrategyStatus"
1219
- },
1220
- "startedAt": {
1221
- "$ref": "#/$defs/Timestamp"
1222
- },
1223
- "completedAt": {
1224
- "$ref": "#/$defs/Timestamp"
1225
- }
1226
- },
1227
- "unevaluatedProperties": false
1228
- }
1229
- },
1230
- "StrategyThreadIdentity": {
1231
- "identity": "TYPE-StrategyThreadIdentity",
1232
- "name": "StrategyThreadIdentity",
1233
- "description": "dummy-description",
1234
- "nucleusSchema": {
1235
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1236
- "type": "string",
1237
- "pattern": "^STRATEGY_THREAD-.+$"
1238
- }
1239
- },
1240
- "StrategyThreadMap": {
1241
- "identity": "TYPE-StrategyThreadMap",
1242
- "name": "StrategyThreadMap",
1243
- "description": "dummy-description",
1244
- "nucleusSchema": {
1245
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1246
- "type": "object",
1247
- "propertyNames": {
1248
- "$ref": "#/$defs/StrategyThreadIdentity"
1249
- },
1250
- "additionalProperties": {
1251
- "$ref": "#/$defs/StepArray"
1252
- },
1253
- "$comment": "Each thread contains an array of steps, allowing for sequential execution within a thread while supporting parallel execution across multiple threads."
1254
- }
1255
- },
1256
- "StrategyThreadMapFacet": {
1257
- "identity": "TYPE-StrategyThreadMapFacet",
1258
- "name": "StrategyThreadMapFacet",
1259
- "description": "dummy-description",
1260
- "nucleusSchema": {
1261
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1262
- "type": "object",
1263
- "required": [
1264
- "strategyThreadMap"
1265
- ],
1266
- "properties": {
1267
- "strategyThreadMap": {
1268
- "$ref": "#/$defs/StrategyThreadMap"
1269
- }
1270
- }
1271
- }
1272
- },
1273
- "RunnableStrategy": {
1274
- "identity": "TYPE-RunnableStrategy",
1275
- "name": "RunnableStrategy",
1276
- "description": "dummy-description",
1277
- "nucleusSchema": {
1278
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1279
- "type": "object",
1280
- "required": [
1281
- "identity",
1282
- "runnableStrategyContext"
1283
- ],
1284
- "properties": {
1285
- "identity": {
1286
- "$ref": "#/$defs/RunnableStrategyIdentity"
1287
- },
1288
- "runnableStrategyContext": {
1289
- "$ref": "#/$defs/RunnableStrategyContext"
1290
- }
1291
- },
1292
- "allOf": [
1293
- {
1294
- "$comment": "The Engine runs jobs specified by steps in strategyThreadMap. The Engine also injects repeted steps when encountering loops.",
1295
- "$ref": "#/$defs/StrategyThreadMapFacet"
1296
- },
1297
- {
1298
- "$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.",
1299
- "$ref": "#/$defs/StrategyStateFacet"
1300
- }
1301
- ],
1302
- "unevaluatedProperties": false
1303
- }
1304
- },
1305
- "StrategyStateDelta": {
1306
- "identity": "TYPE-StrategyStateDelta",
1307
- "name": "StrategyStateDelta",
1308
- "description": "dummy-description",
1309
- "nucleusSchema": {
1310
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1311
- "type": "object",
1312
- "required": [
1313
- "strategyStateUpdate"
1314
- ],
1315
- "properties": {
1316
- "strategyStateUpdate": {
1317
- "$ref": "#/$defs/StrategyState"
1318
- }
1319
- }
1320
- }
1321
- },
1322
- "RunnableStrategyUpdate": {
1323
- "identity": "TYPE-RunnableStrategyUpdate",
1324
- "name": "RunnableStrategyUpdate",
1325
- "description": "dummy-description",
1326
- "nucleusSchema": {
1327
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1328
- "type": "object",
1329
- "required": [
1330
- "runnableStrategyHandle"
1331
- ],
1332
- "properties": {
1333
- "runnableStrategyHandle": {
1334
- "$ref": "#/$defs/RunnableStrategyIdentity"
1335
- }
1336
- },
1337
- "allOf": [
1338
- {
1339
- "$ref": "#/$defs/StrategyStateDelta"
1340
- }
1341
- ],
1342
- "unevaluatedProperties": false
1343
- }
1344
- },
1345
- "RunEventCounters": {
1346
- "identity": "TYPE-RunEventCounters",
1347
- "name": "RunEventCounters",
1348
- "description": "dummy-description",
1349
- "nucleusSchema": {
1350
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1351
- "type": "object",
1352
- "properties": {
1353
- "stepCounterAfter": {
1354
- "type": "integer"
1355
- },
1356
- "iterationCounterAfter": {
1357
- "type": "integer"
1358
- }
1359
- }
1360
- }
1361
- },
1362
- "RunEventStepMetadata": {
1363
- "identity": "TYPE-RunEventStepMetadata",
1364
- "name": "RunEventStepMetadata",
1365
- "description": "dummy-description",
1366
- "nucleusSchema": {
1367
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1368
- "type": "object",
1369
- "required": [
1370
- "stepHandle",
1371
- "stepKind",
1372
- "threadStepIndex"
1373
- ],
1374
- "properties": {
1375
- "stepHandle": {
1376
- "$ref": "#/$defs/StepIdentity"
1377
- },
1378
- "stepKind": {
1379
- "$ref": "#/$defs/StepKind"
1380
- },
1381
- "threadStepIndex": {
1382
- "type": "integer"
1383
- }
1384
- }
1385
- }
1386
- },
1387
- "RunEventUpdates": {
1388
- "identity": "TYPE-RunEventUpdates",
1389
- "name": "RunEventUpdates",
1390
- "description": "dummy-description",
1391
- "nucleusSchema": {
1392
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1393
- "type": "object",
1394
- "properties": {
1395
- "stepsMutation": {
1396
- "type": "object",
1397
- "required": [
1398
- "insertAt",
1399
- "inserted"
1400
- ],
1401
- "properties": {
1402
- "insertAt": {
1403
- "type": "integer"
1404
- },
1405
- "inserted": {
1406
- "$ref": "#/$defs/StepArray"
1407
- }
1408
- }
1409
- },
1410
- "interruptData": {
1411
- "$comment": "Kept permissive; the engine may evolve interrupt payloads.",
1412
- "type": [
1413
- "object",
1414
- "null"
1415
- ]
1416
- }
1417
- },
1418
- "allOf": [
1419
- {
1420
- "$ref": "#/$defs/StrategyStateDelta"
1421
- }
1422
- ]
1423
- }
1424
- },
1425
- "RunEventKind": {
1426
- "identity": "TYPE-RunEventKind",
1427
- "name": "RunEventKind",
1428
- "description": "dummy-description",
1429
- "nucleusSchema": {
1430
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1431
- "type": "string",
1432
- "enum": [
1433
- "graph_start",
1434
- "tick",
1435
- "interrupt",
1436
- "graph_end"
1437
- ]
1438
- }
1439
- },
1440
- "RunEventBase": {
1441
- "identity": "TYPE-RunEventBase",
1442
- "name": "RunEventBase",
1443
- "description": "dummy-description",
1444
- "nucleusSchema": {
1445
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1446
- "type": "object",
1447
- "required": [
1448
- "runEventKind",
1449
- "runnableStrategyHandle",
1450
- "strategyThreadHandle",
1451
- "createdAt",
1452
- "nodeName",
1453
- "eventSeq"
1454
- ],
1455
- "properties": {
1456
- "runEventKind": {
1457
- "$ref": "#/$defs/RunEventKind"
1458
- },
1459
- "runnableStrategyHandle": {
1460
- "$ref": "#/$defs/RunnableStrategyIdentity"
1461
- },
1462
- "strategyThreadHandle": {
1463
- "$ref": "#/$defs/StrategyThreadIdentity"
1464
- },
1465
- "createdAt": {
1466
- "$ref": "#/$defs/Timestamp"
1467
- },
1468
- "nodeName": {
1469
- "type": "string"
1470
- },
1471
- "eventSeq": {
1472
- "type": "integer"
1473
- },
1474
- "counters": {
1475
- "$ref": "#/$defs/RunEventCounters"
1476
- },
1477
- "stepMetadata": {
1478
- "$ref": "#/$defs/RunEventStepMetadata"
1479
- },
1480
- "updates": {
1481
- "$ref": "#/$defs/RunEventUpdates"
1482
- }
1483
- }
1484
- }
1485
- },
1486
- "GraphStartRunEvent": {
1487
- "identity": "TYPE-GraphStartRunEvent",
1488
- "name": "GraphStartRunEvent",
1489
- "description": "dummy-description",
1490
- "nucleusSchema": {
1491
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1492
- "allOf": [
1493
- {
1494
- "$ref": "#/$defs/RunEventBase"
1495
- },
1496
- {
1497
- "type": "object",
1498
- "required": [
1499
- "runnableStrategySeed"
1500
- ],
1501
- "properties": {
1502
- "runEventKind": {
1503
- "const": "graph_start"
1504
- },
1505
- "runnableStrategySeed": {
1506
- "$ref": "#/$defs/RunnableStrategy"
1507
- }
1508
- }
1509
- }
1510
- ]
1511
- }
1512
- },
1513
- "TickRunEvent": {
1514
- "identity": "TYPE-TickRunEvent",
1515
- "name": "TickRunEvent",
1516
- "description": "dummy-description",
1517
- "nucleusSchema": {
1518
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1519
- "allOf": [
1520
- {
1521
- "$ref": "#/$defs/RunEventBase"
1522
- },
1523
- {
1524
- "type": "object",
1525
- "properties": {
1526
- "runEventKind": {
1527
- "const": "tick"
1528
- }
1529
- }
1530
- }
1531
- ]
1532
- }
1533
- },
1534
- "InterruptRunEvent": {
1535
- "identity": "TYPE-InterruptRunEvent",
1536
- "name": "InterruptRunEvent",
1537
- "description": "dummy-description",
1538
- "nucleusSchema": {
1539
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1540
- "allOf": [
1541
- {
1542
- "$ref": "#/$defs/RunEventBase"
1543
- },
1544
- {
1545
- "type": "object",
1546
- "properties": {
1547
- "runEventKind": {
1548
- "const": "interrupt"
1549
- }
1550
- }
1551
- }
1552
- ]
1553
- }
1554
- },
1555
- "GraphEndRunEvent": {
1556
- "identity": "TYPE-GraphEndRunEvent",
1557
- "name": "GraphEndRunEvent",
1558
- "description": "dummy-description",
1559
- "nucleusSchema": {
1560
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1561
- "allOf": [
1562
- {
1563
- "$ref": "#/$defs/RunEventBase"
1564
- },
1565
- {
1566
- "type": "object",
1567
- "properties": {
1568
- "runEventKind": {
1569
- "const": "graph_end"
1570
- }
1571
- }
1572
- }
1573
- ]
1574
- }
1575
- },
1576
- "RunEvent": {
1577
- "identity": "TYPE-RunEvent",
1578
- "name": "RunEvent",
1579
- "description": "dummy-description",
1580
- "nucleusSchema": {
1581
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1582
- "type": "object",
1583
- "oneOf": [
1584
- {
1585
- "$ref": "#/$defs/GraphStartRunEvent"
1586
- },
1587
- {
1588
- "$ref": "#/$defs/TickRunEvent"
1589
- },
1590
- {
1591
- "$ref": "#/$defs/InterruptRunEvent"
1592
- },
1593
- {
1594
- "$ref": "#/$defs/GraphEndRunEvent"
1595
- }
1596
- ]
1597
- }
1598
- },
1599
- "StrategyRunIdentity": {
1600
- "identity": "TYPE-StrategyRunIdentity",
1601
- "name": "StrategyRunIdentity",
1602
- "description": "dummy-description",
1603
- "nucleusSchema": {
1604
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1605
- "type": "string",
1606
- "pattern": "^STRATEGY_RUN-.+$"
1607
- }
1608
- },
1609
- "StrategyRun": {
1610
- "identity": "TYPE-StrategyRun",
1611
- "name": "StrategyRun",
1612
- "description": "dummy-description",
1613
- "nucleusSchema": {
1614
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1615
- "type": "object",
1616
- "required": [
1617
- "identity",
1618
- "runnableStrategyHandle",
1619
- "recordedAt",
1620
- "runEvents"
1621
- ],
1622
- "properties": {
1623
- "identity": {
1624
- "$ref": "#/$defs/StrategyRunIdentity"
1625
- },
1626
- "runnableStrategyHandle": {
1627
- "$comment": "Could be derived from the first event but useful for indexing.",
1628
- "$ref": "#/$defs/RunnableStrategyIdentity"
1629
- },
1630
- "recordedAt": {
1631
- "$ref": "#/$defs/Timestamp"
1632
- },
1633
- "runEvents": {
1634
- "type": "array",
1635
- "items": {
1636
- "$ref": "#/$defs/RunEvent"
1637
- }
1638
- }
1639
- },
1640
- "unevaluatedProperties": false
1641
- }
1642
- },
1643
- "GoalIdentity": {
1644
- "identity": "TYPE-GoalIdentity",
1645
- "name": "GoalIdentity",
1646
- "description": "dummy-description",
1647
- "nucleusSchema": {
1648
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1649
- "type": "string",
1650
- "pattern": "^GOAL-.+$"
1651
- }
1652
- },
1653
- "Goal": {
1654
- "identity": "TYPE-Goal",
1655
- "name": "Goal",
1656
- "description": "dummy-description",
1657
- "nucleusSchema": {
1658
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1659
- "type": "object",
1660
- "required": [
1661
- "identity",
1662
- "target"
1663
- ],
1664
- "properties": {
1665
- "identity": {
1666
- "$ref": "#/$defs/GoalIdentity"
1667
- },
1668
- "target": {
1669
- "type": "integer",
1670
- "minimum": 0
1671
- },
1672
- "disallowedJobs": {
1673
- "type": "array",
1674
- "items": {
1675
- "$ref": "#/$defs/JobIdentity"
1676
- }
1677
- },
1678
- "disallowedSequences": {
1679
- "type": "array",
1680
- "items": {
1681
- "type": "array",
1682
- "items": {
1683
- "$ref": "#/$defs/JobIdentity"
1684
- }
1685
- }
1686
- },
1687
- "minSteps": {
1688
- "type": "integer",
1689
- "minimum": 1
1690
- },
1691
- "maxSteps": {
1692
- "type": "integer",
1693
- "minimum": 1
1694
- }
1695
- },
1696
- "unevaluatedProperties": false
1697
- }
1698
- },
1699
- "Natural": {
1700
- "identity": "TYPE-Natural",
1701
- "name": "Natural",
1702
- "description": "dummy-description",
1703
- "nucleusSchema": {
1704
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1705
- "type": "object",
1706
- "required": [
1707
- "identity"
1708
- ],
1709
- "properties": {
1710
- "identity": {
1711
- "$ref": "#/$defs/NaturalIdentity"
1712
- }
1713
- },
1714
- "$defs": {
1715
- "NaturalIdentity": {
1716
- "type": "integer"
1717
- }
1718
- },
1719
- "additionalProperties": false
1720
- }
1721
- },
1722
- "Boolean": {
1723
- "identity": "TYPE-Boolean",
1724
- "name": "Boolean",
1725
- "description": "dummy-description",
1726
- "nucleusSchema": {
1727
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1728
- "type": "object",
1729
- "required": [
1730
- "identity"
1731
- ],
1732
- "properties": {
1733
- "identity": {
1734
- "$ref": "#/$defs/BooleanIdentity"
1735
- }
1736
- },
1737
- "$defs": {
1738
- "BooleanIdentity": {
1739
- "type": "boolean"
1740
- }
1741
- },
1742
- "additionalProperties": false
1743
- }
1744
- }
1745
- }
1746
- }
1
+ {
2
+ "identity": "TYPE-Genesis",
3
+ "name": "Genesis",
4
+ "description": "dummy-description",
5
+ "nucleusSchema": {
6
+ "$comment": "This file defines all schemas used internally by ToolProof.",
7
+ "$id": "https://schemas.toolproof.com/v1/Genesis.json",
8
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
9
+ "$defs": {
10
+ "Name": {
11
+ "identity": "TYPE-Name",
12
+ "name": "Name",
13
+ "description": "dummy-description",
14
+ "nucleusSchema": {
15
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
16
+ "type": "string",
17
+ "minLength": 1,
18
+ "pattern": "^(?:[A-Z][^0-9]*|[a-z]+/[a-z.+&-]+)$",
19
+ "$comment": "Validation is intercepted by an AI Agent that verifies the name against Toolproof's naming conventions.",
20
+ "semanticValidation": "Ajv custom keyword to verify name."
21
+ }
22
+ },
23
+ "NameFacet": {
24
+ "identity": "TYPE-NameFacet",
25
+ "name": "NameFacet",
26
+ "description": "dummy-description",
27
+ "nucleusSchema": {
28
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
29
+ "type": "object",
30
+ "required": [
31
+ "name"
32
+ ],
33
+ "properties": {
34
+ "name": {
35
+ "$ref": "#/$defs/Name"
36
+ }
37
+ }
38
+ }
39
+ },
40
+ "Description": {
41
+ "identity": "TYPE-Description",
42
+ "name": "Description",
43
+ "description": "dummy-description",
44
+ "nucleusSchema": {
45
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
46
+ "type": "string",
47
+ "minLength": 1,
48
+ "$comment": "Validation is intercepted by an AI Agent that verifies the description against Toolproof's documentation standards.",
49
+ "semanticValidation": "Ajv custom keyword to verify description."
50
+ }
51
+ },
52
+ "DescriptionFacet": {
53
+ "identity": "TYPE-DescriptionFacet",
54
+ "name": "DescriptionFacet",
55
+ "description": "dummy-description",
56
+ "nucleusSchema": {
57
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
58
+ "type": "object",
59
+ "required": [
60
+ "description"
61
+ ],
62
+ "properties": {
63
+ "description": {
64
+ "$ref": "#/$defs/Description"
65
+ }
66
+ }
67
+ }
68
+ },
69
+ "DocumentationFacet": {
70
+ "identity": "TYPE-DocumentationFacet",
71
+ "name": "DocumentationFacet",
72
+ "description": "dummy-description",
73
+ "nucleusSchema": {
74
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
75
+ "type": "object",
76
+ "allOf": [
77
+ {
78
+ "$ref": "#/$defs/NameFacet"
79
+ },
80
+ {
81
+ "$ref": "#/$defs/DescriptionFacet"
82
+ }
83
+ ]
84
+ }
85
+ },
86
+ "Uri": {
87
+ "identity": "TYPE-Uri",
88
+ "name": "Uri",
89
+ "description": "dummy-description",
90
+ "nucleusSchema": {
91
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
92
+ "type": "string",
93
+ "format": "uri"
94
+ }
95
+ },
96
+ "ResourceTypeIdentity": {
97
+ "identity": "TYPE-ResourceTypeIdentity",
98
+ "name": "ResourceTypeIdentity",
99
+ "description": "dummy-description",
100
+ "nucleusSchema": {
101
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
102
+ "type": "string",
103
+ "pattern": "^TYPE-.+$"
104
+ }
105
+ },
106
+ "ResourceType": {
107
+ "identity": "TYPE-ResourceType",
108
+ "name": "ResourceType",
109
+ "description": "dummy-description",
110
+ "nucleusSchema": {
111
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
112
+ "type": "object",
113
+ "required": [
114
+ "identity",
115
+ "nucleusSchema"
116
+ ],
117
+ "properties": {
118
+ "identity": {
119
+ "$ref": "#/$defs/ResourceTypeIdentity"
120
+ },
121
+ "nucleusSchema": true,
122
+ "embeddingUriMap": {
123
+ "type": "object",
124
+ "propertyNames": {
125
+ "type": "string",
126
+ "pattern": "^EMBEDDING-.+$"
127
+ },
128
+ "additionalProperties": {
129
+ "$ref": "#/$defs/Uri"
130
+ },
131
+ "minProperties": 1,
132
+ "$comment": "A ResourceType may specify a set of embedding models that convert the raw data (or one of its alternative representations) into vector embeddings. The build process enforces that the keys of this map are members of a set of predefined embedding models."
133
+ },
134
+ "generatorUriMap": {
135
+ "type": "object",
136
+ "propertyNames": {
137
+ "type": "string",
138
+ "pattern": "^GENERATOR-.+$"
139
+ },
140
+ "additionalProperties": {
141
+ "$ref": "#/$defs/Uri"
142
+ },
143
+ "minProperties": 1,
144
+ "$comment": "A ResourceType may specify a set of generators that generate different representations of its instances from the raw file. A ToolProof Resource is always backed by a raw file. This is also true for the Resources (of type ResourceType) defined in this file! The build process enforces that the keys of this map are members of a set of predefined generators. GENERATOR-Json is an identifier for a generator that generates JSON data from the raw file. If the raw file is a JSON file, GENERATOR-Json is an implicit identity operation (i.e. an operation that does nothing) and must not be present in the map. A ResourceType may also specify other generators, such as GENERATOR-LeanTerm, which generates an instance (or 'term' in Lean jargon) of a corresponding Lean type from the raw file. ResourceTypes that specify GENERATOR-LeanTerm must also specify a corresponding GENERATOR-LeanType. While the term-version runs when data instances enter the ecosystem, the type-version runs when the ResourceType itself enters the ecosystem."
145
+ }
146
+ },
147
+ "allOf": [
148
+ {
149
+ "$ref": "#/$defs/DocumentationFacet"
150
+ }
151
+ ]
152
+ }
153
+ },
154
+ "ResourceRoleIdentity": {
155
+ "identity": "TYPE-ResourceRoleIdentity",
156
+ "name": "ResourceRoleIdentity",
157
+ "description": "dummy-description",
158
+ "nucleusSchema": {
159
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
160
+ "type": "string",
161
+ "pattern": "^ROLE-.+$"
162
+ }
163
+ },
164
+ "ResourceRoleValue": {
165
+ "identity": "TYPE-ResourceRoleValue",
166
+ "name": "ResourceRoleValue",
167
+ "description": "dummy-description",
168
+ "nucleusSchema": {
169
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
170
+ "type": "object",
171
+ "allOf": [
172
+ {
173
+ "$comment": "A ResourceRole does not have a self-contained identity, as it is always defined in the context of a RoleMap. ResourceRoleValue uses the Value suffix to mean 'the value stored in this map' (RoleMap.additionalProperties).",
174
+ "required": [
175
+ "resourceTypeHandle"
176
+ ],
177
+ "properties": {
178
+ "resourceTypeHandle": {
179
+ "$ref": "#/$defs/ResourceTypeIdentity"
180
+ }
181
+ }
182
+ },
183
+ {
184
+ "$ref": "#/$defs/DocumentationFacet"
185
+ }
186
+ ]
187
+ },
188
+ "unevaluatedProperties": false
189
+ },
190
+ "RoleMap": {
191
+ "identity": "TYPE-RoleMap",
192
+ "name": "RoleMap",
193
+ "description": "dummy-description",
194
+ "nucleusSchema": {
195
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
196
+ "type": "object",
197
+ "propertyNames": {
198
+ "$ref": "#/$defs/ResourceRoleIdentity"
199
+ },
200
+ "additionalProperties": {
201
+ "$ref": "#/$defs/ResourceRoleValue"
202
+ }
203
+ }
204
+ },
205
+ "Error": {
206
+ "identity": "TYPE-Error",
207
+ "name": "Error",
208
+ "description": "dummy-description",
209
+ "nucleusSchema": {
210
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
211
+ "type": "object",
212
+ "allOf": [
213
+ {
214
+ "$ref": "#/$defs/DocumentationFacet"
215
+ },
216
+ {
217
+ "properties": {
218
+ "details": {
219
+ "type": "object"
220
+ }
221
+ }
222
+ }
223
+ ],
224
+ "unevaluatedProperties": false
225
+ }
226
+ },
227
+ "Roles": {
228
+ "identity": "TYPE-Roles",
229
+ "name": "Roles",
230
+ "description": "dummy-description",
231
+ "nucleusSchema": {
232
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
233
+ "type": "object",
234
+ "required": [
235
+ "inputMap",
236
+ "outputMap"
237
+ ],
238
+ "properties": {
239
+ "inputMap": {
240
+ "$ref": "#/$defs/RoleMap"
241
+ },
242
+ "outputMap": {
243
+ "allOf": [
244
+ {
245
+ "$ref": "#/$defs/RoleMap"
246
+ },
247
+ {
248
+ "type": "object",
249
+ "required": [
250
+ "ROLE-ErrorOutput"
251
+ ],
252
+ "properties": {
253
+ "ROLE-ErrorOutput": {
254
+ "type": "object",
255
+ "allOf": [
256
+ {
257
+ "$ref": "#/$defs/ResourceRoleValue"
258
+ },
259
+ {
260
+ "required": [
261
+ "resourceTypeHandle",
262
+ "name",
263
+ "description"
264
+ ],
265
+ "properties": {
266
+ "resourceTypeHandle": {
267
+ "const": "TYPE-Error"
268
+ },
269
+ "name": {
270
+ "const": "ErrorOutput"
271
+ },
272
+ "description": {
273
+ "const": "Represents error outputs from job runs."
274
+ }
275
+ }
276
+ }
277
+ ]
278
+ }
279
+ }
280
+ }
281
+ ]
282
+ }
283
+ },
284
+ "unevaluatedProperties": false
285
+ }
286
+ },
287
+ "RolesFacet": {
288
+ "identity": "TYPE-RolesFacet",
289
+ "name": "RolesFacet",
290
+ "description": "dummy-description",
291
+ "nucleusSchema": {
292
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
293
+ "type": "object",
294
+ "required": [
295
+ "roles"
296
+ ],
297
+ "properties": {
298
+ "roles": {
299
+ "$ref": "#/$defs/Roles"
300
+ }
301
+ }
302
+ }
303
+ },
304
+ "JobIdentity": {
305
+ "identity": "TYPE-JobIdentity",
306
+ "name": "JobIdentity",
307
+ "description": "dummy-description",
308
+ "nucleusSchema": {
309
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
310
+ "type": "string",
311
+ "pattern": "^JOB-.+$"
312
+ }
313
+ },
314
+ "Job": {
315
+ "identity": "TYPE-Job",
316
+ "name": "Job",
317
+ "description": "dummy-description",
318
+ "nucleusSchema": {
319
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
320
+ "type": "object",
321
+ "required": [
322
+ "identity",
323
+ "implementationUri"
324
+ ],
325
+ "properties": {
326
+ "identity": {
327
+ "$ref": "#/$defs/JobIdentity"
328
+ },
329
+ "implementationUri": {
330
+ "$comment": "Instances of a ResourceType that requires implementationUri are 'executable' ResourceTypes. TYPE-Job is the canonical executable ResourceType in the ecosystem.",
331
+ "$ref": "#/$defs/Uri"
332
+ }
333
+ },
334
+ "allOf": [
335
+ {
336
+ "$ref": "#/$defs/DocumentationFacet"
337
+ },
338
+ {
339
+ "$ref": "#/$defs/RolesFacet"
340
+ }
341
+ ],
342
+ "unevaluatedProperties": false
343
+ }
344
+ },
345
+ "RoleBindingArray": {
346
+ "identity": "TYPE-RoleBindingArray",
347
+ "name": "RoleBindingArray",
348
+ "description": "dummy-description",
349
+ "nucleusSchema": {
350
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
351
+ "type": "array",
352
+ "items": {
353
+ "$ref": "#/$defs/ResourceRoleIdentity"
354
+ }
355
+ }
356
+ },
357
+ "RoleBindings": {
358
+ "identity": "TYPE-RoleBindings",
359
+ "name": "RoleBindings",
360
+ "description": "dummy-description",
361
+ "nucleusSchema": {
362
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
363
+ "type": "object",
364
+ "required": [
365
+ "inputBindings",
366
+ "outputBindings"
367
+ ],
368
+ "properties": {
369
+ "inputBindings": {
370
+ "$ref": "#/$defs/RoleBindingArray"
371
+ },
372
+ "outputBindings": {
373
+ "$ref": "#/$defs/RoleBindingArray"
374
+ }
375
+ }
376
+ },
377
+ "unevaluatedProperties": false
378
+ },
379
+ "RoleBindingsFacet": {
380
+ "identity": "TYPE-RoleBindingsFacet",
381
+ "name": "RoleBindingsFacet",
382
+ "description": "dummy-description",
383
+ "nucleusSchema": {
384
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
385
+ "type": "object",
386
+ "required": [
387
+ "roleBindings"
388
+ ],
389
+ "properties": {
390
+ "roleBindings": {
391
+ "$ref": "#/$defs/RoleBindings"
392
+ }
393
+ }
394
+ }
395
+ },
396
+ "StepKind": {
397
+ "identity": "TYPE-StepKind",
398
+ "name": "StepKind",
399
+ "description": "dummy-description",
400
+ "nucleusSchema": {
401
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
402
+ "type": "string",
403
+ "enum": [
404
+ "job",
405
+ "branch",
406
+ "while",
407
+ "for"
408
+ ]
409
+ }
410
+ },
411
+ "StepKindFacet": {
412
+ "identity": "TYPE-StepKindFacet",
413
+ "name": "StepKindFacet",
414
+ "description": "dummy-description",
415
+ "nucleusSchema": {
416
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
417
+ "type": "object",
418
+ "required": [
419
+ "stepKind"
420
+ ],
421
+ "properties": {
422
+ "stepKind": {
423
+ "$ref": "#/$defs/StepKind"
424
+ }
425
+ }
426
+ }
427
+ },
428
+ "JobStepIdentity": {
429
+ "identity": "TYPE-JobStepIdentity",
430
+ "name": "JobStepIdentity",
431
+ "description": "dummy-description",
432
+ "nucleusSchema": {
433
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
434
+ "type": "string",
435
+ "pattern": "^JOB_STEP-.+$"
436
+ }
437
+ },
438
+ "JobStep": {
439
+ "identity": "TYPE-JobStep",
440
+ "name": "JobStep",
441
+ "description": "dummy-description",
442
+ "nucleusSchema": {
443
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
444
+ "type": "object",
445
+ "required": [
446
+ "identity",
447
+ "stepKind",
448
+ "jobHandle"
449
+ ],
450
+ "properties": {
451
+ "identity": {
452
+ "$ref": "#/$defs/JobStepIdentity"
453
+ },
454
+ "stepKind": {
455
+ "const": "job"
456
+ },
457
+ "jobHandle": {
458
+ "$ref": "#/$defs/JobIdentity"
459
+ }
460
+ },
461
+ "allOf": [
462
+ {
463
+ "$ref": "#/$defs/StepKindFacet"
464
+ },
465
+ {
466
+ "$comment": "This will be overlayed dynamically to specify roleBindings corresponding to the roles of the underlying job.",
467
+ "$ref": "#/$defs/RoleBindingsFacet"
468
+ }
469
+ ]
470
+ }
471
+ },
472
+ "Conditional": {
473
+ "identity": "TYPE-Conditional",
474
+ "name": "Conditional",
475
+ "description": "dummy-description",
476
+ "nucleusSchema": {
477
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
478
+ "type": "object",
479
+ "required": [
480
+ "when",
481
+ "what"
482
+ ],
483
+ "properties": {
484
+ "when": {
485
+ "$ref": "#/$defs/JobStep"
486
+ },
487
+ "what": {
488
+ "$ref": "#/$defs/JobStep"
489
+ }
490
+ },
491
+ "unevaluatedProperties": false
492
+ }
493
+ },
494
+ "BranchStepIdentity": {
495
+ "identity": "TYPE-BranchStepIdentity",
496
+ "name": "BranchStepIdentity",
497
+ "description": "dummy-description",
498
+ "nucleusSchema": {
499
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
500
+ "type": "string",
501
+ "pattern": "^BRANCH_STEP-.+$"
502
+ }
503
+ },
504
+ "BranchStep": {
505
+ "identity": "TYPE-BranchStep",
506
+ "name": "BranchStep",
507
+ "description": "dummy-description",
508
+ "nucleusSchema": {
509
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
510
+ "type": "object",
511
+ "required": [
512
+ "identity",
513
+ "stepKind",
514
+ "cases"
515
+ ],
516
+ "properties": {
517
+ "identity": {
518
+ "$ref": "#/$defs/BranchStepIdentity"
519
+ },
520
+ "stepKind": {
521
+ "const": "branch"
522
+ },
523
+ "cases": {
524
+ "type": "array",
525
+ "items": {
526
+ "$ref": "#/$defs/Conditional"
527
+ },
528
+ "minItems": 1,
529
+ "uniqueItems": true
530
+ }
531
+ },
532
+ "allOf": [
533
+ {
534
+ "$ref": "#/$defs/StepKindFacet"
535
+ }
536
+ ]
537
+ }
538
+ },
539
+ "WhileStepIdentity": {
540
+ "identity": "TYPE-WhileStepIdentity",
541
+ "name": "WhileStepIdentity",
542
+ "description": "dummy-description",
543
+ "nucleusSchema": {
544
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
545
+ "type": "string",
546
+ "pattern": "^WHILE_STEP-.+$"
547
+ }
548
+ },
549
+ "WhileStep": {
550
+ "identity": "TYPE-WhileStep",
551
+ "name": "WhileStep",
552
+ "description": "dummy-description",
553
+ "nucleusSchema": {
554
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
555
+ "type": "object",
556
+ "required": [
557
+ "identity",
558
+ "stepKind",
559
+ "case"
560
+ ],
561
+ "properties": {
562
+ "identity": {
563
+ "$ref": "#/$defs/WhileStepIdentity"
564
+ },
565
+ "stepKind": {
566
+ "const": "while"
567
+ },
568
+ "case": {
569
+ "$ref": "#/$defs/Conditional"
570
+ }
571
+ },
572
+ "allOf": [
573
+ {
574
+ "$ref": "#/$defs/StepKindFacet"
575
+ }
576
+ ]
577
+ }
578
+ },
579
+ "ForStepIdentity": {
580
+ "identity": "TYPE-ForStepIdentity",
581
+ "name": "ForStepIdentity",
582
+ "description": "dummy-description",
583
+ "nucleusSchema": {
584
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
585
+ "type": "string",
586
+ "pattern": "^FOR_STEP-.+$"
587
+ }
588
+ },
589
+ "ForStep": {
590
+ "identity": "TYPE-ForStep",
591
+ "name": "ForStep",
592
+ "description": "dummy-description",
593
+ "nucleusSchema": {
594
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
595
+ "type": "object",
596
+ "required": [
597
+ "identity",
598
+ "stepKind",
599
+ "case"
600
+ ],
601
+ "properties": {
602
+ "identity": {
603
+ "$ref": "#/$defs/ForStepIdentity"
604
+ },
605
+ "stepKind": {
606
+ "const": "for"
607
+ },
608
+ "case": {
609
+ "$ref": "#/$defs/Conditional"
610
+ }
611
+ },
612
+ "allOf": [
613
+ {
614
+ "$ref": "#/$defs/StepKindFacet"
615
+ }
616
+ ]
617
+ }
618
+ },
619
+ "StepIdentity": {
620
+ "identity": "TYPE-StepIdentity",
621
+ "name": "StepIdentity",
622
+ "description": "dummy-description",
623
+ "nucleusSchema": {
624
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
625
+ "type": "object",
626
+ "oneOf": [
627
+ {
628
+ "$ref": "#/$defs/JobStepIdentity"
629
+ },
630
+ {
631
+ "$ref": "#/$defs/BranchStepIdentity"
632
+ },
633
+ {
634
+ "$ref": "#/$defs/WhileStepIdentity"
635
+ },
636
+ {
637
+ "$ref": "#/$defs/ForStepIdentity"
638
+ }
639
+ ]
640
+ }
641
+ },
642
+ "Step": {
643
+ "identity": "TYPE-Step",
644
+ "name": "Step",
645
+ "description": "dummy-description",
646
+ "nucleusSchema": {
647
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
648
+ "type": "object",
649
+ "oneOf": [
650
+ {
651
+ "$ref": "#/$defs/JobStep"
652
+ },
653
+ {
654
+ "$ref": "#/$defs/BranchStep"
655
+ },
656
+ {
657
+ "$ref": "#/$defs/WhileStep"
658
+ },
659
+ {
660
+ "$ref": "#/$defs/ForStep"
661
+ }
662
+ ],
663
+ "unevaluatedProperties": false
664
+ }
665
+ },
666
+ "CreationContext": {
667
+ "identity": "TYPE-CreationContext",
668
+ "name": "CreationContext",
669
+ "description": "dummy-description",
670
+ "nucleusSchema": {
671
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
672
+ "type": "object",
673
+ "required": [
674
+ "resourceRoleHandle",
675
+ "jobStepHandle"
676
+ ],
677
+ "properties": {
678
+ "resourceRoleHandle": {
679
+ "$ref": "#/$defs/ResourceRoleIdentity"
680
+ },
681
+ "jobStepHandle": {
682
+ "$ref": "#/$defs/JobStepIdentity"
683
+ }
684
+ }
685
+ }
686
+ },
687
+ "CreationContextFacet": {
688
+ "identity": "TYPE-CreationContextFacet",
689
+ "name": "CreationContextFacet",
690
+ "description": "dummy-description",
691
+ "nucleusSchema": {
692
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
693
+ "type": "object",
694
+ "required": [
695
+ "creationContext"
696
+ ],
697
+ "properties": {
698
+ "creationContext": {
699
+ "$ref": "#/$defs/CreationContext"
700
+ }
701
+ }
702
+ }
703
+ },
704
+ "ResourceIdentity": {
705
+ "identity": "TYPE-ResourceIdentity",
706
+ "name": "ResourceIdentity",
707
+ "description": "dummy-description",
708
+ "nucleusSchema": {
709
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
710
+ "type": "string",
711
+ "pattern": "^RESOURCE-.+$"
712
+ }
713
+ },
714
+ "ResourceShellBase": {
715
+ "identity": "TYPE-ResourceShellBase",
716
+ "name": "ResourceShellBase",
717
+ "description": "dummy-description",
718
+ "nucleusSchema": {
719
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
720
+ "type": "object",
721
+ "required": [
722
+ "identity",
723
+ "resourceTypeHandle",
724
+ "resourceShellKind"
725
+ ],
726
+ "properties": {
727
+ "identity": {
728
+ "$ref": "#/$defs/ResourceIdentity"
729
+ },
730
+ "resourceTypeHandle": {
731
+ "$ref": "#/$defs/ResourceTypeIdentity"
732
+ },
733
+ "resourceShellKind": {
734
+ "$ref": "#/$defs/ResourceShellKind"
735
+ }
736
+ }
737
+ }
738
+ },
739
+ "ResourceShellKind": {
740
+ "identity": "TYPE-ResourceShellKind",
741
+ "name": "ResourceShellKind",
742
+ "description": "dummy-description",
743
+ "nucleusSchema": {
744
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
745
+ "type": "string",
746
+ "enum": [
747
+ "missing",
748
+ "inputPotential",
749
+ "outputPotential",
750
+ "materialized"
751
+ ]
752
+ }
753
+ },
754
+ "ResourceShellKindFacet": {
755
+ "identity": "TYPE-ResourceShellKindFacet",
756
+ "name": "ResourceShellKindFacet",
757
+ "description": "dummy-description",
758
+ "nucleusSchema": {
759
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
760
+ "type": "object",
761
+ "required": [
762
+ "resourceShellKind"
763
+ ],
764
+ "properties": {
765
+ "resourceShellKind": {
766
+ "$ref": "#/$defs/ResourceShellKind"
767
+ }
768
+ }
769
+ }
770
+ },
771
+ "ShellMissing": {
772
+ "identity": "TYPE-ShellMissing",
773
+ "name": "ShellMissing",
774
+ "description": "dummy-description",
775
+ "nucleusSchema": {
776
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
777
+ "type": "object",
778
+ "required": [
779
+ "resourceShellKind"
780
+ ],
781
+ "properties": {
782
+ "resourceShellKind": {
783
+ "const": "missing"
784
+ }
785
+ },
786
+ "allOf": [
787
+ {
788
+ "$ref": "#/$defs/ResourceShellBase"
789
+ },
790
+ {
791
+ "$ref": "#/$defs/ResourceShellKindFacet"
792
+ }
793
+ ],
794
+ "unevaluatedProperties": false
795
+ }
796
+ },
797
+ "ShellInputPotential": {
798
+ "identity": "TYPE-ShellInputPotential",
799
+ "name": "ShellInputPotential",
800
+ "description": "dummy-description",
801
+ "nucleusSchema": {
802
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
803
+ "type": "object",
804
+ "required": [
805
+ "resourceShellKind"
806
+ ],
807
+ "properties": {
808
+ "resourceShellKind": {
809
+ "const": "inputPotential"
810
+ }
811
+ },
812
+ "allOf": [
813
+ {
814
+ "$ref": "#/$defs/ResourceShellBase"
815
+ },
816
+ {
817
+ "$ref": "#/$defs/CreationContextFacet"
818
+ },
819
+ {
820
+ "$ref": "#/$defs/ResourceShellKindFacet"
821
+ }
822
+ ],
823
+ "unevaluatedProperties": false
824
+ }
825
+ },
826
+ "ShellOutputPotential": {
827
+ "identity": "TYPE-ShellOutputPotential",
828
+ "name": "ShellOutputPotential",
829
+ "description": "dummy-description",
830
+ "nucleusSchema": {
831
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
832
+ "type": "object",
833
+ "required": [
834
+ "resourceShellKind"
835
+ ],
836
+ "properties": {
837
+ "resourceShellKind": {
838
+ "const": "outputPotential"
839
+ }
840
+ },
841
+ "allOf": [
842
+ {
843
+ "$ref": "#/$defs/ResourceShellBase"
844
+ },
845
+ {
846
+ "$ref": "#/$defs/CreationContextFacet"
847
+ },
848
+ {
849
+ "$ref": "#/$defs/ResourceShellKindFacet"
850
+ }
851
+ ],
852
+ "unevaluatedProperties": false
853
+ }
854
+ },
855
+ "Timestamp": {
856
+ "identity": "TYPE-Timestamp",
857
+ "name": "Timestamp",
858
+ "description": "dummy-description",
859
+ "nucleusSchema": {
860
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
861
+ "type": "string",
862
+ "format": "date-time"
863
+ }
864
+ },
865
+ "TimestampFacet": {
866
+ "identity": "TYPE-TimestampFacet",
867
+ "name": "TimestampFacet",
868
+ "description": "dummy-description",
869
+ "nucleusSchema": {
870
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
871
+ "type": "object",
872
+ "required": [
873
+ "timestamp"
874
+ ],
875
+ "properties": {
876
+ "timestamp": {
877
+ "$ref": "#/$defs/Timestamp"
878
+ }
879
+ }
880
+ }
881
+ },
882
+ "Path": {
883
+ "identity": "TYPE-Path",
884
+ "name": "Path",
885
+ "description": "dummy-description",
886
+ "nucleusSchema": {
887
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
888
+ "type": "string",
889
+ "format": "uri-reference"
890
+ }
891
+ },
892
+ "PathFacet": {
893
+ "identity": "TYPE-PathFacet",
894
+ "name": "PathFacet",
895
+ "description": "dummy-description",
896
+ "nucleusSchema": {
897
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
898
+ "type": "object",
899
+ "required": [
900
+ "path"
901
+ ],
902
+ "properties": {
903
+ "path": {
904
+ "$ref": "#/$defs/Path"
905
+ }
906
+ }
907
+ }
908
+ },
909
+ "ShellMaterializedBase": {
910
+ "identity": "TYPE-ShellMaterializedBase",
911
+ "name": "ShellMaterializedBase",
912
+ "description": "dummy-description",
913
+ "nucleusSchema": {
914
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
915
+ "type": "object",
916
+ "required": [
917
+ "version",
918
+ "resourceShellKind"
919
+ ],
920
+ "properties": {
921
+ "version": {
922
+ "const": 1
923
+ },
924
+ "resourceShellKind": {
925
+ "const": "materialized"
926
+ }
927
+ },
928
+ "allOf": [
929
+ {
930
+ "$ref": "#/$defs/ResourceShellBase"
931
+ },
932
+ {
933
+ "$ref": "#/$defs/CreationContextFacet"
934
+ },
935
+ {
936
+ "$ref": "#/$defs/ResourceShellKindFacet"
937
+ },
938
+ {
939
+ "$ref": "#/$defs/TimestampFacet"
940
+ },
941
+ {
942
+ "$ref": "#/$defs/PathFacet"
943
+ }
944
+ ]
945
+ }
946
+ },
947
+ "ShellMaterialized": {
948
+ "identity": "TYPE-ShellMaterialized",
949
+ "name": "ShellMaterialized",
950
+ "description": "dummy-description",
951
+ "nucleusSchema": {
952
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
953
+ "type": "object",
954
+ "$ref": "#/$defs/ShellMaterializedBase",
955
+ "unevaluatedProperties": false
956
+ }
957
+ },
958
+ "ResourceMissing": {
959
+ "identity": "TYPE-ResourceMissing",
960
+ "name": "ResourceMissing",
961
+ "description": "dummy-description",
962
+ "nucleusSchema": {
963
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
964
+ "type": "object",
965
+ "$ref": "#/$defs/ShellMissing",
966
+ "unevaluatedProperties": false
967
+ }
968
+ },
969
+ "ResourceInputPotential": {
970
+ "identity": "TYPE-ResourceInputPotential",
971
+ "name": "ResourceInputPotential",
972
+ "description": "dummy-description",
973
+ "nucleusSchema": {
974
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
975
+ "type": "object",
976
+ "$ref": "#/$defs/ShellInputPotential",
977
+ "unevaluatedProperties": false
978
+ }
979
+ },
980
+ "ResourceOutputPotential": {
981
+ "identity": "TYPE-ResourceOutputPotential",
982
+ "name": "ResourceOutputPotential",
983
+ "description": "dummy-description",
984
+ "nucleusSchema": {
985
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
986
+ "type": "object",
987
+ "$ref": "#/$defs/ShellOutputPotential",
988
+ "unevaluatedProperties": false
989
+ }
990
+ },
991
+ "ResourcePotential": {
992
+ "identity": "TYPE-ResourcePotential",
993
+ "name": "ResourcePotential",
994
+ "description": "dummy-description",
995
+ "nucleusSchema": {
996
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
997
+ "type": "object",
998
+ "oneOf": [
999
+ {
1000
+ "$ref": "#/$defs/ResourceMissing"
1001
+ },
1002
+ {
1003
+ "$ref": "#/$defs/ResourceInputPotential"
1004
+ },
1005
+ {
1006
+ "$ref": "#/$defs/ResourceOutputPotential"
1007
+ }
1008
+ ],
1009
+ "unevaluatedProperties": false
1010
+ }
1011
+ },
1012
+ "JsonData": {
1013
+ "identity": "TYPE-JsonData",
1014
+ "name": "JsonData",
1015
+ "description": "dummy-description",
1016
+ "nucleusSchema": {
1017
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1018
+ "oneOf": [
1019
+ {
1020
+ "type": "null"
1021
+ },
1022
+ {
1023
+ "type": "boolean"
1024
+ },
1025
+ {
1026
+ "type": "number"
1027
+ },
1028
+ {
1029
+ "type": "string"
1030
+ },
1031
+ {
1032
+ "type": "array",
1033
+ "items": {
1034
+ "$ref": "#/$defs/JsonData"
1035
+ }
1036
+ },
1037
+ {
1038
+ "type": "object",
1039
+ "additionalProperties": {
1040
+ "$ref": "#/$defs/JsonData"
1041
+ }
1042
+ }
1043
+ ]
1044
+ }
1045
+ },
1046
+ "Nucleus": {
1047
+ "identity": "TYPE-Nucleus",
1048
+ "name": "Nucleus",
1049
+ "description": "dummy-description",
1050
+ "nucleusSchema": {
1051
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1052
+ "type": "object",
1053
+ "additionalProperties": {
1054
+ "$ref": "#/$defs/JsonData"
1055
+ }
1056
+ }
1057
+ },
1058
+ "NucleusFacet": {
1059
+ "identity": "TYPE-NucleusFacet",
1060
+ "name": "NucleusFacet",
1061
+ "description": "dummy-description",
1062
+ "nucleusSchema": {
1063
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1064
+ "type": "object",
1065
+ "required": [
1066
+ "nucleus"
1067
+ ],
1068
+ "properties": {
1069
+ "nucleus": true
1070
+ }
1071
+ }
1072
+ },
1073
+ "Resource": {
1074
+ "identity": "TYPE-Resource",
1075
+ "name": "Resource",
1076
+ "description": "dummy-description",
1077
+ "nucleusSchema": {
1078
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1079
+ "type": "object",
1080
+ "allOf": [
1081
+ {
1082
+ "$ref": "#/$defs/ShellMaterializedBase"
1083
+ },
1084
+ {
1085
+ "$comment": "This will be overlayed dynamically to match the data structure of the underlying ResourceType's nucleusSchema.",
1086
+ "$ref": "#/$defs/NucleusFacet"
1087
+ }
1088
+ ],
1089
+ "unevaluatedProperties": false
1090
+ }
1091
+ },
1092
+ "JobStepSocket": {
1093
+ "identity": "TYPE-JobStepSocket",
1094
+ "name": "JobStepSocket",
1095
+ "description": "dummy-description",
1096
+ "nucleusSchema": {
1097
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1098
+ "type": "object",
1099
+ "propertyNames": {
1100
+ "$ref": "#/$defs/ResourceRoleIdentity"
1101
+ },
1102
+ "additionalProperties": {
1103
+ "oneOf": [
1104
+ {
1105
+ "$ref": "#/$defs/ResourcePotential"
1106
+ },
1107
+ {
1108
+ "$ref": "#/$defs/Resource"
1109
+ }
1110
+ ]
1111
+ }
1112
+ }
1113
+ },
1114
+ "StrategyState": {
1115
+ "identity": "TYPE-StrategyState",
1116
+ "name": "StrategyState",
1117
+ "description": "dummy-description",
1118
+ "nucleusSchema": {
1119
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1120
+ "type": "object",
1121
+ "propertyNames": {
1122
+ "$ref": "#/$defs/JobStepIdentity"
1123
+ },
1124
+ "additionalProperties": {
1125
+ "$ref": "#/$defs/JobStepSocket"
1126
+ }
1127
+ }
1128
+ },
1129
+ "StrategyStateFacet": {
1130
+ "identity": "TYPE-StrategyStateFacet",
1131
+ "name": "StrategyStateFacet",
1132
+ "description": "dummy-description",
1133
+ "nucleusSchema": {
1134
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1135
+ "type": "object",
1136
+ "required": [
1137
+ "strategyState"
1138
+ ],
1139
+ "properties": {
1140
+ "strategyState": {
1141
+ "$ref": "#/$defs/StrategyState"
1142
+ }
1143
+ }
1144
+ }
1145
+ },
1146
+ "StepArray": {
1147
+ "identity": "TYPE-StepArray",
1148
+ "name": "StepArray",
1149
+ "description": "dummy-description",
1150
+ "nucleusSchema": {
1151
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1152
+ "type": "array",
1153
+ "items": {
1154
+ "$ref": "#/$defs/Step"
1155
+ },
1156
+ "uniqueItems": true
1157
+ }
1158
+ },
1159
+ "StepsFacet": {
1160
+ "identity": "TYPE-StepsFacet",
1161
+ "name": "StepsFacet",
1162
+ "description": "dummy-description",
1163
+ "nucleusSchema": {
1164
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1165
+ "type": "object",
1166
+ "required": [
1167
+ "steps"
1168
+ ],
1169
+ "properties": {
1170
+ "steps": {
1171
+ "$ref": "#/$defs/StepArray"
1172
+ }
1173
+ }
1174
+ }
1175
+ },
1176
+ "RawStrategy": {
1177
+ "identity": "TYPE-RawStrategy",
1178
+ "name": "RawStrategy",
1179
+ "description": "dummy-description",
1180
+ "nucleusSchema": {
1181
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1182
+ "type": "object",
1183
+ "allOf": [
1184
+ {
1185
+ "$ref": "#/$defs/StepsFacet"
1186
+ },
1187
+ {
1188
+ "$ref": "#/$defs/StrategyStateFacet"
1189
+ }
1190
+ ],
1191
+ "unevaluatedProperties": false
1192
+ }
1193
+ },
1194
+ "RunnableStrategyIdentity": {
1195
+ "identity": "TYPE-RunnableStrategyIdentity",
1196
+ "name": "RunnableStrategyIdentity",
1197
+ "description": "dummy-description",
1198
+ "nucleusSchema": {
1199
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1200
+ "type": "string",
1201
+ "pattern": "^RUNNABLE_STRATEGY-.+$"
1202
+ }
1203
+ },
1204
+ "RunnableStrategyStatus": {
1205
+ "identity": "TYPE-RunnableStrategyStatus",
1206
+ "name": "RunnableStrategyStatus",
1207
+ "description": "dummy-description",
1208
+ "nucleusSchema": {
1209
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1210
+ "type": "string",
1211
+ "enum": [
1212
+ "pending",
1213
+ "running",
1214
+ "completed",
1215
+ "failed",
1216
+ "cancelled"
1217
+ ]
1218
+ }
1219
+ },
1220
+ "RunnableStrategyContext": {
1221
+ "identity": "TYPE-RunnableStrategyContext",
1222
+ "name": "RunnableStrategyContext",
1223
+ "description": "dummy-description",
1224
+ "nucleusSchema": {
1225
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1226
+ "type": "object",
1227
+ "required": [
1228
+ "status"
1229
+ ],
1230
+ "properties": {
1231
+ "status": {
1232
+ "$ref": "#/$defs/RunnableStrategyStatus"
1233
+ },
1234
+ "startedAt": {
1235
+ "$ref": "#/$defs/Timestamp"
1236
+ },
1237
+ "completedAt": {
1238
+ "$ref": "#/$defs/Timestamp"
1239
+ }
1240
+ },
1241
+ "unevaluatedProperties": false
1242
+ }
1243
+ },
1244
+ "StrategyThreadIdentity": {
1245
+ "identity": "TYPE-StrategyThreadIdentity",
1246
+ "name": "StrategyThreadIdentity",
1247
+ "description": "dummy-description",
1248
+ "nucleusSchema": {
1249
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1250
+ "type": "string",
1251
+ "pattern": "^STRATEGY_THREAD-.+$"
1252
+ }
1253
+ },
1254
+ "StrategyThreadMap": {
1255
+ "identity": "TYPE-StrategyThreadMap",
1256
+ "name": "StrategyThreadMap",
1257
+ "description": "dummy-description",
1258
+ "nucleusSchema": {
1259
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1260
+ "type": "object",
1261
+ "propertyNames": {
1262
+ "$ref": "#/$defs/StrategyThreadIdentity"
1263
+ },
1264
+ "additionalProperties": {
1265
+ "$ref": "#/$defs/StepArray"
1266
+ },
1267
+ "$comment": "Each thread contains an array of steps, allowing for sequential execution within a thread while supporting parallel execution across multiple threads."
1268
+ }
1269
+ },
1270
+ "StrategyThreadMapFacet": {
1271
+ "identity": "TYPE-StrategyThreadMapFacet",
1272
+ "name": "StrategyThreadMapFacet",
1273
+ "description": "dummy-description",
1274
+ "nucleusSchema": {
1275
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1276
+ "type": "object",
1277
+ "required": [
1278
+ "strategyThreadMap"
1279
+ ],
1280
+ "properties": {
1281
+ "strategyThreadMap": {
1282
+ "$ref": "#/$defs/StrategyThreadMap"
1283
+ }
1284
+ }
1285
+ }
1286
+ },
1287
+ "RunnableStrategy": {
1288
+ "identity": "TYPE-RunnableStrategy",
1289
+ "name": "RunnableStrategy",
1290
+ "description": "dummy-description",
1291
+ "nucleusSchema": {
1292
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1293
+ "type": "object",
1294
+ "required": [
1295
+ "identity",
1296
+ "runnableStrategyContext"
1297
+ ],
1298
+ "properties": {
1299
+ "identity": {
1300
+ "$ref": "#/$defs/RunnableStrategyIdentity"
1301
+ },
1302
+ "runnableStrategyContext": {
1303
+ "$ref": "#/$defs/RunnableStrategyContext"
1304
+ }
1305
+ },
1306
+ "allOf": [
1307
+ {
1308
+ "$comment": "The Engine runs jobs specified by steps in strategyThreadMap. The Engine also injects repeted steps when encountering loops.",
1309
+ "$ref": "#/$defs/StrategyThreadMapFacet"
1310
+ },
1311
+ {
1312
+ "$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.",
1313
+ "$ref": "#/$defs/StrategyStateFacet"
1314
+ }
1315
+ ],
1316
+ "unevaluatedProperties": false
1317
+ }
1318
+ },
1319
+ "StrategyStateDelta": {
1320
+ "identity": "TYPE-StrategyStateDelta",
1321
+ "name": "StrategyStateDelta",
1322
+ "description": "dummy-description",
1323
+ "nucleusSchema": {
1324
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1325
+ "type": "object",
1326
+ "required": [
1327
+ "strategyStateUpdate"
1328
+ ],
1329
+ "properties": {
1330
+ "strategyStateUpdate": {
1331
+ "$ref": "#/$defs/StrategyState"
1332
+ }
1333
+ }
1334
+ }
1335
+ },
1336
+ "RunnableStrategyUpdate": {
1337
+ "identity": "TYPE-RunnableStrategyUpdate",
1338
+ "name": "RunnableStrategyUpdate",
1339
+ "description": "dummy-description",
1340
+ "nucleusSchema": {
1341
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1342
+ "type": "object",
1343
+ "required": [
1344
+ "runnableStrategyHandle"
1345
+ ],
1346
+ "properties": {
1347
+ "runnableStrategyHandle": {
1348
+ "$ref": "#/$defs/RunnableStrategyIdentity"
1349
+ }
1350
+ },
1351
+ "allOf": [
1352
+ {
1353
+ "$ref": "#/$defs/StrategyStateDelta"
1354
+ }
1355
+ ],
1356
+ "unevaluatedProperties": false
1357
+ }
1358
+ },
1359
+ "RunEventCounters": {
1360
+ "identity": "TYPE-RunEventCounters",
1361
+ "name": "RunEventCounters",
1362
+ "description": "dummy-description",
1363
+ "nucleusSchema": {
1364
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1365
+ "type": "object",
1366
+ "properties": {
1367
+ "stepCounterAfter": {
1368
+ "type": "integer"
1369
+ },
1370
+ "iterationCounterAfter": {
1371
+ "type": "integer"
1372
+ }
1373
+ }
1374
+ }
1375
+ },
1376
+ "RunEventStepMetadata": {
1377
+ "identity": "TYPE-RunEventStepMetadata",
1378
+ "name": "RunEventStepMetadata",
1379
+ "description": "dummy-description",
1380
+ "nucleusSchema": {
1381
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1382
+ "type": "object",
1383
+ "required": [
1384
+ "stepHandle",
1385
+ "stepKind",
1386
+ "threadStepIndex"
1387
+ ],
1388
+ "properties": {
1389
+ "stepHandle": {
1390
+ "$ref": "#/$defs/StepIdentity"
1391
+ },
1392
+ "stepKind": {
1393
+ "$ref": "#/$defs/StepKind"
1394
+ },
1395
+ "threadStepIndex": {
1396
+ "type": "integer"
1397
+ }
1398
+ }
1399
+ }
1400
+ },
1401
+ "RunEventUpdates": {
1402
+ "identity": "TYPE-RunEventUpdates",
1403
+ "name": "RunEventUpdates",
1404
+ "description": "dummy-description",
1405
+ "nucleusSchema": {
1406
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1407
+ "type": "object",
1408
+ "properties": {
1409
+ "stepsMutation": {
1410
+ "type": "object",
1411
+ "required": [
1412
+ "insertAt",
1413
+ "inserted"
1414
+ ],
1415
+ "properties": {
1416
+ "insertAt": {
1417
+ "type": "integer"
1418
+ },
1419
+ "inserted": {
1420
+ "$ref": "#/$defs/StepArray"
1421
+ }
1422
+ }
1423
+ },
1424
+ "interruptData": {
1425
+ "$comment": "Kept permissive; the engine may evolve interrupt payloads.",
1426
+ "type": [
1427
+ "object",
1428
+ "null"
1429
+ ]
1430
+ }
1431
+ },
1432
+ "allOf": [
1433
+ {
1434
+ "$ref": "#/$defs/StrategyStateDelta"
1435
+ }
1436
+ ]
1437
+ }
1438
+ },
1439
+ "RunEventKind": {
1440
+ "identity": "TYPE-RunEventKind",
1441
+ "name": "RunEventKind",
1442
+ "description": "dummy-description",
1443
+ "nucleusSchema": {
1444
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1445
+ "type": "string",
1446
+ "enum": [
1447
+ "graph_start",
1448
+ "tick",
1449
+ "interrupt",
1450
+ "graph_end"
1451
+ ]
1452
+ }
1453
+ },
1454
+ "RunEventBase": {
1455
+ "identity": "TYPE-RunEventBase",
1456
+ "name": "RunEventBase",
1457
+ "description": "dummy-description",
1458
+ "nucleusSchema": {
1459
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1460
+ "type": "object",
1461
+ "required": [
1462
+ "runEventKind",
1463
+ "runnableStrategyHandle",
1464
+ "strategyThreadHandle",
1465
+ "createdAt",
1466
+ "nodeName",
1467
+ "eventSeq"
1468
+ ],
1469
+ "properties": {
1470
+ "runEventKind": {
1471
+ "$ref": "#/$defs/RunEventKind"
1472
+ },
1473
+ "runnableStrategyHandle": {
1474
+ "$ref": "#/$defs/RunnableStrategyIdentity"
1475
+ },
1476
+ "strategyThreadHandle": {
1477
+ "$ref": "#/$defs/StrategyThreadIdentity"
1478
+ },
1479
+ "createdAt": {
1480
+ "$ref": "#/$defs/Timestamp"
1481
+ },
1482
+ "nodeName": {
1483
+ "type": "string"
1484
+ },
1485
+ "eventSeq": {
1486
+ "type": "integer"
1487
+ },
1488
+ "counters": {
1489
+ "$ref": "#/$defs/RunEventCounters"
1490
+ },
1491
+ "stepMetadata": {
1492
+ "$ref": "#/$defs/RunEventStepMetadata"
1493
+ },
1494
+ "updates": {
1495
+ "$ref": "#/$defs/RunEventUpdates"
1496
+ }
1497
+ }
1498
+ }
1499
+ },
1500
+ "GraphStartRunEvent": {
1501
+ "identity": "TYPE-GraphStartRunEvent",
1502
+ "name": "GraphStartRunEvent",
1503
+ "description": "dummy-description",
1504
+ "nucleusSchema": {
1505
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1506
+ "allOf": [
1507
+ {
1508
+ "$ref": "#/$defs/RunEventBase"
1509
+ },
1510
+ {
1511
+ "type": "object",
1512
+ "required": [
1513
+ "runnableStrategySeed"
1514
+ ],
1515
+ "properties": {
1516
+ "runEventKind": {
1517
+ "const": "graph_start"
1518
+ },
1519
+ "runnableStrategySeed": {
1520
+ "$ref": "#/$defs/RunnableStrategy"
1521
+ }
1522
+ }
1523
+ }
1524
+ ]
1525
+ }
1526
+ },
1527
+ "TickRunEvent": {
1528
+ "identity": "TYPE-TickRunEvent",
1529
+ "name": "TickRunEvent",
1530
+ "description": "dummy-description",
1531
+ "nucleusSchema": {
1532
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1533
+ "allOf": [
1534
+ {
1535
+ "$ref": "#/$defs/RunEventBase"
1536
+ },
1537
+ {
1538
+ "type": "object",
1539
+ "properties": {
1540
+ "runEventKind": {
1541
+ "const": "tick"
1542
+ }
1543
+ }
1544
+ }
1545
+ ]
1546
+ }
1547
+ },
1548
+ "InterruptRunEvent": {
1549
+ "identity": "TYPE-InterruptRunEvent",
1550
+ "name": "InterruptRunEvent",
1551
+ "description": "dummy-description",
1552
+ "nucleusSchema": {
1553
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1554
+ "allOf": [
1555
+ {
1556
+ "$ref": "#/$defs/RunEventBase"
1557
+ },
1558
+ {
1559
+ "type": "object",
1560
+ "properties": {
1561
+ "runEventKind": {
1562
+ "const": "interrupt"
1563
+ }
1564
+ }
1565
+ }
1566
+ ]
1567
+ }
1568
+ },
1569
+ "GraphEndRunEvent": {
1570
+ "identity": "TYPE-GraphEndRunEvent",
1571
+ "name": "GraphEndRunEvent",
1572
+ "description": "dummy-description",
1573
+ "nucleusSchema": {
1574
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1575
+ "allOf": [
1576
+ {
1577
+ "$ref": "#/$defs/RunEventBase"
1578
+ },
1579
+ {
1580
+ "type": "object",
1581
+ "properties": {
1582
+ "runEventKind": {
1583
+ "const": "graph_end"
1584
+ }
1585
+ }
1586
+ }
1587
+ ]
1588
+ }
1589
+ },
1590
+ "RunEvent": {
1591
+ "identity": "TYPE-RunEvent",
1592
+ "name": "RunEvent",
1593
+ "description": "dummy-description",
1594
+ "nucleusSchema": {
1595
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1596
+ "type": "object",
1597
+ "oneOf": [
1598
+ {
1599
+ "$ref": "#/$defs/GraphStartRunEvent"
1600
+ },
1601
+ {
1602
+ "$ref": "#/$defs/TickRunEvent"
1603
+ },
1604
+ {
1605
+ "$ref": "#/$defs/InterruptRunEvent"
1606
+ },
1607
+ {
1608
+ "$ref": "#/$defs/GraphEndRunEvent"
1609
+ }
1610
+ ]
1611
+ }
1612
+ },
1613
+ "StrategyRunIdentity": {
1614
+ "identity": "TYPE-StrategyRunIdentity",
1615
+ "name": "StrategyRunIdentity",
1616
+ "description": "dummy-description",
1617
+ "nucleusSchema": {
1618
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1619
+ "type": "string",
1620
+ "pattern": "^STRATEGY_RUN-.+$"
1621
+ }
1622
+ },
1623
+ "StrategyRun": {
1624
+ "identity": "TYPE-StrategyRun",
1625
+ "name": "StrategyRun",
1626
+ "description": "dummy-description",
1627
+ "nucleusSchema": {
1628
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1629
+ "type": "object",
1630
+ "required": [
1631
+ "identity",
1632
+ "runnableStrategyHandle",
1633
+ "recordedAt",
1634
+ "runEvents"
1635
+ ],
1636
+ "properties": {
1637
+ "identity": {
1638
+ "$ref": "#/$defs/StrategyRunIdentity"
1639
+ },
1640
+ "runnableStrategyHandle": {
1641
+ "$comment": "Could be derived from the first event but useful for indexing.",
1642
+ "$ref": "#/$defs/RunnableStrategyIdentity"
1643
+ },
1644
+ "recordedAt": {
1645
+ "$ref": "#/$defs/Timestamp"
1646
+ },
1647
+ "runEvents": {
1648
+ "type": "array",
1649
+ "items": {
1650
+ "$ref": "#/$defs/RunEvent"
1651
+ }
1652
+ }
1653
+ },
1654
+ "unevaluatedProperties": false
1655
+ }
1656
+ },
1657
+ "GoalIdentity": {
1658
+ "identity": "TYPE-GoalIdentity",
1659
+ "name": "GoalIdentity",
1660
+ "description": "dummy-description",
1661
+ "nucleusSchema": {
1662
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1663
+ "type": "string",
1664
+ "pattern": "^GOAL-.+$"
1665
+ }
1666
+ },
1667
+ "Goal": {
1668
+ "identity": "TYPE-Goal",
1669
+ "name": "Goal",
1670
+ "description": "dummy-description",
1671
+ "nucleusSchema": {
1672
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1673
+ "type": "object",
1674
+ "required": [
1675
+ "identity",
1676
+ "target"
1677
+ ],
1678
+ "properties": {
1679
+ "identity": {
1680
+ "$ref": "#/$defs/GoalIdentity"
1681
+ },
1682
+ "target": {
1683
+ "type": "integer",
1684
+ "minimum": 0
1685
+ },
1686
+ "disallowedJobs": {
1687
+ "type": "array",
1688
+ "items": {
1689
+ "$ref": "#/$defs/JobIdentity"
1690
+ }
1691
+ },
1692
+ "disallowedSequences": {
1693
+ "type": "array",
1694
+ "items": {
1695
+ "type": "array",
1696
+ "items": {
1697
+ "$ref": "#/$defs/JobIdentity"
1698
+ }
1699
+ }
1700
+ },
1701
+ "minSteps": {
1702
+ "type": "integer",
1703
+ "minimum": 1
1704
+ },
1705
+ "maxSteps": {
1706
+ "type": "integer",
1707
+ "minimum": 1
1708
+ }
1709
+ },
1710
+ "unevaluatedProperties": false
1711
+ }
1712
+ },
1713
+ "Natural": {
1714
+ "identity": "TYPE-Natural",
1715
+ "name": "Natural",
1716
+ "description": "dummy-description",
1717
+ "nucleusSchema": {
1718
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1719
+ "type": "object",
1720
+ "required": [
1721
+ "identity"
1722
+ ],
1723
+ "properties": {
1724
+ "identity": {
1725
+ "$ref": "#/$defs/NaturalIdentity"
1726
+ }
1727
+ },
1728
+ "$defs": {
1729
+ "NaturalIdentity": {
1730
+ "type": "integer"
1731
+ }
1732
+ },
1733
+ "additionalProperties": false
1734
+ }
1735
+ },
1736
+ "Boolean": {
1737
+ "identity": "TYPE-Boolean",
1738
+ "name": "Boolean",
1739
+ "description": "dummy-description",
1740
+ "nucleusSchema": {
1741
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1742
+ "type": "object",
1743
+ "required": [
1744
+ "identity"
1745
+ ],
1746
+ "properties": {
1747
+ "identity": {
1748
+ "$ref": "#/$defs/BooleanIdentity"
1749
+ }
1750
+ },
1751
+ "$defs": {
1752
+ "BooleanIdentity": {
1753
+ "type": "boolean"
1754
+ }
1755
+ },
1756
+ "additionalProperties": false
1757
+ }
1758
+ }
1759
+ }
1760
+ }
1747
1761
  }