eve 0.66.2 → 0.66.3

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 (141) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/src/cli/commands/registry-declared-setups.d.ts +0 -1
  3. package/dist/src/cli/commands/registry-declared-setups.js +1 -1
  4. package/dist/src/cli/commands/registry.d.ts +5 -1
  5. package/dist/src/cli/commands/registry.js +1 -1
  6. package/dist/src/cli/dev/tui/argument-typeahead.d.ts +1 -2
  7. package/dist/src/cli/dev/tui/argument-typeahead.js +2 -2
  8. package/dist/src/cli/dev/tui/blocks.d.ts +5 -1
  9. package/dist/src/cli/dev/tui/blocks.js +3 -3
  10. package/dist/src/cli/dev/tui/flow-drawer.d.ts +11 -0
  11. package/dist/src/cli/dev/tui/flow-drawer.js +1 -0
  12. package/dist/src/cli/dev/tui/prompt-command-handler.js +1 -1
  13. package/dist/src/cli/dev/tui/prompt-commands.d.ts +199 -0
  14. package/dist/src/cli/dev/tui/prompt-commands.js +2 -2
  15. package/dist/src/cli/dev/tui/registry-result-message.d.ts +15 -4
  16. package/dist/src/cli/dev/tui/registry-result-message.js +4 -4
  17. package/dist/src/cli/dev/tui/runner.d.ts +18 -6
  18. package/dist/src/cli/dev/tui/runner.js +3 -2
  19. package/dist/src/cli/dev/tui/setup-commands.d.ts +5 -22
  20. package/dist/src/cli/dev/tui/setup-commands.js +2 -1
  21. package/dist/src/cli/dev/tui/setup-flow.d.ts +2 -10
  22. package/dist/src/cli/dev/tui/setup-panel.d.ts +4 -23
  23. package/dist/src/cli/dev/tui/setup-panel.js +3 -3
  24. package/dist/src/cli/dev/tui/terminal-renderer.d.ts +11 -7
  25. package/dist/src/cli/dev/tui/terminal-renderer.js +11 -10
  26. package/dist/src/cli/dev/tui/tui-prompter.js +1 -1
  27. package/dist/src/cli/dev/tui/tui.js +1 -1
  28. package/dist/src/compiled/.vendor-stamp.json +6 -6
  29. package/dist/src/compiled/@workflow/core/create-hook.d.ts +38 -1
  30. package/dist/src/compiled/@workflow/core/global.d.ts +2 -0
  31. package/dist/src/compiled/@workflow/core/index.js +2 -2
  32. package/dist/src/compiled/@workflow/core/private.js +1 -1
  33. package/dist/src/compiled/@workflow/core/runtime/constants.d.ts +9 -0
  34. package/dist/src/compiled/@workflow/core/runtime/helpers.js +1 -1
  35. package/dist/src/compiled/@workflow/core/runtime/hook-wake.d.ts +89 -0
  36. package/dist/src/compiled/@workflow/core/runtime/open-hook-wait-state.d.ts +55 -0
  37. package/dist/src/compiled/@workflow/core/runtime/quickjs-runtime.d.ts +2 -0
  38. package/dist/src/compiled/@workflow/core/runtime/suspension-handler.d.ts +8 -1
  39. package/dist/src/compiled/@workflow/core/runtime.js +4 -4
  40. package/dist/src/compiled/@workflow/core/serialization/types.d.ts +8 -0
  41. package/dist/src/compiled/@workflow/core/serialization.d.ts +8 -0
  42. package/dist/src/compiled/@workflow/core/serialization.js +1 -1
  43. package/dist/src/compiled/@workflow/core/version.d.ts +1 -1
  44. package/dist/src/compiled/@workflow/core/workflow.js +1 -1
  45. package/dist/src/compiled/@workflow/errors/index.d.ts +23 -0
  46. package/dist/src/compiled/@workflow/errors/index.js +1 -1
  47. package/dist/src/compiled/@workflow/world/events.d.ts +34 -0
  48. package/dist/src/compiled/@workflow/world/hooks.d.ts +27 -0
  49. package/dist/src/compiled/@workflow/world/index.d.ts +2 -2
  50. package/dist/src/compiled/@workflow/world/interfaces.d.ts +24 -0
  51. package/dist/src/compiled/@workflow/world/spec-version.d.ts +32 -11
  52. package/dist/src/compiled/@workflow/world-local/index.js +3 -3
  53. package/dist/src/compiled/@workflow/world-vercel/index.js +17 -17
  54. package/dist/src/compiled/_chunks/workflow/{attribute-changes-89Nwz7XW.js → attribute-changes-DzJovO_f.js} +1 -1
  55. package/dist/src/compiled/_chunks/workflow/dist-BQSf8Hax.js +1 -0
  56. package/dist/src/compiled/_chunks/workflow/dist-BfMqXLK3.js +3 -0
  57. package/dist/src/compiled/_chunks/workflow/frames-qKc30rjg.js +3 -0
  58. package/dist/src/compiled/_chunks/workflow/{global-DIlFoH2w.js → global-BQnKzRXo.js} +1 -1
  59. package/dist/src/compiled/_chunks/workflow/{helpers-k3zcudWr.js → helpers-CNMO7zB1.js} +1 -1
  60. package/dist/src/compiled/_chunks/workflow/{logger-Bzc8jWWj.js → logger-BCEj9caG.js} +1 -1
  61. package/dist/src/compiled/_chunks/workflow/resume-hook-QS_cMwHn.js +1 -0
  62. package/dist/src/compiled/_chunks/workflow/run-CA5wWV2S.js +1 -0
  63. package/dist/src/compiled/_chunks/workflow/serialization-CJ265vSe.js +3 -0
  64. package/dist/src/compiled/_chunks/workflow/sleep-CBn94Ayv.js +1 -0
  65. package/dist/src/compiled/_chunks/workflow/{wait-until-DXLZx3tU.js → wait-until-Bo2U6ON9.js} +1 -1
  66. package/dist/src/compiled/_chunks/workflow/{ws-transport-BSM_Cl7a.js → ws-transport-BrsMYqJg.js} +1 -1
  67. package/dist/src/execution/dynamic-workflow/tool.js +1 -1
  68. package/dist/src/execution/session/entry-input.d.ts +4 -0
  69. package/dist/src/execution/session/entry-input.js +1 -1
  70. package/dist/src/execution/tools/agent-router-workflow.js +1 -1
  71. package/dist/src/execution/tools/ask-question-workflow.js +1 -1
  72. package/dist/src/execution/tools/sleep-workflow.js +1 -1
  73. package/dist/src/execution/workflow-runtime.js +1 -1
  74. package/dist/src/extensions/code/extension/lib/connect-authentication.js +1 -1
  75. package/dist/src/extensions/code/extension/lib/github-shell.js +1 -1
  76. package/dist/src/extensions/code/extension/lib/prwatch-github.js +1 -1
  77. package/dist/src/harness/tool-loop.js +1 -1
  78. package/dist/src/internal/application/package.js +1 -1
  79. package/dist/src/internal/workflow/development-world-client.js +1 -1
  80. package/dist/src/public/channels/slack/activity-plan.d.ts +2 -1
  81. package/dist/src/public/channels/slack/activity-plan.js +1 -1
  82. package/dist/src/public/channels/slack/activity.d.ts +2 -0
  83. package/dist/src/public/channels/slack/activity.js +1 -1
  84. package/dist/src/public/channels/slack/api.d.ts +7 -0
  85. package/dist/src/public/channels/slack/api.js +1 -1
  86. package/dist/src/public/channels/slack/attachments.d.ts +5 -2
  87. package/dist/src/public/channels/slack/attachments.js +1 -1
  88. package/dist/src/public/channels/slack/index.d.ts +1 -0
  89. package/dist/src/public/channels/slack/input-response.d.ts +2 -0
  90. package/dist/src/public/channels/slack/input-response.js +1 -1
  91. package/dist/src/public/channels/slack/interaction-cards.js +1 -1
  92. package/dist/src/public/channels/slack/interactions.d.ts +2 -0
  93. package/dist/src/public/channels/slack/interactions.js +1 -1
  94. package/dist/src/public/channels/slack/slackChannel.d.ts +3 -0
  95. package/dist/src/public/channels/slack/slackChannel.js +1 -1
  96. package/dist/src/public/channels/slack/slash-command.d.ts +5 -1
  97. package/dist/src/public/channels/slack/slash-command.js +1 -1
  98. package/dist/src/public/channels/slack/transport.d.ts +76 -0
  99. package/dist/src/public/channels/slack/transport.js +1 -0
  100. package/dist/src/setup/cli/channel-setup-prompter.d.ts +2 -9
  101. package/dist/src/setup/cli/channel-setup-prompter.js +1 -1
  102. package/dist/src/setup/cli/index.d.ts +1 -1
  103. package/dist/src/setup/connection-connector.js +1 -1
  104. package/dist/src/setup/flows/model-login-connection.d.ts +0 -16
  105. package/dist/src/setup/flows/model-login-connection.js +1 -1
  106. package/dist/src/setup/flows/model-login-options.d.ts +59 -0
  107. package/dist/src/setup/flows/model-login-options.js +1 -0
  108. package/dist/src/setup/flows/model-login.js +1 -1
  109. package/dist/src/setup/flows/model-source-change.d.ts +0 -2
  110. package/dist/src/setup/flows/model-source-change.js +1 -1
  111. package/dist/src/setup/flows/registry-session.d.ts +15 -13
  112. package/dist/src/setup/flows/registry-session.js +1 -1
  113. package/dist/src/setup/flows/registry.js +1 -1
  114. package/dist/src/setup/flows/vercel-model-login.js +1 -1
  115. package/dist/src/setup/integrations/photon/setup-flow.js +1 -1
  116. package/dist/src/setup/prompter.d.ts +2 -2
  117. package/dist/src/setup/registry-setup-client.js +1 -1
  118. package/dist/src/setup/registry-setup-protocol.d.ts +0 -4
  119. package/dist/src/setup/scaffold/create/project.js +1 -1
  120. package/dist/src/setup/slack-connect-lifecycle.js +1 -1
  121. package/docs/channels/slack.mdx +31 -2
  122. package/docs/guides/dev-tui.md +1 -1
  123. package/package.json +6 -6
  124. package/dist/src/compiled/_chunks/workflow/dist-CNT2vjZ4.js +0 -1
  125. package/dist/src/compiled/_chunks/workflow/dist-DtXwQbZr.js +0 -3
  126. package/dist/src/compiled/_chunks/workflow/frames-DnrfSd1P.js +0 -3
  127. package/dist/src/compiled/_chunks/workflow/resume-hook-BmJ263ZR.js +0 -1
  128. package/dist/src/compiled/_chunks/workflow/run-NLvREued.js +0 -1
  129. package/dist/src/compiled/_chunks/workflow/serialization-HCDeQWcR.js +0 -3
  130. package/dist/src/compiled/_chunks/workflow/sleep-Bi508qmg.js +0 -1
  131. package/dist/src/public/channels/slack/api-errors.d.ts +0 -33
  132. package/dist/src/public/channels/slack/api-errors.js +0 -1
  133. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff}/node_modules/@vercel/connect/dist/authorization.js +0 -0
  134. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff}/node_modules/@vercel/connect/dist/connector.js +0 -0
  135. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff}/node_modules/@vercel/connect/dist/index.js +0 -0
  136. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff}/node_modules/@vercel/connect/dist/installation.js +0 -0
  137. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff}/node_modules/@vercel/connect/dist/internal/base-url.js +0 -0
  138. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff}/node_modules/@vercel/connect/dist/internal/default-scopes.js +0 -0
  139. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff}/node_modules/@vercel/connect/dist/internal/env.js +0 -0
  140. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff}/node_modules/@vercel/connect/dist/internal/url-validation.js +0 -0
  141. /package/dist/src/node_modules/.pnpm/{@vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_37d5e4f23f0f03cba2e0819e67e81b38 → @vercel_connect@2.2.0_@ai-sdk_mcp@2.0.52_zod@4.5.4__@auth_core@0.41.2_@chat-adapter_sla_3fe44d656b2dcd93a04011e80966afff}/node_modules/@vercel/connect/dist/token.js +0 -0
@@ -0,0 +1,89 @@
1
+ import { type Event, type Hook, type World } from '#compiled/@workflow/world/index.js';
2
+ /**
3
+ * A wake failure worth retrying is transport-shaped (network error, 5xx,
4
+ * throttle). A definitive rejection will not change on a 25ms retry, so
5
+ * spending the budget on it only delays the caller's error.
6
+ *
7
+ * `@vercel/queue` errors carry no `status` field — they are bare `Error`
8
+ * subclasses distinguished by `name` — so classification checks the World's
9
+ * deployment-unavailable hook first (a deployment the queue cannot discover
10
+ * will not come back within this function's ~125ms budget), then a numeric
11
+ * status when one exists (non-Vercel queue implementations), then the queue
12
+ * client's definitive-4xx error names.
13
+ */
14
+ export declare function isRetryableWakeError(error: unknown, isDeploymentUnavailableError?: (error: unknown) => boolean): boolean;
15
+ /**
16
+ * Publish a workflow wake, retrying transport-shaped failures.
17
+ *
18
+ * A publish may succeed even when its response is lost, so a retry can
19
+ * enqueue a duplicate wake. That is harmless: the event the wake exists to
20
+ * deliver is already durable, and deterministic replay makes a second
21
+ * delivery of the same run a no-op.
22
+ */
23
+ export declare function publishHookWakeWithRetry(publish: () => Promise<unknown>, isDeploymentUnavailableError?: (error: unknown) => boolean): Promise<void>;
24
+ /**
25
+ * Wake the run a force-claimed hook took its token from.
26
+ *
27
+ * The takeover left a `hook_disposed{forceClaimedBy}` in that run's log, and
28
+ * a run suspended on `await hook` reads it only when something invokes it.
29
+ * The World cannot publish that wake (it has no queue), so the claimer's
30
+ * runtime does, right after its `hook_created` returns, from the victim's
31
+ * `workflowName` / `deploymentId` the World recorded on `hook.claimedFrom`.
32
+ *
33
+ * Same durability contract as `resumeHook()`'s wake: the row is durable
34
+ * before this runs, the publish is retried on transport-shaped failures, and
35
+ * a publish that still fails is logged rather than failing the claimer —
36
+ * nothing of the claimer's is wrong, and the victim reads the row on its
37
+ * next invocation for any reason. The idempotency key is the claimer's hook
38
+ * id, so a claimer retrying its creation republishes at most one wake.
39
+ *
40
+ * Skipped when the victim is the claimer itself (a run taking over its own
41
+ * earlier hook is already running) and when the World recorded no
42
+ * `workflowName` for the victim (a legacy hook; nothing to address a queue
43
+ * message to).
44
+ */
45
+ export declare function publishForceClaimVictimWake(world: World, claimerRunId: string, hook: Pick<Hook, 'hookId' | 'claimedFrom'>): Promise<'published' | 'skipped' | 'failed'>;
46
+ /**
47
+ * The forced hook creation whose victim wake this run still owes, if any: the
48
+ * forced `hook_created` is the last event the run's own replay appended.
49
+ *
50
+ * A forced creation is followed by a wake of the run it took the token from.
51
+ * If the invocation died between the two, the creation is in the log and the
52
+ * victim was never told; the row itself is the durable record of that debt.
53
+ * As long as it is the last event THIS RUN wrote, the run has made no progress
54
+ * since, so the invocation that should have woken the victim did not finish,
55
+ * and the replay republishes (under the hook's idempotency key, so a wake that
56
+ * did go out is not duplicated). The first event the run appends after it
57
+ * ends the republishing.
58
+ *
59
+ * "This run wrote" matters: a delivery appends `hook_received` to this log
60
+ * from another request, a sealed-log World appends `noop`, and a LATER
61
+ * claimer taking the token from this run appends
62
+ * `hook_disposed{forceClaimedBy}`. None is progress of this run — the model
63
+ * (`ForceWakeOnce.cfg`'s sibling trace) has a delivery land between the crash
64
+ * and the retry, and a rule that looked at the bare tail would then never
65
+ * wake the victim. The foreign disposal is the chain case: this run took the
66
+ * token from A, died before waking A, and was itself taken from by C. Its own
67
+ * wake (from C) is the very invocation that must repay A's — the run's own
68
+ * `hook_disposed` (a `dispose()` in its code) IS its progress and still ends
69
+ * the debt, but a row another run put here does not. Both engines call this
70
+ * on the log they loaded for the invocation, before writing anything.
71
+ *
72
+ * Reading only the last own row is sound because both engines keep every
73
+ * other write of the invocation off that tail until the wake is out: a token
74
+ * group holding a forced creation runs first, one group at a time, publishing
75
+ * its wake before its next write, and nothing else is dispatched until those
76
+ * groups have settled. Were a sibling hook's creation (or, in QuickJS, a step
77
+ * or wait) allowed to land concurrently, a crash before the publish would
78
+ * leave that row last and hide the debt.
79
+ */
80
+ export declare function forcedCreationOwingWake(events: readonly Event[] | undefined): (Event & {
81
+ eventType: 'hook_created';
82
+ }) | undefined;
83
+ /**
84
+ * Republish the wake {@link forcedCreationOwingWake} says is owed. Shared by
85
+ * the node:vm suspension handler and the QuickJS entrypoint so the two engines
86
+ * cannot drift on the durability contract.
87
+ */
88
+ export declare function republishOwedForceClaimVictimWake(world: World, runId: string, events: readonly Event[] | undefined): Promise<void>;
89
+ //# sourceMappingURL=hook-wake.d.ts.map
@@ -0,0 +1,55 @@
1
+ import type { Event } from '#compiled/@workflow/world/index.js';
2
+ /**
3
+ * Which out-of-band writers a replay's event log currently admits, computed
4
+ * purely from the log.
5
+ */
6
+ export interface OpenHookAndWaitState {
7
+ /** A `hook_created` with no `hook_disposed`: a webhook receiver can append `hook_received`. */
8
+ openHook: boolean;
9
+ /** A `wait_created` with no `wait_completed`: the wait timer can append `wait_completed`. */
10
+ openWait: boolean;
11
+ /**
12
+ * The earliest `resumeAt` among the open waits, as epoch milliseconds.
13
+ * `undefined` when there is no open wait. `-Infinity` when at least one
14
+ * open wait carries no parseable `resumeAt`: a wait whose deadline cannot
15
+ * be read is treated as due now, so it gates exactly as an open wait did
16
+ * before deadlines were consulted.
17
+ */
18
+ earliestOpenWaitResumeAtMs: number | undefined;
19
+ }
20
+ /**
21
+ * Whether the run has a hook and/or wait that an out-of-band writer could
22
+ * append an event for between an inline step's `step_completed` write and
23
+ * the next replay, namely an open hook (a `hook_created` not yet
24
+ * `hook_disposed`, which a webhook receiver can resolve with
25
+ * `hook_received`) or an open wait (a `wait_created` not yet
26
+ * `wait_completed`, which the wait timer can resolve with
27
+ * `wait_completed`).
28
+ *
29
+ * Open waits that can fire during this invocation (see
30
+ * {@link hasOpenWaitDueBy}) block inline deltas. Open hooks and such waits
31
+ * disable turbo's forced optimistic start. Open hooks additionally suppress operator-enabled optimistic start
32
+ * until the `step_started` claim succeeds; open waits leave that explicit,
33
+ * idempotency-only opt-in alone.
34
+ *
35
+ * A wait that lost a `Promise.race` against a hook stays open until its timer
36
+ * elapses (there is no event that disposes a wait), which is why the
37
+ * deadline matters: without it a `sleep('24h')` timeout branch would hold
38
+ * every later step boundary of the run on the slow path.
39
+ *
40
+ * Step-body `attr_set` writes are NOT a concern: they land before the
41
+ * step's terminal write and are therefore already inside the returned
42
+ * delta.
43
+ */
44
+ export declare function openHookAndWaitState(events: Event[]): OpenHookAndWaitState;
45
+ /**
46
+ * Whether an open wait is due at or before `deadlineMs` (epoch ms), so its
47
+ * `wait_completed`, or the resume invocation carrying it, could arrive while
48
+ * the caller is still exposed. A wait whose deadline is already past, or
49
+ * cannot be read, is due. A log with no open wait is not.
50
+ *
51
+ * The runtime passes the end of the invocation's inline window plus a skew
52
+ * allowance; the reasoning is on `OPEN_WAIT_CLOCK_SKEW_MS`.
53
+ */
54
+ export declare function hasOpenWaitDueBy(state: Pick<OpenHookAndWaitState, 'earliestOpenWaitResumeAtMs'>, deadlineMs: number): boolean;
55
+ //# sourceMappingURL=open-hook-wait-state.d.ts.map
@@ -72,6 +72,8 @@ export interface PendingHook {
72
72
  /** Earliest token reuse time, as milliseconds since the Unix epoch. */
73
73
  tokenRetentionUntil?: number;
74
74
  isWebhook: boolean;
75
+ /** `createHook({ experimental_force })`: take the token over if held. */
76
+ force?: boolean;
75
77
  metadata?: unknown;
76
78
  hasCreatedEvent: boolean;
77
79
  /**
@@ -185,11 +185,18 @@ export interface SuspensionHandlerResult {
185
185
  * correlationId of the wait that produced that timeout. The
186
186
  * correlationId seeds the idempotency key for the wait-continuation
187
187
  * queue message so that repeated suspension passes over the same
188
- * pending wait collapse into a single delayed continuation.
188
+ * pending wait collapse into a single delayed continuation. `resumeAtMs`
189
+ * is that wait's absolute deadline, for gates that ask whether it can fire
190
+ * within some window rather than how long until it does.
191
+ *
192
+ * Covers every wait still in the workflow's queue, not only ones this
193
+ * suspension created: a `sleep()` that lost a `Promise.race` stays queued
194
+ * (and reported here) until its `wait_completed` lands.
189
195
  */
190
196
  waitTimeout?: {
191
197
  seconds: number;
192
198
  correlationId: string;
199
+ resumeAtMs: number;
193
200
  };
194
201
  /**
195
202
  * Whether a hook create committed a `hook_conflict` — the token was already