@fluidgrids/workflows 2026.1029.1 → 2026.1030.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 (118) hide show
  1. package/README.md +112 -4
  2. package/dist/{activation-CESehfYi.d.cts → activation-DqUfpHzk.d.cts} +1 -1
  3. package/dist/{activation-BnVQMv9y.d.ts → activation-xpx1oWuo.d.ts} +1 -1
  4. package/dist/{chunk-MJ5TGYVG.js → chunk-2D3MYIIF.js} +969 -153
  5. package/dist/{chunk-2B37XAFQ.cjs → chunk-3U2NU7YC.cjs} +24 -11
  6. package/dist/{chunk-NEIUQASE.cjs → chunk-4QKB4ARC.cjs} +3 -3
  7. package/dist/{chunk-GBQ33SIZ.cjs → chunk-54FLQNUM.cjs} +12 -1
  8. package/dist/{chunk-2DDULZFM.js → chunk-5HIVIV53.js} +86 -75
  9. package/dist/chunk-5MFVJM76.js +1222 -0
  10. package/dist/{chunk-EWYADREB.cjs → chunk-672KMMBK.cjs} +2 -2
  11. package/dist/{chunk-KXJDRQ6G.js → chunk-6A2FGSUS.js} +22 -2
  12. package/dist/{chunk-OIX4O6UR.js → chunk-6OLN6BMB.js} +16 -3
  13. package/dist/{chunk-6FSHT5IL.js → chunk-7EZIANC7.js} +1 -1
  14. package/dist/chunk-A5SXCA62.cjs +93 -0
  15. package/dist/chunk-AC6ZEXVR.js +85 -0
  16. package/dist/{chunk-FWBRQWRX.js → chunk-AE5Q6ZAJ.js} +167 -10
  17. package/dist/{chunk-7ILGCUI6.js → chunk-C4F5KJTI.js} +142 -3
  18. package/dist/{chunk-WXXNCHUY.js → chunk-G5H32GIG.js} +1 -1
  19. package/dist/{chunk-OMY3CKUZ.cjs → chunk-GEQDGUGB.cjs} +1042 -226
  20. package/dist/{chunk-25BKWR2O.js → chunk-HCM7ZC7Q.js} +1 -1
  21. package/dist/{chunk-I47EENR4.cjs → chunk-HMZUGSMU.cjs} +673 -156
  22. package/dist/{chunk-NXFBVDOI.cjs → chunk-IQPXHQQQ.cjs} +8 -4
  23. package/dist/{chunk-RUQIMTN5.cjs → chunk-ISOIA7NV.cjs} +178 -15
  24. package/dist/chunk-JSC75O5C.cjs +167 -0
  25. package/dist/{chunk-BD7ZPG53.js → chunk-NWQ5WRLE.js} +10 -2
  26. package/dist/chunk-ODZ2IAR2.cjs +1247 -0
  27. package/dist/{chunk-FQSJI5NV.js → chunk-SR7TR5KX.js} +6 -2
  28. package/dist/{chunk-OKX3FYIM.cjs → chunk-TCTE7DX5.cjs} +3 -3
  29. package/dist/{chunk-3FIDHONL.cjs → chunk-TYF56RGB.cjs} +99 -80
  30. package/dist/{chunk-J3PYFGKA.cjs → chunk-VA4OFR72.cjs} +162 -4
  31. package/dist/chunk-VU5S5A7V.js +150 -0
  32. package/dist/{chunk-A36CCOWS.js → chunk-YEHR4NNE.js} +633 -128
  33. package/dist/{chunk-ELL2RBML.cjs → chunk-ZCGKGDCL.cjs} +23 -1
  34. package/dist/codegen/index.d.cts +2 -2
  35. package/dist/codegen/index.d.ts +2 -2
  36. package/dist/{collect-BTHjQaSp.d.ts → collect-6NIEufHd.d.ts} +20 -3
  37. package/dist/{collect-CSyOg5XC.d.cts → collect-CcTCKqx6.d.cts} +20 -3
  38. package/dist/{file-cgL9l9l8.d.cts → file-BxYpwjRQ.d.cts} +250 -15
  39. package/dist/{file-olQudcx5.d.ts → file-CFdPQJI9.d.ts} +250 -15
  40. package/dist/history/index.cjs +283 -106
  41. package/dist/history/index.d.cts +549 -10
  42. package/dist/history/index.d.ts +549 -10
  43. package/dist/history/index.js +5 -4
  44. package/dist/index.cjs +146 -53
  45. package/dist/index.d.cts +38 -14
  46. package/dist/index.d.ts +38 -14
  47. package/dist/index.js +6 -5
  48. package/dist/interceptors-CNcr2dlk.d.ts +159 -0
  49. package/dist/interceptors-CqkNZVfI.d.cts +159 -0
  50. package/dist/ir/index.cjs +339 -36
  51. package/dist/ir/index.d.cts +244 -8
  52. package/dist/ir/index.d.ts +244 -8
  53. package/dist/ir/index.js +306 -21
  54. package/dist/{lower-3S6PsqjJ.d.cts → lower-BtRfIW2A.d.cts} +23 -9
  55. package/dist/{lower-DmZpQ8hJ.d.ts → lower-CpsMFOFX.d.ts} +23 -9
  56. package/dist/{manifest-BJjrQt77.d.ts → manifest-D-I_twys.d.ts} +1 -1
  57. package/dist/{manifest-gRI2Q5Fj.d.cts → manifest-DahBQVM8.d.cts} +1 -1
  58. package/dist/node-evaluator-DGQDPSPI.cjs +24 -0
  59. package/dist/node-evaluator-LEEVD7H7.js +14 -0
  60. package/dist/payload-fields-BVRQn2yH.d.cts +122 -0
  61. package/dist/payload-fields-oOBWxDiG.d.ts +122 -0
  62. package/dist/quickjs/index.cjs +27 -27
  63. package/dist/quickjs/index.d.cts +6 -6
  64. package/dist/quickjs/index.d.ts +6 -6
  65. package/dist/quickjs/index.js +9 -9
  66. package/dist/roundtrip/index.cjs +72 -66
  67. package/dist/roundtrip/index.d.cts +25 -11
  68. package/dist/roundtrip/index.d.ts +25 -11
  69. package/dist/roundtrip/index.js +13 -11
  70. package/dist/runtime/index.cjs +19 -19
  71. package/dist/runtime/index.d.cts +139 -12
  72. package/dist/runtime/index.d.ts +139 -12
  73. package/dist/runtime/index.js +6 -6
  74. package/dist/testing/index.cjs +688 -121
  75. package/dist/testing/index.d.cts +174 -10
  76. package/dist/testing/index.d.ts +174 -10
  77. package/dist/testing/index.js +646 -82
  78. package/dist/{types-CnIOinoz.d.ts → types-Bv2i4cBX.d.cts} +126 -23
  79. package/dist/{types-CQKOhPTa.d.cts → types-DGx-b9eq.d.ts} +126 -23
  80. package/dist/{types-Bb2wRnJ5.d.cts → types-V7jEEUaL.d.cts} +1 -1
  81. package/dist/{types-Bb2wRnJ5.d.ts → types-V7jEEUaL.d.ts} +1 -1
  82. package/dist/{workflow-8uRU9rhL.d.ts → workflow-B18OeF7g.d.ts} +2 -2
  83. package/dist/{workflow-DWTPHFbt.d.ts → workflow-BGnv8SS6.d.ts} +261 -14
  84. package/dist/{workflow-CZOXUlQ5.d.cts → workflow-BJPFv3cp.d.cts} +2 -2
  85. package/dist/{workflow-O6e64ZcG.d.cts → workflow-DS32Gtws.d.cts} +261 -14
  86. package/fixtures/histories/activity-options-updated.history.json +159 -0
  87. package/fixtures/histories/activity-paused-unpaused.history.json +160 -0
  88. package/fixtures/histories/codec-opaque.history.json +229 -0
  89. package/fixtures/histories/dynamic-workflow.history.json +150 -0
  90. package/fixtures/histories/interceptor-headers.history.json +339 -0
  91. package/fixtures/histories/query-custom.history.json +213 -0
  92. package/fixtures/histories/query-default-handler.history.json +120 -0
  93. package/fixtures/histories/reset-forked-reapplied-signals.history.json +239 -0
  94. package/fixtures/histories/reset-reapplied-update-admitted.history.json +228 -0
  95. package/fixtures/histories/search-attributes-upserted.history.json +177 -0
  96. package/fixtures/histories/update-accepted-completed.history.json +45 -30
  97. package/fixtures/histories/update-default-handler.history.json +246 -0
  98. package/fixtures/histories/update-handler-awaits-activity.history.json +196 -0
  99. package/fixtures/histories/update-not-handled.history.json +138 -0
  100. package/fixtures/histories/update-rejected-no-event.history.json +190 -0
  101. package/fixtures/histories/update-with-start-admitted.history.json +150 -0
  102. package/fixtures/histories/user-activity-cancel.history.json +149 -0
  103. package/fixtures/histories/user-activity-retry.history.json +143 -0
  104. package/fixtures/histories/user-activity.history.json +149 -0
  105. package/package.json +1 -1
  106. package/schema/bridge-v2.schema.json +1062 -0
  107. package/schema/history-file.schema.json +255 -81
  108. package/schema/ir-v2.schema.json +246 -1
  109. package/schema/payload-fields.json +162 -0
  110. package/schema/run-event.schema.json +239 -80
  111. package/schema/workflow-command.schema.json +210 -84
  112. package/schema/workflow-task.schema.json +532 -167
  113. package/dist/chunk-6QPOJZT6.cjs +0 -1180
  114. package/dist/chunk-A2OHX3UQ.js +0 -1156
  115. package/dist/chunk-PWIUEWC3.js +0 -81
  116. package/dist/chunk-YHBVMOMK.cjs +0 -87
  117. package/dist/node-evaluator-SOADN23V.js +0 -14
  118. package/dist/node-evaluator-YGDEXK4U.cjs +0 -24
@@ -1,7 +1,8 @@
1
- import { W as WorkflowContext, h as DurableWorkflow, C as CancellationScope, O as Operation, R as RunOptions, l as LocalActivityOptions, j as Duration, n as SignalDefinition, o as SignalHandlerOptions, k as ExternalRunTarget, E as ExternalRunHandle, e as ChildTarget, d as ChildOptions, c as ChildHandle, f as ContinueAsNewOptions, b as CancellationScopeOptions } from '../workflow-DWTPHFbt.js';
2
- export { A as Activation, s as splitActivations } from '../activation-BnVQMv9y.js';
3
- import { W as WorkflowCommand, Z as RunEventRecord, aj as WorkflowTaskRequest, ak as WorkflowTaskResult, a as WorkflowTaskFailureCause, $ as RunTarget } from '../types-CnIOinoz.js';
4
- import { J as Json, a as JsonObject } from '../types-Bb2wRnJ5.js';
1
+ import { k as WorkflowInterceptorsFactory } from '../interceptors-CNcr2dlk.js';
2
+ import { W as WorkflowContext, v as DurableWorkflow, U as UpdateDefinition, K as UpdateHandlerOptions, t as DefaultUpdateHandlerOptions, Q as QueryDefinition, C as CancellationScope, O as Operation, R as RunOptions, e as ActivityDefinition, k as ActivityOptions, z as LocalActivityOptions, x as Duration, G as SignalDefinition, I as SignalHandlerOptions, y as ExternalRunTarget, E as ExternalRunHandle, q as ChildTarget, p as ChildOptions, o as ChildHandle, r as ContinueAsNewOptions, n as CancellationScopeOptions } from '../workflow-BGnv8SS6.js';
3
+ export { A as Activation, s as splitActivations } from '../activation-xpx1oWuo.js';
4
+ import { W as WorkflowCommand, R as RunEventRecord, az as WorkflowTaskRequest, aA as WorkflowTaskResult, a as WorkflowTaskFailureCause, ad as RunTarget, M as Headers } from '../types-DGx-b9eq.js';
5
+ import { a as Json, J as JsonObject } from '../types-V7jEEUaL.js';
5
6
 
6
7
  /**
7
8
  * Determinism shims for workflow tasks (C-ABI, spec 04 §4).
@@ -51,10 +52,12 @@ declare function uuidFrom(random: () => number): string;
51
52
 
52
53
  /**
53
54
  * Replay matching (spec 04 §4): each command a replayed activation issues must
54
- * match the command event recorded at the same position. Activities match on
55
- * id and `nodeType + operation`, children on id and target, everything else on
56
- * type and id. A recorded patch marker that the code no longer issues is
57
- * skipped (the patch was deprecated and removed, spec 06 §4).
55
+ * match the command event recorded at the same position. Node activities
56
+ * match on id and `nodeType + operation`, user activities (Phase C) on id,
57
+ * `kind` and `activityName`, children on id and target, updates on id,
58
+ * everything else on type and id. A recorded patch marker that the code no
59
+ * longer issues is skipped (the patch was deprecated and removed, spec 06 §4).
60
+ * `REJECT_UPDATE` appends no event (11 §2.39), so it is not matched.
58
61
  */
59
62
 
60
63
  /** Why `command` does not match `event`, or undefined when it does. */
@@ -97,6 +100,14 @@ declare function isPatchMarkerId(markerId: string): boolean;
97
100
  * finishes it: a replayed activation must have issued exactly the commands it
98
101
  * recorded, and the open activation's commands are the task's result.
99
102
  *
103
+ * Updates (C-ABI-H, spec 04 §2): the updates of activation k are delivered
104
+ * after its input events. A replayed activation re-delivers the updates its
105
+ * task accepted (`UPDATE_ACCEPTED` in its command block) without running
106
+ * their validators; the open activation delivers the lease's pending updates
107
+ * (`request.updates`) with validation. `UPDATE_ADMITTED` is an input event and
108
+ * is validated like a live request. An update no handler takes by the end of
109
+ * its activation is rejected (`UpdateNotHandled`).
110
+ *
100
111
  * Pure JavaScript; it runs inside the isolate.
101
112
  */
102
113
 
@@ -106,7 +117,8 @@ declare const SDK_NAME = "@fluidgrids/workflows";
106
117
  declare class ContinueAsNewRequest {
107
118
  readonly input: Json;
108
119
  readonly options: JsonObject;
109
- constructor(input: Json, options: JsonObject);
120
+ readonly headers: Headers;
121
+ constructor(input: Json, options: JsonObject, headers?: Headers);
110
122
  }
111
123
  declare class Scope implements CancellationScope {
112
124
  readonly parent: Scope | undefined;
@@ -133,6 +145,8 @@ interface ExecutionInput {
133
145
  exportNames: ReadonlyMap<DurableWorkflow<never, unknown>, string>;
134
146
  request: WorkflowTaskRequest;
135
147
  sdkVersion: string;
148
+ /** The bundle's workflow interceptors (`interceptors` exports), in module order. */
149
+ interceptors?: readonly WorkflowInterceptorsFactory[];
136
150
  }
137
151
  /** One workflow task in progress. */
138
152
  declare class WorkflowExecution {
@@ -145,7 +159,7 @@ declare class WorkflowExecution {
145
159
  private activationOpen;
146
160
  private replaying;
147
161
  private clock;
148
- private readonly random;
162
+ private readonly randomSource;
149
163
  private readonly ids;
150
164
  private commands;
151
165
  private newCommands;
@@ -190,6 +204,24 @@ declare class WorkflowExecution {
190
204
  /** Running asynchronous handlers by name, for the drain warning (11 §2.18). */
191
205
  private readonly running;
192
206
  private unfinished;
207
+ /** Updates delivered so far, by id (an update is delivered at most once per task). */
208
+ private readonly deliveredUpdates;
209
+ /** Updates delivered in the current activation without a handler yet. */
210
+ private bufferedUpdates;
211
+ private readonly updateHandlers;
212
+ private defaultUpdateHandler;
213
+ private readonly queryHandlers;
214
+ private defaultQueryHandler;
215
+ /** Set while a query handler or an update validator runs: commands and sinks throw. */
216
+ private readOnly;
217
+ /** The first state-changing call a read-only handler made, even when it caught the error. */
218
+ private readOnlyViolation;
219
+ private searchAttributes;
220
+ private readonly startHeaders;
221
+ private readonly inbound;
222
+ private readonly outbound;
223
+ private sinkCalls;
224
+ private sinkCallsDropped;
193
225
  private readonly recordedLocalActivities;
194
226
  private readonly localActivityResults;
195
227
  private readonly localActivities;
@@ -202,8 +234,21 @@ declare class WorkflowExecution {
202
234
  private continueAsNewSuggested;
203
235
  /** The workflow clock. */
204
236
  now(): number;
205
- /** The next deterministic random number. */
237
+ /** The next deterministic random number (`Math.random()` and `crypto.getRandomValues()`). */
206
238
  nextRandom(): number;
239
+ /** `ctx.random()`: advances the run's random source, so read-only handlers may not call it. */
240
+ private random;
241
+ /**
242
+ * Throw `QueryHandlerSideEffect` when a query handler or an update validator
243
+ * calls something that changes the run's deterministic state (the random
244
+ * source, the command id counters, patches, details). Validators are not run
245
+ * again on replay, and a worker that keeps a run's state between tasks keeps
246
+ * whatever a query handler changed, so either would make the next replay
247
+ * diverge. The violation is remembered, so catching the error does not hide it.
248
+ */
249
+ private assertWritable;
250
+ /** The next command id of a kind; refused in read-only handlers (it advances a counter). */
251
+ private nextId;
207
252
  /** Begin or finish an activation; `done` when there is nothing left to do. */
208
253
  step(): 'more' | 'done';
209
254
  /** The task's result. Call after `step()` returned `done` and jobs were drained. */
@@ -217,6 +262,14 @@ declare class WorkflowExecution {
217
262
  /** Fail the task (the runtime's own failures and code errors). */
218
263
  failTask(cause: WorkflowTaskFailureCause, message: string, stackTrace?: string, seq?: number, errorType?: string): void;
219
264
  private beginActivation;
265
+ /**
266
+ * The updates an activation delivers after its inputs (C-ABI-H): a replayed
267
+ * activation re-delivers the updates its task accepted (validators
268
+ * skipped); the open activation of a workflow task delivers the lease's
269
+ * pending updates. Updates history admitted (`UPDATE_ADMITTED`) arrive as
270
+ * inputs instead.
271
+ */
272
+ private updatesOf;
220
273
  private finishActivation;
221
274
  /**
222
275
  * A local activity issued on a replayed activation without a recorded
@@ -230,9 +283,38 @@ declare class WorkflowExecution {
230
283
  private expectIssued;
231
284
  private settleActivity;
232
285
  private settleChild;
286
+ /** Run a signal handler through the inbound `handleSignal` interceptors. */
287
+ private signalCall;
233
288
  private dispatchSignal;
234
289
  private takeBuffered;
235
290
  private runHandler;
291
+ /** Count a running asynchronous handler (drain check, `allHandlersFinished`); returns its end. */
292
+ private trackHandler;
293
+ private deliverUpdate;
294
+ private updateHandlerFor;
295
+ /**
296
+ * Run `fn` with commands, sinks and every other change to the run's
297
+ * deterministic state refused (query handlers, update validators). A
298
+ * refused call fails the whole call with `QueryHandlerSideEffect`, even
299
+ * when the code caught the error it threw.
300
+ */
301
+ private readOnlyCall;
302
+ /**
303
+ * Validate, accept and run one update. A validator error rejects it
304
+ * (`REJECT_UPDATE`, no history); otherwise `ACCEPT_UPDATE` is issued and
305
+ * the handler's result or failure completes it (`COMPLETE_UPDATE`). A
306
+ * handler that throws something other than a failure class fails the task,
307
+ * as a signal handler does.
308
+ */
309
+ private runUpdate;
310
+ private completeUpdate;
311
+ /** Reject the updates of this activation that no handler took (`UpdateNotHandled`). */
312
+ private rejectUnhandledUpdates;
313
+ handleUpdate(update: UpdateDefinition<unknown, unknown> | string, handler: (args: unknown) => unknown, options?: UpdateHandlerOptions<unknown>): void;
314
+ setDefaultUpdateHandler(first: ((name: string, args: unknown) => unknown) | DefaultUpdateHandlerOptions, second?: ((name: string, args: unknown) => unknown) | DefaultUpdateHandlerOptions): void;
315
+ private dispatchBufferedUpdates;
316
+ handleQuery(query: QueryDefinition<unknown, unknown> | string, handler: (args: unknown) => unknown): void;
317
+ setDefaultQueryHandler(handler: (name: string, args: unknown) => unknown): void;
236
318
  /**
237
319
  * The drain check of 11 §2.18 when the workflow finishes: handlers still
238
320
  * running with policy `WARN_AND_ABANDON` give one warning line and
@@ -257,6 +339,15 @@ declare class WorkflowExecution {
257
339
  private stack;
258
340
  private never;
259
341
  scheduleActivity<In, Out>(scope: Scope, operation: Operation<In, Out>, options: RunOptions<In>): Promise<Out>;
342
+ /**
343
+ * `ctx.activity` (Phase C): a user activity on a self-hosted task queue
344
+ * (`SCHEDULE_ACTIVITY` of kind `user`). The queue is the option, else the
345
+ * declaration's, else the run's own.
346
+ */
347
+ userActivity<In, Out>(scope: Scope, activity: ActivityDefinition<In, Out> | string, options: ActivityOptions<In>): Promise<Out>;
348
+ /** Run the outbound `scheduleActivity` interceptors, then issue the command. */
349
+ private issueActivity;
350
+ private pushActivity;
260
351
  /**
261
352
  * `ctx.localActivity` (11 §2.12). A replayed activation returns the outcome
262
353
  * its history recorded; the open activation takes the outcome the worker
@@ -282,34 +373,64 @@ declare class WorkflowExecution {
282
373
  runHandle(target: ExternalRunTarget): ExternalRunHandle;
283
374
  private childTarget;
284
375
  private childCommand;
376
+ /**
377
+ * Run the outbound `startChild` interceptors around a child start. `go`
378
+ * starts the child with the options the interceptors leave (input and
379
+ * headers).
380
+ */
381
+ private interceptChild;
285
382
  private startChildRun;
286
383
  /** What cancelling the scope of a child's awaitable does (see `ChildOptions.cancellationType`). */
287
384
  private onChildCancel;
288
385
  child<Out>(scope: Scope, target: ChildTarget<Out>, options: ChildOptions): Promise<Out>;
289
386
  private childResult;
290
387
  startChild<Out>(scope: Scope, target: ChildTarget<Out>, options: ChildOptions): Promise<ChildHandle<Out>>;
388
+ private startChildHandle;
291
389
  signalExternal(target: RunTarget, name: string, payload: unknown): Promise<void>;
390
+ private pushSignal;
292
391
  cancelExternal(target: RunTarget): Promise<void>;
392
+ private pushCancel;
293
393
  sideEffect<T extends Json>(fn: () => T): T;
394
+ private recordSideEffect;
294
395
  patched(patchId: string, deprecated: boolean): boolean;
295
396
  setCurrentDetails(markdown: string): void;
296
397
  upsertContext(entries: JsonObject): void;
398
+ /** `ctx.upsertSearchAttributes` (Phase C): a null value removes an attribute. */
399
+ upsertSearchAttributes(attributes: JsonObject): void;
400
+ /** A `ctx.sinks.<sink>.<fn>(...args)` call: recorded once, never on replay (11 §2.31). */
401
+ private callSink;
402
+ private sinksProxy;
403
+ /** `ctx.continueAsNew`: a rejection with the request, after the outbound interceptors. */
404
+ continueAsNewCall(input: unknown, options: ContinueAsNewOptions): Promise<never>;
297
405
  /** The request a `ctx.continueAsNew` call throws; the run ends with `CONTINUE_AS_NEW`. */
298
406
  continueAsNew(input: unknown, options: ContinueAsNewOptions): ContinueAsNewRequest;
299
407
  cancellationScope<T>(parent: Scope, fn: (ctx: WorkflowContext) => Promise<T>, options: CancellationScopeOptions): Promise<T>;
300
408
  /** Waits for the signal handlers regardless of cancellation, as Temporal does. */
301
409
  allHandlersFinished(): Promise<void>;
302
410
  private pendingStacks;
411
+ /**
412
+ * Answer a custom query (Phase C): the handler registered for the name, else
413
+ * the default handler, run read-only through the inbound `handleQuery`
414
+ * interceptors. No handler gives `rejected`.
415
+ */
416
+ private answerCustomQuery;
303
417
  private answerQueries;
304
418
  private contextFor;
305
419
  }
306
420
 
307
421
  /** The global a tier-2 bundle defines. */
308
422
  declare const RUNTIME_GLOBAL = "__fluidgridsRuntime";
309
- /** The runtime ABI, protocol 1. */
423
+ /**
424
+ * The runtime ABI, protocol 1. `capabilities` (C-ABI-H, from C-R1) lists what
425
+ * the runtime answers beyond Phase B: `updates`, `queries` (custom and default
426
+ * handlers) and `dynamic` (dynamic workflows and default handlers). A bundle
427
+ * built before C-R1 has none, and the service refuses updates and custom
428
+ * queries for its runs (DC4).
429
+ */
310
430
  interface FluidgridsRuntimeAbi {
311
431
  readonly protocol: 1;
312
432
  readonly sdkVersion: string;
433
+ readonly capabilities?: readonly string[];
313
434
  start(requestJson: string): void;
314
435
  step(): 'more' | 'done';
315
436
  complete(): string;
@@ -320,6 +441,12 @@ interface WorkflowRegistry {
320
441
  exportNames: ReadonlyMap<DurableWorkflow<never, unknown>, string>;
321
442
  /** Export names declared by more than one module; starting one fails the task. */
322
443
  ambiguous: ReadonlySet<string>;
444
+ /** The bundle's dynamic workflow (Phase C), which serves names no export has. */
445
+ dynamic?: DurableWorkflow<never, unknown>;
446
+ /** True when more than one dynamic workflow is exported; a dynamic start fails the task. */
447
+ dynamicAmbiguous?: boolean;
448
+ /** Workflow interceptor factories (`interceptors` exports), in module order. */
449
+ interceptors?: readonly WorkflowInterceptorsFactory[];
323
450
  }
324
451
  /** Build the registry from the bundle's modules (`[path, namespace]` pairs). */
325
452
  declare function buildWorkflowRegistry(modules: ReadonlyArray<readonly [string, Record<string, unknown>]>): WorkflowRegistry;
@@ -1,9 +1,9 @@
1
- export { CommandIds, RUNTIME_GLOBAL, SDK_NAME, WorkflowExecution, buildWorkflowRegistry, createWorkflowRuntime, installWorkflowRuntime, isPatchMarkerId, isRuntimeAbi, matchActivation, mismatch, patchMarkerId } from '../chunk-MJ5TGYVG.js';
2
- import '../chunk-KXJDRQ6G.js';
1
+ export { CommandIds, RUNTIME_GLOBAL, SDK_NAME, WorkflowExecution, buildWorkflowRegistry, createWorkflowRuntime, installWorkflowRuntime, isPatchMarkerId, isRuntimeAbi, matchActivation, mismatch, patchMarkerId } from '../chunk-2D3MYIIF.js';
2
+ import '../chunk-6A2FGSUS.js';
3
3
  import '../chunk-M272AHEX.js';
4
4
  export { SHIM_HOOK, SHIM_VIOLATION, TASK_PRELUDE, createRandom, seedOf, uuidFrom } from '../chunk-4LYSEANA.js';
5
- import '../chunk-7ILGCUI6.js';
5
+ import '../chunk-C4F5KJTI.js';
6
6
  import '../chunk-LNUQE6D6.js';
7
- export { splitActivations } from '../chunk-FWBRQWRX.js';
8
- import '../chunk-2DDULZFM.js';
9
- import '../chunk-PWIUEWC3.js';
7
+ export { splitActivations } from '../chunk-AE5Q6ZAJ.js';
8
+ import '../chunk-AC6ZEXVR.js';
9
+ import '../chunk-5HIVIV53.js';