@toolproof-core/genesis 1.0.54 → 1.0.56

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.
@@ -9,7 +9,6 @@ declare const CONSTANTS: {
9
9
  readonly BranchStep: "BranchStep";
10
10
  readonly Case: "Case";
11
11
  readonly ContainerKind: "ContainerKind";
12
- readonly DeferredStrategyProvenance: "DeferredStrategyProvenance";
13
12
  readonly Description: "Description";
14
13
  readonly DescriptionFacet: "DescriptionFacet";
15
14
  readonly DocumentationSpec: "DocumentationSpec";
@@ -31,7 +30,6 @@ declare const CONSTANTS: {
31
30
  readonly Name: "Name";
32
31
  readonly NameFacet: "NameFacet";
33
32
  readonly Natural: "Natural";
34
- readonly OutputAddress: "OutputAddress";
35
33
  readonly Provenance: "Provenance";
36
34
  readonly ProvenanceFacet: "ProvenanceFacet";
37
35
  readonly ProvenanceKind: "ProvenanceKind";
@@ -48,6 +46,7 @@ declare const CONSTANTS: {
48
46
  readonly RoleSpecFacet: "RoleSpecFacet";
49
47
  readonly RoleValue: "RoleValue";
50
48
  readonly RoleValueByName: "RoleValueByName";
49
+ readonly RuntimeProvenance: "RuntimeProvenance";
51
50
  readonly Step: "Step";
52
51
  readonly StepArray: "StepArray";
53
52
  readonly StepArrayArray: "StepArrayArray";
@@ -80,6 +79,7 @@ declare const CONSTANTS: {
80
79
  readonly ToolStepPath: "ToolStepPath";
81
80
  readonly ToolStepPathSlot: "ToolStepPathSlot";
82
81
  readonly ToolStepPathSlotFacet: "ToolStepPathSlotFacet";
82
+ readonly ToolStepRoleAddress: "ToolStepRoleAddress";
83
83
  readonly TracePoint: "TracePoint";
84
84
  readonly TracePointCounterSnapshot: "TracePointCounterSnapshot";
85
85
  readonly TracePointDelta: "TracePointDelta";
@@ -167,6 +167,7 @@ declare const CONSTANTS: {
167
167
  };
168
168
  readonly ProvenanceKind: {
169
169
  readonly genesis: "genesis";
170
+ readonly runtime: "runtime";
170
171
  readonly strategy: "strategy";
171
172
  };
172
173
  readonly StepKind: {
@@ -9,7 +9,6 @@ const CONSTANTS = {
9
9
  BranchStep: 'BranchStep',
10
10
  Case: 'Case',
11
11
  ContainerKind: 'ContainerKind',
12
- DeferredStrategyProvenance: 'DeferredStrategyProvenance',
13
12
  Description: 'Description',
14
13
  DescriptionFacet: 'DescriptionFacet',
15
14
  DocumentationSpec: 'DocumentationSpec',
@@ -31,7 +30,6 @@ const CONSTANTS = {
31
30
  Name: 'Name',
32
31
  NameFacet: 'NameFacet',
33
32
  Natural: 'Natural',
34
- OutputAddress: 'OutputAddress',
35
33
  Provenance: 'Provenance',
36
34
  ProvenanceFacet: 'ProvenanceFacet',
37
35
  ProvenanceKind: 'ProvenanceKind',
@@ -48,6 +46,7 @@ const CONSTANTS = {
48
46
  RoleSpecFacet: 'RoleSpecFacet',
49
47
  RoleValue: 'RoleValue',
50
48
  RoleValueByName: 'RoleValueByName',
49
+ RuntimeProvenance: 'RuntimeProvenance',
51
50
  Step: 'Step',
52
51
  StepArray: 'StepArray',
53
52
  StepArrayArray: 'StepArrayArray',
@@ -80,6 +79,7 @@ const CONSTANTS = {
80
79
  ToolStepPath: 'ToolStepPath',
81
80
  ToolStepPathSlot: 'ToolStepPathSlot',
82
81
  ToolStepPathSlotFacet: 'ToolStepPathSlotFacet',
82
+ ToolStepRoleAddress: 'ToolStepRoleAddress',
83
83
  TracePoint: 'TracePoint',
84
84
  TracePointCounterSnapshot: 'TracePointCounterSnapshot',
85
85
  TracePointDelta: 'TracePointDelta',
@@ -167,6 +167,7 @@ const CONSTANTS = {
167
167
  },
168
168
  ProvenanceKind: {
169
169
  genesis: 'genesis',
170
+ runtime: 'runtime',
170
171
  strategy: 'strategy',
171
172
  },
172
173
  StepKind: {
@@ -801,7 +801,7 @@
801
801
  ],
802
802
  "unevaluatedProperties": false
803
803
  },
804
- "OutputAddress": {
804
+ "ToolStepRoleAddress": {
805
805
  "$schema": "https://json-schema.org/draft/2020-12/schema",
806
806
  "type": "object",
807
807
  "required": [
@@ -823,6 +823,7 @@
823
823
  "type": "string",
824
824
  "enum": [
825
825
  "genesis",
826
+ "runtime",
826
827
  "strategy"
827
828
  ]
828
829
  },
@@ -839,41 +840,36 @@
839
840
  },
840
841
  "unevaluatedProperties": false
841
842
  },
842
- "StrategyProvenance": {
843
+ "RuntimeProvenance": {
843
844
  "$schema": "https://json-schema.org/draft/2020-12/schema",
844
845
  "type": "object",
845
846
  "required": [
846
- "provenanceKind",
847
- "strategyTraceHandle",
848
- "outputAddress"
847
+ "provenanceKind"
849
848
  ],
850
849
  "properties": {
851
850
  "provenanceKind": {
852
- "const": "strategy"
853
- },
854
- "strategyTraceHandle": {
855
- "$ref": "#/$defs/StrategyTraceHandle"
856
- },
857
- "outputAddress": {
858
- "$ref": "#/$defs/OutputAddress"
851
+ "const": "runtime"
859
852
  }
860
853
  },
861
854
  "unevaluatedProperties": false
862
855
  },
863
- "DeferredStrategyProvenance": {
856
+ "StrategyProvenance": {
864
857
  "$schema": "https://json-schema.org/draft/2020-12/schema",
865
- "$comment": "Build-time strategy provenance without strategyTraceHandle. strategyTraceHandle is only known at runtime.",
866
858
  "type": "object",
867
859
  "required": [
868
860
  "provenanceKind",
869
- "outputAddress"
861
+ "strategyTraceHandle",
862
+ "toolStepRoleAddress"
870
863
  ],
871
864
  "properties": {
872
865
  "provenanceKind": {
873
866
  "const": "strategy"
874
867
  },
875
- "outputAddress": {
876
- "$ref": "#/$defs/OutputAddress"
868
+ "strategyTraceHandle": {
869
+ "$ref": "#/$defs/StrategyTraceHandle"
870
+ },
871
+ "toolStepRoleAddress": {
872
+ "$ref": "#/$defs/ToolStepRoleAddress"
877
873
  }
878
874
  },
879
875
  "unevaluatedProperties": false
@@ -884,6 +880,9 @@
884
880
  {
885
881
  "$ref": "#/$defs/GenesisProvenance"
886
882
  },
883
+ {
884
+ "$ref": "#/$defs/RuntimeProvenance"
885
+ },
887
886
  {
888
887
  "$ref": "#/$defs/StrategyProvenance"
889
888
  }
@@ -981,19 +980,11 @@
981
980
  "$schema": "https://json-schema.org/draft/2020-12/schema",
982
981
  "type": "object",
983
982
  "required": [
984
- "strategyStateInputKind",
985
- "id",
986
- "resourceTypeHandle"
983
+ "strategyStateInputKind"
987
984
  ],
988
985
  "properties": {
989
986
  "strategyStateInputKind": {
990
987
  "const": "externalInputPotential"
991
- },
992
- "id": {
993
- "$ref": "#/$defs/ResourceId"
994
- },
995
- "resourceTypeHandle": {
996
- "$ref": "#/$defs/ResourceTypeHandle"
997
988
  }
998
989
  },
999
990
  "unevaluatedProperties": false
@@ -1003,22 +994,14 @@
1003
994
  "type": "object",
1004
995
  "required": [
1005
996
  "strategyStateInputKind",
1006
- "id",
1007
- "resourceTypeHandle",
1008
- "provenance"
997
+ "toolStepRoleAddress"
1009
998
  ],
1010
999
  "properties": {
1011
1000
  "strategyStateInputKind": {
1012
1001
  "const": "internalInputPotential"
1013
1002
  },
1014
- "id": {
1015
- "$ref": "#/$defs/ResourceId"
1016
- },
1017
- "resourceTypeHandle": {
1018
- "$ref": "#/$defs/ResourceTypeHandle"
1019
- },
1020
- "provenance": {
1021
- "$ref": "#/$defs/DeferredStrategyProvenance"
1003
+ "toolStepRoleAddress": {
1004
+ "$ref": "#/$defs/ToolStepRoleAddress"
1022
1005
  }
1023
1006
  },
1024
1007
  "unevaluatedProperties": false
@@ -70,6 +70,9 @@
70
70
  {
71
71
  "$ref": "#/$defs/GenesisProvenance"
72
72
  },
73
+ {
74
+ "$ref": "#/$defs/RuntimeProvenance"
75
+ },
73
76
  {
74
77
  "$ref": "#/$defs/StrategyProvenance"
75
78
  }
@@ -88,13 +91,26 @@
88
91
  },
89
92
  "unevaluatedProperties": false
90
93
  },
94
+ "RuntimeProvenance": {
95
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
96
+ "type": "object",
97
+ "required": [
98
+ "provenanceKind"
99
+ ],
100
+ "properties": {
101
+ "provenanceKind": {
102
+ "const": "runtime"
103
+ }
104
+ },
105
+ "unevaluatedProperties": false
106
+ },
91
107
  "StrategyProvenance": {
92
108
  "$schema": "https://json-schema.org/draft/2020-12/schema",
93
109
  "type": "object",
94
110
  "required": [
95
111
  "provenanceKind",
96
112
  "strategyTraceHandle",
97
- "outputAddress"
113
+ "toolStepRoleAddress"
98
114
  ],
99
115
  "properties": {
100
116
  "provenanceKind": {
@@ -103,8 +119,8 @@
103
119
  "strategyTraceHandle": {
104
120
  "$ref": "#/$defs/StrategyTraceHandle"
105
121
  },
106
- "outputAddress": {
107
- "$ref": "#/$defs/OutputAddress"
122
+ "toolStepRoleAddress": {
123
+ "$ref": "#/$defs/ToolStepRoleAddress"
108
124
  }
109
125
  },
110
126
  "unevaluatedProperties": false
@@ -114,7 +130,7 @@
114
130
  "type": "string",
115
131
  "pattern": "^STRATEGY_TRACE-.+$"
116
132
  },
117
- "OutputAddress": {
133
+ "ToolStepRoleAddress": {
118
134
  "$schema": "https://json-schema.org/draft/2020-12/schema",
119
135
  "type": "object",
120
136
  "required": [
@@ -428,19 +428,11 @@
428
428
  "$schema": "https://json-schema.org/draft/2020-12/schema",
429
429
  "type": "object",
430
430
  "required": [
431
- "strategyStateInputKind",
432
- "id",
433
- "resourceTypeHandle"
431
+ "strategyStateInputKind"
434
432
  ],
435
433
  "properties": {
436
434
  "strategyStateInputKind": {
437
435
  "const": "externalInputPotential"
438
- },
439
- "id": {
440
- "$ref": "#/$defs/ResourceId"
441
- },
442
- "resourceTypeHandle": {
443
- "$ref": "#/$defs/ResourceTypeHandle"
444
436
  }
445
437
  },
446
438
  "unevaluatedProperties": false
@@ -450,22 +442,14 @@
450
442
  "type": "object",
451
443
  "required": [
452
444
  "strategyStateInputKind",
453
- "id",
454
- "resourceTypeHandle",
455
- "provenance"
445
+ "toolStepRoleAddress"
456
446
  ],
457
447
  "properties": {
458
448
  "strategyStateInputKind": {
459
449
  "const": "internalInputPotential"
460
450
  },
461
- "id": {
462
- "$ref": "#/$defs/ResourceId"
463
- },
464
- "resourceTypeHandle": {
465
- "$ref": "#/$defs/ResourceTypeHandle"
466
- },
467
- "provenance": {
468
- "$ref": "#/$defs/DeferredStrategyProvenance"
451
+ "toolStepRoleAddress": {
452
+ "$ref": "#/$defs/ToolStepRoleAddress"
469
453
  }
470
454
  },
471
455
  "unevaluatedProperties": false
@@ -493,30 +477,19 @@
493
477
  "$ref": "#/$defs/RoleName"
494
478
  }
495
479
  },
496
- "ResourceId": {
497
- "$schema": "https://json-schema.org/draft/2020-12/schema",
498
- "type": "string",
499
- "pattern": "^RESOURCE-.+$"
500
- },
501
- "ResourceTypeHandle": {
502
- "$schema": "https://json-schema.org/draft/2020-12/schema",
503
- "type": "string",
504
- "pattern": "^TYPE-.+$"
505
- },
506
- "DeferredStrategyProvenance": {
480
+ "ToolStepRoleAddress": {
507
481
  "$schema": "https://json-schema.org/draft/2020-12/schema",
508
- "$comment": "Build-time strategy provenance without strategyTraceHandle. strategyTraceHandle is only known at runtime.",
509
482
  "type": "object",
510
483
  "required": [
511
- "provenanceKind",
512
- "outputAddress"
484
+ "roleName",
485
+ "toolStepPath"
513
486
  ],
514
487
  "properties": {
515
- "provenanceKind": {
516
- "const": "strategy"
488
+ "roleName": {
489
+ "$ref": "#/$defs/RoleName"
517
490
  },
518
- "outputAddress": {
519
- "$ref": "#/$defs/OutputAddress"
491
+ "toolStepPath": {
492
+ "$ref": "#/$defs/ToolStepPath"
520
493
  }
521
494
  },
522
495
  "unevaluatedProperties": false
@@ -543,22 +516,26 @@
543
516
  ],
544
517
  "unevaluatedProperties": false
545
518
  },
546
- "OutputAddress": {
519
+ "ToolStepPath": {
547
520
  "$schema": "https://json-schema.org/draft/2020-12/schema",
548
- "type": "object",
549
- "required": [
550
- "roleName",
551
- "toolStepPath"
552
- ],
553
- "properties": {
554
- "roleName": {
555
- "$ref": "#/$defs/RoleName"
521
+ "oneOf": [
522
+ {
523
+ "$ref": "#/$defs/UnthreadedToolStepPath"
556
524
  },
557
- "toolStepPath": {
558
- "$ref": "#/$defs/ToolStepPath"
525
+ {
526
+ "$ref": "#/$defs/ThreadedToolStepPath"
559
527
  }
560
- },
561
- "unevaluatedProperties": false
528
+ ]
529
+ },
530
+ "ResourceId": {
531
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
532
+ "type": "string",
533
+ "pattern": "^RESOURCE-.+$"
534
+ },
535
+ "ResourceTypeHandle": {
536
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
537
+ "type": "string",
538
+ "pattern": "^TYPE-.+$"
562
539
  },
563
540
  "ProvenanceFacet": {
564
541
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -572,23 +549,15 @@
572
549
  }
573
550
  }
574
551
  },
575
- "ToolStepPath": {
576
- "$schema": "https://json-schema.org/draft/2020-12/schema",
577
- "oneOf": [
578
- {
579
- "$ref": "#/$defs/UnthreadedToolStepPath"
580
- },
581
- {
582
- "$ref": "#/$defs/ThreadedToolStepPath"
583
- }
584
- ]
585
- },
586
552
  "Provenance": {
587
553
  "$schema": "https://json-schema.org/draft/2020-12/schema",
588
554
  "oneOf": [
589
555
  {
590
556
  "$ref": "#/$defs/GenesisProvenance"
591
557
  },
558
+ {
559
+ "$ref": "#/$defs/RuntimeProvenance"
560
+ },
592
561
  {
593
562
  "$ref": "#/$defs/StrategyProvenance"
594
563
  }
@@ -607,13 +576,26 @@
607
576
  },
608
577
  "unevaluatedProperties": false
609
578
  },
579
+ "RuntimeProvenance": {
580
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
581
+ "type": "object",
582
+ "required": [
583
+ "provenanceKind"
584
+ ],
585
+ "properties": {
586
+ "provenanceKind": {
587
+ "const": "runtime"
588
+ }
589
+ },
590
+ "unevaluatedProperties": false
591
+ },
610
592
  "StrategyProvenance": {
611
593
  "$schema": "https://json-schema.org/draft/2020-12/schema",
612
594
  "type": "object",
613
595
  "required": [
614
596
  "provenanceKind",
615
597
  "strategyTraceHandle",
616
- "outputAddress"
598
+ "toolStepRoleAddress"
617
599
  ],
618
600
  "properties": {
619
601
  "provenanceKind": {
@@ -622,8 +604,8 @@
622
604
  "strategyTraceHandle": {
623
605
  "$ref": "#/$defs/StrategyTraceHandle"
624
606
  },
625
- "outputAddress": {
626
- "$ref": "#/$defs/OutputAddress"
607
+ "toolStepRoleAddress": {
608
+ "$ref": "#/$defs/ToolStepRoleAddress"
627
609
  }
628
610
  },
629
611
  "unevaluatedProperties": false
@@ -608,19 +608,11 @@
608
608
  "$schema": "https://json-schema.org/draft/2020-12/schema",
609
609
  "type": "object",
610
610
  "required": [
611
- "strategyStateInputKind",
612
- "id",
613
- "resourceTypeHandle"
611
+ "strategyStateInputKind"
614
612
  ],
615
613
  "properties": {
616
614
  "strategyStateInputKind": {
617
615
  "const": "externalInputPotential"
618
- },
619
- "id": {
620
- "$ref": "#/$defs/ResourceId"
621
- },
622
- "resourceTypeHandle": {
623
- "$ref": "#/$defs/ResourceTypeHandle"
624
616
  }
625
617
  },
626
618
  "unevaluatedProperties": false
@@ -630,22 +622,14 @@
630
622
  "type": "object",
631
623
  "required": [
632
624
  "strategyStateInputKind",
633
- "id",
634
- "resourceTypeHandle",
635
- "provenance"
625
+ "toolStepRoleAddress"
636
626
  ],
637
627
  "properties": {
638
628
  "strategyStateInputKind": {
639
629
  "const": "internalInputPotential"
640
630
  },
641
- "id": {
642
- "$ref": "#/$defs/ResourceId"
643
- },
644
- "resourceTypeHandle": {
645
- "$ref": "#/$defs/ResourceTypeHandle"
646
- },
647
- "provenance": {
648
- "$ref": "#/$defs/DeferredStrategyProvenance"
631
+ "toolStepRoleAddress": {
632
+ "$ref": "#/$defs/ToolStepRoleAddress"
649
633
  }
650
634
  },
651
635
  "unevaluatedProperties": false
@@ -673,30 +657,19 @@
673
657
  "$ref": "#/$defs/RoleName"
674
658
  }
675
659
  },
676
- "ResourceId": {
677
- "$schema": "https://json-schema.org/draft/2020-12/schema",
678
- "type": "string",
679
- "pattern": "^RESOURCE-.+$"
680
- },
681
- "ResourceTypeHandle": {
660
+ "ToolStepRoleAddress": {
682
661
  "$schema": "https://json-schema.org/draft/2020-12/schema",
683
- "type": "string",
684
- "pattern": "^TYPE-.+$"
685
- },
686
- "DeferredStrategyProvenance": {
687
- "$schema": "https://json-schema.org/draft/2020-12/schema",
688
- "$comment": "Build-time strategy provenance without strategyTraceHandle. strategyTraceHandle is only known at runtime.",
689
662
  "type": "object",
690
663
  "required": [
691
- "provenanceKind",
692
- "outputAddress"
664
+ "roleName",
665
+ "toolStepPath"
693
666
  ],
694
667
  "properties": {
695
- "provenanceKind": {
696
- "const": "strategy"
668
+ "roleName": {
669
+ "$ref": "#/$defs/RoleName"
697
670
  },
698
- "outputAddress": {
699
- "$ref": "#/$defs/OutputAddress"
671
+ "toolStepPath": {
672
+ "$ref": "#/$defs/ToolStepPath"
700
673
  }
701
674
  },
702
675
  "unevaluatedProperties": false
@@ -723,22 +696,26 @@
723
696
  ],
724
697
  "unevaluatedProperties": false
725
698
  },
726
- "OutputAddress": {
699
+ "ToolStepPath": {
727
700
  "$schema": "https://json-schema.org/draft/2020-12/schema",
728
- "type": "object",
729
- "required": [
730
- "roleName",
731
- "toolStepPath"
732
- ],
733
- "properties": {
734
- "roleName": {
735
- "$ref": "#/$defs/RoleName"
701
+ "oneOf": [
702
+ {
703
+ "$ref": "#/$defs/UnthreadedToolStepPath"
736
704
  },
737
- "toolStepPath": {
738
- "$ref": "#/$defs/ToolStepPath"
705
+ {
706
+ "$ref": "#/$defs/ThreadedToolStepPath"
739
707
  }
740
- },
741
- "unevaluatedProperties": false
708
+ ]
709
+ },
710
+ "ResourceId": {
711
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
712
+ "type": "string",
713
+ "pattern": "^RESOURCE-.+$"
714
+ },
715
+ "ResourceTypeHandle": {
716
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
717
+ "type": "string",
718
+ "pattern": "^TYPE-.+$"
742
719
  },
743
720
  "ProvenanceFacet": {
744
721
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -752,16 +729,9 @@
752
729
  }
753
730
  }
754
731
  },
755
- "ToolStepPath": {
756
- "$schema": "https://json-schema.org/draft/2020-12/schema",
757
- "oneOf": [
758
- {
759
- "$ref": "#/$defs/UnthreadedToolStepPath"
760
- },
761
- {
762
- "$ref": "#/$defs/ThreadedToolStepPath"
763
- }
764
- ]
732
+ "UnthreadedToolStepPath": {
733
+ "type": "string",
734
+ "pattern": "^/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
765
735
  },
766
736
  "Provenance": {
767
737
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -769,15 +739,14 @@
769
739
  {
770
740
  "$ref": "#/$defs/GenesisProvenance"
771
741
  },
742
+ {
743
+ "$ref": "#/$defs/RuntimeProvenance"
744
+ },
772
745
  {
773
746
  "$ref": "#/$defs/StrategyProvenance"
774
747
  }
775
748
  ]
776
749
  },
777
- "UnthreadedToolStepPath": {
778
- "type": "string",
779
- "pattern": "^/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$"
780
- },
781
750
  "GenesisProvenance": {
782
751
  "$schema": "https://json-schema.org/draft/2020-12/schema",
783
752
  "type": "object",
@@ -791,13 +760,26 @@
791
760
  },
792
761
  "unevaluatedProperties": false
793
762
  },
763
+ "RuntimeProvenance": {
764
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
765
+ "type": "object",
766
+ "required": [
767
+ "provenanceKind"
768
+ ],
769
+ "properties": {
770
+ "provenanceKind": {
771
+ "const": "runtime"
772
+ }
773
+ },
774
+ "unevaluatedProperties": false
775
+ },
794
776
  "StrategyProvenance": {
795
777
  "$schema": "https://json-schema.org/draft/2020-12/schema",
796
778
  "type": "object",
797
779
  "required": [
798
780
  "provenanceKind",
799
781
  "strategyTraceHandle",
800
- "outputAddress"
782
+ "toolStepRoleAddress"
801
783
  ],
802
784
  "properties": {
803
785
  "provenanceKind": {
@@ -806,8 +788,8 @@
806
788
  "strategyTraceHandle": {
807
789
  "$ref": "#/$defs/StrategyTraceHandle"
808
790
  },
809
- "outputAddress": {
810
- "$ref": "#/$defs/OutputAddress"
791
+ "toolStepRoleAddress": {
792
+ "$ref": "#/$defs/ToolStepRoleAddress"
811
793
  }
812
794
  },
813
795
  "unevaluatedProperties": false
@@ -3,16 +3,17 @@ import { z } from 'zod/v4';
3
3
  const BaseResourceSchema = z.lazy(() => z.object({ "projection": z.any(), "id": ResourceIdSchema, "resourceTypeHandle": ResourceTypeHandleSchema, "provenance": ProvenanceSchema }).strict());
4
4
  const GenesisProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("genesis") }).strict());
5
5
  const NameSchema = z.lazy(() => z.string().min(1).regex(new RegExp("^[A-Z][a-zA-Z0-9]*$")));
6
- const OutputAddressSchema = z.lazy(() => z.object({ "roleName": RoleNameSchema, "toolStepPath": ToolStepPathSchema }).strict());
7
- const ProvenanceSchema = z.lazy(() => z.union([GenesisProvenanceSchema, StrategyProvenanceSchema]));
6
+ const ProvenanceSchema = z.lazy(() => z.union([GenesisProvenanceSchema, RuntimeProvenanceSchema, StrategyProvenanceSchema]));
8
7
  const ProvenanceFacetSchema = z.lazy(() => z.object({ "provenance": ProvenanceSchema }));
9
8
  const ResourceIdSchema = z.lazy(() => z.string().regex(new RegExp("^RESOURCE-.+$")));
10
9
  const ResourcePointerSchema = z.lazy(() => z.object({ "id": ResourceIdSchema, "resourceTypeHandle": ResourceTypeHandleSchema, "provenance": ProvenanceSchema }).strict());
11
10
  const ResourceTypeHandleSchema = z.lazy(() => z.string().regex(new RegExp("^TYPE-.+$")));
12
11
  const RoleNameSchema = z.lazy(() => NameSchema);
13
- const StrategyProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("strategy"), "strategyTraceHandle": StrategyTraceHandleSchema, "outputAddress": OutputAddressSchema }).strict());
12
+ const RuntimeProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("runtime") }).strict());
13
+ const StrategyProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("strategy"), "strategyTraceHandle": StrategyTraceHandleSchema, "toolStepRoleAddress": ToolStepRoleAddressSchema }).strict());
14
14
  const StrategyTraceHandleSchema = z.lazy(() => z.string().regex(new RegExp("^STRATEGY_TRACE-.+$")));
15
15
  const ThreadedToolStepPathSchema = z.lazy(() => z.string().regex(new RegExp("^/threads/[0-9]+/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$")));
16
16
  const ToolStepPathSchema = z.lazy(() => z.union([UnthreadedToolStepPathSchema, ThreadedToolStepPathSchema]));
17
+ const ToolStepRoleAddressSchema = z.lazy(() => z.object({ "roleName": RoleNameSchema, "toolStepPath": ToolStepPathSchema }).strict());
17
18
  const UnthreadedToolStepPathSchema = z.lazy(() => z.string().regex(new RegExp("^/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$")));
18
19
  export const ResourceSchema = z.lazy(() => BaseResourceSchema);
@@ -18,16 +18,14 @@ const BaseResourceSchema = z.lazy(() => z.object({ "projection": z.any(), "id":
18
18
  const BaseStrategySchema = z.lazy(() => z.object({ "handle": StrategyHandleSchema, "strategyKind": StrategyKindSchema }));
19
19
  const BranchStepSchema = z.lazy(() => z.object({ "stepKind": z.intersection(z.literal("branch"), StepKindSchema), "cases": z.array(CaseSchema).min(1) }));
20
20
  const CaseSchema = z.lazy(() => z.object({ "when": ToolStepSchema, "what": ToolStepSchema }).strict());
21
- const DeferredStrategyProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("strategy"), "outputAddress": OutputAddressSchema }).strict());
22
- const ExternalInputPotentialSchema = z.lazy(() => z.object({ "strategyStateInputKind": z.literal("externalInputPotential"), "id": ResourceIdSchema, "resourceTypeHandle": ResourceTypeHandleSchema }).strict());
21
+ const ExternalInputPotentialSchema = z.lazy(() => z.object({ "strategyStateInputKind": z.literal("externalInputPotential") }).strict());
23
22
  const ForStepSchema = z.lazy(() => z.object({ "stepKind": z.intersection(z.literal("for"), StepKindSchema), "case": CaseSchema }));
24
23
  const GenesisProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("genesis") }).strict());
25
24
  const InputPotentialSchema = z.lazy(() => z.union([ExternalInputPotentialSchema, InternalInputPotentialSchema]));
26
25
  const InputResourceSchema = z.lazy(() => z.object({ "strategyStateInputKind": z.literal("inputResource"), "projection": z.any(), "id": ResourceIdSchema, "resourceTypeHandle": ResourceTypeHandleSchema, "provenance": ProvenanceSchema }).strict());
27
- const InternalInputPotentialSchema = z.lazy(() => z.object({ "strategyStateInputKind": z.literal("internalInputPotential"), "id": ResourceIdSchema, "resourceTypeHandle": ResourceTypeHandleSchema, "provenance": DeferredStrategyProvenanceSchema }).strict());
26
+ const InternalInputPotentialSchema = z.lazy(() => z.object({ "strategyStateInputKind": z.literal("internalInputPotential"), "toolStepRoleAddress": ToolStepRoleAddressSchema }).strict());
28
27
  const NameSchema = z.lazy(() => z.string().min(1).regex(new RegExp("^[A-Z][a-zA-Z0-9]*$")));
29
- const OutputAddressSchema = z.lazy(() => z.object({ "roleName": RoleNameSchema, "toolStepPath": ToolStepPathSchema }).strict());
30
- const ProvenanceSchema = z.lazy(() => z.union([GenesisProvenanceSchema, StrategyProvenanceSchema]));
28
+ const ProvenanceSchema = z.lazy(() => z.union([GenesisProvenanceSchema, RuntimeProvenanceSchema, StrategyProvenanceSchema]));
31
29
  const ProvenanceFacetSchema = z.lazy(() => z.object({ "provenance": ProvenanceSchema }));
32
30
  const ResourceIdSchema = z.lazy(() => z.string().regex(new RegExp("^RESOURCE-.+$")));
33
31
  const ResourcePointerSchema = z.lazy(() => z.object({ "id": ResourceIdSchema, "resourceTypeHandle": ResourceTypeHandleSchema, "provenance": ProvenanceSchema }).strict());
@@ -36,6 +34,7 @@ const RoleBindingSpecSchema = z.lazy(() => z.object({ "inputBindings": RoleNameA
36
34
  const RoleBindingSpecFacetSchema = z.lazy(() => z.object({ "roleBindingSpec": RoleBindingSpecSchema }));
37
35
  const RoleNameSchema = z.lazy(() => NameSchema);
38
36
  const RoleNameArraySchema = z.lazy(() => z.array(RoleNameSchema));
37
+ const RuntimeProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("runtime") }).strict());
39
38
  const StepSchema = z.lazy(() => z.union([ToolStepSchema, BranchStepSchema, WhileStepSchema, ForStepSchema]));
40
39
  const StepArraySchema = z.lazy(() => z.array(StepSchema));
41
40
  const StepArrayArraySchema = z.lazy(() => z.array(StepArraySchema));
@@ -45,7 +44,7 @@ const StepsByThreadIndexFacetSchema = z.lazy(() => z.object({ "stepsByThreadInde
45
44
  const StepsFacetSchema = z.lazy(() => z.object({ "steps": StepArraySchema }));
46
45
  const StrategyHandleSchema = z.lazy(() => z.string().regex(new RegExp("^STRATEGY-.+$")));
47
46
  const StrategyKindSchema = z.lazy(() => z.union([z.literal("unthreaded"), z.literal("threaded")]));
48
- const StrategyProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("strategy"), "strategyTraceHandle": StrategyTraceHandleSchema, "outputAddress": OutputAddressSchema }).strict());
47
+ const StrategyProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("strategy"), "strategyTraceHandle": StrategyTraceHandleSchema, "toolStepRoleAddress": ToolStepRoleAddressSchema }).strict());
49
48
  const StrategyStateInputEntrySchema = z.lazy(() => z.union([InputPotentialSchema, InputResourceSchema]));
50
49
  const StrategyStateInputEntryByRoleNameSchema = z.lazy(() => z.record(z.string(), StrategyStateInputEntrySchema));
51
50
  const StrategyTraceHandleSchema = z.lazy(() => z.string().regex(new RegExp("^STRATEGY_TRACE-.+$")));
@@ -59,6 +58,7 @@ const ThreadedToolStepPathSchema = z.lazy(() => z.string().regex(new RegExp("^/t
59
58
  const ToolHandleSchema = z.lazy(() => z.string().regex(new RegExp("^TOOL-.+$")));
60
59
  const ToolStepSchema = z.lazy(() => z.object({ "stepKind": z.intersection(z.literal("tool"), StepKindSchema), "toolHandle": ToolHandleSchema, "roleBindingSpec": RoleBindingSpecSchema }));
61
60
  const ToolStepPathSchema = z.lazy(() => z.union([UnthreadedToolStepPathSchema, ThreadedToolStepPathSchema]));
61
+ const ToolStepRoleAddressSchema = z.lazy(() => z.object({ "roleName": RoleNameSchema, "toolStepPath": ToolStepPathSchema }).strict());
62
62
  const UnthreadedStrategySchema = z.lazy(() => z.object({ "handle": StrategyHandleSchema, "strategyKind": z.intersection(StrategyKindSchema, z.literal("unthreaded")), "steps": StepArraySchema, "strategyState": UnthreadedStrategyStateSchema }).strict());
63
63
  const UnthreadedStrategyStateSchema = z.lazy(() => z.record(z.string(), StrategyStateInputEntryByRoleNameSchema).superRefine((obj, ctx) => { for (const k of Object.keys(obj)) {
64
64
  if (!new RegExp("^/steps/[0-9]+/(self|case/when|case/what|cases/[0-9]+/when|cases/[0-9]+/what)$").test(k))
@@ -19,20 +19,18 @@ const BaseStrategySchema = z.lazy(() => z.object({ "handle": StrategyHandleSchem
19
19
  const BaseTracePointSchema = z.lazy(() => z.object({ "tracePointKind": TracePointKindSchema, "strategyHandle": StrategyHandleSchema, "threadIndex": NaturalSchema, "tracePointIndex": NaturalSchema }));
20
20
  const BranchStepSchema = z.lazy(() => z.object({ "stepKind": z.intersection(z.literal("branch"), StepKindSchema), "cases": z.array(CaseSchema).min(1) }));
21
21
  const CaseSchema = z.lazy(() => z.object({ "when": ToolStepSchema, "what": ToolStepSchema }).strict());
22
- const DeferredStrategyProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("strategy"), "outputAddress": OutputAddressSchema }).strict());
23
- const ExternalInputPotentialSchema = z.lazy(() => z.object({ "strategyStateInputKind": z.literal("externalInputPotential"), "id": ResourceIdSchema, "resourceTypeHandle": ResourceTypeHandleSchema }).strict());
22
+ const ExternalInputPotentialSchema = z.lazy(() => z.object({ "strategyStateInputKind": z.literal("externalInputPotential") }).strict());
24
23
  const ForStepSchema = z.lazy(() => z.object({ "stepKind": z.intersection(z.literal("for"), StepKindSchema), "case": CaseSchema }));
25
24
  const GenesisProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("genesis") }).strict());
26
25
  const GraphEndTracePointSchema = z.lazy(() => z.object({ "tracePointKind": z.intersection(TracePointKindSchema, z.literal("graph_end")), "strategyHandle": StrategyHandleSchema, "threadIndex": NaturalSchema, "tracePointIndex": NaturalSchema }));
27
26
  const GraphStartTracePointSchema = z.lazy(() => z.object({ "tracePointKind": z.intersection(TracePointKindSchema, z.literal("graph_start")), "strategyHandle": StrategyHandleSchema, "threadIndex": NaturalSchema, "tracePointIndex": NaturalSchema, "threadedStrategy": ThreadedStrategySchema }));
28
27
  const InputPotentialSchema = z.lazy(() => z.union([ExternalInputPotentialSchema, InternalInputPotentialSchema]));
29
28
  const InputResourceSchema = z.lazy(() => z.object({ "strategyStateInputKind": z.literal("inputResource"), "projection": z.any(), "id": ResourceIdSchema, "resourceTypeHandle": ResourceTypeHandleSchema, "provenance": ProvenanceSchema }).strict());
30
- const InternalInputPotentialSchema = z.lazy(() => z.object({ "strategyStateInputKind": z.literal("internalInputPotential"), "id": ResourceIdSchema, "resourceTypeHandle": ResourceTypeHandleSchema, "provenance": DeferredStrategyProvenanceSchema }).strict());
29
+ const InternalInputPotentialSchema = z.lazy(() => z.object({ "strategyStateInputKind": z.literal("internalInputPotential"), "toolStepRoleAddress": ToolStepRoleAddressSchema }).strict());
31
30
  const InterruptTracePointSchema = z.lazy(() => z.object({ "tracePointKind": z.intersection(TracePointKindSchema, z.literal("interrupt")), "strategyHandle": StrategyHandleSchema, "threadIndex": NaturalSchema, "tracePointIndex": NaturalSchema, "counterSnapshot": TracePointCounterSnapshotSchema, "toolStepPath": ThreadedToolStepPathSchema, "delta": z.object({ "stepsMutation": z.object({ "insertAt": NaturalSchema, "insertedSteps": StepArraySchema }).optional(), "strategyStateDelta": ThreadedStrategyStateSchema.optional(), "interruptData": z.intersection(z.union([z.object({}), z.null()]), z.object({})) }) }));
32
31
  const NameSchema = z.lazy(() => z.string().min(1).regex(new RegExp("^[A-Z][a-zA-Z0-9]*$")));
33
32
  const NaturalSchema = z.lazy(() => z.number().int().min(0));
34
- const OutputAddressSchema = z.lazy(() => z.object({ "roleName": RoleNameSchema, "toolStepPath": ToolStepPathSchema }).strict());
35
- const ProvenanceSchema = z.lazy(() => z.union([GenesisProvenanceSchema, StrategyProvenanceSchema]));
33
+ const ProvenanceSchema = z.lazy(() => z.union([GenesisProvenanceSchema, RuntimeProvenanceSchema, StrategyProvenanceSchema]));
36
34
  const ProvenanceFacetSchema = z.lazy(() => z.object({ "provenance": ProvenanceSchema }));
37
35
  const ResourceIdSchema = z.lazy(() => z.string().regex(new RegExp("^RESOURCE-.+$")));
38
36
  const ResourcePointerSchema = z.lazy(() => z.object({ "id": ResourceIdSchema, "resourceTypeHandle": ResourceTypeHandleSchema, "provenance": ProvenanceSchema }).strict());
@@ -41,6 +39,7 @@ const RoleBindingSpecSchema = z.lazy(() => z.object({ "inputBindings": RoleNameA
41
39
  const RoleBindingSpecFacetSchema = z.lazy(() => z.object({ "roleBindingSpec": RoleBindingSpecSchema }));
42
40
  const RoleNameSchema = z.lazy(() => NameSchema);
43
41
  const RoleNameArraySchema = z.lazy(() => z.array(RoleNameSchema));
42
+ const RuntimeProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("runtime") }).strict());
44
43
  const StepSchema = z.lazy(() => z.union([ToolStepSchema, BranchStepSchema, WhileStepSchema, ForStepSchema]));
45
44
  const StepArraySchema = z.lazy(() => z.array(StepSchema));
46
45
  const StepArrayArraySchema = z.lazy(() => z.array(StepArraySchema));
@@ -49,7 +48,7 @@ const StepKindFacetSchema = z.lazy(() => z.object({ "stepKind": StepKindSchema }
49
48
  const StepsByThreadIndexFacetSchema = z.lazy(() => z.object({ "stepsByThreadIndex": StepArrayArraySchema }));
50
49
  const StrategyHandleSchema = z.lazy(() => z.string().regex(new RegExp("^STRATEGY-.+$")));
51
50
  const StrategyKindSchema = z.lazy(() => z.union([z.literal("unthreaded"), z.literal("threaded")]));
52
- const StrategyProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("strategy"), "strategyTraceHandle": StrategyTraceHandleSchema, "outputAddress": OutputAddressSchema }).strict());
51
+ const StrategyProvenanceSchema = z.lazy(() => z.object({ "provenanceKind": z.literal("strategy"), "strategyTraceHandle": StrategyTraceHandleSchema, "toolStepRoleAddress": ToolStepRoleAddressSchema }).strict());
53
52
  const StrategyStateInputEntrySchema = z.lazy(() => z.union([InputPotentialSchema, InputResourceSchema]));
54
53
  const StrategyStateInputEntryByRoleNameSchema = z.lazy(() => z.record(z.string(), StrategyStateInputEntrySchema));
55
54
  const StrategyTraceHandleSchema = z.lazy(() => z.string().regex(new RegExp("^STRATEGY_TRACE-.+$")));
@@ -65,6 +64,7 @@ const TickTracePointSchema = z.lazy(() => z.object({ "tracePointKind": z.interse
65
64
  const ToolHandleSchema = z.lazy(() => z.string().regex(new RegExp("^TOOL-.+$")));
66
65
  const ToolStepSchema = z.lazy(() => z.object({ "stepKind": z.intersection(z.literal("tool"), StepKindSchema), "toolHandle": ToolHandleSchema, "roleBindingSpec": RoleBindingSpecSchema }));
67
66
  const ToolStepPathSchema = z.lazy(() => z.union([UnthreadedToolStepPathSchema, ThreadedToolStepPathSchema]));
67
+ const ToolStepRoleAddressSchema = z.lazy(() => z.object({ "roleName": RoleNameSchema, "toolStepPath": ToolStepPathSchema }).strict());
68
68
  const TracePointSchema = z.lazy(() => z.union([GraphStartTracePointSchema, TickTracePointSchema, InterruptTracePointSchema, GraphEndTracePointSchema]));
69
69
  const TracePointCounterSnapshotSchema = z.lazy(() => z.object({ "stepCounterAfter": NaturalSchema.optional(), "iterationCounterAfter": NaturalSchema.optional() }));
70
70
  const TracePointDeltaSchema = z.lazy(() => z.object({ "stepsMutation": z.object({ "insertAt": NaturalSchema, "insertedSteps": StepArraySchema }).optional(), "strategyStateDelta": ThreadedStrategyStateSchema.optional(), "interruptData": z.union([z.object({}), z.null()]).optional() }));
@@ -78,7 +78,7 @@ export type ResourceId =
78
78
  * via the `definition` "Provenance".
79
79
  */
80
80
  export type Provenance =
81
- GenesisProvenance | StrategyProvenance;
81
+ GenesisProvenance | RuntimeProvenance | StrategyProvenance;
82
82
  /**
83
83
  * This interface was referenced by `Genesis`'s JSON-Schema
84
84
  * via the `definition` "StrategyTraceHandle".
@@ -96,13 +96,13 @@ export type ToolStepPath =
96
96
  * via the `definition` "UnthreadedToolStepPath".
97
97
  */
98
98
  export type UnthreadedToolStepPath =
99
- string;
99
+ string & { readonly __brand: 'UnthreadedToolStepPath' };
100
100
  /**
101
101
  * This interface was referenced by `Genesis`'s JSON-Schema
102
102
  * via the `definition` "ThreadedToolStepPath".
103
103
  */
104
104
  export type ThreadedToolStepPath =
105
- string;
105
+ string & { readonly __brand: 'ThreadedToolStepPath' };
106
106
  /**
107
107
  * This interface was referenced by `Genesis`'s JSON-Schema
108
108
  * via the `definition` "ResourceType".
@@ -219,7 +219,7 @@ export type Step =
219
219
  * via the `definition` "ProvenanceKind".
220
220
  */
221
221
  export type ProvenanceKind =
222
- "genesis" | "strategy";
222
+ "genesis" | "runtime" | "strategy";
223
223
  /**
224
224
  * This interface was referenced by `Genesis`'s JSON-Schema
225
225
  * via the `definition` "BaseResource".
@@ -507,6 +507,13 @@ export interface ProvenanceFacet {
507
507
  export interface GenesisProvenance {
508
508
  provenanceKind: "genesis";
509
509
  }
510
+ /**
511
+ * This interface was referenced by `Genesis`'s JSON-Schema
512
+ * via the `definition` "RuntimeProvenance".
513
+ */
514
+ export interface RuntimeProvenance {
515
+ provenanceKind: "runtime";
516
+ }
510
517
  /**
511
518
  * This interface was referenced by `Genesis`'s JSON-Schema
512
519
  * via the `definition` "StrategyProvenance".
@@ -514,16 +521,28 @@ export interface GenesisProvenance {
514
521
  export interface StrategyProvenance {
515
522
  provenanceKind: "strategy";
516
523
  strategyTraceHandle: StrategyTraceHandle;
517
- outputAddress: OutputAddress;
524
+ toolStepRoleAddress: ToolStepRoleAddress;
518
525
  }
519
526
  /**
520
527
  * This interface was referenced by `Genesis`'s JSON-Schema
521
- * via the `definition` "OutputAddress".
528
+ * via the `definition` "ToolStepRoleAddress".
522
529
  */
523
- export interface OutputAddress {
524
- roleName: string;
525
- toolStepPath: ToolStepPath;
530
+ export interface ToolStepRoleAddress {
531
+ roleName: RoleName;
532
+ toolStepPath: ToolStepPath;
526
533
  }
534
+ /**
535
+ * This interface was referenced by `Genesis`'s JSON-Schema
536
+ * via the `definition` "UnthreadedToolStepRoleAddress".
537
+ */
538
+ export type UnthreadedToolStepRoleAddress =
539
+ ToolStepRoleAddress & { toolStepPath: UnthreadedToolStepPath };
540
+ /**
541
+ * This interface was referenced by `Genesis`'s JSON-Schema
542
+ * via the `definition` "ThreadedToolStepRoleAddress".
543
+ */
544
+ export type ThreadedToolStepRoleAddress =
545
+ ToolStepRoleAddress & { toolStepPath: ThreadedToolStepPath };
527
546
  export interface JsonSchemaObject1 {
528
547
  $schema: "https://json-schema.org/draft/2020-12/schema";
529
548
  }
@@ -584,22 +603,12 @@ export interface Case {
584
603
  when: ToolStep;
585
604
  what: ToolStep;
586
605
  }
587
- /**
588
- * This interface was referenced by `Genesis`'s JSON-Schema
589
- * via the `definition` "DeferredStrategyProvenance".
590
- */
591
- export interface DeferredStrategyProvenance {
592
- provenanceKind: "strategy";
593
- outputAddress: OutputAddress;
594
- }
595
606
  /**
596
607
  * This interface was referenced by `Genesis`'s JSON-Schema
597
608
  * via the `definition` "ExternalInputPotential".
598
609
  */
599
610
  export interface ExternalInputPotential {
600
611
  strategyStateInputKind: "externalInputPotential";
601
- id: ResourceId;
602
- resourceTypeHandle: ResourceTypeHandle;
603
612
  }
604
613
  /**
605
614
  * This interface was referenced by `Genesis`'s JSON-Schema
@@ -607,9 +616,7 @@ export interface ExternalInputPotential {
607
616
  */
608
617
  export interface InternalInputPotential {
609
618
  strategyStateInputKind: "internalInputPotential";
610
- id: ResourceId;
611
- resourceTypeHandle: ResourceTypeHandle;
612
- provenance: DeferredStrategyProvenance;
619
+ toolStepRoleAddress: ToolStepRoleAddress;
613
620
  }
614
621
  /**
615
622
  * This interface was referenced by `Genesis`'s JSON-Schema
@@ -17,4 +17,4 @@ export type { ResourceTypeResource, } from '../generated-src/types/standalone/Re
17
17
  export type { ToolResource, } from '../generated-src/types/standalone/ToolResource.js';
18
18
  export type { StrategyResource, } from '../generated-src/types/standalone/StrategyResource.js';
19
19
  export type { StrategyTraceResource, } from '../generated-src/types/standalone/StrategyTraceResource.js';
20
- export type { BaseResource, BaseStrategy, BaseToolStepPathSpec, Boolean, BranchStep, Case, ContainerKind, DeferredStrategyProvenance, Description, DescriptionFacet, DocumentationSpec, ExternalInputPotential, GenesisProvenance, Goal, InputPotential, InputResource, InternalInputPotential, JsonSchemaObject, JsonSchemaObject1, JsonSchemaObject2, Name, NameFacet, Natural, OutputAddress, Provenance, ProvenanceFacet, ProvenanceKind, Resource, ResourceId, ResourcePointer, ResourceType, ResourceTypeHandle, RoleBindingSpec, RoleBindingSpecFacet, RoleBindingSpecFacet1, RoleName, RoleNameArray, RoleSpec, RoleSpecFacet, RoleValue, RoleValueByName, Step, StepArray, StepArrayArray, StepKind, StepKindFacet, Strategy, StrategyHandle, StrategyKind, StrategyProvenance, StrategyStateInputEntry, StrategyStateInputEntryByRoleName, StrategyStateInputKind, StrategyTrace, StrategyTraceHandle, ThreadedStrategy, ThreadedStrategyState, ThreadedStrategyStateFacet, ThreadedToolStepPath, ThreadedToolStepPathSpec, Tool, ToolHandle, ToolStep, ToolStepPath, ToolStepPathSlot, ToolStepPathSlotFacet, TypeRef, UnthreadedStrategy, UnthreadedStrategyState, UnthreadedStrategyStateFacet, UnthreadedToolStepPath, UnthreadedToolStepPathSpec, WhileStep, ForStep, } from '../generated-src/types/types.js';
20
+ export type { BaseResource, BaseStrategy, BaseToolStepPathSpec, Boolean, BranchStep, Case, ContainerKind, Description, DescriptionFacet, DocumentationSpec, ExternalInputPotential, GraphEndTracePoint, GraphStartTracePoint, GenesisProvenance, Goal, InputPotential, InputResource, InternalInputPotential, InterruptTracePoint, JsonSchemaObject, Name, NameFacet, Natural, ToolStepRoleAddress, Provenance, ProvenanceFacet, ProvenanceKind, Resource, ResourceId, ResourcePointer, ResourceType, ResourceTypeHandle, RoleBindingSpec, RoleBindingSpecFacet, RoleName, RoleNameArray, RoleSpec, RoleSpecFacet, RoleValue, RoleValueByName, RuntimeProvenance, Step, StepArray, StepArrayArray, StepKind, StepKindFacet, Strategy, StrategyHandle, StrategyKind, StrategyProvenance, StrategyStateInputEntry, StrategyStateInputEntryByRoleName, StrategyStateInputKind, StrategyTrace, StrategyTraceHandle, TickTracePoint, TimestampedResource, TracePoint, ThreadedStrategy, ThreadedStrategyState, ThreadedStrategyStateFacet, ThreadedToolStepRoleAddress, ThreadedToolStepPath, ThreadedToolStepPathSpec, Tool, ToolHandle, ToolStep, ToolStepPath, ToolStepPathSlot, ToolStepPathSlotFacet, TypeRef, UnthreadedStrategy, UnthreadedStrategyState, UnthreadedStrategyStateFacet, UnthreadedToolStepRoleAddress, UnthreadedToolStepPath, UnthreadedToolStepPathSpec, WhileStep, ForStep, } from '../generated-src/types/types.js';
@@ -108,6 +108,48 @@ function fixRecursiveArrayAliasSelfReference(ts, typeName) {
108
108
  }
109
109
  return lines.join('\n');
110
110
  }
111
+ function brandToolStepPathAliases(ts) {
112
+ return ts.replace(/\/\*\*\r?\n \* This interface was referenced by `Genesis`'s JSON-Schema\r?\n \* via the `definition` "ToolStepPath"\.\r?\n \*\/\r?\nexport type ToolStepPath =\r?\n[\s\S]*?;\r?\n\/\*\*\r?\n \* This interface was referenced by `Genesis`'s JSON-Schema\r?\n \* via the `definition` "UnthreadedToolStepPath"\.\r?\n \*\/\r?\nexport type UnthreadedToolStepPath =\r?\n[\s\S]*?;\r?\n\/\*\*\r?\n \* This interface was referenced by `Genesis`'s JSON-Schema\r?\n \* via the `definition` "ThreadedToolStepPath"\.\r?\n \*\/\r?\nexport type ThreadedToolStepPath =\r?\n[\s\S]*?;/, `/**
113
+ * This interface was referenced by \`Genesis\`'s JSON-Schema
114
+ * via the \`definition\` "ToolStepPath".
115
+ */
116
+ export type ToolStepPath =
117
+ UnthreadedToolStepPath | ThreadedToolStepPath;
118
+ /**
119
+ * This interface was referenced by \`Genesis\`'s JSON-Schema
120
+ * via the \`definition\` "UnthreadedToolStepPath".
121
+ */
122
+ export type UnthreadedToolStepPath =
123
+ string & { readonly __brand: 'UnthreadedToolStepPath' };
124
+ /**
125
+ * This interface was referenced by \`Genesis\`'s JSON-Schema
126
+ * via the \`definition\` "ThreadedToolStepPath".
127
+ */
128
+ export type ThreadedToolStepPath =
129
+ string & { readonly __brand: 'ThreadedToolStepPath' };`);
130
+ }
131
+ function addTypedToolStepRoleAddressAliases(ts) {
132
+ return ts.replace(/\/\*\*\r?\n \* This interface was referenced by `Genesis`'s JSON-Schema\r?\n \* via the `definition` "ToolStepRoleAddress"\.\r?\n \*\/\r?\nexport interface ToolStepRoleAddress \{\r?\n roleName: (?:string|RoleName);\r?\n toolStepPath: ToolStepPath;\r?\n\}/, `/**
133
+ * This interface was referenced by \`Genesis\`'s JSON-Schema
134
+ * via the \`definition\` "ToolStepRoleAddress".
135
+ */
136
+ export interface ToolStepRoleAddress {
137
+ roleName: RoleName;
138
+ toolStepPath: ToolStepPath;
139
+ }
140
+ /**
141
+ * This interface was referenced by \`Genesis\`'s JSON-Schema
142
+ * via the \`definition\` "UnthreadedToolStepRoleAddress".
143
+ */
144
+ export type UnthreadedToolStepRoleAddress =
145
+ ToolStepRoleAddress & { toolStepPath: UnthreadedToolStepPath };
146
+ /**
147
+ * This interface was referenced by \`Genesis\`'s JSON-Schema
148
+ * via the \`definition\` "ThreadedToolStepRoleAddress".
149
+ */
150
+ export type ThreadedToolStepRoleAddress =
151
+ ToolStepRoleAddress & { toolStepPath: ThreadedToolStepPath };`);
152
+ }
111
153
  export function postProcessEmittedTypes(ts, parsedSchema) {
112
154
  ts = ts.replace(/^\s*\[k:\s*string\]:\s*unknown;\s*(?:\r?\n)?/gm, '');
113
155
  ts = ts.replace(/^(\s*)(\$defs\??:\s*)\{\s*\r?\n\s*\};/gm, (_m, indent, head) => `${indent}${head}Record<string, unknown>;`);
@@ -133,6 +175,8 @@ export function postProcessEmittedTypes(ts, parsedSchema) {
133
175
  const tmpl = patternTemplates[typeName];
134
176
  return `${p1}${typeName}${p3}${tmpl ?? 'string'};`;
135
177
  });
178
+ ts = brandToolStepPathAliases(ts);
179
+ ts = addTypedToolStepRoleAddressAliases(ts);
136
180
  const roleNameKeyType = 'RoleName';
137
181
  const unthreadedToolStepPathKeyType = 'UnthreadedToolStepPath';
138
182
  const threadedToolStepPathKeyType = 'ThreadedToolStepPath';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toolproof-core/genesis",
3
- "version": "1.0.54",
3
+ "version": "1.0.56",
4
4
  "description": "Core ToolProof ontology, schemas, declarations, implementations, and generated type artifacts.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",