@toolproof-npm/schema 0.1.82 → 0.1.84

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/README.md +59 -59
  2. package/dist/genesis/generated/dependencies_ordered.json +17 -23
  3. package/dist/genesis/generated/resourceTypes/Genesis.json +42 -77
  4. package/dist/genesis/generated/resources/Genesis.json +52 -97
  5. package/dist/genesis/generated/schemas/Genesis.json +104 -133
  6. package/dist/genesis/generated/schemas/RunRecording.json +186 -215
  7. package/dist/genesis/generated/schemas/RunnableStrategy.d.ts +2 -0
  8. package/dist/genesis/generated/schemas/RunnableStrategy.js +2 -0
  9. package/dist/genesis/generated/schemas/{StrategyRun.json → RunnableStrategy.json} +21 -21
  10. package/dist/genesis/generated/terminals.json +1 -1
  11. package/dist/genesis/generated/types/ResourceTypeGenesis.d.ts +5 -6
  12. package/dist/genesis/generated/types/Resource_RunnableStrategy.d.ts +3 -0
  13. package/dist/genesis/generated/types/types.d.ts +284 -300
  14. package/dist/index.d.ts +3 -3
  15. package/dist/index.js +1 -1
  16. package/dist/scripts/generateTypes.js +1 -3
  17. package/package.json +62 -62
  18. package/dist/genesis/generated/resource-envelopes/Genesis.d.ts +0 -2
  19. package/dist/genesis/generated/resource-envelopes/Genesis.js +0 -2
  20. package/dist/genesis/generated/resource-envelopes/Genesis.json +0 -2337
  21. package/dist/genesis/generated/resource-type-envelopes/Genesis.d.ts +0 -2
  22. package/dist/genesis/generated/resource-type-envelopes/Genesis.js +0 -2
  23. package/dist/genesis/generated/resource-type-envelopes/Genesis.json +0 -1757
  24. package/dist/genesis/generated/schemas/StrategyRun.d.ts +0 -2
  25. package/dist/genesis/generated/schemas/StrategyRun.js +0 -2
  26. package/dist/genesis/generated/types/Resource_StrategyRun.d.ts +0 -3
  27. /package/dist/genesis/generated/types/{Resource_StrategyRun.js → Resource_RunnableStrategy.js} +0 -0
@@ -12,9 +12,9 @@
12
12
  "$ref": "#/$defs/RunEvent"
13
13
  }
14
14
  },
15
- "strategyRunRef": {
15
+ "runnableStrategyRef": {
16
16
  "$comment": "Optional; derived from the first event but useful for indexing.",
17
- "$ref": "#/$defs/StrategyRunIdentity"
17
+ "$ref": "#/$defs/RunnableStrategyIdentity"
18
18
  },
19
19
  "strategyThreadRef": {
20
20
  "$comment": "Optional; derived from the first event but useful for indexing.",
@@ -59,11 +59,11 @@
59
59
  ],
60
60
  "$anchor": "RunEvent"
61
61
  },
62
- "StrategyRunIdentity": {
62
+ "RunnableStrategyIdentity": {
63
63
  "$schema": "https://json-schema.org/draft/2020-12/schema",
64
64
  "type": "string",
65
- "$anchor": "StrategyRunIdentity",
66
- "pattern": "^STRATEGY_RUN-.+$"
65
+ "$anchor": "RunnableStrategyIdentity",
66
+ "pattern": "^RUNNABLE_STRATEGY-.+$"
67
67
  },
68
68
  "StrategyThreadIdentity": {
69
69
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -83,12 +83,12 @@
83
83
  "kind": {
84
84
  "const": "graph_start"
85
85
  },
86
- "strategyRunSeed": {
87
- "$ref": "#/$defs/StrategyRun"
86
+ "runnableStrategySeed": {
87
+ "$ref": "#/$defs/RunnableStrategy"
88
88
  }
89
89
  },
90
90
  "required": [
91
- "strategyRunSeed"
91
+ "runnableStrategySeed"
92
92
  ]
93
93
  }
94
94
  ],
@@ -164,12 +164,12 @@
164
164
  "nodeName": {
165
165
  "type": "string"
166
166
  },
167
+ "runnableStrategyRef": {
168
+ "$ref": "#/$defs/RunnableStrategyIdentity"
169
+ },
167
170
  "stepMetaData": {
168
171
  "$ref": "#/$defs/RunEventStepMetaData"
169
172
  },
170
- "strategyRunRef": {
171
- "$ref": "#/$defs/StrategyRunIdentity"
172
- },
173
173
  "strategyThreadRef": {
174
174
  "$ref": "#/$defs/StrategyThreadIdentity"
175
175
  },
@@ -179,7 +179,7 @@
179
179
  },
180
180
  "required": [
181
181
  "kind",
182
- "strategyRunRef",
182
+ "runnableStrategyRef",
183
183
  "strategyThreadRef",
184
184
  "createdAt",
185
185
  "nodeName",
@@ -187,7 +187,7 @@
187
187
  ],
188
188
  "$anchor": "RunEventBase"
189
189
  },
190
- "StrategyRun": {
190
+ "RunnableStrategy": {
191
191
  "$schema": "https://json-schema.org/draft/2020-12/schema",
192
192
  "type": "object",
193
193
  "allOf": [
@@ -196,28 +196,28 @@
196
196
  "$ref": "#/$defs/StrategyThreadMapWrapper"
197
197
  },
198
198
  {
199
- "$comment": "Reusing StrategyStateWrapper to include the strategy state in the StrategyRun. The Engine will update it with materialized Resources (i.e. runtime-provided inputs and job-created outputs) during the run.",
199
+ "$comment": "Reusing StrategyStateWrapper to include the strategy state in the RunnableStrategy. The Engine will update it with materialized Resources (i.e. runtime-provided inputs and job-created outputs) during the run.",
200
200
  "$ref": "#/$defs/StrategyStateWrapper"
201
201
  }
202
202
  ],
203
203
  "properties": {
204
204
  "identity": {
205
- "$ref": "#/$defs/StrategyRunIdentity"
205
+ "$ref": "#/$defs/RunnableStrategyIdentity"
206
+ },
207
+ "runnableStrategyContext": {
208
+ "$ref": "#/$defs/RunnableStrategyContext"
206
209
  },
207
210
  "statefulStrategyRef": {
208
211
  "$ref": "#/$defs/StatefulStrategyIdentity"
209
- },
210
- "strategyRunContext": {
211
- "$ref": "#/$defs/StrategyRunContext"
212
212
  }
213
213
  },
214
214
  "required": [
215
215
  "identity",
216
216
  "statefulStrategyRef",
217
- "strategyRunContext"
217
+ "runnableStrategyContext"
218
218
  ],
219
219
  "unevaluatedProperties": false,
220
- "$anchor": "StrategyRun"
220
+ "$anchor": "RunnableStrategy"
221
221
  },
222
222
  "RunEventCounters": {
223
223
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -346,13 +346,7 @@
346
346
  ],
347
347
  "$anchor": "StrategyStateWrapper"
348
348
  },
349
- "StatefulStrategyIdentity": {
350
- "$schema": "https://json-schema.org/draft/2020-12/schema",
351
- "type": "string",
352
- "$anchor": "StatefulStrategyIdentity",
353
- "pattern": "^STATEFUL_STRATEGY-.+$"
354
- },
355
- "StrategyRunContext": {
349
+ "RunnableStrategyContext": {
356
350
  "$schema": "https://json-schema.org/draft/2020-12/schema",
357
351
  "type": "object",
358
352
  "properties": {
@@ -363,14 +357,20 @@
363
357
  "$ref": "#/$defs/Timestamp"
364
358
  },
365
359
  "status": {
366
- "$ref": "#/$defs/StrategyRunStatus"
360
+ "$ref": "#/$defs/RunnableStrategyStatus"
367
361
  }
368
362
  },
369
363
  "required": [
370
364
  "status"
371
365
  ],
372
366
  "unevaluatedProperties": false,
373
- "$anchor": "StrategyRunContext"
367
+ "$anchor": "RunnableStrategyContext"
368
+ },
369
+ "StatefulStrategyIdentity": {
370
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
371
+ "type": "string",
372
+ "$anchor": "StatefulStrategyIdentity",
373
+ "pattern": "^STATEFUL_STRATEGY-.+$"
374
374
  },
375
375
  "ExecutionIdentity": {
376
376
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -425,24 +425,7 @@
425
425
  "type": "object",
426
426
  "properties": {
427
427
  "strategyStateUpdate": {
428
- "type": "object",
429
- "additionalProperties": {
430
- "$ref": "#/$defs/ExecutionSocketMaterialized"
431
- },
432
- "unevaluatedProperties": false,
433
- "propertyNames": {
434
- "$ref": "#/$defs/ExecutionIdentity"
435
- }
436
- },
437
- "strategyStateUpdateWide": {
438
- "type": "object",
439
- "additionalProperties": {
440
- "$ref": "#/$defs/ExecutionSocket"
441
- },
442
- "unevaluatedProperties": false,
443
- "propertyNames": {
444
- "$ref": "#/$defs/ExecutionIdentity"
445
- }
428
+ "$ref": "#/$defs/StrategyState"
446
429
  }
447
430
  },
448
431
  "$anchor": "StrategyStateDelta",
@@ -494,10 +477,10 @@
494
477
  "$ref": "#/$defs/ExecutionIdentity"
495
478
  }
496
479
  },
497
- "StrategyRunStatus": {
480
+ "RunnableStrategyStatus": {
498
481
  "$schema": "https://json-schema.org/draft/2020-12/schema",
499
482
  "type": "string",
500
- "$anchor": "StrategyRunStatus",
483
+ "$anchor": "RunnableStrategyStatus",
501
484
  "enum": [
502
485
  "pending",
503
486
  "running",
@@ -506,43 +489,6 @@
506
489
  "cancelled"
507
490
  ]
508
491
  },
509
- "ExecutionSocketMaterialized": {
510
- "$schema": "https://json-schema.org/draft/2020-12/schema",
511
- "type": "object",
512
- "additionalProperties": {
513
- "$ref": "#/$defs/Resource"
514
- },
515
- "unevaluatedProperties": false,
516
- "$anchor": "ExecutionSocketMaterialized",
517
- "propertyNames": {
518
- "$ref": "#/$defs/ResourceRoleIdentity"
519
- }
520
- },
521
- "ExecutionSocket": {
522
- "$schema": "https://json-schema.org/draft/2020-12/schema",
523
- "type": "object",
524
- "additionalProperties": {
525
- "oneOf": [
526
- {
527
- "$ref": "#/$defs/ResourceMissing"
528
- },
529
- {
530
- "$ref": "#/$defs/ResourcePotentialInput"
531
- },
532
- {
533
- "$ref": "#/$defs/ResourcePotentialOutput"
534
- },
535
- {
536
- "$ref": "#/$defs/Resource"
537
- }
538
- ]
539
- },
540
- "unevaluatedProperties": false,
541
- "$anchor": "ExecutionSocket",
542
- "propertyNames": {
543
- "$ref": "#/$defs/ResourceRoleIdentity"
544
- }
545
- },
546
492
  "WorkStep": {
547
493
  "$schema": "https://json-schema.org/draft/2020-12/schema",
548
494
  "type": "object",
@@ -652,36 +598,90 @@
652
598
  ],
653
599
  "$anchor": "ForStep"
654
600
  },
655
- "Resource": {
601
+ "ExecutionSocket": {
602
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
603
+ "type": "object",
604
+ "additionalProperties": {
605
+ "oneOf": [
606
+ {
607
+ "$ref": "#/$defs/ResourceMissing"
608
+ },
609
+ {
610
+ "$ref": "#/$defs/ResourcePotentialInput"
611
+ },
612
+ {
613
+ "$ref": "#/$defs/ResourcePotentialOutput"
614
+ },
615
+ {
616
+ "$ref": "#/$defs/Resource"
617
+ }
618
+ ]
619
+ },
620
+ "unevaluatedProperties": false,
621
+ "$anchor": "ExecutionSocket",
622
+ "propertyNames": {
623
+ "$ref": "#/$defs/ResourceRoleIdentity"
624
+ }
625
+ },
626
+ "StepKind": {
627
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
628
+ "type": "object",
629
+ "properties": {
630
+ "kind": {
631
+ "type": "string",
632
+ "enum": [
633
+ "work",
634
+ "branch",
635
+ "while",
636
+ "for"
637
+ ]
638
+ }
639
+ },
640
+ "required": [
641
+ "kind"
642
+ ],
643
+ "$anchor": "StepKind"
644
+ },
645
+ "Execution": {
656
646
  "$schema": "https://json-schema.org/draft/2020-12/schema",
657
647
  "type": "object",
658
648
  "allOf": [
659
649
  {
660
- "$ref": "#/$defs/ResourceMetaBase"
650
+ "$comment": "This will be overlayed at runtime to specify roleBindings corresponding to the roles of the underlying job.",
651
+ "$ref": "#/$defs/RoleBindingsWrapper"
652
+ }
653
+ ],
654
+ "properties": {
655
+ "identity": {
656
+ "$ref": "#/$defs/ExecutionIdentity"
661
657
  },
662
- {
663
- "properties": {
664
- "extractedData": {
665
- "type": "object",
666
- "additionalProperties": {
667
- "$ref": "#/$defs/JsonData"
668
- },
669
- "$comment": "This will be overlayed at runtime to match the data structure of the underlying type's extractionSchema. At compile time, we guarantee it has an identity property."
670
- }
671
- },
672
- "required": [
673
- "extractedData"
674
- ]
658
+ "jobRef": {
659
+ "$ref": "#/$defs/JobIdentity"
675
660
  }
661
+ },
662
+ "required": [
663
+ "identity",
664
+ "jobRef"
676
665
  ],
677
- "unevaluatedProperties": false,
678
- "$anchor": "Resource"
666
+ "$anchor": "Execution"
679
667
  },
680
- "ResourceRoleIdentity": {
668
+ "Conditional": {
681
669
  "$schema": "https://json-schema.org/draft/2020-12/schema",
682
- "type": "string",
683
- "$anchor": "ResourceRoleIdentity",
684
- "pattern": "^ROLE-.+$"
670
+ "type": "object",
671
+ "properties": {
672
+ "what": {
673
+ "$ref": "#/$defs/WorkStep"
674
+ },
675
+ "when": {
676
+ "$ref": "#/$defs/WorkStep"
677
+ }
678
+ },
679
+ "required": [
680
+ "when",
681
+ "what"
682
+ ],
683
+ "unevaluatedProperties": false,
684
+ "$anchor": "Conditional"
685
685
  },
686
686
  "ResourceMissing": {
687
687
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -761,65 +761,97 @@
761
761
  "unevaluatedProperties": false,
762
762
  "$anchor": "ResourcePotentialOutput"
763
763
  },
764
- "StepKind": {
764
+ "Resource": {
765
765
  "$schema": "https://json-schema.org/draft/2020-12/schema",
766
766
  "type": "object",
767
- "properties": {
768
- "kind": {
769
- "type": "string",
770
- "enum": [
771
- "work",
772
- "branch",
773
- "while",
774
- "for"
767
+ "allOf": [
768
+ {
769
+ "$ref": "#/$defs/ResourceMetaBase"
770
+ },
771
+ {
772
+ "properties": {
773
+ "extractedData": {
774
+ "type": "object",
775
+ "additionalProperties": {
776
+ "$ref": "#/$defs/JsonData"
777
+ },
778
+ "$comment": "This will be overlayed at runtime to match the data structure of the underlying type's extractionSchema. At compile time, we guarantee it has an identity property."
779
+ }
780
+ },
781
+ "required": [
782
+ "extractedData"
775
783
  ]
776
784
  }
777
- },
778
- "required": [
779
- "kind"
780
785
  ],
781
- "$anchor": "StepKind"
786
+ "unevaluatedProperties": false,
787
+ "$anchor": "Resource"
782
788
  },
783
- "Execution": {
789
+ "ResourceRoleIdentity": {
790
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
791
+ "type": "string",
792
+ "$anchor": "ResourceRoleIdentity",
793
+ "pattern": "^ROLE-.+$"
794
+ },
795
+ "RoleBindingsWrapper": {
784
796
  "$schema": "https://json-schema.org/draft/2020-12/schema",
785
797
  "type": "object",
786
- "allOf": [
787
- {
788
- "$comment": "This will be overlayed at runtime to specify roleBindings corresponding to the roles of the underlying job.",
789
- "$ref": "#/$defs/RoleBindingsWrapper"
798
+ "properties": {
799
+ "roleBindings": {
800
+ "$ref": "#/$defs/RoleBindings"
790
801
  }
802
+ },
803
+ "required": [
804
+ "roleBindings"
791
805
  ],
806
+ "$anchor": "RoleBindingsWrapper"
807
+ },
808
+ "ResourceBase": {
809
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
810
+ "type": "object",
792
811
  "properties": {
793
812
  "identity": {
794
- "$ref": "#/$defs/ExecutionIdentity"
813
+ "$ref": "#/$defs/ResourceIdentity"
795
814
  },
796
- "jobRef": {
797
- "$ref": "#/$defs/JobIdentity"
815
+ "resourceTypeRef": {
816
+ "$ref": "#/$defs/ResourceTypeIdentity"
798
817
  }
799
818
  },
800
819
  "required": [
801
820
  "identity",
802
- "jobRef"
821
+ "resourceTypeRef"
803
822
  ],
804
- "$anchor": "Execution"
823
+ "$anchor": "ResourceBase"
805
824
  },
806
- "Conditional": {
825
+ "ResourceKind": {
807
826
  "$schema": "https://json-schema.org/draft/2020-12/schema",
808
827
  "type": "object",
809
828
  "properties": {
810
- "what": {
811
- "$ref": "#/$defs/WorkStep"
812
- },
813
- "when": {
814
- "$ref": "#/$defs/WorkStep"
829
+ "kind": {
830
+ "enum": [
831
+ "missing",
832
+ "potential-input",
833
+ "potential-output",
834
+ "materialized"
835
+ ]
815
836
  }
816
837
  },
817
838
  "required": [
818
- "when",
819
- "what"
839
+ "kind"
820
840
  ],
821
- "unevaluatedProperties": false,
822
- "$anchor": "Conditional"
841
+ "$anchor": "ResourceKind"
842
+ },
843
+ "CreationContextWrapper": {
844
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
845
+ "type": "object",
846
+ "properties": {
847
+ "creationContext": {
848
+ "$ref": "#/$defs/CreationContext"
849
+ }
850
+ },
851
+ "required": [
852
+ "creationContext"
853
+ ],
854
+ "$anchor": "CreationContextWrapper"
823
855
  },
824
856
  "ResourceMetaBase": {
825
857
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -883,79 +915,23 @@
883
915
  ],
884
916
  "$anchor": "JsonData"
885
917
  },
886
- "ResourceBase": {
918
+ "RoleBindings": {
887
919
  "$schema": "https://json-schema.org/draft/2020-12/schema",
888
920
  "type": "object",
889
921
  "properties": {
890
- "identity": {
891
- "$ref": "#/$defs/ResourceIdentity"
922
+ "inputBindingMap": {
923
+ "$ref": "#/$defs/RoleBindingMap"
892
924
  },
893
- "resourceTypeRef": {
894
- "$ref": "#/$defs/ResourceTypeIdentity"
895
- }
896
- },
897
- "required": [
898
- "identity",
899
- "resourceTypeRef"
900
- ],
901
- "$anchor": "ResourceBase"
902
- },
903
- "ResourceKind": {
904
- "$schema": "https://json-schema.org/draft/2020-12/schema",
905
- "type": "object",
906
- "properties": {
907
- "kind": {
908
- "enum": [
909
- "missing",
910
- "potential-input",
911
- "potential-output",
912
- "materialized"
913
- ]
914
- }
915
- },
916
- "required": [
917
- "kind"
918
- ],
919
- "$anchor": "ResourceKind"
920
- },
921
- "CreationContextWrapper": {
922
- "$schema": "https://json-schema.org/draft/2020-12/schema",
923
- "type": "object",
924
- "properties": {
925
- "creationContext": {
926
- "$ref": "#/$defs/CreationContext"
927
- }
928
- },
929
- "required": [
930
- "creationContext"
931
- ],
932
- "$anchor": "CreationContextWrapper"
933
- },
934
- "RoleBindingsWrapper": {
935
- "$schema": "https://json-schema.org/draft/2020-12/schema",
936
- "type": "object",
937
- "properties": {
938
- "roleBindings": {
939
- "$ref": "#/$defs/RoleBindings"
940
- }
941
- },
942
- "required": [
943
- "roleBindings"
944
- ],
945
- "$anchor": "RoleBindingsWrapper"
946
- },
947
- "Path": {
948
- "$schema": "https://json-schema.org/draft/2020-12/schema",
949
- "type": "object",
950
- "properties": {
951
- "path": {
952
- "type": "string"
925
+ "outputBindingMap": {
926
+ "$ref": "#/$defs/RoleBindingMap"
953
927
  }
954
928
  },
955
929
  "required": [
956
- "path"
930
+ "inputBindingMap",
931
+ "outputBindingMap"
957
932
  ],
958
- "$anchor": "Path"
933
+ "unevaluatedProperties": false,
934
+ "$anchor": "RoleBindings"
959
935
  },
960
936
  "ResourceIdentity": {
961
937
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -987,23 +963,18 @@
987
963
  ],
988
964
  "$anchor": "CreationContext"
989
965
  },
990
- "RoleBindings": {
966
+ "Path": {
991
967
  "$schema": "https://json-schema.org/draft/2020-12/schema",
992
968
  "type": "object",
993
969
  "properties": {
994
- "inputBindingMap": {
995
- "$ref": "#/$defs/RoleBindingMap"
996
- },
997
- "outputBindingMap": {
998
- "$ref": "#/$defs/RoleBindingMap"
970
+ "path": {
971
+ "type": "string"
999
972
  }
1000
973
  },
1001
974
  "required": [
1002
- "inputBindingMap",
1003
- "outputBindingMap"
975
+ "path"
1004
976
  ],
1005
- "unevaluatedProperties": false,
1006
- "$anchor": "RoleBindings"
977
+ "$anchor": "Path"
1007
978
  },
1008
979
  "RoleBindingMap": {
1009
980
  "$schema": "https://json-schema.org/draft/2020-12/schema",
@@ -0,0 +1,2 @@
1
+ import schema from './RunnableStrategy.json';
2
+ export default schema;
@@ -0,0 +1,2 @@
1
+ import schema from './RunnableStrategy.json' with { type: 'json' };
2
+ export default schema;