@exaudeus/workrail 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/manifest.json +176 -32
  2. package/dist/runtime/brand.d.ts +1 -3
  3. package/dist/v2/durable-core/canonical/hashing.d.ts +3 -1
  4. package/dist/v2/durable-core/canonical/hashing.js +9 -0
  5. package/dist/v2/durable-core/ids/index.d.ts +4 -0
  6. package/dist/v2/durable-core/ids/index.js +8 -0
  7. package/dist/v2/durable-core/ids/with-healthy-session-lock.d.ts +7 -0
  8. package/dist/v2/durable-core/ids/with-healthy-session-lock.js +2 -0
  9. package/dist/v2/durable-core/projections/snapshot-state.d.ts +3 -0
  10. package/dist/v2/durable-core/projections/snapshot-state.js +14 -0
  11. package/dist/v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.d.ts +1042 -0
  12. package/dist/v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.js +119 -0
  13. package/dist/v2/durable-core/schemas/execution-snapshot/index.d.ts +4 -0
  14. package/dist/v2/durable-core/schemas/execution-snapshot/index.js +17 -0
  15. package/dist/v2/durable-core/schemas/execution-snapshot/step-instance-key.d.ts +21 -0
  16. package/dist/v2/durable-core/schemas/execution-snapshot/step-instance-key.js +67 -0
  17. package/dist/v2/durable-core/schemas/session/events.d.ts +3 -3
  18. package/dist/v2/durable-core/schemas/session/events.js +9 -5
  19. package/dist/v2/durable-core/schemas/session/index.d.ts +1 -0
  20. package/dist/v2/durable-core/schemas/session/session-health.d.ts +25 -0
  21. package/dist/v2/durable-core/schemas/session/session-health.js +2 -0
  22. package/dist/v2/durable-core/tokens/base64url.d.ts +7 -0
  23. package/dist/v2/durable-core/tokens/base64url.js +16 -0
  24. package/dist/v2/durable-core/tokens/index.d.ts +7 -0
  25. package/dist/v2/durable-core/tokens/index.js +20 -0
  26. package/dist/v2/durable-core/tokens/payloads.d.ts +210 -0
  27. package/dist/v2/durable-core/tokens/payloads.js +53 -0
  28. package/dist/v2/durable-core/tokens/token-codec.d.ts +31 -0
  29. package/dist/v2/durable-core/tokens/token-codec.js +64 -0
  30. package/dist/v2/durable-core/tokens/token-signer.d.ts +15 -0
  31. package/dist/v2/durable-core/tokens/token-signer.js +55 -0
  32. package/dist/v2/infra/local/data-dir/index.d.ts +4 -0
  33. package/dist/v2/infra/local/data-dir/index.js +12 -0
  34. package/dist/v2/infra/local/hmac-sha256/index.d.ts +5 -0
  35. package/dist/v2/infra/local/hmac-sha256/index.js +16 -0
  36. package/dist/v2/infra/local/keyring/index.d.ts +14 -0
  37. package/dist/v2/infra/local/keyring/index.js +103 -0
  38. package/dist/v2/infra/local/session-store/index.d.ts +7 -6
  39. package/dist/v2/infra/local/session-store/index.js +244 -129
  40. package/dist/v2/infra/local/snapshot-store/index.d.ts +15 -0
  41. package/dist/v2/infra/local/snapshot-store/index.js +76 -0
  42. package/dist/v2/ports/data-dir.port.d.ts +4 -0
  43. package/dist/v2/ports/hmac-sha256.port.d.ts +4 -0
  44. package/dist/v2/ports/hmac-sha256.port.js +2 -0
  45. package/dist/v2/ports/keyring.port.d.ts +26 -0
  46. package/dist/v2/ports/keyring.port.js +2 -0
  47. package/dist/v2/ports/session-event-log-store.port.d.ts +14 -2
  48. package/dist/v2/ports/snapshot-store.port.d.ts +17 -0
  49. package/dist/v2/ports/snapshot-store.port.js +2 -0
  50. package/dist/v2/projections/session-health.d.ts +1 -15
  51. package/dist/v2/projections/session-health.js +1 -4
  52. package/dist/v2/usecases/execution-session-gate.d.ts +53 -0
  53. package/dist/v2/usecases/execution-session-gate.js +167 -0
  54. package/package.json +2 -2
@@ -682,8 +682,8 @@
682
682
  "bytes": 203
683
683
  },
684
684
  "runtime/brand.d.ts": {
685
- "sha256": "6ba575755cd70d822f9ee8f7784ae1d249d582d1917dd71f305f3295cbcc43fd",
686
- "bytes": 122
685
+ "sha256": "df90760acef03f2f72fbf56b0f591ce3939e93cd92bf28a817bea99a69873513",
686
+ "bytes": 75
687
687
  },
688
688
  "runtime/brand.js": {
689
689
  "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
@@ -834,12 +834,12 @@
834
834
  "bytes": 1657
835
835
  },
836
836
  "v2/durable-core/canonical/hashing.d.ts": {
837
- "sha256": "ec6ec6c2f4b2b680c60375d0dbc6ac43d918627f28c2bab9e7e973f37b2519ce",
838
- "bytes": 506
837
+ "sha256": "0c62bfc24f7c15994cf2aee07bae50b50c8cd4ae2bcdc28138bdea662b15d8e3",
838
+ "bytes": 761
839
839
  },
840
840
  "v2/durable-core/canonical/hashing.js": {
841
- "sha256": "7f31c6a4410e2442ae8a61b11c2ab1b230726bc35216654ed1b359622d9359d3",
842
- "bytes": 538
841
+ "sha256": "47c4e63841d99d7d4de001090aa878d27eacdc3f52901bbe4a19795b6af0205b",
842
+ "bytes": 931
843
843
  },
844
844
  "v2/durable-core/canonical/jcs.d.ts": {
845
845
  "sha256": "b41750449385163d746305425514af1b34d8c92fa82df65008245b1849e9661f",
@@ -874,12 +874,28 @@
874
874
  "bytes": 447
875
875
  },
876
876
  "v2/durable-core/ids/index.d.ts": {
877
- "sha256": "63b5f38f741478e22585a27db360e6f13e2b1301d68028431a20d7054b29952c",
878
- "bytes": 1426
877
+ "sha256": "47f0922ce721516b60c38cc827e3dbeea83074093c62e62cbbfa7e4ce0ea959c",
878
+ "bytes": 1678
879
879
  },
880
880
  "v2/durable-core/ids/index.js": {
881
- "sha256": "f329b3749ee778224555e6d4eadfed232ddb216a3348ff8b69984a0ee2bf6e6c",
882
- "bytes": 1042
881
+ "sha256": "8b348436b2ae504f6e57cc4332746fb2c8d639520071b373bdd0e7da409a59bb",
882
+ "bytes": 1224
883
+ },
884
+ "v2/durable-core/ids/with-healthy-session-lock.d.ts": {
885
+ "sha256": "dc1812850b9ce69c0135d575b0994ac4fa7b874bf9db7a1838b6a3390ef31ae2",
886
+ "bytes": 320
887
+ },
888
+ "v2/durable-core/ids/with-healthy-session-lock.js": {
889
+ "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
890
+ "bytes": 77
891
+ },
892
+ "v2/durable-core/projections/snapshot-state.d.ts": {
893
+ "sha256": "0ce739459968dad16fb135730d8ea70fa04ce24539b74982801cc8eec01a6130",
894
+ "bytes": 252
895
+ },
896
+ "v2/durable-core/projections/snapshot-state.js": {
897
+ "sha256": "9a49a15ac4cdeecb7624e9199ce68823515ea1f56d45ce3030acd30023f73eeb",
898
+ "bytes": 428
883
899
  },
884
900
  "v2/durable-core/schemas/compiled-workflow/index.d.ts": {
885
901
  "sha256": "caab753a39b7abc1e3c52bfd2fca93402a8a1b11c2ef13aaf5c2c0a86f7ba135",
@@ -889,17 +905,41 @@
889
905
  "sha256": "49e3b2f36fe18e75f864b402db0d58f8e1d66e6116fe381af9fc0c76e6f00f8f",
890
906
  "bytes": 621
891
907
  },
908
+ "v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.d.ts": {
909
+ "sha256": "96ad2f741274a55ecfeb3cd4c385938db6d4f4f25fee7ea460158b09e4422988",
910
+ "bytes": 30004
911
+ },
912
+ "v2/durable-core/schemas/execution-snapshot/execution-snapshot.v1.js": {
913
+ "sha256": "d93a81d14644459fd79b734077c101747b6d8a01f5989bc0ee90b82e87ab4322",
914
+ "bytes": 5081
915
+ },
916
+ "v2/durable-core/schemas/execution-snapshot/index.d.ts": {
917
+ "sha256": "3c312cda4aba0da547ca19041ba85a93ec596f8ac572574eaba0a7164746ec25",
918
+ "bytes": 641
919
+ },
920
+ "v2/durable-core/schemas/execution-snapshot/index.js": {
921
+ "sha256": "c628819ebb94610012d42e301f320c1550fa4f645d8ad9aa0379a5f5099e82a6",
922
+ "bytes": 2494
923
+ },
924
+ "v2/durable-core/schemas/execution-snapshot/step-instance-key.d.ts": {
925
+ "sha256": "183bf693b36827a93882732269ef0dab8380eb7e2426f0fd72fbc7407647ee04",
926
+ "bytes": 1147
927
+ },
928
+ "v2/durable-core/schemas/execution-snapshot/step-instance-key.js": {
929
+ "sha256": "600b896c6a23e064478f600ae82923317ce343d9a79e7fe919a8fe8d3354bd4e",
930
+ "bytes": 2983
931
+ },
892
932
  "v2/durable-core/schemas/session/events.d.ts": {
893
- "sha256": "9e76fa1f16a30799f79b609434bff483e71203115e81c741d39c251dacf8254f",
894
- "bytes": 61807
933
+ "sha256": "8de8d8904b67ca93d985c1e215f216d929612fb14357888f88ff270f6ac3c40f",
934
+ "bytes": 61834
895
935
  },
896
936
  "v2/durable-core/schemas/session/events.js": {
897
- "sha256": "5647ebba23a5421457bd66611253a51ace9adb67020557cb08d8066e19dc7670",
898
- "bytes": 14796
937
+ "sha256": "411228cda7ef149d25413c668e858d5691810cff8e6ce64913bf8e0cb1cfda2a",
938
+ "bytes": 15007
899
939
  },
900
940
  "v2/durable-core/schemas/session/index.d.ts": {
901
- "sha256": "a005aad0fcd3cd5c7134f834c4dc49e01ac2672945ef7e38324fc8fc4f024751",
902
- "bytes": 179
941
+ "sha256": "f4f500d33d212760f480d91fafd4474f7b12f9239a6c5e9c2d80d0fe96207b65",
942
+ "bytes": 259
903
943
  },
904
944
  "v2/durable-core/schemas/session/index.js": {
905
945
  "sha256": "0a3d9ba129a52c33d7e01f4366e15956b637ca5de327c6c8deb449c91bac0e92",
@@ -913,6 +953,54 @@
913
953
  "sha256": "735b3f6cbc7e266e882812b359754268c5eca7102f698fbe0fcb49f57f599cd3",
914
954
  "bytes": 1237
915
955
  },
956
+ "v2/durable-core/schemas/session/session-health.d.ts": {
957
+ "sha256": "33e927808b1b6a1f31de141289493b1359ec12943873a8fc970e0fe33775f263",
958
+ "bytes": 665
959
+ },
960
+ "v2/durable-core/schemas/session/session-health.js": {
961
+ "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
962
+ "bytes": 77
963
+ },
964
+ "v2/durable-core/tokens/base64url.d.ts": {
965
+ "sha256": "0db76718338dbc78d647c0bb213059f6a127894a6bcc17e5acb837a99f6da323",
966
+ "bytes": 306
967
+ },
968
+ "v2/durable-core/tokens/base64url.js": {
969
+ "sha256": "fbcc82c734d32b150ecb1420ce6bbc684741437930ad98b10992130d000b6bab",
970
+ "bytes": 558
971
+ },
972
+ "v2/durable-core/tokens/index.d.ts": {
973
+ "sha256": "4409ca6cf0245ad850f61652884d9121c8442797e0602a41d2e32a63d04d9d35",
974
+ "bytes": 686
975
+ },
976
+ "v2/durable-core/tokens/index.js": {
977
+ "sha256": "7b4fe787fea9f215b42902ae08a5c94daa4941fb5283de9524feb0b4ef603bf7",
978
+ "bytes": 2594
979
+ },
980
+ "v2/durable-core/tokens/payloads.d.ts": {
981
+ "sha256": "2889ce061b4734cc3ccdc1df315bc58170a421de1661a5bb7cf08710a7e43d53",
982
+ "bytes": 6756
983
+ },
984
+ "v2/durable-core/tokens/payloads.js": {
985
+ "sha256": "f1026ba47d9b2e0ab3bbec47aa9e8afd5695805f6f4a83ecddd4610616ea4def",
986
+ "bytes": 2343
987
+ },
988
+ "v2/durable-core/tokens/token-codec.d.ts": {
989
+ "sha256": "f03dfaa7ce652ab0fb175f765e3d286c2713db6b40e53716a2b5aff74937705c",
990
+ "bytes": 1223
991
+ },
992
+ "v2/durable-core/tokens/token-codec.js": {
993
+ "sha256": "557c1ee23e4cdb050344d9c4944aec2a1b9e6a90018200290c4d6ea6185bd520",
994
+ "bytes": 3127
995
+ },
996
+ "v2/durable-core/tokens/token-signer.d.ts": {
997
+ "sha256": "2ce41a829043871a35f4d845eb8c56d038b5b877740cd3511457dbbf96ef2324",
998
+ "bytes": 1001
999
+ },
1000
+ "v2/durable-core/tokens/token-signer.js": {
1001
+ "sha256": "554c8fb8bf46a02edc019435c37a2d84ef174b29e850fe4b697f5c56e67004eb",
1002
+ "bytes": 3002
1003
+ },
916
1004
  "v2/infra/local/crypto/index.d.ts": {
917
1005
  "sha256": "d2f6cc8e812bd4fb5c83e59f46c4b5588baa1bf33c029239d8162f8669a64370",
918
1006
  "bytes": 279
@@ -922,12 +1010,12 @@
922
1010
  "bytes": 457
923
1011
  },
924
1012
  "v2/infra/local/data-dir/index.d.ts": {
925
- "sha256": "a544531e14c57499047676209f1a207044a4e5dee720a0e7f005ff4599bae14c",
926
- "bytes": 544
1013
+ "sha256": "cc5e40d0dd5d2d620c157c923e3c3d7786afe8a02387573d17252870104eea7a",
1014
+ "bytes": 669
927
1015
  },
928
1016
  "v2/infra/local/data-dir/index.js": {
929
- "sha256": "eb8cfda7db3e4d337f3e4c21b1a525fa5b00dbe4d729423f93d71b2cdead292f",
930
- "bytes": 2542
1017
+ "sha256": "105edb036f096d108338e5e5e4d1c33128a052e869dab2e4c9c432605f01808d",
1018
+ "bytes": 2882
931
1019
  },
932
1020
  "v2/infra/local/fs/index.d.ts": {
933
1021
  "sha256": "d830aed74ebb3372ea5efa21ec96680cd188fc76dea6078286f5788b3736d2bf",
@@ -937,6 +1025,22 @@
937
1025
  "sha256": "409030bf18b98fe09f0801a22826978b2cb6022f71bc7e83fad00cfc8aebb3fb",
938
1026
  "bytes": 6725
939
1027
  },
1028
+ "v2/infra/local/hmac-sha256/index.d.ts": {
1029
+ "sha256": "dda3865510dfaf2f13947410d998da6ffecc9a2e728b3574f81e69d5db859815",
1030
+ "bytes": 272
1031
+ },
1032
+ "v2/infra/local/hmac-sha256/index.js": {
1033
+ "sha256": "11917c1d29f34efcd7139f5573067ad20a4093a1c5190e6069ccdc25acf53f24",
1034
+ "bytes": 578
1035
+ },
1036
+ "v2/infra/local/keyring/index.d.ts": {
1037
+ "sha256": "e14c988729fc8bdf194d2e6520dc87f366f949f9fc0562b088b458482e799194",
1038
+ "bytes": 657
1039
+ },
1040
+ "v2/infra/local/keyring/index.js": {
1041
+ "sha256": "875ae8f90d0b13e0cea19e537ef0279b1b80d2ad155b5b602226a7271a0b3b7d",
1042
+ "bytes": 3839
1043
+ },
940
1044
  "v2/infra/local/pinned-workflow-store/index.d.ts": {
941
1045
  "sha256": "d2342ebedf9ce061615a85c1fd4c64de117ea943232da08beef7916c8ecd0a96",
942
1046
  "bytes": 809
@@ -954,12 +1058,12 @@
954
1058
  "bytes": 1640
955
1059
  },
956
1060
  "v2/infra/local/session-store/index.d.ts": {
957
- "sha256": "74b5492e4d87f40883fad6bfad2e8fb60a0f4897dc51d84e09071600df6115e9",
958
- "bytes": 1229
1061
+ "sha256": "bd6a47ede5fc58a72b18031d57bd7357d4657f11d06aee2c2d08391be51b213d",
1062
+ "bytes": 1467
959
1063
  },
960
1064
  "v2/infra/local/session-store/index.js": {
961
- "sha256": "66512ea01106dab9f208870c54522322d7705cc26cbcfbfd9d623302935445dd",
962
- "bytes": 16065
1065
+ "sha256": "3b844370c4cff55b53dd18401eec7e14fb5e5c34d7b851650eb6dfb81fc97b77",
1066
+ "bytes": 21855
963
1067
  },
964
1068
  "v2/infra/local/sha256/index.d.ts": {
965
1069
  "sha256": "8a727b7e54a38275ca6f9f1b8730f97cfc0a212df035df1bdc58e716e6824230",
@@ -969,9 +1073,17 @@
969
1073
  "sha256": "c2a799d22880f0ef9f50d004b44cf1d829c3c5afeec72dfd6e6d5d12bb6a1747",
970
1074
  "bytes": 457
971
1075
  },
1076
+ "v2/infra/local/snapshot-store/index.d.ts": {
1077
+ "sha256": "5fea7c8a5840b498d10adb51a1963d7fb31b1bb2bdf99e0cdde30b834743cf3f",
1078
+ "bytes": 1017
1079
+ },
1080
+ "v2/infra/local/snapshot-store/index.js": {
1081
+ "sha256": "2b8d3db16aec20de6cc697ed3ae1fc2143f9b6d7d1bda8c7d30c8e0feb7fdb21",
1082
+ "bytes": 3372
1083
+ },
972
1084
  "v2/ports/data-dir.port.d.ts": {
973
- "sha256": "997e81b3ec3d29d3097f34d9cee56d1cb55be45bc6606bae8c06a1749259eba7",
974
- "bytes": 342
1085
+ "sha256": "4f958bb4b89a87ede17942800903db3c8c55faffea514472fa916aad578050c9",
1086
+ "bytes": 467
975
1087
  },
976
1088
  "v2/ports/data-dir.port.js": {
977
1089
  "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
@@ -985,6 +1097,22 @@
985
1097
  "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
986
1098
  "bytes": 77
987
1099
  },
1100
+ "v2/ports/hmac-sha256.port.d.ts": {
1101
+ "sha256": "36bb3cffc90ce7e9ce5a60fb6cd1667d584e438ac273ca9e98e73094d98e6da9",
1102
+ "bytes": 164
1103
+ },
1104
+ "v2/ports/hmac-sha256.port.js": {
1105
+ "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
1106
+ "bytes": 77
1107
+ },
1108
+ "v2/ports/keyring.port.d.ts": {
1109
+ "sha256": "760953161ee37dba94d965d1e84ee15508e307325bd28f59eee7ab477a584e0a",
1110
+ "bytes": 737
1111
+ },
1112
+ "v2/ports/keyring.port.js": {
1113
+ "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
1114
+ "bytes": 77
1115
+ },
988
1116
  "v2/ports/pinned-workflow-store.port.d.ts": {
989
1117
  "sha256": "1803a47bad9777e37f1fef0fa51e67c0d0c39e0e2b5871f16c03546d3d1096b7",
990
1118
  "bytes": 614
@@ -994,8 +1122,8 @@
994
1122
  "bytes": 77
995
1123
  },
996
1124
  "v2/ports/session-event-log-store.port.d.ts": {
997
- "sha256": "ccc7cf95569aa03c96d88982c21c55078f2fc7b72d1911870b0db595fa299e00",
998
- "bytes": 1368
1125
+ "sha256": "ffd5706ab752e9264c394b4960ea821fc96838b4111a38c9fb223972f568f45a",
1126
+ "bytes": 1991
999
1127
  },
1000
1128
  "v2/ports/session-event-log-store.port.js": {
1001
1129
  "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
@@ -1017,6 +1145,14 @@
1017
1145
  "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
1018
1146
  "bytes": 77
1019
1147
  },
1148
+ "v2/ports/snapshot-store.port.d.ts": {
1149
+ "sha256": "2e41a43f36d71dc44dd5adf3202c612176a44ef81a90145f44d55c79fddee3b3",
1150
+ "bytes": 781
1151
+ },
1152
+ "v2/ports/snapshot-store.port.js": {
1153
+ "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
1154
+ "bytes": 77
1155
+ },
1020
1156
  "v2/projections/advance-outcomes.d.ts": {
1021
1157
  "sha256": "1c1283e2484b81c13428d6b4c80adb1ca079cf9b7c858cee8d178af1e0828e0f",
1022
1158
  "bytes": 903
@@ -1074,12 +1210,12 @@
1074
1210
  "bytes": 2315
1075
1211
  },
1076
1212
  "v2/projections/session-health.d.ts": {
1077
- "sha256": "06dc992814e11965cbfe337c65253cb21ddea6efe0301ad818dfe21d03463c4d",
1078
- "bytes": 621
1213
+ "sha256": "0a7096bfc0d32eea9743c34a0b982e32f7eeec9e63ec7af10e27ec21be246630",
1214
+ "bytes": 327
1079
1215
  },
1080
1216
  "v2/projections/session-health.js": {
1081
- "sha256": "b1f13d193fdbe2fdd97c7786412666d33e8e57d762e8ee105bda7647384920ea",
1082
- "bytes": 573
1217
+ "sha256": "56d9fbed93ce1fa71ba8ab39f5fa49c4b221936dfec9339c15bd5aca2b4c878e",
1218
+ "bytes": 550
1083
1219
  },
1084
1220
  "v2/read-only/v1-to-v2-shim.d.ts": {
1085
1221
  "sha256": "bc778fe2034ce1691eb089ed9415fcd162dcddfc4a9f95106200b7822d15a22c",
@@ -1088,6 +1224,14 @@
1088
1224
  "v2/read-only/v1-to-v2-shim.js": {
1089
1225
  "sha256": "e88caca3921758d1ed3806c9cb7d4ea35cc3f32689fbead2f2c96101fbbfc6e9",
1090
1226
  "bytes": 1498
1227
+ },
1228
+ "v2/usecases/execution-session-gate.d.ts": {
1229
+ "sha256": "30ea073d1728abf3b71ae8c501c3fa6ecd26fde16074719349f875342ac29fdd",
1230
+ "bytes": 2038
1231
+ },
1232
+ "v2/usecases/execution-session-gate.js": {
1233
+ "sha256": "d7d6430b622e45d31d38bd71c6f7c914d2c3b4f6ebf68a0368d6d372867031e9",
1234
+ "bytes": 7606
1091
1235
  }
1092
1236
  }
1093
1237
  }
@@ -1,5 +1,3 @@
1
- declare const brand: unique symbol;
2
1
  export type Brand<T, B extends string> = T & {
3
- readonly [brand]: B;
2
+ readonly __brand: B;
4
3
  };
5
- export {};
@@ -1,6 +1,7 @@
1
- import type { WorkflowHash, Sha256Digest, CanonicalBytes } from '../ids/index.js';
1
+ import type { WorkflowHash, Sha256Digest, CanonicalBytes, SnapshotRef } from '../ids/index.js';
2
2
  import type { JsonValue } from './json-types.js';
3
3
  import type { Result } from 'neverthrow';
4
+ import type { ExecutionSnapshotFileV1 } from '../schemas/execution-snapshot/index.js';
4
5
  export interface CryptoPortV2 {
5
6
  sha256(bytes: CanonicalBytes): Sha256Digest;
6
7
  }
@@ -9,3 +10,4 @@ export type HashingError = {
9
10
  readonly message: string;
10
11
  };
11
12
  export declare function workflowHashForCompiledSnapshot(compiled: JsonValue, crypto: CryptoPortV2): Result<WorkflowHash, HashingError>;
13
+ export declare function snapshotRefForExecutionSnapshotFileV1(snapshot: ExecutionSnapshotFileV1, crypto: CryptoPortV2): Result<SnapshotRef, HashingError>;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.workflowHashForCompiledSnapshot = workflowHashForCompiledSnapshot;
4
+ exports.snapshotRefForExecutionSnapshotFileV1 = snapshotRefForExecutionSnapshotFileV1;
4
5
  const index_js_1 = require("../ids/index.js");
5
6
  const jcs_js_1 = require("./jcs.js");
6
7
  function workflowHashForCompiledSnapshot(compiled, crypto) {
@@ -11,3 +12,11 @@ function workflowHashForCompiledSnapshot(compiled, crypto) {
11
12
  }))
12
13
  .map((bytes) => (0, index_js_1.asWorkflowHash)(crypto.sha256(bytes)));
13
14
  }
15
+ function snapshotRefForExecutionSnapshotFileV1(snapshot, crypto) {
16
+ return (0, jcs_js_1.toCanonicalBytes)(snapshot)
17
+ .mapErr((e) => ({
18
+ code: 'HASHING_CANONICALIZE_FAILED',
19
+ message: e.message,
20
+ }))
21
+ .map((bytes) => (0, index_js_1.asSnapshotRef)(crypto.sha256(bytes)));
22
+ }
@@ -10,6 +10,8 @@ export type EventId = Brand<string, 'v2.EventId'>;
10
10
  export type EventIndex = Brand<number, 'v2.EventIndex'>;
11
11
  export type ManifestIndex = Brand<number, 'v2.ManifestIndex'>;
12
12
  export type SnapshotRef = Brand<Sha256Digest, 'v2.SnapshotRef'>;
13
+ export type AttemptId = Brand<string, 'v2.AttemptId'>;
14
+ export type TokenStringV1 = Brand<string, 'v2.TokenStringV1'>;
13
15
  export declare function asWorkflowId(value: string): WorkflowId;
14
16
  export declare function asSha256Digest(value: string): Sha256Digest;
15
17
  export declare function asWorkflowHash(value: Sha256Digest): WorkflowHash;
@@ -21,3 +23,5 @@ export declare function asEventId(value: string): EventId;
21
23
  export declare function asEventIndex(value: number): EventIndex;
22
24
  export declare function asManifestIndex(value: number): ManifestIndex;
23
25
  export declare function asSnapshotRef(value: Sha256Digest): SnapshotRef;
26
+ export declare function asAttemptId(value: string): AttemptId;
27
+ export declare function asTokenStringV1(value: string): TokenStringV1;
@@ -11,6 +11,8 @@ exports.asEventId = asEventId;
11
11
  exports.asEventIndex = asEventIndex;
12
12
  exports.asManifestIndex = asManifestIndex;
13
13
  exports.asSnapshotRef = asSnapshotRef;
14
+ exports.asAttemptId = asAttemptId;
15
+ exports.asTokenStringV1 = asTokenStringV1;
14
16
  function asWorkflowId(value) {
15
17
  return value;
16
18
  }
@@ -44,3 +46,9 @@ function asManifestIndex(value) {
44
46
  function asSnapshotRef(value) {
45
47
  return value;
46
48
  }
49
+ function asAttemptId(value) {
50
+ return value;
51
+ }
52
+ function asTokenStringV1(value) {
53
+ return value;
54
+ }
@@ -0,0 +1,7 @@
1
+ import type { SessionLockHandleV2 } from '../../ports/session-lock.port.js';
2
+ declare const withHealthySessionLockBrand: unique symbol;
3
+ export type WithHealthySessionLock = SessionLockHandleV2 & {
4
+ readonly assertHeld: () => boolean;
5
+ readonly [withHealthySessionLockBrand]: 'WithHealthySessionLock';
6
+ };
7
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import type { EngineStateV1, PendingStepV1 } from '../schemas/execution-snapshot/index.js';
2
+ export declare function deriveIsComplete(state: EngineStateV1): boolean;
3
+ export declare function derivePendingStep(state: EngineStateV1): PendingStepV1 | null;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deriveIsComplete = deriveIsComplete;
4
+ exports.derivePendingStep = derivePendingStep;
5
+ function deriveIsComplete(state) {
6
+ return state.kind === 'complete';
7
+ }
8
+ function derivePendingStep(state) {
9
+ if (state.kind !== 'running')
10
+ return null;
11
+ if (state.pending.kind !== 'some')
12
+ return null;
13
+ return state.pending.step;
14
+ }