@toolproof-core/genesis 1.0.50 → 1.0.52

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.
@@ -1,1839 +1,1839 @@
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][a-zA-Z0-9]*$",
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": "#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": "#Description"
42
- }
43
- }
44
- },
45
- "DocumentationSpec": {
46
- "$schema": "https://json-schema.org/draft/2020-12/schema",
47
- "type": "object",
48
- "allOf": [
49
- {
50
- "$ref": "#NameFacet"
51
- },
52
- {
53
- "type": "object",
54
- "properties": {
55
- "symbol": {
56
- "type": "string"
57
- }
58
- }
59
- },
60
- {
61
- "$ref": "#DescriptionFacet"
62
- }
63
- ]
64
- },
65
- "JsonSchemaObject": {
66
- "$schema": "https://json-schema.org/draft/2020-12/schema",
67
- "type": "object",
68
- "required": [
69
- "$schema"
70
- ],
71
- "properties": {
72
- "$schema": {
73
- "const": "https://json-schema.org/draft/2020-12/schema"
74
- }
75
- },
76
- "additionalProperties": true
77
- },
78
- "AtomicTypeRef": {
79
- "$schema": "https://json-schema.org/draft/2020-12/schema",
80
- "$comment": "An atomic type reference is either resource-backed (resourceTypeHandle, strategy-legal) or schema-backed (roleSchema, internal/Core-only). The roleSchema branch holds an object whose $ref names the type parameter (e.g. '#OperandType'), matching an entry in the template's GenericAssignmentByRoleName.mapKeys. Exactly one atomic branch must be present.",
81
- "oneOf": [
82
- {
83
- "type": "object",
84
- "required": [
85
- "resourceTypeHandle"
86
- ],
87
- "properties": {
88
- "resourceTypeHandle": {
89
- "$ref": "#ResourceTypeHandle"
90
- }
91
- },
92
- "additionalProperties": false
93
- },
94
- {
95
- "type": "object",
96
- "required": [
97
- "roleSchema"
98
- ],
99
- "properties": {
100
- "roleSchema": {
101
- "type": "object",
102
- "required": [
103
- "$ref"
104
- ],
105
- "$comment": "A reference to a named type parameter. The $ref value must be '#' followed by a RoleName, matching a key in the template's GenericAssignmentByRoleName.mapKeys.",
106
- "properties": {
107
- "$ref": {
108
- "type": "string",
109
- "pattern": "^#[A-Z][a-zA-Z0-9]*$"
110
- }
111
- },
112
- "additionalProperties": false
113
- }
114
- },
115
- "additionalProperties": false
116
- }
117
- ]
118
- },
119
- "TypeRef": {
120
- "$comment": "A type reference is either a single AtomicTypeRef or a finite sum type expressed as oneOfTypeRefs. The oneOfTypeRefs branch permits a union of atomic successful value alternatives and does not permit nested unions.",
121
- "oneOf": [
122
- {
123
- "$ref": "#AtomicTypeRef"
124
- },
125
- {
126
- "type": "object",
127
- "required": [
128
- "oneOfTypeRefs"
129
- ],
130
- "properties": {
131
- "oneOfTypeRefs": {
132
- "type": "array",
133
- "items": {
134
- "$ref": "#AtomicTypeRef"
135
- },
136
- "minItems": 2,
137
- "uniqueItems": true
138
- }
139
- },
140
- "additionalProperties": false
141
- }
142
- ]
143
- },
144
- "Embedding": {
145
- "$schema": "https://json-schema.org/draft/2020-12/schema",
146
- "type": "object",
147
- "required": [
148
- "embeddingToolHandle",
149
- "targetResourcePointer",
150
- "data"
151
- ],
152
- "properties": {
153
- "embeddingToolHandle": {
154
- "$ref": "#ToolHandle"
155
- },
156
- "targetResourcePointer": {
157
- "$ref": "#ResourcePointer"
158
- },
159
- "data": {
160
- "type": "array",
161
- "items": {
162
- "type": "number"
163
- }
164
- }
165
- },
166
- "unevaluatedProperties": false
167
- },
168
- "ResourceTypeHandle": {
169
- "$schema": "https://json-schema.org/draft/2020-12/schema",
170
- "type": "string",
171
- "pattern": "^TYPE-.+$"
172
- },
173
- "ResourceType": {
174
- "$schema": "https://json-schema.org/draft/2020-12/schema",
175
- "type": "object",
176
- "required": [
177
- "handle"
178
- ],
179
- "semanticValidation": "If ingestorToolHandle is present, verify that it references an existing non-template Tool whose distinguished raw-instance input semantically matches ingestorToolInputSchema when provided, whose distinguished Boolean output reports whether the raw instance is valid for this ResourceType, and whose distinguished projection output is typed as this ResourceType and conforms to projectionSchema when projectionSchema is present.",
180
- "properties": {
181
- "handle": {
182
- "$ref": "#ResourceTypeHandle"
183
- },
184
- "projectionSchema": {
185
- "$ref": "#JsonSchemaObject"
186
- },
187
- "ingestorToolHandle": {
188
- "$ref": "#ToolHandle"
189
- },
190
- "ingestorToolInputSchema": {
191
- "$ref": "#JsonSchemaObject"
192
- },
193
- "embeddingModelTools": {
194
- "type": "array",
195
- "items": {
196
- "$ref": "#ToolHandle"
197
- },
198
- "minItems": 1,
199
- "$comment": "A ResourceType may specify a set of embeddingModelTools that convert the raw data (or one of its alternative representations) into vector embeddings. The build process enforces that the entries are members of a set of predefined embeddingModelTools."
200
- }
201
- },
202
- "allOf": [
203
- {
204
- "$ref": "#DocumentationSpec"
205
- },
206
- {
207
- "$comment": "A ResourceType ultimately describes both raw instances and their Core-visible JSON projection. Inside ToolProof Core, the ResourceType denotes the projection. projectionSchema describes the shape of that Core-visible projection. ingestorToolHandle identifies the Tool that ingests raw instances for this ResourceType by validating them against the built-in format grammar and, when projectionSchema is present, emitting the corresponding projection for Core. ingestorToolInputSchema describes the raw-instance input accepted by that ingestor. A ResourceType must specify either a projectionSchema or an ingestorToolHandle, or both. If only a projectionSchema is specified, the author relies on schema-based validation of the Core-visible projection and does not designate an ingestor. If only an ingestorToolHandle is specified, the author designates an ingestor that is authoritative for validating raw instances of the ResourceType. If both are specified, the ingestor must emit projections that conform to projectionSchema.",
208
- "anyOf": [
209
- {
210
- "required": [
211
- "projectionSchema"
212
- ]
213
- },
214
- {
215
- "required": [
216
- "ingestorToolHandle"
217
- ]
218
- }
219
- ]
220
- },
221
- {
222
- "if": {
223
- "required": [
224
- "ingestorToolInputSchema"
225
- ]
226
- },
227
- "then": {
228
- "required": [
229
- "ingestorToolHandle"
230
- ]
231
- }
232
- }
233
- ],
234
- "unevaluatedProperties": false
235
- },
236
- "RoleName": {
237
- "$schema": "https://json-schema.org/draft/2020-12/schema",
238
- "$ref": "#Name"
239
- },
240
- "ContainerKind": {
241
- "$schema": "https://json-schema.org/draft/2020-12/schema",
242
- "type": "string",
243
- "enum": [
244
- "scalar",
245
- "array",
246
- "map"
247
- ]
248
- },
249
- "RoleValue": {
250
- "$schema": "https://json-schema.org/draft/2020-12/schema",
251
- "$comment": "Pairs a type reference (typeRef) with a container shape. typeRef may be a single atomic type reference or a finite sum type over atomic successful value alternatives.",
252
- "type": "object",
253
- "required": [
254
- "typeRef",
255
- "containerKind"
256
- ],
257
- "properties": {
258
- "typeRef": {
259
- "$ref": "#TypeRef"
260
- },
261
- "refinementSchema": {
262
- "$comment": "Allows Tool authors to specify additional constraints on the role value beyond those expressible in the type system.",
263
- "$ref": "#JsonSchemaObject"
264
- },
265
- "containerKind": {
266
- "$ref": "#ContainerKind"
267
- },
268
- "containerSchema": {
269
- "$ref": "#JsonSchemaObject"
270
- },
271
- "mapKeys": {
272
- "$ref": "#RoleNameArray"
273
- }
274
- },
275
- "allOf": [
276
- {
277
- "$comment": "If containerKind is scalar, containerSchema is forbidden. Otherwise, it is optional.",
278
- "if": {
279
- "properties": {
280
- "containerKind": {
281
- "const": "scalar"
282
- }
283
- }
284
- },
285
- "then": {
286
- "not": {
287
- "required": [
288
- "containerSchema"
289
- ]
290
- }
291
- }
292
- },
293
- {
294
- "$comment": "If containerKind is array and containerSchema is provided, it must describe a homogeneous array (type=array with items; tuple-only schemas are disallowed).",
295
- "if": {
296
- "required": [
297
- "containerSchema"
298
- ],
299
- "properties": {
300
- "containerKind": {
301
- "const": "array"
302
- }
303
- }
304
- },
305
- "then": {
306
- "properties": {
307
- "containerSchema": {
308
- "type": "object",
309
- "required": [
310
- "type",
311
- "items"
312
- ],
313
- "properties": {
314
- "type": {
315
- "const": "array"
316
- },
317
- "items": {
318
- "type": "object"
319
- }
320
- },
321
- "not": {
322
- "required": [
323
- "prefixItems"
324
- ]
325
- }
326
- }
327
- }
328
- }
329
- },
330
- {
331
- "$comment": "If containerKind is map and containerSchema is provided, it must describe a homogeneous map (type=object with additionalProperties; key-specific schemas are disallowed).",
332
- "if": {
333
- "required": [
334
- "containerSchema"
335
- ],
336
- "properties": {
337
- "containerKind": {
338
- "const": "map"
339
- }
340
- }
341
- },
342
- "then": {
343
- "properties": {
344
- "containerSchema": {
345
- "type": "object",
346
- "required": [
347
- "type",
348
- "additionalProperties"
349
- ],
350
- "properties": {
351
- "type": {
352
- "const": "object"
353
- },
354
- "additionalProperties": {
355
- "type": "object"
356
- }
357
- },
358
- "not": {
359
- "anyOf": [
360
- {
361
- "required": [
362
- "properties"
363
- ]
364
- },
365
- {
366
- "required": [
367
- "patternProperties"
368
- ]
369
- }
370
- ]
371
- }
372
- }
373
- }
374
- }
375
- },
376
- {
377
- "$comment": "If containerKind is map, mapKeys is optional (omit for open/dynamic keys, supply for statically-known fixed keys). On non-map containers, mapKeys is forbidden.",
378
- "if": {
379
- "properties": {
380
- "containerKind": {
381
- "const": "map"
382
- }
383
- }
384
- },
385
- "then": {},
386
- "else": {
387
- "not": {
388
- "required": [
389
- "mapKeys"
390
- ]
391
- }
392
- }
393
- }
394
- ],
395
- "unevaluatedProperties": false
396
- },
397
- "RoleValueByName": {
398
- "$schema": "https://json-schema.org/draft/2020-12/schema",
399
- "type": "object",
400
- "propertyNames": {
401
- "$ref": "#RoleName"
402
- },
403
- "additionalProperties": {
404
- "$ref": "#RoleValue"
405
- }
406
- },
407
- "RoleNameArray": {
408
- "$schema": "https://json-schema.org/draft/2020-12/schema",
409
- "type": "array",
410
- "items": {
411
- "$ref": "#RoleName"
412
- }
413
- },
414
- "RoleSpec": {
415
- "$schema": "https://json-schema.org/draft/2020-12/schema",
416
- "type": "object",
417
- "required": [
418
- "inputRoleValueByName",
419
- "outputRoleValueByName"
420
- ],
421
- "properties": {
422
- "inputRoleValueByName": {
423
- "$ref": "#RoleValueByName"
424
- },
425
- "outputRoleValueByName": {
426
- "$ref": "#RoleValueByName"
427
- },
428
- "refinementSchema": {
429
- "$comment": "Allows Tool authors to specify additional constraints on the role assignment beyond those expressible in the type system.",
430
- "$ref": "#JsonSchemaObject"
431
- }
432
- },
433
- "unevaluatedProperties": false
434
- },
435
- "RoleSpecFacet": {
436
- "$schema": "https://json-schema.org/draft/2020-12/schema",
437
- "type": "object",
438
- "required": [
439
- "roleSpec"
440
- ],
441
- "properties": {
442
- "roleSpec": {
443
- "$ref": "#RoleSpec"
444
- }
445
- }
446
- },
447
- "ToolHandle": {
448
- "$schema": "https://json-schema.org/draft/2020-12/schema",
449
- "type": "string",
450
- "pattern": "^TOOL-.+$"
451
- },
452
- "Tool": {
453
- "$schema": "https://json-schema.org/draft/2020-12/schema",
454
- "type": "object",
455
- "required": [
456
- "handle",
457
- "isTemplate"
458
- ],
459
- "properties": {
460
- "handle": {
461
- "$ref": "#ToolHandle"
462
- },
463
- "templateToolHandle": {
464
- "$ref": "#ToolHandle"
465
- },
466
- "isTemplate": {
467
- "type": "boolean"
468
- },
469
- "instantiationRoleSpec": {
470
- "$ref": "#RoleSpec"
471
- }
472
- },
473
- "$comment": "Template Tools own dispatch contract: Core scans all instantiation Tools grouped by templateToolHandle, derives a specializationKey from each instantiation tool's generic assignment by taking the canonical order of genericRoleName -> assigned ResourceType.resourceTypeHandle pairs, and asserts injectivity (no two instantiation Tools share the same key for the same template). At invocation time Core injects the specializationKey -> instantiationToolHandle lookup as the second input, then the template resolves the first input against it to return one instantiation Tool. Cross-resource compatibility between an instantiation Tool's roleSpec and the template's instantiationRoleSpec is deferred to the validation package.",
474
- "semanticValidation": "Deferred: verify injectivity of specializationKey map per template; verify instantiation Tool roleSpec matches template instantiationRoleSpec; verify every supplied generic assignment key-set exactly equals roleSpec.inputRoleValueByName.GenericAssignmentByRoleName.mapKeys; verify every supplied generic assignment matches a registered specializationKey.",
475
- "allOf": [
476
- {
477
- "$ref": "#DocumentationSpec"
478
- },
479
- {
480
- "if": {
481
- "required": [
482
- "isTemplate"
483
- ],
484
- "properties": {
485
- "isTemplate": {
486
- "const": true
487
- }
488
- }
489
- },
490
- "then": {
491
- "required": [
492
- "instantiationRoleSpec"
493
- ]
494
- },
495
- "else": {
496
- "not": {
497
- "required": [
498
- "instantiationRoleSpec"
499
- ]
500
- }
501
- }
502
- },
503
- {
504
- "$comment": "Template Tools must declare named roles: two map inputs (GenericAssignmentByRoleName and InstantiationToolHandleBySpecializationKey) and one scalar TYPE-Tool output (InstantiationTool). GenericAssignmentByRoleName.mapKeys declares the generic parameter names accepted by the template. Runtime semantic validation enforces that each invocation's GenericAssignmentByRoleName object has exactly that key set: no missing keys, no extra keys. These keys are the generic parameter names later referenced via roleSchema refs such as #OperandType; they are not required to match the top-level role names of instantiationRoleSpec.",
505
- "if": {
506
- "required": [
507
- "isTemplate"
508
- ],
509
- "properties": {
510
- "isTemplate": {
511
- "const": true
512
- }
513
- }
514
- },
515
- "then": {
516
- "properties": {
517
- "roleSpec": {
518
- "properties": {
519
- "inputRoleValueByName": {
520
- "required": [
521
- "GenericAssignmentByRoleName",
522
- "InstantiationToolHandleBySpecializationKey"
523
- ],
524
- "properties": {
525
- "GenericAssignmentByRoleName": {
526
- "required": [
527
- "containerKind",
528
- "typeRef",
529
- "mapKeys"
530
- ],
531
- "properties": {
532
- "containerKind": {
533
- "const": "map"
534
- },
535
- "typeRef": {
536
- "required": [
537
- "resourceTypeHandle"
538
- ],
539
- "properties": {
540
- "resourceTypeHandle": {
541
- "const": "TYPE-ResourceType"
542
- }
543
- }
544
- },
545
- "mapKeys": {
546
- "type": "array",
547
- "items": {
548
- "$ref": "#RoleName"
549
- },
550
- "minItems": 1,
551
- "uniqueItems": true
552
- }
553
- }
554
- },
555
- "InstantiationToolHandleBySpecializationKey": {
556
- "required": [
557
- "containerKind",
558
- "typeRef"
559
- ],
560
- "properties": {
561
- "containerKind": {
562
- "const": "map"
563
- },
564
- "typeRef": {
565
- "required": [
566
- "resourceTypeHandle"
567
- ],
568
- "properties": {
569
- "resourceTypeHandle": {
570
- "const": "TYPE-Tool"
571
- }
572
- }
573
- }
574
- },
575
- "not": {
576
- "required": [
577
- "mapKeys"
578
- ]
579
- }
580
- }
581
- },
582
- "additionalProperties": false
583
- },
584
- "outputRoleValueByName": {
585
- "required": [
586
- "InstantiationTool"
587
- ],
588
- "properties": {
589
- "InstantiationTool": {
590
- "required": [
591
- "containerKind",
592
- "typeRef"
593
- ],
594
- "properties": {
595
- "containerKind": {
596
- "const": "scalar"
597
- },
598
- "typeRef": {
599
- "required": [
600
- "resourceTypeHandle"
601
- ],
602
- "properties": {
603
- "resourceTypeHandle": {
604
- "const": "TYPE-Tool"
605
- }
606
- }
607
- }
608
- }
609
- }
610
- },
611
- "additionalProperties": false
612
- }
613
- }
614
- }
615
- }
616
- }
617
- },
618
- {
619
- "$ref": "#RoleSpecFacet"
620
- }
621
- ],
622
- "unevaluatedProperties": false
623
- },
624
- "RoleBindingSpec": {
625
- "$schema": "https://json-schema.org/draft/2020-12/schema",
626
- "type": "object",
627
- "required": [
628
- "inputBindings",
629
- "outputBindings"
630
- ],
631
- "properties": {
632
- "inputBindings": {
633
- "$ref": "#RoleNameArray"
634
- },
635
- "outputBindings": {
636
- "$ref": "#RoleNameArray"
637
- }
638
- },
639
- "unevaluatedProperties": false
640
- },
641
- "RoleBindingSpecFacet": {
642
- "$schema": "https://json-schema.org/draft/2020-12/schema",
643
- "type": "object",
644
- "required": [
645
- "roleBindingSpec"
646
- ],
647
- "properties": {
648
- "roleBindingSpec": {
649
- "$ref": "#RoleBindingSpec"
650
- }
651
- }
652
- },
653
- "StepKind": {
654
- "$schema": "https://json-schema.org/draft/2020-12/schema",
655
- "type": "string",
656
- "enum": [
657
- "tool",
658
- "branch",
659
- "while",
660
- "for"
661
- ]
662
- },
663
- "StepKindFacet": {
664
- "$schema": "https://json-schema.org/draft/2020-12/schema",
665
- "type": "object",
666
- "required": [
667
- "stepKind"
668
- ],
669
- "properties": {
670
- "stepKind": {
671
- "$ref": "#StepKind"
672
- }
673
- }
674
- },
675
- "ToolStep": {
676
- "$schema": "https://json-schema.org/draft/2020-12/schema",
677
- "type": "object",
678
- "required": [
679
- "stepKind",
680
- "toolHandle"
681
- ],
682
- "properties": {
683
- "stepKind": {
684
- "const": "tool"
685
- },
686
- "toolHandle": {
687
- "$ref": "#ToolHandle"
688
- }
689
- },
690
- "allOf": [
691
- {
692
- "$ref": "#StepKindFacet"
693
- },
694
- {
695
- "$comment": "This will be overlaid dynamically to specify roleBindingSpec corresponding to the roleSpec of the underlying tool.",
696
- "$ref": "#RoleBindingSpecFacet"
697
- }
698
- ]
699
- },
700
- "Case": {
701
- "$schema": "https://json-schema.org/draft/2020-12/schema",
702
- "type": "object",
703
- "required": [
704
- "when",
705
- "what"
706
- ],
707
- "properties": {
708
- "when": {
709
- "$ref": "#ToolStep"
710
- },
711
- "what": {
712
- "$ref": "#ToolStep"
713
- }
714
- },
715
- "unevaluatedProperties": false
716
- },
717
- "BranchStep": {
718
- "$schema": "https://json-schema.org/draft/2020-12/schema",
719
- "type": "object",
720
- "required": [
721
- "stepKind",
722
- "cases"
723
- ],
724
- "properties": {
725
- "stepKind": {
726
- "const": "branch"
727
- },
728
- "cases": {
729
- "type": "array",
730
- "items": {
731
- "$ref": "#Case"
732
- },
733
- "minItems": 1,
734
- "uniqueItems": true
735
- }
736
- },
737
- "allOf": [
738
- {
739
- "$ref": "#StepKindFacet"
740
- }
741
- ]
742
- },
743
- "WhileStep": {
744
- "$schema": "https://json-schema.org/draft/2020-12/schema",
745
- "type": "object",
746
- "required": [
747
- "stepKind",
748
- "case"
749
- ],
750
- "properties": {
751
- "stepKind": {
752
- "const": "while"
753
- },
754
- "case": {
755
- "$ref": "#Case"
756
- }
757
- },
758
- "allOf": [
759
- {
760
- "$ref": "#StepKindFacet"
761
- }
762
- ]
763
- },
764
- "ForStep": {
765
- "$schema": "https://json-schema.org/draft/2020-12/schema",
766
- "type": "object",
767
- "required": [
768
- "stepKind",
769
- "case"
770
- ],
771
- "properties": {
772
- "stepKind": {
773
- "const": "for"
774
- },
775
- "case": {
776
- "$ref": "#Case"
777
- }
778
- },
779
- "allOf": [
780
- {
781
- "$ref": "#StepKindFacet"
782
- }
783
- ]
784
- },
785
- "Step": {
786
- "$schema": "https://json-schema.org/draft/2020-12/schema",
787
- "type": "object",
788
- "oneOf": [
789
- {
790
- "$ref": "#ToolStep"
791
- },
792
- {
793
- "$ref": "#BranchStep"
794
- },
795
- {
796
- "$ref": "#WhileStep"
797
- },
798
- {
799
- "$ref": "#ForStep"
800
- }
801
- ],
802
- "unevaluatedProperties": false
803
- },
804
- "OutputAddress": {
805
- "$schema": "https://json-schema.org/draft/2020-12/schema",
806
- "type": "object",
807
- "required": [
808
- "roleName",
809
- "toolStepPath"
810
- ],
811
- "properties": {
812
- "roleName": {
813
- "$ref": "#RoleName"
814
- },
815
- "toolStepPath": {
816
- "$ref": "#ToolStepPath"
817
- }
818
- },
819
- "unevaluatedProperties": false
820
- },
821
- "ProvenanceKind": {
822
- "$schema": "https://json-schema.org/draft/2020-12/schema",
823
- "type": "string",
824
- "enum": [
825
- "genesis",
826
- "strategy"
827
- ]
828
- },
829
- "GenesisProvenance": {
830
- "$schema": "https://json-schema.org/draft/2020-12/schema",
831
- "type": "object",
832
- "required": [
833
- "provenanceKind"
834
- ],
835
- "properties": {
836
- "provenanceKind": {
837
- "const": "genesis"
838
- }
839
- },
840
- "unevaluatedProperties": false
841
- },
842
- "StrategyProvenance": {
843
- "$schema": "https://json-schema.org/draft/2020-12/schema",
844
- "type": "object",
845
- "required": [
846
- "provenanceKind",
847
- "strategyTraceHandle",
848
- "outputAddress"
849
- ],
850
- "properties": {
851
- "provenanceKind": {
852
- "const": "strategy"
853
- },
854
- "strategyTraceHandle": {
855
- "$ref": "#StrategyTraceHandle"
856
- },
857
- "outputAddress": {
858
- "$ref": "#OutputAddress"
859
- }
860
- },
861
- "unevaluatedProperties": false
862
- },
863
- "DeferredStrategyProvenance": {
864
- "$schema": "https://json-schema.org/draft/2020-12/schema",
865
- "$comment": "Build-time strategy provenance without strategyTraceHandle. strategyTraceHandle is only known at runtime.",
866
- "type": "object",
867
- "required": [
868
- "provenanceKind",
869
- "outputAddress"
870
- ],
871
- "properties": {
872
- "provenanceKind": {
873
- "const": "strategy"
874
- },
875
- "outputAddress": {
876
- "$ref": "#OutputAddress"
877
- }
878
- },
879
- "unevaluatedProperties": false
880
- },
881
- "Provenance": {
882
- "$schema": "https://json-schema.org/draft/2020-12/schema",
883
- "oneOf": [
884
- {
885
- "$ref": "#GenesisProvenance"
886
- },
887
- {
888
- "$ref": "#StrategyProvenance"
889
- }
890
- ]
891
- },
892
- "ProvenanceFacet": {
893
- "$schema": "https://json-schema.org/draft/2020-12/schema",
894
- "type": "object",
895
- "required": [
896
- "provenance"
897
- ],
898
- "properties": {
899
- "provenance": {
900
- "$ref": "#Provenance"
901
- }
902
- }
903
- },
904
- "ResourceId": {
905
- "$schema": "https://json-schema.org/draft/2020-12/schema",
906
- "type": "string",
907
- "pattern": "^RESOURCE-.+$"
908
- },
909
- "ResourcePointer": {
910
- "$schema": "https://json-schema.org/draft/2020-12/schema",
911
- "type": "object",
912
- "required": [
913
- "id",
914
- "resourceTypeHandle"
915
- ],
916
- "properties": {
917
- "id": {
918
- "$ref": "#ResourceId"
919
- },
920
- "resourceTypeHandle": {
921
- "$ref": "#ResourceTypeHandle"
922
- }
923
- },
924
- "allOf": [
925
- {
926
- "$ref": "#ProvenanceFacet"
927
- }
928
- ],
929
- "unevaluatedProperties": false
930
- },
931
- "BaseResource": {
932
- "$schema": "https://json-schema.org/draft/2020-12/schema",
933
- "type": "object",
934
- "required": [
935
- "projection"
936
- ],
937
- "properties": {
938
- "projection": true
939
- },
940
- "$comment": "The projection field stores the Core-visible JSON projection of the Resource, not the raw underlying artifact. This will be overlaid dynamically to match the data structure of the underlying ResourceType's projectionSchema.",
941
- "allOf": [
942
- {
943
- "$ref": "#ResourcePointer"
944
- }
945
- ]
946
- },
947
- "Resource": {
948
- "$schema": "https://json-schema.org/draft/2020-12/schema",
949
- "type": "object",
950
- "$ref": "#BaseResource",
951
- "unevaluatedProperties": false
952
- },
953
- "StrategyStateInputKind": {
954
- "$schema": "https://json-schema.org/draft/2020-12/schema",
955
- "type": "string",
956
- "enum": [
957
- "inputResource",
958
- "externalInputPotential",
959
- "internalInputPotential"
960
- ]
961
- },
962
- "InputResource": {
963
- "$schema": "https://json-schema.org/draft/2020-12/schema",
964
- "type": "object",
965
- "required": [
966
- "strategyStateInputKind"
967
- ],
968
- "properties": {
969
- "strategyStateInputKind": {
970
- "const": "inputResource"
971
- }
972
- },
973
- "allOf": [
974
- {
975
- "$ref": "#BaseResource"
976
- }
977
- ],
978
- "unevaluatedProperties": false
979
- },
980
- "ExternalInputPotential": {
981
- "$schema": "https://json-schema.org/draft/2020-12/schema",
982
- "type": "object",
983
- "required": [
984
- "strategyStateInputKind",
985
- "id",
986
- "resourceTypeHandle"
987
- ],
988
- "properties": {
989
- "strategyStateInputKind": {
990
- "const": "externalInputPotential"
991
- },
992
- "id": {
993
- "$ref": "#ResourceId"
994
- },
995
- "resourceTypeHandle": {
996
- "$ref": "#ResourceTypeHandle"
997
- }
998
- },
999
- "unevaluatedProperties": false
1000
- },
1001
- "InternalInputPotential": {
1002
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1003
- "type": "object",
1004
- "required": [
1005
- "strategyStateInputKind",
1006
- "id",
1007
- "resourceTypeHandle",
1008
- "provenance"
1009
- ],
1010
- "properties": {
1011
- "strategyStateInputKind": {
1012
- "const": "internalInputPotential"
1013
- },
1014
- "id": {
1015
- "$ref": "#ResourceId"
1016
- },
1017
- "resourceTypeHandle": {
1018
- "$ref": "#ResourceTypeHandle"
1019
- },
1020
- "provenance": {
1021
- "$ref": "#DeferredStrategyProvenance"
1022
- }
1023
- },
1024
- "unevaluatedProperties": false
1025
- },
1026
- "InputPotential": {
1027
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1028
- "oneOf": [
1029
- {
1030
- "$ref": "#ExternalInputPotential"
1031
- },
1032
- {
1033
- "$ref": "#InternalInputPotential"
1034
- }
1035
- ]
1036
- },
1037
- "StrategyStateInputEntry": {
1038
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1039
- "oneOf": [
1040
- {
1041
- "$ref": "#InputPotential"
1042
- },
1043
- {
1044
- "$ref": "#InputResource"
1045
- }
1046
- ]
1047
- },
1048
- "StrategyStateInputEntryByRoleName": {
1049
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1050
- "type": "object",
1051
- "propertyNames": {
1052
- "$ref": "#RoleName"
1053
- },
1054
- "additionalProperties": {
1055
- "$ref": "#StrategyStateInputEntry"
1056
- }
1057
- },
1058
- "StepArray": {
1059
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1060
- "type": "array",
1061
- "items": {
1062
- "$ref": "#Step"
1063
- },
1064
- "uniqueItems": true
1065
- },
1066
- "StepArrayArray": {
1067
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1068
- "type": "array",
1069
- "items": {
1070
- "$ref": "#StepArray"
1071
- }
1072
- },
1073
- "StepsFacet": {
1074
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1075
- "type": "object",
1076
- "required": [
1077
- "steps"
1078
- ],
1079
- "properties": {
1080
- "steps": {
1081
- "$ref": "#StepArray"
1082
- }
1083
- }
1084
- },
1085
- "ToolStepPathSlot": {
1086
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1087
- "type": "string",
1088
- "enum": [
1089
- "self",
1090
- "case.when",
1091
- "case.what",
1092
- "cases.when",
1093
- "cases.what"
1094
- ]
1095
- },
1096
- "ToolStepPathSlotFacet": {
1097
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1098
- "type": "object",
1099
- "required": [
1100
- "toolStepPathSlot"
1101
- ],
1102
- "properties": {
1103
- "toolStepPathSlot": {
1104
- "$ref": "#ToolStepPathSlot"
1105
- }
1106
- }
1107
- },
1108
- "BaseToolStepPathSpec": {
1109
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1110
- "type": "object",
1111
- "required": [
1112
- "stepIndex",
1113
- "toolStepPathSlot"
1114
- ],
1115
- "properties": {
1116
- "stepIndex": {
1117
- "$ref": "#Natural"
1118
- },
1119
- "toolStepPathSlot": {
1120
- "$ref": "#ToolStepPathSlot"
1121
- },
1122
- "caseIndex": {
1123
- "$ref": "#Natural"
1124
- }
1125
- },
1126
- "allOf": [
1127
- {
1128
- "if": {
1129
- "properties": {
1130
- "toolStepPathSlot": {
1131
- "enum": [
1132
- "cases.when",
1133
- "cases.what"
1134
- ]
1135
- }
1136
- }
1137
- },
1138
- "then": {
1139
- "required": [
1140
- "caseIndex"
1141
- ]
1142
- }
1143
- },
1144
- {
1145
- "if": {
1146
- "properties": {
1147
- "toolStepPathSlot": {
1148
- "enum": [
1149
- "self",
1150
- "case.when",
1151
- "case.what"
1152
- ]
1153
- }
1154
- }
1155
- },
1156
- "then": {
1157
- "not": {
1158
- "required": [
1159
- "caseIndex"
1160
- ]
1161
- }
1162
- }
1163
- }
1164
- ]
1165
- },
1166
- "UnthreadedToolStepPathSpec": {
1167
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1168
- "allOf": [
1169
- {
1170
- "$ref": "#BaseToolStepPathSpec"
1171
- }
1172
- ],
1173
- "unevaluatedProperties": false
1174
- },
1175
- "ThreadedToolStepPathSpec": {
1176
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1177
- "allOf": [
1178
- {
1179
- "$ref": "#BaseToolStepPathSpec"
1180
- },
1181
- {
1182
- "type": "object",
1183
- "required": [
1184
- "threadIndex"
1185
- ],
1186
- "properties": {
1187
- "threadIndex": {
1188
- "$ref": "#Natural"
1189
- }
1190
- }
1191
- }
1192
- ],
1193
- "unevaluatedProperties": false
1194
- },
1195
- "ToolStepPath": {
1196
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1197
- "oneOf": [
1198
- {
1199
- "$ref": "#UnthreadedToolStepPath"
1200
- },
1201
- {
1202
- "$ref": "#ThreadedToolStepPath"
1203
- }
1204
- ]
1205
- },
1206
- "UnthreadedToolStepPath": {
1207
- "type": "string",
1208
- "pattern": "^/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
1209
- },
1210
- "ThreadedToolStepPath": {
1211
- "type": "string",
1212
- "pattern": "^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
1213
- },
1214
- "UnthreadedStrategyState": {
1215
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1216
- "type": "object",
1217
- "propertyNames": {
1218
- "$ref": "#UnthreadedToolStepPath"
1219
- },
1220
- "additionalProperties": {
1221
- "$ref": "#StrategyStateInputEntryByRoleName"
1222
- }
1223
- },
1224
- "ThreadedStrategyState": {
1225
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1226
- "type": "object",
1227
- "propertyNames": {
1228
- "$ref": "#ThreadedToolStepPath"
1229
- },
1230
- "additionalProperties": {
1231
- "$ref": "#StrategyStateInputEntryByRoleName"
1232
- }
1233
- },
1234
- "UnthreadedStrategyStateFacet": {
1235
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1236
- "type": "object",
1237
- "required": [
1238
- "strategyState"
1239
- ],
1240
- "properties": {
1241
- "strategyState": {
1242
- "$ref": "#UnthreadedStrategyState"
1243
- }
1244
- }
1245
- },
1246
- "ThreadedStrategyStateFacet": {
1247
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1248
- "type": "object",
1249
- "required": [
1250
- "strategyState"
1251
- ],
1252
- "properties": {
1253
- "strategyState": {
1254
- "$ref": "#ThreadedStrategyState"
1255
- }
1256
- }
1257
- },
1258
- "StrategyKind": {
1259
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1260
- "type": "string",
1261
- "enum": [
1262
- "unthreaded",
1263
- "threaded"
1264
- ]
1265
- },
1266
- "StrategyHandle": {
1267
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1268
- "type": "string",
1269
- "pattern": "^STRATEGY-.+$"
1270
- },
1271
- "BaseStrategy": {
1272
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1273
- "type": "object",
1274
- "required": [
1275
- "handle",
1276
- "strategyKind"
1277
- ],
1278
- "properties": {
1279
- "handle": {
1280
- "$ref": "#StrategyHandle"
1281
- },
1282
- "strategyKind": {
1283
- "$ref": "#StrategyKind"
1284
- }
1285
- }
1286
- },
1287
- "UnthreadedStrategy": {
1288
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1289
- "type": "object",
1290
- "allOf": [
1291
- {
1292
- "$ref": "#BaseStrategy"
1293
- },
1294
- {
1295
- "type": "object",
1296
- "properties": {
1297
- "strategyKind": {
1298
- "const": "unthreaded"
1299
- }
1300
- }
1301
- },
1302
- {
1303
- "$ref": "#StepsFacet"
1304
- },
1305
- {
1306
- "$ref": "#UnthreadedStrategyStateFacet"
1307
- }
1308
- ],
1309
- "unevaluatedProperties": false
1310
- },
1311
- "ThreadedStrategy": {
1312
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1313
- "type": "object",
1314
- "allOf": [
1315
- {
1316
- "$ref": "#BaseStrategy"
1317
- },
1318
- {
1319
- "type": "object",
1320
- "properties": {
1321
- "strategyKind": {
1322
- "const": "threaded"
1323
- }
1324
- }
1325
- },
1326
- {
1327
- "$ref": "#StepsByThreadIndexFacet"
1328
- },
1329
- {
1330
- "$ref": "#ThreadedStrategyStateFacet"
1331
- }
1332
- ],
1333
- "unevaluatedProperties": false
1334
- },
1335
- "Strategy": {
1336
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1337
- "oneOf": [
1338
- {
1339
- "$ref": "#UnthreadedStrategy"
1340
- },
1341
- {
1342
- "$ref": "#ThreadedStrategy"
1343
- }
1344
- ]
1345
- },
1346
- "StepsByThreadIndexFacet": {
1347
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1348
- "type": "object",
1349
- "required": [
1350
- "stepsByThreadIndex"
1351
- ],
1352
- "properties": {
1353
- "stepsByThreadIndex": {
1354
- "$ref": "#StepArrayArray"
1355
- }
1356
- }
1357
- },
1358
- "TracePointCounterSnapshot": {
1359
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1360
- "type": "object",
1361
- "properties": {
1362
- "stepCounterAfter": {
1363
- "$ref": "#Natural"
1364
- },
1365
- "iterationCounterAfter": {
1366
- "$ref": "#Natural"
1367
- }
1368
- }
1369
- },
1370
- "TracePointDelta": {
1371
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1372
- "type": "object",
1373
- "properties": {
1374
- "stepsMutation": {
1375
- "type": "object",
1376
- "required": [
1377
- "insertAt",
1378
- "insertedSteps"
1379
- ],
1380
- "properties": {
1381
- "insertAt": {
1382
- "$ref": "#Natural"
1383
- },
1384
- "insertedSteps": {
1385
- "$ref": "#StepArray"
1386
- }
1387
- }
1388
- },
1389
- "strategyStateDelta": {
1390
- "$ref": "#ThreadedStrategyState"
1391
- },
1392
- "interruptData": {
1393
- "$comment": "Kept permissive; the engine may evolve interrupt payloads.",
1394
- "type": [
1395
- "object",
1396
- "null"
1397
- ]
1398
- }
1399
- }
1400
- },
1401
- "TracePointKind": {
1402
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1403
- "type": "string",
1404
- "enum": [
1405
- "graph_start",
1406
- "tick",
1407
- "interrupt",
1408
- "graph_end"
1409
- ]
1410
- },
1411
- "BaseTracePoint": {
1412
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1413
- "type": "object",
1414
- "required": [
1415
- "tracePointKind",
1416
- "strategyHandle",
1417
- "threadIndex",
1418
- "tracePointIndex"
1419
- ],
1420
- "properties": {
1421
- "tracePointKind": {
1422
- "$ref": "#TracePointKind"
1423
- },
1424
- "strategyHandle": {
1425
- "$ref": "#StrategyHandle"
1426
- },
1427
- "threadIndex": {
1428
- "$ref": "#Natural"
1429
- },
1430
- "tracePointIndex": {
1431
- "$ref": "#Natural"
1432
- }
1433
- }
1434
- },
1435
- "ThreadedStrategyFacet": {
1436
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1437
- "type": "object",
1438
- "required": [
1439
- "threadedStrategy"
1440
- ],
1441
- "properties": {
1442
- "threadedStrategy": {
1443
- "$ref": "#ThreadedStrategy"
1444
- }
1445
- }
1446
- },
1447
- "GraphStartTracePoint": {
1448
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1449
- "allOf": [
1450
- {
1451
- "$ref": "#BaseTracePoint"
1452
- },
1453
- {
1454
- "type": "object",
1455
- "properties": {
1456
- "tracePointKind": {
1457
- "const": "graph_start"
1458
- }
1459
- }
1460
- },
1461
- {
1462
- "$ref": "#ThreadedStrategyFacet"
1463
- }
1464
- ]
1465
- },
1466
- "TickTracePoint": {
1467
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1468
- "allOf": [
1469
- {
1470
- "$ref": "#BaseTracePoint"
1471
- },
1472
- {
1473
- "type": "object",
1474
- "required": [
1475
- "counterSnapshot",
1476
- "toolStepPath",
1477
- "delta"
1478
- ],
1479
- "properties": {
1480
- "tracePointKind": {
1481
- "const": "tick"
1482
- },
1483
- "counterSnapshot": {
1484
- "$ref": "#TracePointCounterSnapshot"
1485
- },
1486
- "toolStepPath": {
1487
- "$ref": "#ThreadedToolStepPath"
1488
- },
1489
- "delta": {
1490
- "$ref": "#TracePointDelta"
1491
- }
1492
- }
1493
- }
1494
- ]
1495
- },
1496
- "InterruptTracePoint": {
1497
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1498
- "allOf": [
1499
- {
1500
- "$ref": "#BaseTracePoint"
1501
- },
1502
- {
1503
- "type": "object",
1504
- "required": [
1505
- "counterSnapshot",
1506
- "toolStepPath",
1507
- "delta"
1508
- ],
1509
- "properties": {
1510
- "tracePointKind": {
1511
- "const": "interrupt"
1512
- },
1513
- "counterSnapshot": {
1514
- "$ref": "#TracePointCounterSnapshot"
1515
- },
1516
- "toolStepPath": {
1517
- "$ref": "#ThreadedToolStepPath"
1518
- },
1519
- "delta": {
1520
- "allOf": [
1521
- {
1522
- "$ref": "#TracePointDelta"
1523
- },
1524
- {
1525
- "type": "object",
1526
- "required": [
1527
- "interruptData"
1528
- ],
1529
- "properties": {
1530
- "interruptData": {
1531
- "$comment": "Interrupt events must include a non-null interrupt payload.",
1532
- "type": "object"
1533
- }
1534
- }
1535
- }
1536
- ]
1537
- }
1538
- }
1539
- }
1540
- ]
1541
- },
1542
- "GraphEndTracePoint": {
1543
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1544
- "allOf": [
1545
- {
1546
- "$ref": "#BaseTracePoint"
1547
- },
1548
- {
1549
- "type": "object",
1550
- "properties": {
1551
- "tracePointKind": {
1552
- "const": "graph_end"
1553
- }
1554
- }
1555
- }
1556
- ]
1557
- },
1558
- "TracePoint": {
1559
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1560
- "type": "object",
1561
- "oneOf": [
1562
- {
1563
- "$ref": "#GraphStartTracePoint"
1564
- },
1565
- {
1566
- "$ref": "#TickTracePoint"
1567
- },
1568
- {
1569
- "$ref": "#InterruptTracePoint"
1570
- },
1571
- {
1572
- "$ref": "#GraphEndTracePoint"
1573
- }
1574
- ]
1575
- },
1576
- "StrategyTraceHandle": {
1577
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1578
- "type": "string",
1579
- "pattern": "^STRATEGY_TRACE-.+$"
1580
- },
1581
- "StrategyTrace": {
1582
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1583
- "type": "object",
1584
- "required": [
1585
- "handle",
1586
- "strategyHandle",
1587
- "tracePoints"
1588
- ],
1589
- "properties": {
1590
- "handle": {
1591
- "$ref": "#StrategyTraceHandle"
1592
- },
1593
- "strategyHandle": {
1594
- "$comment": "Could be derived from the first event but useful for indexing.",
1595
- "$ref": "#StrategyHandle"
1596
- },
1597
- "tracePoints": {
1598
- "type": "array",
1599
- "items": {
1600
- "$ref": "#TracePoint"
1601
- }
1602
- }
1603
- },
1604
- "unevaluatedProperties": false
1605
- },
1606
- "GoalHandle": {
1607
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1608
- "type": "string",
1609
- "pattern": "^GOAL-.+$"
1610
- },
1611
- "Goal": {
1612
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1613
- "type": "object",
1614
- "required": [
1615
- "handle",
1616
- "target"
1617
- ],
1618
- "properties": {
1619
- "handle": {
1620
- "$ref": "#GoalHandle"
1621
- },
1622
- "target": {
1623
- "type": "integer",
1624
- "minimum": 0
1625
- },
1626
- "disallowedTools": {
1627
- "type": "array",
1628
- "items": {
1629
- "$ref": "#ToolHandle"
1630
- }
1631
- },
1632
- "disallowedSequences": {
1633
- "type": "array",
1634
- "items": {
1635
- "type": "array",
1636
- "items": {
1637
- "$ref": "#ToolHandle"
1638
- }
1639
- }
1640
- },
1641
- "minSteps": {
1642
- "type": "integer",
1643
- "minimum": 1
1644
- },
1645
- "maxSteps": {
1646
- "type": "integer",
1647
- "minimum": 1
1648
- }
1649
- },
1650
- "unevaluatedProperties": false
1651
- },
1652
- "Error": {
1653
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1654
- "type": "object",
1655
- "allOf": [
1656
- {
1657
- "$ref": "#DocumentationSpec"
1658
- },
1659
- {
1660
- "properties": {
1661
- "details": {
1662
- "type": "object"
1663
- }
1664
- }
1665
- }
1666
- ],
1667
- "unevaluatedProperties": false
1668
- },
1669
- "Natural": {
1670
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1671
- "type": "integer",
1672
- "minimum": 0
1673
- },
1674
- "Boolean": {
1675
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1676
- "type": "boolean"
1677
- },
1678
- "TimestampedResource": {
1679
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1680
- "type": "object",
1681
- "required": [
1682
- "timestamp"
1683
- ],
1684
- "properties": {
1685
- "timestamp": {
1686
- "type": "string",
1687
- "format": "date-time",
1688
- "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"
1689
- }
1690
- },
1691
- "allOf": [
1692
- {
1693
- "$ref": "#Resource"
1694
- }
1695
- ],
1696
- "unevaluatedProperties": false
1697
- },
1698
- "JsonScalarLink": {
1699
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1700
- "type": "object",
1701
- "required": [
1702
- "kind",
1703
- "filePath",
1704
- "pointer"
1705
- ],
1706
- "properties": {
1707
- "kind": {
1708
- "const": "json-pointer"
1709
- },
1710
- "filePath": {
1711
- "type": "string",
1712
- "minLength": 1
1713
- },
1714
- "pointer": {
1715
- "type": "string",
1716
- "pattern": "^(?:/(?:[^~/]|~0|~1)*)+$",
1717
- "$comment": "RFC 6901 JSON Pointer. Requires at least one reference token."
1718
- }
1719
- },
1720
- "unevaluatedProperties": false
1721
- },
1722
- "Suite": {
1723
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1724
- "type": "object",
1725
- "allOf": [
1726
- {
1727
- "type": "object",
1728
- "required": [
1729
- "name",
1730
- "version",
1731
- "description"
1732
- ],
1733
- "properties": {
1734
- "name": {
1735
- "$ref": "#Name"
1736
- },
1737
- "version": {
1738
- "type": "string",
1739
- "minLength": 1
1740
- },
1741
- "description": {
1742
- "$ref": "#Description"
1743
- }
1744
- }
1745
- },
1746
- {
1747
- "type": "object",
1748
- "required": [
1749
- "resourceTypes",
1750
- "tools"
1751
- ],
1752
- "properties": {
1753
- "resourceTypes": {
1754
- "type": "array",
1755
- "items": {
1756
- "$ref": "#ResourceType"
1757
- },
1758
- "uniqueItems": true
1759
- },
1760
- "tools": {
1761
- "type": "array",
1762
- "items": {
1763
- "$ref": "#Tool"
1764
- },
1765
- "uniqueItems": true
1766
- }
1767
- }
1768
- }
1769
- ],
1770
- "unevaluatedProperties": false
1771
- },
1772
- "SuiteIngestorInputSchema": {
1773
- "$schema": "https://json-schema.org/draft/2020-12/schema",
1774
- "type": "object",
1775
- "allOf": [
1776
- {
1777
- "type": "object",
1778
- "required": [
1779
- "name",
1780
- "version",
1781
- "description"
1782
- ],
1783
- "properties": {
1784
- "name": {
1785
- "oneOf": [
1786
- {
1787
- "$ref": "#Name"
1788
- },
1789
- {
1790
- "$ref": "#JsonScalarLink"
1791
- }
1792
- ]
1793
- },
1794
- "version": {
1795
- "oneOf": [
1796
- {
1797
- "type": "string",
1798
- "minLength": 1
1799
- },
1800
- {
1801
- "$ref": "#JsonScalarLink"
1802
- }
1803
- ]
1804
- },
1805
- "description": {
1806
- "oneOf": [
1807
- {
1808
- "$ref": "#Description"
1809
- },
1810
- {
1811
- "$ref": "#JsonScalarLink"
1812
- }
1813
- ]
1814
- }
1815
- }
1816
- },
1817
- {
1818
- "type": "object",
1819
- "required": [
1820
- "resourceTypesPath",
1821
- "toolsPath"
1822
- ],
1823
- "properties": {
1824
- "resourceTypesPath": {
1825
- "type": "string",
1826
- "minLength": 1
1827
- },
1828
- "toolsPath": {
1829
- "type": "string",
1830
- "minLength": 1
1831
- }
1832
- }
1833
- }
1834
- ],
1835
- "semanticValidation": "Verify that resourceTypesPath and toolsPath are relative paths rooted within the suite root, that toolproof.json provides the required suite metadata, and that the referenced files exist and match the expected declaration schemas.",
1836
- "unevaluatedProperties": false
1837
- }
1838
- }
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][a-zA-Z0-9]*$",
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": "#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": "#Description"
42
+ }
43
+ }
44
+ },
45
+ "DocumentationSpec": {
46
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
47
+ "type": "object",
48
+ "allOf": [
49
+ {
50
+ "$ref": "#NameFacet"
51
+ },
52
+ {
53
+ "type": "object",
54
+ "properties": {
55
+ "symbol": {
56
+ "type": "string"
57
+ }
58
+ }
59
+ },
60
+ {
61
+ "$ref": "#DescriptionFacet"
62
+ }
63
+ ]
64
+ },
65
+ "JsonSchemaObject": {
66
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
67
+ "type": "object",
68
+ "required": [
69
+ "$schema"
70
+ ],
71
+ "properties": {
72
+ "$schema": {
73
+ "const": "https://json-schema.org/draft/2020-12/schema"
74
+ }
75
+ },
76
+ "additionalProperties": true
77
+ },
78
+ "AtomicTypeRef": {
79
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
80
+ "$comment": "An atomic type reference is either resource-backed (resourceTypeHandle, strategy-legal) or schema-backed (roleSchema, internal/Core-only). The roleSchema branch holds an object whose $ref names the type parameter (e.g. '#OperandType'), matching an entry in the template's GenericAssignmentByRoleName.mapKeys. Exactly one atomic branch must be present.",
81
+ "oneOf": [
82
+ {
83
+ "type": "object",
84
+ "required": [
85
+ "resourceTypeHandle"
86
+ ],
87
+ "properties": {
88
+ "resourceTypeHandle": {
89
+ "$ref": "#ResourceTypeHandle"
90
+ }
91
+ },
92
+ "additionalProperties": false
93
+ },
94
+ {
95
+ "type": "object",
96
+ "required": [
97
+ "roleSchema"
98
+ ],
99
+ "properties": {
100
+ "roleSchema": {
101
+ "type": "object",
102
+ "required": [
103
+ "$ref"
104
+ ],
105
+ "$comment": "A reference to a named type parameter. The $ref value must be '#' followed by a RoleName, matching a key in the template's GenericAssignmentByRoleName.mapKeys.",
106
+ "properties": {
107
+ "$ref": {
108
+ "type": "string",
109
+ "pattern": "^#[A-Z][a-zA-Z0-9]*$"
110
+ }
111
+ },
112
+ "additionalProperties": false
113
+ }
114
+ },
115
+ "additionalProperties": false
116
+ }
117
+ ]
118
+ },
119
+ "TypeRef": {
120
+ "$comment": "A type reference is either a single AtomicTypeRef or a finite sum type expressed as oneOfTypeRefs. The oneOfTypeRefs branch permits a union of atomic successful value alternatives and does not permit nested unions.",
121
+ "oneOf": [
122
+ {
123
+ "$ref": "#AtomicTypeRef"
124
+ },
125
+ {
126
+ "type": "object",
127
+ "required": [
128
+ "oneOfTypeRefs"
129
+ ],
130
+ "properties": {
131
+ "oneOfTypeRefs": {
132
+ "type": "array",
133
+ "items": {
134
+ "$ref": "#AtomicTypeRef"
135
+ },
136
+ "minItems": 2,
137
+ "uniqueItems": true
138
+ }
139
+ },
140
+ "additionalProperties": false
141
+ }
142
+ ]
143
+ },
144
+ "Embedding": {
145
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
146
+ "type": "object",
147
+ "required": [
148
+ "embeddingToolHandle",
149
+ "targetResourcePointer",
150
+ "data"
151
+ ],
152
+ "properties": {
153
+ "embeddingToolHandle": {
154
+ "$ref": "#ToolHandle"
155
+ },
156
+ "targetResourcePointer": {
157
+ "$ref": "#ResourcePointer"
158
+ },
159
+ "data": {
160
+ "type": "array",
161
+ "items": {
162
+ "type": "number"
163
+ }
164
+ }
165
+ },
166
+ "unevaluatedProperties": false
167
+ },
168
+ "ResourceTypeHandle": {
169
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
170
+ "type": "string",
171
+ "pattern": "^TYPE-.+$"
172
+ },
173
+ "ResourceType": {
174
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
175
+ "type": "object",
176
+ "required": [
177
+ "handle"
178
+ ],
179
+ "semanticValidation": "If ingestorToolHandle is present, verify that it references an existing non-template Tool whose distinguished raw-instance input semantically matches ingestorToolInputSchema when provided, whose distinguished Boolean output reports whether the raw instance is valid for this ResourceType, and whose distinguished projection output is typed as this ResourceType and conforms to projectionSchema when projectionSchema is present.",
180
+ "properties": {
181
+ "handle": {
182
+ "$ref": "#ResourceTypeHandle"
183
+ },
184
+ "projectionSchema": {
185
+ "$ref": "#JsonSchemaObject"
186
+ },
187
+ "ingestorToolHandle": {
188
+ "$ref": "#ToolHandle"
189
+ },
190
+ "ingestorToolInputSchema": {
191
+ "$ref": "#JsonSchemaObject"
192
+ },
193
+ "embeddingModelTools": {
194
+ "type": "array",
195
+ "items": {
196
+ "$ref": "#ToolHandle"
197
+ },
198
+ "minItems": 1,
199
+ "$comment": "A ResourceType may specify a set of embeddingModelTools that convert the raw data (or one of its alternative representations) into vector embeddings. The build process enforces that the entries are members of a set of predefined embeddingModelTools."
200
+ }
201
+ },
202
+ "allOf": [
203
+ {
204
+ "$ref": "#DocumentationSpec"
205
+ },
206
+ {
207
+ "$comment": "A ResourceType ultimately describes both raw instances and their Core-visible JSON projection. Inside ToolProof Core, the ResourceType denotes the projection. projectionSchema describes the shape of that Core-visible projection. ingestorToolHandle identifies the Tool that ingests raw instances for this ResourceType by validating them against the built-in format grammar and, when projectionSchema is present, emitting the corresponding projection for Core. ingestorToolInputSchema describes the raw-instance input accepted by that ingestor. A ResourceType must specify either a projectionSchema or an ingestorToolHandle, or both. If only a projectionSchema is specified, the author relies on schema-based validation of the Core-visible projection and does not designate an ingestor. If only an ingestorToolHandle is specified, the author designates an ingestor that is authoritative for validating raw instances of the ResourceType. If both are specified, the ingestor must emit projections that conform to projectionSchema.",
208
+ "anyOf": [
209
+ {
210
+ "required": [
211
+ "projectionSchema"
212
+ ]
213
+ },
214
+ {
215
+ "required": [
216
+ "ingestorToolHandle"
217
+ ]
218
+ }
219
+ ]
220
+ },
221
+ {
222
+ "if": {
223
+ "required": [
224
+ "ingestorToolInputSchema"
225
+ ]
226
+ },
227
+ "then": {
228
+ "required": [
229
+ "ingestorToolHandle"
230
+ ]
231
+ }
232
+ }
233
+ ],
234
+ "unevaluatedProperties": false
235
+ },
236
+ "RoleName": {
237
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
238
+ "$ref": "#Name"
239
+ },
240
+ "ContainerKind": {
241
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
242
+ "type": "string",
243
+ "enum": [
244
+ "scalar",
245
+ "array",
246
+ "map"
247
+ ]
248
+ },
249
+ "RoleValue": {
250
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
251
+ "$comment": "Pairs a type reference (typeRef) with a container shape. typeRef may be a single atomic type reference or a finite sum type over atomic successful value alternatives.",
252
+ "type": "object",
253
+ "required": [
254
+ "typeRef",
255
+ "containerKind"
256
+ ],
257
+ "properties": {
258
+ "typeRef": {
259
+ "$ref": "#TypeRef"
260
+ },
261
+ "refinementSchema": {
262
+ "$comment": "Allows Tool authors to specify additional constraints on the role value beyond those expressible in the type system.",
263
+ "$ref": "#JsonSchemaObject"
264
+ },
265
+ "containerKind": {
266
+ "$ref": "#ContainerKind"
267
+ },
268
+ "containerSchema": {
269
+ "$ref": "#JsonSchemaObject"
270
+ },
271
+ "mapKeys": {
272
+ "$ref": "#RoleNameArray"
273
+ }
274
+ },
275
+ "allOf": [
276
+ {
277
+ "$comment": "If containerKind is scalar, containerSchema is forbidden. Otherwise, it is optional.",
278
+ "if": {
279
+ "properties": {
280
+ "containerKind": {
281
+ "const": "scalar"
282
+ }
283
+ }
284
+ },
285
+ "then": {
286
+ "not": {
287
+ "required": [
288
+ "containerSchema"
289
+ ]
290
+ }
291
+ }
292
+ },
293
+ {
294
+ "$comment": "If containerKind is array and containerSchema is provided, it must describe a homogeneous array (type=array with items; tuple-only schemas are disallowed).",
295
+ "if": {
296
+ "required": [
297
+ "containerSchema"
298
+ ],
299
+ "properties": {
300
+ "containerKind": {
301
+ "const": "array"
302
+ }
303
+ }
304
+ },
305
+ "then": {
306
+ "properties": {
307
+ "containerSchema": {
308
+ "type": "object",
309
+ "required": [
310
+ "type",
311
+ "items"
312
+ ],
313
+ "properties": {
314
+ "type": {
315
+ "const": "array"
316
+ },
317
+ "items": {
318
+ "type": "object"
319
+ }
320
+ },
321
+ "not": {
322
+ "required": [
323
+ "prefixItems"
324
+ ]
325
+ }
326
+ }
327
+ }
328
+ }
329
+ },
330
+ {
331
+ "$comment": "If containerKind is map and containerSchema is provided, it must describe a homogeneous map (type=object with additionalProperties; key-specific schemas are disallowed).",
332
+ "if": {
333
+ "required": [
334
+ "containerSchema"
335
+ ],
336
+ "properties": {
337
+ "containerKind": {
338
+ "const": "map"
339
+ }
340
+ }
341
+ },
342
+ "then": {
343
+ "properties": {
344
+ "containerSchema": {
345
+ "type": "object",
346
+ "required": [
347
+ "type",
348
+ "additionalProperties"
349
+ ],
350
+ "properties": {
351
+ "type": {
352
+ "const": "object"
353
+ },
354
+ "additionalProperties": {
355
+ "type": "object"
356
+ }
357
+ },
358
+ "not": {
359
+ "anyOf": [
360
+ {
361
+ "required": [
362
+ "properties"
363
+ ]
364
+ },
365
+ {
366
+ "required": [
367
+ "patternProperties"
368
+ ]
369
+ }
370
+ ]
371
+ }
372
+ }
373
+ }
374
+ }
375
+ },
376
+ {
377
+ "$comment": "If containerKind is map, mapKeys is optional (omit for open/dynamic keys, supply for statically-known fixed keys). On non-map containers, mapKeys is forbidden.",
378
+ "if": {
379
+ "properties": {
380
+ "containerKind": {
381
+ "const": "map"
382
+ }
383
+ }
384
+ },
385
+ "then": {},
386
+ "else": {
387
+ "not": {
388
+ "required": [
389
+ "mapKeys"
390
+ ]
391
+ }
392
+ }
393
+ }
394
+ ],
395
+ "unevaluatedProperties": false
396
+ },
397
+ "RoleValueByName": {
398
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
399
+ "type": "object",
400
+ "propertyNames": {
401
+ "$ref": "#RoleName"
402
+ },
403
+ "additionalProperties": {
404
+ "$ref": "#RoleValue"
405
+ }
406
+ },
407
+ "RoleNameArray": {
408
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
409
+ "type": "array",
410
+ "items": {
411
+ "$ref": "#RoleName"
412
+ }
413
+ },
414
+ "RoleSpec": {
415
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
416
+ "type": "object",
417
+ "required": [
418
+ "inputRoleValueByName",
419
+ "outputRoleValueByName"
420
+ ],
421
+ "properties": {
422
+ "inputRoleValueByName": {
423
+ "$ref": "#RoleValueByName"
424
+ },
425
+ "outputRoleValueByName": {
426
+ "$ref": "#RoleValueByName"
427
+ },
428
+ "refinementSchema": {
429
+ "$comment": "Allows Tool authors to specify additional constraints on the role assignment beyond those expressible in the type system.",
430
+ "$ref": "#JsonSchemaObject"
431
+ }
432
+ },
433
+ "unevaluatedProperties": false
434
+ },
435
+ "RoleSpecFacet": {
436
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
437
+ "type": "object",
438
+ "required": [
439
+ "roleSpec"
440
+ ],
441
+ "properties": {
442
+ "roleSpec": {
443
+ "$ref": "#RoleSpec"
444
+ }
445
+ }
446
+ },
447
+ "ToolHandle": {
448
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
449
+ "type": "string",
450
+ "pattern": "^TOOL-.+$"
451
+ },
452
+ "Tool": {
453
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
454
+ "type": "object",
455
+ "required": [
456
+ "handle",
457
+ "isTemplate"
458
+ ],
459
+ "properties": {
460
+ "handle": {
461
+ "$ref": "#ToolHandle"
462
+ },
463
+ "templateToolHandle": {
464
+ "$ref": "#ToolHandle"
465
+ },
466
+ "isTemplate": {
467
+ "type": "boolean"
468
+ },
469
+ "instantiationRoleSpec": {
470
+ "$ref": "#RoleSpec"
471
+ }
472
+ },
473
+ "$comment": "Template Tools own dispatch contract: Core scans all instantiation Tools grouped by templateToolHandle, derives a specializationKey from each instantiation tool's generic assignment by taking the canonical order of genericRoleName -> assigned ResourceType.resourceTypeHandle pairs, and asserts injectivity (no two instantiation Tools share the same key for the same template). At invocation time Core injects the specializationKey -> instantiationToolHandle lookup as the second input, then the template resolves the first input against it to return one instantiation Tool. Cross-resource compatibility between an instantiation Tool's roleSpec and the template's instantiationRoleSpec is deferred to the validation package.",
474
+ "semanticValidation": "Deferred: verify injectivity of specializationKey map per template; verify instantiation Tool roleSpec matches template instantiationRoleSpec; verify every supplied generic assignment key-set exactly equals roleSpec.inputRoleValueByName.GenericAssignmentByRoleName.mapKeys; verify every supplied generic assignment matches a registered specializationKey.",
475
+ "allOf": [
476
+ {
477
+ "$ref": "#DocumentationSpec"
478
+ },
479
+ {
480
+ "if": {
481
+ "required": [
482
+ "isTemplate"
483
+ ],
484
+ "properties": {
485
+ "isTemplate": {
486
+ "const": true
487
+ }
488
+ }
489
+ },
490
+ "then": {
491
+ "required": [
492
+ "instantiationRoleSpec"
493
+ ]
494
+ },
495
+ "else": {
496
+ "not": {
497
+ "required": [
498
+ "instantiationRoleSpec"
499
+ ]
500
+ }
501
+ }
502
+ },
503
+ {
504
+ "$comment": "Template Tools must declare named roles: two map inputs (GenericAssignmentByRoleName and InstantiationToolHandleBySpecializationKey) and one scalar TYPE-Tool output (InstantiationTool). GenericAssignmentByRoleName.mapKeys declares the generic parameter names accepted by the template. Runtime semantic validation enforces that each invocation's GenericAssignmentByRoleName object has exactly that key set: no missing keys, no extra keys. These keys are the generic parameter names later referenced via roleSchema refs such as #OperandType; they are not required to match the top-level role names of instantiationRoleSpec.",
505
+ "if": {
506
+ "required": [
507
+ "isTemplate"
508
+ ],
509
+ "properties": {
510
+ "isTemplate": {
511
+ "const": true
512
+ }
513
+ }
514
+ },
515
+ "then": {
516
+ "properties": {
517
+ "roleSpec": {
518
+ "properties": {
519
+ "inputRoleValueByName": {
520
+ "required": [
521
+ "GenericAssignmentByRoleName",
522
+ "InstantiationToolHandleBySpecializationKey"
523
+ ],
524
+ "properties": {
525
+ "GenericAssignmentByRoleName": {
526
+ "required": [
527
+ "containerKind",
528
+ "typeRef",
529
+ "mapKeys"
530
+ ],
531
+ "properties": {
532
+ "containerKind": {
533
+ "const": "map"
534
+ },
535
+ "typeRef": {
536
+ "required": [
537
+ "resourceTypeHandle"
538
+ ],
539
+ "properties": {
540
+ "resourceTypeHandle": {
541
+ "const": "TYPE-ResourceType"
542
+ }
543
+ }
544
+ },
545
+ "mapKeys": {
546
+ "type": "array",
547
+ "items": {
548
+ "$ref": "#RoleName"
549
+ },
550
+ "minItems": 1,
551
+ "uniqueItems": true
552
+ }
553
+ }
554
+ },
555
+ "InstantiationToolHandleBySpecializationKey": {
556
+ "required": [
557
+ "containerKind",
558
+ "typeRef"
559
+ ],
560
+ "properties": {
561
+ "containerKind": {
562
+ "const": "map"
563
+ },
564
+ "typeRef": {
565
+ "required": [
566
+ "resourceTypeHandle"
567
+ ],
568
+ "properties": {
569
+ "resourceTypeHandle": {
570
+ "const": "TYPE-Tool"
571
+ }
572
+ }
573
+ }
574
+ },
575
+ "not": {
576
+ "required": [
577
+ "mapKeys"
578
+ ]
579
+ }
580
+ }
581
+ },
582
+ "additionalProperties": false
583
+ },
584
+ "outputRoleValueByName": {
585
+ "required": [
586
+ "InstantiationTool"
587
+ ],
588
+ "properties": {
589
+ "InstantiationTool": {
590
+ "required": [
591
+ "containerKind",
592
+ "typeRef"
593
+ ],
594
+ "properties": {
595
+ "containerKind": {
596
+ "const": "scalar"
597
+ },
598
+ "typeRef": {
599
+ "required": [
600
+ "resourceTypeHandle"
601
+ ],
602
+ "properties": {
603
+ "resourceTypeHandle": {
604
+ "const": "TYPE-Tool"
605
+ }
606
+ }
607
+ }
608
+ }
609
+ }
610
+ },
611
+ "additionalProperties": false
612
+ }
613
+ }
614
+ }
615
+ }
616
+ }
617
+ },
618
+ {
619
+ "$ref": "#RoleSpecFacet"
620
+ }
621
+ ],
622
+ "unevaluatedProperties": false
623
+ },
624
+ "RoleBindingSpec": {
625
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
626
+ "type": "object",
627
+ "required": [
628
+ "inputBindings",
629
+ "outputBindings"
630
+ ],
631
+ "properties": {
632
+ "inputBindings": {
633
+ "$ref": "#RoleNameArray"
634
+ },
635
+ "outputBindings": {
636
+ "$ref": "#RoleNameArray"
637
+ }
638
+ },
639
+ "unevaluatedProperties": false
640
+ },
641
+ "RoleBindingSpecFacet": {
642
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
643
+ "type": "object",
644
+ "required": [
645
+ "roleBindingSpec"
646
+ ],
647
+ "properties": {
648
+ "roleBindingSpec": {
649
+ "$ref": "#RoleBindingSpec"
650
+ }
651
+ }
652
+ },
653
+ "StepKind": {
654
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
655
+ "type": "string",
656
+ "enum": [
657
+ "tool",
658
+ "branch",
659
+ "while",
660
+ "for"
661
+ ]
662
+ },
663
+ "StepKindFacet": {
664
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
665
+ "type": "object",
666
+ "required": [
667
+ "stepKind"
668
+ ],
669
+ "properties": {
670
+ "stepKind": {
671
+ "$ref": "#StepKind"
672
+ }
673
+ }
674
+ },
675
+ "ToolStep": {
676
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
677
+ "type": "object",
678
+ "required": [
679
+ "stepKind",
680
+ "toolHandle"
681
+ ],
682
+ "properties": {
683
+ "stepKind": {
684
+ "const": "tool"
685
+ },
686
+ "toolHandle": {
687
+ "$ref": "#ToolHandle"
688
+ }
689
+ },
690
+ "allOf": [
691
+ {
692
+ "$ref": "#StepKindFacet"
693
+ },
694
+ {
695
+ "$comment": "This will be overlaid dynamically to specify roleBindingSpec corresponding to the roleSpec of the underlying tool.",
696
+ "$ref": "#RoleBindingSpecFacet"
697
+ }
698
+ ]
699
+ },
700
+ "Case": {
701
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
702
+ "type": "object",
703
+ "required": [
704
+ "when",
705
+ "what"
706
+ ],
707
+ "properties": {
708
+ "when": {
709
+ "$ref": "#ToolStep"
710
+ },
711
+ "what": {
712
+ "$ref": "#ToolStep"
713
+ }
714
+ },
715
+ "unevaluatedProperties": false
716
+ },
717
+ "BranchStep": {
718
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
719
+ "type": "object",
720
+ "required": [
721
+ "stepKind",
722
+ "cases"
723
+ ],
724
+ "properties": {
725
+ "stepKind": {
726
+ "const": "branch"
727
+ },
728
+ "cases": {
729
+ "type": "array",
730
+ "items": {
731
+ "$ref": "#Case"
732
+ },
733
+ "minItems": 1,
734
+ "uniqueItems": true
735
+ }
736
+ },
737
+ "allOf": [
738
+ {
739
+ "$ref": "#StepKindFacet"
740
+ }
741
+ ]
742
+ },
743
+ "WhileStep": {
744
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
745
+ "type": "object",
746
+ "required": [
747
+ "stepKind",
748
+ "case"
749
+ ],
750
+ "properties": {
751
+ "stepKind": {
752
+ "const": "while"
753
+ },
754
+ "case": {
755
+ "$ref": "#Case"
756
+ }
757
+ },
758
+ "allOf": [
759
+ {
760
+ "$ref": "#StepKindFacet"
761
+ }
762
+ ]
763
+ },
764
+ "ForStep": {
765
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
766
+ "type": "object",
767
+ "required": [
768
+ "stepKind",
769
+ "case"
770
+ ],
771
+ "properties": {
772
+ "stepKind": {
773
+ "const": "for"
774
+ },
775
+ "case": {
776
+ "$ref": "#Case"
777
+ }
778
+ },
779
+ "allOf": [
780
+ {
781
+ "$ref": "#StepKindFacet"
782
+ }
783
+ ]
784
+ },
785
+ "Step": {
786
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
787
+ "type": "object",
788
+ "oneOf": [
789
+ {
790
+ "$ref": "#ToolStep"
791
+ },
792
+ {
793
+ "$ref": "#BranchStep"
794
+ },
795
+ {
796
+ "$ref": "#WhileStep"
797
+ },
798
+ {
799
+ "$ref": "#ForStep"
800
+ }
801
+ ],
802
+ "unevaluatedProperties": false
803
+ },
804
+ "OutputAddress": {
805
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
806
+ "type": "object",
807
+ "required": [
808
+ "roleName",
809
+ "toolStepPath"
810
+ ],
811
+ "properties": {
812
+ "roleName": {
813
+ "$ref": "#RoleName"
814
+ },
815
+ "toolStepPath": {
816
+ "$ref": "#ToolStepPath"
817
+ }
818
+ },
819
+ "unevaluatedProperties": false
820
+ },
821
+ "ProvenanceKind": {
822
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
823
+ "type": "string",
824
+ "enum": [
825
+ "genesis",
826
+ "strategy"
827
+ ]
828
+ },
829
+ "GenesisProvenance": {
830
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
831
+ "type": "object",
832
+ "required": [
833
+ "provenanceKind"
834
+ ],
835
+ "properties": {
836
+ "provenanceKind": {
837
+ "const": "genesis"
838
+ }
839
+ },
840
+ "unevaluatedProperties": false
841
+ },
842
+ "StrategyProvenance": {
843
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
844
+ "type": "object",
845
+ "required": [
846
+ "provenanceKind",
847
+ "strategyTraceHandle",
848
+ "outputAddress"
849
+ ],
850
+ "properties": {
851
+ "provenanceKind": {
852
+ "const": "strategy"
853
+ },
854
+ "strategyTraceHandle": {
855
+ "$ref": "#StrategyTraceHandle"
856
+ },
857
+ "outputAddress": {
858
+ "$ref": "#OutputAddress"
859
+ }
860
+ },
861
+ "unevaluatedProperties": false
862
+ },
863
+ "DeferredStrategyProvenance": {
864
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
865
+ "$comment": "Build-time strategy provenance without strategyTraceHandle. strategyTraceHandle is only known at runtime.",
866
+ "type": "object",
867
+ "required": [
868
+ "provenanceKind",
869
+ "outputAddress"
870
+ ],
871
+ "properties": {
872
+ "provenanceKind": {
873
+ "const": "strategy"
874
+ },
875
+ "outputAddress": {
876
+ "$ref": "#OutputAddress"
877
+ }
878
+ },
879
+ "unevaluatedProperties": false
880
+ },
881
+ "Provenance": {
882
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
883
+ "oneOf": [
884
+ {
885
+ "$ref": "#GenesisProvenance"
886
+ },
887
+ {
888
+ "$ref": "#StrategyProvenance"
889
+ }
890
+ ]
891
+ },
892
+ "ProvenanceFacet": {
893
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
894
+ "type": "object",
895
+ "required": [
896
+ "provenance"
897
+ ],
898
+ "properties": {
899
+ "provenance": {
900
+ "$ref": "#Provenance"
901
+ }
902
+ }
903
+ },
904
+ "ResourceId": {
905
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
906
+ "type": "string",
907
+ "pattern": "^RESOURCE-.+$"
908
+ },
909
+ "ResourcePointer": {
910
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
911
+ "type": "object",
912
+ "required": [
913
+ "id",
914
+ "resourceTypeHandle"
915
+ ],
916
+ "properties": {
917
+ "id": {
918
+ "$ref": "#ResourceId"
919
+ },
920
+ "resourceTypeHandle": {
921
+ "$ref": "#ResourceTypeHandle"
922
+ }
923
+ },
924
+ "allOf": [
925
+ {
926
+ "$ref": "#ProvenanceFacet"
927
+ }
928
+ ],
929
+ "unevaluatedProperties": false
930
+ },
931
+ "BaseResource": {
932
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
933
+ "type": "object",
934
+ "required": [
935
+ "projection"
936
+ ],
937
+ "properties": {
938
+ "projection": true
939
+ },
940
+ "$comment": "The projection field stores the Core-visible JSON projection of the Resource, not the raw underlying artifact. This will be overlaid dynamically to match the data structure of the underlying ResourceType's projectionSchema.",
941
+ "allOf": [
942
+ {
943
+ "$ref": "#ResourcePointer"
944
+ }
945
+ ]
946
+ },
947
+ "Resource": {
948
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
949
+ "type": "object",
950
+ "$ref": "#BaseResource",
951
+ "unevaluatedProperties": false
952
+ },
953
+ "StrategyStateInputKind": {
954
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
955
+ "type": "string",
956
+ "enum": [
957
+ "inputResource",
958
+ "externalInputPotential",
959
+ "internalInputPotential"
960
+ ]
961
+ },
962
+ "InputResource": {
963
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
964
+ "type": "object",
965
+ "required": [
966
+ "strategyStateInputKind"
967
+ ],
968
+ "properties": {
969
+ "strategyStateInputKind": {
970
+ "const": "inputResource"
971
+ }
972
+ },
973
+ "allOf": [
974
+ {
975
+ "$ref": "#BaseResource"
976
+ }
977
+ ],
978
+ "unevaluatedProperties": false
979
+ },
980
+ "ExternalInputPotential": {
981
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
982
+ "type": "object",
983
+ "required": [
984
+ "strategyStateInputKind",
985
+ "id",
986
+ "resourceTypeHandle"
987
+ ],
988
+ "properties": {
989
+ "strategyStateInputKind": {
990
+ "const": "externalInputPotential"
991
+ },
992
+ "id": {
993
+ "$ref": "#ResourceId"
994
+ },
995
+ "resourceTypeHandle": {
996
+ "$ref": "#ResourceTypeHandle"
997
+ }
998
+ },
999
+ "unevaluatedProperties": false
1000
+ },
1001
+ "InternalInputPotential": {
1002
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1003
+ "type": "object",
1004
+ "required": [
1005
+ "strategyStateInputKind",
1006
+ "id",
1007
+ "resourceTypeHandle",
1008
+ "provenance"
1009
+ ],
1010
+ "properties": {
1011
+ "strategyStateInputKind": {
1012
+ "const": "internalInputPotential"
1013
+ },
1014
+ "id": {
1015
+ "$ref": "#ResourceId"
1016
+ },
1017
+ "resourceTypeHandle": {
1018
+ "$ref": "#ResourceTypeHandle"
1019
+ },
1020
+ "provenance": {
1021
+ "$ref": "#DeferredStrategyProvenance"
1022
+ }
1023
+ },
1024
+ "unevaluatedProperties": false
1025
+ },
1026
+ "InputPotential": {
1027
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1028
+ "oneOf": [
1029
+ {
1030
+ "$ref": "#ExternalInputPotential"
1031
+ },
1032
+ {
1033
+ "$ref": "#InternalInputPotential"
1034
+ }
1035
+ ]
1036
+ },
1037
+ "StrategyStateInputEntry": {
1038
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1039
+ "oneOf": [
1040
+ {
1041
+ "$ref": "#InputPotential"
1042
+ },
1043
+ {
1044
+ "$ref": "#InputResource"
1045
+ }
1046
+ ]
1047
+ },
1048
+ "StrategyStateInputEntryByRoleName": {
1049
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1050
+ "type": "object",
1051
+ "propertyNames": {
1052
+ "$ref": "#RoleName"
1053
+ },
1054
+ "additionalProperties": {
1055
+ "$ref": "#StrategyStateInputEntry"
1056
+ }
1057
+ },
1058
+ "StepArray": {
1059
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1060
+ "type": "array",
1061
+ "items": {
1062
+ "$ref": "#Step"
1063
+ },
1064
+ "uniqueItems": true
1065
+ },
1066
+ "StepArrayArray": {
1067
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1068
+ "type": "array",
1069
+ "items": {
1070
+ "$ref": "#StepArray"
1071
+ }
1072
+ },
1073
+ "StepsFacet": {
1074
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1075
+ "type": "object",
1076
+ "required": [
1077
+ "steps"
1078
+ ],
1079
+ "properties": {
1080
+ "steps": {
1081
+ "$ref": "#StepArray"
1082
+ }
1083
+ }
1084
+ },
1085
+ "ToolStepPathSlot": {
1086
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1087
+ "type": "string",
1088
+ "enum": [
1089
+ "self",
1090
+ "case.when",
1091
+ "case.what",
1092
+ "cases.when",
1093
+ "cases.what"
1094
+ ]
1095
+ },
1096
+ "ToolStepPathSlotFacet": {
1097
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1098
+ "type": "object",
1099
+ "required": [
1100
+ "toolStepPathSlot"
1101
+ ],
1102
+ "properties": {
1103
+ "toolStepPathSlot": {
1104
+ "$ref": "#ToolStepPathSlot"
1105
+ }
1106
+ }
1107
+ },
1108
+ "BaseToolStepPathSpec": {
1109
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1110
+ "type": "object",
1111
+ "required": [
1112
+ "stepIndex",
1113
+ "toolStepPathSlot"
1114
+ ],
1115
+ "properties": {
1116
+ "stepIndex": {
1117
+ "$ref": "#Natural"
1118
+ },
1119
+ "toolStepPathSlot": {
1120
+ "$ref": "#ToolStepPathSlot"
1121
+ },
1122
+ "caseIndex": {
1123
+ "$ref": "#Natural"
1124
+ }
1125
+ },
1126
+ "allOf": [
1127
+ {
1128
+ "if": {
1129
+ "properties": {
1130
+ "toolStepPathSlot": {
1131
+ "enum": [
1132
+ "cases.when",
1133
+ "cases.what"
1134
+ ]
1135
+ }
1136
+ }
1137
+ },
1138
+ "then": {
1139
+ "required": [
1140
+ "caseIndex"
1141
+ ]
1142
+ }
1143
+ },
1144
+ {
1145
+ "if": {
1146
+ "properties": {
1147
+ "toolStepPathSlot": {
1148
+ "enum": [
1149
+ "self",
1150
+ "case.when",
1151
+ "case.what"
1152
+ ]
1153
+ }
1154
+ }
1155
+ },
1156
+ "then": {
1157
+ "not": {
1158
+ "required": [
1159
+ "caseIndex"
1160
+ ]
1161
+ }
1162
+ }
1163
+ }
1164
+ ]
1165
+ },
1166
+ "UnthreadedToolStepPathSpec": {
1167
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1168
+ "allOf": [
1169
+ {
1170
+ "$ref": "#BaseToolStepPathSpec"
1171
+ }
1172
+ ],
1173
+ "unevaluatedProperties": false
1174
+ },
1175
+ "ThreadedToolStepPathSpec": {
1176
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1177
+ "allOf": [
1178
+ {
1179
+ "$ref": "#BaseToolStepPathSpec"
1180
+ },
1181
+ {
1182
+ "type": "object",
1183
+ "required": [
1184
+ "threadIndex"
1185
+ ],
1186
+ "properties": {
1187
+ "threadIndex": {
1188
+ "$ref": "#Natural"
1189
+ }
1190
+ }
1191
+ }
1192
+ ],
1193
+ "unevaluatedProperties": false
1194
+ },
1195
+ "ToolStepPath": {
1196
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1197
+ "oneOf": [
1198
+ {
1199
+ "$ref": "#UnthreadedToolStepPath"
1200
+ },
1201
+ {
1202
+ "$ref": "#ThreadedToolStepPath"
1203
+ }
1204
+ ]
1205
+ },
1206
+ "UnthreadedToolStepPath": {
1207
+ "type": "string",
1208
+ "pattern": "^/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
1209
+ },
1210
+ "ThreadedToolStepPath": {
1211
+ "type": "string",
1212
+ "pattern": "^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
1213
+ },
1214
+ "UnthreadedStrategyState": {
1215
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1216
+ "type": "object",
1217
+ "propertyNames": {
1218
+ "$ref": "#UnthreadedToolStepPath"
1219
+ },
1220
+ "additionalProperties": {
1221
+ "$ref": "#StrategyStateInputEntryByRoleName"
1222
+ }
1223
+ },
1224
+ "ThreadedStrategyState": {
1225
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1226
+ "type": "object",
1227
+ "propertyNames": {
1228
+ "$ref": "#ThreadedToolStepPath"
1229
+ },
1230
+ "additionalProperties": {
1231
+ "$ref": "#StrategyStateInputEntryByRoleName"
1232
+ }
1233
+ },
1234
+ "UnthreadedStrategyStateFacet": {
1235
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1236
+ "type": "object",
1237
+ "required": [
1238
+ "strategyState"
1239
+ ],
1240
+ "properties": {
1241
+ "strategyState": {
1242
+ "$ref": "#UnthreadedStrategyState"
1243
+ }
1244
+ }
1245
+ },
1246
+ "ThreadedStrategyStateFacet": {
1247
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1248
+ "type": "object",
1249
+ "required": [
1250
+ "strategyState"
1251
+ ],
1252
+ "properties": {
1253
+ "strategyState": {
1254
+ "$ref": "#ThreadedStrategyState"
1255
+ }
1256
+ }
1257
+ },
1258
+ "StrategyKind": {
1259
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1260
+ "type": "string",
1261
+ "enum": [
1262
+ "unthreaded",
1263
+ "threaded"
1264
+ ]
1265
+ },
1266
+ "StrategyHandle": {
1267
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1268
+ "type": "string",
1269
+ "pattern": "^STRATEGY-.+$"
1270
+ },
1271
+ "BaseStrategy": {
1272
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1273
+ "type": "object",
1274
+ "required": [
1275
+ "handle",
1276
+ "strategyKind"
1277
+ ],
1278
+ "properties": {
1279
+ "handle": {
1280
+ "$ref": "#StrategyHandle"
1281
+ },
1282
+ "strategyKind": {
1283
+ "$ref": "#StrategyKind"
1284
+ }
1285
+ }
1286
+ },
1287
+ "UnthreadedStrategy": {
1288
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1289
+ "type": "object",
1290
+ "allOf": [
1291
+ {
1292
+ "$ref": "#BaseStrategy"
1293
+ },
1294
+ {
1295
+ "type": "object",
1296
+ "properties": {
1297
+ "strategyKind": {
1298
+ "const": "unthreaded"
1299
+ }
1300
+ }
1301
+ },
1302
+ {
1303
+ "$ref": "#StepsFacet"
1304
+ },
1305
+ {
1306
+ "$ref": "#UnthreadedStrategyStateFacet"
1307
+ }
1308
+ ],
1309
+ "unevaluatedProperties": false
1310
+ },
1311
+ "ThreadedStrategy": {
1312
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1313
+ "type": "object",
1314
+ "allOf": [
1315
+ {
1316
+ "$ref": "#BaseStrategy"
1317
+ },
1318
+ {
1319
+ "type": "object",
1320
+ "properties": {
1321
+ "strategyKind": {
1322
+ "const": "threaded"
1323
+ }
1324
+ }
1325
+ },
1326
+ {
1327
+ "$ref": "#StepsByThreadIndexFacet"
1328
+ },
1329
+ {
1330
+ "$ref": "#ThreadedStrategyStateFacet"
1331
+ }
1332
+ ],
1333
+ "unevaluatedProperties": false
1334
+ },
1335
+ "Strategy": {
1336
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1337
+ "oneOf": [
1338
+ {
1339
+ "$ref": "#UnthreadedStrategy"
1340
+ },
1341
+ {
1342
+ "$ref": "#ThreadedStrategy"
1343
+ }
1344
+ ]
1345
+ },
1346
+ "StepsByThreadIndexFacet": {
1347
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1348
+ "type": "object",
1349
+ "required": [
1350
+ "stepsByThreadIndex"
1351
+ ],
1352
+ "properties": {
1353
+ "stepsByThreadIndex": {
1354
+ "$ref": "#StepArrayArray"
1355
+ }
1356
+ }
1357
+ },
1358
+ "TracePointCounterSnapshot": {
1359
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1360
+ "type": "object",
1361
+ "properties": {
1362
+ "stepCounterAfter": {
1363
+ "$ref": "#Natural"
1364
+ },
1365
+ "iterationCounterAfter": {
1366
+ "$ref": "#Natural"
1367
+ }
1368
+ }
1369
+ },
1370
+ "TracePointDelta": {
1371
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1372
+ "type": "object",
1373
+ "properties": {
1374
+ "stepsMutation": {
1375
+ "type": "object",
1376
+ "required": [
1377
+ "insertAt",
1378
+ "insertedSteps"
1379
+ ],
1380
+ "properties": {
1381
+ "insertAt": {
1382
+ "$ref": "#Natural"
1383
+ },
1384
+ "insertedSteps": {
1385
+ "$ref": "#StepArray"
1386
+ }
1387
+ }
1388
+ },
1389
+ "strategyStateDelta": {
1390
+ "$ref": "#ThreadedStrategyState"
1391
+ },
1392
+ "interruptData": {
1393
+ "$comment": "Kept permissive; the engine may evolve interrupt payloads.",
1394
+ "type": [
1395
+ "object",
1396
+ "null"
1397
+ ]
1398
+ }
1399
+ }
1400
+ },
1401
+ "TracePointKind": {
1402
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1403
+ "type": "string",
1404
+ "enum": [
1405
+ "graph_start",
1406
+ "tick",
1407
+ "interrupt",
1408
+ "graph_end"
1409
+ ]
1410
+ },
1411
+ "BaseTracePoint": {
1412
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1413
+ "type": "object",
1414
+ "required": [
1415
+ "tracePointKind",
1416
+ "strategyHandle",
1417
+ "threadIndex",
1418
+ "tracePointIndex"
1419
+ ],
1420
+ "properties": {
1421
+ "tracePointKind": {
1422
+ "$ref": "#TracePointKind"
1423
+ },
1424
+ "strategyHandle": {
1425
+ "$ref": "#StrategyHandle"
1426
+ },
1427
+ "threadIndex": {
1428
+ "$ref": "#Natural"
1429
+ },
1430
+ "tracePointIndex": {
1431
+ "$ref": "#Natural"
1432
+ }
1433
+ }
1434
+ },
1435
+ "ThreadedStrategyFacet": {
1436
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1437
+ "type": "object",
1438
+ "required": [
1439
+ "threadedStrategy"
1440
+ ],
1441
+ "properties": {
1442
+ "threadedStrategy": {
1443
+ "$ref": "#ThreadedStrategy"
1444
+ }
1445
+ }
1446
+ },
1447
+ "GraphStartTracePoint": {
1448
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1449
+ "allOf": [
1450
+ {
1451
+ "$ref": "#BaseTracePoint"
1452
+ },
1453
+ {
1454
+ "type": "object",
1455
+ "properties": {
1456
+ "tracePointKind": {
1457
+ "const": "graph_start"
1458
+ }
1459
+ }
1460
+ },
1461
+ {
1462
+ "$ref": "#ThreadedStrategyFacet"
1463
+ }
1464
+ ]
1465
+ },
1466
+ "TickTracePoint": {
1467
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1468
+ "allOf": [
1469
+ {
1470
+ "$ref": "#BaseTracePoint"
1471
+ },
1472
+ {
1473
+ "type": "object",
1474
+ "required": [
1475
+ "counterSnapshot",
1476
+ "toolStepPath",
1477
+ "delta"
1478
+ ],
1479
+ "properties": {
1480
+ "tracePointKind": {
1481
+ "const": "tick"
1482
+ },
1483
+ "counterSnapshot": {
1484
+ "$ref": "#TracePointCounterSnapshot"
1485
+ },
1486
+ "toolStepPath": {
1487
+ "$ref": "#ThreadedToolStepPath"
1488
+ },
1489
+ "delta": {
1490
+ "$ref": "#TracePointDelta"
1491
+ }
1492
+ }
1493
+ }
1494
+ ]
1495
+ },
1496
+ "InterruptTracePoint": {
1497
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1498
+ "allOf": [
1499
+ {
1500
+ "$ref": "#BaseTracePoint"
1501
+ },
1502
+ {
1503
+ "type": "object",
1504
+ "required": [
1505
+ "counterSnapshot",
1506
+ "toolStepPath",
1507
+ "delta"
1508
+ ],
1509
+ "properties": {
1510
+ "tracePointKind": {
1511
+ "const": "interrupt"
1512
+ },
1513
+ "counterSnapshot": {
1514
+ "$ref": "#TracePointCounterSnapshot"
1515
+ },
1516
+ "toolStepPath": {
1517
+ "$ref": "#ThreadedToolStepPath"
1518
+ },
1519
+ "delta": {
1520
+ "allOf": [
1521
+ {
1522
+ "$ref": "#TracePointDelta"
1523
+ },
1524
+ {
1525
+ "type": "object",
1526
+ "required": [
1527
+ "interruptData"
1528
+ ],
1529
+ "properties": {
1530
+ "interruptData": {
1531
+ "$comment": "Interrupt events must include a non-null interrupt payload.",
1532
+ "type": "object"
1533
+ }
1534
+ }
1535
+ }
1536
+ ]
1537
+ }
1538
+ }
1539
+ }
1540
+ ]
1541
+ },
1542
+ "GraphEndTracePoint": {
1543
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1544
+ "allOf": [
1545
+ {
1546
+ "$ref": "#BaseTracePoint"
1547
+ },
1548
+ {
1549
+ "type": "object",
1550
+ "properties": {
1551
+ "tracePointKind": {
1552
+ "const": "graph_end"
1553
+ }
1554
+ }
1555
+ }
1556
+ ]
1557
+ },
1558
+ "TracePoint": {
1559
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1560
+ "type": "object",
1561
+ "oneOf": [
1562
+ {
1563
+ "$ref": "#GraphStartTracePoint"
1564
+ },
1565
+ {
1566
+ "$ref": "#TickTracePoint"
1567
+ },
1568
+ {
1569
+ "$ref": "#InterruptTracePoint"
1570
+ },
1571
+ {
1572
+ "$ref": "#GraphEndTracePoint"
1573
+ }
1574
+ ]
1575
+ },
1576
+ "StrategyTraceHandle": {
1577
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1578
+ "type": "string",
1579
+ "pattern": "^STRATEGY_TRACE-.+$"
1580
+ },
1581
+ "StrategyTrace": {
1582
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1583
+ "type": "object",
1584
+ "required": [
1585
+ "handle",
1586
+ "strategyHandle",
1587
+ "tracePoints"
1588
+ ],
1589
+ "properties": {
1590
+ "handle": {
1591
+ "$ref": "#StrategyTraceHandle"
1592
+ },
1593
+ "strategyHandle": {
1594
+ "$comment": "Could be derived from the first event but useful for indexing.",
1595
+ "$ref": "#StrategyHandle"
1596
+ },
1597
+ "tracePoints": {
1598
+ "type": "array",
1599
+ "items": {
1600
+ "$ref": "#TracePoint"
1601
+ }
1602
+ }
1603
+ },
1604
+ "unevaluatedProperties": false
1605
+ },
1606
+ "GoalHandle": {
1607
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1608
+ "type": "string",
1609
+ "pattern": "^GOAL-.+$"
1610
+ },
1611
+ "Goal": {
1612
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1613
+ "type": "object",
1614
+ "required": [
1615
+ "handle",
1616
+ "target"
1617
+ ],
1618
+ "properties": {
1619
+ "handle": {
1620
+ "$ref": "#GoalHandle"
1621
+ },
1622
+ "target": {
1623
+ "type": "integer",
1624
+ "minimum": 0
1625
+ },
1626
+ "disallowedTools": {
1627
+ "type": "array",
1628
+ "items": {
1629
+ "$ref": "#ToolHandle"
1630
+ }
1631
+ },
1632
+ "disallowedSequences": {
1633
+ "type": "array",
1634
+ "items": {
1635
+ "type": "array",
1636
+ "items": {
1637
+ "$ref": "#ToolHandle"
1638
+ }
1639
+ }
1640
+ },
1641
+ "minSteps": {
1642
+ "type": "integer",
1643
+ "minimum": 1
1644
+ },
1645
+ "maxSteps": {
1646
+ "type": "integer",
1647
+ "minimum": 1
1648
+ }
1649
+ },
1650
+ "unevaluatedProperties": false
1651
+ },
1652
+ "Error": {
1653
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1654
+ "type": "object",
1655
+ "allOf": [
1656
+ {
1657
+ "$ref": "#DocumentationSpec"
1658
+ },
1659
+ {
1660
+ "properties": {
1661
+ "details": {
1662
+ "type": "object"
1663
+ }
1664
+ }
1665
+ }
1666
+ ],
1667
+ "unevaluatedProperties": false
1668
+ },
1669
+ "Natural": {
1670
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1671
+ "type": "integer",
1672
+ "minimum": 0
1673
+ },
1674
+ "Boolean": {
1675
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1676
+ "type": "boolean"
1677
+ },
1678
+ "TimestampedResource": {
1679
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1680
+ "type": "object",
1681
+ "required": [
1682
+ "timestamp"
1683
+ ],
1684
+ "properties": {
1685
+ "timestamp": {
1686
+ "type": "string",
1687
+ "format": "date-time",
1688
+ "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$"
1689
+ }
1690
+ },
1691
+ "allOf": [
1692
+ {
1693
+ "$ref": "#Resource"
1694
+ }
1695
+ ],
1696
+ "unevaluatedProperties": false
1697
+ },
1698
+ "JsonScalarLink": {
1699
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1700
+ "type": "object",
1701
+ "required": [
1702
+ "kind",
1703
+ "filePath",
1704
+ "pointer"
1705
+ ],
1706
+ "properties": {
1707
+ "kind": {
1708
+ "const": "json-pointer"
1709
+ },
1710
+ "filePath": {
1711
+ "type": "string",
1712
+ "minLength": 1
1713
+ },
1714
+ "pointer": {
1715
+ "type": "string",
1716
+ "pattern": "^(?:/(?:[^~/]|~0|~1)*)+$",
1717
+ "$comment": "RFC 6901 JSON Pointer. Requires at least one reference token."
1718
+ }
1719
+ },
1720
+ "unevaluatedProperties": false
1721
+ },
1722
+ "Suite": {
1723
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1724
+ "type": "object",
1725
+ "allOf": [
1726
+ {
1727
+ "type": "object",
1728
+ "required": [
1729
+ "name",
1730
+ "version",
1731
+ "description"
1732
+ ],
1733
+ "properties": {
1734
+ "name": {
1735
+ "$ref": "#Name"
1736
+ },
1737
+ "version": {
1738
+ "type": "string",
1739
+ "minLength": 1
1740
+ },
1741
+ "description": {
1742
+ "$ref": "#Description"
1743
+ }
1744
+ }
1745
+ },
1746
+ {
1747
+ "type": "object",
1748
+ "required": [
1749
+ "resourceTypes",
1750
+ "tools"
1751
+ ],
1752
+ "properties": {
1753
+ "resourceTypes": {
1754
+ "type": "array",
1755
+ "items": {
1756
+ "$ref": "#ResourceType"
1757
+ },
1758
+ "uniqueItems": true
1759
+ },
1760
+ "tools": {
1761
+ "type": "array",
1762
+ "items": {
1763
+ "$ref": "#Tool"
1764
+ },
1765
+ "uniqueItems": true
1766
+ }
1767
+ }
1768
+ }
1769
+ ],
1770
+ "unevaluatedProperties": false
1771
+ },
1772
+ "SuiteIngestorInputSchema": {
1773
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
1774
+ "type": "object",
1775
+ "allOf": [
1776
+ {
1777
+ "type": "object",
1778
+ "required": [
1779
+ "name",
1780
+ "version",
1781
+ "description"
1782
+ ],
1783
+ "properties": {
1784
+ "name": {
1785
+ "oneOf": [
1786
+ {
1787
+ "$ref": "#Name"
1788
+ },
1789
+ {
1790
+ "$ref": "#JsonScalarLink"
1791
+ }
1792
+ ]
1793
+ },
1794
+ "version": {
1795
+ "oneOf": [
1796
+ {
1797
+ "type": "string",
1798
+ "minLength": 1
1799
+ },
1800
+ {
1801
+ "$ref": "#JsonScalarLink"
1802
+ }
1803
+ ]
1804
+ },
1805
+ "description": {
1806
+ "oneOf": [
1807
+ {
1808
+ "$ref": "#Description"
1809
+ },
1810
+ {
1811
+ "$ref": "#JsonScalarLink"
1812
+ }
1813
+ ]
1814
+ }
1815
+ }
1816
+ },
1817
+ {
1818
+ "type": "object",
1819
+ "required": [
1820
+ "resourceTypesPath",
1821
+ "toolsPath"
1822
+ ],
1823
+ "properties": {
1824
+ "resourceTypesPath": {
1825
+ "type": "string",
1826
+ "minLength": 1
1827
+ },
1828
+ "toolsPath": {
1829
+ "type": "string",
1830
+ "minLength": 1
1831
+ }
1832
+ }
1833
+ }
1834
+ ],
1835
+ "semanticValidation": "Verify that resourceTypesPath and toolsPath are relative paths rooted within the suite root, that toolproof.json provides the required suite metadata, and that the referenced files exist and match the expected declaration schemas.",
1836
+ "unevaluatedProperties": false
1837
+ }
1838
+ }
1839
1839
  }