@fluidgrids/workflows 2026.1028.1 → 2026.1029.1

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/README.md +72 -10
  2. package/dist/{activation-DnhG7SmF.d.ts → activation-BnVQMv9y.d.ts} +1 -1
  3. package/dist/{activation-BBh1p82z.d.cts → activation-CESehfYi.d.cts} +1 -1
  4. package/dist/{chunk-XB53G2DK.js → chunk-25BKWR2O.js} +1 -1
  5. package/dist/{chunk-CBL5JSCC.cjs → chunk-2B37XAFQ.cjs} +44 -8
  6. package/dist/{chunk-DJYMDLV5.js → chunk-2DDULZFM.js} +93 -1
  7. package/dist/{chunk-623FVQSN.cjs → chunk-3FIDHONL.cjs} +104 -0
  8. package/dist/chunk-6QPOJZT6.cjs +1180 -0
  9. package/dist/chunk-7ILGCUI6.js +154 -0
  10. package/dist/chunk-A2OHX3UQ.js +1156 -0
  11. package/dist/{chunk-VOKMAAJP.js → chunk-A36CCOWS.js} +188 -19
  12. package/dist/{chunk-FMSW2HDF.cjs → chunk-ELL2RBML.cjs} +0 -14
  13. package/dist/{chunk-JD2VQIDZ.cjs → chunk-EWYADREB.cjs} +2 -2
  14. package/dist/{chunk-5HDSBTBX.js → chunk-FQSJI5NV.js} +1 -1
  15. package/dist/{chunk-ABFZWYHT.js → chunk-FWBRQWRX.js} +156 -48
  16. package/dist/{chunk-PZCVF76Q.cjs → chunk-I47EENR4.cjs} +209 -40
  17. package/dist/chunk-J3PYFGKA.cjs +166 -0
  18. package/dist/{chunk-C5OLWZ42.js → chunk-KXJDRQ6G.js} +1 -13
  19. package/dist/chunk-M272AHEX.js +25 -0
  20. package/dist/{chunk-3FOTFQ3J.js → chunk-MJ5TGYVG.js} +333 -65
  21. package/dist/{chunk-57MSZ24T.cjs → chunk-NXFBVDOI.cjs} +3 -3
  22. package/dist/{chunk-PDHLTDZB.js → chunk-OIX4O6UR.js} +38 -2
  23. package/dist/{chunk-HR3BN4C4.cjs → chunk-OKX3FYIM.cjs} +3 -3
  24. package/dist/{chunk-CSNWNFKU.cjs → chunk-OMY3CKUZ.cjs} +404 -136
  25. package/dist/chunk-PWIUEWC3.js +81 -0
  26. package/dist/chunk-Q4MWQNJK.cjs +28 -0
  27. package/dist/{chunk-P6TA5EZT.cjs → chunk-RUQIMTN5.cjs} +171 -57
  28. package/dist/{chunk-IISBRUWJ.js → chunk-WXXNCHUY.js} +1 -1
  29. package/dist/chunk-YHBVMOMK.cjs +87 -0
  30. package/dist/codegen/index.d.cts +2 -2
  31. package/dist/codegen/index.d.ts +2 -2
  32. package/dist/collect-BTHjQaSp.d.ts +86 -0
  33. package/dist/collect-CSyOg5XC.d.cts +86 -0
  34. package/dist/{file-yuPCFU5b.d.ts → file-cgL9l9l8.d.cts} +765 -14
  35. package/dist/{file-BOoHZgoQ.d.cts → file-olQudcx5.d.ts} +765 -14
  36. package/dist/history/index.cjs +198 -86
  37. package/dist/history/index.d.cts +49 -10
  38. package/dist/history/index.d.ts +49 -10
  39. package/dist/history/index.js +49 -4
  40. package/dist/index.cjs +64 -51
  41. package/dist/index.d.cts +9 -53
  42. package/dist/index.d.ts +9 -53
  43. package/dist/index.js +5 -4
  44. package/dist/ir/index.cjs +24 -3
  45. package/dist/ir/index.d.cts +43 -4
  46. package/dist/ir/index.d.ts +43 -4
  47. package/dist/ir/index.js +24 -3
  48. package/dist/{lower-BuSvAFqi.d.cts → lower-3S6PsqjJ.d.cts} +41 -7
  49. package/dist/{lower-C_Qv_34S.d.ts → lower-DmZpQ8hJ.d.ts} +41 -7
  50. package/dist/lower-types-DQNBfWQn.d.cts +37 -0
  51. package/dist/lower-types-DQNBfWQn.d.ts +37 -0
  52. package/dist/{manifest-C8N6HDYl.d.ts → manifest-BJjrQt77.d.ts} +1 -1
  53. package/dist/{manifest-0OLw0i7k.d.cts → manifest-gRI2Q5Fj.d.cts} +1 -1
  54. package/dist/node-evaluator-SOADN23V.js +14 -0
  55. package/dist/node-evaluator-YGDEXK4U.cjs +24 -0
  56. package/dist/quickjs/index.cjs +25 -24
  57. package/dist/quickjs/index.d.cts +7 -7
  58. package/dist/quickjs/index.d.ts +7 -7
  59. package/dist/quickjs/index.js +8 -7
  60. package/dist/roundtrip/index.cjs +245 -43
  61. package/dist/roundtrip/index.d.cts +88 -11
  62. package/dist/roundtrip/index.d.ts +88 -11
  63. package/dist/roundtrip/index.js +172 -8
  64. package/dist/runtime/index.cjs +21 -20
  65. package/dist/runtime/index.d.cts +49 -7
  66. package/dist/runtime/index.d.ts +49 -7
  67. package/dist/runtime/index.js +8 -7
  68. package/dist/testing/index.cjs +514 -74
  69. package/dist/testing/index.d.cts +128 -11
  70. package/dist/testing/index.d.ts +128 -11
  71. package/dist/testing/index.js +480 -42
  72. package/dist/{types-BGoPzgcl.d.ts → types-Bb2wRnJ5.d.cts} +20 -1
  73. package/dist/{types-BGoPzgcl.d.cts → types-Bb2wRnJ5.d.ts} +20 -1
  74. package/dist/{types-DV-HX_Gt.d.ts → types-CQKOhPTa.d.cts} +122 -14
  75. package/dist/{types-CpBBjaGX.d.cts → types-CnIOinoz.d.ts} +122 -14
  76. package/dist/{workflow-Bpr3vnA_.d.ts → workflow-8uRU9rhL.d.ts} +2 -2
  77. package/dist/{workflow-FXUkpIBc.d.cts → workflow-CZOXUlQ5.d.cts} +2 -2
  78. package/dist/{workflow-J-yYixny.d.cts → workflow-DWTPHFbt.d.ts} +124 -12
  79. package/dist/{workflow-C2a05WUJ.d.ts → workflow-O6e64ZcG.d.cts} +124 -12
  80. package/fixtures/histories/auto-upgrade-patched.history.json +276 -0
  81. package/fixtures/histories/benign-failure.history.json +146 -0
  82. package/fixtures/histories/cancel-activity-try-cancel.history.json +150 -0
  83. package/fixtures/histories/child-cancel-wait-requested.history.json +217 -0
  84. package/fixtures/histories/child-options-roundtrip.history.json +192 -0
  85. package/fixtures/histories/continue-as-new-last-result.history.json +86 -0
  86. package/fixtures/histories/continue-as-new-options.history.json +99 -0
  87. package/fixtures/histories/continue-as-new-r1-long-task-queue.history.json +78 -0
  88. package/fixtures/histories/continue-as-new-r1-retry-options.history.json +83 -0
  89. package/fixtures/histories/execution-timeout-chain.history.json +98 -0
  90. package/fixtures/histories/external-cancel-resolved.history.json +123 -0
  91. package/fixtures/histories/external-cancel-unknown-target.history.json +127 -0
  92. package/fixtures/histories/failure-error-types-fails-run.history.json +144 -0
  93. package/fixtures/histories/handler-drain-warn.history.json +222 -0
  94. package/fixtures/histories/heartbeat-details-on-retry.history.json +145 -0
  95. package/fixtures/histories/local-activity-abandoned-at-completion.history.json +73 -0
  96. package/fixtures/histories/local-activity-cancelled-in-scope.history.json +118 -0
  97. package/fixtures/histories/local-activity-completed.history.json +157 -0
  98. package/fixtures/histories/local-activity-failed.history.json +93 -0
  99. package/fixtures/histories/local-activity-retry-in-task.history.json +88 -0
  100. package/fixtures/histories/run-retry-last-failure.history.json +90 -0
  101. package/fixtures/histories/run-timeout.history.json +159 -0
  102. package/fixtures/histories/schedule-to-start-timeout.history.json +132 -0
  103. package/fixtures/histories/start-delay-signal-ends-delay.history.json +155 -0
  104. package/fixtures/histories/typeerror-task-retry-100.history.json +137 -0
  105. package/package.json +1 -1
  106. package/schema/history-file.schema.json +283 -2
  107. package/schema/ir-v2.schema.json +45 -0
  108. package/schema/run-event.schema.json +264 -2
  109. package/schema/workflow-command.schema.json +178 -1
  110. package/schema/workflow-task.schema.json +392 -4
  111. package/dist/assemble-BLqQ8lSu.d.cts +0 -39
  112. package/dist/assemble-DWgaXHd-.d.ts +0 -39
  113. package/dist/chunk-2DP2Y6EU.cjs +0 -832
  114. package/dist/chunk-2J6TF7YI.cjs +0 -86
  115. package/dist/chunk-7NQ37GZU.js +0 -73
  116. package/dist/chunk-BO6OVILK.js +0 -79
  117. package/dist/chunk-FQIHX7YI.cjs +0 -80
  118. package/dist/chunk-H7KEVW2M.js +0 -816
  119. package/dist/lower-types-nofRXw9c.d.cts +0 -15
  120. package/dist/lower-types-nofRXw9c.d.ts +0 -15
  121. package/dist/node-evaluator-CJNP4GHX.js +0 -12
  122. package/dist/node-evaluator-DMKPKUWA.cjs +0 -22
@@ -147,6 +147,12 @@ interface WorkflowInterface {
147
147
  interface CodeBundleWorkflowExport {
148
148
  interface?: WorkflowInterface;
149
149
  taskQueue?: string;
150
+ /**
151
+ * The run-level settings of the function's `workflow()` declaration (R2,
152
+ * C-FEATURES): what the service applies to a run of this `workflowFn`,
153
+ * including a same-bundle child that runs on its parent's definition.
154
+ */
155
+ config?: WorkflowConfig;
150
156
  [key: string]: unknown;
151
157
  }
152
158
  /** A user activity declared by a code bundle. */
@@ -173,6 +179,8 @@ interface WorkflowCode {
173
179
  };
174
180
  };
175
181
  determinism?: 'isolate' | 'worker';
182
+ /** Runtime features the bundle uses (C-FEATURES, SDK R2); absent before R2. */
183
+ features?: string[];
176
184
  [key: string]: unknown;
177
185
  }
178
186
  /** How a document was produced (spec 01 §6). Never affects execution. */
@@ -198,6 +206,17 @@ interface WorkflowConfig {
198
206
  /** Workflow-task budget in seconds or a duration string (v2). */
199
207
  workflowTaskTimeout?: number | string;
200
208
  versioningBehavior?: 'PINNED' | 'AUTO_UPGRADE';
209
+ /** Run-level retry of DURABLE_FN runs (v2); delays are seconds or duration strings. */
210
+ retry?: WorkflowRunRetryConfig;
211
+ [key: string]: unknown;
212
+ }
213
+ /** `config.retry` (11 §2.17). */
214
+ interface WorkflowRunRetryConfig {
215
+ maxAttempts?: number;
216
+ initialDelay?: number | string;
217
+ backoffMultiplier?: number;
218
+ maxDelay?: number | string;
219
+ nonRetryableErrorTypes?: string[];
201
220
  [key: string]: unknown;
202
221
  }
203
222
  /** The canonical workflow definition (`definitionJson`). */
@@ -222,4 +241,4 @@ interface WorkflowDefinition {
222
241
  [key: string]: unknown;
223
242
  }
224
243
 
225
- export type { CodeBundleActivityExport as C, ErrorType as E, JsonObject as J, LegacyCredentialRef as L, NodeArgs as N, Position as P, RetryConfig as R, WorkflowInterface as W, Json as a, WorkflowDefinition as b, CodeBundleWorkflowExport as c, ConnectionRef as d, ExecutionSettings as e, NodeErrorConfig as f, NodeTimeout as g, RunOnSetting as h, WorkflowAuthoring as i, WorkflowCode as j, WorkflowConfig as k, WorkflowEdge as l, WorkflowNode as m };
244
+ export type { CodeBundleActivityExport as C, ErrorType as E, Json as J, LegacyCredentialRef as L, NodeArgs as N, Position as P, RetryConfig as R, WorkflowDefinition as W, JsonObject as a, WorkflowInterface as b, CodeBundleWorkflowExport as c, ConnectionRef as d, ExecutionSettings as e, NodeErrorConfig as f, NodeTimeout as g, RunOnSetting as h, WorkflowAuthoring as i, WorkflowCode as j, WorkflowConfig as k, WorkflowEdge as l, WorkflowNode as m, WorkflowRunRetryConfig as n };
@@ -147,6 +147,12 @@ interface WorkflowInterface {
147
147
  interface CodeBundleWorkflowExport {
148
148
  interface?: WorkflowInterface;
149
149
  taskQueue?: string;
150
+ /**
151
+ * The run-level settings of the function's `workflow()` declaration (R2,
152
+ * C-FEATURES): what the service applies to a run of this `workflowFn`,
153
+ * including a same-bundle child that runs on its parent's definition.
154
+ */
155
+ config?: WorkflowConfig;
150
156
  [key: string]: unknown;
151
157
  }
152
158
  /** A user activity declared by a code bundle. */
@@ -173,6 +179,8 @@ interface WorkflowCode {
173
179
  };
174
180
  };
175
181
  determinism?: 'isolate' | 'worker';
182
+ /** Runtime features the bundle uses (C-FEATURES, SDK R2); absent before R2. */
183
+ features?: string[];
176
184
  [key: string]: unknown;
177
185
  }
178
186
  /** How a document was produced (spec 01 §6). Never affects execution. */
@@ -198,6 +206,17 @@ interface WorkflowConfig {
198
206
  /** Workflow-task budget in seconds or a duration string (v2). */
199
207
  workflowTaskTimeout?: number | string;
200
208
  versioningBehavior?: 'PINNED' | 'AUTO_UPGRADE';
209
+ /** Run-level retry of DURABLE_FN runs (v2); delays are seconds or duration strings. */
210
+ retry?: WorkflowRunRetryConfig;
211
+ [key: string]: unknown;
212
+ }
213
+ /** `config.retry` (11 §2.17). */
214
+ interface WorkflowRunRetryConfig {
215
+ maxAttempts?: number;
216
+ initialDelay?: number | string;
217
+ backoffMultiplier?: number;
218
+ maxDelay?: number | string;
219
+ nonRetryableErrorTypes?: string[];
201
220
  [key: string]: unknown;
202
221
  }
203
222
  /** The canonical workflow definition (`definitionJson`). */
@@ -222,4 +241,4 @@ interface WorkflowDefinition {
222
241
  [key: string]: unknown;
223
242
  }
224
243
 
225
- export type { CodeBundleActivityExport as C, ErrorType as E, JsonObject as J, LegacyCredentialRef as L, NodeArgs as N, Position as P, RetryConfig as R, WorkflowInterface as W, Json as a, WorkflowDefinition as b, CodeBundleWorkflowExport as c, ConnectionRef as d, ExecutionSettings as e, NodeErrorConfig as f, NodeTimeout as g, RunOnSetting as h, WorkflowAuthoring as i, WorkflowCode as j, WorkflowConfig as k, WorkflowEdge as l, WorkflowNode as m };
244
+ export type { CodeBundleActivityExport as C, ErrorType as E, Json as J, LegacyCredentialRef as L, NodeArgs as N, Position as P, RetryConfig as R, WorkflowDefinition as W, JsonObject as a, WorkflowInterface as b, CodeBundleWorkflowExport as c, ConnectionRef as d, ExecutionSettings as e, NodeErrorConfig as f, NodeTimeout as g, RunOnSetting as h, WorkflowAuthoring as i, WorkflowCode as j, WorkflowConfig as k, WorkflowEdge as l, WorkflowNode as m, WorkflowRunRetryConfig as n };
@@ -1,4 +1,4 @@
1
- import { J as JsonObject, E as ErrorType, a as Json } from './types-BGoPzgcl.js';
1
+ import { a as JsonObject, E as ErrorType, J as Json } from './types-Bb2wRnJ5.cjs';
2
2
 
3
3
  /**
4
4
  * The durable-function history contract (PLAN-B C-HIST, C-CMD, C-ABI):
@@ -13,6 +13,14 @@ import { J as JsonObject, E as ErrorType, a as Json } from './types-BGoPzgcl.js'
13
13
 
14
14
  /** Version of the runtime ABI and of the history file format. */
15
15
  declare const HISTORY_PROTOCOL = 1;
16
+ /**
17
+ * The runtime compatibility release of this SDK (the runtime train of
18
+ * PLAN-B19 critique 4.5). R1 is the Phase B core runtime; R2 adds local
19
+ * activities, handler drain, run handles by workflow id and the R2 history
20
+ * fields. A history recorded by release N replays under every release >= N;
21
+ * the service and the workers pin the release whose histories they accept.
22
+ */
23
+ declare const RUNTIME_RELEASE = 2;
16
24
  /** Every value of the `type` column of `workflow_run_events`, UPPER_SNAKE (DB4). */
17
25
  declare const EVENT_TYPES: readonly ["WORKFLOW_STARTED", "WORKFLOW_TASK_SCHEDULED", "WORKFLOW_TASK_STARTED", "WORKFLOW_TASK_COMPLETED", "WORKFLOW_TASK_FAILED", "WORKFLOW_TASK_TIMED_OUT", "ACTIVITY_SCHEDULED", "ACTIVITY_STARTED", "ACTIVITY_HEARTBEAT", "ACTIVITY_COMPLETED", "ACTIVITY_FAILED", "ACTIVITY_TIMED_OUT", "ACTIVITY_CANCEL_REQUESTED", "ACTIVITY_CANCELLED", "ACTIVITY_PAUSED", "ACTIVITY_UNPAUSED", "ACTIVITY_RESET", "ACTIVITY_OPTIONS_UPDATED", "TIMER_STARTED", "TIMER_FIRED", "TIMER_CANCELLED", "SIGNAL_RECEIVED", "UPDATE_ADMITTED", "UPDATE_ACCEPTED", "UPDATE_COMPLETED", "CHILD_RUN_INITIATED", "CHILD_RUN_STARTED", "CHILD_RUN_COMPLETED", "CHILD_RUN_FAILED", "CHILD_RUN_CANCELLED", "CHILD_RUN_TERMINATED", "CHILD_RUN_TIMED_OUT", "EXTERNAL_RUN_CANCEL_REQUESTED", "EXTERNAL_RUN_CANCEL_RESOLVED", "EXTERNAL_RUN_SIGNALED", "SIDE_EFFECT_RECORDED", "LOCAL_ACTIVITY_COMPLETED", "LOCAL_ACTIVITY_FAILED", "SEARCH_ATTRIBUTES_UPSERTED", "CONTEXT_UPSERTED", "MARKER_RECORDED", "WORKFLOW_CANCEL_REQUESTED", "WORKFLOW_RESET", "VERSIONING_OVERRIDE_SET", "WORKFLOW_COMPLETED", "WORKFLOW_FAILED", "WORKFLOW_CANCELLED", "WORKFLOW_TERMINATED", "WORKFLOW_TIMED_OUT", "WORKFLOW_CONTINUED_AS_NEW"];
18
26
  type RunEventType = (typeof EVENT_TYPES)[number];
@@ -106,7 +114,11 @@ type Headers = Record<string, string>;
106
114
  interface CommandBase {
107
115
  headers?: Headers;
108
116
  }
109
- /** Signal and cancel targets. `workflowKey`/`workflowId` addressing is parity (11 §2.1). */
117
+ /**
118
+ * Signal and cancel targets. `workflowKey`/`workflowId` addressing is parity
119
+ * (11 §2.1): it reaches the open run of that business id, following the
120
+ * continue-as-new chain; `firstRunId` pins the chain whose first run it names.
121
+ */
110
122
  type RunTarget = {
111
123
  runId: string;
112
124
  } | {
@@ -116,7 +128,43 @@ type RunTarget = {
116
128
  } | {
117
129
  workflowKey: string;
118
130
  workflowId: string;
131
+ firstRunId?: string;
119
132
  };
133
+ /** `idReusePolicy` of a start (11 §2.1): what a closed run with the same workflow id allows. */
134
+ declare const WORKFLOW_ID_REUSE_POLICIES: readonly ["ALLOW_DUPLICATE", "ALLOW_DUPLICATE_FAILED_ONLY", "REJECT_DUPLICATE"];
135
+ type WorkflowIdReusePolicy = (typeof WORKFLOW_ID_REUSE_POLICIES)[number];
136
+ /** `idConflictPolicy` of a start (11 §2.1): what an open run with the same workflow id does. */
137
+ declare const WORKFLOW_ID_CONFLICT_POLICIES: readonly ["FAIL", "USE_EXISTING", "TERMINATE_EXISTING"];
138
+ type WorkflowIdConflictPolicy = (typeof WORKFLOW_ID_CONFLICT_POLICIES)[number];
139
+ /** `versioningBehavior` of a version or a run (11 §2.27). */
140
+ declare const VERSIONING_BEHAVIORS: readonly ["PINNED", "AUTO_UPGRADE"];
141
+ type VersioningBehavior = (typeof VERSIONING_BEHAVIORS)[number];
142
+ /** `timeoutType` of `WORKFLOW_TIMED_OUT` and `CHILD_RUN_TIMED_OUT` (11 §2.20). */
143
+ declare const WORKFLOW_TIMEOUT_TYPES: readonly ["WORKFLOW_RUN", "WORKFLOW_EXECUTION"];
144
+ type WorkflowTimeoutType = (typeof WORKFLOW_TIMEOUT_TYPES)[number];
145
+ /**
146
+ * The run-level retry policy of a DURABLE_FN run (11 §2.17), in milliseconds.
147
+ * A run that fails with a retryable failure, or whose run timeout expires,
148
+ * is started again as a new run of the same chain, up to `maxAttempts`
149
+ * attempts in total (absent: unlimited, bounded by the execution timeout).
150
+ */
151
+ interface RunRetryPolicy {
152
+ maxAttempts?: number;
153
+ /** Delay before the second attempt. */
154
+ initialDelayMs: number;
155
+ backoffMultiplier?: number;
156
+ maxDelayMs?: number;
157
+ /** Allow-list on `errorType`. */
158
+ retryOnErrorTypes?: ErrorType[];
159
+ /** Deny-list on the free-form `Failure.type`; wins over the allow-list. */
160
+ nonRetryableErrorTypes?: string[];
161
+ }
162
+ /** The three workflow timeouts of a run (11 §2.20), in milliseconds. */
163
+ interface WorkflowTimeouts {
164
+ executionTimeout?: number;
165
+ runTimeout?: number;
166
+ workflowTaskTimeout?: number;
167
+ }
120
168
  interface ScheduleActivityCommand extends CommandBase {
121
169
  type: 'SCHEDULE_ACTIVITY';
122
170
  activityId: string;
@@ -164,7 +212,12 @@ interface ChildRunOptions {
164
212
  runTimeout?: number;
165
213
  workflowTaskTimeout?: number;
166
214
  startDelay?: number;
167
- [key: string]: Json | undefined;
215
+ /** Run-level retry of the child (11 §2.17). */
216
+ retry?: RunRetryPolicy;
217
+ versioningBehavior?: VersioningBehavior;
218
+ idReusePolicy?: WorkflowIdReusePolicy;
219
+ idConflictPolicy?: WorkflowIdConflictPolicy;
220
+ [key: string]: Json | RunRetryPolicy | undefined;
168
221
  }
169
222
  interface StartChildRunCommand extends CommandBase {
170
223
  type: 'START_CHILD_RUN';
@@ -216,6 +269,10 @@ interface RecordLocalActivityCommand extends CommandBase {
216
269
  result?: Json;
217
270
  failure?: Failure;
218
271
  attempts: number;
272
+ /** The node operation that ran (R2), for the History tab and replay matching. */
273
+ nodeType?: string;
274
+ operation?: string;
275
+ summary?: string;
219
276
  }
220
277
  interface ContinueAsNewCommand extends CommandBase {
221
278
  type: 'CONTINUE_AS_NEW';
@@ -258,15 +315,28 @@ declare const DEFAULT_HISTORY_LIMIT: HistoryLimit;
258
315
  declare const CONTINUE_AS_NEW_SUGGESTED_RATIO = 0.8;
259
316
  /** Fraction of the cap at which the next command throws `HistoryLimitExceeded`. */
260
317
  declare const HISTORY_LIMIT_EXCEEDED_RATIO = 0.95;
261
- /** What a task knows about its run (C-ABI `WorkflowInfoSnapshot`). */
318
+ /**
319
+ * What a task knows about its run (C-ABI `WorkflowInfoSnapshot`). From SDK R2
320
+ * the runtime reads `workflowId`, `runAttempt`, `lastResult`, `lastFailure`,
321
+ * `summary`, `details`, the memo (`context`), the timeouts, `retry`,
322
+ * `priority` and `versioningBehavior` from `WORKFLOW_STARTED` when the event
323
+ * carries them, so a replay sees what the first execution saw; the lease
324
+ * values here are the fallback for histories written before R2.
325
+ */
262
326
  interface WorkflowInfoSnapshot {
263
327
  runId: string;
264
328
  workspaceId: string;
265
329
  workflowKey?: string;
266
330
  version?: number | string;
267
331
  buildId?: string;
332
+ /** The column name of the workflow id (11 §2.1). */
268
333
  businessId?: string;
334
+ /** The caller-chosen workflow id (`businessId`), else the first run's id. */
335
+ workflowId?: string;
336
+ /** Run-level retry attempt, 1-based (same value as `runAttempt`). */
269
337
  attempt?: number;
338
+ /** Run-level retry attempt, 1-based (11 §2.17). */
339
+ runAttempt?: number;
270
340
  taskQueue?: string;
271
341
  parentRunId?: string | null;
272
342
  rootRunId?: string | null;
@@ -286,7 +356,12 @@ interface WorkflowInfoSnapshot {
286
356
  priority?: number;
287
357
  summary?: string;
288
358
  details?: string;
359
+ /** The run's memo (11 §2.22); `memo` is the same value under its Temporal name. */
289
360
  context?: JsonObject;
361
+ memo?: JsonObject;
362
+ versioningBehavior?: VersioningBehavior;
363
+ /** The run-level retry policy of the chain. */
364
+ retry?: RunRetryPolicy;
290
365
  }
291
366
  /** A built-in query (11 §2.21). Custom queries are Phase C. */
292
367
  type BuiltInQueryName = '__stack_trace' | '__enhanced_stack_trace' | '__metadata';
@@ -300,27 +375,55 @@ interface WorkflowTaskRequest {
300
375
  history: RunEventRecord[];
301
376
  /** The task's start time; the clock for new side effects only. */
302
377
  nowMs: number;
303
- localActivityResults?: Array<{
304
- localActivityId: string;
305
- result?: Json;
306
- failure?: Failure;
307
- attempts: number;
308
- }>;
378
+ localActivityResults?: LocalActivityResult[];
309
379
  queries?: Array<{
310
380
  queryId: string;
311
381
  name: BuiltInQueryName;
312
382
  args?: Json;
313
383
  }>;
314
384
  }
315
- /** A local activity the task wants run before it can continue (parity). */
385
+ /** The result of one local activity, as the worker passes it back into the task (C-ABI). */
386
+ interface LocalActivityResult {
387
+ localActivityId: string;
388
+ result?: Json;
389
+ failure?: Failure;
390
+ /** Attempts run so far, the last one included. */
391
+ attempts: number;
392
+ }
393
+ /** The largest `startToCloseTimeout` of a local activity, and its default (11 §2.12). */
394
+ declare const LOCAL_ACTIVITY_MAX_TIMEOUT_MS = 30000;
395
+ /**
396
+ * A local activity the task wants run before it can continue (parity, 11
397
+ * §2.12). The worker runs attempt `attempt` (after waiting `backoffMs` when
398
+ * it is a retry) inside the task's budget, then runs the same task again with
399
+ * the outcome in `localActivityResults`. The runtime decides with
400
+ * `computeRetryDelay` whether a failure is final; a retryable one is
401
+ * requested again with the next attempt. A worker that cannot fit the wait
402
+ * and the attempt into the remaining budget answers with a non-retryable
403
+ * `TIMEOUT` failure of type `LocalActivityBudgetExceeded` instead.
404
+ */
316
405
  interface LocalActivityRequest {
317
406
  localActivityId: string;
407
+ kind: 'node';
318
408
  nodeType: string;
409
+ nodeVersion?: string;
319
410
  operation: string;
320
411
  args: Json;
321
412
  connection?: string;
322
- retry?: RetryPolicy;
323
- startToCloseTimeout?: number;
413
+ retry: RetryPolicy;
414
+ /** Milliseconds; at most {@link LOCAL_ACTIVITY_MAX_TIMEOUT_MS}. */
415
+ startToCloseTimeout: number;
416
+ /** The attempt to run, 1-based. */
417
+ attempt: number;
418
+ /** Milliseconds to wait before this attempt (0 for the first). */
419
+ backoffMs: number;
420
+ summary?: string;
421
+ }
422
+ /** Signal or update handlers still running when the workflow finished (11 §2.18). */
423
+ interface UnfinishedHandler {
424
+ kind: 'signal' | 'update';
425
+ name: string;
426
+ count: number;
324
427
  }
325
428
  interface TaskLogLine {
326
429
  level: 'debug' | 'info' | 'warn' | 'error';
@@ -347,6 +450,11 @@ interface WorkflowTaskResult {
347
450
  };
348
451
  logs: TaskLogLine[];
349
452
  stackTrace?: string;
453
+ /**
454
+ * Handlers still running when this task's terminal command was issued, with
455
+ * policy `WARN_AND_ABANDON` (R2). Never set on replay.
456
+ */
457
+ unfinishedHandlers?: UnfinishedHandler[];
350
458
  }
351
459
  /**
352
460
  * The event each command appends (C-CMD). `REJECT_UPDATE` appends nothing: a
@@ -377,4 +485,4 @@ declare function isCommandEvent(event: {
377
485
  payload: JsonObject;
378
486
  }): boolean;
379
487
 
380
- export { type StartTimerCommand as $, ACTIVITY_CANCELLATION_TYPES as A, BUILT_IN_QUERIES as B, type ChildCancellationType as C, DEFAULT_HISTORY_LIMIT as D, ERROR_TYPES as E, type Failure as F, PHASE_B_PARITY_COMMANDS as G, HISTORY_LIMIT_EXCEEDED_RATIO as H, INPUT_EVENTS as I, PHASE_C_COMMANDS as J, type RecordLocalActivityCommand as K, type LocalActivityRequest as L, type RecordMarkerCommand as M, type RecordSideEffectCommand as N, type RejectUpdateCommand as O, type ParentClosePolicy as P, type RequestCancelActivityCommand as Q, type RetryPolicy as R, type RequestCancelExternalRunCommand as S, type RunEventDraft as T, type RunEventRecord as U, type RunEventType as V, type WorkflowCommand as W, type RunTarget as X, type ScheduleActivityCommand as Y, type SignalRunCommand as Z, type StartChildRunCommand as _, type WorkflowTaskFailureCause as a, TASK_FAILURE_CAUSES as a0, TERMINAL_COMMANDS as a1, TERMINAL_EVENTS as a2, type TaskLogLine as a3, type UpsertContextCommand as a4, type UpsertSearchAttributesCommand as a5, type WorkflowInfoSnapshot as a6, type WorkflowTaskRequest as a7, type WorkflowTaskResult as a8, isCommandEvent as a9, isInputEvent as aa, type AcceptUpdateCommand as b, type ActivityCancellationType as c, type BuiltInQueryName as d, CHILD_CANCELLATION_TYPES as e, COMMAND_EVENTS as f, COMMAND_EVENT_TYPES as g, COMMAND_TYPES as h, CONTINUE_AS_NEW_SUGGESTED_RATIO as i, type CancelTimerCommand as j, type CancelWorkflowCommand as k, type ChildRunOptions as l, type CommandType as m, type CompleteUpdateCommand as n, type CompleteWorkflowCommand as o, type ContinueAsNewCommand as p, EVENT_TYPES as q, EXECUTION_KINDS as r, type ExecutionKind as s, type FailWorkflowCommand as t, type FailureSource as u, HISTORY_PROTOCOL as v, type Headers as w, type HistoryLimit as x, PARENT_CLOSE_POLICIES as y, PHASE_B_CORE_COMMANDS as z };
488
+ export { type RunTarget as $, ACTIVITY_CANCELLATION_TYPES as A, BUILT_IN_QUERIES as B, type ChildCancellationType as C, DEFAULT_HISTORY_LIMIT as D, ERROR_TYPES as E, type Failure as F, type LocalActivityResult as G, HISTORY_LIMIT_EXCEEDED_RATIO as H, INPUT_EVENTS as I, PARENT_CLOSE_POLICIES as J, PHASE_B_CORE_COMMANDS as K, LOCAL_ACTIVITY_MAX_TIMEOUT_MS as L, PHASE_B_PARITY_COMMANDS as M, PHASE_C_COMMANDS as N, RUNTIME_RELEASE as O, type ParentClosePolicy as P, type RecordLocalActivityCommand as Q, type RetryPolicy as R, type RecordMarkerCommand as S, type RecordSideEffectCommand as T, type RejectUpdateCommand as U, type RequestCancelActivityCommand as V, type WorkflowCommand as W, type RequestCancelExternalRunCommand as X, type RunEventDraft as Y, type RunEventRecord as Z, type RunEventType as _, type WorkflowTaskFailureCause as a, type ScheduleActivityCommand as a0, type SignalRunCommand as a1, type StartChildRunCommand as a2, type StartTimerCommand as a3, TASK_FAILURE_CAUSES as a4, TERMINAL_COMMANDS as a5, TERMINAL_EVENTS as a6, type TaskLogLine as a7, type UnfinishedHandler as a8, type UpsertContextCommand as a9, type UpsertSearchAttributesCommand as aa, VERSIONING_BEHAVIORS as ab, type VersioningBehavior as ac, WORKFLOW_ID_CONFLICT_POLICIES as ad, WORKFLOW_ID_REUSE_POLICIES as ae, WORKFLOW_TIMEOUT_TYPES as af, type WorkflowIdConflictPolicy as ag, type WorkflowIdReusePolicy as ah, type WorkflowInfoSnapshot as ai, type WorkflowTaskRequest as aj, type WorkflowTaskResult as ak, type WorkflowTimeoutType as al, type WorkflowTimeouts as am, isCommandEvent as an, isInputEvent as ao, type RunRetryPolicy as b, type AcceptUpdateCommand as c, type ActivityCancellationType as d, type BuiltInQueryName as e, CHILD_CANCELLATION_TYPES as f, COMMAND_EVENTS as g, COMMAND_EVENT_TYPES as h, COMMAND_TYPES as i, CONTINUE_AS_NEW_SUGGESTED_RATIO as j, type CancelTimerCommand as k, type CancelWorkflowCommand as l, type ChildRunOptions as m, type CommandType as n, type CompleteUpdateCommand as o, type CompleteWorkflowCommand as p, type ContinueAsNewCommand as q, EVENT_TYPES as r, EXECUTION_KINDS as s, type ExecutionKind as t, type FailWorkflowCommand as u, type FailureSource as v, HISTORY_PROTOCOL as w, type Headers as x, type HistoryLimit as y, type LocalActivityRequest as z };
@@ -1,4 +1,4 @@
1
- import { J as JsonObject, E as ErrorType, a as Json } from './types-BGoPzgcl.cjs';
1
+ import { a as JsonObject, E as ErrorType, J as Json } from './types-Bb2wRnJ5.js';
2
2
 
3
3
  /**
4
4
  * The durable-function history contract (PLAN-B C-HIST, C-CMD, C-ABI):
@@ -13,6 +13,14 @@ import { J as JsonObject, E as ErrorType, a as Json } from './types-BGoPzgcl.cjs
13
13
 
14
14
  /** Version of the runtime ABI and of the history file format. */
15
15
  declare const HISTORY_PROTOCOL = 1;
16
+ /**
17
+ * The runtime compatibility release of this SDK (the runtime train of
18
+ * PLAN-B19 critique 4.5). R1 is the Phase B core runtime; R2 adds local
19
+ * activities, handler drain, run handles by workflow id and the R2 history
20
+ * fields. A history recorded by release N replays under every release >= N;
21
+ * the service and the workers pin the release whose histories they accept.
22
+ */
23
+ declare const RUNTIME_RELEASE = 2;
16
24
  /** Every value of the `type` column of `workflow_run_events`, UPPER_SNAKE (DB4). */
17
25
  declare const EVENT_TYPES: readonly ["WORKFLOW_STARTED", "WORKFLOW_TASK_SCHEDULED", "WORKFLOW_TASK_STARTED", "WORKFLOW_TASK_COMPLETED", "WORKFLOW_TASK_FAILED", "WORKFLOW_TASK_TIMED_OUT", "ACTIVITY_SCHEDULED", "ACTIVITY_STARTED", "ACTIVITY_HEARTBEAT", "ACTIVITY_COMPLETED", "ACTIVITY_FAILED", "ACTIVITY_TIMED_OUT", "ACTIVITY_CANCEL_REQUESTED", "ACTIVITY_CANCELLED", "ACTIVITY_PAUSED", "ACTIVITY_UNPAUSED", "ACTIVITY_RESET", "ACTIVITY_OPTIONS_UPDATED", "TIMER_STARTED", "TIMER_FIRED", "TIMER_CANCELLED", "SIGNAL_RECEIVED", "UPDATE_ADMITTED", "UPDATE_ACCEPTED", "UPDATE_COMPLETED", "CHILD_RUN_INITIATED", "CHILD_RUN_STARTED", "CHILD_RUN_COMPLETED", "CHILD_RUN_FAILED", "CHILD_RUN_CANCELLED", "CHILD_RUN_TERMINATED", "CHILD_RUN_TIMED_OUT", "EXTERNAL_RUN_CANCEL_REQUESTED", "EXTERNAL_RUN_CANCEL_RESOLVED", "EXTERNAL_RUN_SIGNALED", "SIDE_EFFECT_RECORDED", "LOCAL_ACTIVITY_COMPLETED", "LOCAL_ACTIVITY_FAILED", "SEARCH_ATTRIBUTES_UPSERTED", "CONTEXT_UPSERTED", "MARKER_RECORDED", "WORKFLOW_CANCEL_REQUESTED", "WORKFLOW_RESET", "VERSIONING_OVERRIDE_SET", "WORKFLOW_COMPLETED", "WORKFLOW_FAILED", "WORKFLOW_CANCELLED", "WORKFLOW_TERMINATED", "WORKFLOW_TIMED_OUT", "WORKFLOW_CONTINUED_AS_NEW"];
18
26
  type RunEventType = (typeof EVENT_TYPES)[number];
@@ -106,7 +114,11 @@ type Headers = Record<string, string>;
106
114
  interface CommandBase {
107
115
  headers?: Headers;
108
116
  }
109
- /** Signal and cancel targets. `workflowKey`/`workflowId` addressing is parity (11 §2.1). */
117
+ /**
118
+ * Signal and cancel targets. `workflowKey`/`workflowId` addressing is parity
119
+ * (11 §2.1): it reaches the open run of that business id, following the
120
+ * continue-as-new chain; `firstRunId` pins the chain whose first run it names.
121
+ */
110
122
  type RunTarget = {
111
123
  runId: string;
112
124
  } | {
@@ -116,7 +128,43 @@ type RunTarget = {
116
128
  } | {
117
129
  workflowKey: string;
118
130
  workflowId: string;
131
+ firstRunId?: string;
119
132
  };
133
+ /** `idReusePolicy` of a start (11 §2.1): what a closed run with the same workflow id allows. */
134
+ declare const WORKFLOW_ID_REUSE_POLICIES: readonly ["ALLOW_DUPLICATE", "ALLOW_DUPLICATE_FAILED_ONLY", "REJECT_DUPLICATE"];
135
+ type WorkflowIdReusePolicy = (typeof WORKFLOW_ID_REUSE_POLICIES)[number];
136
+ /** `idConflictPolicy` of a start (11 §2.1): what an open run with the same workflow id does. */
137
+ declare const WORKFLOW_ID_CONFLICT_POLICIES: readonly ["FAIL", "USE_EXISTING", "TERMINATE_EXISTING"];
138
+ type WorkflowIdConflictPolicy = (typeof WORKFLOW_ID_CONFLICT_POLICIES)[number];
139
+ /** `versioningBehavior` of a version or a run (11 §2.27). */
140
+ declare const VERSIONING_BEHAVIORS: readonly ["PINNED", "AUTO_UPGRADE"];
141
+ type VersioningBehavior = (typeof VERSIONING_BEHAVIORS)[number];
142
+ /** `timeoutType` of `WORKFLOW_TIMED_OUT` and `CHILD_RUN_TIMED_OUT` (11 §2.20). */
143
+ declare const WORKFLOW_TIMEOUT_TYPES: readonly ["WORKFLOW_RUN", "WORKFLOW_EXECUTION"];
144
+ type WorkflowTimeoutType = (typeof WORKFLOW_TIMEOUT_TYPES)[number];
145
+ /**
146
+ * The run-level retry policy of a DURABLE_FN run (11 §2.17), in milliseconds.
147
+ * A run that fails with a retryable failure, or whose run timeout expires,
148
+ * is started again as a new run of the same chain, up to `maxAttempts`
149
+ * attempts in total (absent: unlimited, bounded by the execution timeout).
150
+ */
151
+ interface RunRetryPolicy {
152
+ maxAttempts?: number;
153
+ /** Delay before the second attempt. */
154
+ initialDelayMs: number;
155
+ backoffMultiplier?: number;
156
+ maxDelayMs?: number;
157
+ /** Allow-list on `errorType`. */
158
+ retryOnErrorTypes?: ErrorType[];
159
+ /** Deny-list on the free-form `Failure.type`; wins over the allow-list. */
160
+ nonRetryableErrorTypes?: string[];
161
+ }
162
+ /** The three workflow timeouts of a run (11 §2.20), in milliseconds. */
163
+ interface WorkflowTimeouts {
164
+ executionTimeout?: number;
165
+ runTimeout?: number;
166
+ workflowTaskTimeout?: number;
167
+ }
120
168
  interface ScheduleActivityCommand extends CommandBase {
121
169
  type: 'SCHEDULE_ACTIVITY';
122
170
  activityId: string;
@@ -164,7 +212,12 @@ interface ChildRunOptions {
164
212
  runTimeout?: number;
165
213
  workflowTaskTimeout?: number;
166
214
  startDelay?: number;
167
- [key: string]: Json | undefined;
215
+ /** Run-level retry of the child (11 §2.17). */
216
+ retry?: RunRetryPolicy;
217
+ versioningBehavior?: VersioningBehavior;
218
+ idReusePolicy?: WorkflowIdReusePolicy;
219
+ idConflictPolicy?: WorkflowIdConflictPolicy;
220
+ [key: string]: Json | RunRetryPolicy | undefined;
168
221
  }
169
222
  interface StartChildRunCommand extends CommandBase {
170
223
  type: 'START_CHILD_RUN';
@@ -216,6 +269,10 @@ interface RecordLocalActivityCommand extends CommandBase {
216
269
  result?: Json;
217
270
  failure?: Failure;
218
271
  attempts: number;
272
+ /** The node operation that ran (R2), for the History tab and replay matching. */
273
+ nodeType?: string;
274
+ operation?: string;
275
+ summary?: string;
219
276
  }
220
277
  interface ContinueAsNewCommand extends CommandBase {
221
278
  type: 'CONTINUE_AS_NEW';
@@ -258,15 +315,28 @@ declare const DEFAULT_HISTORY_LIMIT: HistoryLimit;
258
315
  declare const CONTINUE_AS_NEW_SUGGESTED_RATIO = 0.8;
259
316
  /** Fraction of the cap at which the next command throws `HistoryLimitExceeded`. */
260
317
  declare const HISTORY_LIMIT_EXCEEDED_RATIO = 0.95;
261
- /** What a task knows about its run (C-ABI `WorkflowInfoSnapshot`). */
318
+ /**
319
+ * What a task knows about its run (C-ABI `WorkflowInfoSnapshot`). From SDK R2
320
+ * the runtime reads `workflowId`, `runAttempt`, `lastResult`, `lastFailure`,
321
+ * `summary`, `details`, the memo (`context`), the timeouts, `retry`,
322
+ * `priority` and `versioningBehavior` from `WORKFLOW_STARTED` when the event
323
+ * carries them, so a replay sees what the first execution saw; the lease
324
+ * values here are the fallback for histories written before R2.
325
+ */
262
326
  interface WorkflowInfoSnapshot {
263
327
  runId: string;
264
328
  workspaceId: string;
265
329
  workflowKey?: string;
266
330
  version?: number | string;
267
331
  buildId?: string;
332
+ /** The column name of the workflow id (11 §2.1). */
268
333
  businessId?: string;
334
+ /** The caller-chosen workflow id (`businessId`), else the first run's id. */
335
+ workflowId?: string;
336
+ /** Run-level retry attempt, 1-based (same value as `runAttempt`). */
269
337
  attempt?: number;
338
+ /** Run-level retry attempt, 1-based (11 §2.17). */
339
+ runAttempt?: number;
270
340
  taskQueue?: string;
271
341
  parentRunId?: string | null;
272
342
  rootRunId?: string | null;
@@ -286,7 +356,12 @@ interface WorkflowInfoSnapshot {
286
356
  priority?: number;
287
357
  summary?: string;
288
358
  details?: string;
359
+ /** The run's memo (11 §2.22); `memo` is the same value under its Temporal name. */
289
360
  context?: JsonObject;
361
+ memo?: JsonObject;
362
+ versioningBehavior?: VersioningBehavior;
363
+ /** The run-level retry policy of the chain. */
364
+ retry?: RunRetryPolicy;
290
365
  }
291
366
  /** A built-in query (11 §2.21). Custom queries are Phase C. */
292
367
  type BuiltInQueryName = '__stack_trace' | '__enhanced_stack_trace' | '__metadata';
@@ -300,27 +375,55 @@ interface WorkflowTaskRequest {
300
375
  history: RunEventRecord[];
301
376
  /** The task's start time; the clock for new side effects only. */
302
377
  nowMs: number;
303
- localActivityResults?: Array<{
304
- localActivityId: string;
305
- result?: Json;
306
- failure?: Failure;
307
- attempts: number;
308
- }>;
378
+ localActivityResults?: LocalActivityResult[];
309
379
  queries?: Array<{
310
380
  queryId: string;
311
381
  name: BuiltInQueryName;
312
382
  args?: Json;
313
383
  }>;
314
384
  }
315
- /** A local activity the task wants run before it can continue (parity). */
385
+ /** The result of one local activity, as the worker passes it back into the task (C-ABI). */
386
+ interface LocalActivityResult {
387
+ localActivityId: string;
388
+ result?: Json;
389
+ failure?: Failure;
390
+ /** Attempts run so far, the last one included. */
391
+ attempts: number;
392
+ }
393
+ /** The largest `startToCloseTimeout` of a local activity, and its default (11 §2.12). */
394
+ declare const LOCAL_ACTIVITY_MAX_TIMEOUT_MS = 30000;
395
+ /**
396
+ * A local activity the task wants run before it can continue (parity, 11
397
+ * §2.12). The worker runs attempt `attempt` (after waiting `backoffMs` when
398
+ * it is a retry) inside the task's budget, then runs the same task again with
399
+ * the outcome in `localActivityResults`. The runtime decides with
400
+ * `computeRetryDelay` whether a failure is final; a retryable one is
401
+ * requested again with the next attempt. A worker that cannot fit the wait
402
+ * and the attempt into the remaining budget answers with a non-retryable
403
+ * `TIMEOUT` failure of type `LocalActivityBudgetExceeded` instead.
404
+ */
316
405
  interface LocalActivityRequest {
317
406
  localActivityId: string;
407
+ kind: 'node';
318
408
  nodeType: string;
409
+ nodeVersion?: string;
319
410
  operation: string;
320
411
  args: Json;
321
412
  connection?: string;
322
- retry?: RetryPolicy;
323
- startToCloseTimeout?: number;
413
+ retry: RetryPolicy;
414
+ /** Milliseconds; at most {@link LOCAL_ACTIVITY_MAX_TIMEOUT_MS}. */
415
+ startToCloseTimeout: number;
416
+ /** The attempt to run, 1-based. */
417
+ attempt: number;
418
+ /** Milliseconds to wait before this attempt (0 for the first). */
419
+ backoffMs: number;
420
+ summary?: string;
421
+ }
422
+ /** Signal or update handlers still running when the workflow finished (11 §2.18). */
423
+ interface UnfinishedHandler {
424
+ kind: 'signal' | 'update';
425
+ name: string;
426
+ count: number;
324
427
  }
325
428
  interface TaskLogLine {
326
429
  level: 'debug' | 'info' | 'warn' | 'error';
@@ -347,6 +450,11 @@ interface WorkflowTaskResult {
347
450
  };
348
451
  logs: TaskLogLine[];
349
452
  stackTrace?: string;
453
+ /**
454
+ * Handlers still running when this task's terminal command was issued, with
455
+ * policy `WARN_AND_ABANDON` (R2). Never set on replay.
456
+ */
457
+ unfinishedHandlers?: UnfinishedHandler[];
350
458
  }
351
459
  /**
352
460
  * The event each command appends (C-CMD). `REJECT_UPDATE` appends nothing: a
@@ -377,4 +485,4 @@ declare function isCommandEvent(event: {
377
485
  payload: JsonObject;
378
486
  }): boolean;
379
487
 
380
- export { type StartTimerCommand as $, ACTIVITY_CANCELLATION_TYPES as A, BUILT_IN_QUERIES as B, type ChildCancellationType as C, DEFAULT_HISTORY_LIMIT as D, ERROR_TYPES as E, type Failure as F, PHASE_B_PARITY_COMMANDS as G, HISTORY_LIMIT_EXCEEDED_RATIO as H, INPUT_EVENTS as I, PHASE_C_COMMANDS as J, type RecordLocalActivityCommand as K, type LocalActivityRequest as L, type RecordMarkerCommand as M, type RecordSideEffectCommand as N, type RejectUpdateCommand as O, type ParentClosePolicy as P, type RequestCancelActivityCommand as Q, type RetryPolicy as R, type RequestCancelExternalRunCommand as S, type RunEventDraft as T, type RunEventRecord as U, type RunEventType as V, type WorkflowCommand as W, type RunTarget as X, type ScheduleActivityCommand as Y, type SignalRunCommand as Z, type StartChildRunCommand as _, type WorkflowTaskFailureCause as a, TASK_FAILURE_CAUSES as a0, TERMINAL_COMMANDS as a1, TERMINAL_EVENTS as a2, type TaskLogLine as a3, type UpsertContextCommand as a4, type UpsertSearchAttributesCommand as a5, type WorkflowInfoSnapshot as a6, type WorkflowTaskRequest as a7, type WorkflowTaskResult as a8, isCommandEvent as a9, isInputEvent as aa, type AcceptUpdateCommand as b, type ActivityCancellationType as c, type BuiltInQueryName as d, CHILD_CANCELLATION_TYPES as e, COMMAND_EVENTS as f, COMMAND_EVENT_TYPES as g, COMMAND_TYPES as h, CONTINUE_AS_NEW_SUGGESTED_RATIO as i, type CancelTimerCommand as j, type CancelWorkflowCommand as k, type ChildRunOptions as l, type CommandType as m, type CompleteUpdateCommand as n, type CompleteWorkflowCommand as o, type ContinueAsNewCommand as p, EVENT_TYPES as q, EXECUTION_KINDS as r, type ExecutionKind as s, type FailWorkflowCommand as t, type FailureSource as u, HISTORY_PROTOCOL as v, type Headers as w, type HistoryLimit as x, PARENT_CLOSE_POLICIES as y, PHASE_B_CORE_COMMANDS as z };
488
+ export { type RunTarget as $, ACTIVITY_CANCELLATION_TYPES as A, BUILT_IN_QUERIES as B, type ChildCancellationType as C, DEFAULT_HISTORY_LIMIT as D, ERROR_TYPES as E, type Failure as F, type LocalActivityResult as G, HISTORY_LIMIT_EXCEEDED_RATIO as H, INPUT_EVENTS as I, PARENT_CLOSE_POLICIES as J, PHASE_B_CORE_COMMANDS as K, LOCAL_ACTIVITY_MAX_TIMEOUT_MS as L, PHASE_B_PARITY_COMMANDS as M, PHASE_C_COMMANDS as N, RUNTIME_RELEASE as O, type ParentClosePolicy as P, type RecordLocalActivityCommand as Q, type RetryPolicy as R, type RecordMarkerCommand as S, type RecordSideEffectCommand as T, type RejectUpdateCommand as U, type RequestCancelActivityCommand as V, type WorkflowCommand as W, type RequestCancelExternalRunCommand as X, type RunEventDraft as Y, type RunEventRecord as Z, type RunEventType as _, type WorkflowTaskFailureCause as a, type ScheduleActivityCommand as a0, type SignalRunCommand as a1, type StartChildRunCommand as a2, type StartTimerCommand as a3, TASK_FAILURE_CAUSES as a4, TERMINAL_COMMANDS as a5, TERMINAL_EVENTS as a6, type TaskLogLine as a7, type UnfinishedHandler as a8, type UpsertContextCommand as a9, type UpsertSearchAttributesCommand as aa, VERSIONING_BEHAVIORS as ab, type VersioningBehavior as ac, WORKFLOW_ID_CONFLICT_POLICIES as ad, WORKFLOW_ID_REUSE_POLICIES as ae, WORKFLOW_TIMEOUT_TYPES as af, type WorkflowIdConflictPolicy as ag, type WorkflowIdReusePolicy as ah, type WorkflowInfoSnapshot as ai, type WorkflowTaskRequest as aj, type WorkflowTaskResult as ak, type WorkflowTimeoutType as al, type WorkflowTimeouts as am, isCommandEvent as an, isInputEvent as ao, type RunRetryPolicy as b, type AcceptUpdateCommand as c, type ActivityCancellationType as d, type BuiltInQueryName as e, CHILD_CANCELLATION_TYPES as f, COMMAND_EVENTS as g, COMMAND_EVENT_TYPES as h, COMMAND_TYPES as i, CONTINUE_AS_NEW_SUGGESTED_RATIO as j, type CancelTimerCommand as k, type CancelWorkflowCommand as l, type ChildRunOptions as m, type CommandType as n, type CompleteUpdateCommand as o, type CompleteWorkflowCommand as p, type ContinueAsNewCommand as q, EVENT_TYPES as r, EXECUTION_KINDS as s, type ExecutionKind as t, type FailWorkflowCommand as u, type FailureSource as v, HISTORY_PROTOCOL as w, type Headers as x, type HistoryLimit as y, type LocalActivityRequest as z };
@@ -1,5 +1,5 @@
1
- import { a as Json, J as JsonObject, d as ConnectionRef, L as LegacyCredentialRef, R as RetryConfig, g as NodeTimeout, f as NodeErrorConfig, e as ExecutionSettings, m as WorkflowNode, l as WorkflowEdge, k as WorkflowConfig, W as WorkflowInterface, j as WorkflowCode } from './types-BGoPzgcl.js';
2
- import { h as DurableWorkflow, O as Operation } from './workflow-C2a05WUJ.js';
1
+ import { J as Json, a as JsonObject, d as ConnectionRef, L as LegacyCredentialRef, R as RetryConfig, g as NodeTimeout, f as NodeErrorConfig, e as ExecutionSettings, m as WorkflowNode, l as WorkflowEdge, k as WorkflowConfig, b as WorkflowInterface, j as WorkflowCode } from './types-Bb2wRnJ5.js';
2
+ import { h as DurableWorkflow, O as Operation } from './workflow-DWTPHFbt.js';
3
3
 
4
4
  /**
5
5
  * Typed references and predicates for the tier-1 builder (spec 02 §3).
@@ -1,5 +1,5 @@
1
- import { a as Json, J as JsonObject, d as ConnectionRef, L as LegacyCredentialRef, R as RetryConfig, g as NodeTimeout, f as NodeErrorConfig, e as ExecutionSettings, m as WorkflowNode, l as WorkflowEdge, k as WorkflowConfig, W as WorkflowInterface, j as WorkflowCode } from './types-BGoPzgcl.cjs';
2
- import { h as DurableWorkflow, O as Operation } from './workflow-J-yYixny.cjs';
1
+ import { J as Json, a as JsonObject, d as ConnectionRef, L as LegacyCredentialRef, R as RetryConfig, g as NodeTimeout, f as NodeErrorConfig, e as ExecutionSettings, m as WorkflowNode, l as WorkflowEdge, k as WorkflowConfig, b as WorkflowInterface, j as WorkflowCode } from './types-Bb2wRnJ5.cjs';
2
+ import { h as DurableWorkflow, O as Operation } from './workflow-O6e64ZcG.cjs';
3
3
 
4
4
  /**
5
5
  * Typed references and predicates for the tier-1 builder (spec 02 §3).