@workflow/core 5.0.0-beta.40 → 5.0.0-beta.42

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 (82) hide show
  1. package/dist/events-consumer.d.ts +224 -6
  2. package/dist/events-consumer.d.ts.map +1 -1
  3. package/dist/events-consumer.js +497 -50
  4. package/dist/private.d.ts +87 -18
  5. package/dist/private.d.ts.map +1 -1
  6. package/dist/private.js +118 -47
  7. package/dist/runtime/constants.d.ts +50 -1
  8. package/dist/runtime/constants.d.ts.map +1 -1
  9. package/dist/runtime/constants.js +59 -3
  10. package/dist/runtime/helpers.d.ts +212 -70
  11. package/dist/runtime/helpers.d.ts.map +1 -1
  12. package/dist/runtime/helpers.js +275 -86
  13. package/dist/runtime/quickjs-assets.generated.d.ts.map +1 -1
  14. package/dist/runtime/quickjs-assets.generated.js +2 -2
  15. package/dist/runtime/quickjs-entrypoint.d.ts +8 -9
  16. package/dist/runtime/quickjs-entrypoint.d.ts.map +1 -1
  17. package/dist/runtime/quickjs-entrypoint.js +172 -41
  18. package/dist/runtime/quickjs-runtime.d.ts +36 -1
  19. package/dist/runtime/quickjs-runtime.d.ts.map +1 -1
  20. package/dist/runtime/quickjs-runtime.js +613 -185
  21. package/dist/runtime/quickjs-serde.d.ts +107 -0
  22. package/dist/runtime/quickjs-serde.d.ts.map +1 -0
  23. package/dist/runtime/quickjs-serde.js +2098 -0
  24. package/dist/runtime/replay-budget.d.ts +13 -14
  25. package/dist/runtime/replay-budget.d.ts.map +1 -1
  26. package/dist/runtime/replay-budget.js +20 -73
  27. package/dist/runtime/resume-hook.d.ts.map +1 -1
  28. package/dist/runtime/resume-hook.js +57 -13
  29. package/dist/runtime/resume-latency.d.ts +143 -0
  30. package/dist/runtime/resume-latency.d.ts.map +1 -0
  31. package/dist/runtime/resume-latency.js +153 -0
  32. package/dist/runtime/runs.d.ts.map +1 -1
  33. package/dist/runtime/runs.js +3 -4
  34. package/dist/runtime/start.js +2 -7
  35. package/dist/runtime/step-executor.d.ts +27 -12
  36. package/dist/runtime/step-executor.d.ts.map +1 -1
  37. package/dist/runtime/step-executor.js +105 -15
  38. package/dist/runtime/suspension-handler.d.ts +46 -8
  39. package/dist/runtime/suspension-handler.d.ts.map +1 -1
  40. package/dist/runtime/suspension-handler.js +173 -15
  41. package/dist/runtime/world-compatibility.d.ts +16 -0
  42. package/dist/runtime/world-compatibility.d.ts.map +1 -1
  43. package/dist/runtime/world-compatibility.js +26 -5
  44. package/dist/runtime.d.ts.map +1 -1
  45. package/dist/runtime.js +911 -524
  46. package/dist/serialization/codec-devalue-vm.d.ts +7 -0
  47. package/dist/serialization/codec-devalue-vm.d.ts.map +1 -1
  48. package/dist/serialization/codec-devalue-vm.js +12 -1
  49. package/dist/serialization/codec-devalue.d.ts.map +1 -1
  50. package/dist/serialization/codec-devalue.js +15 -4
  51. package/dist/serialization/workflow-vm.d.ts +8 -3
  52. package/dist/serialization/workflow-vm.d.ts.map +1 -1
  53. package/dist/serialization/workflow-vm.js +9 -4
  54. package/dist/serialization.d.ts.map +1 -1
  55. package/dist/serialization.js +8 -3
  56. package/dist/step.js +2 -2
  57. package/dist/telemetry/semantic-conventions.d.ts +104 -0
  58. package/dist/telemetry/semantic-conventions.d.ts.map +1 -1
  59. package/dist/telemetry/semantic-conventions.js +84 -1
  60. package/dist/test-support/orchestrator-context.d.ts +25 -0
  61. package/dist/test-support/orchestrator-context.d.ts.map +1 -0
  62. package/dist/test-support/orchestrator-context.js +91 -0
  63. package/dist/version.d.ts +1 -1
  64. package/dist/version.js +2 -2
  65. package/dist/vm/index.d.ts.map +1 -1
  66. package/dist/vm/index.js +9 -6
  67. package/dist/workflow/abort-controller.d.ts.map +1 -1
  68. package/dist/workflow/abort-controller.js +4 -6
  69. package/dist/workflow/attribute-dispatcher.js +2 -2
  70. package/dist/workflow/hook.js +2 -2
  71. package/dist/workflow/sleep.js +2 -2
  72. package/dist/workflow.d.ts +10 -0
  73. package/dist/workflow.d.ts.map +1 -1
  74. package/dist/workflow.js +94 -20
  75. package/docs/how-it-works/event-sourcing.mdx +11 -3
  76. package/package.json +7 -7
  77. package/dist/correlation-id.d.ts +0 -109
  78. package/dist/correlation-id.d.ts.map +0 -1
  79. package/dist/correlation-id.js +0 -139
  80. package/dist/serialization/vm-bundle-entry.d.ts +0 -12
  81. package/dist/serialization/vm-bundle-entry.d.ts.map +0 -1
  82. package/dist/serialization/vm-bundle-entry.js +0 -58
@@ -38,15 +38,14 @@ export declare function isFirstInvocation(preloadedEvents: readonly Event[] | un
38
38
  * This replaces the `node:vm` replay path (runWorkflow + EventsConsumer)
39
39
  * with a QuickJS VM invocation that performs the same full event replay.
40
40
  *
41
- * KNOWN GAP — precondition guard: unlike the node:vm path, no event write
42
- * in this file participates in the optimistic-concurrency precondition
43
- * guard (`withPreconditionRetry` + `stateUpdatedAtForCreate`), which
44
- * protects a writer holding a stale event-log snapshot from clobbering a
45
- * concurrent one. The engine currently relies on per-(runId,
46
- * correlationId) event uniqueness (EntityConflictError dedup) alone. This
47
- * is a deliberate simplification while the engine is experimental wiring
48
- * the guard is tracked follow-up work; anyone adding new write paths here
49
- * should not assume parity with the node engine on this axis.
41
+ * KNOWN GAP — slot snapshot: unlike the node:vm path, no event write in
42
+ * this file carries {@link CreateEventParams.eventCount}, so a World never
43
+ * learns which events the writer had not seen and never reports them back.
44
+ * The engine currently relies on per-(runId, correlationId) event
45
+ * uniqueness (EntityConflictError dedup) alone. This is a deliberate
46
+ * simplification while the engine is experimental — wiring the snapshot is
47
+ * tracked follow-up work; anyone adding new write paths here should not
48
+ * assume parity with the node engine on this axis.
50
49
  */
51
50
  export declare function runWorkflowWithQuickJS(params: {
52
51
  workflowCode: string;
@@ -1 +1 @@
1
- {"version":3,"file":"quickjs-entrypoint.d.ts","sourceRoot":"","sources":["../../src/runtime/quickjs-entrypoint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE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