eve 0.27.11 → 0.27.13

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 (122) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/src/chunks/{use-eve-agent-CTJrwXM2.js → use-eve-agent-CWYe-vqE.js} +29 -18
  3. package/dist/src/chunks/{use-eve-agent-DaWxEtnE.js → use-eve-agent-CsSQOKnp.js} +29 -18
  4. package/dist/src/cli/commands/channels.js +1 -1
  5. package/dist/src/cli/commands/integration-setup.js +1 -1
  6. package/dist/src/cli/commands/register-registry-commands.js +1 -1
  7. package/dist/src/cli/commands/registry-setup-command.d.ts +5 -3
  8. package/dist/src/cli/commands/registry-setup-command.js +1 -1
  9. package/dist/src/cli/commands/registry.d.ts +9 -3
  10. package/dist/src/cli/commands/registry.js +1 -1
  11. package/dist/src/cli/dev/tui/remote-connection-probe.js +1 -1
  12. package/dist/src/cli/dev/tui/runner.js +1 -1
  13. package/dist/src/cli/dev/tui/target.d.ts +3 -15
  14. package/dist/src/cli/dev/tui/tui.js +1 -1
  15. package/dist/src/cli/invoke/command.d.ts +32 -0
  16. package/dist/src/cli/invoke/command.js +1 -0
  17. package/dist/src/cli/invoke/invoke.d.ts +27 -0
  18. package/dist/src/cli/invoke/invoke.js +1 -0
  19. package/dist/src/cli/invoke/result.d.ts +313 -0
  20. package/dist/src/cli/invoke/result.js +1 -0
  21. package/dist/src/cli/run.d.ts +2 -0
  22. package/dist/src/cli/run.js +3 -3
  23. package/dist/src/client/client.js +1 -1
  24. package/dist/src/client/message-response.js +1 -1
  25. package/dist/src/client/session-utils.d.ts +21 -15
  26. package/dist/src/client/session-utils.js +1 -1
  27. package/dist/src/client/session.js +1 -1
  28. package/dist/src/compiled/.vendor-stamp.json +5 -5
  29. package/dist/src/compiled/@workflow/core/capabilities.d.ts +6 -0
  30. package/dist/src/compiled/@workflow/core/encryption.d.ts +15 -2
  31. package/dist/src/compiled/@workflow/core/flushable-stream.d.ts +26 -0
  32. package/dist/src/compiled/@workflow/core/index.d.ts +1 -1
  33. package/dist/src/compiled/@workflow/core/index.js +2 -2
  34. package/dist/src/compiled/@workflow/core/private.d.ts +76 -33
  35. package/dist/src/compiled/@workflow/core/private.js +1 -1
  36. package/dist/src/compiled/@workflow/core/replay-payload-cache.d.ts +3 -2
  37. package/dist/src/compiled/@workflow/core/runtime/count-step-started-events.d.ts +52 -0
  38. package/dist/src/compiled/@workflow/core/runtime/helpers.d.ts +41 -12
  39. package/dist/src/compiled/@workflow/core/runtime/resume-hook.d.ts +2 -2
  40. package/dist/src/compiled/@workflow/core/runtime/step-executor.d.ts +9 -8
  41. package/dist/src/compiled/@workflow/core/runtime/world.d.ts +2 -7
  42. package/dist/src/compiled/@workflow/core/runtime.d.ts +1 -1
  43. package/dist/src/compiled/@workflow/core/runtime.js +3 -3
  44. package/dist/src/compiled/@workflow/core/sealed-box.d.ts +167 -0
  45. package/dist/src/compiled/@workflow/core/serialization/client.d.ts +3 -3
  46. package/dist/src/compiled/@workflow/core/serialization/codec.d.ts +6 -4
  47. package/dist/src/compiled/@workflow/core/serialization/encryption.d.ts +118 -17
  48. package/dist/src/compiled/@workflow/core/serialization/step.d.ts +4 -4
  49. package/dist/src/compiled/@workflow/core/serialization/types.d.ts +20 -0
  50. package/dist/src/compiled/@workflow/core/serialization-format.d.ts +44 -4
  51. package/dist/src/compiled/@workflow/core/serialization.d.ts +21 -21
  52. package/dist/src/compiled/@workflow/core/set-attributes.d.ts +2 -7
  53. package/dist/src/compiled/@workflow/core/step/context-storage.d.ts +2 -2
  54. package/dist/src/compiled/@workflow/core/symbols.d.ts +23 -10
  55. package/dist/src/compiled/@workflow/core/telemetry/semantic-conventions.d.ts +4 -4
  56. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  57. package/dist/src/compiled/@workflow/core/workflow/abort-controller.d.ts +1 -1
  58. package/dist/src/compiled/@workflow/core/workflow/index.d.ts +1 -1
  59. package/dist/src/compiled/@workflow/core/workflow/set-attributes.d.ts +0 -9
  60. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  61. package/dist/src/compiled/@workflow/errors/index.d.ts +1 -1
  62. package/dist/src/compiled/@workflow/world/events.d.ts +5 -0
  63. package/dist/src/compiled/@workflow/world/hooks.d.ts +27 -0
  64. package/dist/src/compiled/@workflow/world/index.d.ts +2 -2
  65. package/dist/src/compiled/@workflow/world/interfaces.d.ts +8 -6
  66. package/dist/src/compiled/@workflow/world/queue.d.ts +30 -26
  67. package/dist/src/compiled/@workflow/world/runs.d.ts +5 -0
  68. package/dist/src/compiled/@workflow/world/spec-version.d.ts +3 -4
  69. package/dist/src/compiled/@workflow/world-local/index.js +4 -4
  70. package/dist/src/compiled/@workflow/world-vercel/index.js +5 -5
  71. package/dist/src/compiled/_chunks/workflow/{attribute-changes-B6ltn-ph.js → attribute-changes-DeZc2RZz.js} +2 -2
  72. package/dist/src/compiled/_chunks/workflow/{dist-D7ANgxe0.js → dist-WjtNsOyf.js} +1 -1
  73. package/dist/src/compiled/_chunks/workflow/private-Cre8uYkA.js +1 -0
  74. package/dist/src/compiled/_chunks/workflow/resume-hook-ip1hbn1b.js +1 -0
  75. package/dist/src/compiled/_chunks/workflow/run-CWytxfIp.js +1 -0
  76. package/dist/src/compiled/_chunks/workflow/sleep-BjrUxUcs.js +1 -0
  77. package/dist/src/compiled/_chunks/workflow/wait-until-De9yESQN.js +15 -0
  78. package/dist/src/compiled/_chunks/workflow/{workflow-routes-Pd-WKcx_.js → workflow-routes-CwqB063q.js} +1 -1
  79. package/dist/src/evals/cli/eval-client.js +1 -1
  80. package/dist/src/evals/session.js +1 -1
  81. package/dist/src/execution/web-fetch/request.js +1 -1
  82. package/dist/src/internal/application/compiled-artifacts.js +1 -1
  83. package/dist/src/internal/application/package.js +1 -1
  84. package/dist/src/internal/node-esm-compat-banner.js +1 -1
  85. package/dist/src/internal/workflow/builtins.d.ts +2 -2
  86. package/dist/src/internal/workflow/development-world-protocol.js +1 -1
  87. package/dist/src/internal/workflow-bundle/workflow-core-shim.d.ts +5 -5
  88. package/dist/src/internal/workflow-bundle/workflow-core-shim.js +1 -1
  89. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.7/node_modules/@workflow/utils/dist/world-target.js +1 -0
  90. package/dist/src/public/channels/linear/defaults.js +4 -2
  91. package/dist/src/runtime/attributes/emit.js +1 -1
  92. package/dist/src/services/dev-client/client-options.d.ts +2 -0
  93. package/dist/src/services/dev-client/client-options.js +1 -1
  94. package/dist/src/services/dev-client/target.d.ts +17 -0
  95. package/dist/src/services/dev-client/target.js +1 -0
  96. package/dist/src/setup/scaffold/create/project.js +1 -1
  97. package/dist/src/setup/verified-remote-client.d.ts +5 -1
  98. package/dist/src/setup/verified-remote-client.js +1 -1
  99. package/dist/src/svelte/index.js +1 -1
  100. package/dist/src/svelte/use-eve-agent.js +1 -1
  101. package/dist/src/vue/index.js +1 -1
  102. package/dist/src/vue/use-eve-agent.js +1 -1
  103. package/docs/channels/linear.mdx +4 -0
  104. package/docs/extensions.md +3 -1
  105. package/docs/install-integrations.mdx +76 -1
  106. package/docs/reference/cli.md +28 -1
  107. package/package.json +8 -8
  108. package/dist/src/compiled/@workflow/core/runtime/step-handler.d.ts +0 -2
  109. package/dist/src/compiled/_chunks/workflow/private-DolBHKOQ.js +0 -1
  110. package/dist/src/compiled/_chunks/workflow/resume-hook-D2AqAGjq.js +0 -1
  111. package/dist/src/compiled/_chunks/workflow/run-BMRZ6pA-.js +0 -1
  112. package/dist/src/compiled/_chunks/workflow/sleep-CrgsokmG.js +0 -1
  113. package/dist/src/compiled/_chunks/workflow/wait-until-B-1TiJji.js +0 -15
  114. package/dist/src/node_modules/.pnpm/@workflow_utils@5.0.0-beta.6/node_modules/@workflow/utils/dist/world-target.js +0 -1
  115. /package/dist/src/node_modules/.pnpm/{@workflow_utils@5.0.0-beta.6 → @workflow_utils@5.0.0-beta.7}/node_modules/@workflow/utils/dist/index.js +0 -0
  116. /package/dist/src/node_modules/.pnpm/{@workflow_utils@5.0.0-beta.6 → @workflow_utils@5.0.0-beta.7}/node_modules/@workflow/utils/dist/parse-name.js +0 -0
  117. /package/dist/src/node_modules/.pnpm/{@workflow_utils@5.0.0-beta.6 → @workflow_utils@5.0.0-beta.7}/node_modules/@workflow/utils/dist/pluralize.js +0 -0
  118. /package/dist/src/node_modules/.pnpm/{@workflow_utils@5.0.0-beta.6 → @workflow_utils@5.0.0-beta.7}/node_modules/@workflow/utils/dist/promise.js +0 -0
  119. /package/dist/src/node_modules/.pnpm/{@workflow_utils@5.0.0-beta.6 → @workflow_utils@5.0.0-beta.7}/node_modules/@workflow/utils/dist/time.js +0 -0
  120. /package/dist/src/node_modules/.pnpm/{@workflow_utils@5.0.0-beta.6 → @workflow_utils@5.0.0-beta.7}/node_modules/@workflow/utils/dist/workflow-routes.js +0 -0
  121. /package/dist/src/{cli/dev/tui → services/dev-client}/agent-info-probe.d.ts +0 -0
  122. /package/dist/src/{cli/dev/tui → services/dev-client}/agent-info-probe.js +0 -0
@@ -1,4 +1,10 @@
1
1
  import { type PromiseWithResolvers } from './_workflow-utils.js';
2
+ /**
3
+ * A durability barrier a sink may expose under {@link STREAM_DRAIN_SYMBOL}:
4
+ * resolves once every chunk the sink has accepted is durably written, rejects
5
+ * if any server write failed. See `WorkflowServerWritableStream`.
6
+ */
7
+ type DrainBarrier = () => Promise<void>;
2
8
  /**
3
9
  * Flow-control knob: upper bound on chunks read-but-not-yet-durably-written
4
10
  * while coalescing. Once this many chunks are outstanding the producer stops
@@ -12,6 +18,7 @@ import { type PromiseWithResolvers } from './_workflow-utils.js';
12
18
  * limit — batch sizing enforces that independently.
13
19
  */
14
20
  export declare const MAX_INFLIGHT_CHUNKS = 1000;
21
+ export declare const getMaxInflightChunks: () => number;
15
22
  /**
16
23
  * Wire limit: maximum number of chunks in a single coalesced `writeMulti`.
17
24
  * The server enforces a per-multi-write chunk cap (1,000 today); a batch is
@@ -19,6 +26,7 @@ export declare const MAX_INFLIGHT_CHUNKS = 1000;
19
26
  * the backpressure knob above. Override: `WORKFLOW_STREAM_MAX_CHUNKS_PER_BATCH`.
20
27
  */
21
28
  export declare const MAX_CHUNKS_PER_BATCH = 1000;
29
+ export declare const getMaxChunksPerBatch: () => number;
22
30
  /**
23
31
  * Wire limit: maximum cumulative bytes in a single coalesced `writeMulti`.
24
32
  * Chunk *count* alone is not enough — 1,000 small chunks are ~100KB but 1,000
@@ -28,6 +36,16 @@ export declare const MAX_CHUNKS_PER_BATCH = 1000;
28
36
  * out alone). Default 1 MiB. Override: `WORKFLOW_STREAM_MAX_BYTES_PER_BATCH`.
29
37
  */
30
38
  export declare const MAX_BYTES_PER_BATCH: number;
39
+ export declare const getMaxBytesPerBatch: () => number;
40
+ /**
41
+ * Buffer bound (bytes) for the server writable's group-commit buffer — the
42
+ * byte-denominated counterpart of {@link MAX_INFLIGHT_CHUNKS}. `write()`
43
+ * blocks once this much data is buffered-but-not-durable, so a fast producer
44
+ * of large chunks can't grow client memory without bound. Default 8 MiB
45
+ * (eight request-sized groups). Override: `WORKFLOW_STREAM_MAX_BUFFERED_BYTES`.
46
+ */
47
+ export declare const MAX_BUFFERED_BYTES: number;
48
+ export declare const getMaxBufferedBytes: () => number;
31
49
  /**
32
50
  * Polling interval (in ms) for lock release detection.
33
51
  *
@@ -72,6 +90,13 @@ export interface FlushableStreamState extends PromiseWithResolvers<void> {
72
90
  writablePollingInterval?: ReturnType<typeof setInterval>;
73
91
  /** Interval ID for readable lock polling (if active) */
74
92
  readablePollingInterval?: ReturnType<typeof setInterval>;
93
+ /**
94
+ * Durability barrier of the pipe's sink, when it acks writes on buffer
95
+ * entry (see {@link STREAM_DRAIN_SYMBOL}). Lock-release completion awaits
96
+ * this before resolving so `pendingOps === 0` (fast, buffered acks) can't
97
+ * complete a step while data is still client-side.
98
+ */
99
+ drainBarrier?: DrainBarrier;
75
100
  }
76
101
  export declare function createFlushableState(): FlushableStreamState;
77
102
  /**
@@ -108,4 +133,5 @@ export declare function pollReadableLock(readable: ReadableStream, state: Flusha
108
133
  * @returns Promise that resolves when stream ends (not when done promise resolves)
109
134
  */
110
135
  export declare function flushablePipe(source: ReadableStream, sink: WritableStream, state: FlushableStreamState): Promise<void>;
136
+ export {};
111
137
  //# sourceMappingURL=flushable-stream.d.ts.map
@@ -12,7 +12,7 @@
12
12
  export { FatalError, RetryableError, type RetryableErrorOptions, } from '#compiled/@workflow/errors/index.js';
13
13
  export { createHook, createWebhook, type Hook, type HookOptions, type RequestWithResponse, type Webhook, type WebhookOptions, } from './create-hook.js';
14
14
  export { defineHook, type TypedHook } from './define-hook.js';
15
- export { experimental_setAttributes, type SetAttributesOptions, setAttributes, } from './set-attributes.js';
15
+ export { type SetAttributesOptions, setAttributes, } from './set-attributes.js';
16
16
  export { sleep } from './sleep.js';
17
17
  export { getStepMetadata, type StepMetadata, } from './step/get-step-metadata.js';
18
18
  export { getWorkflowMetadata, type WorkflowMetadata, } from './step/get-workflow-metadata.js';
@@ -1,2 +1,2 @@
1
- import{D as e,En as t,H as n,T as r,Tn as i,V as a,_ as o,_n as s,bn as c,wn as l,xn as u,yn as d}from"../../_chunks/workflow/wait-until-B-1TiJji.js";import{i as f,u as p}from"../../_chunks/workflow/dist-BeQ_csYA.js";import{a as m,i as h,r as g,t as _}from"../../_chunks/workflow/attribute-changes-B6ltn-ph.js";import"../../_chunks/workflow/dist-D7ANgxe0.js";import{n as v}from"../../_chunks/workflow/resume-hook-D2AqAGjq.js";import{t as y}from"../../_chunks/workflow/sleep-CrgsokmG.js";function b(e){h(`createHook()`,`https://workflow-sdk.dev/docs/api-reference/workflow/create-hook`,b)}function x(e){h(`createWebhook()`,`https://workflow-sdk.dev/docs/api-reference/workflow/create-webhook`,x)}function S({schema:e}={}){function t(e){h(`defineHook().create()`,`https://workflow-sdk.dev/docs/api-reference/workflow/define-hook`,t)}return{create:t,async resume(t,n){if(!e?.[`~standard`])return await v(t,n);let r=e[`~standard`].validate(n);if(r instanceof Promise&&(r=await r),r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>String(typeof e==`object`&&e?e.key:e)).join(`.`);return t?` at "${t}": ${e.message}`:` ${e.message}`});throw Error(`Hook payload did not match the defined schema:\n${e.join(`
2
- `)}`)}return await v(t,r.value)}}}async function C(e,t={}){let r=n.getStore(),i=r?.workflowMetadata?.workflowRunId;if(!i)throw new f(`setAttributes() must be called from a 'use workflow' or 'use step' function. Calling it from plain host code is not supported.`);let a=_(e,t);if(a.length!==0){if(r.runReadyBarrier)try{await r.runReadyBarrier}catch{}await(await s()).events.create(i,{eventType:`attr_set`,specVersion:5,eventData:{changes:a,writer:{type:`step`,stepId:r.stepMetadata.stepId,attempt:r.stepMetadata.attempt},...t.allowReservedAttributes===!0?{allowReservedAttributes:!0}:{}}})}}const w=C;function T(){let e=n.getStore();return e||g(`getStepMetadata()`,`https://workflow-sdk.dev/docs/api-reference/workflow/get-step-metadata`,T),e.stepMetadata}function E(){let e=n.getStore();return e||m(`getWorkflowMetadata()`,`https://workflow-sdk.dev/docs/api-reference/workflow/get-workflow-metadata`,E),e.workflowMetadata}function D(s={}){let f=n.getStore();f||m(`getWritable()`,`https://workflow-sdk.dev/docs/api-reference/workflow/get-writable`,D);let{namespace:p}=s,h=f.workflowMetadata.workflowRunId,g=a(h,p),_=f.writables??=new Map,v=_.get(g);if(v)return v.writable;let y=e(r(globalThis,f.ops,h,f.encryptionKey,!0,f.runReadyBarrier),f.encryptionKey),b=new o(h,g,f.runReadyBarrier),x=d();return f.ops.push(x.promise),c(y.readable,b,x).catch(()=>{}),u(y.writable,x),Object.defineProperty(y.writable,l,{value:g,writable:!1}),Object.defineProperty(y.writable,t,{value:h,writable:!1}),f.workflowDeploymentId&&Object.defineProperty(y.writable,i,{value:f.workflowDeploymentId,writable:!1}),_.set(g,{writable:y.writable,state:x}),y.writable}export{f as FatalError,p as RetryableError,b as createHook,x as createWebhook,S as defineHook,w as experimental_setAttributes,T as getStepMetadata,E as getWorkflowMetadata,D as getWritable,C as setAttributes,y as sleep};
1
+ import{An as e,Cn as t,E as n,H as r,O as i,On as a,Rn as o,Tn as s,U as c,jn as l,kn as u,pn as d,v as f,wn as p,xn as m}from"../../_chunks/workflow/wait-until-De9yESQN.js";import{i as h,u as g}from"../../_chunks/workflow/dist-BeQ_csYA.js";import{a as _,i as v,r as y,t as b}from"../../_chunks/workflow/attribute-changes-DeZc2RZz.js";import"../../_chunks/workflow/dist-WjtNsOyf.js";import{n as x}from"../../_chunks/workflow/resume-hook-ip1hbn1b.js";import{t as S}from"../../_chunks/workflow/sleep-BjrUxUcs.js";function C(e){v(`createHook()`,`https://workflow-sdk.dev/docs/api-reference/workflow/create-hook`,C)}function w(e){v(`createWebhook()`,`https://workflow-sdk.dev/docs/api-reference/workflow/create-webhook`,w)}function T({schema:e}={}){function t(e){v(`defineHook().create()`,`https://workflow-sdk.dev/docs/api-reference/workflow/define-hook`,t)}return{create:t,async resume(t,n){if(!e?.[`~standard`])return await x(t,n);let r=e[`~standard`].validate(n);if(r instanceof Promise&&(r=await r),r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>String(typeof e==`object`&&e?e.key:e)).join(`.`);return t?` at "${t}": ${e.message}`:` ${e.message}`});throw Error(`Hook payload did not match the defined schema:\n${e.join(`
2
+ `)}`)}return await x(t,r.value)}}}async function E(e,t={}){let n=c.getStore(),r=n?.workflowMetadata?.workflowRunId;if(!r)throw new h(`setAttributes() must be called from a 'use workflow' or 'use step' function. Calling it from plain host code is not supported.`);let i=b(e,t);if(i.length!==0){if(n.runReadyBarrier)try{await n.runReadyBarrier}catch{}await(await m()).events.create(r,{eventType:`attr_set`,specVersion:5,eventData:{changes:i,writer:{type:`step`,stepId:n.stepMetadata.stepId,attempt:n.stepMetadata.attempt},...t.allowReservedAttributes===!0?{allowReservedAttributes:!0}:{}}})}}function D(){let e=c.getStore();return e||y(`getStepMetadata()`,`https://workflow-sdk.dev/docs/api-reference/workflow/get-step-metadata`,D),e.stepMetadata}function O(){let e=c.getStore();return e||_(`getWorkflowMetadata()`,`https://workflow-sdk.dev/docs/api-reference/workflow/get-workflow-metadata`,O),e.workflowMetadata}function k(m={}){let h=c.getStore();h||_(`getWritable()`,`https://workflow-sdk.dev/docs/api-reference/workflow/get-writable`,k);let{namespace:g}=m,v=h.workflowMetadata.workflowRunId,y=r(v,g),b=h.writables??=new Map,x=b.get(y);if(x)return x.writable;let S=i(n(globalThis,h.ops,v,h.encryptionKey,!0,h.runReadyBarrier),h.encryptionKey),C=new f(v,y,h.runReadyBarrier),w=t();return h.ops.push(w.promise),p(S.readable,C,w).catch(()=>{}),s(S.writable,w),Object.defineProperty(S.writable,a,{value:y,writable:!1}),Object.defineProperty(S.writable,l,{value:v,writable:!1}),h.workflowDeploymentId&&Object.defineProperty(S.writable,u,{value:h.workflowDeploymentId,writable:!1}),d(h.encryptionKey)&&Object.defineProperty(S.writable,e,{value:o(h.encryptionKey.keyPair.publicKey),writable:!1}),b.set(y,{writable:S.writable,state:w}),S.writable}export{h as FatalError,g as RetryableError,C as createHook,w as createWebhook,T as defineHook,D as getStepMetadata,O as getWorkflowMetadata,k as getWritable,E as setAttributes,S as sleep};
@@ -2,7 +2,7 @@
2
2
  * Utils used by the bundler when transforming code
3
3
  */
4
4
  import type { WorldCapabilities } from '#compiled/@workflow/world/index.js';
5
- import type { CryptoKey } from './encryption.js';
5
+ import type { PayloadKey } from './serialization/encryption.js';
6
6
  import type { EventsConsumer } from './events-consumer.js';
7
7
  import type { QueueItem } from './global.js';
8
8
  import type { ReplayPayloadCache } from './replay-payload-cache.js';
@@ -27,7 +27,7 @@ export declare function registerStepFunction(stepId: string, stepFn: StepFunctio
27
27
  export declare function getStepFunction(stepId: string): StepFunction | undefined;
28
28
  export interface WorkflowOrchestratorContext {
29
29
  runId: string;
30
- encryptionKey: CryptoKey | undefined;
30
+ encryptionKey: PayloadKey | undefined;
31
31
  worldCapabilities?: WorldCapabilities;
32
32
  globalThis: typeof globalThis;
33
33
  eventsConsumer: EventsConsumer;
@@ -57,26 +57,33 @@ export interface WorkflowOrchestratorContext {
57
57
  pendingDeliveries: number;
58
58
  /**
59
59
  * Ordered registry of in-flight "branch-deciding" deliveries — the
60
- * resolutions a workflow typically `Promise.race`s on: buffered hook
61
- * payloads (`hook_received`) and wait completions (`wait_completed`).
62
- * Keyed by the delivery's position (index) in the consumed event log.
60
+ * resolutions a workflow typically `Promise.race`s on, or awaits from
61
+ * independent concurrent branches: hook payloads (`hook_received`), wait
62
+ * completions (`wait_completed`), and step results (`step_completed` /
63
+ * `step_failed`). Keyed by the delivery's position (index) in the consumed
64
+ * event log.
63
65
  *
64
- * The problem: a buffered hook payload is observed via the async hook
65
- * iterator (`yield await this`), costing extra microtask hops, while a
66
- * `wait_completed` resolves with fewer hops — and a reused sleep can
67
- * resolve in an entirely earlier loop iteration. Either way, the
68
- * resolution that the committed event log ordered first can lose a
69
- * `Promise.race` to a faster- or already-resolved competitor, diverging
70
- * from the log and surfacing as `CorruptedEventLogError`.
66
+ * The problem: each of these resolutions reaches workflow code after a
67
+ * different, workload-dependent number of microtask hops. A buffered hook
68
+ * payload is observed via the async hook iterator (`yield await this`),
69
+ * costing extra hops; a `wait_completed` resolves with fewer, and a reused
70
+ * sleep can resolve in an entirely earlier loop iteration; a step result is
71
+ * gated on hydration whose cost varies between replays of the SAME
72
+ * invocation — the first replay pays the full decrypt/decompress/revive,
73
+ * while later replays sharing the invocation's `ReplayPayloadCache`
74
+ * memo-hit small primitive results and resolve in one or two hops. Either
75
+ * way, the resolution that the committed event log ordered first can lose a
76
+ * `Promise.race` (or a `useStep` ULID allocation) to a faster- or
77
+ * already-resolved competitor, diverging from the log and surfacing as
78
+ * `CorruptedEventLogError`.
71
79
  *
72
80
  * The fix is a strict, deterministic delivery order anchored on
73
81
  * event-log position: a delivery does not resolve to the workflow until
74
- * every earlier-in-log delivery of the OPPOSITE kind has been delivered.
75
- * (Opposite kind only: sequential same-kind hook payloads must not block
76
- * one another, and a wait need not wait behind a later wait.) Because the
82
+ * every relevant earlier-in-log delivery has been delivered. Because the
77
83
  * gate is "the earlier delivery resolved", not "won a timing race", the
78
84
  * outcome is independent of microtask hops, hydration/decryption time,
79
- * and `Promise.race` argument order.
85
+ * and `Promise.race` argument order. Which earlier kinds a delivery defers
86
+ * behind is spelled out on {@link awaitEarlierDeliveries}.
80
87
  *
81
88
  * Index is used rather than the `eventId` string because `eventId` is an
82
89
  * opaque, world-assigned value not guaranteed to sort in creation order
@@ -93,45 +100,81 @@ export interface WorkflowOrchestratorContext {
93
100
  replayPayloadCache: ReplayPayloadCache;
94
101
  }
95
102
  /** The kind of branch-deciding delivery a barrier represents. */
96
- export type DeliveryKind = 'hook' | 'wait';
103
+ export type DeliveryKind = 'hook' | 'wait' | 'step';
97
104
  interface DeliveryBarrierEntry {
98
105
  kind: DeliveryKind;
99
106
  /** Resolves once this delivery has resolved to the workflow. */
100
107
  delivered: Promise<void>;
108
+ /**
109
+ * Whether this delivery is committed to reaching the workflow without any
110
+ * further action by workflow code. True for wait completions and step
111
+ * results, which always resolve from their own chain, and for a hook payload
112
+ * that already had a waiting consumer when it was consumed.
113
+ *
114
+ * False for a BUFFERED hook payload no consumer has claimed yet: it is
115
+ * delivered by `claim()`, i.e. whenever the workflow next reads the hook —
116
+ * which may be causally *after* a later-in-log delivery. `arm()` flips it
117
+ * once a consumer takes the payload.
118
+ */
119
+ armed: boolean;
101
120
  }
102
121
  /**
103
- * Awaits, in strict event-log order, every still-registered delivery whose
104
- * index is earlier than `eventIndex` AND whose kind is in `deferBehindKinds`,
105
- * so that this resolution is handed to the workflow only after all relevant
106
- * earlier-in-log deliveries have been. This is what keeps a `Promise.race`
107
- * deterministic and aligned with the committed event log, independent of
108
- * microtask-hop counts, hydration time, or race-argument order.
122
+ * Awaits, in strict event-log order, every still-registered delivery that is
123
+ * earlier in the log than `eventIndex` and that a delivery of `kind` defers
124
+ * behind (see {@link DEFER_BEHIND}), so that this resolution is handed to the
125
+ * workflow only after all relevant earlier-in-log deliveries have been. This
126
+ * is what keeps a `Promise.race` — or the ULID a follow-up `useStep` draws on
127
+ * a concurrent branch — deterministic and aligned with the committed event
128
+ * log, independent of microtask-hop counts, hydration time, or race-argument
129
+ * order. When this delivery does have to wait, it also yields a macrotask
130
+ * afterwards so the earlier delivery's consumer can run to its own next
131
+ * suspension point first; see the comment at that `await` for why ordering the
132
+ * `resolve()` calls alone is not enough.
109
133
  *
110
- * `deferBehindKinds` is the opposite kind(s): a hook defers behind earlier
111
- * WAITS (not earlier hooks — those are sequential same-entity payloads), a
112
- * wait defers behind earlier HOOKS.
134
+ * One asymmetry: a STEP result additionally skips any earlier delivery that
135
+ * will not resolve on its own, i.e. one blocked (directly or transitively) on
136
+ * a buffered hook payload no consumer has claimed. Such a payload is delivered
137
+ * only when the workflow next reads the hook, and reaching that read very
138
+ * commonly requires the step result itself (`await stepX()` before the read).
139
+ * Gating the step on it would stall the workflow until the barrier's idle
140
+ * safety net fires, which then releases every delivery queued behind that
141
+ * payload at once — losing exactly the race this ordering exists to protect.
142
+ * Waits and hooks keep gating on unclaimed payloads: for them, waiting for the
143
+ * claim IS the ordering guarantee (a `wait_completed` must not preempt a
144
+ * payload the log ordered first).
113
145
  */
114
- export declare function awaitEarlierDeliveries(ctx: WorkflowOrchestratorContext, eventIndex: number | undefined, deferBehindKinds: readonly DeliveryKind[]): Promise<void>;
146
+ export declare function awaitEarlierDeliveries(ctx: WorkflowOrchestratorContext, eventIndex: number | undefined, kind: DeliveryKind): Promise<void>;
115
147
  /** Handle for a registered branch-deciding delivery barrier. */
116
148
  export interface DeliveryBarrier {
117
149
  /**
118
150
  * Mark this delivery as delivered to the workflow. Resolves its
119
- * `delivered` promise so any later-in-log opposite-kind delivery gated on
120
- * it (via {@link awaitEarlierDeliveries}) may proceed, and removes it from
121
- * the registry. Idempotent.
151
+ * `delivered` promise so any later-in-log delivery gated on it (via
152
+ * {@link awaitEarlierDeliveries}) may proceed, and removes it from the
153
+ * registry. Idempotent.
122
154
  */
123
155
  markDelivered: () => void;
156
+ /**
157
+ * Mark this delivery as committed to happening, for a barrier registered
158
+ * unarmed (a buffered hook payload) once a consumer has claimed it. From
159
+ * then on a later step result may be ordered behind it. Idempotent.
160
+ */
161
+ arm: () => void;
124
162
  }
125
163
  /**
126
164
  * Register a branch-deciding delivery at its event-log index so that later
127
- * opposite-kind deliveries can be ordered strictly after it. Returns an inert
128
- * handle when `pendingDeliveryBarriers` is not initialized.
165
+ * deliveries can be ordered strictly after it. Returns an inert handle when
166
+ * `pendingDeliveryBarriers` is not initialized.
167
+ *
168
+ * Pass `armed: false` for a delivery whose resolution waits on workflow code
169
+ * asking for it (a buffered hook payload); call `arm()` when it does.
129
170
  *
130
171
  * To guarantee a later delivery gated on this one can never hang when this
131
172
  * delivery is abandoned (the workflow took a different branch or is
132
173
  * suspending and never observes it), the barrier auto-resolves at idle.
133
174
  */
134
- export declare function registerDeliveryBarrier(ctx: WorkflowOrchestratorContext, eventIndex: number | undefined, kind: DeliveryKind): DeliveryBarrier;
175
+ export declare function registerDeliveryBarrier(ctx: WorkflowOrchestratorContext, eventIndex: number | undefined, kind: DeliveryKind, options?: {
176
+ armed?: boolean;
177
+ }): DeliveryBarrier;
135
178
  /**
136
179
  * Schedule a callback to fire only after all pending data deliveries
137
180
  * (step results, hook payloads) and async deserialization have completed.
@@ -1 +1 @@
1
- import{a as e,i as t,n,r,t as i}from"../../_chunks/workflow/private-DolBHKOQ.js";export{i as awaitEarlierDeliveries,n as getStepFunction,r as registerDeliveryBarrier,t as registerStepFunction,e as scheduleWhenIdle};
1
+ import{a as e,i as t,n,r,t as i}from"../../_chunks/workflow/private-Cre8uYkA.js";export{i as awaitEarlierDeliveries,n as getStepFunction,r as registerDeliveryBarrier,t as registerStepFunction,e as scheduleWhenIdle};
@@ -1,5 +1,5 @@
1
1
  import type { Event, WorkflowRun } from '#compiled/@workflow/world/index.js';
2
- import type { CryptoKey } from './encryption.js';
2
+ import type { PayloadKey } from './serialization/encryption.js';
3
3
  import { type PreparedReplayPayload, type ReplayPayloadPreparer } from './serialization.js';
4
4
  type ReplayPayloadField = 'result' | 'error' | 'payload';
5
5
  /**
@@ -19,7 +19,8 @@ export declare class ReplayPayloadCache {
19
19
  private readonly preparer;
20
20
  private readonly preparedPayloads;
21
21
  private readonly primitiveStepResults;
22
- constructor(encryptionKey: CryptoKey | undefined, preparer?: ReplayPayloadPreparer);
22
+ private nextUnscannedEventIndex;
23
+ constructor(encryptionKey: PayloadKey | undefined, preparer?: ReplayPayloadPreparer);
23
24
  /**
24
25
  * Start every missing binary preparation before workflow execution. Failures
25
26
  * are intentionally retained: the ordered event consumer must observe the
@@ -0,0 +1,52 @@
1
+ import type { Event } from '#compiled/@workflow/world/index.js';
2
+ /**
3
+ * Scope for {@link countStepStartedEvents}:
4
+ * - `{ type: 'ownedBy', messageId }` counts only starts whose
5
+ * `eventData.ownerMessageId` matches — i.e. attempts performed by that
6
+ * owning queue message (inline lazy starts and owned-recovery re-stamps).
7
+ * - `{ type: 'totalAttempts' }` estimates the step's genuine attempt total
8
+ * across its whole lifecycle: unstamped (bare) starts — which only real
9
+ * queue-dispatched background deliveries write — plus the starts of the
10
+ * single most-started owner. A genuine lifecycle has at most one inline
11
+ * owner phase (ownership is claimed atomically at step creation and
12
+ * lapses permanently at `step_retrying` or on any bare start), so taking
13
+ * the max over owners counts that phase's real attempts while invocations
14
+ * racing on the same batch — which stamp their own one-off message IDs —
15
+ * contribute at most their single largest count instead of accumulating.
16
+ */
17
+ export type StepStartScope = {
18
+ type: 'ownedBy';
19
+ messageId: string;
20
+ } | {
21
+ type: 'totalAttempts';
22
+ };
23
+ /**
24
+ * Number of `step_started` events already recorded for a step, used as the
25
+ * authoritative attempt count for the maxRetries ceiling (the only bound for
26
+ * steps that time out without writing a `step_failed`).
27
+ *
28
+ * IMPORTANT: the raw (unscoped) count is NOT a reliable attempt number.
29
+ * Concurrent invocations racing on the same pending batch (stale replays,
30
+ * wake replays, a step message dispatched by a replay that lost the
31
+ * create-claim race, ...) can each write a `step_started` for the same
32
+ * logical attempt — worlds without an atomic start guard (world-local) let
33
+ * all of them through. Counting those duplicates as "attempts" made the
34
+ * maxRetries ceiling fire on healthy runs and fail them with a false
35
+ * "exceeded max retries" (see workflow#3069).
36
+ *
37
+ * Callers therefore scope the count to the starts their ceiling is actually
38
+ * about via `scope`:
39
+ * - the inline owned-recovery ceiling counts only THIS message's starts
40
+ * (`ownedBy`) — each real (re)delivery of the owning message stamps its
41
+ * `ownerMessageId` on the start it writes, while racing invocations stamp
42
+ * their own IDs (or none), so they no longer inflate the count;
43
+ * - the background-step ceiling counts the lifecycle attempt total
44
+ * (`totalAttempts`: bare starts plus the largest single owner's starts) —
45
+ * so a step that exhausted part of its budget under inline ownership
46
+ * before transitioning to queued/bare retries still trips the combined
47
+ * ceiling, while racers' one-off stamped duplicates don't accumulate, and
48
+ * throttle/too-early redeliveries (which write no start at all) stay
49
+ * excluded as before.
50
+ */
51
+ export declare function countStepStartedEvents(events: Event[] | null | undefined, stepId: string, scope?: StepStartScope): number;
52
+ //# sourceMappingURL=count-step-started-events.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { Event, HealthCheckPayload, ValidQueueName, WorkflowRun, World } from '#compiled/@workflow/world/index.js';
2
- import { type CryptoKey } from '../encryption.js';
2
+ import { type PayloadKey } from '../serialization/encryption.js';
3
3
  /**
4
4
  * Validates a workflow name and returns the corresponding queue name.
5
5
  * Ensures the workflow name only contains safe characters before
@@ -25,6 +25,15 @@ export interface HealthCheckResult {
25
25
  * or a non-JSON plain-text health response.
26
26
  */
27
27
  workflowCoreVersion?: string;
28
+ /**
29
+ * The target run's X25519 public key (base64), returned only when the probe
30
+ * carried a `runId` and the responding deployment has encryption enabled.
31
+ *
32
+ * Lets a cross-deployment `start()` seal the workflow arguments using a
33
+ * response it was already waiting on, instead of making a separate
34
+ * key-lookup request.
35
+ */
36
+ encryptionPublicKey?: string;
28
37
  }
29
38
  /**
30
39
  * Checks if the given message is a health check payload.
@@ -36,15 +45,20 @@ export declare function parseHealthCheckPayload(message: unknown): HealthCheckPa
36
45
  * The caller can listen to this stream to get the health check response.
37
46
  *
38
47
  * @param healthCheck - The parsed health check payload
39
- * @param endpoint - Which endpoint is responding ('workflow' or 'step')
40
48
  */
41
- export declare function handleHealthCheckMessage(healthCheck: HealthCheckPayload, endpoint: 'workflow' | 'step', worldSpecVersion?: number): Promise<void>;
42
- export type HealthCheckEndpoint = 'workflow' | 'step';
49
+ export declare function handleHealthCheckMessage(healthCheck: HealthCheckPayload, worldSpecVersion?: number): Promise<void>;
43
50
  export interface HealthCheckOptions {
44
51
  /** Timeout in milliseconds to wait for health check response. Default: 30000 (30s) */
45
52
  timeout?: number;
46
53
  /** Deployment ID to send the health check to. Falls back to process.env.VERCEL_DEPLOYMENT_ID. */
47
54
  deploymentId?: string;
55
+ /**
56
+ * The run id the caller is about to create. When set, the responding
57
+ * deployment derives that run's public key locally and returns it as
58
+ * `encryptionPublicKey`, letting a cross-deployment `start()` seal the
59
+ * workflow arguments without a separate key lookup.
60
+ */
61
+ runId?: string;
48
62
  /**
49
63
  * Queue namespace of the target deployment (e.g. `'eve'` for topics like
50
64
  * `__eve_wkf_workflow_*`). Falls back to `WORKFLOW_QUEUE_NAMESPACE` in the
@@ -56,7 +70,14 @@ export interface HealthCheckOptions {
56
70
  */
57
71
  namespace?: string;
58
72
  }
59
- export declare function healthCheck(world: World, endpoint: HealthCheckEndpoint, options?: HealthCheckOptions): Promise<HealthCheckResult>;
73
+ export declare function healthCheck(world: World, options?: HealthCheckOptions): Promise<HealthCheckResult>;
74
+ /**
75
+ * Appends events whose IDs are not already present in `target`.
76
+ *
77
+ * Pass the IDs currently present in `target` when appending repeatedly to the
78
+ * same array. The set is updated alongside `target`.
79
+ */
80
+ export declare function appendUniqueEvents(target: Event[], events: readonly Event[], targetIds?: Set<string>): void;
60
81
  /**
61
82
  * Loads workflow run events by iterating through all pages of paginated
62
83
  * results. Events are returned in chronological (ascending) order for
@@ -147,13 +168,21 @@ export declare function getQueueOverhead(message: {
147
168
  [k: string]: number;
148
169
  } | undefined;
149
170
  /**
150
- * Returns a memoized accessor for the per-run AES-256 encryption key.
171
+ * Returns a memoized accessor for a run's full encryption capability.
172
+ *
173
+ * The first call resolves the run's key material via
174
+ * `world.getEncryptionKeyForRun` (which may do HKDF derivation locally on
175
+ * Vercel, or a network fetch from external contexts) and derives a
176
+ * {@link PayloadKey} from it; subsequent calls await the same cached promise.
177
+ * If the world doesn't support encryption or the run has no key configured,
178
+ * the cached value is `undefined`.
151
179
  *
152
- * The first call resolves the key via `world.getEncryptionKeyForRun` (which
153
- * may do HKDF derivation locally on Vercel, or a network fetch from
154
- * external contexts) and imports it as a `CryptoKey`; subsequent calls
155
- * await the same cached promise. If the world doesn't support encryption
156
- * or the run has no key configured, the cached value is `undefined`.
180
+ * The resolved value is deliberately the *full* capability — the symmetric AES
181
+ * key plus the run's X25519 keypair — not just a `CryptoKey`. A run reading
182
+ * its own event log can encounter sealed (`encp`) payloads that another run
183
+ * wrote to it (a cross-deployment hook resumption, say), and opening those
184
+ * needs the keypair. Resolving only the symmetric key would leave those
185
+ * payloads unopenable and wedge the run.
157
186
  *
158
187
  * Used by step / workflow handlers to defer the (potentially expensive)
159
188
  * key fetch until the first code path that actually needs it — typically
@@ -168,5 +197,5 @@ export declare function getQueueOverhead(message: {
168
197
  * outer try/catch to log and surface the issue; the queue's redelivery
169
198
  * semantics will retry the key fetch on the next attempt.
170
199
  */
171
- export declare function memoizeEncryptionKey(world: World, runOrId: WorkflowRun | string): () => Promise<CryptoKey | undefined>;
200
+ export declare function memoizeEncryptionKey(world: World, runOrId: WorkflowRun | string): () => Promise<PayloadKey | undefined>;
172
201
  //# sourceMappingURL=helpers.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { type Hook } from '#compiled/@workflow/world/index.js';
2
- import { type CryptoKey } from '../encryption.js';
2
+ import { type PayloadKey } from '../serialization.js';
3
3
  /**
4
4
  * Get the hook by token to find the associated workflow run,
5
5
  * and hydrate the `metadata` property if it was set from within
@@ -40,7 +40,7 @@ export declare function getHookByToken(token: string): Promise<Hook>;
40
40
  * }
41
41
  * ```
42
42
  */
43
- export declare function resumeHook<T = any>(tokenOrHook: string | Hook, payload: T, encryptionKeyOverride?: CryptoKey): Promise<Hook>;
43
+ export declare function resumeHook<T = any>(tokenOrHook: string | Hook, payload: T, encryptionKeyOverride?: PayloadKey): Promise<Hook>;
44
44
  /**
45
45
  * Resumes a webhook by sending a {@link https://developer.mozilla.org/en-US/docs/Web/API/Request | Request}
46
46
  * object to a hook identified by its token.
@@ -1,5 +1,5 @@
1
1
  import type { Event, SerializedData, World } from '#compiled/@workflow/world/index.js';
2
- import type { CryptoKey } from '../encryption.js';
2
+ import type { PayloadKey } from '../serialization/encryption.js';
3
3
  import { type StepLatencyTracking } from './step-latency.js';
4
4
  export declare const DEFAULT_STEP_MAX_RETRIES = 3;
5
5
  export interface StepExecutorParams {
@@ -13,11 +13,11 @@ export interface StepExecutorParams {
13
13
  rootRunId?: string;
14
14
  stepId: string;
15
15
  stepName: string;
16
- encryptionKey?: CryptoKey;
16
+ encryptionKey?: PayloadKey;
17
17
  /**
18
18
  * The workflow run's specVersion, used to gate payload compression.
19
- * Step outputs/errors are only gzip-compressed when the run is marked
20
- * as possibly containing compressed payloads (specVersion >= 5).
19
+ * Step outputs/errors are only compressed when the run is marked as
20
+ * compression-capable (specVersion >= 5).
21
21
  */
22
22
  runSpecVersion?: number;
23
23
  /**
@@ -36,9 +36,10 @@ export interface StepExecutorParams {
36
36
  * Inline step ownership: the queue message ID of the invocation this
37
37
  * executeStep call runs in (from the queue handler's meta). When set, the
38
38
  * `step_started` this call sends is stamped with it — on the lazy paths
39
- * (where `lazyStepInput` is present) and on the owned-recovery bare start
40
- * (where it is not; the re-stamp keeps a recovered step readable as owned
41
- * by this message, since ownership derives from the LATEST start). Wake
39
+ * (where `lazyStepInput` is present) and on the owned-recovery
40
+ * payload-less start (where it is not; the re-stamp keeps a recovered
41
+ * step readable as owned by this message, since ownership derives from
42
+ * the LATEST start — so a recovery start is never bare). Wake
42
43
  * replays that observe an actively-owned step suppress the immediate
43
44
  * requeue and enqueue a delayed backstop instead. Omitted on the
44
45
  * background-step path, whose bare start intentionally clears ownership
@@ -166,7 +167,7 @@ export type StepExecutionResult = {
166
167
  * runs the step function, creates step_completed/step_failed/step_retrying events.
167
168
  *
168
169
  * Does NOT queue workflow continuation messages — the caller decides what to do next.
169
- * Used by both the V1 step handler and the V2 combined handler.
170
+ * Used by the combined workflow handler for step execution.
170
171
  */
171
172
  export declare function executeStep(params: StepExecutorParams): Promise<StepExecutionResult>;
172
173
  //# sourceMappingURL=step-executor.d.ts.map
@@ -1,19 +1,14 @@
1
1
  import type { World } from '#compiled/@workflow/world/index.js';
2
2
  export type WorldFactoryModule = {
3
3
  createWorld?: () => World | Promise<World>;
4
- /** @deprecated World packages should export `createWorld()` instead. */
5
- createLocalWorld?: () => World | Promise<World>;
6
- /** @deprecated World packages should export `createWorld()` instead. */
7
- createVercelWorld?: () => World | Promise<World>;
8
4
  default?: (() => World | Promise<World>) | World;
9
5
  };
10
6
  /**
11
7
  * Create a World instance from a world factory module. Shared by
12
8
  * `createWorld()` (for the statically injected target world module) and
13
9
  * tooling that loads a world module dynamically (e.g. the Nitro dev
14
- * handler and `@workflow/world-testing`). Legacy world-specific factory
15
- * names are still accepted for compatibility, but world packages should
16
- * export `createWorld()`.
10
+ * handler and `@workflow/world-testing`). World packages should export
11
+ * `createWorld()`.
17
12
  */
18
13
  export declare function createWorldFromModule(mod: WorldFactoryModule): World | Promise<World>;
19
14
  /**
@@ -1,7 +1,7 @@
1
1
  import { type Event, type WorkflowRun } from '#compiled/@workflow/world/index.js';
2
2
  export type { Event, WorkflowRun };
3
3
  export { WorkflowSuspension } from './global.js';
4
- export { type HealthCheckEndpoint, type HealthCheckOptions, type HealthCheckResult, healthCheck, } from './runtime/helpers.js';
4
+ export { type HealthCheckOptions, type HealthCheckResult, healthCheck, } from './runtime/helpers.js';
5
5
  export { getHookByToken, resumeHook, resumeWebhook, } from './runtime/resume-hook.js';
6
6
  export { getRun, Run, type WorkflowReadableStream, type WorkflowReadableStreamOptions, } from './runtime/run.js';
7
7
  export { type CancelRunOptions, cancelRun, listStreams, type ReadStreamOptions, type RecreateRunOptions, type ReenqueueRunOptions, readStream, recreateRunFromExisting, reenqueueRun, type StopSleepOptions, type StopSleepResult, wakeUpRun, } from './runtime/runs.js';