@toolproof-core/schema 1.0.10 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/dist/generated/artifacts/constants.d.ts +4 -3
  2. package/dist/generated/artifacts/constants.js +4 -3
  3. package/dist/generated/normalized/Genesis.json +50 -25
  4. package/dist/generated/resources/Genesis.json +68 -31
  5. package/dist/generated/schemas/Genesis.json +38 -19
  6. package/dist/generated/schemas/standalone/Job.json +7 -8
  7. package/dist/generated/schemas/standalone/ResourceType.json +4 -4
  8. package/dist/generated/schemas/standalone/RunnableStrategy.json +7 -7
  9. package/dist/generated/schemas/standalone/StrategyRun.json +7 -7
  10. package/dist/generated/types/standalone/Resource_Genesis.d.ts +1 -1
  11. package/dist/generated/types/standalone/Resource_Job.d.ts +1 -1
  12. package/dist/generated/types/standalone/Resource_RawStrategy.d.ts +1 -1
  13. package/dist/generated/types/standalone/Resource_ResourceType.d.ts +1 -1
  14. package/dist/generated/types/standalone/Resource_RunnableStrategy.d.ts +1 -1
  15. package/dist/generated/types/types.d.ts +229 -221
  16. package/dist/index.d.ts +1 -1
  17. package/dist/scripts/generateStandaloneType.js +2 -1
  18. package/dist/scripts/generateTypes.js +136 -3
  19. package/package.json +1 -1
  20. package/src/Genesis.json +54 -28
  21. package/src/generated/artifacts/constants.ts +4 -3
  22. package/src/generated/artifacts/dependencyMap.json +10 -6
  23. package/src/generated/artifacts/terminals.json +1 -0
  24. package/src/generated/normalized/Genesis.json +1785 -1760
  25. package/src/generated/resources/Genesis.json +2833 -2796
  26. package/src/generated/schemas/Genesis.json +1348 -1329
  27. package/src/generated/schemas/standalone/Job.json +7 -8
  28. package/src/generated/schemas/standalone/RawStrategy.json +580 -580
  29. package/src/generated/schemas/standalone/ResourceType.json +4 -4
  30. package/src/generated/schemas/standalone/RunnableStrategy.json +645 -645
  31. package/src/generated/schemas/standalone/StrategyRun.json +913 -913
  32. package/src/generated/types/standalone/Resource_Genesis.d.ts +1 -1
  33. package/src/generated/types/standalone/Resource_Job.d.ts +1 -1
  34. package/src/generated/types/standalone/Resource_RawStrategy.d.ts +1 -1
  35. package/src/generated/types/standalone/Resource_ResourceType.d.ts +1 -1
  36. package/src/generated/types/standalone/Resource_RunnableStrategy.d.ts +1 -1
  37. package/src/generated/types/types.d.ts +717 -709
  38. package/src/index.ts +48 -45
  39. package/src/scripts/generateStandaloneType.ts +3 -1
  40. package/src/scripts/generateTypes.ts +151 -5
@@ -1,1330 +1,1349 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$comment": "This file defines all schemas used internally by ToolProof.",
4
- "$id": "https://schemas.toolproof.com/v1/Genesis.json",
5
- "$defs": {
6
- "Name": {
7
- "$schema": "https://json-schema.org/draft/2020-12/schema",
8
- "type": "string",
9
- "minLength": 1,
10
- "pattern": "^(?:[A-Z][^0-9]*|[a-z]+/[a-z.+&-]+)$",
11
- "$comment": "Validation is intercepted by an AI Agent that verifies the name against Toolproof's naming conventions.",
12
- "semanticValidation": "Ajv custom keyword to verify name."
13
- },
14
- "NameFacet": {
15
- "$schema": "https://json-schema.org/draft/2020-12/schema",
16
- "type": "object",
17
- "required": [
18
- "name"
19
- ],
20
- "properties": {
21
- "name": {
22
- "$ref": "#/$defs/Name"
23
- }
24
- }
25
- },
26
- "Description": {
27
- "$schema": "https://json-schema.org/draft/2020-12/schema",
28
- "type": "string",
29
- "minLength": 1,
30
- "$comment": "Validation is intercepted by an AI Agent that verifies the description against Toolproof's documentation standards.",
31
- "semanticValidation": "Ajv custom keyword to verify description."
32
- },
33
- "DescriptionFacet": {
34
- "$schema": "https://json-schema.org/draft/2020-12/schema",
35
- "type": "object",
36
- "required": [
37
- "description"
38
- ],
39
- "properties": {
40
- "description": {
41
- "$ref": "#/$defs/Description"
42
- }
43
- }
44
- },
45
- "DocumentationFacet": {
46
- "$schema": "https://json-schema.org/draft/2020-12/schema",
47
- "type": "object",
48
- "allOf": [
49
- {
50
- "$ref": "#/$defs/NameFacet"
51
- },
52
- {
53
- "$ref": "#/$defs/DescriptionFacet"
54
- }
55
- ]
56
- },
57
- "Uri": {
58
- "$schema": "https://json-schema.org/draft/2020-12/schema",
59
- "type": "string",
60
- "format": "uri"
61
- },
62
- "ResourceTypeIdentity": {
63
- "$schema": "https://json-schema.org/draft/2020-12/schema",
64
- "type": "string",
65
- "pattern": "^TYPE-.+$"
66
- },
67
- "ResourceType": {
68
- "$schema": "https://json-schema.org/draft/2020-12/schema",
69
- "type": "object",
70
- "required": [
71
- "identity",
72
- "nucleusSchema"
73
- ],
74
- "properties": {
75
- "identity": {
76
- "$ref": "#/$defs/ResourceTypeIdentity"
77
- },
78
- "nucleusSchema": true,
79
- "embeddingUriMap": {
80
- "type": "object",
81
- "propertyNames": {
82
- "type": "string",
83
- "pattern": "^EMBEDDING-.+$"
84
- },
85
- "additionalProperties": {
86
- "$ref": "#/$defs/Uri"
87
- },
88
- "minProperties": 1,
89
- "$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."
90
- },
91
- "generatorUriMap": {
92
- "type": "object",
93
- "propertyNames": {
94
- "type": "string",
95
- "pattern": "^GENERATOR-.+$"
96
- },
97
- "additionalProperties": {
98
- "$ref": "#/$defs/Uri"
99
- },
100
- "minProperties": 1,
101
- "$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."
102
- }
103
- },
104
- "allOf": [
105
- {
106
- "$ref": "#/$defs/DocumentationFacet"
107
- }
108
- ]
109
- },
110
- "ResourceRoleIdentity": {
111
- "$schema": "https://json-schema.org/draft/2020-12/schema",
112
- "type": "string",
113
- "pattern": "^ROLE-.+$"
114
- },
115
- "ResourceRoleValue": {
116
- "$schema": "https://json-schema.org/draft/2020-12/schema",
117
- "type": "object",
118
- "allOf": [
119
- {
120
- "$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).",
121
- "required": [
122
- "resourceTypeHandle"
123
- ],
124
- "properties": {
125
- "resourceTypeHandle": {
126
- "$ref": "#/$defs/ResourceTypeIdentity"
127
- }
128
- }
129
- },
130
- {
131
- "$ref": "#/$defs/DocumentationFacet"
132
- }
133
- ]
134
- },
135
- "RoleMap": {
136
- "$schema": "https://json-schema.org/draft/2020-12/schema",
137
- "type": "object",
138
- "propertyNames": {
139
- "$ref": "#/$defs/ResourceRoleIdentity"
140
- },
141
- "additionalProperties": {
142
- "$ref": "#/$defs/ResourceRoleValue"
143
- }
144
- },
145
- "Error": {
146
- "$schema": "https://json-schema.org/draft/2020-12/schema",
147
- "type": "object",
148
- "allOf": [
149
- {
150
- "$ref": "#/$defs/DocumentationFacet"
151
- },
152
- {
153
- "properties": {
154
- "details": {
155
- "type": "object"
156
- }
157
- }
158
- }
159
- ],
160
- "unevaluatedProperties": false
161
- },
162
- "Roles": {
163
- "$schema": "https://json-schema.org/draft/2020-12/schema",
164
- "type": "object",
165
- "required": [
166
- "inputMap",
167
- "outputMap"
168
- ],
169
- "properties": {
170
- "inputMap": {
171
- "$ref": "#/$defs/RoleMap"
172
- },
173
- "outputMap": {
174
- "allOf": [
175
- {
176
- "$ref": "#/$defs/RoleMap"
177
- },
178
- {
179
- "type": "object",
180
- "required": [
181
- "ROLE-ErrorOutput"
182
- ],
183
- "properties": {
184
- "ROLE-ErrorOutput": {
185
- "type": "object",
186
- "allOf": [
187
- {
188
- "$ref": "#/$defs/ResourceRoleValue"
189
- },
190
- {
191
- "required": [
192
- "resourceTypeHandle",
193
- "name",
194
- "description"
195
- ],
196
- "properties": {
197
- "resourceTypeHandle": {
198
- "const": "TYPE-Error"
199
- },
200
- "name": {
201
- "const": "ErrorOutput"
202
- },
203
- "description": {
204
- "const": "Represents error outputs from job runs."
205
- }
206
- }
207
- }
208
- ]
209
- }
210
- }
211
- }
212
- ]
213
- }
214
- },
215
- "unevaluatedProperties": false
216
- },
217
- "RolesFacet": {
218
- "$schema": "https://json-schema.org/draft/2020-12/schema",
219
- "type": "object",
220
- "required": [
221
- "roles"
222
- ],
223
- "properties": {
224
- "roles": {
225
- "$ref": "#/$defs/Roles"
226
- }
227
- }
228
- },
229
- "JobIdentity": {
230
- "$schema": "https://json-schema.org/draft/2020-12/schema",
231
- "type": "string",
232
- "pattern": "^JOB-.+$"
233
- },
234
- "Job": {
235
- "$schema": "https://json-schema.org/draft/2020-12/schema",
236
- "type": "object",
237
- "required": [
238
- "identity",
239
- "implementationUri"
240
- ],
241
- "properties": {
242
- "identity": {
243
- "$ref": "#/$defs/JobIdentity"
244
- },
245
- "implementationUri": {
246
- "$comment": "Instances of a ResourceType that requires implementationUri are 'executable' ResourceTypes. TYPE-Job is the canonical executable ResourceType in the ecosystem.",
247
- "$ref": "#/$defs/Uri"
248
- }
249
- },
250
- "allOf": [
251
- {
252
- "$ref": "#/$defs/DocumentationFacet"
253
- },
254
- {
255
- "$ref": "#/$defs/RolesFacet"
256
- }
257
- ],
258
- "unevaluatedProperties": false
259
- },
260
- "RoleBindingArray": {
261
- "$schema": "https://json-schema.org/draft/2020-12/schema",
262
- "type": "array",
263
- "items": {
264
- "$ref": "#/$defs/ResourceRoleIdentity"
265
- }
266
- },
267
- "RoleBindings": {
268
- "$schema": "https://json-schema.org/draft/2020-12/schema",
269
- "type": "object",
270
- "required": [
271
- "inputBindings",
272
- "outputBindings"
273
- ],
274
- "properties": {
275
- "inputBindings": {
276
- "$ref": "#/$defs/RoleBindingArray"
277
- },
278
- "outputBindings": {
279
- "$ref": "#/$defs/RoleBindingArray"
280
- }
281
- }
282
- },
283
- "RoleBindingsFacet": {
284
- "$schema": "https://json-schema.org/draft/2020-12/schema",
285
- "type": "object",
286
- "required": [
287
- "roleBindings"
288
- ],
289
- "properties": {
290
- "roleBindings": {
291
- "$ref": "#/$defs/RoleBindings"
292
- }
293
- }
294
- },
295
- "StepKind": {
296
- "$schema": "https://json-schema.org/draft/2020-12/schema",
297
- "type": "string",
298
- "enum": [
299
- "job",
300
- "branch",
301
- "while",
302
- "for"
303
- ]
304
- },
305
- "StepKindFacet": {
306
- "$schema": "https://json-schema.org/draft/2020-12/schema",
307
- "type": "object",
308
- "required": [
309
- "stepKind"
310
- ],
311
- "properties": {
312
- "stepKind": {
313
- "$ref": "#/$defs/StepKind"
314
- }
315
- }
316
- },
317
- "JobStepIdentity": {
318
- "$schema": "https://json-schema.org/draft/2020-12/schema",
319
- "type": "string",
320
- "pattern": "^JOB_STEP-.+$"
321
- },
322
- "JobStep": {
323
- "$schema": "https://json-schema.org/draft/2020-12/schema",
324
- "type": "object",
325
- "required": [
326
- "identity",
327
- "stepKind",
328
- "jobHandle"
329
- ],
330
- "properties": {
331
- "identity": {
332
- "$ref": "#/$defs/JobStepIdentity"
333
- },
334
- "stepKind": {
335
- "const": "job"
336
- },
337
- "jobHandle": {
338
- "$ref": "#/$defs/JobIdentity"
339
- }
340
- },
341
- "allOf": [
342
- {
343
- "$ref": "#/$defs/StepKindFacet"
344
- },
345
- {
346
- "$comment": "This will be overlayed dynamically to specify roleBindings corresponding to the roles of the underlying job.",
347
- "$ref": "#/$defs/RoleBindingsFacet"
348
- }
349
- ]
350
- },
351
- "Conditional": {
352
- "$schema": "https://json-schema.org/draft/2020-12/schema",
353
- "type": "object",
354
- "required": [
355
- "when",
356
- "what"
357
- ],
358
- "properties": {
359
- "when": {
360
- "$ref": "#/$defs/JobStep"
361
- },
362
- "what": {
363
- "$ref": "#/$defs/JobStep"
364
- }
365
- },
366
- "unevaluatedProperties": false
367
- },
368
- "BranchStepIdentity": {
369
- "$schema": "https://json-schema.org/draft/2020-12/schema",
370
- "type": "string",
371
- "pattern": "^BRANCH_STEP-.+$"
372
- },
373
- "BranchStep": {
374
- "$schema": "https://json-schema.org/draft/2020-12/schema",
375
- "type": "object",
376
- "required": [
377
- "identity",
378
- "stepKind",
379
- "cases"
380
- ],
381
- "properties": {
382
- "identity": {
383
- "$ref": "#/$defs/BranchStepIdentity"
384
- },
385
- "stepKind": {
386
- "const": "branch"
387
- },
388
- "cases": {
389
- "type": "array",
390
- "items": {
391
- "$ref": "#/$defs/Conditional"
392
- },
393
- "minItems": 1,
394
- "uniqueItems": true
395
- }
396
- },
397
- "allOf": [
398
- {
399
- "$ref": "#/$defs/StepKindFacet"
400
- }
401
- ]
402
- },
403
- "WhileStepIdentity": {
404
- "$schema": "https://json-schema.org/draft/2020-12/schema",
405
- "type": "string",
406
- "pattern": "^WHILE_STEP-.+$"
407
- },
408
- "WhileStep": {
409
- "$schema": "https://json-schema.org/draft/2020-12/schema",
410
- "type": "object",
411
- "required": [
412
- "identity",
413
- "stepKind",
414
- "case"
415
- ],
416
- "properties": {
417
- "identity": {
418
- "$ref": "#/$defs/WhileStepIdentity"
419
- },
420
- "stepKind": {
421
- "const": "while"
422
- },
423
- "case": {
424
- "$ref": "#/$defs/Conditional"
425
- }
426
- },
427
- "allOf": [
428
- {
429
- "$ref": "#/$defs/StepKindFacet"
430
- }
431
- ]
432
- },
433
- "ForStepIdentity": {
434
- "$schema": "https://json-schema.org/draft/2020-12/schema",
435
- "type": "string",
436
- "pattern": "^FOR_STEP-.+$"
437
- },
438
- "ForStep": {
439
- "$schema": "https://json-schema.org/draft/2020-12/schema",
440
- "type": "object",
441
- "required": [
442
- "identity",
443
- "stepKind",
444
- "case"
445
- ],
446
- "properties": {
447
- "identity": {
448
- "$ref": "#/$defs/ForStepIdentity"
449
- },
450
- "stepKind": {
451
- "const": "for"
452
- },
453
- "case": {
454
- "$ref": "#/$defs/Conditional"
455
- }
456
- },
457
- "allOf": [
458
- {
459
- "$ref": "#/$defs/StepKindFacet"
460
- }
461
- ]
462
- },
463
- "StepIdentity": {
464
- "$schema": "https://json-schema.org/draft/2020-12/schema",
465
- "type": "object",
466
- "oneOf": [
467
- {
468
- "$ref": "#/$defs/JobStepIdentity"
469
- },
470
- {
471
- "$ref": "#/$defs/BranchStepIdentity"
472
- },
473
- {
474
- "$ref": "#/$defs/WhileStepIdentity"
475
- },
476
- {
477
- "$ref": "#/$defs/ForStepIdentity"
478
- }
479
- ]
480
- },
481
- "Step": {
482
- "$schema": "https://json-schema.org/draft/2020-12/schema",
483
- "type": "object",
484
- "oneOf": [
485
- {
486
- "$ref": "#/$defs/JobStep"
487
- },
488
- {
489
- "$ref": "#/$defs/BranchStep"
490
- },
491
- {
492
- "$ref": "#/$defs/WhileStep"
493
- },
494
- {
495
- "$ref": "#/$defs/ForStep"
496
- }
497
- ],
498
- "unevaluatedProperties": false
499
- },
500
- "CreationContext": {
501
- "$schema": "https://json-schema.org/draft/2020-12/schema",
502
- "type": "object",
503
- "required": [
504
- "resourceRoleHandle",
505
- "jobStepHandle"
506
- ],
507
- "properties": {
508
- "resourceRoleHandle": {
509
- "$ref": "#/$defs/ResourceRoleIdentity"
510
- },
511
- "jobStepHandle": {
512
- "$ref": "#/$defs/JobStepIdentity"
513
- }
514
- }
515
- },
516
- "CreationContextFacet": {
517
- "$schema": "https://json-schema.org/draft/2020-12/schema",
518
- "type": "object",
519
- "required": [
520
- "creationContext"
521
- ],
522
- "properties": {
523
- "creationContext": {
524
- "$ref": "#/$defs/CreationContext"
525
- }
526
- }
527
- },
528
- "ResourceIdentity": {
529
- "$schema": "https://json-schema.org/draft/2020-12/schema",
530
- "type": "string",
531
- "pattern": "^RESOURCE-.+$"
532
- },
533
- "ResourceShellBase": {
534
- "$schema": "https://json-schema.org/draft/2020-12/schema",
535
- "type": "object",
536
- "required": [
537
- "identity",
538
- "resourceTypeHandle",
539
- "resourceShellKind"
540
- ],
541
- "properties": {
542
- "identity": {
543
- "$ref": "#/$defs/ResourceIdentity"
544
- },
545
- "resourceTypeHandle": {
546
- "$ref": "#/$defs/ResourceTypeIdentity"
547
- },
548
- "resourceShellKind": {
549
- "$ref": "#/$defs/ResourceShellKind"
550
- }
551
- }
552
- },
553
- "ResourceShellKind": {
554
- "$schema": "https://json-schema.org/draft/2020-12/schema",
555
- "type": "string",
556
- "enum": [
557
- "missing",
558
- "inputPotential",
559
- "outputPotential",
560
- "materialized"
561
- ]
562
- },
563
- "ResourceShellKindFacet": {
564
- "$schema": "https://json-schema.org/draft/2020-12/schema",
565
- "type": "object",
566
- "required": [
567
- "resourceShellKind"
568
- ],
569
- "properties": {
570
- "resourceShellKind": {
571
- "$ref": "#/$defs/ResourceShellKind"
572
- }
573
- }
574
- },
575
- "ShellMissing": {
576
- "$schema": "https://json-schema.org/draft/2020-12/schema",
577
- "type": "object",
578
- "required": [
579
- "resourceShellKind"
580
- ],
581
- "properties": {
582
- "resourceShellKind": {
583
- "const": "missing"
584
- }
585
- },
586
- "allOf": [
587
- {
588
- "$ref": "#/$defs/ResourceShellBase"
589
- },
590
- {
591
- "$ref": "#/$defs/ResourceShellKindFacet"
592
- }
593
- ],
594
- "unevaluatedProperties": false
595
- },
596
- "ShellInputPotential": {
597
- "$schema": "https://json-schema.org/draft/2020-12/schema",
598
- "type": "object",
599
- "required": [
600
- "resourceShellKind"
601
- ],
602
- "properties": {
603
- "resourceShellKind": {
604
- "const": "inputPotential"
605
- }
606
- },
607
- "allOf": [
608
- {
609
- "$ref": "#/$defs/ResourceShellBase"
610
- },
611
- {
612
- "$ref": "#/$defs/CreationContextFacet"
613
- },
614
- {
615
- "$ref": "#/$defs/ResourceShellKindFacet"
616
- }
617
- ],
618
- "unevaluatedProperties": false
619
- },
620
- "ShellOutputPotential": {
621
- "$schema": "https://json-schema.org/draft/2020-12/schema",
622
- "type": "object",
623
- "required": [
624
- "resourceShellKind"
625
- ],
626
- "properties": {
627
- "resourceShellKind": {
628
- "const": "outputPotential"
629
- }
630
- },
631
- "allOf": [
632
- {
633
- "$ref": "#/$defs/ResourceShellBase"
634
- },
635
- {
636
- "$ref": "#/$defs/CreationContextFacet"
637
- },
638
- {
639
- "$ref": "#/$defs/ResourceShellKindFacet"
640
- }
641
- ],
642
- "unevaluatedProperties": false
643
- },
644
- "Timestamp": {
645
- "$schema": "https://json-schema.org/draft/2020-12/schema",
646
- "type": "string",
647
- "format": "date-time"
648
- },
649
- "TimestampFacet": {
650
- "$schema": "https://json-schema.org/draft/2020-12/schema",
651
- "type": "object",
652
- "required": [
653
- "timestamp"
654
- ],
655
- "properties": {
656
- "timestamp": {
657
- "$ref": "#/$defs/Timestamp"
658
- }
659
- }
660
- },
661
- "Path": {
662
- "$schema": "https://json-schema.org/draft/2020-12/schema",
663
- "type": "string",
664
- "format": "uri-reference"
665
- },
666
- "PathFacet": {
667
- "$schema": "https://json-schema.org/draft/2020-12/schema",
668
- "type": "object",
669
- "required": [
670
- "path"
671
- ],
672
- "properties": {
673
- "path": {
674
- "$ref": "#/$defs/Path"
675
- }
676
- }
677
- },
678
- "ShellMaterializedBase": {
679
- "$schema": "https://json-schema.org/draft/2020-12/schema",
680
- "type": "object",
681
- "required": [
682
- "version",
683
- "resourceShellKind"
684
- ],
685
- "properties": {
686
- "version": {
687
- "const": 1
688
- },
689
- "resourceShellKind": {
690
- "const": "materialized"
691
- }
692
- },
693
- "allOf": [
694
- {
695
- "$ref": "#/$defs/ResourceShellBase"
696
- },
697
- {
698
- "$ref": "#/$defs/CreationContextFacet"
699
- },
700
- {
701
- "$ref": "#/$defs/ResourceShellKindFacet"
702
- },
703
- {
704
- "$ref": "#/$defs/TimestampFacet"
705
- },
706
- {
707
- "$ref": "#/$defs/PathFacet"
708
- }
709
- ]
710
- },
711
- "ShellMaterialized": {
712
- "$schema": "https://json-schema.org/draft/2020-12/schema",
713
- "type": "object",
714
- "$ref": "#/$defs/ShellMaterializedBase",
715
- "unevaluatedProperties": false
716
- },
717
- "ResourceMissing": {
718
- "$schema": "https://json-schema.org/draft/2020-12/schema",
719
- "type": "object",
720
- "$ref": "#/$defs/ShellMissing",
721
- "unevaluatedProperties": false
722
- },
723
- "ResourceInputPotential": {
724
- "$schema": "https://json-schema.org/draft/2020-12/schema",
725
- "type": "object",
726
- "$ref": "#/$defs/ShellInputPotential",
727
- "unevaluatedProperties": false
728
- },
729
- "ResourceOutputPotential": {
730
- "$schema": "https://json-schema.org/draft/2020-12/schema",
731
- "type": "object",
732
- "$ref": "#/$defs/ShellOutputPotential",
733
- "unevaluatedProperties": false
734
- },
735
- "ResourcePotential": {
736
- "$schema": "https://json-schema.org/draft/2020-12/schema",
737
- "type": "object",
738
- "oneOf": [
739
- {
740
- "$ref": "#/$defs/ResourceMissing"
741
- },
742
- {
743
- "$ref": "#/$defs/ResourceInputPotential"
744
- },
745
- {
746
- "$ref": "#/$defs/ResourceOutputPotential"
747
- }
748
- ],
749
- "unevaluatedProperties": false
750
- },
751
- "JsonData": {
752
- "$schema": "https://json-schema.org/draft/2020-12/schema",
753
- "oneOf": [
754
- {
755
- "type": "null"
756
- },
757
- {
758
- "type": "boolean"
759
- },
760
- {
761
- "type": "number"
762
- },
763
- {
764
- "type": "string"
765
- },
766
- {
767
- "type": "array",
768
- "items": {
769
- "$ref": "#/$defs/JsonData"
770
- }
771
- },
772
- {
773
- "type": "object",
774
- "additionalProperties": {
775
- "$ref": "#/$defs/JsonData"
776
- }
777
- }
778
- ]
779
- },
780
- "Nucleus": {
781
- "$schema": "https://json-schema.org/draft/2020-12/schema",
782
- "type": "object",
783
- "additionalProperties": {
784
- "$ref": "#/$defs/JsonData"
785
- }
786
- },
787
- "NucleusFacet": {
788
- "$schema": "https://json-schema.org/draft/2020-12/schema",
789
- "type": "object",
790
- "required": [
791
- "nucleus"
792
- ],
793
- "properties": {
794
- "nucleus": true
795
- }
796
- },
797
- "Resource": {
798
- "$schema": "https://json-schema.org/draft/2020-12/schema",
799
- "type": "object",
800
- "allOf": [
801
- {
802
- "$ref": "#/$defs/ShellMaterializedBase"
803
- },
804
- {
805
- "$comment": "This will be overlayed dynamically to match the data structure of the underlying ResourceType's nucleusSchema.",
806
- "$ref": "#/$defs/NucleusFacet"
807
- }
808
- ],
809
- "unevaluatedProperties": false
810
- },
811
- "JobStepSocket": {
812
- "$schema": "https://json-schema.org/draft/2020-12/schema",
813
- "type": "object",
814
- "propertyNames": {
815
- "$ref": "#/$defs/ResourceRoleIdentity"
816
- },
817
- "additionalProperties": {
818
- "oneOf": [
819
- {
820
- "$ref": "#/$defs/ResourcePotential"
821
- },
822
- {
823
- "$ref": "#/$defs/Resource"
824
- }
825
- ]
826
- }
827
- },
828
- "StrategyState": {
829
- "$schema": "https://json-schema.org/draft/2020-12/schema",
830
- "type": "object",
831
- "propertyNames": {
832
- "$ref": "#/$defs/JobStepIdentity"
833
- },
834
- "additionalProperties": {
835
- "$ref": "#/$defs/JobStepSocket"
836
- }
837
- },
838
- "StrategyStateFacet": {
839
- "$schema": "https://json-schema.org/draft/2020-12/schema",
840
- "type": "object",
841
- "required": [
842
- "strategyState"
843
- ],
844
- "properties": {
845
- "strategyState": {
846
- "$ref": "#/$defs/StrategyState"
847
- }
848
- }
849
- },
850
- "StepArray": {
851
- "$schema": "https://json-schema.org/draft/2020-12/schema",
852
- "type": "array",
853
- "items": {
854
- "$ref": "#/$defs/Step"
855
- },
856
- "uniqueItems": true
857
- },
858
- "StepsFacet": {
859
- "$schema": "https://json-schema.org/draft/2020-12/schema",
860
- "type": "object",
861
- "required": [
862
- "steps"
863
- ],
864
- "properties": {
865
- "steps": {
866
- "$ref": "#/$defs/StepArray"
867
- }
868
- }
869
- },
870
- "RawStrategy": {
871
- "$schema": "https://json-schema.org/draft/2020-12/schema",
872
- "type": "object",
873
- "allOf": [
874
- {
875
- "$ref": "#/$defs/StepsFacet"
876
- },
877
- {
878
- "$ref": "#/$defs/StrategyStateFacet"
879
- }
880
- ],
881
- "unevaluatedProperties": false
882
- },
883
- "RunnableStrategyIdentity": {
884
- "$schema": "https://json-schema.org/draft/2020-12/schema",
885
- "type": "string",
886
- "pattern": "^RUNNABLE_STRATEGY-.+$"
887
- },
888
- "RunnableStrategyStatus": {
889
- "$schema": "https://json-schema.org/draft/2020-12/schema",
890
- "type": "string",
891
- "enum": [
892
- "pending",
893
- "running",
894
- "completed",
895
- "failed",
896
- "cancelled"
897
- ]
898
- },
899
- "RunnableStrategyContext": {
900
- "$schema": "https://json-schema.org/draft/2020-12/schema",
901
- "type": "object",
902
- "required": [
903
- "status"
904
- ],
905
- "properties": {
906
- "status": {
907
- "$ref": "#/$defs/RunnableStrategyStatus"
908
- },
909
- "startedAt": {
910
- "$ref": "#/$defs/Timestamp"
911
- },
912
- "completedAt": {
913
- "$ref": "#/$defs/Timestamp"
914
- }
915
- },
916
- "unevaluatedProperties": false
917
- },
918
- "StrategyThreadIdentity": {
919
- "$schema": "https://json-schema.org/draft/2020-12/schema",
920
- "type": "string",
921
- "pattern": "^STRATEGY_THREAD-.+$"
922
- },
923
- "StrategyThreadMap": {
924
- "$schema": "https://json-schema.org/draft/2020-12/schema",
925
- "type": "object",
926
- "propertyNames": {
927
- "$ref": "#/$defs/StrategyThreadIdentity"
928
- },
929
- "additionalProperties": {
930
- "$ref": "#/$defs/StepArray"
931
- },
932
- "$comment": "Each thread contains an array of steps, allowing for sequential execution within a thread while supporting parallel execution across multiple threads."
933
- },
934
- "StrategyThreadMapFacet": {
935
- "$schema": "https://json-schema.org/draft/2020-12/schema",
936
- "type": "object",
937
- "required": [
938
- "strategyThreadMap"
939
- ],
940
- "properties": {
941
- "strategyThreadMap": {
942
- "$ref": "#/$defs/StrategyThreadMap"
943
- }
944
- }
945
- },
946
- "RunnableStrategy": {
947
- "$schema": "https://json-schema.org/draft/2020-12/schema",
948
- "type": "object",
949
- "required": [
950
- "identity",
951
- "runnableStrategyContext"
952
- ],
953
- "properties": {
954
- "identity": {
955
- "$ref": "#/$defs/RunnableStrategyIdentity"
956
- },
957
- "runnableStrategyContext": {
958
- "$ref": "#/$defs/RunnableStrategyContext"
959
- }
960
- },
961
- "allOf": [
962
- {
963
- "$comment": "The Engine runs jobs specified by steps in strategyThreadMap. The Engine also injects repeted steps when encountering loops.",
964
- "$ref": "#/$defs/StrategyThreadMapFacet"
965
- },
966
- {
967
- "$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.",
968
- "$ref": "#/$defs/StrategyStateFacet"
969
- }
970
- ],
971
- "unevaluatedProperties": false
972
- },
973
- "StrategyStateDelta": {
974
- "$schema": "https://json-schema.org/draft/2020-12/schema",
975
- "type": "object",
976
- "required": [
977
- "strategyStateUpdate"
978
- ],
979
- "properties": {
980
- "strategyStateUpdate": {
981
- "$ref": "#/$defs/StrategyState"
982
- }
983
- }
984
- },
985
- "RunnableStrategyUpdate": {
986
- "$schema": "https://json-schema.org/draft/2020-12/schema",
987
- "type": "object",
988
- "required": [
989
- "runnableStrategyHandle"
990
- ],
991
- "properties": {
992
- "runnableStrategyHandle": {
993
- "$ref": "#/$defs/RunnableStrategyIdentity"
994
- }
995
- },
996
- "allOf": [
997
- {
998
- "$ref": "#/$defs/StrategyStateDelta"
999
- }
1000
- ],
1001
- "unevaluatedProperties": false
1002
- },
1003
- "RunEventCounters": {
1004
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1005
- "type": "object",
1006
- "properties": {
1007
- "stepCounterAfter": {
1008
- "type": "integer"
1009
- },
1010
- "iterationCounterAfter": {
1011
- "type": "integer"
1012
- }
1013
- }
1014
- },
1015
- "RunEventStepMetadata": {
1016
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1017
- "type": "object",
1018
- "required": [
1019
- "stepHandle",
1020
- "stepKind",
1021
- "threadStepIndex"
1022
- ],
1023
- "properties": {
1024
- "stepHandle": {
1025
- "$ref": "#/$defs/StepIdentity"
1026
- },
1027
- "stepKind": {
1028
- "$ref": "#/$defs/StepKind"
1029
- },
1030
- "threadStepIndex": {
1031
- "type": "integer"
1032
- }
1033
- }
1034
- },
1035
- "RunEventUpdates": {
1036
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1037
- "type": "object",
1038
- "properties": {
1039
- "stepsMutation": {
1040
- "type": "object",
1041
- "required": [
1042
- "insertAt",
1043
- "inserted"
1044
- ],
1045
- "properties": {
1046
- "insertAt": {
1047
- "type": "integer"
1048
- },
1049
- "inserted": {
1050
- "$ref": "#/$defs/StepArray"
1051
- }
1052
- }
1053
- },
1054
- "interruptData": {
1055
- "$comment": "Kept permissive; the engine may evolve interrupt payloads.",
1056
- "type": [
1057
- "object",
1058
- "null"
1059
- ]
1060
- }
1061
- },
1062
- "allOf": [
1063
- {
1064
- "$ref": "#/$defs/StrategyStateDelta"
1065
- }
1066
- ]
1067
- },
1068
- "RunEventKind": {
1069
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1070
- "type": "string",
1071
- "enum": [
1072
- "graph_start",
1073
- "tick",
1074
- "interrupt",
1075
- "graph_end"
1076
- ]
1077
- },
1078
- "RunEventBase": {
1079
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1080
- "type": "object",
1081
- "required": [
1082
- "runEventKind",
1083
- "runnableStrategyHandle",
1084
- "strategyThreadHandle",
1085
- "createdAt",
1086
- "nodeName",
1087
- "eventSeq"
1088
- ],
1089
- "properties": {
1090
- "runEventKind": {
1091
- "$ref": "#/$defs/RunEventKind"
1092
- },
1093
- "runnableStrategyHandle": {
1094
- "$ref": "#/$defs/RunnableStrategyIdentity"
1095
- },
1096
- "strategyThreadHandle": {
1097
- "$ref": "#/$defs/StrategyThreadIdentity"
1098
- },
1099
- "createdAt": {
1100
- "$ref": "#/$defs/Timestamp"
1101
- },
1102
- "nodeName": {
1103
- "type": "string"
1104
- },
1105
- "eventSeq": {
1106
- "type": "integer"
1107
- },
1108
- "counters": {
1109
- "$ref": "#/$defs/RunEventCounters"
1110
- },
1111
- "stepMetadata": {
1112
- "$ref": "#/$defs/RunEventStepMetadata"
1113
- },
1114
- "updates": {
1115
- "$ref": "#/$defs/RunEventUpdates"
1116
- }
1117
- }
1118
- },
1119
- "GraphStartRunEvent": {
1120
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1121
- "allOf": [
1122
- {
1123
- "$ref": "#/$defs/RunEventBase"
1124
- },
1125
- {
1126
- "type": "object",
1127
- "required": [
1128
- "runnableStrategySeed"
1129
- ],
1130
- "properties": {
1131
- "runEventKind": {
1132
- "const": "graph_start"
1133
- },
1134
- "runnableStrategySeed": {
1135
- "$ref": "#/$defs/RunnableStrategy"
1136
- }
1137
- }
1138
- }
1139
- ]
1140
- },
1141
- "TickRunEvent": {
1142
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1143
- "allOf": [
1144
- {
1145
- "$ref": "#/$defs/RunEventBase"
1146
- },
1147
- {
1148
- "type": "object",
1149
- "properties": {
1150
- "runEventKind": {
1151
- "const": "tick"
1152
- }
1153
- }
1154
- }
1155
- ]
1156
- },
1157
- "InterruptRunEvent": {
1158
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1159
- "allOf": [
1160
- {
1161
- "$ref": "#/$defs/RunEventBase"
1162
- },
1163
- {
1164
- "type": "object",
1165
- "properties": {
1166
- "runEventKind": {
1167
- "const": "interrupt"
1168
- }
1169
- }
1170
- }
1171
- ]
1172
- },
1173
- "GraphEndRunEvent": {
1174
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1175
- "allOf": [
1176
- {
1177
- "$ref": "#/$defs/RunEventBase"
1178
- },
1179
- {
1180
- "type": "object",
1181
- "properties": {
1182
- "runEventKind": {
1183
- "const": "graph_end"
1184
- }
1185
- }
1186
- }
1187
- ]
1188
- },
1189
- "RunEvent": {
1190
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1191
- "type": "object",
1192
- "oneOf": [
1193
- {
1194
- "$ref": "#/$defs/GraphStartRunEvent"
1195
- },
1196
- {
1197
- "$ref": "#/$defs/TickRunEvent"
1198
- },
1199
- {
1200
- "$ref": "#/$defs/InterruptRunEvent"
1201
- },
1202
- {
1203
- "$ref": "#/$defs/GraphEndRunEvent"
1204
- }
1205
- ]
1206
- },
1207
- "StrategyRunIdentity": {
1208
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1209
- "type": "string",
1210
- "pattern": "^STRATEGY_RUN-.+$"
1211
- },
1212
- "StrategyRun": {
1213
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1214
- "type": "object",
1215
- "required": [
1216
- "identity",
1217
- "runnableStrategyHandle",
1218
- "recordedAt",
1219
- "runEvents"
1220
- ],
1221
- "properties": {
1222
- "identity": {
1223
- "$ref": "#/$defs/StrategyRunIdentity"
1224
- },
1225
- "runnableStrategyHandle": {
1226
- "$comment": "Could be derived from the first event but useful for indexing.",
1227
- "$ref": "#/$defs/RunnableStrategyIdentity"
1228
- },
1229
- "recordedAt": {
1230
- "$ref": "#/$defs/Timestamp"
1231
- },
1232
- "runEvents": {
1233
- "type": "array",
1234
- "items": {
1235
- "$ref": "#/$defs/RunEvent"
1236
- }
1237
- }
1238
- },
1239
- "unevaluatedProperties": false
1240
- },
1241
- "GoalIdentity": {
1242
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1243
- "type": "string",
1244
- "pattern": "^GOAL-.+$"
1245
- },
1246
- "Goal": {
1247
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1248
- "type": "object",
1249
- "required": [
1250
- "identity",
1251
- "target"
1252
- ],
1253
- "properties": {
1254
- "identity": {
1255
- "$ref": "#/$defs/GoalIdentity"
1256
- },
1257
- "target": {
1258
- "type": "integer",
1259
- "minimum": 0
1260
- },
1261
- "disallowedJobs": {
1262
- "type": "array",
1263
- "items": {
1264
- "$ref": "#/$defs/JobIdentity"
1265
- }
1266
- },
1267
- "disallowedSequences": {
1268
- "type": "array",
1269
- "items": {
1270
- "type": "array",
1271
- "items": {
1272
- "$ref": "#/$defs/JobIdentity"
1273
- }
1274
- }
1275
- },
1276
- "minSteps": {
1277
- "type": "integer",
1278
- "minimum": 1
1279
- },
1280
- "maxSteps": {
1281
- "type": "integer",
1282
- "minimum": 1
1283
- }
1284
- },
1285
- "unevaluatedProperties": false
1286
- },
1287
- "Natural": {
1288
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1289
- "type": "object",
1290
- "required": [
1291
- "identity"
1292
- ],
1293
- "properties": {
1294
- "identity": {
1295
- "$ref": "#/$defs/NaturalIdentity"
1296
- }
1297
- },
1298
- "$defs": {
1299
- "NaturalIdentity": {
1300
- "type": "integer"
1301
- }
1302
- },
1303
- "additionalProperties": false
1304
- },
1305
- "Boolean": {
1306
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1307
- "type": "object",
1308
- "required": [
1309
- "identity"
1310
- ],
1311
- "properties": {
1312
- "identity": {
1313
- "$ref": "#/$defs/BooleanIdentity"
1314
- }
1315
- },
1316
- "$defs": {
1317
- "BooleanIdentity": {
1318
- "type": "boolean"
1319
- }
1320
- },
1321
- "additionalProperties": false
1322
- },
1323
- "NaturalIdentity": {
1324
- "type": "integer"
1325
- },
1326
- "BooleanIdentity": {
1327
- "type": "boolean"
1328
- }
1329
- }
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$comment": "This file defines all schemas used internally by ToolProof.",
4
+ "$id": "https://schemas.toolproof.com/v1/Genesis.json",
5
+ "$defs": {
6
+ "Name": {
7
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
8
+ "type": "string",
9
+ "minLength": 1,
10
+ "pattern": "^(?:[A-Z][^0-9]*|[a-z]+/[a-z.+&-]+)$",
11
+ "$comment": "Validation is intercepted by an AI Agent that verifies the name against Toolproof's naming conventions.",
12
+ "semanticValidation": "Ajv custom keyword to verify name."
13
+ },
14
+ "NameFacet": {
15
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
16
+ "type": "object",
17
+ "required": [
18
+ "name"
19
+ ],
20
+ "properties": {
21
+ "name": {
22
+ "$ref": "#/$defs/Name"
23
+ }
24
+ }
25
+ },
26
+ "Description": {
27
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
28
+ "type": "string",
29
+ "minLength": 1,
30
+ "$comment": "Validation is intercepted by an AI Agent that verifies the description against Toolproof's documentation standards.",
31
+ "semanticValidation": "Ajv custom keyword to verify description."
32
+ },
33
+ "DescriptionFacet": {
34
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
35
+ "type": "object",
36
+ "required": [
37
+ "description"
38
+ ],
39
+ "properties": {
40
+ "description": {
41
+ "$ref": "#/$defs/Description"
42
+ }
43
+ }
44
+ },
45
+ "DocumentationFacet": {
46
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
47
+ "type": "object",
48
+ "allOf": [
49
+ {
50
+ "$ref": "#/$defs/NameFacet"
51
+ },
52
+ {
53
+ "$ref": "#/$defs/DescriptionFacet"
54
+ }
55
+ ]
56
+ },
57
+ "Uri": {
58
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
59
+ "type": "string",
60
+ "format": "uri"
61
+ },
62
+ "ResourceTypeIdentity": {
63
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
64
+ "type": "string",
65
+ "pattern": "^TYPE-.+$"
66
+ },
67
+ "ResourceType": {
68
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
69
+ "type": "object",
70
+ "required": [
71
+ "identity",
72
+ "nucleusSchema"
73
+ ],
74
+ "properties": {
75
+ "identity": {
76
+ "$ref": "#/$defs/ResourceTypeIdentity"
77
+ },
78
+ "nucleusSchema": true,
79
+ "embeddingUriDict": {
80
+ "type": "object",
81
+ "propertyNames": {
82
+ "type": "string",
83
+ "pattern": "^EMBEDDING-.+$"
84
+ },
85
+ "additionalProperties": {
86
+ "$ref": "#/$defs/Uri"
87
+ },
88
+ "minProperties": 1,
89
+ "$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 dict are members of a set of predefined embedding models."
90
+ },
91
+ "generatorUriDict": {
92
+ "type": "object",
93
+ "propertyNames": {
94
+ "type": "string",
95
+ "pattern": "^GENERATOR-.+$"
96
+ },
97
+ "additionalProperties": {
98
+ "$ref": "#/$defs/Uri"
99
+ },
100
+ "minProperties": 1,
101
+ "$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 dict 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 dict. 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."
102
+ }
103
+ },
104
+ "allOf": [
105
+ {
106
+ "$ref": "#/$defs/DocumentationFacet"
107
+ }
108
+ ]
109
+ },
110
+ "ResourceRoleIdentity": {
111
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
112
+ "type": "string",
113
+ "pattern": "^ROLE-.+$"
114
+ },
115
+ "ResourceRoleValue": {
116
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
117
+ "type": "object",
118
+ "allOf": [
119
+ {
120
+ "required": [
121
+ "resourceTypeHandle"
122
+ ],
123
+ "properties": {
124
+ "resourceTypeHandle": {
125
+ "$ref": "#/$defs/ResourceTypeIdentity"
126
+ }
127
+ }
128
+ },
129
+ {
130
+ "$ref": "#/$defs/DocumentationFacet"
131
+ }
132
+ ]
133
+ },
134
+ "ResourceRole": {
135
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
136
+ "type": "object",
137
+ "allOf": [
138
+ {
139
+ "type": "object",
140
+ "required": [
141
+ "identity"
142
+ ],
143
+ "properties": {
144
+ "identity": {
145
+ "$ref": "#/$defs/ResourceRoleIdentity"
146
+ }
147
+ }
148
+ },
149
+ {
150
+ "$ref": "#/$defs/ResourceRoleValue"
151
+ }
152
+ ]
153
+ },
154
+ "RoleDict": {
155
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
156
+ "type": "object",
157
+ "propertyNames": {
158
+ "$ref": "#/$defs/ResourceRoleIdentity"
159
+ },
160
+ "additionalProperties": {
161
+ "$ref": "#/$defs/ResourceRoleValue"
162
+ }
163
+ },
164
+ "Error": {
165
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
166
+ "type": "object",
167
+ "allOf": [
168
+ {
169
+ "$ref": "#/$defs/DocumentationFacet"
170
+ },
171
+ {
172
+ "properties": {
173
+ "details": {
174
+ "type": "object"
175
+ }
176
+ }
177
+ }
178
+ ],
179
+ "unevaluatedProperties": false
180
+ },
181
+ "Roles": {
182
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
183
+ "type": "object",
184
+ "required": [
185
+ "inputDict",
186
+ "outputDict"
187
+ ],
188
+ "properties": {
189
+ "inputDict": {
190
+ "$ref": "#/$defs/RoleDict"
191
+ },
192
+ "outputDict": {
193
+ "allOf": [
194
+ {
195
+ "$ref": "#/$defs/RoleDict"
196
+ },
197
+ {
198
+ "type": "object",
199
+ "required": [
200
+ "ROLE-ErrorOutput"
201
+ ],
202
+ "properties": {
203
+ "ROLE-ErrorOutput": {
204
+ "type": "object",
205
+ "allOf": [
206
+ {
207
+ "$ref": "#/$defs/ResourceRoleValue"
208
+ },
209
+ {
210
+ "required": [
211
+ "resourceTypeHandle",
212
+ "name",
213
+ "description"
214
+ ],
215
+ "properties": {
216
+ "resourceTypeHandle": {
217
+ "const": "TYPE-Error"
218
+ },
219
+ "name": {
220
+ "const": "ErrorOutput"
221
+ },
222
+ "description": {
223
+ "const": "Represents error outputs from job runs."
224
+ }
225
+ }
226
+ }
227
+ ]
228
+ }
229
+ }
230
+ }
231
+ ]
232
+ }
233
+ },
234
+ "unevaluatedProperties": false
235
+ },
236
+ "RolesFacet": {
237
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
238
+ "type": "object",
239
+ "required": [
240
+ "roles"
241
+ ],
242
+ "properties": {
243
+ "roles": {
244
+ "$ref": "#/$defs/Roles"
245
+ }
246
+ }
247
+ },
248
+ "JobIdentity": {
249
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
250
+ "type": "string",
251
+ "pattern": "^JOB-.+$"
252
+ },
253
+ "Job": {
254
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
255
+ "type": "object",
256
+ "required": [
257
+ "identity",
258
+ "implementationUri"
259
+ ],
260
+ "properties": {
261
+ "identity": {
262
+ "$ref": "#/$defs/JobIdentity"
263
+ },
264
+ "implementationUri": {
265
+ "$comment": "Instances of a ResourceType that requires implementationUri are 'executable' ResourceTypes. TYPE-Job is the canonical executable ResourceType in the ecosystem.",
266
+ "$ref": "#/$defs/Uri"
267
+ }
268
+ },
269
+ "allOf": [
270
+ {
271
+ "$ref": "#/$defs/DocumentationFacet"
272
+ },
273
+ {
274
+ "$ref": "#/$defs/RolesFacet"
275
+ }
276
+ ],
277
+ "unevaluatedProperties": false
278
+ },
279
+ "RoleBindingArray": {
280
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
281
+ "type": "array",
282
+ "items": {
283
+ "$ref": "#/$defs/ResourceRoleIdentity"
284
+ }
285
+ },
286
+ "RoleBindings": {
287
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
288
+ "type": "object",
289
+ "required": [
290
+ "inputBindings",
291
+ "outputBindings"
292
+ ],
293
+ "properties": {
294
+ "inputBindings": {
295
+ "$ref": "#/$defs/RoleBindingArray"
296
+ },
297
+ "outputBindings": {
298
+ "$ref": "#/$defs/RoleBindingArray"
299
+ }
300
+ }
301
+ },
302
+ "RoleBindingsFacet": {
303
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
304
+ "type": "object",
305
+ "required": [
306
+ "roleBindings"
307
+ ],
308
+ "properties": {
309
+ "roleBindings": {
310
+ "$ref": "#/$defs/RoleBindings"
311
+ }
312
+ }
313
+ },
314
+ "StepKind": {
315
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
316
+ "type": "string",
317
+ "enum": [
318
+ "job",
319
+ "branch",
320
+ "while",
321
+ "for"
322
+ ]
323
+ },
324
+ "StepKindFacet": {
325
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
326
+ "type": "object",
327
+ "required": [
328
+ "stepKind"
329
+ ],
330
+ "properties": {
331
+ "stepKind": {
332
+ "$ref": "#/$defs/StepKind"
333
+ }
334
+ }
335
+ },
336
+ "JobStepIdentity": {
337
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
338
+ "type": "string",
339
+ "pattern": "^JOB_STEP-.+$"
340
+ },
341
+ "JobStep": {
342
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
343
+ "type": "object",
344
+ "required": [
345
+ "identity",
346
+ "stepKind",
347
+ "jobHandle"
348
+ ],
349
+ "properties": {
350
+ "identity": {
351
+ "$ref": "#/$defs/JobStepIdentity"
352
+ },
353
+ "stepKind": {
354
+ "const": "job"
355
+ },
356
+ "jobHandle": {
357
+ "$ref": "#/$defs/JobIdentity"
358
+ }
359
+ },
360
+ "allOf": [
361
+ {
362
+ "$ref": "#/$defs/StepKindFacet"
363
+ },
364
+ {
365
+ "$comment": "This will be overlayed dynamically to specify roleBindings corresponding to the roles of the underlying job.",
366
+ "$ref": "#/$defs/RoleBindingsFacet"
367
+ }
368
+ ]
369
+ },
370
+ "Conditional": {
371
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
372
+ "type": "object",
373
+ "required": [
374
+ "when",
375
+ "what"
376
+ ],
377
+ "properties": {
378
+ "when": {
379
+ "$ref": "#/$defs/JobStep"
380
+ },
381
+ "what": {
382
+ "$ref": "#/$defs/JobStep"
383
+ }
384
+ },
385
+ "unevaluatedProperties": false
386
+ },
387
+ "BranchStepIdentity": {
388
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
389
+ "type": "string",
390
+ "pattern": "^BRANCH_STEP-.+$"
391
+ },
392
+ "BranchStep": {
393
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
394
+ "type": "object",
395
+ "required": [
396
+ "identity",
397
+ "stepKind",
398
+ "cases"
399
+ ],
400
+ "properties": {
401
+ "identity": {
402
+ "$ref": "#/$defs/BranchStepIdentity"
403
+ },
404
+ "stepKind": {
405
+ "const": "branch"
406
+ },
407
+ "cases": {
408
+ "type": "array",
409
+ "items": {
410
+ "$ref": "#/$defs/Conditional"
411
+ },
412
+ "minItems": 1,
413
+ "uniqueItems": true
414
+ }
415
+ },
416
+ "allOf": [
417
+ {
418
+ "$ref": "#/$defs/StepKindFacet"
419
+ }
420
+ ]
421
+ },
422
+ "WhileStepIdentity": {
423
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
424
+ "type": "string",
425
+ "pattern": "^WHILE_STEP-.+$"
426
+ },
427
+ "WhileStep": {
428
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
429
+ "type": "object",
430
+ "required": [
431
+ "identity",
432
+ "stepKind",
433
+ "case"
434
+ ],
435
+ "properties": {
436
+ "identity": {
437
+ "$ref": "#/$defs/WhileStepIdentity"
438
+ },
439
+ "stepKind": {
440
+ "const": "while"
441
+ },
442
+ "case": {
443
+ "$ref": "#/$defs/Conditional"
444
+ }
445
+ },
446
+ "allOf": [
447
+ {
448
+ "$ref": "#/$defs/StepKindFacet"
449
+ }
450
+ ]
451
+ },
452
+ "ForStepIdentity": {
453
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
454
+ "type": "string",
455
+ "pattern": "^FOR_STEP-.+$"
456
+ },
457
+ "ForStep": {
458
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
459
+ "type": "object",
460
+ "required": [
461
+ "identity",
462
+ "stepKind",
463
+ "case"
464
+ ],
465
+ "properties": {
466
+ "identity": {
467
+ "$ref": "#/$defs/ForStepIdentity"
468
+ },
469
+ "stepKind": {
470
+ "const": "for"
471
+ },
472
+ "case": {
473
+ "$ref": "#/$defs/Conditional"
474
+ }
475
+ },
476
+ "allOf": [
477
+ {
478
+ "$ref": "#/$defs/StepKindFacet"
479
+ }
480
+ ]
481
+ },
482
+ "StepIdentity": {
483
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
484
+ "type": "object",
485
+ "oneOf": [
486
+ {
487
+ "$ref": "#/$defs/JobStepIdentity"
488
+ },
489
+ {
490
+ "$ref": "#/$defs/BranchStepIdentity"
491
+ },
492
+ {
493
+ "$ref": "#/$defs/WhileStepIdentity"
494
+ },
495
+ {
496
+ "$ref": "#/$defs/ForStepIdentity"
497
+ }
498
+ ]
499
+ },
500
+ "Step": {
501
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
502
+ "type": "object",
503
+ "oneOf": [
504
+ {
505
+ "$ref": "#/$defs/JobStep"
506
+ },
507
+ {
508
+ "$ref": "#/$defs/BranchStep"
509
+ },
510
+ {
511
+ "$ref": "#/$defs/WhileStep"
512
+ },
513
+ {
514
+ "$ref": "#/$defs/ForStep"
515
+ }
516
+ ],
517
+ "unevaluatedProperties": false
518
+ },
519
+ "CreationContext": {
520
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
521
+ "type": "object",
522
+ "required": [
523
+ "resourceRoleHandle",
524
+ "jobStepHandle"
525
+ ],
526
+ "properties": {
527
+ "resourceRoleHandle": {
528
+ "$ref": "#/$defs/ResourceRoleIdentity"
529
+ },
530
+ "jobStepHandle": {
531
+ "$ref": "#/$defs/JobStepIdentity"
532
+ }
533
+ }
534
+ },
535
+ "CreationContextFacet": {
536
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
537
+ "type": "object",
538
+ "required": [
539
+ "creationContext"
540
+ ],
541
+ "properties": {
542
+ "creationContext": {
543
+ "$ref": "#/$defs/CreationContext"
544
+ }
545
+ }
546
+ },
547
+ "ResourceIdentity": {
548
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
549
+ "type": "string",
550
+ "pattern": "^RESOURCE-.+$"
551
+ },
552
+ "ResourceShellBase": {
553
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
554
+ "type": "object",
555
+ "required": [
556
+ "identity",
557
+ "resourceTypeHandle",
558
+ "resourceShellKind"
559
+ ],
560
+ "properties": {
561
+ "identity": {
562
+ "$ref": "#/$defs/ResourceIdentity"
563
+ },
564
+ "resourceTypeHandle": {
565
+ "$ref": "#/$defs/ResourceTypeIdentity"
566
+ },
567
+ "resourceShellKind": {
568
+ "$ref": "#/$defs/ResourceShellKind"
569
+ }
570
+ }
571
+ },
572
+ "ResourceShellKind": {
573
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
574
+ "type": "string",
575
+ "enum": [
576
+ "missing",
577
+ "inputPotential",
578
+ "outputPotential",
579
+ "materialized"
580
+ ]
581
+ },
582
+ "ResourceShellKindFacet": {
583
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
584
+ "type": "object",
585
+ "required": [
586
+ "resourceShellKind"
587
+ ],
588
+ "properties": {
589
+ "resourceShellKind": {
590
+ "$ref": "#/$defs/ResourceShellKind"
591
+ }
592
+ }
593
+ },
594
+ "ShellMissing": {
595
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
596
+ "type": "object",
597
+ "required": [
598
+ "resourceShellKind"
599
+ ],
600
+ "properties": {
601
+ "resourceShellKind": {
602
+ "const": "missing"
603
+ }
604
+ },
605
+ "allOf": [
606
+ {
607
+ "$ref": "#/$defs/ResourceShellBase"
608
+ },
609
+ {
610
+ "$ref": "#/$defs/ResourceShellKindFacet"
611
+ }
612
+ ],
613
+ "unevaluatedProperties": false
614
+ },
615
+ "ShellInputPotential": {
616
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
617
+ "type": "object",
618
+ "required": [
619
+ "resourceShellKind"
620
+ ],
621
+ "properties": {
622
+ "resourceShellKind": {
623
+ "const": "inputPotential"
624
+ }
625
+ },
626
+ "allOf": [
627
+ {
628
+ "$ref": "#/$defs/ResourceShellBase"
629
+ },
630
+ {
631
+ "$ref": "#/$defs/CreationContextFacet"
632
+ },
633
+ {
634
+ "$ref": "#/$defs/ResourceShellKindFacet"
635
+ }
636
+ ],
637
+ "unevaluatedProperties": false
638
+ },
639
+ "ShellOutputPotential": {
640
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
641
+ "type": "object",
642
+ "required": [
643
+ "resourceShellKind"
644
+ ],
645
+ "properties": {
646
+ "resourceShellKind": {
647
+ "const": "outputPotential"
648
+ }
649
+ },
650
+ "allOf": [
651
+ {
652
+ "$ref": "#/$defs/ResourceShellBase"
653
+ },
654
+ {
655
+ "$ref": "#/$defs/CreationContextFacet"
656
+ },
657
+ {
658
+ "$ref": "#/$defs/ResourceShellKindFacet"
659
+ }
660
+ ],
661
+ "unevaluatedProperties": false
662
+ },
663
+ "Timestamp": {
664
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
665
+ "type": "string",
666
+ "format": "date-time"
667
+ },
668
+ "TimestampFacet": {
669
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
670
+ "type": "object",
671
+ "required": [
672
+ "timestamp"
673
+ ],
674
+ "properties": {
675
+ "timestamp": {
676
+ "$ref": "#/$defs/Timestamp"
677
+ }
678
+ }
679
+ },
680
+ "Path": {
681
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
682
+ "type": "string",
683
+ "format": "uri-reference"
684
+ },
685
+ "PathFacet": {
686
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
687
+ "type": "object",
688
+ "required": [
689
+ "path"
690
+ ],
691
+ "properties": {
692
+ "path": {
693
+ "$ref": "#/$defs/Path"
694
+ }
695
+ }
696
+ },
697
+ "ShellMaterializedBase": {
698
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
699
+ "type": "object",
700
+ "required": [
701
+ "version",
702
+ "resourceShellKind"
703
+ ],
704
+ "properties": {
705
+ "version": {
706
+ "const": 1
707
+ },
708
+ "resourceShellKind": {
709
+ "const": "materialized"
710
+ }
711
+ },
712
+ "allOf": [
713
+ {
714
+ "$ref": "#/$defs/ResourceShellBase"
715
+ },
716
+ {
717
+ "$ref": "#/$defs/CreationContextFacet"
718
+ },
719
+ {
720
+ "$ref": "#/$defs/ResourceShellKindFacet"
721
+ },
722
+ {
723
+ "$ref": "#/$defs/TimestampFacet"
724
+ },
725
+ {
726
+ "$ref": "#/$defs/PathFacet"
727
+ }
728
+ ]
729
+ },
730
+ "ShellMaterialized": {
731
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
732
+ "type": "object",
733
+ "$ref": "#/$defs/ShellMaterializedBase",
734
+ "unevaluatedProperties": false
735
+ },
736
+ "ResourceMissing": {
737
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
738
+ "type": "object",
739
+ "$ref": "#/$defs/ShellMissing",
740
+ "unevaluatedProperties": false
741
+ },
742
+ "ResourceInputPotential": {
743
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
744
+ "type": "object",
745
+ "$ref": "#/$defs/ShellInputPotential",
746
+ "unevaluatedProperties": false
747
+ },
748
+ "ResourceOutputPotential": {
749
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
750
+ "type": "object",
751
+ "$ref": "#/$defs/ShellOutputPotential",
752
+ "unevaluatedProperties": false
753
+ },
754
+ "ResourcePotential": {
755
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
756
+ "type": "object",
757
+ "oneOf": [
758
+ {
759
+ "$ref": "#/$defs/ResourceMissing"
760
+ },
761
+ {
762
+ "$ref": "#/$defs/ResourceInputPotential"
763
+ },
764
+ {
765
+ "$ref": "#/$defs/ResourceOutputPotential"
766
+ }
767
+ ],
768
+ "unevaluatedProperties": false
769
+ },
770
+ "JsonData": {
771
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
772
+ "oneOf": [
773
+ {
774
+ "type": "null"
775
+ },
776
+ {
777
+ "type": "boolean"
778
+ },
779
+ {
780
+ "type": "number"
781
+ },
782
+ {
783
+ "type": "string"
784
+ },
785
+ {
786
+ "type": "array",
787
+ "items": {
788
+ "$ref": "#/$defs/JsonData"
789
+ }
790
+ },
791
+ {
792
+ "type": "object",
793
+ "additionalProperties": {
794
+ "$ref": "#/$defs/JsonData"
795
+ }
796
+ }
797
+ ]
798
+ },
799
+ "Nucleus": {
800
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
801
+ "type": "object",
802
+ "additionalProperties": {
803
+ "$ref": "#/$defs/JsonData"
804
+ }
805
+ },
806
+ "NucleusFacet": {
807
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
808
+ "type": "object",
809
+ "required": [
810
+ "nucleus"
811
+ ],
812
+ "properties": {
813
+ "nucleus": true
814
+ }
815
+ },
816
+ "Resource": {
817
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
818
+ "type": "object",
819
+ "allOf": [
820
+ {
821
+ "$ref": "#/$defs/ShellMaterializedBase"
822
+ },
823
+ {
824
+ "$comment": "This will be overlayed dynamically to match the data structure of the underlying ResourceType's nucleusSchema.",
825
+ "$ref": "#/$defs/NucleusFacet"
826
+ }
827
+ ],
828
+ "unevaluatedProperties": false
829
+ },
830
+ "JobStepSocket": {
831
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
832
+ "type": "object",
833
+ "propertyNames": {
834
+ "$ref": "#/$defs/ResourceRoleIdentity"
835
+ },
836
+ "additionalProperties": {
837
+ "oneOf": [
838
+ {
839
+ "$ref": "#/$defs/ResourcePotential"
840
+ },
841
+ {
842
+ "$ref": "#/$defs/Resource"
843
+ }
844
+ ]
845
+ }
846
+ },
847
+ "StrategyState": {
848
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
849
+ "type": "object",
850
+ "propertyNames": {
851
+ "$ref": "#/$defs/JobStepIdentity"
852
+ },
853
+ "additionalProperties": {
854
+ "$ref": "#/$defs/JobStepSocket"
855
+ }
856
+ },
857
+ "StrategyStateFacet": {
858
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
859
+ "type": "object",
860
+ "required": [
861
+ "strategyState"
862
+ ],
863
+ "properties": {
864
+ "strategyState": {
865
+ "$ref": "#/$defs/StrategyState"
866
+ }
867
+ }
868
+ },
869
+ "StepArray": {
870
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
871
+ "type": "array",
872
+ "items": {
873
+ "$ref": "#/$defs/Step"
874
+ },
875
+ "uniqueItems": true
876
+ },
877
+ "StepsFacet": {
878
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
879
+ "type": "object",
880
+ "required": [
881
+ "steps"
882
+ ],
883
+ "properties": {
884
+ "steps": {
885
+ "$ref": "#/$defs/StepArray"
886
+ }
887
+ }
888
+ },
889
+ "RawStrategy": {
890
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
891
+ "type": "object",
892
+ "allOf": [
893
+ {
894
+ "$ref": "#/$defs/StepsFacet"
895
+ },
896
+ {
897
+ "$ref": "#/$defs/StrategyStateFacet"
898
+ }
899
+ ],
900
+ "unevaluatedProperties": false
901
+ },
902
+ "RunnableStrategyIdentity": {
903
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
904
+ "type": "string",
905
+ "pattern": "^RUNNABLE_STRATEGY-.+$"
906
+ },
907
+ "RunnableStrategyStatus": {
908
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
909
+ "type": "string",
910
+ "enum": [
911
+ "pending",
912
+ "running",
913
+ "completed",
914
+ "failed",
915
+ "cancelled"
916
+ ]
917
+ },
918
+ "RunnableStrategyContext": {
919
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
920
+ "type": "object",
921
+ "required": [
922
+ "status"
923
+ ],
924
+ "properties": {
925
+ "status": {
926
+ "$ref": "#/$defs/RunnableStrategyStatus"
927
+ },
928
+ "startedAt": {
929
+ "$ref": "#/$defs/Timestamp"
930
+ },
931
+ "completedAt": {
932
+ "$ref": "#/$defs/Timestamp"
933
+ }
934
+ },
935
+ "unevaluatedProperties": false
936
+ },
937
+ "StrategyThreadIdentity": {
938
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
939
+ "type": "string",
940
+ "pattern": "^STRATEGY_THREAD-.+$"
941
+ },
942
+ "StrategyThreadDict": {
943
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
944
+ "type": "object",
945
+ "propertyNames": {
946
+ "$ref": "#/$defs/StrategyThreadIdentity"
947
+ },
948
+ "additionalProperties": {
949
+ "$ref": "#/$defs/StepArray"
950
+ },
951
+ "$comment": "Each thread contains an array of steps, allowing for sequential execution within a thread while supporting parallel execution across multiple threads."
952
+ },
953
+ "StrategyThreadDictFacet": {
954
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
955
+ "type": "object",
956
+ "required": [
957
+ "strategyThreadDict"
958
+ ],
959
+ "properties": {
960
+ "strategyThreadDict": {
961
+ "$ref": "#/$defs/StrategyThreadDict"
962
+ }
963
+ }
964
+ },
965
+ "RunnableStrategy": {
966
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
967
+ "type": "object",
968
+ "required": [
969
+ "identity",
970
+ "runnableStrategyContext"
971
+ ],
972
+ "properties": {
973
+ "identity": {
974
+ "$ref": "#/$defs/RunnableStrategyIdentity"
975
+ },
976
+ "runnableStrategyContext": {
977
+ "$ref": "#/$defs/RunnableStrategyContext"
978
+ }
979
+ },
980
+ "allOf": [
981
+ {
982
+ "$comment": "The Engine runs jobs specified by steps in strategyThreadDict. The Engine also injects repeted steps when encountering loops.",
983
+ "$ref": "#/$defs/StrategyThreadDictFacet"
984
+ },
985
+ {
986
+ "$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.",
987
+ "$ref": "#/$defs/StrategyStateFacet"
988
+ }
989
+ ],
990
+ "unevaluatedProperties": false
991
+ },
992
+ "StrategyStateDelta": {
993
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
994
+ "type": "object",
995
+ "required": [
996
+ "strategyStateUpdate"
997
+ ],
998
+ "properties": {
999
+ "strategyStateUpdate": {
1000
+ "$ref": "#/$defs/StrategyState"
1001
+ }
1002
+ }
1003
+ },
1004
+ "RunnableStrategyUpdate": {
1005
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1006
+ "type": "object",
1007
+ "required": [
1008
+ "runnableStrategyHandle"
1009
+ ],
1010
+ "properties": {
1011
+ "runnableStrategyHandle": {
1012
+ "$ref": "#/$defs/RunnableStrategyIdentity"
1013
+ }
1014
+ },
1015
+ "allOf": [
1016
+ {
1017
+ "$ref": "#/$defs/StrategyStateDelta"
1018
+ }
1019
+ ],
1020
+ "unevaluatedProperties": false
1021
+ },
1022
+ "RunEventCounters": {
1023
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1024
+ "type": "object",
1025
+ "properties": {
1026
+ "stepCounterAfter": {
1027
+ "type": "integer"
1028
+ },
1029
+ "iterationCounterAfter": {
1030
+ "type": "integer"
1031
+ }
1032
+ }
1033
+ },
1034
+ "RunEventStepMetadata": {
1035
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1036
+ "type": "object",
1037
+ "required": [
1038
+ "stepHandle",
1039
+ "stepKind",
1040
+ "threadStepIndex"
1041
+ ],
1042
+ "properties": {
1043
+ "stepHandle": {
1044
+ "$ref": "#/$defs/StepIdentity"
1045
+ },
1046
+ "stepKind": {
1047
+ "$ref": "#/$defs/StepKind"
1048
+ },
1049
+ "threadStepIndex": {
1050
+ "type": "integer"
1051
+ }
1052
+ }
1053
+ },
1054
+ "RunEventUpdates": {
1055
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1056
+ "type": "object",
1057
+ "properties": {
1058
+ "stepsMutation": {
1059
+ "type": "object",
1060
+ "required": [
1061
+ "insertAt",
1062
+ "inserted"
1063
+ ],
1064
+ "properties": {
1065
+ "insertAt": {
1066
+ "type": "integer"
1067
+ },
1068
+ "inserted": {
1069
+ "$ref": "#/$defs/StepArray"
1070
+ }
1071
+ }
1072
+ },
1073
+ "interruptData": {
1074
+ "$comment": "Kept permissive; the engine may evolve interrupt payloads.",
1075
+ "type": [
1076
+ "object",
1077
+ "null"
1078
+ ]
1079
+ }
1080
+ },
1081
+ "allOf": [
1082
+ {
1083
+ "$ref": "#/$defs/StrategyStateDelta"
1084
+ }
1085
+ ]
1086
+ },
1087
+ "RunEventKind": {
1088
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1089
+ "type": "string",
1090
+ "enum": [
1091
+ "graph_start",
1092
+ "tick",
1093
+ "interrupt",
1094
+ "graph_end"
1095
+ ]
1096
+ },
1097
+ "RunEventBase": {
1098
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1099
+ "type": "object",
1100
+ "required": [
1101
+ "runEventKind",
1102
+ "runnableStrategyHandle",
1103
+ "strategyThreadHandle",
1104
+ "createdAt",
1105
+ "nodeName",
1106
+ "eventSeq"
1107
+ ],
1108
+ "properties": {
1109
+ "runEventKind": {
1110
+ "$ref": "#/$defs/RunEventKind"
1111
+ },
1112
+ "runnableStrategyHandle": {
1113
+ "$ref": "#/$defs/RunnableStrategyIdentity"
1114
+ },
1115
+ "strategyThreadHandle": {
1116
+ "$ref": "#/$defs/StrategyThreadIdentity"
1117
+ },
1118
+ "createdAt": {
1119
+ "$ref": "#/$defs/Timestamp"
1120
+ },
1121
+ "nodeName": {
1122
+ "type": "string"
1123
+ },
1124
+ "eventSeq": {
1125
+ "type": "integer"
1126
+ },
1127
+ "counters": {
1128
+ "$ref": "#/$defs/RunEventCounters"
1129
+ },
1130
+ "stepMetadata": {
1131
+ "$ref": "#/$defs/RunEventStepMetadata"
1132
+ },
1133
+ "updates": {
1134
+ "$ref": "#/$defs/RunEventUpdates"
1135
+ }
1136
+ }
1137
+ },
1138
+ "GraphStartRunEvent": {
1139
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1140
+ "allOf": [
1141
+ {
1142
+ "$ref": "#/$defs/RunEventBase"
1143
+ },
1144
+ {
1145
+ "type": "object",
1146
+ "required": [
1147
+ "runnableStrategySeed"
1148
+ ],
1149
+ "properties": {
1150
+ "runEventKind": {
1151
+ "const": "graph_start"
1152
+ },
1153
+ "runnableStrategySeed": {
1154
+ "$ref": "#/$defs/RunnableStrategy"
1155
+ }
1156
+ }
1157
+ }
1158
+ ]
1159
+ },
1160
+ "TickRunEvent": {
1161
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1162
+ "allOf": [
1163
+ {
1164
+ "$ref": "#/$defs/RunEventBase"
1165
+ },
1166
+ {
1167
+ "type": "object",
1168
+ "properties": {
1169
+ "runEventKind": {
1170
+ "const": "tick"
1171
+ }
1172
+ }
1173
+ }
1174
+ ]
1175
+ },
1176
+ "InterruptRunEvent": {
1177
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1178
+ "allOf": [
1179
+ {
1180
+ "$ref": "#/$defs/RunEventBase"
1181
+ },
1182
+ {
1183
+ "type": "object",
1184
+ "properties": {
1185
+ "runEventKind": {
1186
+ "const": "interrupt"
1187
+ }
1188
+ }
1189
+ }
1190
+ ]
1191
+ },
1192
+ "GraphEndRunEvent": {
1193
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1194
+ "allOf": [
1195
+ {
1196
+ "$ref": "#/$defs/RunEventBase"
1197
+ },
1198
+ {
1199
+ "type": "object",
1200
+ "properties": {
1201
+ "runEventKind": {
1202
+ "const": "graph_end"
1203
+ }
1204
+ }
1205
+ }
1206
+ ]
1207
+ },
1208
+ "RunEvent": {
1209
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1210
+ "type": "object",
1211
+ "oneOf": [
1212
+ {
1213
+ "$ref": "#/$defs/GraphStartRunEvent"
1214
+ },
1215
+ {
1216
+ "$ref": "#/$defs/TickRunEvent"
1217
+ },
1218
+ {
1219
+ "$ref": "#/$defs/InterruptRunEvent"
1220
+ },
1221
+ {
1222
+ "$ref": "#/$defs/GraphEndRunEvent"
1223
+ }
1224
+ ]
1225
+ },
1226
+ "StrategyRunIdentity": {
1227
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1228
+ "type": "string",
1229
+ "pattern": "^STRATEGY_RUN-.+$"
1230
+ },
1231
+ "StrategyRun": {
1232
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1233
+ "type": "object",
1234
+ "required": [
1235
+ "identity",
1236
+ "runnableStrategyHandle",
1237
+ "recordedAt",
1238
+ "runEvents"
1239
+ ],
1240
+ "properties": {
1241
+ "identity": {
1242
+ "$ref": "#/$defs/StrategyRunIdentity"
1243
+ },
1244
+ "runnableStrategyHandle": {
1245
+ "$comment": "Could be derived from the first event but useful for indexing.",
1246
+ "$ref": "#/$defs/RunnableStrategyIdentity"
1247
+ },
1248
+ "recordedAt": {
1249
+ "$ref": "#/$defs/Timestamp"
1250
+ },
1251
+ "runEvents": {
1252
+ "type": "array",
1253
+ "items": {
1254
+ "$ref": "#/$defs/RunEvent"
1255
+ }
1256
+ }
1257
+ },
1258
+ "unevaluatedProperties": false
1259
+ },
1260
+ "GoalIdentity": {
1261
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1262
+ "type": "string",
1263
+ "pattern": "^GOAL-.+$"
1264
+ },
1265
+ "Goal": {
1266
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1267
+ "type": "object",
1268
+ "required": [
1269
+ "identity",
1270
+ "target"
1271
+ ],
1272
+ "properties": {
1273
+ "identity": {
1274
+ "$ref": "#/$defs/GoalIdentity"
1275
+ },
1276
+ "target": {
1277
+ "type": "integer",
1278
+ "minimum": 0
1279
+ },
1280
+ "disallowedJobs": {
1281
+ "type": "array",
1282
+ "items": {
1283
+ "$ref": "#/$defs/JobIdentity"
1284
+ }
1285
+ },
1286
+ "disallowedSequences": {
1287
+ "type": "array",
1288
+ "items": {
1289
+ "type": "array",
1290
+ "items": {
1291
+ "$ref": "#/$defs/JobIdentity"
1292
+ }
1293
+ }
1294
+ },
1295
+ "minSteps": {
1296
+ "type": "integer",
1297
+ "minimum": 1
1298
+ },
1299
+ "maxSteps": {
1300
+ "type": "integer",
1301
+ "minimum": 1
1302
+ }
1303
+ },
1304
+ "unevaluatedProperties": false
1305
+ },
1306
+ "Natural": {
1307
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1308
+ "type": "object",
1309
+ "required": [
1310
+ "identity"
1311
+ ],
1312
+ "properties": {
1313
+ "identity": {
1314
+ "$ref": "#/$defs/NaturalIdentity"
1315
+ }
1316
+ },
1317
+ "$defs": {
1318
+ "NaturalIdentity": {
1319
+ "type": "integer"
1320
+ }
1321
+ },
1322
+ "additionalProperties": false
1323
+ },
1324
+ "Boolean": {
1325
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1326
+ "type": "object",
1327
+ "required": [
1328
+ "identity"
1329
+ ],
1330
+ "properties": {
1331
+ "identity": {
1332
+ "$ref": "#/$defs/BooleanIdentity"
1333
+ }
1334
+ },
1335
+ "$defs": {
1336
+ "BooleanIdentity": {
1337
+ "type": "boolean"
1338
+ }
1339
+ },
1340
+ "additionalProperties": false
1341
+ },
1342
+ "NaturalIdentity": {
1343
+ "type": "integer"
1344
+ },
1345
+ "BooleanIdentity": {
1346
+ "type": "boolean"
1347
+ }
1348
+ }
1330
1349
  }