@exaudeus/workrail 0.17.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/di/container.js +8 -0
  2. package/dist/di/tokens.d.ts +2 -0
  3. package/dist/di/tokens.js +2 -0
  4. package/dist/infrastructure/session/HttpServer.d.ts +2 -1
  5. package/dist/infrastructure/session/HttpServer.js +34 -10
  6. package/dist/infrastructure/session/SessionManager.js +19 -1
  7. package/dist/infrastructure/storage/enhanced-multi-source-workflow-storage.js +26 -2
  8. package/dist/infrastructure/storage/file-workflow-storage.js +4 -4
  9. package/dist/infrastructure/storage/git-workflow-storage.d.ts +0 -1
  10. package/dist/infrastructure/storage/git-workflow-storage.js +28 -29
  11. package/dist/infrastructure/storage/plugin-workflow-storage.js +11 -5
  12. package/dist/manifest.json +134 -70
  13. package/dist/mcp/handlers/v2-execution-helpers.d.ts +4 -4
  14. package/dist/mcp/handlers/v2-execution-helpers.js +29 -0
  15. package/dist/mcp/handlers/v2-execution.js +131 -101
  16. package/dist/mcp/output-schemas.d.ts +110 -21
  17. package/dist/mcp/output-schemas.js +8 -11
  18. package/dist/mcp/server.js +11 -3
  19. package/dist/mcp/types.d.ts +2 -6
  20. package/dist/utils/storage-security.js +15 -1
  21. package/dist/v2/durable-core/encoding/base32-lower.d.ts +1 -0
  22. package/dist/v2/durable-core/encoding/base32-lower.js +28 -0
  23. package/dist/v2/durable-core/ids/index.d.ts +4 -0
  24. package/dist/v2/durable-core/ids/index.js +7 -0
  25. package/dist/v2/durable-core/ids/workflow-hash-ref.d.ts +7 -0
  26. package/dist/v2/durable-core/ids/workflow-hash-ref.js +23 -0
  27. package/dist/v2/durable-core/tokens/binary-payload.d.ts +35 -0
  28. package/dist/v2/durable-core/tokens/binary-payload.js +279 -0
  29. package/dist/v2/durable-core/tokens/index.d.ts +9 -4
  30. package/dist/v2/durable-core/tokens/index.js +17 -7
  31. package/dist/v2/durable-core/tokens/payloads.d.ts +12 -8
  32. package/dist/v2/durable-core/tokens/payloads.js +5 -3
  33. package/dist/v2/durable-core/tokens/token-codec-capabilities.d.ts +4 -0
  34. package/dist/v2/durable-core/tokens/token-codec-capabilities.js +2 -0
  35. package/dist/v2/durable-core/tokens/token-codec-ports.d.ts +42 -0
  36. package/dist/v2/durable-core/tokens/token-codec-ports.js +27 -0
  37. package/dist/v2/durable-core/tokens/token-codec.d.ts +18 -0
  38. package/dist/v2/durable-core/tokens/token-codec.js +108 -0
  39. package/dist/v2/durable-core/tokens/token-signer.d.ts +13 -1
  40. package/dist/v2/durable-core/tokens/token-signer.js +65 -0
  41. package/dist/v2/infra/local/base32/index.d.ts +6 -0
  42. package/dist/v2/infra/local/base32/index.js +44 -0
  43. package/dist/v2/infra/local/bech32m/index.d.ts +8 -0
  44. package/dist/v2/infra/local/bech32m/index.js +56 -0
  45. package/dist/v2/infra/local/data-dir/index.d.ts +1 -0
  46. package/dist/v2/infra/local/data-dir/index.js +5 -2
  47. package/dist/v2/infra/local/fs/index.js +3 -0
  48. package/dist/v2/infra/local/session-store/index.js +38 -4
  49. package/dist/v2/ports/base32.port.d.ts +16 -0
  50. package/dist/v2/ports/base32.port.js +2 -0
  51. package/dist/v2/ports/bech32m.port.d.ts +11 -0
  52. package/dist/v2/ports/bech32m.port.js +2 -0
  53. package/package.json +20 -2
@@ -254,16 +254,16 @@
254
254
  "bytes": 565
255
255
  },
256
256
  "di/container.js": {
257
- "sha256": "200c41528c64e4e8cf0e04046bfd254cdbe0900c157be2dfd8c302a4a096d193",
258
- "bytes": 18890
257
+ "sha256": "d1fbf1f04bb8cb0e4da2161ef2b773e1fdd3d7e8fe09d0672610dc8f28e8901b",
258
+ "bytes": 19468
259
259
  },
260
260
  "di/tokens.d.ts": {
261
- "sha256": "3b9e46e178107ad65575350da5d99c238e7a4389d3537e67ff516a04df1191fe",
262
- "bytes": 1882
261
+ "sha256": "ce5a748976acc30088847dde3126e2f3f45020e8ef15e897938a76752cbb47b4",
262
+ "bytes": 1949
263
263
  },
264
264
  "di/tokens.js": {
265
- "sha256": "aa90a1af7eba9941663beeeb13a25e2f3ba877ba37cb786bac46b468cc840f1b",
266
- "bytes": 2327
265
+ "sha256": "436804cf8904c4984e459d797e3edae02dee6d0b46e989590397bd226b4d759b",
266
+ "bytes": 2403
267
267
  },
268
268
  "domain/execution/error.d.ts": {
269
269
  "sha256": "2eac85c42ec399a23724f868641eeadd0d196b4d324ee4caaff82a6b46155bd9",
@@ -378,12 +378,12 @@
378
378
  "bytes": 818
379
379
  },
380
380
  "infrastructure/session/HttpServer.d.ts": {
381
- "sha256": "279bb41ed528d514f4394edbf3290c03ad430e7d39a655bc30196f56fc0e474b",
382
- "bytes": 1834
381
+ "sha256": "0e4a40f22a66ab4f1a41aad2899d5ce89ca12e1b52598eb82b105ec8ecf37592",
382
+ "bytes": 1852
383
383
  },
384
384
  "infrastructure/session/HttpServer.js": {
385
- "sha256": "c117d7f8e1387263d35f3a77ba1869d674a4548dd6a1eeacfb8e28eb0c58e297",
386
- "bytes": 31118
385
+ "sha256": "451db710b31e8de848f95383ca6964de2edc3c79063cb464d7b2de1e855c4c01",
386
+ "bytes": 32208
387
387
  },
388
388
  "infrastructure/session/SessionDataNormalizer.d.ts": {
389
389
  "sha256": "c89bb5e00d7d01fb4aa6d0095602541de53c425c6b99b67fa8367eb29cb63e9e",
@@ -406,8 +406,8 @@
406
406
  "bytes": 2186
407
407
  },
408
408
  "infrastructure/session/SessionManager.js": {
409
- "sha256": "f7e2f6c7230029042c5efa553b9247fc9a8eb5a340b584b8e096ed35427ddd97",
410
- "bytes": 19506
409
+ "sha256": "764033447b9ca2cb5d0eb91143b906519bee012f98ff2141b1e9bfc4d7c5d070",
410
+ "bytes": 20154
411
411
  },
412
412
  "infrastructure/session/index.d.ts": {
413
413
  "sha256": "52957847da70fcece6a553334bd899efd8ede55cc31f3aa5eb5e3d4bb70e3862",
@@ -430,24 +430,24 @@
430
430
  "bytes": 2233
431
431
  },
432
432
  "infrastructure/storage/enhanced-multi-source-workflow-storage.js": {
433
- "sha256": "6e40c96134b5bb3d8a9234cfe31c5fe0b7737fd16269c63efb32979fe4838ed4",
434
- "bytes": 17551
433
+ "sha256": "86844980a6c4665bca7a53770c5e5b6aa24d6237cc2c510255366d9734c92b1d",
434
+ "bytes": 18441
435
435
  },
436
436
  "infrastructure/storage/file-workflow-storage.d.ts": {
437
437
  "sha256": "e0172ffb57ada1ad8f713bed5884578133744c266a26b01bca5bcb7f9faf64ed",
438
438
  "bytes": 1455
439
439
  },
440
440
  "infrastructure/storage/file-workflow-storage.js": {
441
- "sha256": "d21ad7175a5bde233e5342f9b590a5145d36752858914fb6de141ac84d252d38",
442
- "bytes": 8559
441
+ "sha256": "e4d5f57112885efc6dca15e545071159afc824774a82e8b5b610ca8557c0054d",
442
+ "bytes": 8579
443
443
  },
444
444
  "infrastructure/storage/git-workflow-storage.d.ts": {
445
- "sha256": "b2f38e4e309e6d24eba34f202a877d930f798c8dea5c3ffd99e9ab6e2564ac18",
446
- "bytes": 1401
445
+ "sha256": "67d7f10e12c78c674ced83da378cd159465d4b09176d8dfca240864b0d6f38c2",
446
+ "bytes": 1373
447
447
  },
448
448
  "infrastructure/storage/git-workflow-storage.js": {
449
- "sha256": "80b40267fc53ef06d20ffbea0f0459022e1fbb087301b93aba4b1d719d55b0d8",
450
- "bytes": 14009
449
+ "sha256": "296d4deb89e38453a02f1a5c88860c96b47d878c1c7e25ec363656b524cca39b",
450
+ "bytes": 14261
451
451
  },
452
452
  "infrastructure/storage/in-memory-storage.d.ts": {
453
453
  "sha256": "4e08908f5d1c66ac27568fec9f16aee8853006603ba052d99a490df7b014c802",
@@ -470,8 +470,8 @@
470
470
  "bytes": 1540
471
471
  },
472
472
  "infrastructure/storage/plugin-workflow-storage.js": {
473
- "sha256": "d51c50d0ffb2319267186b916b96bc1da7cc4fcbf6adaf6b7fc13936e4a51549",
474
- "bytes": 11247
473
+ "sha256": "80ae02e6cbe28adf81ce8d97377aa2b856ac293340a641c3464aa1be49a6b3ee",
474
+ "bytes": 11625
475
475
  },
476
476
  "infrastructure/storage/remote-workflow-storage.d.ts": {
477
477
  "sha256": "b9bf07eb106017c7532bdf742b50fb95a29077cd3ccc71f34b8cf4ce44e5e962",
@@ -522,20 +522,20 @@
522
522
  "bytes": 6622
523
523
  },
524
524
  "mcp/handlers/v2-execution-helpers.d.ts": {
525
- "sha256": "67f1faa4f650e33dd567c3ae1d8a5077df1141a0496a2f07ac55eaa122c08704",
526
- "bytes": 4383
525
+ "sha256": "27d2db20098a413ef5fc15e32da6bb33492d9141f463517d9d9d0b1dbfe31772",
526
+ "bytes": 4458
527
527
  },
528
528
  "mcp/handlers/v2-execution-helpers.js": {
529
- "sha256": "1e512e54f2b90630d47148fed604b8f302fe72cfca19fa91592b9fd2115d517f",
530
- "bytes": 12773
529
+ "sha256": "3461024fa43628568e7e9818a4ff7453600266ac34b939e56b55449579e2e840",
530
+ "bytes": 14379
531
531
  },
532
532
  "mcp/handlers/v2-execution.d.ts": {
533
533
  "sha256": "0d96c77d37702b43645399044ceb3f7a772388be7020c2ed4f99e99b21c5dc73",
534
534
  "bytes": 399
535
535
  },
536
536
  "mcp/handlers/v2-execution.js": {
537
- "sha256": "4f3f7d9009007a6795e2dfe998165722f660354323f7e856b26f1a7f62a136be",
538
- "bytes": 53400
537
+ "sha256": "7986a364a35276b4cc8c11e253c88e3bc0bfd86821747562d49829e843343c32",
538
+ "bytes": 55235
539
539
  },
540
540
  "mcp/handlers/v2-workflow.d.ts": {
541
541
  "sha256": "9fbd4d44854e2060c54982b21e72c608970bb2bd107bb15a8388b26c6b492e55",
@@ -562,20 +562,20 @@
562
562
  "bytes": 7535
563
563
  },
564
564
  "mcp/output-schemas.d.ts": {
565
- "sha256": "5a79d1dad82e2a2cf57dde65aafc8aa20fee1513784ee6eb1aba9ae2e71d95a3",
566
- "bytes": 22948
565
+ "sha256": "974e6c2b71403f95363963508bb6cddabf6a6beafc54f19bde40a0c071aa34a3",
566
+ "bytes": 25545
567
567
  },
568
568
  "mcp/output-schemas.js": {
569
- "sha256": "efe70158aa94df76b17d0200c193fb867c254a5d62ec12d960aaa6f8d8b9f5bb",
570
- "bytes": 6367
569
+ "sha256": "9307eb4c2c4b54bcc8d604c81e6328a0149ea1936c81cece5c80505875de3f69",
570
+ "bytes": 6947
571
571
  },
572
572
  "mcp/server.d.ts": {
573
573
  "sha256": "bec49b8d07e189a53db7100d2f0e1e84ffe03150f04e1b06908ee3282982b4a2",
574
574
  "bytes": 168
575
575
  },
576
576
  "mcp/server.js": {
577
- "sha256": "f6bc4b1f3416d03add7b715a5bdae7955a877eae8008c0d2f8b8490dd8ae5708",
578
- "bytes": 14097
577
+ "sha256": "e80a4709f72acfd96a277bad98b59bfa112e209e92b679531753e1b829e7524c",
578
+ "bytes": 14549
579
579
  },
580
580
  "mcp/tool-description-provider.d.ts": {
581
581
  "sha256": "1d46abc3112e11b68e57197e846f5708293ec9b2281fa71a9124ee2aad71e41b",
@@ -610,8 +610,8 @@
610
610
  "bytes": 8020
611
611
  },
612
612
  "mcp/types.d.ts": {
613
- "sha256": "3b7d7d7d30d65cd22b47bc9d559820b3f51984476fce11d4f3b6d820e2ce1eb8",
614
- "bytes": 3683
613
+ "sha256": "abd26b93c1f9ebccc11cdb19460ae98a9e27b5467000915a99ec8cb8530488e6",
614
+ "bytes": 3501
615
615
  },
616
616
  "mcp/types.js": {
617
617
  "sha256": "0c12576fd0053115ff096fe26b38f77f1e830b7ec4781aaf94564827c4c9e81a",
@@ -902,8 +902,8 @@
902
902
  "bytes": 730
903
903
  },
904
904
  "utils/storage-security.js": {
905
- "sha256": "cb6f259256a9b1b2e6457d1ce0ec953e06f55ea100cc7ca65a4a88348ec63c56",
906
- "bytes": 3309
905
+ "sha256": "54412b5a6b9d64e16a0020cff46fc02e0b91c78e8eb4756a6f76cb10151e5092",
906
+ "bytes": 4284
907
907
  },
908
908
  "utils/workflow-init.d.ts": {
909
909
  "sha256": "c8a65892ca6f34d47bc1e2ea563ec4916065d459611ea16024e4ba609efe273a",
@@ -994,12 +994,12 @@
994
994
  "bytes": 817
995
995
  },
996
996
  "v2/durable-core/encoding/base32-lower.d.ts": {
997
- "sha256": "849ef1984db20984f1fce7f40b15d3680c888e01411932d30af6fae4d2132a67",
998
- "bytes": 175
997
+ "sha256": "1ae6d44917eaf2119286705dcc7240b9bcf7c5e965b780ce52aa17f3b893ad4f",
998
+ "bytes": 252
999
999
  },
1000
1000
  "v2/durable-core/encoding/base32-lower.js": {
1001
- "sha256": "9065da38936496a34c2808388b5fb68d8aaac6bd3f0f05de184abc101e07c419",
1002
- "bytes": 934
1001
+ "sha256": "f3a36370e0dc8dcdc3becacb73ebded715d678b9aacab2dc626a8fa0ed84766f",
1002
+ "bytes": 1955
1003
1003
  },
1004
1004
  "v2/durable-core/ids/attempt-id-derivation.d.ts": {
1005
1005
  "sha256": "baee295f114d8d4a74e9fa529e7c72d458a7c7244f50fad9ebbaea06c57dfe92",
@@ -1010,12 +1010,12 @@
1010
1010
  "bytes": 1309
1011
1011
  },
1012
1012
  "v2/durable-core/ids/index.d.ts": {
1013
- "sha256": "5525efc423ad30635996907f7560f53559e49e33a64411a684370ebd1ae56410",
1014
- "bytes": 1792
1013
+ "sha256": "483055c4c668a7bf2901b0c48c14c61878316ec75727702c95edce8f2ef9f0b8",
1014
+ "bytes": 2066
1015
1015
  },
1016
1016
  "v2/durable-core/ids/index.js": {
1017
- "sha256": "a6499471fb67d7a43923c898ef79193390f18912090f27886b52678d13805f11",
1018
- "bytes": 1306
1017
+ "sha256": "8bf9f85fc33cd113915be097f67ec4bfae63d5e774bd2d352ee89cd327a6e43d",
1018
+ "bytes": 1667
1019
1019
  },
1020
1020
  "v2/durable-core/ids/with-healthy-session-lock.d.ts": {
1021
1021
  "sha256": "dc1812850b9ce69c0135d575b0994ac4fa7b874bf9db7a1838b6a3390ef31ae2",
@@ -1025,6 +1025,14 @@
1025
1025
  "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
1026
1026
  "bytes": 77
1027
1027
  },
1028
+ "v2/durable-core/ids/workflow-hash-ref.d.ts": {
1029
+ "sha256": "b5f05431b91251c21cf47a0cf7ed8aff5016f3de6274ebef009a1a36a05b21e0",
1030
+ "bytes": 350
1031
+ },
1032
+ "v2/durable-core/ids/workflow-hash-ref.js": {
1033
+ "sha256": "c4f47a488858c0029bdf44b8817eebc21fd1b4f4c618af26992d21b8fff02c9b",
1034
+ "bytes": 1000
1035
+ },
1028
1036
  "v2/durable-core/projections/snapshot-state.d.ts": {
1029
1037
  "sha256": "0ce739459968dad16fb135730d8ea70fa04ce24539b74982801cc8eec01a6130",
1030
1038
  "bytes": 252
@@ -1137,37 +1145,69 @@
1137
1145
  "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
1138
1146
  "bytes": 77
1139
1147
  },
1148
+ "v2/durable-core/tokens/binary-payload.d.ts": {
1149
+ "sha256": "ec1b0294c87871600ab088ae846dc508c5ad709c92c8fda95be8aaafb86fb53d",
1150
+ "bytes": 1477
1151
+ },
1152
+ "v2/durable-core/tokens/binary-payload.js": {
1153
+ "sha256": "0d5dfc605cb85b015cf693186fdee279a0ae348bd4fdf2dac7af8455faca2379",
1154
+ "bytes": 10772
1155
+ },
1140
1156
  "v2/durable-core/tokens/index.d.ts": {
1141
- "sha256": "79de598d9a56f2cc22671c0644132b24cf4c746c94cbea2f47f4c9044af77b2a",
1142
- "bytes": 738
1157
+ "sha256": "45b0dc5667b5ef002c3d5071fefb763196e88fc4275ba7800b10e4fecdb95fe9",
1158
+ "bytes": 1313
1143
1159
  },
1144
1160
  "v2/durable-core/tokens/index.js": {
1145
- "sha256": "ed96d033e5b4f3bcda9439a384734bc5b7e8e3be7e8593861b2af6469af01404",
1146
- "bytes": 2556
1161
+ "sha256": "631935db667f5fa8dd06e7c903cdc80eb1207ed54a80528c61222d5f3c8ae391",
1162
+ "bytes": 4205
1147
1163
  },
1148
1164
  "v2/durable-core/tokens/payloads.d.ts": {
1149
- "sha256": "568d7ba9f83ea7584b1c815f79b920f8e548e71a244a6dc5709dc981fc5286d4",
1150
- "bytes": 6756
1165
+ "sha256": "e9830eeeb0e9af072fbdd10de4b1ecb13652a873e8a0a25bbd871c9f65da992c",
1166
+ "bytes": 6921
1151
1167
  },
1152
1168
  "v2/durable-core/tokens/payloads.js": {
1153
- "sha256": "24978999201e0413cb193e1fee2b9977335ecaa9e2170b901358c9119fac6c3a",
1154
- "bytes": 2479
1169
+ "sha256": "151393f91330c05482344d4c73ee2b50377a5424bc461c2c07d4b59d8cf3f1e4",
1170
+ "bytes": 2431
1171
+ },
1172
+ "v2/durable-core/tokens/token-codec-capabilities.d.ts": {
1173
+ "sha256": "b86e47b85a2da29565c40870aefb4d207555e3c46f9ce6f195229969bead0ecf",
1174
+ "bytes": 272
1175
+ },
1176
+ "v2/durable-core/tokens/token-codec-capabilities.js": {
1177
+ "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
1178
+ "bytes": 77
1179
+ },
1180
+ "v2/durable-core/tokens/token-codec-ports.d.ts": {
1181
+ "sha256": "21c6860792bdfdb8ddc20efbc97ead60bd3e2d8942b3feed626e0f28db60ebcf",
1182
+ "bytes": 1657
1183
+ },
1184
+ "v2/durable-core/tokens/token-codec-ports.js": {
1185
+ "sha256": "c8876795aa187a016ec6a973fb0b3e5eee4e71c3d8f029d6250516d98b4ae071",
1186
+ "bytes": 1096
1155
1187
  },
1156
1188
  "v2/durable-core/tokens/token-codec.d.ts": {
1157
- "sha256": "44bd65c6102b3aa5fcd82d2854f5466263a20c0b9cbd31aa25f169dfeed8e045",
1158
- "bytes": 1349
1189
+ "sha256": "a92d41cfecbbea2bf243a46ebc35651f5d841da8a4f97ea987f1d2fe66ce854c",
1190
+ "bytes": 2172
1159
1191
  },
1160
1192
  "v2/durable-core/tokens/token-codec.js": {
1161
- "sha256": "e82f1a0b45f60c60dfb5b15ce82c911f1e963c503298d9bba37f261bfaeac081",
1162
- "bytes": 3304
1193
+ "sha256": "ff0add14ad869a259a4e9f7c80776efbb0376841cb595a8b3d004863cf12ed12",
1194
+ "bytes": 7485
1163
1195
  },
1164
1196
  "v2/durable-core/tokens/token-signer.d.ts": {
1165
- "sha256": "379da0438772c2274af0494229a6f642382752b9003d56b8a884bddc27504296",
1166
- "bytes": 1127
1197
+ "sha256": "95803efa519d20079b313c065dcb3e890fd0c9d16892e7ecd6bc8821f0c7e106",
1198
+ "bytes": 1887
1167
1199
  },
1168
1200
  "v2/durable-core/tokens/token-signer.js": {
1169
- "sha256": "2460e8bc9586db09aab65604dc815bb897286c06d5c1c7aac2a239963b2cbdc7",
1170
- "bytes": 2967
1201
+ "sha256": "6567004720c38213f64f2dd5850631278ffbcfaea287152b571bf7fab9575d66",
1202
+ "bytes": 5855
1203
+ },
1204
+ "v2/infra/local/base32/index.d.ts": {
1205
+ "sha256": "054ad32b03c22e9c797196024f2c2a43111f682ee4ab15f82ef3b9313c392723",
1206
+ "bytes": 300
1207
+ },
1208
+ "v2/infra/local/base32/index.js": {
1209
+ "sha256": "74f61cc73d04f4e9048d02080a7707a656645bd00ad46c0226526580a34d6c78",
1210
+ "bytes": 1723
1171
1211
  },
1172
1212
  "v2/infra/local/base64url/index.d.ts": {
1173
1213
  "sha256": "42cb6393959b47242cb6363f3336952391b803847b1e022c8ff16e103da4088b",
@@ -1177,6 +1217,14 @@
1177
1217
  "sha256": "46df066c71c1d9a973f6304c79809d38d52c9fe66301bc86267f96e6a23d9770",
1178
1218
  "bytes": 1803
1179
1219
  },
1220
+ "v2/infra/local/bech32m/index.d.ts": {
1221
+ "sha256": "3ff1a406f89fab30bf3c70b62a2c1b87a2f3ab0b1d5c5d8ede64e76b6f8abf5b",
1222
+ "bytes": 425
1223
+ },
1224
+ "v2/infra/local/bech32m/index.js": {
1225
+ "sha256": "58a9c91d4fe8c7974186ee007a36ce7c1bd7908b2600100ce3f06b3ecca80efc",
1226
+ "bytes": 2121
1227
+ },
1180
1228
  "v2/infra/local/crypto/index.d.ts": {
1181
1229
  "sha256": "d2f6cc8e812bd4fb5c83e59f46c4b5588baa1bf33c029239d8162f8669a64370",
1182
1230
  "bytes": 279
@@ -1186,20 +1234,20 @@
1186
1234
  "bytes": 457
1187
1235
  },
1188
1236
  "v2/infra/local/data-dir/index.d.ts": {
1189
- "sha256": "cc5e40d0dd5d2d620c157c923e3c3d7786afe8a02387573d17252870104eea7a",
1190
- "bytes": 669
1237
+ "sha256": "31a95a746737e88b354b33368880684454bfe8c3cdb02a21776509c3c6fd450b",
1238
+ "bytes": 698
1191
1239
  },
1192
1240
  "v2/infra/local/data-dir/index.js": {
1193
- "sha256": "105edb036f096d108338e5e5e4d1c33128a052e869dab2e4c9c432605f01808d",
1194
- "bytes": 2882
1241
+ "sha256": "02d0ad7e3b8c615c6fa3fead6698664d282b2375ea3fc8bd563c12cc7853691c",
1242
+ "bytes": 3012
1195
1243
  },
1196
1244
  "v2/infra/local/fs/index.d.ts": {
1197
1245
  "sha256": "d830aed74ebb3372ea5efa21ec96680cd188fc76dea6078286f5788b3736d2bf",
1198
1246
  "bytes": 1252
1199
1247
  },
1200
1248
  "v2/infra/local/fs/index.js": {
1201
- "sha256": "abe6971989a76bff11acb03f8fccae1a87712ded9cd95b04fcd80042123b1ac7",
1202
- "bytes": 6875
1249
+ "sha256": "97ce973a4bd48aa43e890fb18dc7b8c8b3f8451400539bf15b4c79f3680e2ba3",
1250
+ "bytes": 7045
1203
1251
  },
1204
1252
  "v2/infra/local/hmac-sha256/index.d.ts": {
1205
1253
  "sha256": "dda3865510dfaf2f13947410d998da6ffecc9a2e728b3574f81e69d5db859815",
@@ -1254,8 +1302,8 @@
1254
1302
  "bytes": 1447
1255
1303
  },
1256
1304
  "v2/infra/local/session-store/index.js": {
1257
- "sha256": "8820cf4cb1bc6df3d0ee02f9a7571f8478acdbb6c750fff43a2d5177bd621dea",
1258
- "bytes": 28140
1305
+ "sha256": "53b9ee8545d99e23cfeecb12b39d202fc552c3e89de9fe71b5d1aaaf9afa6d95",
1306
+ "bytes": 29559
1259
1307
  },
1260
1308
  "v2/infra/local/sha256/index.d.ts": {
1261
1309
  "sha256": "8a727b7e54a38275ca6f9f1b8730f97cfc0a212df035df1bdc58e716e6824230",
@@ -1289,6 +1337,14 @@
1289
1337
  "sha256": "5be2cc1d4f143113fb660ff5e21bc9d5898cf0195c95c24daed6cfdaad401956",
1290
1338
  "bytes": 304
1291
1339
  },
1340
+ "v2/ports/base32.port.d.ts": {
1341
+ "sha256": "64aa2f2003a552917cbf71474472fc5e4afffaa29577204bbcbe5ffa989ceb82",
1342
+ "bytes": 489
1343
+ },
1344
+ "v2/ports/base32.port.js": {
1345
+ "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
1346
+ "bytes": 77
1347
+ },
1292
1348
  "v2/ports/base64url.port.d.ts": {
1293
1349
  "sha256": "8d6e787c8f6fd4152a06d54f4acaa84120671249d70a9d06c7389d8c2adc4bf8",
1294
1350
  "bytes": 398
@@ -1297,6 +1353,14 @@
1297
1353
  "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
1298
1354
  "bytes": 77
1299
1355
  },
1356
+ "v2/ports/bech32m.port.d.ts": {
1357
+ "sha256": "896ac03a6d05d55199d46c119a8c25d8a95d59b5e5859098d2ad74b7931c4d30",
1358
+ "bytes": 467
1359
+ },
1360
+ "v2/ports/bech32m.port.js": {
1361
+ "sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
1362
+ "bytes": 77
1363
+ },
1300
1364
  "v2/ports/data-dir.port.d.ts": {
1301
1365
  "sha256": "4f958bb4b89a87ede17942800903db3c8c55faffea514472fa916aad578050c9",
1302
1366
  "bytes": 467
@@ -5,7 +5,7 @@ import type { SessionEventLogStoreError } from '../../v2/ports/session-event-log
5
5
  import type { SnapshotStoreError } from '../../v2/ports/snapshot-store.port.js';
6
6
  import type { PinnedWorkflowStoreError } from '../../v2/ports/pinned-workflow-store.port.js';
7
7
  import type { KeyringError } from '../../v2/ports/keyring.port.js';
8
- import type { TokenDecodeErrorV2, TokenVerifyErrorV2 } from '../../v2/durable-core/tokens/index.js';
8
+ import type { TokenDecodeErrorV2, TokenVerifyErrorV2, TokenSignErrorV2 } from '../../v2/durable-core/tokens/index.js';
9
9
  export type ToolFailure = ReturnType<typeof errNotRetryable> | ReturnType<typeof errRetryAfterMs>;
10
10
  export type StartWorkflowError = {
11
11
  readonly kind: 'precondition_failed';
@@ -41,7 +41,7 @@ export type StartWorkflowError = {
41
41
  readonly cause: ExecutionSessionGateErrorV2 | SessionEventLogStoreError;
42
42
  } | {
43
43
  readonly kind: 'token_signing_failed';
44
- readonly cause: TokenDecodeErrorV2 | TokenVerifyErrorV2;
44
+ readonly cause: TokenDecodeErrorV2 | TokenVerifyErrorV2 | TokenSignErrorV2;
45
45
  };
46
46
  export type ContinueWorkflowError = {
47
47
  readonly kind: 'precondition_failed';
@@ -81,7 +81,7 @@ export type ContinueWorkflowError = {
81
81
  readonly workflowHash: WorkflowHash;
82
82
  } | {
83
83
  readonly kind: 'token_signing_failed';
84
- readonly cause: TokenDecodeErrorV2 | TokenVerifyErrorV2;
84
+ readonly cause: TokenDecodeErrorV2 | TokenVerifyErrorV2 | TokenSignErrorV2;
85
85
  } | {
86
86
  readonly kind: 'advance_execution_failed';
87
87
  readonly cause: ExecutionSessionGateErrorV2 | SessionEventLogStoreError;
@@ -90,7 +90,7 @@ export declare function mapStartWorkflowErrorToToolError(e: StartWorkflowError):
90
90
  export declare function mapContinueWorkflowErrorToToolError(e: ContinueWorkflowError): ToolFailure;
91
91
  export declare function mapTokenDecodeErrorToToolError(e: TokenDecodeErrorV2): ToolFailure;
92
92
  export declare function mapTokenVerifyErrorToToolError(e: TokenVerifyErrorV2): ToolFailure;
93
- export declare function mapTokenSigningErrorToToolError(e: TokenDecodeErrorV2 | TokenVerifyErrorV2): ToolFailure;
93
+ export declare function mapTokenSigningErrorToToolError(e: TokenDecodeErrorV2 | TokenVerifyErrorV2 | TokenSignErrorV2): ToolFailure;
94
94
  export declare function mapKeyringErrorToToolError(e: KeyringError): ToolFailure;
95
95
  export declare function mapSessionEventLogStoreErrorToToolError(e: SessionEventLogStoreError): ToolFailure;
96
96
  export declare function mapExecutionSessionGateErrorToToolError(e: ExecutionSessionGateErrorV2): ToolFailure;
@@ -84,6 +84,27 @@ function mapContinueWorkflowErrorToToolError(e) {
84
84
  }
85
85
  }
86
86
  function mapTokenDecodeErrorToToolError(e) {
87
+ if (e.code === 'TOKEN_INVALID_FORMAT' && e.details?.bech32mError) {
88
+ const bech32mErr = e.details.bech32mError;
89
+ if (bech32mErr.code === 'BECH32M_CHECKSUM_FAILED') {
90
+ return (0, types_js_1.errNotRetryable)('TOKEN_INVALID_FORMAT', 'Token corrupted (bech32m checksum failed). Likely copy/paste error.', {
91
+ suggestion: 'Copy the entire token string exactly as returned. Use triple-click to select the complete line.',
92
+ details: {
93
+ errorType: 'corruption_detected',
94
+ estimatedPosition: bech32mErr.position,
95
+ tokenFormat: 'binary+bech32m',
96
+ },
97
+ });
98
+ }
99
+ if (bech32mErr.code === 'BECH32M_HRP_MISMATCH') {
100
+ return (0, types_js_1.errNotRetryable)('TOKEN_INVALID_FORMAT', `Wrong token type. ${e.message}`, {
101
+ suggestion: 'Ensure you are using the correct token (stateToken vs ackToken) for this operation.',
102
+ details: {
103
+ errorType: 'hrp_mismatch',
104
+ },
105
+ });
106
+ }
107
+ }
87
108
  switch (e.code) {
88
109
  case 'TOKEN_INVALID_FORMAT':
89
110
  return (0, types_js_1.errNotRetryable)('TOKEN_INVALID_FORMAT', e.message, {
@@ -135,6 +156,14 @@ function mapTokenSigningErrorToToolError(e) {
135
156
  return (0, types_js_1.errNotRetryable)('TOKEN_INVALID_FORMAT', e.message, {
136
157
  suggestion: 'Use the exact tokens returned by WorkRail.',
137
158
  });
159
+ case 'TOKEN_ENCODE_FAILED':
160
+ return (0, types_js_1.errNotRetryable)('INTERNAL_ERROR', `Token encoding failed: ${e.message}`, {
161
+ suggestion: 'Retry; if this persists, treat as invariant violation.',
162
+ });
163
+ case 'KEYRING_INVALID':
164
+ return (0, types_js_1.errNotRetryable)('INTERNAL_ERROR', `Keyring invalid: ${e.message}`, {
165
+ suggestion: 'Regenerate v2 keyring by deleting the v2 data directory and retrying.',
166
+ });
138
167
  case 'TOKEN_BAD_SIGNATURE':
139
168
  return (0, types_js_1.errNotRetryable)('TOKEN_BAD_SIGNATURE', e.message, {
140
169
  suggestion: 'Token signature verification failed. Use the exact tokens returned by WorkRail.',