@toolproof-core/schema 1.0.1 → 1.0.3

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