@particle-academy/fancy-flow 0.48.1 → 0.50.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 (83) hide show
  1. package/dist/{ConfigFieldRenderer-NuDjtun1.d.cts → ConfigFieldRenderer-CrXFq6Eb.d.cts} +2 -2
  2. package/dist/{ConfigFieldRenderer-DrD2-Qml.d.ts → ConfigFieldRenderer-u3nYHovX.d.ts} +2 -2
  3. package/dist/{FlowViewer-CY3_vHSg.d.cts → FlowViewer-CFSMlCqi.d.cts} +1 -1
  4. package/dist/{FlowViewer-DGW6t-80.d.ts → FlowViewer-DRgjeWJ7.d.ts} +1 -1
  5. package/dist/{capabilities-DMUhnyZD.d.ts → capabilities-B00VXLUp.d.ts} +1 -1
  6. package/dist/{capabilities-Dmd26aAs.d.cts → capabilities-VzgDApur.d.cts} +1 -1
  7. package/dist/{chunk-ACGCHWCM.js → chunk-3W26FA7Q.js} +7 -3
  8. package/dist/chunk-3W26FA7Q.js.map +1 -0
  9. package/dist/{chunk-6HGXAU5L.js → chunk-BAHJVX3S.js} +9 -4
  10. package/dist/chunk-BAHJVX3S.js.map +1 -0
  11. package/dist/{chunk-54SN6LML.js → chunk-DQJIU55F.js} +3 -3
  12. package/dist/{chunk-54SN6LML.js.map → chunk-DQJIU55F.js.map} +1 -1
  13. package/dist/{chunk-HHGU7JXJ.js → chunk-I4F6GI3A.js} +3 -3
  14. package/dist/{chunk-HHGU7JXJ.js.map → chunk-I4F6GI3A.js.map} +1 -1
  15. package/dist/{chunk-FCCGV52I.js → chunk-OWDSPRAF.js} +4 -4
  16. package/dist/{chunk-FCCGV52I.js.map → chunk-OWDSPRAF.js.map} +1 -1
  17. package/dist/{chunk-M7H3ASBI.js → chunk-XJMWMU4J.js} +20 -3
  18. package/dist/chunk-XJMWMU4J.js.map +1 -0
  19. package/dist/connectors.d.cts +2 -2
  20. package/dist/connectors.d.ts +2 -2
  21. package/dist/durable/index.d.cts +2 -2
  22. package/dist/durable/index.d.ts +2 -2
  23. package/dist/durable.cjs +18 -1
  24. package/dist/durable.cjs.map +1 -1
  25. package/dist/durable.js +1 -1
  26. package/dist/engine.cjs +18 -1
  27. package/dist/engine.cjs.map +1 -1
  28. package/dist/engine.d.cts +7 -7
  29. package/dist/engine.d.ts +7 -7
  30. package/dist/engine.js +3 -3
  31. package/dist/fields/react-fancy.d.cts +3 -3
  32. package/dist/fields/react-fancy.d.ts +3 -3
  33. package/dist/index.cjs +59 -2
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.d.cts +11 -11
  36. package/dist/index.d.ts +11 -11
  37. package/dist/index.js +42 -11
  38. package/dist/index.js.map +1 -1
  39. package/dist/layout/index.d.cts +1 -1
  40. package/dist/layout/index.d.ts +1 -1
  41. package/dist/llm/prism.d.cts +2 -2
  42. package/dist/llm/prism.d.ts +2 -2
  43. package/dist/llm/vercel-ai.d.cts +2 -2
  44. package/dist/llm/vercel-ai.d.ts +2 -2
  45. package/dist/registry/index.d.cts +6 -6
  46. package/dist/registry/index.d.ts +6 -6
  47. package/dist/{registry-DpARG95T.d.ts → registry-6cB5wCv6.d.ts} +1 -1
  48. package/dist/{registry-BnnifM-t.d.cts → registry-DQh7ZmnM.d.cts} +1 -1
  49. package/dist/registry.cjs +18 -1
  50. package/dist/registry.cjs.map +1 -1
  51. package/dist/registry.js +2 -2
  52. package/dist/{run-cohort-DdPPowJ3.d.cts → run-cohort-DYCL8Qv6.d.cts} +2 -2
  53. package/dist/{run-cohort-Cyeny2Uu.d.ts → run-cohort-VX4JG21l.d.ts} +2 -2
  54. package/dist/{run-flow-1KiXhy59.d.cts → run-flow-B24QUO1H.d.cts} +1 -1
  55. package/dist/{run-flow-CQvTDBYk.d.ts → run-flow-DPUPAWk6.d.ts} +1 -1
  56. package/dist/runtime/index.d.cts +18 -6
  57. package/dist/runtime/index.d.ts +18 -6
  58. package/dist/runtime.cjs +24 -2
  59. package/dist/runtime.cjs.map +1 -1
  60. package/dist/runtime.js +3 -3
  61. package/dist/schema/index.d.cts +9 -1
  62. package/dist/schema/index.d.ts +9 -1
  63. package/dist/schema.cjs +22 -1
  64. package/dist/schema.cjs.map +1 -1
  65. package/dist/schema.js +2 -2
  66. package/dist/screens.cjs +18 -1
  67. package/dist/screens.cjs.map +1 -1
  68. package/dist/screens.d.cts +2 -2
  69. package/dist/screens.d.ts +2 -2
  70. package/dist/screens.js +4 -4
  71. package/dist/{types-Jx1TwehV.d.cts → types-7cXcSQlx.d.cts} +50 -0
  72. package/dist/{types-Jx1TwehV.d.ts → types-7cXcSQlx.d.ts} +50 -0
  73. package/dist/{types-BO8TgI2M.d.cts → types-BtMOnb9I.d.cts} +1 -1
  74. package/dist/{types-DJAmfiJC.d.ts → types-CDgIIj4c.d.ts} +1 -1
  75. package/dist/ux.cjs +18 -1
  76. package/dist/ux.cjs.map +1 -1
  77. package/dist/ux.d.cts +2 -2
  78. package/dist/ux.d.ts +2 -2
  79. package/dist/ux.js +1 -1
  80. package/package.json +1 -1
  81. package/dist/chunk-6HGXAU5L.js.map +0 -1
  82. package/dist/chunk-ACGCHWCM.js.map +0 -1
  83. package/dist/chunk-M7H3ASBI.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import { F as FlowGraph, a as FlowNode } from '../types-Jx1TwehV.cjs';
1
+ import { F as FlowGraph, a as FlowNode } from '../types-7cXcSQlx.cjs';
2
2
  import '@xyflow/react';
3
3
 
4
4
  type AutoLayoutDirection = "LR" | "TB" | "RL" | "BT";
@@ -1,4 +1,4 @@
1
- import { F as FlowGraph, a as FlowNode } from '../types-Jx1TwehV.js';
1
+ import { F as FlowGraph, a as FlowNode } from '../types-7cXcSQlx.js';
2
2
  import '@xyflow/react';
3
3
 
4
4
  type AutoLayoutDirection = "LR" | "TB" | "RL" | "BT";
@@ -1,5 +1,5 @@
1
- import { L as LlmClient } from '../capabilities-Dmd26aAs.cjs';
2
- import '../types-Jx1TwehV.cjs';
1
+ import { L as LlmClient } from '../capabilities-VzgDApur.cjs';
2
+ import '../types-7cXcSQlx.cjs';
3
3
  import '@xyflow/react';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { L as LlmClient } from '../capabilities-DMUhnyZD.js';
2
- import '../types-Jx1TwehV.js';
1
+ import { L as LlmClient } from '../capabilities-B00VXLUp.js';
2
+ import '../types-7cXcSQlx.js';
3
3
  import '@xyflow/react';
4
4
 
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  import { LanguageModel } from 'ai';
2
- import { a as LlmRouteRequest, L as LlmClient } from '../capabilities-Dmd26aAs.cjs';
3
- import '../types-Jx1TwehV.cjs';
2
+ import { a as LlmRouteRequest, L as LlmClient } from '../capabilities-VzgDApur.cjs';
3
+ import '../types-7cXcSQlx.cjs';
4
4
  import '@xyflow/react';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import { LanguageModel } from 'ai';
2
- import { a as LlmRouteRequest, L as LlmClient } from '../capabilities-DMUhnyZD.js';
3
- import '../types-Jx1TwehV.js';
2
+ import { a as LlmRouteRequest, L as LlmClient } from '../capabilities-B00VXLUp.js';
3
+ import '../types-7cXcSQlx.js';
4
4
  import '@xyflow/react';
5
5
 
6
6
  /**
@@ -1,13 +1,13 @@
1
- import { N as NodeKindDefinition, P as PortSpec } from '../types-BO8TgI2M.cjs';
2
- export { C as ConfigField, k as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, l as NumberConfigField, R as RenderBodyContext, m as RepeaterConfigField, n as RepeaterRowField, o as SelectConfigField, p as SwitchConfigField, T as TextConfigField, q as TextareaConfigField } from '../types-BO8TgI2M.cjs';
3
- import { P as PortDescriptor, a as FlowNode, N as NodeExecutor } from '../types-Jx1TwehV.cjs';
1
+ import { N as NodeKindDefinition, P as PortSpec } from '../types-BtMOnb9I.cjs';
2
+ export { C as ConfigField, k as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, l as NumberConfigField, R as RenderBodyContext, m as RepeaterConfigField, n as RepeaterRowField, o as SelectConfigField, p as SwitchConfigField, T as TextConfigField, q as TextareaConfigField } from '../types-BtMOnb9I.cjs';
3
+ import { P as PortDescriptor, a as FlowNode, N as NodeExecutor } from '../types-7cXcSQlx.cjs';
4
4
  import { Connection, Edge, NodeProps, NodeTypes } from '@xyflow/react';
5
- import { b as LlmRoute } from '../capabilities-Dmd26aAs.cjs';
6
- export { C as CapabilityId, L as LlmClient, c as LlmRouteChoice, a as LlmRouteRequest, d as WorkflowResolution, e as WorkflowResolutionFailure, W as WorkflowResolver, f as capabilityStatus, g as getLlmClient, h as getWorkflowResolver, i as isResolutionFailure, r as registerLlmClient, j as registerWorkflowResolver } from '../capabilities-Dmd26aAs.cjs';
5
+ import { b as LlmRoute } from '../capabilities-VzgDApur.cjs';
6
+ export { C as CapabilityId, L as LlmClient, c as LlmRouteChoice, a as LlmRouteRequest, d as WorkflowResolution, e as WorkflowResolutionFailure, W as WorkflowResolver, f as capabilityStatus, g as getLlmClient, h as getWorkflowResolver, i as isResolutionFailure, r as registerLlmClient, j as registerWorkflowResolver } from '../capabilities-VzgDApur.cjs';
7
7
  export { L as LEGACY_PAUSE_PREFIXES, a as PAUSE_PREFIX, P as PauseAwaiting, b as PauseSignal, d as decodePause, e as encodePause, i as isPause, p as pauseForHuman } from '../pause-9iT4tCEV.cjs';
8
8
  import * as react from 'react';
9
9
  import { ComponentType, ReactNode } from 'react';
10
- export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, a as resolveKindId, v as validateConfig } from '../registry-BnnifM-t.cjs';
10
+ export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, a as resolveKindId, v as validateConfig } from '../registry-DQh7ZmnM.cjs';
11
11
 
12
12
  /**
13
13
  * Connection validation — the single rule that decides whether an edge between
@@ -1,13 +1,13 @@
1
- import { N as NodeKindDefinition, P as PortSpec } from '../types-DJAmfiJC.js';
2
- export { C as ConfigField, k as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, l as NumberConfigField, R as RenderBodyContext, m as RepeaterConfigField, n as RepeaterRowField, o as SelectConfigField, p as SwitchConfigField, T as TextConfigField, q as TextareaConfigField } from '../types-DJAmfiJC.js';
3
- import { P as PortDescriptor, a as FlowNode, N as NodeExecutor } from '../types-Jx1TwehV.js';
1
+ import { N as NodeKindDefinition, P as PortSpec } from '../types-CDgIIj4c.js';
2
+ export { C as ConfigField, k as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, l as NumberConfigField, R as RenderBodyContext, m as RepeaterConfigField, n as RepeaterRowField, o as SelectConfigField, p as SwitchConfigField, T as TextConfigField, q as TextareaConfigField } from '../types-CDgIIj4c.js';
3
+ import { P as PortDescriptor, a as FlowNode, N as NodeExecutor } from '../types-7cXcSQlx.js';
4
4
  import { Connection, Edge, NodeProps, NodeTypes } from '@xyflow/react';
5
- import { b as LlmRoute } from '../capabilities-DMUhnyZD.js';
6
- export { C as CapabilityId, L as LlmClient, c as LlmRouteChoice, a as LlmRouteRequest, d as WorkflowResolution, e as WorkflowResolutionFailure, W as WorkflowResolver, f as capabilityStatus, g as getLlmClient, h as getWorkflowResolver, i as isResolutionFailure, r as registerLlmClient, j as registerWorkflowResolver } from '../capabilities-DMUhnyZD.js';
5
+ import { b as LlmRoute } from '../capabilities-B00VXLUp.js';
6
+ export { C as CapabilityId, L as LlmClient, c as LlmRouteChoice, a as LlmRouteRequest, d as WorkflowResolution, e as WorkflowResolutionFailure, W as WorkflowResolver, f as capabilityStatus, g as getLlmClient, h as getWorkflowResolver, i as isResolutionFailure, r as registerLlmClient, j as registerWorkflowResolver } from '../capabilities-B00VXLUp.js';
7
7
  export { L as LEGACY_PAUSE_PREFIXES, a as PAUSE_PREFIX, P as PauseAwaiting, b as PauseSignal, d as decodePause, e as encodePause, i as isPause, p as pauseForHuman } from '../pause-9iT4tCEV.js';
8
8
  import * as react from 'react';
9
9
  import { ComponentType, ReactNode } from 'react';
10
- export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, a as resolveKindId, v as validateConfig } from '../registry-DpARG95T.js';
10
+ export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, a as resolveKindId, v as validateConfig } from '../registry-6cB5wCv6.js';
11
11
 
12
12
  /**
13
13
  * Connection validation — the single rule that decides whether an edge between
@@ -1,4 +1,4 @@
1
- import { N as NodeKindDefinition } from './types-DJAmfiJC.js';
1
+ import { N as NodeKindDefinition } from './types-CDgIIj4c.js';
2
2
 
3
3
  /**
4
4
  * Put the builtin kit in the registry before anyone reads or writes it.
@@ -1,4 +1,4 @@
1
- import { N as NodeKindDefinition } from './types-BO8TgI2M.cjs';
1
+ import { N as NodeKindDefinition } from './types-BtMOnb9I.cjs';
2
2
 
3
3
  /**
4
4
  * Put the builtin kit in the registry before anyone reads or writes it.
package/dist/registry.cjs CHANGED
@@ -9423,6 +9423,7 @@ async function runFlow(graph, executors, onEvent = () => {
9423
9423
  continue;
9424
9424
  }
9425
9425
  onEvent({ type: "node-status", nodeId: node.id, status: "running" });
9426
+ announce(onEvent, node, "start");
9426
9427
  const inputs = collectInputs(node, incoming, portValues, initialInputs);
9427
9428
  const exec = pickExecutor(executors, node);
9428
9429
  if (!exec) {
@@ -9441,6 +9442,7 @@ async function runFlow(graph, executors, onEvent = () => {
9441
9442
  throw new Error(reason ?? "aborted");
9442
9443
  },
9443
9444
  emit: onEvent,
9445
+ executors,
9444
9446
  depth,
9445
9447
  run
9446
9448
  })
@@ -9453,6 +9455,7 @@ async function runFlow(graph, executors, onEvent = () => {
9453
9455
  }
9454
9456
  completed.add(node.id);
9455
9457
  onEvent({ type: "node-status", nodeId: node.id, status: "done" });
9458
+ announce(onEvent, node, "end");
9456
9459
  } catch (e) {
9457
9460
  const msg = e instanceof Error ? e.message : String(e);
9458
9461
  errors.push(msg);
@@ -9505,6 +9508,9 @@ function collectInputs(node, incoming, portValues, initial) {
9505
9508
  const key = `${e.source}:${e.sourceHandle ?? "out"}`;
9506
9509
  if (!portValues.has(key)) continue;
9507
9510
  inputs[portId] = portValues.get(key);
9511
+ if (e.targetHandle == null && !(e.source in inputs)) {
9512
+ inputs[e.source] = portValues.get(key);
9513
+ }
9508
9514
  }
9509
9515
  return inputs;
9510
9516
  }
@@ -9536,6 +9542,14 @@ function activatedPorts(node, result) {
9536
9542
  const declared = resolveNodePorts(node, kind).outputs?.map((p) => p.id);
9537
9543
  return { ports: declared?.length ? declared : ["out"], value: result };
9538
9544
  }
9545
+ function announce(onEvent, node, phase) {
9546
+ const data = node.data;
9547
+ const raw = phase === "start" ? data?.startingMsg : data?.stoppingMsg;
9548
+ if (typeof raw !== "string") return;
9549
+ const message = raw.trim();
9550
+ if (message === "") return;
9551
+ onEvent({ type: "node-message", nodeId: node.id, phase, message });
9552
+ }
9539
9553
 
9540
9554
  // src/registry/subflow.ts
9541
9555
  var DEFAULT_MAX_DEPTH = 8;
@@ -9589,7 +9603,10 @@ var subflowExecutor = async (ctx) => {
9589
9603
  };
9590
9604
  const result = await runFlow(
9591
9605
  child,
9592
- config.executors ?? {},
9606
+ // Inherit the parent's registry, then let the graph layer its own on top.
9607
+ // The inherited half is the fix; the layered half keeps a graph that
9608
+ // deliberately hands its child extra or different executors working.
9609
+ { ...ctx.executors ?? {}, ...config.executors ?? {} },
9593
9610
  forward,
9594
9611
  {
9595
9612
  initialInputs: config.inputs ?? {