@toolproof-core/schema 1.0.0

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