@fluidgrids/workflows 2026.1027.0 → 2026.1028.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 (168) hide show
  1. package/README.md +170 -18
  2. package/dist/activation-BBh1p82z.d.cts +57 -0
  3. package/dist/activation-DnhG7SmF.d.ts +57 -0
  4. package/dist/assemble-BLqQ8lSu.d.cts +39 -0
  5. package/dist/assemble-DWgaXHd-.d.ts +39 -0
  6. package/dist/chunk-2DP2Y6EU.cjs +832 -0
  7. package/dist/chunk-2J6TF7YI.cjs +86 -0
  8. package/dist/chunk-3FOTFQ3J.js +1622 -0
  9. package/dist/chunk-4LYSEANA.js +199 -0
  10. package/dist/{chunk-KUTMY2IO.cjs → chunk-57MSZ24T.cjs} +162 -98
  11. package/dist/{chunk-BWSLWF2E.js → chunk-5HDSBTBX.js} +99 -32
  12. package/dist/chunk-623FVQSN.cjs +251 -0
  13. package/dist/{chunk-4DPEGDPW.js → chunk-6FSHT5IL.js} +4 -4
  14. package/dist/{chunk-REV7ZOA4.js → chunk-7AAZGVKD.js} +1 -35
  15. package/dist/chunk-7NQ37GZU.js +73 -0
  16. package/dist/chunk-ABFZWYHT.js +612 -0
  17. package/dist/{chunk-SS4LT2IP.js → chunk-BD7ZPG53.js} +5 -10
  18. package/dist/chunk-BO6OVILK.js +79 -0
  19. package/dist/chunk-C5OLWZ42.js +245 -0
  20. package/dist/chunk-CBL5JSCC.cjs +75 -0
  21. package/dist/{chunk-LSKSBVL4.cjs → chunk-CPDK3K5N.cjs} +6 -6
  22. package/dist/chunk-CSNWNFKU.cjs +1635 -0
  23. package/dist/chunk-DJYMDLV5.js +227 -0
  24. package/dist/{chunk-X4HKU3MX.js → chunk-E2VK7J2C.js} +3 -1
  25. package/dist/chunk-FMSW2HDF.cjs +267 -0
  26. package/dist/chunk-FQIHX7YI.cjs +80 -0
  27. package/dist/chunk-FR7KYWRO.cjs +41 -0
  28. package/dist/{chunk-AU3YW7FZ.cjs → chunk-GBQ33SIZ.cjs} +46 -51
  29. package/dist/{chunk-RRQ5HOBF.cjs → chunk-GVTZMA5C.cjs} +4 -4
  30. package/dist/chunk-H7KEVW2M.js +816 -0
  31. package/dist/chunk-HR3BN4C4.cjs +27 -0
  32. package/dist/chunk-IISBRUWJ.js +13 -0
  33. package/dist/chunk-JD2VQIDZ.cjs +15 -0
  34. package/dist/{chunk-PL73GJR4.js → chunk-JZ4TOOLN.js} +1 -1
  35. package/dist/chunk-L24YIZY7.cjs +207 -0
  36. package/dist/chunk-LNUQE6D6.js +39 -0
  37. package/dist/{chunk-BYJ7QTLY.cjs → chunk-NEIUQASE.cjs} +13 -13
  38. package/dist/chunk-P6TA5EZT.cjs +634 -0
  39. package/dist/chunk-PDHLTDZB.js +72 -0
  40. package/dist/chunk-PMCM2OH4.js +46 -0
  41. package/dist/chunk-PZCVF76Q.cjs +868 -0
  42. package/dist/{chunk-GO34UHSY.js → chunk-QAN5MZEM.js} +3 -3
  43. package/dist/{chunk-27HASETB.cjs → chunk-QKZL3ONM.cjs} +3 -1
  44. package/dist/chunk-SAENRNBJ.cjs +52 -0
  45. package/dist/{chunk-LMX35GNQ.js → chunk-SMCANK3F.js} +5 -4
  46. package/dist/{chunk-IZQNUNSU.cjs → chunk-SX2PNKKT.cjs} +18 -17
  47. package/dist/{chunk-LRM6JXJA.cjs → chunk-TBDXTV22.cjs} +0 -37
  48. package/dist/chunk-VOKMAAJP.js +848 -0
  49. package/dist/chunk-XB53G2DK.js +25 -0
  50. package/dist/chunk-Z2Y65YOY.cjs +7 -0
  51. package/dist/codegen/index.cjs +9 -7
  52. package/dist/codegen/index.d.cts +2 -2
  53. package/dist/codegen/index.d.ts +2 -2
  54. package/dist/codegen/index.js +6 -5
  55. package/dist/file-BOoHZgoQ.d.cts +1557 -0
  56. package/dist/file-yuPCFU5b.d.ts +1557 -0
  57. package/dist/history/index.cjs +287 -0
  58. package/dist/history/index.d.cts +157 -0
  59. package/dist/history/index.d.ts +157 -0
  60. package/dist/history/index.js +5 -0
  61. package/dist/index.cjs +134 -36
  62. package/dist/index.d.cts +137 -9
  63. package/dist/index.d.ts +137 -9
  64. package/dist/index.js +8 -3
  65. package/dist/ir/index.cjs +161 -165
  66. package/dist/ir/index.d.cts +32 -12
  67. package/dist/ir/index.d.ts +32 -12
  68. package/dist/ir/index.js +54 -61
  69. package/dist/lower-BuSvAFqi.d.cts +129 -0
  70. package/dist/lower-C_Qv_34S.d.ts +129 -0
  71. package/dist/lower-types-nofRXw9c.d.cts +15 -0
  72. package/dist/lower-types-nofRXw9c.d.ts +15 -0
  73. package/dist/{manifest-Duf-gHdO.d.cts → manifest-0OLw0i7k.d.cts} +1 -1
  74. package/dist/{manifest-Bp9ZJlav.d.ts → manifest-C8N6HDYl.d.ts} +1 -1
  75. package/dist/node-evaluator-CJNP4GHX.js +12 -0
  76. package/dist/node-evaluator-DMKPKUWA.cjs +22 -0
  77. package/dist/quickjs/index.cjs +256 -78
  78. package/dist/quickjs/index.d.cts +48 -7
  79. package/dist/quickjs/index.d.ts +48 -7
  80. package/dist/quickjs/index.js +254 -79
  81. package/dist/roundtrip/index.cjs +404 -129
  82. package/dist/roundtrip/index.d.cts +43 -8
  83. package/dist/roundtrip/index.d.ts +43 -8
  84. package/dist/roundtrip/index.js +260 -19
  85. package/dist/runtime/index.cjs +90 -0
  86. package/dist/runtime/index.d.cts +297 -0
  87. package/dist/runtime/index.d.ts +297 -0
  88. package/dist/runtime/index.js +8 -0
  89. package/dist/testing/index.cjs +1057 -0
  90. package/dist/testing/index.d.cts +305 -0
  91. package/dist/testing/index.d.ts +305 -0
  92. package/dist/testing/index.js +1037 -0
  93. package/dist/{types-Dr2Fn1Ax.d.ts → types-BGoPzgcl.d.cts} +1 -1
  94. package/dist/{types-Dr2Fn1Ax.d.cts → types-BGoPzgcl.d.ts} +1 -1
  95. package/dist/types-CpBBjaGX.d.cts +380 -0
  96. package/dist/types-DV-HX_Gt.d.ts +380 -0
  97. package/dist/{assemble-DMOuaxRI.d.ts → workflow-Bpr3vnA_.d.ts} +60 -162
  98. package/dist/workflow-C2a05WUJ.d.ts +444 -0
  99. package/dist/{assemble-BJo9TECS.d.cts → workflow-FXUkpIBc.d.cts} +60 -162
  100. package/dist/workflow-J-yYixny.d.cts +444 -0
  101. package/fixtures/README.md +128 -0
  102. package/fixtures/histories/activity-failure-fails-run.history.json +163 -0
  103. package/fixtures/histories/activity-retry-then-success.history.json +147 -0
  104. package/fixtures/histories/cancel-activity-abandon.history.json +126 -0
  105. package/fixtures/histories/cancel-activity-compensate.history.json +307 -0
  106. package/fixtures/histories/cancel-concurrent-non-cancellable.history.json +234 -0
  107. package/fixtures/histories/cancel-concurrent-scope-timeout.history.json +184 -0
  108. package/fixtures/histories/cancel-condition-after-cancel.history.json +200 -0
  109. package/fixtures/histories/cancel-during-timer.history.json +123 -0
  110. package/fixtures/histories/cancel-saga-compensations.history.json +325 -0
  111. package/fixtures/histories/cancel-scope-timeout.history.json +148 -0
  112. package/fixtures/histories/child-abandon-outlives-parent.history.json +191 -0
  113. package/fixtures/histories/child-cancel-default.history.json +234 -0
  114. package/fixtures/histories/child-cancel-request.history.json +206 -0
  115. package/fixtures/histories/child-durable-child-side.history.json +124 -0
  116. package/fixtures/histories/child-durable-result.history.json +163 -0
  117. package/fixtures/histories/child-failure-caught.history.json +166 -0
  118. package/fixtures/histories/child-graph-by-key.history.json +138 -0
  119. package/fixtures/histories/child-terminated-by-parent-close.history.json +85 -0
  120. package/fixtures/histories/continue-as-new-first-run.history.json +146 -0
  121. package/fixtures/histories/continue-as-new-history-limit.history.json +489 -0
  122. package/fixtures/histories/continue-as-new-last-run.history.json +147 -0
  123. package/fixtures/histories/continue-as-new-suggested.history.json +352 -0
  124. package/fixtures/histories/details-and-context.history.json +176 -0
  125. package/fixtures/histories/deterministic-values.history.json +128 -0
  126. package/fixtures/histories/engine-builtins.history.json +172 -0
  127. package/fixtures/histories/gather-activities.history.json +291 -0
  128. package/fixtures/histories/gather-all-settled.history.json +219 -0
  129. package/fixtures/histories/gather-mixed.history.json +281 -0
  130. package/fixtures/histories/input-during-running-task.history.json +111 -0
  131. package/fixtures/histories/nondeterminism-reordered.history.json +218 -0
  132. package/fixtures/histories/patched-deprecated.history.json +271 -0
  133. package/fixtures/histories/patched-new-run.history.json +270 -0
  134. package/fixtures/histories/patched-old-history.history.json +190 -0
  135. package/fixtures/histories/race-activity-wins.history.json +152 -0
  136. package/fixtures/histories/race-signal-beats-child.history.json +161 -0
  137. package/fixtures/histories/race-timeout-wins.history.json +118 -0
  138. package/fixtures/histories/side-effect-recorded.history.json +153 -0
  139. package/fixtures/histories/signal-buffered-at-start.history.json +157 -0
  140. package/fixtures/histories/signal-default-handler.history.json +187 -0
  141. package/fixtures/histories/signal-handler.history.json +191 -0
  142. package/fixtures/histories/signal-parent-child-side.history.json +132 -0
  143. package/fixtures/histories/signal-parent.history.json +202 -0
  144. package/fixtures/histories/signal-run-delivered.history.json +128 -0
  145. package/fixtures/histories/signal-run-undelivered.history.json +134 -0
  146. package/fixtures/histories/signal-wait.history.json +111 -0
  147. package/fixtures/histories/task-failure-code-error.history.json +137 -0
  148. package/fixtures/histories/task-failure-then-transient-attempt.history.json +140 -0
  149. package/fixtures/histories/timer-condition-met.history.json +201 -0
  150. package/fixtures/histories/timer-condition-timeout.history.json +118 -0
  151. package/fixtures/histories/timer-sleep-once.history.json +118 -0
  152. package/fixtures/histories/timer-sleep-sequence.history.json +210 -0
  153. package/fixtures/histories/update-accepted-completed.history.json +149 -0
  154. package/fixtures/histories/update-with-start-rejected-validation.history.json +91 -0
  155. package/package.json +85 -20
  156. package/schema/history-file.schema.json +2544 -0
  157. package/schema/ir-v2.schema.json +16 -0
  158. package/schema/run-event.schema.json +2374 -0
  159. package/schema/workflow-command.schema.json +1095 -0
  160. package/schema/workflow-task.schema.json +3560 -0
  161. package/dist/chunk-265J2FCH.cjs +0 -33
  162. package/dist/chunk-LUXCXFOE.cjs +0 -269
  163. package/dist/chunk-S34NJE3A.js +0 -262
  164. package/dist/chunk-SRQRLWOS.js +0 -31
  165. package/dist/lower-DcOY8ux0.d.cts +0 -49
  166. package/dist/lower-Dw5grNrI.d.ts +0 -49
  167. package/dist/node-evaluator-2GTUZVPK.cjs +0 -17
  168. package/dist/node-evaluator-RMYEWCXZ.js +0 -8
package/dist/ir/index.cjs CHANGED
@@ -1,11 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var chunkBYJ7QTLY_cjs = require('../chunk-BYJ7QTLY.cjs');
4
- var chunkLSKSBVL4_cjs = require('../chunk-LSKSBVL4.cjs');
5
- var chunkAU3YW7FZ_cjs = require('../chunk-AU3YW7FZ.cjs');
3
+ var chunkNEIUQASE_cjs = require('../chunk-NEIUQASE.cjs');
4
+ var chunkCPDK3K5N_cjs = require('../chunk-CPDK3K5N.cjs');
5
+ var chunkGBQ33SIZ_cjs = require('../chunk-GBQ33SIZ.cjs');
6
6
  var chunkG4UEPUGO_cjs = require('../chunk-G4UEPUGO.cjs');
7
- var chunk27HASETB_cjs = require('../chunk-27HASETB.cjs');
8
- var chunkLRM6JXJA_cjs = require('../chunk-LRM6JXJA.cjs');
7
+ var chunkQKZL3ONM_cjs = require('../chunk-QKZL3ONM.cjs');
8
+ var chunkTBDXTV22_cjs = require('../chunk-TBDXTV22.cjs');
9
+ var chunkSAENRNBJ_cjs = require('../chunk-SAENRNBJ.cjs');
10
+ var chunkFR7KYWRO_cjs = require('../chunk-FR7KYWRO.cjs');
11
+ require('../chunk-Z2Y65YOY.cjs');
9
12
  var _2020_js = require('ajv/dist/2020.js');
10
13
  var cronParser = require('cron-parser');
11
14
 
@@ -160,6 +163,8 @@ var IR_V2_SCHEMA = {
160
163
  required: ["signalName"],
161
164
  properties: {
162
165
  signalName: { type: "string", minLength: 1 },
166
+ consume: { enum: ["first", "all"] },
167
+ limitWaitUntil: { type: "string", minLength: 1 },
163
168
  limitWait: {
164
169
  type: "object",
165
170
  required: ["amount", "unit"],
@@ -169,7 +174,8 @@ var IR_V2_SCHEMA = {
169
174
  }
170
175
  },
171
176
  payloadSchema: JSON_SCHEMA_OBJECT
172
- }
177
+ },
178
+ not: { required: ["limitWait", "limitWaitUntil"] }
173
179
  }
174
180
  }
175
181
  }
@@ -335,17 +341,17 @@ function stringOrEmpty(value) {
335
341
  return typeof value === "string" && value ? value : "";
336
342
  }
337
343
  function executorNodeView(node) {
338
- const record = chunkLRM6JXJA_cjs.isRecord(node) ? node : {};
339
- const data = chunkLRM6JXJA_cjs.isRecord(record["data"]) ? record["data"] : void 0;
340
- const args = chunkLRM6JXJA_cjs.isRecord(record["args"]) ? record["args"] : void 0;
341
- const dataArgs = chunkLRM6JXJA_cjs.isRecord(data?.["args"]) ? data["args"] : void 0;
344
+ const record = chunkSAENRNBJ_cjs.isRecord(node) ? node : {};
345
+ const data = chunkSAENRNBJ_cjs.isRecord(record["data"]) ? record["data"] : void 0;
346
+ const args = chunkSAENRNBJ_cjs.isRecord(record["args"]) ? record["args"] : void 0;
347
+ const dataArgs = chunkSAENRNBJ_cjs.isRecord(data?.["args"]) ? data["args"] : void 0;
342
348
  const type = typeof record["type"] === "string" ? record["type"] : "";
343
- const merged = chunkAU3YW7FZ_cjs.usesMergedParameters(type);
349
+ const merged = chunkGBQ33SIZ_cjs.usesMergedParameters(type);
344
350
  let parameters;
345
351
  if (merged) {
346
- const config = chunkLRM6JXJA_cjs.isRecord(record["config"]) ? record["config"] : {};
347
- const dataState2 = chunkLRM6JXJA_cjs.isRecord(dataArgs?.["state"]) ? dataArgs["state"] : {};
348
- const rootState = chunkLRM6JXJA_cjs.isRecord(args?.["state"]) ? args["state"] : {};
352
+ const config = chunkSAENRNBJ_cjs.isRecord(record["config"]) ? record["config"] : {};
353
+ const dataState2 = chunkSAENRNBJ_cjs.isRecord(dataArgs?.["state"]) ? dataArgs["state"] : {};
354
+ const rootState = chunkSAENRNBJ_cjs.isRecord(args?.["state"]) ? args["state"] : {};
349
355
  const all = { ...data, ...config, ...dataState2, ...rootState };
350
356
  for (const key of UNREAD_INTERNAL_PARAMETER_KEYS) {
351
357
  if (!Object.hasOwn(config, key) && !Object.hasOwn(dataState2, key) && !Object.hasOwn(rootState, key)) {
@@ -356,12 +362,14 @@ function executorNodeView(node) {
356
362
  } else {
357
363
  parameters = args?.["state"] || dataArgs?.["state"] || data?.["state"];
358
364
  }
359
- const rootSettings = chunkLRM6JXJA_cjs.isRecord(record["executionSettings"]) ? record["executionSettings"] : void 0;
360
- const dataSettings = chunkLRM6JXJA_cjs.isRecord(data?.["executionSettings"]) ? data["executionSettings"] : void 0;
361
- const dataState = chunkLRM6JXJA_cjs.isRecord(dataArgs?.["state"]) ? dataArgs["state"] : void 0;
362
- const nodeData = chunkLRM6JXJA_cjs.isRecord(data?.["nodeData"]) ? data["nodeData"] : void 0;
363
- const argsContext = chunkLRM6JXJA_cjs.isRecord(args?.["context"]) ? args["context"] : void 0;
364
- const contextNode = chunkLRM6JXJA_cjs.isRecord(argsContext?.["node"]) ? argsContext["node"] : void 0;
365
+ const rootSettings = chunkSAENRNBJ_cjs.isRecord(record["executionSettings"]) ? record["executionSettings"] : void 0;
366
+ const dataSettings = chunkSAENRNBJ_cjs.isRecord(data?.["executionSettings"]) ? data["executionSettings"] : void 0;
367
+ const dataState = chunkSAENRNBJ_cjs.isRecord(dataArgs?.["state"]) ? dataArgs["state"] : void 0;
368
+ const nodeData = chunkSAENRNBJ_cjs.isRecord(data?.["nodeData"]) ? data["nodeData"] : void 0;
369
+ const argsContext = chunkSAENRNBJ_cjs.isRecord(args?.["context"]) ? args["context"] : void 0;
370
+ const contextNode = chunkSAENRNBJ_cjs.isRecord(argsContext?.["node"]) ? argsContext["node"] : void 0;
371
+ const subNodeState = merged ? void 0 : args?.["state"] || dataArgs?.["state"] || {};
372
+ const toolOperation = merged ? void 0 : (chunkSAENRNBJ_cjs.isRecord(subNodeState) ? subNodeState["operation"] : void 0) || data?.["operation_name"];
365
373
  return {
366
374
  id: record["id"],
367
375
  type: record["type"],
@@ -376,54 +384,18 @@ function executorNodeView(node) {
376
384
  runOn: dataSettings?.["runOn"],
377
385
  disabled: record["disabled"] === true || data?.["disabled"] === true,
378
386
  nodeDataNodeType: nodeData?.["nodeType"],
379
- argsContextNodeType: contextNode?.["type"]
387
+ argsContextNodeType: contextNode?.["type"],
388
+ dataOperationName: data?.["operation_name"],
389
+ nodeStateVersion: data?.["version"] || "1.0.0",
390
+ subNodeState,
391
+ toolOperation
380
392
  };
381
393
  }
382
394
  function executorView(definition) {
383
- if (!chunkLRM6JXJA_cjs.isRecord(definition) || !chunkLRM6JXJA_cjs.isRecord(definition["data"])) return [];
395
+ if (!chunkSAENRNBJ_cjs.isRecord(definition) || !chunkSAENRNBJ_cjs.isRecord(definition["data"])) return [];
384
396
  const nodes = definition["data"]["nodes"];
385
397
  return Array.isArray(nodes) ? nodes.map(executorNodeView) : [];
386
398
  }
387
-
388
- // src/ir/duration.ts
389
- var SHORT = /^(\d+(?:\.\d+)?)(ms|s|m|h|d|w)$/;
390
- var ISO = /^P(?:(\d+(?:\.\d+)?)W)?(?:(\d+(?:\.\d+)?)D)?(?:T(?:(\d+(?:\.\d+)?)H)?(?:(\d+(?:\.\d+)?)M)?(?:(\d+(?:\.\d+)?)S)?)?$/;
391
- var SECOND_MS = 1e3;
392
- var MINUTE_MS = 60 * SECOND_MS;
393
- var HOUR_MS = 60 * MINUTE_MS;
394
- var DAY_MS = 24 * HOUR_MS;
395
- var WEEK_MS = 7 * DAY_MS;
396
- var UNIT_MS = {
397
- ms: 1,
398
- s: SECOND_MS,
399
- m: MINUTE_MS,
400
- h: HOUR_MS,
401
- d: DAY_MS,
402
- w: WEEK_MS
403
- };
404
- function durationMs(value, numberUnit) {
405
- if (typeof value === "number") {
406
- if (!Number.isFinite(value) || value < 0) return void 0;
407
- return numberUnit === "s" ? value * 1e3 : value;
408
- }
409
- if (typeof value !== "string") return void 0;
410
- const text = value.trim();
411
- const short = SHORT.exec(text);
412
- if (short?.[1] !== void 0 && short[2] !== void 0) {
413
- const unit = UNIT_MS[short[2]];
414
- return unit === void 0 ? void 0 : Number(short[1]) * unit;
415
- }
416
- const iso = ISO.exec(text);
417
- if (iso && text !== "P" && text !== "PT") {
418
- const [, weeks, days, hours, minutes, seconds] = iso;
419
- const parts = [weeks, days, hours, minutes, seconds];
420
- if (parts.every((part) => part === void 0)) return void 0;
421
- return Number(weeks ?? 0) * WEEK_MS + Number(days ?? 0) * DAY_MS + Number(hours ?? 0) * HOUR_MS + Number(minutes ?? 0) * MINUTE_MS + Number(seconds ?? 0) * SECOND_MS;
422
- }
423
- return void 0;
424
- }
425
-
426
- // src/ir/schedule.ts
427
399
  var FIRE_TIMES = 10;
428
400
  var MAX_ITERATIONS = 2e4;
429
401
  var CALENDAR_FIELDS = [
@@ -443,7 +415,7 @@ function rangeValues(value, min, max, field) {
443
415
  values.push(entry);
444
416
  continue;
445
417
  }
446
- if (!chunkLRM6JXJA_cjs.isRecord(entry) || typeof entry["start"] !== "number") {
418
+ if (!chunkSAENRNBJ_cjs.isRecord(entry) || typeof entry["start"] !== "number") {
447
419
  throw new Error(`${field} entries must be numbers or { start, end, step }`);
448
420
  }
449
421
  const start = entry["start"];
@@ -493,7 +465,7 @@ function localParts(date, tz) {
493
465
  function calendarTimes(entries, now, tz) {
494
466
  const all = [];
495
467
  for (const entry of entries) {
496
- if (!chunkLRM6JXJA_cjs.isRecord(entry)) throw new Error("each calendar entry must be an object");
468
+ if (!chunkSAENRNBJ_cjs.isRecord(entry)) throw new Error("each calendar entry must be an object");
497
469
  const expression = CALENDAR_FIELDS.map((field) => cronField(entry[field.name], field)).join(
498
470
  " "
499
471
  );
@@ -512,9 +484,9 @@ function calendarTimes(entries, now, tz) {
512
484
  function intervalTimes(entries, now) {
513
485
  const all = [];
514
486
  for (const entry of entries) {
515
- if (!chunkLRM6JXJA_cjs.isRecord(entry)) throw new Error("each interval entry must be an object");
516
- const every = durationMs(entry["every"], "s");
517
- const offset = entry["offset"] === void 0 ? 0 : durationMs(entry["offset"], "s");
487
+ if (!chunkSAENRNBJ_cjs.isRecord(entry)) throw new Error("each interval entry must be an object");
488
+ const every = chunkFR7KYWRO_cjs.durationMs(entry["every"], "s");
489
+ const offset = entry["offset"] === void 0 ? 0 : chunkFR7KYWRO_cjs.durationMs(entry["offset"], "s");
518
490
  if (every === void 0 || every <= 0)
519
491
  throw new Error("interval.every must be a positive duration");
520
492
  if (offset === void 0 || offset >= every)
@@ -527,7 +499,7 @@ function intervalTimes(entries, now) {
527
499
  }
528
500
  function checkScheduleSpec(spec, options = {}) {
529
501
  const now = options.now ?? /* @__PURE__ */ new Date();
530
- if (!chunkLRM6JXJA_cjs.isRecord(spec)) return { ok: false, problem: "spec must be an object", nextFireTimes: [] };
502
+ if (!chunkSAENRNBJ_cjs.isRecord(spec)) return { ok: false, problem: "spec must be an object", nextFireTimes: [] };
531
503
  const kinds = ["cron", "calendar", "interval"].filter((kind) => spec[kind] !== void 0);
532
504
  if (kinds.length !== 1) {
533
505
  return {
@@ -580,7 +552,7 @@ function schemaTools() {
580
552
  return compiled;
581
553
  }
582
554
  function isValidJsonSchema(schema) {
583
- if (!chunkLRM6JXJA_cjs.isRecord(schema) && typeof schema !== "boolean") return false;
555
+ if (!chunkSAENRNBJ_cjs.isRecord(schema) && typeof schema !== "boolean") return false;
584
556
  const { ajv } = schemaTools();
585
557
  return ajv.validateSchema(schema) === true;
586
558
  }
@@ -592,7 +564,7 @@ function findSecretKeys(value, path, parentKey, out) {
592
564
  value.forEach((item, index) => findSecretKeys(item, `${path}[${index}]`, parentKey, out));
593
565
  return;
594
566
  }
595
- if (!chunkLRM6JXJA_cjs.isRecord(value)) return;
567
+ if (!chunkSAENRNBJ_cjs.isRecord(value)) return;
596
568
  for (const [key, child] of Object.entries(value)) {
597
569
  if (isSecretKey(parentKey, key)) out.push(`${path}.${key}`);
598
570
  findSecretKeys(child, `${path}.${key}`, key, out);
@@ -600,14 +572,14 @@ function findSecretKeys(value, path, parentKey, out) {
600
572
  }
601
573
  function findLegacyTemplates(value, path, out) {
602
574
  if (typeof value === "string") {
603
- if (chunkLRM6JXJA_cjs.hasLegacyTemplate(value)) out.push(path);
575
+ if (chunkTBDXTV22_cjs.hasLegacyTemplate(value)) out.push(path);
604
576
  return;
605
577
  }
606
578
  if (Array.isArray(value)) {
607
579
  value.forEach((item, index) => findLegacyTemplates(item, `${path}[${index}]`, out));
608
580
  return;
609
581
  }
610
- if (chunkLRM6JXJA_cjs.isRecord(value)) {
582
+ if (chunkSAENRNBJ_cjs.isRecord(value)) {
611
583
  for (const [key, child] of Object.entries(value))
612
584
  findLegacyTemplates(child, `${path}.${key}`, out);
613
585
  }
@@ -633,35 +605,31 @@ function isHardSchemaError(error) {
633
605
  function legacyMirrors(node) {
634
606
  const found = [];
635
607
  const type = typeof node["type"] === "string" ? node["type"] : "";
636
- const merged = chunkAU3YW7FZ_cjs.usesMergedParameters(type);
637
- const data = chunkLRM6JXJA_cjs.isRecord(node["data"]) ? node["data"] : void 0;
638
- const dataArgs = chunkLRM6JXJA_cjs.isRecord(data?.["args"]) ? data["args"] : void 0;
608
+ const merged = chunkGBQ33SIZ_cjs.usesMergedParameters(type);
609
+ const data = chunkSAENRNBJ_cjs.isRecord(node["data"]) ? node["data"] : void 0;
610
+ const dataArgs = chunkSAENRNBJ_cjs.isRecord(data?.["args"]) ? data["args"] : void 0;
639
611
  if (data) {
640
- for (const key of [
641
- "label",
642
- "operation_name",
643
- "errorConfig",
644
- "disabled",
645
- "state",
646
- "nodeVersion"
647
- ]) {
612
+ for (const key of ["label", "errorConfig", "disabled", "state", "nodeVersion"]) {
648
613
  if (data[key] !== void 0) found.push(`data.${key}`);
649
614
  }
650
- if (!merged && data["version"] !== void 0) found.push("data.version");
615
+ if (data["operation_name"] !== void 0 && !chunkSAENRNBJ_cjs.deepEqual(data["operation_name"], node["operation_name"]))
616
+ found.push("data.operation_name");
617
+ if (!merged && data["version"] !== void 0 && !chunkSAENRNBJ_cjs.deepEqual(data["version"], node["version"]))
618
+ found.push("data.version");
651
619
  for (const key of ["state", "connections", "credentials", "context"]) {
652
620
  if (dataArgs?.[key] !== void 0) found.push(`data.args.${key}`);
653
621
  }
654
- const settings2 = chunkLRM6JXJA_cjs.isRecord(data["executionSettings"]) ? data["executionSettings"] : void 0;
622
+ const settings2 = chunkSAENRNBJ_cjs.isRecord(data["executionSettings"]) ? data["executionSettings"] : void 0;
655
623
  if (settings2) {
656
- const onlyRunOnMirror = Object.keys(settings2).length === 1 && settings2["runOn"] !== void 0 && chunkLRM6JXJA_cjs.isRecord(node["executionSettings"]) && JSON.stringify(node["executionSettings"]["runOn"]) === JSON.stringify(settings2["runOn"]);
624
+ const onlyRunOnMirror = Object.keys(settings2).length === 1 && settings2["runOn"] !== void 0 && chunkSAENRNBJ_cjs.isRecord(node["executionSettings"]) && JSON.stringify(node["executionSettings"]["runOn"]) === JSON.stringify(settings2["runOn"]);
657
625
  if (!onlyRunOnMirror) found.push("data.executionSettings");
658
626
  }
659
627
  }
660
628
  if (merged && node["config"] !== void 0) found.push("config");
661
- const args = chunkLRM6JXJA_cjs.isRecord(node["args"]) ? node["args"] : void 0;
629
+ const args = chunkSAENRNBJ_cjs.isRecord(node["args"]) ? node["args"] : void 0;
662
630
  if (args?.["credentials"] !== void 0) found.push("args.credentials");
663
- const settings = chunkLRM6JXJA_cjs.isRecord(node["executionSettings"]) ? node["executionSettings"] : void 0;
664
- if (settings?.["runOn"] !== void 0 && !chunkLRM6JXJA_cjs.isRecord(data?.["executionSettings"]))
631
+ const settings = chunkSAENRNBJ_cjs.isRecord(node["executionSettings"]) ? node["executionSettings"] : void 0;
632
+ if (settings?.["runOn"] !== void 0 && !chunkSAENRNBJ_cjs.isRecord(data?.["executionSettings"]))
665
633
  found.push("executionSettings.runOn");
666
634
  return found;
667
635
  }
@@ -676,7 +644,7 @@ function validate(definition, options = {}) {
676
644
  const warnOrFail = (issue) => {
677
645
  (strict ? errors : warnings).push(issue);
678
646
  };
679
- if (!chunkLRM6JXJA_cjs.isRecord(definition)) {
647
+ if (!chunkSAENRNBJ_cjs.isRecord(definition)) {
680
648
  return {
681
649
  valid: false,
682
650
  errors: [{ code: "definition.required", message: "A workflow definition must be an object" }],
@@ -684,7 +652,7 @@ function validate(definition, options = {}) {
684
652
  taskQueues: []
685
653
  };
686
654
  }
687
- const data = chunkLRM6JXJA_cjs.isRecord(definition["data"]) ? definition["data"] : void 0;
655
+ const data = chunkSAENRNBJ_cjs.isRecord(definition["data"]) ? definition["data"] : void 0;
688
656
  if (!data)
689
657
  fail({ code: "definition.dataRequired", message: "The definition needs a data object" });
690
658
  const rawNodes = data?.["nodes"];
@@ -714,8 +682,8 @@ function validate(definition, options = {}) {
714
682
  else warnOrFail(issue);
715
683
  }
716
684
  }
717
- const nodes = rawNodes.map((node) => chunkLRM6JXJA_cjs.isRecord(node) ? node : {});
718
- const edges = rawEdges.map((edge) => chunkLRM6JXJA_cjs.isRecord(edge) ? edge : {});
685
+ const nodes = rawNodes.map((node) => chunkSAENRNBJ_cjs.isRecord(node) ? node : {});
686
+ const edges = rawEdges.map((edge) => chunkSAENRNBJ_cjs.isRecord(edge) ? edge : {});
719
687
  if (nodes.length === 0 && !options.allowEmpty)
720
688
  fail({ code: "node.atLeastOne", message: "Add at least one node" });
721
689
  const ids = /* @__PURE__ */ new Set();
@@ -762,10 +730,10 @@ function validate(definition, options = {}) {
762
730
  pairs.add(pair);
763
731
  if (target) incoming.set(target, (incoming.get(target) ?? 0) + 1);
764
732
  });
765
- const code = chunkLRM6JXJA_cjs.isRecord(definition["code"]) ? definition["code"] : void 0;
766
- const exportsBlock = chunkLRM6JXJA_cjs.isRecord(code?.["exports"]) ? code["exports"] : void 0;
767
- const workflowExports = chunkLRM6JXJA_cjs.isRecord(exportsBlock?.["workflows"]) ? exportsBlock["workflows"] : {};
768
- const activityExports = chunkLRM6JXJA_cjs.isRecord(exportsBlock?.["activities"]) ? exportsBlock["activities"] : {};
733
+ const code = chunkSAENRNBJ_cjs.isRecord(definition["code"]) ? definition["code"] : void 0;
734
+ const exportsBlock = chunkSAENRNBJ_cjs.isRecord(code?.["exports"]) ? code["exports"] : void 0;
735
+ const workflowExports = chunkSAENRNBJ_cjs.isRecord(exportsBlock?.["workflows"]) ? exportsBlock["workflows"] : {};
736
+ const activityExports = chunkSAENRNBJ_cjs.isRecord(exportsBlock?.["activities"]) ? exportsBlock["activities"] : {};
769
737
  if (code?.["determinism"] === "isolate" && Object.keys(activityExports).length > 0) {
770
738
  fail({
771
739
  code: "code.isolateActivities",
@@ -777,13 +745,13 @@ function validate(definition, options = {}) {
777
745
  ...Object.entries(workflowExports),
778
746
  ...Object.entries(activityExports)
779
747
  ]) {
780
- if (chunkLRM6JXJA_cjs.isRecord(exported) && typeof exported["taskQueue"] === "string")
748
+ if (chunkSAENRNBJ_cjs.isRecord(exported) && typeof exported["taskQueue"] === "string")
781
749
  taskQueues.add(exported["taskQueue"]);
782
- if (chunkLRM6JXJA_cjs.isRecord(exported) && chunkLRM6JXJA_cjs.isRecord(exported["interface"])) {
750
+ if (chunkSAENRNBJ_cjs.isRecord(exported) && chunkSAENRNBJ_cjs.isRecord(exported["interface"])) {
783
751
  checkInterface(exported["interface"], `code.exports.*.${name}.interface`, fail);
784
752
  }
785
753
  }
786
- if (chunkLRM6JXJA_cjs.isRecord(definition["interface"])) checkInterface(definition["interface"], "interface", fail);
754
+ if (chunkSAENRNBJ_cjs.isRecord(definition["interface"])) checkInterface(definition["interface"], "interface", fail);
787
755
  for (const block of ["code", "interface"]) {
788
756
  const found = [];
789
757
  findSecretKeys(definition[block], block, void 0, found);
@@ -799,9 +767,9 @@ function validate(definition, options = {}) {
799
767
  const id = typeof node["id"] === "string" ? node["id"] : void 0;
800
768
  const at = id ? { nodeId: id } : {};
801
769
  const type = typeof node["type"] === "string" ? node["type"] : "";
802
- const args = chunkLRM6JXJA_cjs.isRecord(node["args"]) ? node["args"] : void 0;
803
- const state = chunkLRM6JXJA_cjs.isRecord(args?.["state"]) ? args["state"] : void 0;
804
- if (type === chunkAU3YW7FZ_cjs.CODE_WORKFLOW_NODE_TYPE) {
770
+ const args = chunkSAENRNBJ_cjs.isRecord(node["args"]) ? node["args"] : void 0;
771
+ const state = chunkSAENRNBJ_cjs.isRecord(args?.["state"]) ? args["state"] : void 0;
772
+ if (type === chunkGBQ33SIZ_cjs.CODE_WORKFLOW_NODE_TYPE) {
805
773
  const workflowFn = state?.["workflowFn"];
806
774
  if (!code) {
807
775
  fail({
@@ -818,10 +786,35 @@ function validate(definition, options = {}) {
818
786
  });
819
787
  }
820
788
  if (typeof state?.["taskQueue"] === "string") taskQueues.add(state["taskQueue"]);
789
+ const policy = state?.["parentClosePolicy"];
790
+ if (state?.["waitForCompletion"] === false && (policy === "TERMINATE" || policy === "REQUEST_CANCEL"))
791
+ warnings.push({
792
+ code: "codeWorkflow.closePolicyEndsChild",
793
+ message: `waitForCompletion is false but parentClosePolicy is ${policy}: the child is stopped when the parent run ends; use ABANDON (the default) to let it outlive the parent`,
794
+ ...at,
795
+ path: "args.state.parentClosePolicy"
796
+ });
797
+ if (state?.["waitForCompletion"] === false && typeof state["timeout"] === "number" && state["timeout"] > 0)
798
+ warnings.push({
799
+ code: "codeWorkflow.timeoutIgnored",
800
+ message: "timeout applies only while the node waits for the child; it has no effect when waitForCompletion is false",
801
+ ...at,
802
+ path: "args.state.timeout"
803
+ });
821
804
  }
822
- const isTrigger = chunkAU3YW7FZ_cjs.INTERNAL_TRIGGER_TYPES.has(type) || id !== void 0 && (incoming.get(id) ?? 0) === 0;
805
+ if (type === chunkGBQ33SIZ_cjs.WAIT_FOR_SIGNAL_NODE_TYPE) {
806
+ const until = state?.["limitWaitUntil"];
807
+ if (until !== void 0 && (typeof until !== "string" || Number.isNaN(Date.parse(until))))
808
+ fail({
809
+ code: "waitForSignal.invalidDeadline",
810
+ message: "limitWaitUntil must be an ISO 8601 date-time",
811
+ ...at,
812
+ path: "args.state.limitWaitUntil"
813
+ });
814
+ }
815
+ const isTrigger = chunkGBQ33SIZ_cjs.INTERNAL_TRIGGER_TYPES.has(type) || id !== void 0 && (incoming.get(id) ?? 0) === 0;
823
816
  if (isTrigger && state?.["startDelay"] !== void 0) {
824
- const delay = durationMs(state["startDelay"], "s");
817
+ const delay = chunkFR7KYWRO_cjs.durationMs(state["startDelay"], "s");
825
818
  if (delay === void 0) {
826
819
  fail({
827
820
  code: "trigger.invalidDuration",
@@ -869,8 +862,8 @@ function validate(definition, options = {}) {
869
862
  });
870
863
  }
871
864
  const templates = [];
872
- const args2 = chunkLRM6JXJA_cjs.isRecord(node["args"]) ? node["args"] : void 0;
873
- const scanned = type === "internal:code" && args2 && chunkLRM6JXJA_cjs.isRecord(args2["state"]) ? {
865
+ const args2 = chunkSAENRNBJ_cjs.isRecord(node["args"]) ? node["args"] : void 0;
866
+ const scanned = type === "internal:code" && args2 && chunkSAENRNBJ_cjs.isRecord(args2["state"]) ? {
874
867
  ...args2,
875
868
  state: Object.fromEntries(
876
869
  Object.entries(args2["state"]).filter(([key]) => key !== "code")
@@ -902,11 +895,11 @@ function validate(definition, options = {}) {
902
895
  }
903
896
  });
904
897
  }
905
- const config = chunkLRM6JXJA_cjs.isRecord(definition["config"]) ? definition["config"] : void 0;
898
+ const config = chunkSAENRNBJ_cjs.isRecord(definition["config"]) ? definition["config"] : void 0;
906
899
  if (config) {
907
- const timeout = config["timeout"] === void 0 ? void 0 : durationMs(config["timeout"], "s");
900
+ const timeout = config["timeout"] === void 0 ? void 0 : chunkFR7KYWRO_cjs.durationMs(config["timeout"], "s");
908
901
  for (const key of ["executionTimeout", "workflowTaskTimeout"]) {
909
- if (config[key] !== void 0 && durationMs(config[key], "s") === void 0) {
902
+ if (config[key] !== void 0 && chunkFR7KYWRO_cjs.durationMs(config[key], "s") === void 0) {
910
903
  fail({
911
904
  code: "config.invalidDuration",
912
905
  message: `config.${key} is not a duration`,
@@ -914,7 +907,7 @@ function validate(definition, options = {}) {
914
907
  });
915
908
  }
916
909
  }
917
- const executionTimeout = config["executionTimeout"] === void 0 ? void 0 : durationMs(config["executionTimeout"], "s");
910
+ const executionTimeout = config["executionTimeout"] === void 0 ? void 0 : chunkFR7KYWRO_cjs.durationMs(config["executionTimeout"], "s");
918
911
  if (executionTimeout !== void 0 && timeout !== void 0 && executionTimeout < timeout) {
919
912
  fail({
920
913
  code: "config.executionTimeoutBelowTimeout",
@@ -922,7 +915,7 @@ function validate(definition, options = {}) {
922
915
  path: "config.executionTimeout"
923
916
  });
924
917
  }
925
- const taskTimeout = config["workflowTaskTimeout"] === void 0 ? void 0 : durationMs(config["workflowTaskTimeout"], "s");
918
+ const taskTimeout = config["workflowTaskTimeout"] === void 0 ? void 0 : chunkFR7KYWRO_cjs.durationMs(config["workflowTaskTimeout"], "s");
926
919
  if (taskTimeout !== void 0 && taskTimeout > MAX_WORKFLOW_TASK_TIMEOUT_MS) {
927
920
  fail({
928
921
  code: "config.workflowTaskTimeoutTooLong",
@@ -949,9 +942,9 @@ function checkInterface(block, path, fail) {
949
942
  if (block["input"] !== void 0) schemas.push([`${path}.input`, block["input"]]);
950
943
  if (block["output"] !== void 0) schemas.push([`${path}.output`, block["output"]]);
951
944
  for (const group of ["signals", "queries", "updates"]) {
952
- const members = chunkLRM6JXJA_cjs.isRecord(block[group]) ? block[group] : {};
945
+ const members = chunkSAENRNBJ_cjs.isRecord(block[group]) ? block[group] : {};
953
946
  for (const [name, member] of Object.entries(members)) {
954
- if (!chunkLRM6JXJA_cjs.isRecord(member)) continue;
947
+ if (!chunkSAENRNBJ_cjs.isRecord(member)) continue;
955
948
  for (const part of ["payload", "args", "result"]) {
956
949
  if (member[part] !== void 0)
957
950
  schemas.push([`${path}.${group}.${name}.${part}`, member[part]]);
@@ -971,15 +964,15 @@ function checkInterface(block, path, fail) {
971
964
  function shadowedInputs(nodes) {
972
965
  const warnings = [];
973
966
  for (const node of nodes) {
974
- const data = chunkLRM6JXJA_cjs.isRecord(node["data"]) ? node["data"] : void 0;
975
- const declared = chunkLRM6JXJA_cjs.isRecord(data?.["inputs"]) ? data["inputs"] : void 0;
967
+ const data = chunkSAENRNBJ_cjs.isRecord(node["data"]) ? node["data"] : void 0;
968
+ const declared = chunkSAENRNBJ_cjs.isRecord(data?.["inputs"]) ? data["inputs"] : void 0;
976
969
  if (!declared) continue;
977
- const dataArgs = chunkLRM6JXJA_cjs.isRecord(data?.["args"]) ? data["args"] : void 0;
978
- const args = chunkLRM6JXJA_cjs.isRecord(node["args"]) ? node["args"] : void 0;
970
+ const dataArgs = chunkSAENRNBJ_cjs.isRecord(data?.["args"]) ? data["args"] : void 0;
971
+ const args = chunkSAENRNBJ_cjs.isRecord(node["args"]) ? node["args"] : void 0;
979
972
  const staticParams = {
980
- ...chunkLRM6JXJA_cjs.isRecord(node["config"]) ? node["config"] : {},
981
- ...chunkLRM6JXJA_cjs.isRecord(dataArgs?.["state"]) ? dataArgs["state"] : {},
982
- ...chunkLRM6JXJA_cjs.isRecord(args?.["state"]) ? args["state"] : {}
973
+ ...chunkSAENRNBJ_cjs.isRecord(node["config"]) ? node["config"] : {},
974
+ ...chunkSAENRNBJ_cjs.isRecord(dataArgs?.["state"]) ? dataArgs["state"] : {},
975
+ ...chunkSAENRNBJ_cjs.isRecord(args?.["state"]) ? args["state"] : {}
983
976
  };
984
977
  for (const key of Object.keys(declared)) {
985
978
  if (!Object.hasOwn(staticParams, key)) continue;
@@ -997,26 +990,26 @@ function shadowedInputs(nodes) {
997
990
  var WORKFLOW_DOCUMENT_FORMAT = "fluidgrids.workflow";
998
991
  var V2_CONFIG_KEYS = ["executionTimeout", "workflowTaskTimeout", "versioningBehavior"];
999
992
  function isV2Definition(definition) {
1000
- if (!chunkLRM6JXJA_cjs.isRecord(definition)) return false;
993
+ if (!chunkSAENRNBJ_cjs.isRecord(definition)) return false;
1001
994
  if (definition["schemaVersion"] === 2) return true;
1002
995
  for (const key of ["interface", "code", "authoring"]) {
1003
996
  if (definition[key] !== void 0) return true;
1004
997
  }
1005
998
  const meta = definition["meta"];
1006
- if (chunkLRM6JXJA_cjs.isRecord(meta) && meta["layout"] !== void 0) return true;
999
+ if (chunkSAENRNBJ_cjs.isRecord(meta) && meta["layout"] !== void 0) return true;
1007
1000
  const config = definition["config"];
1008
- if (chunkLRM6JXJA_cjs.isRecord(config) && V2_CONFIG_KEYS.some((key) => config[key] !== void 0)) return true;
1001
+ if (chunkSAENRNBJ_cjs.isRecord(config) && V2_CONFIG_KEYS.some((key) => config[key] !== void 0)) return true;
1009
1002
  const data = definition["data"];
1010
- const nodes = chunkLRM6JXJA_cjs.isRecord(data) && Array.isArray(data["nodes"]) ? data["nodes"] : [];
1003
+ const nodes = chunkSAENRNBJ_cjs.isRecord(data) && Array.isArray(data["nodes"]) ? data["nodes"] : [];
1011
1004
  return nodes.some(
1012
- (node) => chunkLRM6JXJA_cjs.isRecord(node) && typeof node["type"] === "string" && chunkAU3YW7FZ_cjs.V2_NODE_TYPES.has(node["type"])
1005
+ (node) => chunkSAENRNBJ_cjs.isRecord(node) && typeof node["type"] === "string" && chunkGBQ33SIZ_cjs.V2_NODE_TYPES.has(node["type"])
1013
1006
  );
1014
1007
  }
1015
1008
  function envelopeSchemaVersion(definition) {
1016
1009
  return isV2Definition(definition) ? 2 : 1;
1017
1010
  }
1018
1011
  function exportDefinition(definition) {
1019
- return isV2Definition(definition) ? chunkAU3YW7FZ_cjs.normalizeDefinition(definition) : definition;
1012
+ return isV2Definition(definition) ? chunkGBQ33SIZ_cjs.normalizeDefinition(definition) : definition;
1020
1013
  }
1021
1014
  function buildExportDocument(input) {
1022
1015
  return {
@@ -1041,10 +1034,10 @@ function serializeWorkflowDocument(document, versionCreatedAt) {
1041
1034
  `;
1042
1035
  }
1043
1036
  function readWorkflowDocument(value) {
1044
- if (!chunkLRM6JXJA_cjs.isRecord(value)) return null;
1037
+ if (!chunkSAENRNBJ_cjs.isRecord(value)) return null;
1045
1038
  if (value["format"] === WORKFLOW_DOCUMENT_FORMAT || "definitionJson" in value) {
1046
1039
  const definitionJson = value["definitionJson"];
1047
- if (!chunkLRM6JXJA_cjs.isRecord(definitionJson)) return null;
1040
+ if (!chunkSAENRNBJ_cjs.isRecord(definitionJson)) return null;
1048
1041
  const schemaVersion = value["schemaVersion"];
1049
1042
  return {
1050
1043
  definitionJson,
@@ -1075,7 +1068,7 @@ function workflowInputsSchema(workflowInputs) {
1075
1068
  const name = (rawName ?? "").trim();
1076
1069
  if (!name) continue;
1077
1070
  const type = (rawType ?? "").trim().toLowerCase();
1078
- properties[name] = FIELD_TYPES.has(type) ? { type } : {};
1071
+ chunkSAENRNBJ_cjs.setOwn(properties, name, FIELD_TYPES.has(type) ? { type } : {});
1079
1072
  required.push(name);
1080
1073
  }
1081
1074
  return {
@@ -1086,15 +1079,15 @@ function workflowInputsSchema(workflowInputs) {
1086
1079
  };
1087
1080
  }
1088
1081
  function deriveInterface(definition, options = {}) {
1089
- if (!chunkLRM6JXJA_cjs.isRecord(definition)) return {};
1090
- if (chunkLRM6JXJA_cjs.isRecord(definition["interface"])) return definition["interface"];
1091
- const data = chunkLRM6JXJA_cjs.isRecord(definition["data"]) ? definition["data"] : {};
1092
- const nodes = Array.isArray(data["nodes"]) ? data["nodes"].filter(chunkLRM6JXJA_cjs.isRecord) : [];
1093
- const edges = Array.isArray(data["edges"]) ? data["edges"].filter(chunkLRM6JXJA_cjs.isRecord) : [];
1082
+ if (!chunkSAENRNBJ_cjs.isRecord(definition)) return {};
1083
+ if (chunkSAENRNBJ_cjs.isRecord(definition["interface"])) return definition["interface"];
1084
+ const data = chunkSAENRNBJ_cjs.isRecord(definition["data"]) ? definition["data"] : {};
1085
+ const nodes = Array.isArray(data["nodes"]) ? data["nodes"].filter(chunkSAENRNBJ_cjs.isRecord) : [];
1086
+ const edges = Array.isArray(data["edges"]) ? data["edges"].filter(chunkSAENRNBJ_cjs.isRecord) : [];
1094
1087
  const derived = {};
1095
1088
  const call = nodes.find((node) => node["type"] === "internal:workflow-call");
1096
- const callArgs = chunkLRM6JXJA_cjs.isRecord(call?.["args"]) ? call["args"] : void 0;
1097
- const callState = chunkLRM6JXJA_cjs.isRecord(callArgs?.["state"]) ? callArgs["state"] : void 0;
1089
+ const callArgs = chunkSAENRNBJ_cjs.isRecord(call?.["args"]) ? call["args"] : void 0;
1090
+ const callState = chunkSAENRNBJ_cjs.isRecord(callArgs?.["state"]) ? callArgs["state"] : void 0;
1098
1091
  if (callState?.["inputSource"] === "fields" && typeof callState["workflowInputs"] === "string") {
1099
1092
  derived.input = workflowInputsSchema(callState["workflowInputs"]);
1100
1093
  }
@@ -1102,14 +1095,14 @@ function deriveInterface(definition, options = {}) {
1102
1095
  const terminals = nodes.filter((node) => !sources.has(node["id"]));
1103
1096
  const terminal = terminals.length === 1 ? terminals[0] : void 0;
1104
1097
  if (terminal && options.manifests && typeof terminal["type"] === "string") {
1105
- const manifest = chunkLSKSBVL4_cjs.findManifest(options.manifests, terminal["type"]);
1098
+ const manifest = chunkCPDK3K5N_cjs.findManifest(options.manifests, terminal["type"]);
1106
1099
  const operationName = typeof terminal["operation_name"] === "string" ? terminal["operation_name"] : void 0;
1107
- const operations = manifest ? chunkLSKSBVL4_cjs.operationsOf(manifest) : [];
1100
+ const operations = manifest ? chunkCPDK3K5N_cjs.operationsOf(manifest) : [];
1108
1101
  const operation = operationName ? operations.find((candidate) => candidate.name === operationName) : operations[0];
1109
1102
  if (operation?.output_fields) {
1110
1103
  derived.output = {
1111
1104
  $schema: "https://json-schema.org/draft/2020-12/schema",
1112
- ...chunkLSKSBVL4_cjs.fieldsSchema(operation.output_fields)
1105
+ ...chunkCPDK3K5N_cjs.fieldsSchema(operation.output_fields)
1113
1106
  };
1114
1107
  }
1115
1108
  }
@@ -1118,63 +1111,63 @@ function deriveInterface(definition, options = {}) {
1118
1111
 
1119
1112
  Object.defineProperty(exports, "diffDefinitions", {
1120
1113
  enumerable: true,
1121
- get: function () { return chunkBYJ7QTLY_cjs.diffDefinitions; }
1114
+ get: function () { return chunkNEIUQASE_cjs.diffDefinitions; }
1122
1115
  });
1123
1116
  Object.defineProperty(exports, "fieldSchema", {
1124
1117
  enumerable: true,
1125
- get: function () { return chunkLSKSBVL4_cjs.fieldSchema; }
1118
+ get: function () { return chunkCPDK3K5N_cjs.fieldSchema; }
1126
1119
  });
1127
1120
  Object.defineProperty(exports, "fieldsSchema", {
1128
1121
  enumerable: true,
1129
- get: function () { return chunkLSKSBVL4_cjs.fieldsSchema; }
1122
+ get: function () { return chunkCPDK3K5N_cjs.fieldsSchema; }
1130
1123
  });
1131
1124
  Object.defineProperty(exports, "findManifest", {
1132
1125
  enumerable: true,
1133
- get: function () { return chunkLSKSBVL4_cjs.findManifest; }
1126
+ get: function () { return chunkCPDK3K5N_cjs.findManifest; }
1134
1127
  });
1135
1128
  Object.defineProperty(exports, "isTriggerOperation", {
1136
1129
  enumerable: true,
1137
- get: function () { return chunkLSKSBVL4_cjs.isTriggerOperation; }
1130
+ get: function () { return chunkCPDK3K5N_cjs.isTriggerOperation; }
1138
1131
  });
1139
1132
  Object.defineProperty(exports, "operationsOf", {
1140
1133
  enumerable: true,
1141
- get: function () { return chunkLSKSBVL4_cjs.operationsOf; }
1134
+ get: function () { return chunkCPDK3K5N_cjs.operationsOf; }
1142
1135
  });
1143
1136
  Object.defineProperty(exports, "CODE_WORKFLOW_NODE_TYPE", {
1144
1137
  enumerable: true,
1145
- get: function () { return chunkAU3YW7FZ_cjs.CODE_WORKFLOW_NODE_TYPE; }
1138
+ get: function () { return chunkGBQ33SIZ_cjs.CODE_WORKFLOW_NODE_TYPE; }
1146
1139
  });
1147
1140
  Object.defineProperty(exports, "INTERNAL_TRIGGER_TYPES", {
1148
1141
  enumerable: true,
1149
- get: function () { return chunkAU3YW7FZ_cjs.INTERNAL_TRIGGER_TYPES; }
1142
+ get: function () { return chunkGBQ33SIZ_cjs.INTERNAL_TRIGGER_TYPES; }
1150
1143
  });
1151
1144
  Object.defineProperty(exports, "WAIT_FOR_SIGNAL_NODE_TYPE", {
1152
1145
  enumerable: true,
1153
- get: function () { return chunkAU3YW7FZ_cjs.WAIT_FOR_SIGNAL_NODE_TYPE; }
1146
+ get: function () { return chunkGBQ33SIZ_cjs.WAIT_FOR_SIGNAL_NODE_TYPE; }
1154
1147
  });
1155
1148
  Object.defineProperty(exports, "buildIdOf", {
1156
1149
  enumerable: true,
1157
- get: function () { return chunkAU3YW7FZ_cjs.buildIdOf; }
1150
+ get: function () { return chunkGBQ33SIZ_cjs.buildIdOf; }
1158
1151
  });
1159
1152
  Object.defineProperty(exports, "hashedProjection", {
1160
1153
  enumerable: true,
1161
- get: function () { return chunkAU3YW7FZ_cjs.hashedProjection; }
1154
+ get: function () { return chunkGBQ33SIZ_cjs.hashedProjection; }
1162
1155
  });
1163
1156
  Object.defineProperty(exports, "irHash", {
1164
1157
  enumerable: true,
1165
- get: function () { return chunkAU3YW7FZ_cjs.irHash; }
1158
+ get: function () { return chunkGBQ33SIZ_cjs.irHash; }
1166
1159
  });
1167
1160
  Object.defineProperty(exports, "normalizeDefinition", {
1168
1161
  enumerable: true,
1169
- get: function () { return chunkAU3YW7FZ_cjs.normalizeDefinition; }
1162
+ get: function () { return chunkGBQ33SIZ_cjs.normalizeDefinition; }
1170
1163
  });
1171
1164
  Object.defineProperty(exports, "sourceHash", {
1172
1165
  enumerable: true,
1173
- get: function () { return chunkAU3YW7FZ_cjs.sourceHash; }
1166
+ get: function () { return chunkGBQ33SIZ_cjs.sourceHash; }
1174
1167
  });
1175
1168
  Object.defineProperty(exports, "usesMergedParameters", {
1176
1169
  enumerable: true,
1177
- get: function () { return chunkAU3YW7FZ_cjs.usesMergedParameters; }
1170
+ get: function () { return chunkGBQ33SIZ_cjs.usesMergedParameters; }
1178
1171
  });
1179
1172
  Object.defineProperty(exports, "LAYOUT_COLUMN_WIDTH", {
1180
1173
  enumerable: true,
@@ -1190,39 +1183,43 @@ Object.defineProperty(exports, "autoLayout", {
1190
1183
  });
1191
1184
  Object.defineProperty(exports, "CanonicalJsonError", {
1192
1185
  enumerable: true,
1193
- get: function () { return chunk27HASETB_cjs.CanonicalJsonError; }
1186
+ get: function () { return chunkQKZL3ONM_cjs.CanonicalJsonError; }
1194
1187
  });
1195
1188
  Object.defineProperty(exports, "canonicalJson", {
1196
1189
  enumerable: true,
1197
- get: function () { return chunk27HASETB_cjs.canonicalJson; }
1190
+ get: function () { return chunkQKZL3ONM_cjs.canonicalJson; }
1198
1191
  });
1199
1192
  Object.defineProperty(exports, "sha256Hex", {
1200
1193
  enumerable: true,
1201
- get: function () { return chunk27HASETB_cjs.sha256Hex; }
1194
+ get: function () { return chunkQKZL3ONM_cjs.sha256Hex; }
1202
1195
  });
1203
1196
  Object.defineProperty(exports, "sha256Tagged", {
1204
1197
  enumerable: true,
1205
- get: function () { return chunk27HASETB_cjs.sha256Tagged; }
1198
+ get: function () { return chunkQKZL3ONM_cjs.sha256Tagged; }
1206
1199
  });
1207
1200
  Object.defineProperty(exports, "stableStringify", {
1208
1201
  enumerable: true,
1209
- get: function () { return chunk27HASETB_cjs.stableStringify; }
1202
+ get: function () { return chunkQKZL3ONM_cjs.stableStringify; }
1210
1203
  });
1211
1204
  Object.defineProperty(exports, "formatRefExpression", {
1212
1205
  enumerable: true,
1213
- get: function () { return chunkLRM6JXJA_cjs.formatRefExpression; }
1206
+ get: function () { return chunkTBDXTV22_cjs.formatRefExpression; }
1214
1207
  });
1215
1208
  Object.defineProperty(exports, "formatRefTemplate", {
1216
1209
  enumerable: true,
1217
- get: function () { return chunkLRM6JXJA_cjs.formatRefTemplate; }
1210
+ get: function () { return chunkTBDXTV22_cjs.formatRefTemplate; }
1218
1211
  });
1219
1212
  Object.defineProperty(exports, "parseRefExpression", {
1220
1213
  enumerable: true,
1221
- get: function () { return chunkLRM6JXJA_cjs.parseRefExpression; }
1214
+ get: function () { return chunkTBDXTV22_cjs.parseRefExpression; }
1222
1215
  });
1223
1216
  Object.defineProperty(exports, "parseTemplate", {
1224
1217
  enumerable: true,
1225
- get: function () { return chunkLRM6JXJA_cjs.parseTemplate; }
1218
+ get: function () { return chunkTBDXTV22_cjs.parseTemplate; }
1219
+ });
1220
+ Object.defineProperty(exports, "durationMs", {
1221
+ enumerable: true,
1222
+ get: function () { return chunkFR7KYWRO_cjs.durationMs; }
1226
1223
  });
1227
1224
  exports.IR_V2_SCHEMA = IR_V2_SCHEMA;
1228
1225
  exports.IR_V2_SCHEMA_ID = IR_V2_SCHEMA_ID;
@@ -1230,7 +1227,6 @@ exports.WORKFLOW_DOCUMENT_FORMAT = WORKFLOW_DOCUMENT_FORMAT;
1230
1227
  exports.buildExportDocument = buildExportDocument;
1231
1228
  exports.checkScheduleSpec = checkScheduleSpec;
1232
1229
  exports.deriveInterface = deriveInterface;
1233
- exports.durationMs = durationMs;
1234
1230
  exports.envelopeSchemaVersion = envelopeSchemaVersion;
1235
1231
  exports.executorNodeView = executorNodeView;
1236
1232
  exports.executorView = executorView;