@fluidgrids/workflows 2026.1027.1 → 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 (166) hide show
  1. package/README.md +144 -13
  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-TQF7MYEN.cjs → chunk-57MSZ24T.cjs} +134 -96
  11. package/dist/{chunk-EEAIM35V.js → chunk-5HDSBTBX.js} +64 -23
  12. package/dist/chunk-623FVQSN.cjs +251 -0
  13. package/dist/{chunk-W32BSO3M.js → chunk-6FSHT5IL.js} +2 -2
  14. package/dist/{chunk-E3APHA6O.cjs → chunk-7AAZGVKD.js} +1 -64
  15. package/dist/chunk-7NQ37GZU.js +73 -0
  16. package/dist/chunk-ABFZWYHT.js +612 -0
  17. package/dist/{chunk-6U446SKY.js → chunk-BD7ZPG53.js} +2 -2
  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-OSPTJCDI.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-IHKXLG6I.js → chunk-E2VK7J2C.js} +1 -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-7YR7DI7B.cjs → chunk-GBQ33SIZ.cjs} +44 -44
  29. package/dist/{chunk-6AIAC2FP.cjs → chunk-GVTZMA5C.cjs} +4 -4
  30. package/dist/chunk-H7KEVW2M.js +816 -0
  31. package/dist/{chunk-3M34AUIY.cjs → chunk-HR3BN4C4.cjs} +3 -3
  32. package/dist/chunk-IISBRUWJ.js +13 -0
  33. package/dist/chunk-JD2VQIDZ.cjs +15 -0
  34. package/dist/{chunk-UB2BHU2M.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-TWOYB4Y7.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-6BEW4QD6.js → chunk-QAN5MZEM.js} +1 -1
  43. package/dist/{chunk-CSYBNN3V.cjs → chunk-QKZL3ONM.cjs} +2 -2
  44. package/dist/chunk-SAENRNBJ.cjs +52 -0
  45. package/dist/{chunk-XBIID5DY.js → chunk-SMCANK3F.js} +5 -4
  46. package/dist/{chunk-UWQWD7BP.cjs → chunk-SX2PNKKT.cjs} +18 -17
  47. package/dist/{chunk-UJNHTS6D.js → chunk-TBDXTV22.cjs} +8 -45
  48. package/dist/chunk-VOKMAAJP.js +848 -0
  49. package/dist/{chunk-5AW745OG.js → chunk-XB53G2DK.js} +1 -1
  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 +152 -158
  66. package/dist/ir/index.d.cts +14 -4
  67. package/dist/ir/index.d.ts +14 -4
  68. package/dist/ir/index.js +41 -50
  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 +236 -12
  78. package/dist/quickjs/index.d.cts +46 -5
  79. package/dist/quickjs/index.d.ts +46 -5
  80. package/dist/quickjs/index.js +230 -9
  81. package/dist/roundtrip/index.cjs +333 -131
  82. package/dist/roundtrip/index.d.cts +39 -7
  83. package/dist/roundtrip/index.d.ts +39 -7
  84. package/dist/roundtrip/index.js +185 -13
  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-CrpUyd_3.d.ts → workflow-Bpr3vnA_.d.ts} +40 -160
  98. package/dist/workflow-C2a05WUJ.d.ts +444 -0
  99. package/dist/{assemble-DEf3znGD.d.cts → workflow-FXUkpIBc.d.cts} +40 -160
  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 +44 -5
  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-MBBKGD7K.js +0 -440
  162. package/dist/chunk-Y7NWR3WH.cjs +0 -450
  163. package/dist/lower-CXggJTIo.d.ts +0 -67
  164. package/dist/lower-DAzvsJCo.d.cts +0 -67
  165. package/dist/node-evaluator-CH3XCJND.cjs +0 -17
  166. package/dist/node-evaluator-TULXA3WE.js +0 -8
@@ -1,4 +1,4 @@
1
- import { runIsolateWorker, outcomeToCollection } from './chunk-MBBKGD7K.js';
1
+ import { runIsolateWorker, outcomeToCollection } from './chunk-H7KEVW2M.js';
2
2
 
3
3
  // src/generated/vm-worker-source.ts
4
4
  var VM_WORKER_SOURCE = '"use strict";\n\nvar import_node_worker_threads = require("node:worker_threads");\n\nfunction isRecord(value) {\n return typeof value === "object" && value !== null && !Array.isArray(value);\n}\n\nvar DETERMINISM_VIOLATION = "DeterminismViolation";\nvar DETERMINISM_PRELUDE = `(() => {\n const NAME = ${JSON.stringify(DETERMINISM_VIOLATION)};\n const fail = (what) => {\n const error = new Error(\n what + " is not allowed in workflow code: lowering must give the same IR on every build. Read times and random values at run time instead (for example wf.now)."\n );\n error.name = NAME;\n throw error;\n };\n const lock = (target, key, value) =>\n Object.defineProperty(target, key, { value, writable: false, enumerable: false, configurable: false });\n const RealDate = Date;\n const LockedDate = function Date(...args) {\n if (new.target === undefined) return fail("Date()");\n if (args.length === 0) return fail("new Date()");\n return Reflect.construct(RealDate, args, new.target);\n };\n lock(LockedDate, "prototype", RealDate.prototype);\n lock(RealDate.prototype, "constructor", LockedDate);\n lock(LockedDate, "now", function now() { return fail("Date.now()"); });\n lock(LockedDate, "parse", RealDate.parse);\n lock(LockedDate, "UTC", RealDate.UTC);\n lock(globalThis, "Date", LockedDate);\n lock(Math, "random", function random() { return fail("Math.random()"); });\n const crypto = globalThis.crypto;\n if (crypto !== null && typeof crypto === "object") {\n for (const name of ["getRandomValues", "randomUUID"]) {\n if (typeof crypto[name] === "function") lock(crypto, name, function () { return fail("crypto." + name + "()"); });\n }\n }\n const DateTimeFormat = typeof Intl === "object" && Intl !== null ? Intl.DateTimeFormat : undefined;\n if (typeof DateTimeFormat === "function") {\n const proto = DateTimeFormat.prototype;\n const format = Object.getOwnPropertyDescriptor(proto, "format");\n if (format && typeof format.get === "function") {\n const get = format.get;\n Object.defineProperty(proto, "format", {\n get() {\n const bound = get.call(this);\n return (date) => (date === undefined ? fail("Intl.DateTimeFormat format()") : bound(date));\n },\n enumerable: false,\n configurable: false,\n });\n }\n const formatToParts = proto.formatToParts;\n if (typeof formatToParts === "function") {\n lock(proto, "formatToParts", function (date) {\n return date === undefined ? fail("Intl.DateTimeFormat formatToParts()") : formatToParts.call(this, date);\n });\n }\n }\n})();\n`;\nfunction failure(kind, message) {\n return { ok: false, failure: kind, message };\n}\n\nvar import_node_vm = require("node:vm");\nvar import_node_util = require("node:util");\nvar BUNDLE_GLOBAL = "__fluidgridsBundle";\nfunction wrap(code) {\n return `(function () {\n const describe = (error) => {\n let name = "Error";\n let message = "";\n try {\n if (error !== null && (typeof error === "object" || typeof error === "function")) {\n const n = error.name;\n if (typeof n === "string") name = n;\n const m = error.message;\n message = typeof m === "string" ? m : m === undefined ? "" + error : "" + m;\n } else {\n message = "" + error;\n }\n } catch (_) {\n message = "a value whose message cannot be read was thrown";\n }\n return (name === ${JSON.stringify(DETERMINISM_VIOLATION)} ? "D" : "E") + message;\n };\n try {\n${code}\n;const __fluidgridsValue = ${BUNDLE_GLOBAL}.__fluidgrids;\n return typeof __fluidgridsValue === "string" ? "R" + __fluidgridsValue : "N";\n } catch (error) {\n try {\n return describe(error);\n } catch (_) {\n return "Ean error that cannot be described was thrown";\n }\n }\n})()`;\n}\nfunction hostErrorFields(error) {\n if (!import_node_util.types.isNativeError(error)) return {};\n const code = Object.getOwnPropertyDescriptor(error, "code")?.value;\n const message = Object.getOwnPropertyDescriptor(error, "message")?.value;\n return {\n ...typeof code === "string" ? { code } : {},\n ...typeof message === "string" ? { message } : {}\n };\n}\nfunction decode(result) {\n const tag = result.charAt(0);\n const rest = result.slice(1);\n if (tag === "R") return { ok: true, value: rest };\n if (tag === "N")\n return failure("no-collection", "The bundle did not export a workflow collection");\n if (tag === "D") return failure("determinism", rest);\n return failure("error", rest);\n}\nfunction runInVmContext(code, timeoutMs) {\n const context = (0, import_node_vm.createContext)(/* @__PURE__ */ Object.create(null), {\n codeGeneration: { strings: false, wasm: false },\n microtaskMode: "afterEvaluate",\n name: "fluidgrids-workflow-lowering"\n });\n const refuseImport = () => {\n throw new Error("Workflow code may not import modules at run time");\n };\n const deadline = Date.now() + timeoutMs;\n const run = (source, filename) => new import_node_vm.Script(source, { filename, importModuleDynamically: refuseImport }).runInContext(context, {\n timeout: Math.max(1, deadline - Date.now()),\n breakOnSigint: true\n });\n try {\n run(DETERMINISM_PRELUDE, "determinism-prelude.js");\n const result = run(wrap(code), "workflow-bundle.js");\n return typeof result === "string" ? decode(result) : failure("no-collection", "The bundle did not export a workflow collection");\n } catch (error) {\n const fields = hostErrorFields(error);\n if (fields.code === "ERR_SCRIPT_EXECUTION_TIMEOUT" || fields.message !== void 0 && /^Script execution timed out/.test(fields.message)) {\n return failure("timeout", `Evaluating the workflow code timed out after ${timeoutMs} ms`);\n }\n return failure("error", fields.message ?? "The workflow code could not be evaluated");\n }\n}\n\nprocess.on("unhandledRejection", () => void 0);\nvar input = import_node_worker_threads.workerData;\nimport_node_worker_threads.parentPort?.postMessage(\n isRecord(input) && typeof input["code"] === "string" && typeof input["timeoutMs"] === "number" ? runInVmContext(input["code"], input["timeoutMs"]) : failure("crashed", "The evaluation worker received no bundle")\n);\n';
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ // node_modules/tsup/assets/cjs_shims.js
4
+ var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
5
+ var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
6
+
7
+ exports.importMetaUrl = importMetaUrl;
@@ -1,18 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var chunkUWQWD7BP_cjs = require('../chunk-UWQWD7BP.cjs');
4
- require('../chunk-OSPTJCDI.cjs');
5
- require('../chunk-6AIAC2FP.cjs');
6
- require('../chunk-CSYBNN3V.cjs');
7
- require('../chunk-E3APHA6O.cjs');
3
+ var chunkSX2PNKKT_cjs = require('../chunk-SX2PNKKT.cjs');
4
+ require('../chunk-CPDK3K5N.cjs');
5
+ require('../chunk-GVTZMA5C.cjs');
6
+ require('../chunk-QKZL3ONM.cjs');
7
+ require('../chunk-TBDXTV22.cjs');
8
+ require('../chunk-SAENRNBJ.cjs');
9
+ require('../chunk-Z2Y65YOY.cjs');
8
10
 
9
11
 
10
12
 
11
13
  Object.defineProperty(exports, "generateNodeClients", {
12
14
  enumerable: true,
13
- get: function () { return chunkUWQWD7BP_cjs.generateNodeClients; }
15
+ get: function () { return chunkSX2PNKKT_cjs.generateNodeClients; }
14
16
  });
15
17
  Object.defineProperty(exports, "registrySnapshotHash", {
16
18
  enumerable: true,
17
- get: function () { return chunkUWQWD7BP_cjs.registrySnapshotHash; }
19
+ get: function () { return chunkSX2PNKKT_cjs.registrySnapshotHash; }
18
20
  });
@@ -1,5 +1,5 @@
1
- import { N as NodeManifest } from '../manifest-Duf-gHdO.cjs';
2
- import '../types-Dr2Fn1Ax.cjs';
1
+ import { N as NodeManifest } from '../manifest-0OLw0i7k.cjs';
2
+ import '../types-BGoPzgcl.cjs';
3
3
 
4
4
  interface GeneratedClients {
5
5
  path: string;
@@ -1,5 +1,5 @@
1
- import { N as NodeManifest } from '../manifest-Bp9ZJlav.js';
2
- import '../types-Dr2Fn1Ax.js';
1
+ import { N as NodeManifest } from '../manifest-C8N6HDYl.js';
2
+ import '../types-BGoPzgcl.js';
3
3
 
4
4
  interface GeneratedClients {
5
5
  path: string;
@@ -1,5 +1,6 @@
1
- export { generateNodeClients, registrySnapshotHash } from '../chunk-XBIID5DY.js';
2
- import '../chunk-6BEW4QD6.js';
3
- import '../chunk-UB2BHU2M.js';
4
- import '../chunk-IHKXLG6I.js';
5
- import '../chunk-UJNHTS6D.js';
1
+ export { generateNodeClients, registrySnapshotHash } from '../chunk-SMCANK3F.js';
2
+ import '../chunk-QAN5MZEM.js';
3
+ import '../chunk-JZ4TOOLN.js';
4
+ import '../chunk-E2VK7J2C.js';
5
+ import '../chunk-7AAZGVKD.js';
6
+ import '../chunk-PMCM2OH4.js';