@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
@@ -1,9 +1,9 @@
1
- import { W as WorkflowCommand, a as WorkflowTaskFailureCause, R as RetryPolicy, F as Failure, C as ChildCancellationType, P as ParentClosePolicy } from '../types-DV-HX_Gt.js';
2
- export { A as ACTIVITY_CANCELLATION_TYPES, b as AcceptUpdateCommand, c as ActivityCancellationType, B as BUILT_IN_QUERIES, d as BuiltInQueryName, e as CHILD_CANCELLATION_TYPES, f as COMMAND_EVENTS, g as COMMAND_EVENT_TYPES, h as COMMAND_TYPES, i as CONTINUE_AS_NEW_SUGGESTED_RATIO, j as CancelTimerCommand, k as CancelWorkflowCommand, l as ChildRunOptions, m as CommandType, n as CompleteUpdateCommand, o as CompleteWorkflowCommand, p as ContinueAsNewCommand, D as DEFAULT_HISTORY_LIMIT, E as ERROR_TYPES, q as EVENT_TYPES, r as EXECUTION_KINDS, s as ExecutionKind, t as FailWorkflowCommand, u as FailureSource, H as HISTORY_LIMIT_EXCEEDED_RATIO, v as HISTORY_PROTOCOL, w as Headers, x as HistoryLimit, I as INPUT_EVENTS, L as LocalActivityRequest, y as PARENT_CLOSE_POLICIES, z as PHASE_B_CORE_COMMANDS, G as PHASE_B_PARITY_COMMANDS, J as PHASE_C_COMMANDS, K as RecordLocalActivityCommand, M as RecordMarkerCommand, N as RecordSideEffectCommand, O as RejectUpdateCommand, Q as RequestCancelActivityCommand, S as RequestCancelExternalRunCommand, T as RunEventDraft, U as RunEventRecord, V as RunEventType, X as RunTarget, Y as ScheduleActivityCommand, Z as SignalRunCommand, _ as StartChildRunCommand, $ as StartTimerCommand, a0 as TASK_FAILURE_CAUSES, a1 as TERMINAL_COMMANDS, a2 as TERMINAL_EVENTS, a3 as TaskLogLine, a4 as UpsertContextCommand, a5 as UpsertSearchAttributesCommand, a6 as WorkflowInfoSnapshot, a7 as WorkflowTaskRequest, a8 as WorkflowTaskResult, a9 as isCommandEvent, aa as isInputEvent } from '../types-DV-HX_Gt.js';
3
- import { H as HistoryIssue } from '../file-yuPCFU5b.js';
4
- export { A as ActivityState, a as ActivityStatus, C as ChildState, b as ChildStatus, E as EventsForCommandsContext, c as EventsForCommandsResult, d as ExternalState, e as HISTORY_FILE_FORMAT, f as HISTORY_FILE_SCHEMA, g as HISTORY_FILE_SCHEMA_ID, h as HISTORY_SCHEMA_FILES, i as HistoryFile, j as HistoryFileError, k as HistoryStateError, R as RUN_EVENT_SCHEMA, l as RUN_EVENT_SCHEMA_ID, m as RunState, n as RunStatus, T as TimerState, W as WORKFLOW_COMMAND_SCHEMA, o as WORKFLOW_COMMAND_SCHEMA_ID, p as WORKFLOW_TASK_SCHEMA, q as WORKFLOW_TASK_SCHEMA_ID, r as applyEvent, s as createHistoryFile, t as eventsForCommands, u as hasUnprocessedInput, v as initialRunState, w as isActivityOpen, x as isChildOpen, y as isCommandEnabled, z as isWorkflowCommandEnabled, B as parseHistoryFile, D as pendingCounts, F as projectRunState, G as serializeHistoryFile, I as taskCompletedEvents, J as utf8Bytes } from '../file-yuPCFU5b.js';
5
- export { A as Activation, s as splitActivations, u as unseenInputs } from '../activation-DnhG7SmF.js';
6
- import '../types-BGoPzgcl.js';
1
+ import { W as WorkflowCommand, a as WorkflowTaskFailureCause, R as RetryPolicy, F as Failure, b as RunRetryPolicy, C as ChildCancellationType, P as ParentClosePolicy } from '../types-CnIOinoz.js';
2
+ export { A as ACTIVITY_CANCELLATION_TYPES, c as AcceptUpdateCommand, d as ActivityCancellationType, B as BUILT_IN_QUERIES, e as BuiltInQueryName, f as CHILD_CANCELLATION_TYPES, g as COMMAND_EVENTS, h as COMMAND_EVENT_TYPES, i as COMMAND_TYPES, j as CONTINUE_AS_NEW_SUGGESTED_RATIO, k as CancelTimerCommand, l as CancelWorkflowCommand, m as ChildRunOptions, n as CommandType, o as CompleteUpdateCommand, p as CompleteWorkflowCommand, q as ContinueAsNewCommand, D as DEFAULT_HISTORY_LIMIT, E as ERROR_TYPES, r as EVENT_TYPES, s as EXECUTION_KINDS, t as ExecutionKind, u as FailWorkflowCommand, v as FailureSource, H as HISTORY_LIMIT_EXCEEDED_RATIO, w as HISTORY_PROTOCOL, x as Headers, y as HistoryLimit, I as INPUT_EVENTS, L as LOCAL_ACTIVITY_MAX_TIMEOUT_MS, z as LocalActivityRequest, G as LocalActivityResult, J as PARENT_CLOSE_POLICIES, K as PHASE_B_CORE_COMMANDS, M as PHASE_B_PARITY_COMMANDS, N as PHASE_C_COMMANDS, O as RUNTIME_RELEASE, Q as RecordLocalActivityCommand, S as RecordMarkerCommand, T as RecordSideEffectCommand, U as RejectUpdateCommand, V as RequestCancelActivityCommand, X as RequestCancelExternalRunCommand, Y as RunEventDraft, Z as RunEventRecord, _ as RunEventType, $ as RunTarget, a0 as ScheduleActivityCommand, a1 as SignalRunCommand, a2 as StartChildRunCommand, a3 as StartTimerCommand, a4 as TASK_FAILURE_CAUSES, a5 as TERMINAL_COMMANDS, a6 as TERMINAL_EVENTS, a7 as TaskLogLine, a8 as UnfinishedHandler, a9 as UpsertContextCommand, aa as UpsertSearchAttributesCommand, ab as VERSIONING_BEHAVIORS, ac as VersioningBehavior, ad as WORKFLOW_ID_CONFLICT_POLICIES, ae as WORKFLOW_ID_REUSE_POLICIES, af as WORKFLOW_TIMEOUT_TYPES, ag as WorkflowIdConflictPolicy, ah as WorkflowIdReusePolicy, ai as WorkflowInfoSnapshot, aj as WorkflowTaskRequest, ak as WorkflowTaskResult, al as WorkflowTimeoutType, am as WorkflowTimeouts, an as isCommandEvent, ao as isInputEvent } from '../types-CnIOinoz.js';
3
+ import { H as HistoryIssue, C as CommandGate, a as CommandRelief } from '../file-olQudcx5.js';
4
+ export { A as ActivityState, b as ActivityStatus, c as COMMAND_FEATURES, d as CORE_CAN_OPTIONS, e as CORE_CHILD_OPTIONS, f as ChildState, g as ChildStatus, h as CommandFeature, E as EventsForCommandsContext, i as EventsForCommandsResult, j as ExternalState, k as HISTORY_FILE_FORMAT, l as HISTORY_FILE_SCHEMA, m as HISTORY_FILE_SCHEMA_ID, n as HISTORY_SCHEMA_FILES, o as HistoryFile, p as HistoryFileError, q as HistoryStateError, L as LocalActivityState, P as PHASE_B_CORE_FEATURES, r as PHASE_B_PARITY_FEATURES, R as RUN_EVENT_SCHEMA, s as RUN_EVENT_SCHEMA_ID, t as RunState, u as RunStatus, T as TimerState, W as WORKFLOW_COMMAND_SCHEMA, v as WORKFLOW_COMMAND_SCHEMA_ID, w as WORKFLOW_TASK_SCHEMA, x as WORKFLOW_TASK_SCHEMA_ID, y as applyEvent, z as commandFeatures, B as continueAsNewRetryShape, D as createHistoryFile, F as eventsForCommands, G as hasUnprocessedInput, I as initialRunState, J as isActivityOpen, K as isChildOpen, M as isCommandEnabled, N as isReliefCommand, O as isWorkflowCommandEnabled, Q as parseHistoryFile, S as pendingCounts, U as projectRunState, V as serializeHistoryFile, X as taskCompletedEvents, Y as unsupportedMessage, Z as utf8Bytes } from '../file-olQudcx5.js';
5
+ export { A as Activation, s as splitActivations, u as unseenInputs } from '../activation-BnVQMv9y.js';
6
+ import '../types-Bb2wRnJ5.js';
7
7
 
8
8
  type CommandValidation = {
9
9
  ok: true;
@@ -15,10 +15,16 @@ type CommandValidation = {
15
15
  };
16
16
  interface ValidateCommandsOptions {
17
17
  /**
18
- * Which commands are enabled. `core` (default) is the Phase B core set,
19
- * `parity` adds the parity commands. Phase C commands are always refused.
18
+ * Which commands are enabled: a feature set (C-GATE), or the R1 release
19
+ * levels `core` (default, the Phase B core set) and `parity` (adds the
20
+ * parity commands). Phase C commands are always refused.
20
21
  */
21
- enabled?: 'core' | 'parity';
22
+ enabled?: CommandGate;
23
+ /**
24
+ * What the lease already granted. A relief command (see `isReliefCommand`)
25
+ * passes the gate even when its feature is not enabled.
26
+ */
27
+ relief?: CommandRelief;
22
28
  /** Largest batch. Default 1000 (the workers' limit). */
23
29
  maxCommands?: number;
24
30
  }
@@ -89,6 +95,39 @@ type RetryDecision = {
89
95
  declare function computeRetryDelay(policy: RetryPolicy, attempt: number, failure?: Failure): RetryDecision;
90
96
  /** A copy of `policy` with the defaults filled in, as the SDK writes it into a command. */
91
97
  declare function explicitRetryPolicy(policy: Partial<RetryPolicy> | undefined): RetryPolicy;
98
+ /** Why a run is or is not started again under its run-level retry policy (11 §2.17). */
99
+ type RunRetryDecision = {
100
+ retry: true;
101
+ delayMs: number;
102
+ } | {
103
+ retry: false;
104
+ reason: 'noPolicy' | 'nonRetryable' | 'executionTimeout' | 'typeDenied' | 'errorTypeNotListed' | 'maxAttempts';
105
+ };
106
+ /**
107
+ * Whether a DURABLE_FN run whose attempt `attempt` (1-based) just failed, or
108
+ * timed out (`failure.timeoutType` `WORKFLOW_RUN`), is started again, and
109
+ * after how long. An execution timeout (`WORKFLOW_EXECUTION`) bounds the whole
110
+ * chain and is never retried; cancellation and termination never reach this
111
+ * function. The backoff is the activity backoff over the run policy.
112
+ */
113
+ declare function computeRunRetryDelay(policy: RunRetryPolicy | undefined, attempt: number, failure: Failure): RunRetryDecision;
114
+ /** The run retry policy with its defaults (Temporal's: 1 s, x2, at most 100 s, unlimited attempts). */
115
+ declare function explicitRunRetryPolicy(policy: Partial<RunRetryPolicy>): RunRetryPolicy;
116
+
117
+ /**
118
+ * The bucket of a gradual rollout (11 §2.27): automatic starts hash
119
+ * `workflowId ?? runId` into 0-99 and take the rollout's `toVersion` when the
120
+ * bucket is below `percent`. The service's version resolution and the tests
121
+ * share this function, so a fixed key set splits the same way everywhere.
122
+ *
123
+ * Pure JavaScript, no I/O: FNV-1a (32 bit) over the UTF-8 bytes of the key.
124
+ */
125
+ /** FNV-1a, 32 bit, of the UTF-8 bytes of `key`, as an unsigned integer. */
126
+ declare function fnv1a32(key: string): number;
127
+ /** The rollout bucket of a key: `fnv1a32(key) % 100`, an integer in 0-99. */
128
+ declare function rolloutBucket(key: string): number;
129
+ /** True when a start with this key takes the rollout's target version. */
130
+ declare function inRollout(key: string, percent: number): boolean;
92
131
 
93
132
  /**
94
133
  * The activity allow-list (C-ALLOW): which node types `ctx.run` may schedule.
@@ -154,4 +193,4 @@ declare const CHILD_DEFAULT_PARENT_CLOSE_POLICY: Readonly<{
154
193
  */
155
194
  declare const CHILD_DEFAULT_CANCELLATION_TYPE: ChildCancellationType;
156
195
 
157
- export { ACTIVITY_INTERNAL_ALLOWLIST, ACTIVITY_NODE_ALLOWLIST, ACTIVITY_NODE_DENYLIST, ActivityNodeTypeNotAllowedError, CHILD_DEFAULT_CANCELLATION_TYPE, CHILD_DEFAULT_PARENT_CLOSE_POLICY, ChildCancellationType, type CommandValidation, DEFAULT_ACTIVITY_RETRY, Failure, HistoryIssue, ParentClosePolicy, type PayloadValidator, type RetryDecision, RetryPolicy, type ValidateCommandsOptions, WorkflowCommand, WorkflowTaskFailureCause, assertActivityNodeType, codeWorkflowParentClosePolicy, compilePayloadValidator, computeRetryDelay, explicitRetryPolicy, isActivityNodeTypeAllowed, validateCommand, validateCommands, validateHistory, validateHistoryFile };
196
+ export { ACTIVITY_INTERNAL_ALLOWLIST, ACTIVITY_NODE_ALLOWLIST, ACTIVITY_NODE_DENYLIST, ActivityNodeTypeNotAllowedError, CHILD_DEFAULT_CANCELLATION_TYPE, CHILD_DEFAULT_PARENT_CLOSE_POLICY, ChildCancellationType, CommandGate, CommandRelief, type CommandValidation, DEFAULT_ACTIVITY_RETRY, Failure, HistoryIssue, ParentClosePolicy, type PayloadValidator, type RetryDecision, RetryPolicy, type RunRetryDecision, RunRetryPolicy, type ValidateCommandsOptions, WorkflowCommand, WorkflowTaskFailureCause, assertActivityNodeType, codeWorkflowParentClosePolicy, compilePayloadValidator, computeRetryDelay, computeRunRetryDelay, explicitRetryPolicy, explicitRunRetryPolicy, fnv1a32, inRollout, isActivityNodeTypeAllowed, rolloutBucket, validateCommand, validateCommands, validateHistory, validateHistoryFile };
@@ -1,5 +1,50 @@
1
- export { HISTORY_FILE_FORMAT, HISTORY_FILE_SCHEMA, HISTORY_FILE_SCHEMA_ID, HISTORY_SCHEMA_FILES, HistoryFileError, RUN_EVENT_SCHEMA, RUN_EVENT_SCHEMA_ID, WORKFLOW_COMMAND_SCHEMA, WORKFLOW_COMMAND_SCHEMA_ID, WORKFLOW_TASK_SCHEMA, WORKFLOW_TASK_SCHEMA_ID, compilePayloadValidator, createHistoryFile, parseHistoryFile, serializeHistoryFile, validateCommand, validateCommands, validateHistory, validateHistoryFile } from '../chunk-VOKMAAJP.js';
1
+ export { HISTORY_FILE_FORMAT, HISTORY_FILE_SCHEMA, HISTORY_FILE_SCHEMA_ID, HISTORY_SCHEMA_FILES, HistoryFileError, RUN_EVENT_SCHEMA, RUN_EVENT_SCHEMA_ID, WORKFLOW_COMMAND_SCHEMA, WORKFLOW_COMMAND_SCHEMA_ID, WORKFLOW_TASK_SCHEMA, WORKFLOW_TASK_SCHEMA_ID, compilePayloadValidator, createHistoryFile, parseHistoryFile, serializeHistoryFile, validateCommand, validateCommands, validateHistory, validateHistoryFile } from '../chunk-A36CCOWS.js';
2
2
  import '../chunk-PMCM2OH4.js';
3
- export { CHILD_DEFAULT_CANCELLATION_TYPE, CHILD_DEFAULT_PARENT_CLOSE_POLICY, DEFAULT_ACTIVITY_RETRY, HistoryStateError, applyEvent, codeWorkflowParentClosePolicy, computeRetryDelay, eventsForCommands, explicitRetryPolicy, hasUnprocessedInput, initialRunState, isActivityOpen, isChildOpen, isCommandEnabled, isWorkflowCommandEnabled, pendingCounts, projectRunState, splitActivations, taskCompletedEvents, unseenInputs, utf8Bytes } from '../chunk-ABFZWYHT.js';
4
- export { ACTIVITY_CANCELLATION_TYPES, BUILT_IN_QUERIES, CHILD_CANCELLATION_TYPES, COMMAND_EVENTS, COMMAND_EVENT_TYPES, COMMAND_TYPES, CONTINUE_AS_NEW_SUGGESTED_RATIO, DEFAULT_HISTORY_LIMIT, ERROR_TYPES, EVENT_TYPES, EXECUTION_KINDS, HISTORY_LIMIT_EXCEEDED_RATIO, HISTORY_PROTOCOL, INPUT_EVENTS, PARENT_CLOSE_POLICIES, PHASE_B_CORE_COMMANDS, PHASE_B_PARITY_COMMANDS, PHASE_C_COMMANDS, TASK_FAILURE_CAUSES, TERMINAL_COMMANDS, TERMINAL_EVENTS, isCommandEvent, isInputEvent } from '../chunk-DJYMDLV5.js';
5
- export { ACTIVITY_INTERNAL_ALLOWLIST, ACTIVITY_NODE_ALLOWLIST, ACTIVITY_NODE_DENYLIST, ActivityNodeTypeNotAllowedError, assertActivityNodeType, isActivityNodeTypeAllowed } from '../chunk-BO6OVILK.js';
3
+ export { CHILD_DEFAULT_CANCELLATION_TYPE, CHILD_DEFAULT_PARENT_CLOSE_POLICY, COMMAND_FEATURES, CORE_CAN_OPTIONS, CORE_CHILD_OPTIONS, HistoryStateError, PHASE_B_CORE_FEATURES, PHASE_B_PARITY_FEATURES, applyEvent, codeWorkflowParentClosePolicy, commandFeatures, continueAsNewRetryShape, eventsForCommands, hasUnprocessedInput, initialRunState, isActivityOpen, isChildOpen, isCommandEnabled, isReliefCommand, isWorkflowCommandEnabled, pendingCounts, projectRunState, splitActivations, taskCompletedEvents, unseenInputs, unsupportedMessage, utf8Bytes } from '../chunk-FWBRQWRX.js';
4
+ export { ACTIVITY_CANCELLATION_TYPES, ACTIVITY_INTERNAL_ALLOWLIST, ACTIVITY_NODE_ALLOWLIST, ACTIVITY_NODE_DENYLIST, ActivityNodeTypeNotAllowedError, BUILT_IN_QUERIES, CHILD_CANCELLATION_TYPES, COMMAND_EVENTS, COMMAND_EVENT_TYPES, COMMAND_TYPES, CONTINUE_AS_NEW_SUGGESTED_RATIO, DEFAULT_HISTORY_LIMIT, ERROR_TYPES, EVENT_TYPES, EXECUTION_KINDS, HISTORY_LIMIT_EXCEEDED_RATIO, HISTORY_PROTOCOL, INPUT_EVENTS, LOCAL_ACTIVITY_MAX_TIMEOUT_MS, PARENT_CLOSE_POLICIES, PHASE_B_CORE_COMMANDS, PHASE_B_PARITY_COMMANDS, PHASE_C_COMMANDS, RUNTIME_RELEASE, TASK_FAILURE_CAUSES, TERMINAL_COMMANDS, TERMINAL_EVENTS, VERSIONING_BEHAVIORS, WORKFLOW_ID_CONFLICT_POLICIES, WORKFLOW_ID_REUSE_POLICIES, WORKFLOW_TIMEOUT_TYPES, assertActivityNodeType, isActivityNodeTypeAllowed, isCommandEvent, isInputEvent } from '../chunk-2DDULZFM.js';
5
+ export { DEFAULT_ACTIVITY_RETRY, computeRetryDelay, computeRunRetryDelay, explicitRetryPolicy, explicitRunRetryPolicy } from '../chunk-PWIUEWC3.js';
6
+
7
+ // src/history/rollout.ts
8
+ var FNV_OFFSET = 2166136261;
9
+ var FNV_PRIME = 16777619;
10
+ function utf8(key) {
11
+ const bytes = [];
12
+ for (let index = 0; index < key.length; index++) {
13
+ let code = key.charCodeAt(index);
14
+ if (code >= 55296 && code <= 56319) {
15
+ const next = index + 1 < key.length ? key.charCodeAt(index + 1) : 0;
16
+ if (next >= 56320 && next <= 57343) {
17
+ code = 65536 + (code - 55296 << 10) + (next - 56320);
18
+ index++;
19
+ } else code = 65533;
20
+ } else if (code >= 56320 && code <= 57343) code = 65533;
21
+ if (code < 128) bytes.push(code);
22
+ else if (code < 2048) bytes.push(192 | code >> 6, 128 | code & 63);
23
+ else if (code < 65536)
24
+ bytes.push(224 | code >> 12, 128 | code >> 6 & 63, 128 | code & 63);
25
+ else
26
+ bytes.push(
27
+ 240 | code >> 18,
28
+ 128 | code >> 12 & 63,
29
+ 128 | code >> 6 & 63,
30
+ 128 | code & 63
31
+ );
32
+ }
33
+ return bytes;
34
+ }
35
+ function fnv1a32(key) {
36
+ let hash = FNV_OFFSET;
37
+ for (const byte of utf8(key)) {
38
+ hash ^= byte;
39
+ hash = Math.imul(hash, FNV_PRIME) >>> 0;
40
+ }
41
+ return hash >>> 0;
42
+ }
43
+ function rolloutBucket(key) {
44
+ return fnv1a32(key) % 100;
45
+ }
46
+ function inRollout(key, percent) {
47
+ return rolloutBucket(key) < percent;
48
+ }
49
+
50
+ export { fnv1a32, inRollout, rolloutBucket };
package/dist/index.cjs CHANGED
@@ -1,101 +1,102 @@
1
1
  'use strict';
2
2
 
3
- var chunkCBL5JSCC_cjs = require('./chunk-CBL5JSCC.cjs');
4
- var chunk57MSZ24T_cjs = require('./chunk-57MSZ24T.cjs');
3
+ var chunk2B37XAFQ_cjs = require('./chunk-2B37XAFQ.cjs');
4
+ var chunkNXFBVDOI_cjs = require('./chunk-NXFBVDOI.cjs');
5
5
  require('./chunk-G4UEPUGO.cjs');
6
6
  var chunkGVTZMA5C_cjs = require('./chunk-GVTZMA5C.cjs');
7
7
  require('./chunk-TBDXTV22.cjs');
8
8
  require('./chunk-SAENRNBJ.cjs');
9
- var chunkFMSW2HDF_cjs = require('./chunk-FMSW2HDF.cjs');
9
+ var chunkELL2RBML_cjs = require('./chunk-ELL2RBML.cjs');
10
+ var chunkJ3PYFGKA_cjs = require('./chunk-J3PYFGKA.cjs');
10
11
  require('./chunk-FR7KYWRO.cjs');
11
- var chunkFQIHX7YI_cjs = require('./chunk-FQIHX7YI.cjs');
12
+ require('./chunk-YHBVMOMK.cjs');
12
13
  require('./chunk-Z2Y65YOY.cjs');
13
14
 
14
15
 
15
16
 
16
17
  Object.defineProperty(exports, "COLLECTION_FORMAT", {
17
18
  enumerable: true,
18
- get: function () { return chunkCBL5JSCC_cjs.COLLECTION_FORMAT; }
19
+ get: function () { return chunk2B37XAFQ_cjs.COLLECTION_FORMAT; }
19
20
  });
20
21
  Object.defineProperty(exports, "collectWorkflowExports", {
21
22
  enumerable: true,
22
- get: function () { return chunkCBL5JSCC_cjs.collectWorkflowExports; }
23
+ get: function () { return chunk2B37XAFQ_cjs.collectWorkflowExports; }
23
24
  });
24
25
  Object.defineProperty(exports, "LAYOUT_FORMAT", {
25
26
  enumerable: true,
26
- get: function () { return chunk57MSZ24T_cjs.LAYOUT_FORMAT; }
27
+ get: function () { return chunkNXFBVDOI_cjs.LAYOUT_FORMAT; }
27
28
  });
28
29
  Object.defineProperty(exports, "LAYOUT_FORMAT_VERSION", {
29
30
  enumerable: true,
30
- get: function () { return chunk57MSZ24T_cjs.LAYOUT_FORMAT_VERSION; }
31
+ get: function () { return chunkNXFBVDOI_cjs.LAYOUT_FORMAT_VERSION; }
31
32
  });
32
33
  Object.defineProperty(exports, "RECORDING_FORMAT", {
33
34
  enumerable: true,
34
- get: function () { return chunk57MSZ24T_cjs.RECORDING_FORMAT; }
35
+ get: function () { return chunkNXFBVDOI_cjs.RECORDING_FORMAT; }
35
36
  });
36
37
  Object.defineProperty(exports, "RECORDING_FORMAT_VERSION", {
37
38
  enumerable: true,
38
- get: function () { return chunk57MSZ24T_cjs.RECORDING_FORMAT_VERSION; }
39
+ get: function () { return chunkNXFBVDOI_cjs.RECORDING_FORMAT_VERSION; }
39
40
  });
40
41
  Object.defineProperty(exports, "UnresolvedConnectionsError", {
41
42
  enumerable: true,
42
- get: function () { return chunk57MSZ24T_cjs.UnresolvedConnectionsError; }
43
+ get: function () { return chunkNXFBVDOI_cjs.UnresolvedConnectionsError; }
43
44
  });
44
45
  Object.defineProperty(exports, "WorkflowBuilder", {
45
46
  enumerable: true,
46
- get: function () { return chunk57MSZ24T_cjs.WorkflowBuilder; }
47
+ get: function () { return chunkNXFBVDOI_cjs.WorkflowBuilder; }
47
48
  });
48
49
  Object.defineProperty(exports, "assembleRecording", {
49
50
  enumerable: true,
50
- get: function () { return chunk57MSZ24T_cjs.assembleRecording; }
51
+ get: function () { return chunkNXFBVDOI_cjs.assembleRecording; }
51
52
  });
52
53
  Object.defineProperty(exports, "defaultEdgeId", {
53
54
  enumerable: true,
54
- get: function () { return chunk57MSZ24T_cjs.defaultEdgeId; }
55
+ get: function () { return chunkNXFBVDOI_cjs.defaultEdgeId; }
55
56
  });
56
57
  Object.defineProperty(exports, "defineWorkflow", {
57
58
  enumerable: true,
58
- get: function () { return chunk57MSZ24T_cjs.defineWorkflow; }
59
+ get: function () { return chunkNXFBVDOI_cjs.defineWorkflow; }
59
60
  });
60
61
  Object.defineProperty(exports, "edge", {
61
62
  enumerable: true,
62
- get: function () { return chunk57MSZ24T_cjs.edge; }
63
+ get: function () { return chunkNXFBVDOI_cjs.edge; }
63
64
  });
64
65
  Object.defineProperty(exports, "internalNodes", {
65
66
  enumerable: true,
66
- get: function () { return chunk57MSZ24T_cjs.internalNodes; }
67
+ get: function () { return chunkNXFBVDOI_cjs.internalNodes; }
67
68
  });
68
69
  Object.defineProperty(exports, "isOperation", {
69
70
  enumerable: true,
70
- get: function () { return chunk57MSZ24T_cjs.isOperation; }
71
+ get: function () { return chunkNXFBVDOI_cjs.isOperation; }
71
72
  });
72
73
  Object.defineProperty(exports, "isTier1Workflow", {
73
74
  enumerable: true,
74
- get: function () { return chunk57MSZ24T_cjs.isTier1Workflow; }
75
+ get: function () { return chunkNXFBVDOI_cjs.isTier1Workflow; }
75
76
  });
76
77
  Object.defineProperty(exports, "nodes", {
77
78
  enumerable: true,
78
- get: function () { return chunk57MSZ24T_cjs.nodes; }
79
+ get: function () { return chunkNXFBVDOI_cjs.nodes; }
79
80
  });
80
81
  Object.defineProperty(exports, "op", {
81
82
  enumerable: true,
82
- get: function () { return chunk57MSZ24T_cjs.op; }
83
+ get: function () { return chunkNXFBVDOI_cjs.op; }
83
84
  });
84
85
  Object.defineProperty(exports, "parseLayoutSidecar", {
85
86
  enumerable: true,
86
- get: function () { return chunk57MSZ24T_cjs.parseLayoutSidecar; }
87
+ get: function () { return chunkNXFBVDOI_cjs.parseLayoutSidecar; }
87
88
  });
88
89
  Object.defineProperty(exports, "toIR", {
89
90
  enumerable: true,
90
- get: function () { return chunk57MSZ24T_cjs.toIR; }
91
+ get: function () { return chunkNXFBVDOI_cjs.toIR; }
91
92
  });
92
93
  Object.defineProperty(exports, "trigger", {
93
94
  enumerable: true,
94
- get: function () { return chunk57MSZ24T_cjs.trigger; }
95
+ get: function () { return chunkNXFBVDOI_cjs.trigger; }
95
96
  });
96
97
  Object.defineProperty(exports, "triggers", {
97
98
  enumerable: true,
98
- get: function () { return chunk57MSZ24T_cjs.triggers; }
99
+ get: function () { return chunkNXFBVDOI_cjs.triggers; }
99
100
  });
100
101
  Object.defineProperty(exports, "BuilderError", {
101
102
  enumerable: true,
@@ -119,97 +120,109 @@ Object.defineProperty(exports, "or", {
119
120
  });
120
121
  Object.defineProperty(exports, "ActivityFailure", {
121
122
  enumerable: true,
122
- get: function () { return chunkFMSW2HDF_cjs.ActivityFailure; }
123
+ get: function () { return chunkELL2RBML_cjs.ActivityFailure; }
123
124
  });
124
125
  Object.defineProperty(exports, "ApplicationError", {
125
126
  enumerable: true,
126
- get: function () { return chunkFMSW2HDF_cjs.ApplicationError; }
127
+ get: function () { return chunkELL2RBML_cjs.ApplicationError; }
127
128
  });
128
129
  Object.defineProperty(exports, "CancelledFailure", {
129
130
  enumerable: true,
130
- get: function () { return chunkFMSW2HDF_cjs.CancelledFailure; }
131
+ get: function () { return chunkELL2RBML_cjs.CancelledFailure; }
131
132
  });
132
133
  Object.defineProperty(exports, "ChildRunFailure", {
133
134
  enumerable: true,
134
- get: function () { return chunkFMSW2HDF_cjs.ChildRunFailure; }
135
+ get: function () { return chunkELL2RBML_cjs.ChildRunFailure; }
135
136
  });
136
137
  Object.defineProperty(exports, "DeterminismViolation", {
137
138
  enumerable: true,
138
- get: function () { return chunkFMSW2HDF_cjs.DeterminismViolation; }
139
+ get: function () { return chunkELL2RBML_cjs.DeterminismViolation; }
139
140
  });
140
141
  Object.defineProperty(exports, "HistoryLimitExceeded", {
141
142
  enumerable: true,
142
- get: function () { return chunkFMSW2HDF_cjs.HistoryLimitExceeded; }
143
+ get: function () { return chunkELL2RBML_cjs.HistoryLimitExceeded; }
143
144
  });
144
145
  Object.defineProperty(exports, "PhaseCFeatureError", {
145
146
  enumerable: true,
146
- get: function () { return chunkFMSW2HDF_cjs.PhaseCFeatureError; }
147
+ get: function () { return chunkELL2RBML_cjs.PhaseCFeatureError; }
147
148
  });
148
149
  Object.defineProperty(exports, "ServerFailure", {
149
150
  enumerable: true,
150
- get: function () { return chunkFMSW2HDF_cjs.ServerFailure; }
151
+ get: function () { return chunkELL2RBML_cjs.ServerFailure; }
151
152
  });
152
153
  Object.defineProperty(exports, "TerminatedFailure", {
153
154
  enumerable: true,
154
- get: function () { return chunkFMSW2HDF_cjs.TerminatedFailure; }
155
+ get: function () { return chunkELL2RBML_cjs.TerminatedFailure; }
155
156
  });
156
157
  Object.defineProperty(exports, "TimeoutFailure", {
157
158
  enumerable: true,
158
- get: function () { return chunkFMSW2HDF_cjs.TimeoutFailure; }
159
+ get: function () { return chunkELL2RBML_cjs.TimeoutFailure; }
159
160
  });
160
161
  Object.defineProperty(exports, "WorkflowFailure", {
161
162
  enumerable: true,
162
- get: function () { return chunkFMSW2HDF_cjs.WorkflowFailure; }
163
+ get: function () { return chunkELL2RBML_cjs.WorkflowFailure; }
163
164
  });
164
165
  Object.defineProperty(exports, "defineQuery", {
165
166
  enumerable: true,
166
- get: function () { return chunkFMSW2HDF_cjs.defineQuery; }
167
+ get: function () { return chunkELL2RBML_cjs.defineQuery; }
167
168
  });
168
169
  Object.defineProperty(exports, "defineSignal", {
169
170
  enumerable: true,
170
- get: function () { return chunkFMSW2HDF_cjs.defineSignal; }
171
+ get: function () { return chunkELL2RBML_cjs.defineSignal; }
171
172
  });
172
173
  Object.defineProperty(exports, "defineUpdate", {
173
174
  enumerable: true,
174
- get: function () { return chunkFMSW2HDF_cjs.defineUpdate; }
175
+ get: function () { return chunkELL2RBML_cjs.defineUpdate; }
175
176
  });
176
177
  Object.defineProperty(exports, "errorToFailure", {
177
178
  enumerable: true,
178
- get: function () { return chunkFMSW2HDF_cjs.errorToFailure; }
179
+ get: function () { return chunkELL2RBML_cjs.errorToFailure; }
179
180
  });
180
181
  Object.defineProperty(exports, "failureToError", {
181
182
  enumerable: true,
182
- get: function () { return chunkFMSW2HDF_cjs.failureToError; }
183
+ get: function () { return chunkELL2RBML_cjs.failureToError; }
183
184
  });
184
185
  Object.defineProperty(exports, "isCancellation", {
185
186
  enumerable: true,
186
- get: function () { return chunkFMSW2HDF_cjs.isCancellation; }
187
+ get: function () { return chunkELL2RBML_cjs.isCancellation; }
187
188
  });
188
- Object.defineProperty(exports, "toMs", {
189
+ Object.defineProperty(exports, "DURABLE_MARKER", {
189
190
  enumerable: true,
190
- get: function () { return chunkFMSW2HDF_cjs.toMs; }
191
+ get: function () { return chunkJ3PYFGKA_cjs.DURABLE_MARKER; }
191
192
  });
192
- Object.defineProperty(exports, "DURABLE_MARKER", {
193
+ Object.defineProperty(exports, "MAX_WORKFLOW_TASK_TIMEOUT_MS", {
193
194
  enumerable: true,
194
- get: function () { return chunkFQIHX7YI_cjs.DURABLE_MARKER; }
195
+ get: function () { return chunkJ3PYFGKA_cjs.MAX_WORKFLOW_TASK_TIMEOUT_MS; }
195
196
  });
196
197
  Object.defineProperty(exports, "SDK_VERSION", {
197
198
  enumerable: true,
198
- get: function () { return chunkFQIHX7YI_cjs.SDK_VERSION; }
199
+ get: function () { return chunkJ3PYFGKA_cjs.SDK_VERSION; }
200
+ });
201
+ Object.defineProperty(exports, "continueAsNewRetryOf", {
202
+ enumerable: true,
203
+ get: function () { return chunkJ3PYFGKA_cjs.continueAsNewRetryOf; }
199
204
  });
200
205
  Object.defineProperty(exports, "interfaceOf", {
201
206
  enumerable: true,
202
- get: function () { return chunkFQIHX7YI_cjs.interfaceOf; }
207
+ get: function () { return chunkJ3PYFGKA_cjs.interfaceOf; }
203
208
  });
204
209
  Object.defineProperty(exports, "isDurableWorkflow", {
205
210
  enumerable: true,
206
- get: function () { return chunkFQIHX7YI_cjs.isDurableWorkflow; }
211
+ get: function () { return chunkJ3PYFGKA_cjs.isDurableWorkflow; }
207
212
  });
208
213
  Object.defineProperty(exports, "jsonSchemaOf", {
209
214
  enumerable: true,
210
- get: function () { return chunkFQIHX7YI_cjs.jsonSchemaOf; }
215
+ get: function () { return chunkJ3PYFGKA_cjs.jsonSchemaOf; }
216
+ });
217
+ Object.defineProperty(exports, "runRetryPolicyOf", {
218
+ enumerable: true,
219
+ get: function () { return chunkJ3PYFGKA_cjs.runRetryPolicyOf; }
220
+ });
221
+ Object.defineProperty(exports, "toMs", {
222
+ enumerable: true,
223
+ get: function () { return chunkJ3PYFGKA_cjs.toMs; }
211
224
  });
212
225
  Object.defineProperty(exports, "workflow", {
213
226
  enumerable: true,
214
- get: function () { return chunkFQIHX7YI_cjs.workflow; }
227
+ get: function () { return chunkJ3PYFGKA_cjs.workflow; }
215
228
  });
package/dist/index.d.cts CHANGED
@@ -1,54 +1,10 @@
1
- import { T as Tier1Recording } from './workflow-FXUkpIBc.cjs';
2
- export { A as AfterInput, a as AnyRef, b as ApprovalRef, c as ArgValue, d as ArgsOf, B as BuilderError, C as CodeWorkflowOptions, e as CompareRef, f as ConditionGroup, g as ConditionRule, D as DurableRef, E as EdgeOptions, h as EdgeSource, i as EdgeSpec, H as HandleRef, I as IfOptions, j as IfRef, L as LoopOptions, k as LoopRef, M as MergeOptions, N as NodeOptions, l as NodeRef, m as NoteOptions, O as OnErrorOption, n as OutputRef, P as PREDICATE_OPERATORS, o as Predicate, p as PredicateMethods, R as RECORDING_FORMAT, q as RECORDING_FORMAT_VERSION, r as RecordedNode, s as RecordedNote, t as RuleValue, S as SignalWaitRef, u as SubworkflowOptions, v as SwitchOptions, w as SwitchRef, x as Tier1Workflow, V as ValidateRef, W as WaitForSignalOptions, y as WorkflowBuilder, z as WorkflowOptions, F as and, G as defaultEdgeId, J as defineWorkflow, K as edge, Q as expr, U as isTier1Workflow, X as or } from './workflow-FXUkpIBc.cjs';
3
- export { C as CancellationScope, a as CancellationScopeFunction, b as CancellationScopeOptions, c as ChildHandle, d as ChildOptions, e as ChildTarget, f as ContinueAsNewOptions, D as DURABLE_MARKER, g as DefinitionOptions, h as DurableWorkflow, i as DurableWorkflowOptions, j as Duration, E as ExternalRunHandle, F as FileRef, O as Operation, Q as QueryDefinition, R as RunOptions, S as Saga, k as SchemaLike, l as SignalDefinition, T as TriggerOperation, m as TriggerSpec, U as UpdateDefinition, W as WorkflowContext, n as WorkflowInfo, o as WorkflowLogger, p as defineQuery, q as defineSignal, r as defineUpdate, s as interfaceOf, t as internalNodes, u as isDurableWorkflow, v as isOperation, w as jsonSchemaOf, x as nodes, y as op, z as toMs, A as trigger, B as triggers, G as workflow } from './workflow-J-yYixny.cjs';
4
- export { A as AssembleOptions, C as ConnectionResolver, L as LAYOUT_FORMAT, a as LAYOUT_FORMAT_VERSION, b as LayoutSidecar, U as UnresolvedConnectionsError, c as assembleRecording, p as parseLayoutSidecar, t as toIR } from './assemble-BLqQ8lSu.cjs';
5
- import { W as WorkflowInterface, J as JsonObject, E as ErrorType, a as Json } from './types-BGoPzgcl.cjs';
6
- export { b as WorkflowDefinition } from './types-BGoPzgcl.cjs';
7
- import { F as Failure } from './types-CpBBjaGX.cjs';
8
- export { P as ParentClosePolicy, R as RetryPolicy } from './types-CpBBjaGX.cjs';
9
-
10
- /**
11
- * Runs inside the evaluation isolate at the end of a bundle: gathers the
12
- * recordings of every exported `defineWorkflow` value and the declarations of
13
- * every exported tier-2 `workflow()` as one JSON string, the only thing that
14
- * leaves the isolate.
15
- */
16
-
17
- declare const COLLECTION_FORMAT = "fluidgrids.tier1-collection";
18
- interface CollectedWorkflow {
19
- module: string;
20
- exportName: string;
21
- recording: Tier1Recording;
22
- }
23
- /** The trigger a standalone tier-2 workflow declares. */
24
- interface CollectedTrigger {
25
- nodeType: string;
26
- version?: string;
27
- operation?: string;
28
- args?: JsonObject;
29
- id?: string;
30
- }
31
- /** One exported tier-2 workflow (C-ABI `durable` entries of the collection). */
32
- interface CollectedDurableWorkflow {
33
- module: string;
34
- exportName: string;
35
- /** The workflow key it gets when standalone. */
36
- name: string;
37
- title?: string;
38
- description?: string;
39
- taskQueue: string;
40
- interface: WorkflowInterface;
41
- standalone?: boolean;
42
- trigger?: CollectedTrigger;
43
- }
44
- interface Tier1Collection {
45
- format: typeof COLLECTION_FORMAT;
46
- workflows: CollectedWorkflow[];
47
- /** Tier-2 functions; absent when the bundle has none. */
48
- durable?: CollectedDurableWorkflow[];
49
- }
50
- /** Collect the workflows exported by each module, as JSON. */
51
- declare function collectWorkflowExports(modules: ReadonlyArray<readonly [string, Record<string, unknown>]>): string;
1
+ export { A as AfterInput, a as AnyRef, b as ApprovalRef, c as ArgValue, d as ArgsOf, B as BuilderError, C as CodeWorkflowOptions, e as CompareRef, f as ConditionGroup, g as ConditionRule, D as DurableRef, E as EdgeOptions, h as EdgeSource, i as EdgeSpec, H as HandleRef, I as IfOptions, j as IfRef, L as LoopOptions, k as LoopRef, M as MergeOptions, N as NodeOptions, l as NodeRef, m as NoteOptions, O as OnErrorOption, n as OutputRef, P as PREDICATE_OPERATORS, o as Predicate, p as PredicateMethods, R as RECORDING_FORMAT, q as RECORDING_FORMAT_VERSION, r as RecordedNode, s as RecordedNote, t as RuleValue, S as SignalWaitRef, u as SubworkflowOptions, v as SwitchOptions, w as SwitchRef, T as Tier1Recording, x as Tier1Workflow, V as ValidateRef, W as WaitForSignalOptions, y as WorkflowBuilder, z as WorkflowOptions, F as and, G as defaultEdgeId, J as defineWorkflow, K as edge, Q as expr, U as isTier1Workflow, X as or } from './workflow-CZOXUlQ5.cjs';
2
+ export { C as CancellationScope, a as CancellationScopeFunction, b as CancellationScopeOptions, c as ChildHandle, d as ChildOptions, e as ChildTarget, f as ContinueAsNewOptions, D as DURABLE_MARKER, g as DefinitionOptions, h as DurableWorkflow, i as DurableWorkflowOptions, j as Duration, E as ExternalRunHandle, k as ExternalRunTarget, F as FileRef, H as HandlerUnfinishedPolicy, L as LegacyContinueAsNewRetry, l as LocalActivityOptions, M as MAX_WORKFLOW_TASK_TIMEOUT_MS, O as Operation, Q as QueryDefinition, R as RunOptions, S as Saga, m as SchemaLike, n as SignalDefinition, o as SignalHandlerOptions, T as TriggerOperation, p as TriggerSpec, U as UpdateDefinition, W as WorkflowContext, q as WorkflowIdTarget, r as WorkflowInfo, s as WorkflowLogger, t as WorkflowRetryOptions, u as continueAsNewRetryOf, v as defineQuery, w as defineSignal, x as defineUpdate, y as interfaceOf, z as internalNodes, A as isDurableWorkflow, B as isOperation, G as jsonSchemaOf, I as nodes, J as op, K as runRetryPolicyOf, N as toMs, P as trigger, V as triggers, X as workflow } from './workflow-O6e64ZcG.cjs';
3
+ export { A as AssembleOptions, C as COLLECTION_FORMAT, a as CollectedDurableWorkflow, b as CollectedTrigger, c as CollectedWorkflow, d as ConnectionResolver, L as LAYOUT_FORMAT, e as LAYOUT_FORMAT_VERSION, f as LayoutSidecar, T as Tier1Collection, U as UnresolvedConnectionsError, g as assembleRecording, h as collectWorkflowExports, p as parseLayoutSidecar, t as toIR } from './collect-CSyOg5XC.cjs';
4
+ import { E as ErrorType, J as Json } from './types-Bb2wRnJ5.cjs';
5
+ export { a as JsonObject, W as WorkflowDefinition } from './types-Bb2wRnJ5.cjs';
6
+ import { F as Failure } from './types-CQKOhPTa.cjs';
7
+ export { P as ParentClosePolicy, R as RetryPolicy, b as RunRetryPolicy, ac as VersioningBehavior, ag as WorkflowIdConflictPolicy, ah as WorkflowIdReusePolicy } from './types-CQKOhPTa.cjs';
52
8
 
53
9
  /**
54
10
  * Failure classes of tier-2 workflow code (spec 02 §4, 11 §2.25).
@@ -150,6 +106,6 @@ declare function errorToFailure(error: unknown, source?: string, depth?: number)
150
106
  declare function failureToError(failure: Failure, depth?: number): WorkflowFailure;
151
107
 
152
108
  /** The version of @fluidgrids/workflows. */
153
- declare const SDK_VERSION = "2026.1028.1";
109
+ declare const SDK_VERSION = "2026.1029.1";
154
110
 
155
- export { ActivityFailure, ApplicationError, type ApplicationErrorOptions, COLLECTION_FORMAT, CancelledFailure, ChildRunFailure, type CollectedDurableWorkflow, type CollectedTrigger, type CollectedWorkflow, DeterminismViolation, Failure, HistoryLimitExceeded, Json, JsonObject, PhaseCFeatureError, SDK_VERSION, ServerFailure, TerminatedFailure, type Tier1Collection, Tier1Recording, TimeoutFailure, WorkflowFailure, collectWorkflowExports, errorToFailure, failureToError, isCancellation };
111
+ export { ActivityFailure, ApplicationError, type ApplicationErrorOptions, CancelledFailure, ChildRunFailure, DeterminismViolation, Failure, HistoryLimitExceeded, Json, PhaseCFeatureError, SDK_VERSION, ServerFailure, TerminatedFailure, TimeoutFailure, WorkflowFailure, errorToFailure, failureToError, isCancellation };
package/dist/index.d.ts CHANGED
@@ -1,54 +1,10 @@
1
- import { T as Tier1Recording } from './workflow-Bpr3vnA_.js';
2
- export { A as AfterInput, a as AnyRef, b as ApprovalRef, c as ArgValue, d as ArgsOf, B as BuilderError, C as CodeWorkflowOptions, e as CompareRef, f as ConditionGroup, g as ConditionRule, D as DurableRef, E as EdgeOptions, h as EdgeSource, i as EdgeSpec, H as HandleRef, I as IfOptions, j as IfRef, L as LoopOptions, k as LoopRef, M as MergeOptions, N as NodeOptions, l as NodeRef, m as NoteOptions, O as OnErrorOption, n as OutputRef, P as PREDICATE_OPERATORS, o as Predicate, p as PredicateMethods, R as RECORDING_FORMAT, q as RECORDING_FORMAT_VERSION, r as RecordedNode, s as RecordedNote, t as RuleValue, S as SignalWaitRef, u as SubworkflowOptions, v as SwitchOptions, w as SwitchRef, x as Tier1Workflow, V as ValidateRef, W as WaitForSignalOptions, y as WorkflowBuilder, z as WorkflowOptions, F as and, G as defaultEdgeId, J as defineWorkflow, K as edge, Q as expr, U as isTier1Workflow, X as or } from './workflow-Bpr3vnA_.js';
3
- export { C as CancellationScope, a as CancellationScopeFunction, b as CancellationScopeOptions, c as ChildHandle, d as ChildOptions, e as ChildTarget, f as ContinueAsNewOptions, D as DURABLE_MARKER, g as DefinitionOptions, h as DurableWorkflow, i as DurableWorkflowOptions, j as Duration, E as ExternalRunHandle, F as FileRef, O as Operation, Q as QueryDefinition, R as RunOptions, S as Saga, k as SchemaLike, l as SignalDefinition, T as TriggerOperation, m as TriggerSpec, U as UpdateDefinition, W as WorkflowContext, n as WorkflowInfo, o as WorkflowLogger, p as defineQuery, q as defineSignal, r as defineUpdate, s as interfaceOf, t as internalNodes, u as isDurableWorkflow, v as isOperation, w as jsonSchemaOf, x as nodes, y as op, z as toMs, A as trigger, B as triggers, G as workflow } from './workflow-C2a05WUJ.js';
4
- export { A as AssembleOptions, C as ConnectionResolver, L as LAYOUT_FORMAT, a as LAYOUT_FORMAT_VERSION, b as LayoutSidecar, U as UnresolvedConnectionsError, c as assembleRecording, p as parseLayoutSidecar, t as toIR } from './assemble-DWgaXHd-.js';
5
- import { W as WorkflowInterface, J as JsonObject, E as ErrorType, a as Json } from './types-BGoPzgcl.js';
6
- export { b as WorkflowDefinition } from './types-BGoPzgcl.js';
7
- import { F as Failure } from './types-DV-HX_Gt.js';
8
- export { P as ParentClosePolicy, R as RetryPolicy } from './types-DV-HX_Gt.js';
9
-
10
- /**
11
- * Runs inside the evaluation isolate at the end of a bundle: gathers the
12
- * recordings of every exported `defineWorkflow` value and the declarations of
13
- * every exported tier-2 `workflow()` as one JSON string, the only thing that
14
- * leaves the isolate.
15
- */
16
-
17
- declare const COLLECTION_FORMAT = "fluidgrids.tier1-collection";
18
- interface CollectedWorkflow {
19
- module: string;
20
- exportName: string;
21
- recording: Tier1Recording;
22
- }
23
- /** The trigger a standalone tier-2 workflow declares. */
24
- interface CollectedTrigger {
25
- nodeType: string;
26
- version?: string;
27
- operation?: string;
28
- args?: JsonObject;
29
- id?: string;
30
- }
31
- /** One exported tier-2 workflow (C-ABI `durable` entries of the collection). */
32
- interface CollectedDurableWorkflow {
33
- module: string;
34
- exportName: string;
35
- /** The workflow key it gets when standalone. */
36
- name: string;
37
- title?: string;
38
- description?: string;
39
- taskQueue: string;
40
- interface: WorkflowInterface;
41
- standalone?: boolean;
42
- trigger?: CollectedTrigger;
43
- }
44
- interface Tier1Collection {
45
- format: typeof COLLECTION_FORMAT;
46
- workflows: CollectedWorkflow[];
47
- /** Tier-2 functions; absent when the bundle has none. */
48
- durable?: CollectedDurableWorkflow[];
49
- }
50
- /** Collect the workflows exported by each module, as JSON. */
51
- declare function collectWorkflowExports(modules: ReadonlyArray<readonly [string, Record<string, unknown>]>): string;
1
+ export { A as AfterInput, a as AnyRef, b as ApprovalRef, c as ArgValue, d as ArgsOf, B as BuilderError, C as CodeWorkflowOptions, e as CompareRef, f as ConditionGroup, g as ConditionRule, D as DurableRef, E as EdgeOptions, h as EdgeSource, i as EdgeSpec, H as HandleRef, I as IfOptions, j as IfRef, L as LoopOptions, k as LoopRef, M as MergeOptions, N as NodeOptions, l as NodeRef, m as NoteOptions, O as OnErrorOption, n as OutputRef, P as PREDICATE_OPERATORS, o as Predicate, p as PredicateMethods, R as RECORDING_FORMAT, q as RECORDING_FORMAT_VERSION, r as RecordedNode, s as RecordedNote, t as RuleValue, S as SignalWaitRef, u as SubworkflowOptions, v as SwitchOptions, w as SwitchRef, T as Tier1Recording, x as Tier1Workflow, V as ValidateRef, W as WaitForSignalOptions, y as WorkflowBuilder, z as WorkflowOptions, F as and, G as defaultEdgeId, J as defineWorkflow, K as edge, Q as expr, U as isTier1Workflow, X as or } from './workflow-8uRU9rhL.js';
2
+ export { C as CancellationScope, a as CancellationScopeFunction, b as CancellationScopeOptions, c as ChildHandle, d as ChildOptions, e as ChildTarget, f as ContinueAsNewOptions, D as DURABLE_MARKER, g as DefinitionOptions, h as DurableWorkflow, i as DurableWorkflowOptions, j as Duration, E as ExternalRunHandle, k as ExternalRunTarget, F as FileRef, H as HandlerUnfinishedPolicy, L as LegacyContinueAsNewRetry, l as LocalActivityOptions, M as MAX_WORKFLOW_TASK_TIMEOUT_MS, O as Operation, Q as QueryDefinition, R as RunOptions, S as Saga, m as SchemaLike, n as SignalDefinition, o as SignalHandlerOptions, T as TriggerOperation, p as TriggerSpec, U as UpdateDefinition, W as WorkflowContext, q as WorkflowIdTarget, r as WorkflowInfo, s as WorkflowLogger, t as WorkflowRetryOptions, u as continueAsNewRetryOf, v as defineQuery, w as defineSignal, x as defineUpdate, y as interfaceOf, z as internalNodes, A as isDurableWorkflow, B as isOperation, G as jsonSchemaOf, I as nodes, J as op, K as runRetryPolicyOf, N as toMs, P as trigger, V as triggers, X as workflow } from './workflow-DWTPHFbt.js';
3
+ export { A as AssembleOptions, C as COLLECTION_FORMAT, a as CollectedDurableWorkflow, b as CollectedTrigger, c as CollectedWorkflow, d as ConnectionResolver, L as LAYOUT_FORMAT, e as LAYOUT_FORMAT_VERSION, f as LayoutSidecar, T as Tier1Collection, U as UnresolvedConnectionsError, g as assembleRecording, h as collectWorkflowExports, p as parseLayoutSidecar, t as toIR } from './collect-BTHjQaSp.js';
4
+ import { E as ErrorType, J as Json } from './types-Bb2wRnJ5.js';
5
+ export { a as JsonObject, W as WorkflowDefinition } from './types-Bb2wRnJ5.js';
6
+ import { F as Failure } from './types-CnIOinoz.js';
7
+ export { P as ParentClosePolicy, R as RetryPolicy, b as RunRetryPolicy, ac as VersioningBehavior, ag as WorkflowIdConflictPolicy, ah as WorkflowIdReusePolicy } from './types-CnIOinoz.js';
52
8
 
53
9
  /**
54
10
  * Failure classes of tier-2 workflow code (spec 02 §4, 11 §2.25).
@@ -150,6 +106,6 @@ declare function errorToFailure(error: unknown, source?: string, depth?: number)
150
106
  declare function failureToError(failure: Failure, depth?: number): WorkflowFailure;
151
107
 
152
108
  /** The version of @fluidgrids/workflows. */
153
- declare const SDK_VERSION = "2026.1028.1";
109
+ declare const SDK_VERSION = "2026.1029.1";
154
110
 
155
- export { ActivityFailure, ApplicationError, type ApplicationErrorOptions, COLLECTION_FORMAT, CancelledFailure, ChildRunFailure, type CollectedDurableWorkflow, type CollectedTrigger, type CollectedWorkflow, DeterminismViolation, Failure, HistoryLimitExceeded, Json, JsonObject, PhaseCFeatureError, SDK_VERSION, ServerFailure, TerminatedFailure, type Tier1Collection, Tier1Recording, TimeoutFailure, WorkflowFailure, collectWorkflowExports, errorToFailure, failureToError, isCancellation };
111
+ export { ActivityFailure, ApplicationError, type ApplicationErrorOptions, CancelledFailure, ChildRunFailure, DeterminismViolation, Failure, HistoryLimitExceeded, Json, PhaseCFeatureError, SDK_VERSION, ServerFailure, TerminatedFailure, TimeoutFailure, WorkflowFailure, errorToFailure, failureToError, isCancellation };
package/dist/index.js CHANGED
@@ -1,9 +1,10 @@
1
- export { COLLECTION_FORMAT, collectWorkflowExports } from './chunk-PDHLTDZB.js';
2
- export { LAYOUT_FORMAT, LAYOUT_FORMAT_VERSION, RECORDING_FORMAT, RECORDING_FORMAT_VERSION, UnresolvedConnectionsError, WorkflowBuilder, assembleRecording, defaultEdgeId, defineWorkflow, edge, internalNodes, isOperation, isTier1Workflow, nodes, op, parseLayoutSidecar, toIR, trigger, triggers } from './chunk-5HDSBTBX.js';
1
+ export { COLLECTION_FORMAT, collectWorkflowExports } from './chunk-OIX4O6UR.js';
2
+ export { LAYOUT_FORMAT, LAYOUT_FORMAT_VERSION, RECORDING_FORMAT, RECORDING_FORMAT_VERSION, UnresolvedConnectionsError, WorkflowBuilder, assembleRecording, defaultEdgeId, defineWorkflow, edge, internalNodes, isOperation, isTier1Workflow, nodes, op, parseLayoutSidecar, toIR, trigger, triggers } from './chunk-FQSJI5NV.js';
3
3
  import './chunk-5LUIDMF4.js';
4
4
  export { BuilderError, PREDICATE_OPERATORS, and, expr, or } from './chunk-JZ4TOOLN.js';
5
5
  import './chunk-7AAZGVKD.js';
6
6
  import './chunk-PMCM2OH4.js';
7
- export { ActivityFailure, ApplicationError, CancelledFailure, ChildRunFailure, DeterminismViolation, HistoryLimitExceeded, PhaseCFeatureError, ServerFailure, TerminatedFailure, TimeoutFailure, WorkflowFailure, defineQuery, defineSignal, defineUpdate, errorToFailure, failureToError, isCancellation, toMs } from './chunk-C5OLWZ42.js';
7
+ export { ActivityFailure, ApplicationError, CancelledFailure, ChildRunFailure, DeterminismViolation, HistoryLimitExceeded, PhaseCFeatureError, ServerFailure, TerminatedFailure, TimeoutFailure, WorkflowFailure, defineQuery, defineSignal, defineUpdate, errorToFailure, failureToError, isCancellation } from './chunk-KXJDRQ6G.js';
8
+ export { DURABLE_MARKER, MAX_WORKFLOW_TASK_TIMEOUT_MS, SDK_VERSION, continueAsNewRetryOf, interfaceOf, isDurableWorkflow, jsonSchemaOf, runRetryPolicyOf, toMs, workflow } from './chunk-7ILGCUI6.js';
8
9
  import './chunk-LNUQE6D6.js';
9
- export { DURABLE_MARKER, SDK_VERSION, interfaceOf, isDurableWorkflow, jsonSchemaOf, workflow } from './chunk-7NQ37GZU.js';
10
+ import './chunk-PWIUEWC3.js';