@particle-academy/fancy-flow 0.45.0 → 0.47.0

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 (101) hide show
  1. package/README.md +29 -0
  2. package/dist/{ConfigFieldRenderer-Dzy4f6rG.d.cts → ConfigFieldRenderer-Cyir8-B8.d.cts} +2 -2
  3. package/dist/{ConfigFieldRenderer-WqJr-td_.d.ts → ConfigFieldRenderer-iMkZj0VK.d.ts} +2 -2
  4. package/dist/{FlowViewer-BbbUJe2b.d.cts → FlowViewer-CY3_vHSg.d.cts} +1 -1
  5. package/dist/{FlowViewer-csuaTL5t.d.ts → FlowViewer-DGW6t-80.d.ts} +1 -1
  6. package/dist/{capabilities-Brn74URS.d.ts → capabilities-DMUhnyZD.d.ts} +1 -1
  7. package/dist/{capabilities-CYCeIx6I.d.cts → capabilities-Dmd26aAs.d.cts} +1 -1
  8. package/dist/chunk-BHM5HGXH.js +79 -0
  9. package/dist/chunk-BHM5HGXH.js.map +1 -0
  10. package/dist/chunk-DR3GWVDG.js +196 -0
  11. package/dist/chunk-DR3GWVDG.js.map +1 -0
  12. package/dist/{chunk-3BKU4SQZ.js → chunk-ISXRQELT.js} +3 -4
  13. package/dist/chunk-ISXRQELT.js.map +1 -0
  14. package/dist/{chunk-OWENS2H5.js → chunk-NDEX655E.js} +1603 -36
  15. package/dist/chunk-NDEX655E.js.map +1 -0
  16. package/dist/{chunk-QZTGV3ZL.js → chunk-QVFVL5LQ.js} +3 -3
  17. package/dist/{chunk-QZTGV3ZL.js.map → chunk-QVFVL5LQ.js.map} +1 -1
  18. package/dist/{chunk-DHUFUDEX.js → chunk-Z2GRNYR2.js} +7 -6
  19. package/dist/chunk-Z2GRNYR2.js.map +1 -0
  20. package/dist/{chunk-A6RFLGWV.js → chunk-ZKJJWBDJ.js} +3 -5
  21. package/dist/chunk-ZKJJWBDJ.js.map +1 -0
  22. package/dist/durable/index.d.cts +490 -0
  23. package/dist/durable/index.d.ts +490 -0
  24. package/dist/durable.cjs +10991 -0
  25. package/dist/durable.cjs.map +1 -0
  26. package/dist/durable.js +552 -0
  27. package/dist/durable.js.map +1 -0
  28. package/dist/engine.cjs +10223 -47
  29. package/dist/engine.cjs.map +1 -1
  30. package/dist/engine.d.cts +9 -7
  31. package/dist/engine.d.ts +9 -7
  32. package/dist/engine.js +4 -6
  33. package/dist/engine.js.map +1 -1
  34. package/dist/fields/react-fancy.d.cts +4 -3
  35. package/dist/fields/react-fancy.d.ts +4 -3
  36. package/dist/index.cjs +336 -194
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.cts +12 -10
  39. package/dist/index.d.ts +12 -10
  40. package/dist/index.js +15 -93
  41. package/dist/index.js.map +1 -1
  42. package/dist/layout/index.d.cts +1 -1
  43. package/dist/layout/index.d.ts +1 -1
  44. package/dist/llm/prism.d.cts +2 -2
  45. package/dist/llm/prism.d.ts +2 -2
  46. package/dist/llm/vercel-ai.d.cts +2 -2
  47. package/dist/llm/vercel-ai.d.ts +2 -2
  48. package/dist/pause-9iT4tCEV.d.cts +96 -0
  49. package/dist/pause-9iT4tCEV.d.ts +96 -0
  50. package/dist/registry/index.d.cts +7 -6
  51. package/dist/registry/index.d.ts +7 -6
  52. package/dist/{registry-Budds73w.d.cts → registry-Bt55f63_.d.ts} +21 -2
  53. package/dist/{registry-D0I20HJ3.d.ts → registry-CkcSwmfR.d.cts} +21 -2
  54. package/dist/registry.cjs +3961 -3821
  55. package/dist/registry.cjs.map +1 -1
  56. package/dist/registry.js +3 -6
  57. package/dist/{run-cohort-CV7EcwGG.d.ts → run-cohort-Cyeny2Uu.d.ts} +3 -34
  58. package/dist/{run-cohort-DitsaYgS.d.cts → run-cohort-DdPPowJ3.d.cts} +3 -34
  59. package/dist/run-flow-1KiXhy59.d.cts +55 -0
  60. package/dist/run-flow-CQvTDBYk.d.ts +55 -0
  61. package/dist/runtime/index.d.cts +5 -3
  62. package/dist/runtime/index.d.ts +5 -3
  63. package/dist/runtime.cjs +1712 -430
  64. package/dist/runtime.cjs.map +1 -1
  65. package/dist/runtime.js +5 -6
  66. package/dist/schema/index.d.cts +1 -1
  67. package/dist/schema/index.d.ts +1 -1
  68. package/dist/schema.cjs +10369 -24
  69. package/dist/schema.cjs.map +1 -1
  70. package/dist/schema.js +4 -3
  71. package/dist/screens.cjs +1366 -38
  72. package/dist/screens.cjs.map +1 -1
  73. package/dist/screens.d.cts +2 -2
  74. package/dist/screens.d.ts +2 -2
  75. package/dist/screens.js +5 -8
  76. package/dist/screens.js.map +1 -1
  77. package/dist/{types-D6ZSKBly.d.ts → types--S2Kzx7w.d.cts} +3 -97
  78. package/dist/{types-nQOA8jpk.d.cts → types-ChkCRonF.d.ts} +3 -97
  79. package/dist/types-Jx1TwehV.d.cts +247 -0
  80. package/dist/types-Jx1TwehV.d.ts +247 -0
  81. package/dist/ux.cjs +10363 -2
  82. package/dist/ux.cjs.map +1 -1
  83. package/dist/ux.d.cts +3 -2
  84. package/dist/ux.d.ts +3 -2
  85. package/dist/ux.js +3 -1
  86. package/dist/ux.js.map +1 -1
  87. package/package.json +17 -3
  88. package/dist/chunk-3BKU4SQZ.js.map +0 -1
  89. package/dist/chunk-A6RFLGWV.js.map +0 -1
  90. package/dist/chunk-DHUFUDEX.js.map +0 -1
  91. package/dist/chunk-OWENS2H5.js.map +0 -1
  92. package/dist/chunk-PVROYW7C.js +0 -187
  93. package/dist/chunk-PVROYW7C.js.map +0 -1
  94. package/dist/chunk-TITD5W4Y.js +0 -26
  95. package/dist/chunk-TITD5W4Y.js.map +0 -1
  96. package/dist/chunk-VLATLVGH.js +0 -158
  97. package/dist/chunk-VLATLVGH.js.map +0 -1
  98. package/dist/chunk-WBXGZVLB.js +0 -1268
  99. package/dist/chunk-WBXGZVLB.js.map +0 -1
  100. package/dist/types-CMSrWVYM.d.cts +0 -109
  101. package/dist/types-CMSrWVYM.d.ts +0 -109
package/dist/registry.js CHANGED
@@ -1,10 +1,7 @@
1
- export { ANY_PORT_TYPE, BUILTIN_KINDS, DEFAULT_MAX_DEPTH, RegistryNode, buildNodeTypes, createConnectionValidator, declaredRoutes, defaultPortCompatibility, llmRouterExecutor as llmBranchExecutor, llmRouterExecutor, registerBuiltinKinds, resolveFallbackPort, subflowExecutor, subflowMode, subflowPorts } from './chunk-WBXGZVLB.js';
2
- import './chunk-OWENS2H5.js';
1
+ export { ANY_PORT_TYPE, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility } from './chunk-DR3GWVDG.js';
3
2
  export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, decodePause, encodePause, isPause, pauseForHuman } from './chunk-UEOE6B52.js';
4
- export { capabilityStatus, getLlmClient, getWorkflowResolver, isResolutionFailure, registerLlmClient, registerWorkflowResolver } from './chunk-USL4FMFU.js';
5
- import './chunk-VLATLVGH.js';
6
- export { nodeConfig, resolveNodePorts, resolvePortSpec } from './chunk-TITD5W4Y.js';
7
- export { categoryAccent, clearNodeKindOverrides, defaultConfigFor, getNodeKind, kindIds, listNodeKinds, onNodeKindsChanged, overrideNodeKind, registerNodeKind, resolveKindId, validateConfig } from './chunk-PVROYW7C.js';
3
+ export { BUILTIN_KINDS, DEFAULT_MAX_DEPTH, categoryAccent, clearNodeKindOverrides, declaredRoutes, defaultConfigFor, ensureBuiltinKinds, getNodeKind, kindIds, listNodeKinds, llmRouterExecutor as llmBranchExecutor, llmRouterExecutor, nodeConfig, onNodeKindsChanged, overrideNodeKind, registerBuiltinKinds, registerNodeKind, resolveFallbackPort, resolveKindId, resolveNodePorts, resolvePortSpec, subflowExecutor, subflowMode, subflowPorts, validateConfig } from './chunk-NDEX655E.js';
8
4
  export { RichInputPreview, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerRichInputAdapter } from './chunk-F5RPRB7A.js';
5
+ export { capabilityStatus, getLlmClient, getWorkflowResolver, isResolutionFailure, registerLlmClient, registerWorkflowResolver } from './chunk-USL4FMFU.js';
9
6
  //# sourceMappingURL=registry.js.map
10
7
  //# sourceMappingURL=registry.js.map
@@ -1,36 +1,5 @@
1
- import { F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-CMSrWVYM.js';
2
-
3
- type RunOptions = {
4
- /** Stop the run after this many ms. Default: no timeout. */
5
- timeoutMs?: number;
6
- /** Abort signal — host can cancel the run. */
7
- signal?: AbortSignal;
8
- /** Initial inputs supplied to entry-point nodes (no incoming edges). */
9
- initialInputs?: Record<string, Record<string, unknown>>;
10
- /** Nesting depth — set by `subflow` when it runs a child graph. */
11
- depth?: number;
12
- };
13
- type RunResult = {
14
- ok: boolean;
15
- /** Outputs collected per node, keyed by node id. */
16
- outputs: Record<string, unknown>;
17
- /** Error captured if any node threw. */
18
- error?: string;
19
- };
20
- /**
21
- * runFlow — topological execution of a FlowGraph against an ExecutorRegistry.
22
- *
23
- * Each node runs once, when all upstream nodes have produced outputs on the
24
- * connected ports. Decision nodes (or any executor that returns `{ branch:
25
- * 'true' }`) can short-circuit specific output ports — only edges leaving
26
- * an "active" port propagate to downstream nodes.
27
- *
28
- * Cycles are detected and abort the run with an error.
29
- *
30
- * The `onEvent` callback receives a stream of `RunEvent`s — wire it to a
31
- * status feed, log panel, or store.
32
- */
33
- declare function runFlow(graph: FlowGraph, executors: ExecutorRegistry, onEvent?: (event: RunEvent) => void, options?: RunOptions): Promise<RunResult>;
1
+ import { F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-Jx1TwehV.js';
2
+ import { R as RunOptions, a as RunResult } from './run-flow-CQvTDBYk.js';
34
3
 
35
4
  /**
36
5
  * How the flows one trigger fired should treat each other.
@@ -108,4 +77,4 @@ type CohortResult = RunResult & {
108
77
  */
109
78
  declare function runCohort(flows: FlowGraph[], executors: ExecutorRegistry, onEvent?: (event: RunEvent, index: number) => void, options?: CohortOptions): Promise<CohortResult[]>;
110
79
 
111
- export { type CohortGuard as C, type RunOptions as R, type CohortOptions as a, type CohortPolicy as b, type CohortResult as c, type RunResult as d, runFlow as e, runCohort as r };
80
+ export { type CohortGuard as C, type CohortOptions as a, type CohortPolicy as b, type CohortResult as c, runCohort as r };
@@ -1,36 +1,5 @@
1
- import { F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-CMSrWVYM.cjs';
2
-
3
- type RunOptions = {
4
- /** Stop the run after this many ms. Default: no timeout. */
5
- timeoutMs?: number;
6
- /** Abort signal — host can cancel the run. */
7
- signal?: AbortSignal;
8
- /** Initial inputs supplied to entry-point nodes (no incoming edges). */
9
- initialInputs?: Record<string, Record<string, unknown>>;
10
- /** Nesting depth — set by `subflow` when it runs a child graph. */
11
- depth?: number;
12
- };
13
- type RunResult = {
14
- ok: boolean;
15
- /** Outputs collected per node, keyed by node id. */
16
- outputs: Record<string, unknown>;
17
- /** Error captured if any node threw. */
18
- error?: string;
19
- };
20
- /**
21
- * runFlow — topological execution of a FlowGraph against an ExecutorRegistry.
22
- *
23
- * Each node runs once, when all upstream nodes have produced outputs on the
24
- * connected ports. Decision nodes (or any executor that returns `{ branch:
25
- * 'true' }`) can short-circuit specific output ports — only edges leaving
26
- * an "active" port propagate to downstream nodes.
27
- *
28
- * Cycles are detected and abort the run with an error.
29
- *
30
- * The `onEvent` callback receives a stream of `RunEvent`s — wire it to a
31
- * status feed, log panel, or store.
32
- */
33
- declare function runFlow(graph: FlowGraph, executors: ExecutorRegistry, onEvent?: (event: RunEvent) => void, options?: RunOptions): Promise<RunResult>;
1
+ import { F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-Jx1TwehV.cjs';
2
+ import { R as RunOptions, a as RunResult } from './run-flow-1KiXhy59.cjs';
34
3
 
35
4
  /**
36
5
  * How the flows one trigger fired should treat each other.
@@ -108,4 +77,4 @@ type CohortResult = RunResult & {
108
77
  */
109
78
  declare function runCohort(flows: FlowGraph[], executors: ExecutorRegistry, onEvent?: (event: RunEvent, index: number) => void, options?: CohortOptions): Promise<CohortResult[]>;
110
79
 
111
- export { type CohortGuard as C, type RunOptions as R, type CohortOptions as a, type CohortPolicy as b, type CohortResult as c, type RunResult as d, runFlow as e, runCohort as r };
80
+ export { type CohortGuard as C, type CohortOptions as a, type CohortPolicy as b, type CohortResult as c, runCohort as r };
@@ -0,0 +1,55 @@
1
+ import { b as RunIdentity, c as RunIdentityJson, F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-Jx1TwehV.cjs';
2
+
3
+ type RunOptions = {
4
+ /** Stop the run after this many ms. Default: no timeout. */
5
+ timeoutMs?: number;
6
+ /** Abort signal — host can cancel the run. */
7
+ signal?: AbortSignal;
8
+ /** Initial inputs supplied to entry-point nodes (no incoming edges). */
9
+ initialInputs?: Record<string, Record<string, unknown>>;
10
+ /** Nesting depth — set by `subflow` when it runs a child graph. */
11
+ depth?: number;
12
+ /**
13
+ * Who is running, so a writing node can derive a stable idempotency key.
14
+ *
15
+ * A bare string is taken as the run key. **Deliberately not defaulted:** a
16
+ * minted-per-call key would change on every whole-run retry, which is exactly
17
+ * the failure an idempotency key exists to prevent — so a host that has not
18
+ * supplied one gets `ctx.run === undefined` and a connector that declines to
19
+ * write blind, rather than a plausible-looking key that double-charges.
20
+ */
21
+ run?: RunIdentity | RunIdentityJson | string;
22
+ /**
23
+ * Outputs already checkpointed for this run, keyed by node id.
24
+ *
25
+ * A node present here is **republished, not re-executed** — its stored value
26
+ * goes back onto the same ports, so downstream routing reproduces exactly
27
+ * what it did the first time. This is what makes a per-node durable driver
28
+ * possible without a second copy of the routing rules, and it is how the PHP
29
+ * and Python runtimes have always resumed.
30
+ */
31
+ resumeOutputs?: Record<string, unknown>;
32
+ };
33
+ type RunResult = {
34
+ ok: boolean;
35
+ /** Outputs collected per node, keyed by node id. */
36
+ outputs: Record<string, unknown>;
37
+ /** Error captured if any node threw. */
38
+ error?: string;
39
+ };
40
+ /**
41
+ * runFlow — topological execution of a FlowGraph against an ExecutorRegistry.
42
+ *
43
+ * Each node runs once, when all upstream nodes have produced outputs on the
44
+ * connected ports. Decision nodes (or any executor that returns `{ branch:
45
+ * 'true' }`) can short-circuit specific output ports — only edges leaving
46
+ * an "active" port propagate to downstream nodes.
47
+ *
48
+ * Cycles are detected and abort the run with an error.
49
+ *
50
+ * The `onEvent` callback receives a stream of `RunEvent`s — wire it to a
51
+ * status feed, log panel, or store.
52
+ */
53
+ declare function runFlow(graph: FlowGraph, executors: ExecutorRegistry, onEvent?: (event: RunEvent) => void, options?: RunOptions): Promise<RunResult>;
54
+
55
+ export { type RunOptions as R, type RunResult as a, runFlow as r };
@@ -0,0 +1,55 @@
1
+ import { b as RunIdentity, c as RunIdentityJson, F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-Jx1TwehV.js';
2
+
3
+ type RunOptions = {
4
+ /** Stop the run after this many ms. Default: no timeout. */
5
+ timeoutMs?: number;
6
+ /** Abort signal — host can cancel the run. */
7
+ signal?: AbortSignal;
8
+ /** Initial inputs supplied to entry-point nodes (no incoming edges). */
9
+ initialInputs?: Record<string, Record<string, unknown>>;
10
+ /** Nesting depth — set by `subflow` when it runs a child graph. */
11
+ depth?: number;
12
+ /**
13
+ * Who is running, so a writing node can derive a stable idempotency key.
14
+ *
15
+ * A bare string is taken as the run key. **Deliberately not defaulted:** a
16
+ * minted-per-call key would change on every whole-run retry, which is exactly
17
+ * the failure an idempotency key exists to prevent — so a host that has not
18
+ * supplied one gets `ctx.run === undefined` and a connector that declines to
19
+ * write blind, rather than a plausible-looking key that double-charges.
20
+ */
21
+ run?: RunIdentity | RunIdentityJson | string;
22
+ /**
23
+ * Outputs already checkpointed for this run, keyed by node id.
24
+ *
25
+ * A node present here is **republished, not re-executed** — its stored value
26
+ * goes back onto the same ports, so downstream routing reproduces exactly
27
+ * what it did the first time. This is what makes a per-node durable driver
28
+ * possible without a second copy of the routing rules, and it is how the PHP
29
+ * and Python runtimes have always resumed.
30
+ */
31
+ resumeOutputs?: Record<string, unknown>;
32
+ };
33
+ type RunResult = {
34
+ ok: boolean;
35
+ /** Outputs collected per node, keyed by node id. */
36
+ outputs: Record<string, unknown>;
37
+ /** Error captured if any node threw. */
38
+ error?: string;
39
+ };
40
+ /**
41
+ * runFlow — topological execution of a FlowGraph against an ExecutorRegistry.
42
+ *
43
+ * Each node runs once, when all upstream nodes have produced outputs on the
44
+ * connected ports. Decision nodes (or any executor that returns `{ branch:
45
+ * 'true' }`) can short-circuit specific output ports — only edges leaving
46
+ * an "active" port propagate to downstream nodes.
47
+ *
48
+ * Cycles are detected and abort the run with an error.
49
+ *
50
+ * The `onEvent` callback receives a stream of `RunEvent`s — wire it to a
51
+ * status feed, log panel, or store.
52
+ */
53
+ declare function runFlow(graph: FlowGraph, executors: ExecutorRegistry, onEvent?: (event: RunEvent) => void, options?: RunOptions): Promise<RunResult>;
54
+
55
+ export { type RunOptions as R, type RunResult as a, runFlow as r };
@@ -1,6 +1,8 @@
1
- import { d as RunResult, R as RunOptions } from '../run-cohort-DitsaYgS.cjs';
2
- export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort, e as runFlow } from '../run-cohort-DitsaYgS.cjs';
3
- import { e as NodeRunStatus, F as FlowGraph, E as ExecutorRegistry, a as FlowNode, b as FlowEdge } from '../types-CMSrWVYM.cjs';
1
+ import { a as RunResult, R as RunOptions } from '../run-flow-1KiXhy59.cjs';
2
+ export { r as runFlow } from '../run-flow-1KiXhy59.cjs';
3
+ import { g as NodeRunStatus, F as FlowGraph, E as ExecutorRegistry, a as FlowNode, d as FlowEdge } from '../types-Jx1TwehV.cjs';
4
+ export { b as RunIdentity, c as RunIdentityJson, i as escapeSegment } from '../types-Jx1TwehV.cjs';
5
+ export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from '../run-cohort-DdPPowJ3.cjs';
4
6
  import { NodeChange, EdgeChange, Connection } from '@xyflow/react';
5
7
 
6
8
  type FlowRunFeedEntry = {
@@ -1,6 +1,8 @@
1
- import { d as RunResult, R as RunOptions } from '../run-cohort-CV7EcwGG.js';
2
- export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort, e as runFlow } from '../run-cohort-CV7EcwGG.js';
3
- import { e as NodeRunStatus, F as FlowGraph, E as ExecutorRegistry, a as FlowNode, b as FlowEdge } from '../types-CMSrWVYM.js';
1
+ import { a as RunResult, R as RunOptions } from '../run-flow-CQvTDBYk.js';
2
+ export { r as runFlow } from '../run-flow-CQvTDBYk.js';
3
+ import { g as NodeRunStatus, F as FlowGraph, E as ExecutorRegistry, a as FlowNode, d as FlowEdge } from '../types-Jx1TwehV.js';
4
+ export { b as RunIdentity, c as RunIdentityJson, i as escapeSegment } from '../types-Jx1TwehV.js';
5
+ export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from '../run-cohort-Cyeny2Uu.js';
4
6
  import { NodeChange, EdgeChange, Connection } from '@xyflow/react';
5
7
 
6
8
  type FlowRunFeedEntry = {