@particle-academy/fancy-flow 0.65.2 → 0.66.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 (112) hide show
  1. package/README.md +100 -3
  2. package/dist/{FlowViewer-BI_AyyvU.d.ts → FlowViewer-BCc_BvuD.d.ts} +1 -1
  3. package/dist/{FlowViewer-DABx-6A-.d.cts → FlowViewer-CoAJ3o52.d.cts} +1 -1
  4. package/dist/{HumanPrompt-Bpp3JiVH.d.cts → HumanPrompt--pXDOyYC.d.cts} +2 -2
  5. package/dist/{HumanPrompt-BKThiyjB.d.ts → HumanPrompt-DXm_FP9z.d.ts} +2 -2
  6. package/dist/chunk-27RZJAE2.js +2586 -0
  7. package/dist/chunk-27RZJAE2.js.map +1 -0
  8. package/dist/{chunk-MBVX4ZRB.js → chunk-2QTEELJE.js} +4 -3
  9. package/dist/chunk-2QTEELJE.js.map +1 -0
  10. package/dist/chunk-2QXKDLGT.js +58 -0
  11. package/dist/chunk-2QXKDLGT.js.map +1 -0
  12. package/dist/{chunk-W5DPKJY4.js → chunk-6AYC3BWI.js} +4 -4
  13. package/dist/chunk-6AYC3BWI.js.map +1 -0
  14. package/dist/{chunk-5H54OTKT.js → chunk-6TH646CS.js} +127 -5
  15. package/dist/chunk-6TH646CS.js.map +1 -0
  16. package/dist/{chunk-EO6444T2.js → chunk-BUNFPBTF.js} +5 -4
  17. package/dist/chunk-BUNFPBTF.js.map +1 -0
  18. package/dist/{chunk-77V4QC6Y.js → chunk-FV3D366L.js} +3 -3
  19. package/dist/{chunk-77V4QC6Y.js.map → chunk-FV3D366L.js.map} +1 -1
  20. package/dist/{chunk-JF6WCRBU.js → chunk-OWENS2H5.js} +36 -1905
  21. package/dist/chunk-OWENS2H5.js.map +1 -0
  22. package/dist/{chunk-RIAFHQT5.js → chunk-RE3XNVSB.js} +3 -3
  23. package/dist/{chunk-RIAFHQT5.js.map → chunk-RE3XNVSB.js.map} +1 -1
  24. package/dist/connectors.d.cts +2 -2
  25. package/dist/connectors.d.ts +2 -2
  26. package/dist/durable/index.d.cts +2 -2
  27. package/dist/durable/index.d.ts +2 -2
  28. package/dist/durable.cjs +865 -9135
  29. package/dist/durable.cjs.map +1 -1
  30. package/dist/durable.js +2 -4
  31. package/dist/durable.js.map +1 -1
  32. package/dist/engine.cjs +927 -9278
  33. package/dist/engine.cjs.map +1 -1
  34. package/dist/engine.d.cts +6 -7
  35. package/dist/engine.d.ts +6 -7
  36. package/dist/engine.js +5 -7
  37. package/dist/engine.js.map +1 -1
  38. package/dist/fields/react-fancy.d.cts +3 -3
  39. package/dist/fields/react-fancy.d.ts +3 -3
  40. package/dist/index.cjs +11009 -10282
  41. package/dist/index.cjs.map +1 -1
  42. package/dist/index.d.cts +65 -36
  43. package/dist/index.d.ts +65 -36
  44. package/dist/index.js +22 -19
  45. package/dist/index.js.map +1 -1
  46. package/dist/layout/index.d.cts +1 -1
  47. package/dist/layout/index.d.ts +1 -1
  48. package/dist/llm/prism.cjs.map +1 -1
  49. package/dist/llm/prism.d.cts +1 -2
  50. package/dist/llm/prism.d.ts +1 -2
  51. package/dist/llm/prism.js +1 -1
  52. package/dist/llm/vercel-ai.cjs.map +1 -1
  53. package/dist/llm/vercel-ai.d.cts +1 -2
  54. package/dist/llm/vercel-ai.d.ts +1 -2
  55. package/dist/llm/vercel-ai.js +1 -1
  56. package/dist/registry/index.d.cts +20 -9
  57. package/dist/registry/index.d.ts +20 -9
  58. package/dist/{registry-CntAdUcY.d.cts → registry-BcgllSk2.d.cts} +1 -1
  59. package/dist/{registry-DYoV-MQi.d.ts → registry-h-2QswZ5.d.ts} +1 -1
  60. package/dist/registry.cjs +11252 -10409
  61. package/dist/registry.cjs.map +1 -1
  62. package/dist/registry.js +5 -4
  63. package/dist/{run-cohort-C1nRh_mi.d.ts → run-cohort-CjUBWg6X.d.ts} +2 -2
  64. package/dist/{run-cohort-CBRAUj-z.d.cts → run-cohort-DL9JzzPU.d.cts} +2 -2
  65. package/dist/{run-flow-2XsHBwpd.d.cts → run-flow-B_8hgO5_.d.cts} +1 -1
  66. package/dist/{run-flow-D7AOCcfE.d.ts → run-flow-CxEGBOxd.d.ts} +1 -1
  67. package/dist/runtime/index.d.cts +5 -5
  68. package/dist/runtime/index.d.ts +5 -5
  69. package/dist/runtime.cjs +10843 -10194
  70. package/dist/runtime.cjs.map +1 -1
  71. package/dist/runtime.js +5 -5
  72. package/dist/schema/index.d.cts +19 -6
  73. package/dist/schema/index.d.ts +19 -6
  74. package/dist/schema.cjs +881 -9142
  75. package/dist/schema.cjs.map +1 -1
  76. package/dist/schema.js +4 -5
  77. package/dist/screens.cjs +842 -86
  78. package/dist/screens.cjs.map +1 -1
  79. package/dist/screens.d.cts +2 -2
  80. package/dist/screens.d.ts +2 -2
  81. package/dist/screens.js +7 -6
  82. package/dist/screens.js.map +1 -1
  83. package/dist/terminal/fancy-term-host.cjs +99 -0
  84. package/dist/terminal/fancy-term-host.cjs.map +1 -0
  85. package/dist/terminal/fancy-term-host.d.cts +76 -0
  86. package/dist/terminal/fancy-term-host.d.ts +76 -0
  87. package/dist/terminal/fancy-term-host.js +92 -0
  88. package/dist/terminal/fancy-term-host.js.map +1 -0
  89. package/dist/types-B-Syk9-M.d.cts +620 -0
  90. package/dist/types-B-Syk9-M.d.ts +620 -0
  91. package/dist/{types-D71SKA5A.d.cts → types-C2ATTmjN.d.cts} +1 -1
  92. package/dist/{types-Ckhz-YwC.d.ts → types-VunLGqrn.d.ts} +1 -1
  93. package/dist/ux.cjs +885 -9142
  94. package/dist/ux.cjs.map +1 -1
  95. package/dist/ux.d.cts +2 -2
  96. package/dist/ux.d.ts +2 -2
  97. package/dist/ux.js +2 -3
  98. package/dist/ux.js.map +1 -1
  99. package/package.json +11 -1
  100. package/dist/capabilities-BYa5p5jw.d.cts +0 -112
  101. package/dist/capabilities-COOXRiNL.d.ts +0 -112
  102. package/dist/chunk-5H54OTKT.js.map +0 -1
  103. package/dist/chunk-EO6444T2.js.map +0 -1
  104. package/dist/chunk-JF6WCRBU.js.map +0 -1
  105. package/dist/chunk-MBVX4ZRB.js.map +0 -1
  106. package/dist/chunk-UM4C46AF.js +0 -103
  107. package/dist/chunk-UM4C46AF.js.map +0 -1
  108. package/dist/chunk-USL4FMFU.js +0 -41
  109. package/dist/chunk-USL4FMFU.js.map +0 -1
  110. package/dist/chunk-W5DPKJY4.js.map +0 -1
  111. package/dist/types-JFYjPJAG.d.cts +0 -333
  112. package/dist/types-JFYjPJAG.d.ts +0 -333
@@ -1,4 +1,4 @@
1
- import { runFlow } from './chunk-JF6WCRBU.js';
1
+ import { runFlow } from './chunk-27RZJAE2.js';
2
2
 
3
3
  // src/runtime/run-cohort.ts
4
4
  async function runCohort(flows, executors, onEvent = () => {
@@ -46,5 +46,5 @@ function errorText(error) {
46
46
  }
47
47
 
48
48
  export { runCohort };
49
- //# sourceMappingURL=chunk-RIAFHQT5.js.map
50
- //# sourceMappingURL=chunk-RIAFHQT5.js.map
49
+ //# sourceMappingURL=chunk-RE3XNVSB.js.map
50
+ //# sourceMappingURL=chunk-RE3XNVSB.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/runtime/run-cohort.ts"],"names":[],"mappings":";;;AAoFA,eAAsB,SAAA,CACpB,KAAA,EACA,SAAA,EACA,OAAA,GAAoD,MAAM;AAAC,CAAA,EAC3D,OAAA,GAAyB,EAAC,EACD;AACzB,EAAA,MAAM,EAAE,MAAA,GAAS,gBAAA,EAAkB,OAAO,MAAA,EAAQ,GAAG,YAAW,GAAI,OAAA;AAEpE,EAAA,IAAI,WAAW,UAAA,EAAY;AACzB,IAAA,OAAO,OAAA,CAAQ,GAAA;AAAA,MACb,KAAA,CAAM,GAAA,CAAI,OAAO,IAAA,EAAM,KAAA,MAAW;AAAA,QAChC,GAAI,MAAM,OAAA,CAAQ,IAAA,EAAM,SAAA,EAAW,CAAC,CAAA,KAAM,OAAA,CAAQ,CAAA,EAAG,KAAK,CAAA,EAAG,UAAU,CAAA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GAAQ,KAAA,CAAM,OAAA,GAAU,OAAO,KAAK,CAAA;AAC9D","file":"chunk-RIAFHQT5.js","sourcesContent":["import type { ExecutorRegistry, FlowGraph, RunEvent } from \"../types\";\nimport { runFlow, type RunOptions, type RunResult } from \"./run-flow\";\n\n/**\n * How the flows one trigger fired should treat each other.\n *\n * - `serial-guarded` (default) — run in the declared order, one at a time,\n * re-checking `guard` immediately before each. This is the safe default\n * because it is the only one that notices when an earlier flow invalidated\n * the state a later one was fired for.\n * - `serial` — ordered, one at a time, unguarded.\n * - `parallel` — all at once. Ordering is incidental and collisions are yours to\n * handle; correct for fan-outs that share no state, and only those.\n */\nexport type CohortPolicy = \"serial-guarded\" | \"serial\" | \"parallel\";\n\n/**\n * The precondition re-checked just before each flow starts.\n *\n * Return `false` (or throw) to skip that flow. The engine cannot know what\n * \"still valid\" means for your data, so it asks you — right before the run,\n * not at dispatch, because the whole hazard is what changed in between.\n */\nexport type CohortGuard = (\n flow: FlowGraph,\n index: number,\n) => boolean | Promise<boolean>;\n\nexport type CohortOptions = RunOptions & {\n policy?: CohortPolicy;\n guard?: CohortGuard;\n /** Why the guard said no — recorded on the skipped result. */\n reason?: (flow: FlowGraph, index: number) => string;\n};\n\nexport type CohortResult = RunResult & {\n index: number;\n /** True when the flow never ran because its guard did not pass. */\n skipped?: boolean;\n skippedReason?: string;\n};\n\n/**\n * runCohort — run every flow that one trigger event fired, as a group.\n *\n * ## Why this exists\n *\n * `runFlow` runs one graph. A host that fans a single webhook, schedule, or\n * record change out to several flows usually loops it — and a loop, or worse a\n * `Promise.all`, has no answer for the case that actually bites: one of those\n * flows deletes or mutates the record they were ALL fired for. The others then\n * run against state that is no longer there and resolve `ok: true`, having done\n * nothing. Nothing throws. Nothing is logged. That silent success is the failure\n * mode this function exists to remove.\n *\n * ## What it does\n *\n * Runs the flows in the order you declared, one at a time, and calls `guard`\n * immediately before each. A flow whose guard does not pass is returned with\n * `skipped: true` and a reason instead of being run — and the cohort carries on\n * to the next one.\n *\n * ```ts\n * const results = await runCohort([enrich, archive, notify], executors, undefined, {\n * initialInputs: { t: { deal } }, // snapshotted once, shared by all\n * guard: async () => Boolean(await findDeal(deal.id)),\n * reason: () => `deal ${deal.id} no longer exists`,\n * });\n * ```\n *\n * If `archive` deletes the deal, `notify` comes back skipped with that reason\n * rather than notifying about nothing.\n *\n * ## Failure does not cancel the cohort\n *\n * A flow that fails is reported and the next one still runs. \"The flow before me\n * threw\" is not an answer to \"is my input still there\" — the guard is, and it\n * gets asked either way.\n *\n * The Laravel twin (`FancyFlow::dispatchCohort()` in `fancy-flow-php`) is the\n * same contract across a queue, where each run is durable and hands on to its\n * successor when it settles. Same policies, same guard semantics, same\n * fail-closed rule.\n */\nexport async function runCohort(\n flows: FlowGraph[],\n executors: ExecutorRegistry,\n onEvent: (event: RunEvent, index: number) => void = () => {},\n options: CohortOptions = {},\n): Promise<CohortResult[]> {\n const { policy = \"serial-guarded\", guard, reason, ...runOptions } = options;\n\n if (policy === \"parallel\") {\n return Promise.all(\n flows.map(async (flow, index) => ({\n ...(await runFlow(flow, executors, (e) => onEvent(e, index), runOptions)),\n index,\n })),\n );\n }\n\n const results: CohortResult[] = [];\n\n for (const [index, flow] of flows.entries()) {\n if (policy === \"serial-guarded\" && guard) {\n const why = () => reason?.(flow, index) ?? \"trigger precondition no longer holds\";\n let passes: boolean;\n\n try {\n passes = await guard(flow, index);\n } catch (error) {\n // Fail CLOSED. A guard that cannot answer is not permission to proceed:\n // a skip is visible and re-runnable, a run over missing state is neither.\n results.push({\n ok: false,\n outputs: {},\n index,\n skipped: true,\n skippedReason: `guard could not be evaluated: ${errorText(error)}`,\n });\n continue;\n }\n\n if (!passes) {\n results.push({ ok: false, outputs: {}, index, skipped: true, skippedReason: why() });\n continue;\n }\n }\n\n results.push({\n ...(await runFlow(flow, executors, (e) => onEvent(e, index), runOptions)),\n index,\n });\n }\n\n return results;\n}\n\nfunction errorText(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n"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AAEA,MAAA,IAAI,CAAC,MAAA,EAAQ;AACX,QAAA,OAAA,CAAQ,IAAA,CAAK,EAAE,EAAA,EAAI,KAAA,EAAO,OAAA,EAAS,EAAC,EAAG,KAAA,EAAO,OAAA,EAAS,IAAA,EAAM,aAAA,EAAe,GAAA,IAAO,CAAA;AACnF,QAAA;AAAA,MACF;AAAA,IACF;AAEA,IAAA,OAAA,CAAQ,IAAA,CAAK;AAAA,MACX,GAAI,MAAM,OAAA,CAAQ,IAAA,EAAM,SAAA,EAAW,CAAC,CAAA,KAAM,OAAA,CAAQ,CAAA,EAAG,KAAK,CAAA,EAAG,UAAU,CAAA;AAAA,MACvE;AAAA,KACD,CAAA;AAAA,EACH;AAEA,EAAA,OAAO,OAAA;AACT;AAEA,SAAS,UAAU,KAAA,EAAwB;AACzC,EAAA,OAAO,KAAA,YAAiB,KAAA,GAAQ,KAAA,CAAM,OAAA,GAAU,OAAO,KAAK,CAAA;AAC9D","file":"chunk-RE3XNVSB.js","sourcesContent":["import type { ExecutorRegistry, FlowGraph, RunEvent } from \"../types\";\nimport { runFlow, type RunOptions, type RunResult } from \"./run-flow\";\n\n/**\n * How the flows one trigger fired should treat each other.\n *\n * - `serial-guarded` (default) — run in the declared order, one at a time,\n * re-checking `guard` immediately before each. This is the safe default\n * because it is the only one that notices when an earlier flow invalidated\n * the state a later one was fired for.\n * - `serial` — ordered, one at a time, unguarded.\n * - `parallel` — all at once. Ordering is incidental and collisions are yours to\n * handle; correct for fan-outs that share no state, and only those.\n */\nexport type CohortPolicy = \"serial-guarded\" | \"serial\" | \"parallel\";\n\n/**\n * The precondition re-checked just before each flow starts.\n *\n * Return `false` (or throw) to skip that flow. The engine cannot know what\n * \"still valid\" means for your data, so it asks you — right before the run,\n * not at dispatch, because the whole hazard is what changed in between.\n */\nexport type CohortGuard = (\n flow: FlowGraph,\n index: number,\n) => boolean | Promise<boolean>;\n\nexport type CohortOptions = RunOptions & {\n policy?: CohortPolicy;\n guard?: CohortGuard;\n /** Why the guard said no — recorded on the skipped result. */\n reason?: (flow: FlowGraph, index: number) => string;\n};\n\nexport type CohortResult = RunResult & {\n index: number;\n /** True when the flow never ran because its guard did not pass. */\n skipped?: boolean;\n skippedReason?: string;\n};\n\n/**\n * runCohort — run every flow that one trigger event fired, as a group.\n *\n * ## Why this exists\n *\n * `runFlow` runs one graph. A host that fans a single webhook, schedule, or\n * record change out to several flows usually loops it — and a loop, or worse a\n * `Promise.all`, has no answer for the case that actually bites: one of those\n * flows deletes or mutates the record they were ALL fired for. The others then\n * run against state that is no longer there and resolve `ok: true`, having done\n * nothing. Nothing throws. Nothing is logged. That silent success is the failure\n * mode this function exists to remove.\n *\n * ## What it does\n *\n * Runs the flows in the order you declared, one at a time, and calls `guard`\n * immediately before each. A flow whose guard does not pass is returned with\n * `skipped: true` and a reason instead of being run — and the cohort carries on\n * to the next one.\n *\n * ```ts\n * const results = await runCohort([enrich, archive, notify], executors, undefined, {\n * initialInputs: { t: { deal } }, // snapshotted once, shared by all\n * guard: async () => Boolean(await findDeal(deal.id)),\n * reason: () => `deal ${deal.id} no longer exists`,\n * });\n * ```\n *\n * If `archive` deletes the deal, `notify` comes back skipped with that reason\n * rather than notifying about nothing.\n *\n * ## Failure does not cancel the cohort\n *\n * A flow that fails is reported and the next one still runs. \"The flow before me\n * threw\" is not an answer to \"is my input still there\" — the guard is, and it\n * gets asked either way.\n *\n * The Laravel twin (`FancyFlow::dispatchCohort()` in `fancy-flow-php`) is the\n * same contract across a queue, where each run is durable and hands on to its\n * successor when it settles. Same policies, same guard semantics, same\n * fail-closed rule.\n */\nexport async function runCohort(\n flows: FlowGraph[],\n executors: ExecutorRegistry,\n onEvent: (event: RunEvent, index: number) => void = () => {},\n options: CohortOptions = {},\n): Promise<CohortResult[]> {\n const { policy = \"serial-guarded\", guard, reason, ...runOptions } = options;\n\n if (policy === \"parallel\") {\n return Promise.all(\n flows.map(async (flow, index) => ({\n ...(await runFlow(flow, executors, (e) => onEvent(e, index), runOptions)),\n index,\n })),\n );\n }\n\n const results: CohortResult[] = [];\n\n for (const [index, flow] of flows.entries()) {\n if (policy === \"serial-guarded\" && guard) {\n const why = () => reason?.(flow, index) ?? \"trigger precondition no longer holds\";\n let passes: boolean;\n\n try {\n passes = await guard(flow, index);\n } catch (error) {\n // Fail CLOSED. A guard that cannot answer is not permission to proceed:\n // a skip is visible and re-runnable, a run over missing state is neither.\n results.push({\n ok: false,\n outputs: {},\n index,\n skipped: true,\n skippedReason: `guard could not be evaluated: ${errorText(error)}`,\n });\n continue;\n }\n\n if (!passes) {\n results.push({ ok: false, outputs: {}, index, skipped: true, skippedReason: why() });\n continue;\n }\n }\n\n results.push({\n ...(await runFlow(flow, executors, (e) => onEvent(e, index), runOptions)),\n index,\n });\n }\n\n return results;\n}\n\nfunction errorText(error: unknown): string {\n return error instanceof Error ? error.message : String(error);\n}\n"]}
@@ -1,6 +1,6 @@
1
- import { C as ConfigField, N as NodeKindDefinition, O as OutputField } from './types-D71SKA5A.cjs';
1
+ import { C as ConfigField, N as NodeKindDefinition, O as OutputField } from './types-C2ATTmjN.cjs';
2
2
  import 'react';
3
- import './types-JFYjPJAG.cjs';
3
+ import './types-B-Syk9-M.cjs';
4
4
  import '@xyflow/react';
5
5
  import './pause-9iT4tCEV.cjs';
6
6
 
@@ -1,6 +1,6 @@
1
- import { C as ConfigField, N as NodeKindDefinition, O as OutputField } from './types-Ckhz-YwC.js';
1
+ import { C as ConfigField, N as NodeKindDefinition, O as OutputField } from './types-VunLGqrn.js';
2
2
  import 'react';
3
- import './types-JFYjPJAG.js';
3
+ import './types-B-Syk9-M.js';
4
4
  import '@xyflow/react';
5
5
  import './pause-9iT4tCEV.js';
6
6
 
@@ -1,5 +1,5 @@
1
- import { F as FlowGraph, R as RunEvent, b as RunIdentity, E as ExecutorRegistry, a as FlowNode, N as NodeExecutor, c as RunIdentityJson } from '../types-JFYjPJAG.cjs';
2
- import { a as RunResult } from '../run-flow-2XsHBwpd.cjs';
1
+ import { F as FlowGraph, R as RunEvent, c as RunIdentity, E as ExecutorRegistry, a as FlowNode, N as NodeExecutor, d as RunIdentityJson } from '../types-B-Syk9-M.cjs';
2
+ import { a as RunResult } from '../run-flow-B_8hgO5_.cjs';
3
3
  import { b as PauseSignal } from '../pause-9iT4tCEV.cjs';
4
4
  import '@xyflow/react';
5
5
 
@@ -1,5 +1,5 @@
1
- import { F as FlowGraph, R as RunEvent, b as RunIdentity, E as ExecutorRegistry, a as FlowNode, N as NodeExecutor, c as RunIdentityJson } from '../types-JFYjPJAG.js';
2
- import { a as RunResult } from '../run-flow-D7AOCcfE.js';
1
+ import { F as FlowGraph, R as RunEvent, c as RunIdentity, E as ExecutorRegistry, a as FlowNode, N as NodeExecutor, d as RunIdentityJson } from '../types-B-Syk9-M.js';
2
+ import { a as RunResult } from '../run-flow-CxEGBOxd.js';
3
3
  import { b as PauseSignal } from '../pause-9iT4tCEV.js';
4
4
  import '@xyflow/react';
5
5