@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.
- package/dist/{ConfigFieldRenderer-NuDjtun1.d.cts → ConfigFieldRenderer-CrXFq6Eb.d.cts} +2 -2
- package/dist/{ConfigFieldRenderer-DrD2-Qml.d.ts → ConfigFieldRenderer-u3nYHovX.d.ts} +2 -2
- package/dist/{FlowViewer-CY3_vHSg.d.cts → FlowViewer-CFSMlCqi.d.cts} +1 -1
- package/dist/{FlowViewer-DGW6t-80.d.ts → FlowViewer-DRgjeWJ7.d.ts} +1 -1
- package/dist/{capabilities-DMUhnyZD.d.ts → capabilities-B00VXLUp.d.ts} +1 -1
- package/dist/{capabilities-Dmd26aAs.d.cts → capabilities-VzgDApur.d.cts} +1 -1
- package/dist/{chunk-ACGCHWCM.js → chunk-3W26FA7Q.js} +7 -3
- package/dist/chunk-3W26FA7Q.js.map +1 -0
- package/dist/{chunk-6HGXAU5L.js → chunk-BAHJVX3S.js} +9 -4
- package/dist/chunk-BAHJVX3S.js.map +1 -0
- package/dist/{chunk-54SN6LML.js → chunk-DQJIU55F.js} +3 -3
- package/dist/{chunk-54SN6LML.js.map → chunk-DQJIU55F.js.map} +1 -1
- package/dist/{chunk-HHGU7JXJ.js → chunk-I4F6GI3A.js} +3 -3
- package/dist/{chunk-HHGU7JXJ.js.map → chunk-I4F6GI3A.js.map} +1 -1
- package/dist/{chunk-FCCGV52I.js → chunk-OWDSPRAF.js} +4 -4
- package/dist/{chunk-FCCGV52I.js.map → chunk-OWDSPRAF.js.map} +1 -1
- package/dist/{chunk-M7H3ASBI.js → chunk-XJMWMU4J.js} +20 -3
- package/dist/chunk-XJMWMU4J.js.map +1 -0
- package/dist/connectors.d.cts +2 -2
- package/dist/connectors.d.ts +2 -2
- package/dist/durable/index.d.cts +2 -2
- package/dist/durable/index.d.ts +2 -2
- package/dist/durable.cjs +18 -1
- package/dist/durable.cjs.map +1 -1
- package/dist/durable.js +1 -1
- package/dist/engine.cjs +18 -1
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.d.cts +7 -7
- package/dist/engine.d.ts +7 -7
- package/dist/engine.js +3 -3
- package/dist/fields/react-fancy.d.cts +3 -3
- package/dist/fields/react-fancy.d.ts +3 -3
- package/dist/index.cjs +59 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +42 -11
- package/dist/index.js.map +1 -1
- package/dist/layout/index.d.cts +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/llm/prism.d.cts +2 -2
- package/dist/llm/prism.d.ts +2 -2
- package/dist/llm/vercel-ai.d.cts +2 -2
- package/dist/llm/vercel-ai.d.ts +2 -2
- package/dist/registry/index.d.cts +6 -6
- package/dist/registry/index.d.ts +6 -6
- package/dist/{registry-DpARG95T.d.ts → registry-6cB5wCv6.d.ts} +1 -1
- package/dist/{registry-BnnifM-t.d.cts → registry-DQh7ZmnM.d.cts} +1 -1
- package/dist/registry.cjs +18 -1
- package/dist/registry.cjs.map +1 -1
- package/dist/registry.js +2 -2
- package/dist/{run-cohort-DdPPowJ3.d.cts → run-cohort-DYCL8Qv6.d.cts} +2 -2
- package/dist/{run-cohort-Cyeny2Uu.d.ts → run-cohort-VX4JG21l.d.ts} +2 -2
- package/dist/{run-flow-1KiXhy59.d.cts → run-flow-B24QUO1H.d.cts} +1 -1
- package/dist/{run-flow-CQvTDBYk.d.ts → run-flow-DPUPAWk6.d.ts} +1 -1
- package/dist/runtime/index.d.cts +18 -6
- package/dist/runtime/index.d.ts +18 -6
- package/dist/runtime.cjs +24 -2
- package/dist/runtime.cjs.map +1 -1
- package/dist/runtime.js +3 -3
- package/dist/schema/index.d.cts +9 -1
- package/dist/schema/index.d.ts +9 -1
- package/dist/schema.cjs +22 -1
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/screens.cjs +18 -1
- package/dist/screens.cjs.map +1 -1
- package/dist/screens.d.cts +2 -2
- package/dist/screens.d.ts +2 -2
- package/dist/screens.js +4 -4
- package/dist/{types-Jx1TwehV.d.cts → types-7cXcSQlx.d.cts} +50 -0
- package/dist/{types-Jx1TwehV.d.ts → types-7cXcSQlx.d.ts} +50 -0
- package/dist/{types-BO8TgI2M.d.cts → types-BtMOnb9I.d.cts} +1 -1
- package/dist/{types-DJAmfiJC.d.ts → types-CDgIIj4c.d.ts} +1 -1
- package/dist/ux.cjs +18 -1
- package/dist/ux.cjs.map +1 -1
- package/dist/ux.d.cts +2 -2
- package/dist/ux.d.ts +2 -2
- package/dist/ux.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-6HGXAU5L.js.map +0 -1
- package/dist/chunk-ACGCHWCM.js.map +0 -1
- package/dist/chunk-M7H3ASBI.js.map +0 -1
package/dist/registry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ANY_PORT_TYPE, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility } from './chunk-
|
|
1
|
+
export { ANY_PORT_TYPE, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility } from './chunk-I4F6GI3A.js';
|
|
2
2
|
export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, decodePause, encodePause, isPause, pauseForHuman } from './chunk-UEOE6B52.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-
|
|
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-XJMWMU4J.js';
|
|
4
4
|
export { RichInputPreview, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerRichInputAdapter } from './chunk-F5RPRB7A.js';
|
|
5
5
|
export { capabilityStatus, getLlmClient, getWorkflowResolver, isResolutionFailure, registerLlmClient, registerWorkflowResolver } from './chunk-USL4FMFU.js';
|
|
6
6
|
//# sourceMappingURL=registry.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-
|
|
2
|
-
import { R as RunOptions, a as RunResult } from './run-flow-
|
|
1
|
+
import { F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-7cXcSQlx.cjs';
|
|
2
|
+
import { R as RunOptions, a as RunResult } from './run-flow-B24QUO1H.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* How the flows one trigger fired should treat each other.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-
|
|
2
|
-
import { R as RunOptions, a as RunResult } from './run-flow-
|
|
1
|
+
import { F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-7cXcSQlx.js';
|
|
2
|
+
import { R as RunOptions, a as RunResult } from './run-flow-DPUPAWk6.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* How the flows one trigger fired should treat each other.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as RunIdentity, c as RunIdentityJson, F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-
|
|
1
|
+
import { b as RunIdentity, c as RunIdentityJson, F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-7cXcSQlx.cjs';
|
|
2
2
|
|
|
3
3
|
type RunOptions = {
|
|
4
4
|
/** Stop the run after this many ms. Default: no timeout. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as RunIdentity, c as RunIdentityJson, F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-
|
|
1
|
+
import { b as RunIdentity, c as RunIdentityJson, F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-7cXcSQlx.js';
|
|
2
2
|
|
|
3
3
|
type RunOptions = {
|
|
4
4
|
/** Stop the run after this many ms. Default: no timeout. */
|
package/dist/runtime/index.d.cts
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { a as RunResult, R as RunOptions } from '../run-flow-
|
|
2
|
-
export { r as runFlow } from '../run-flow-
|
|
3
|
-
import { g as NodeRunStatus, F as FlowGraph, E as ExecutorRegistry, a as FlowNode, d as FlowEdge } from '../types-
|
|
4
|
-
export { b as RunIdentity, c as RunIdentityJson, i as escapeSegment } from '../types-
|
|
5
|
-
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from '../run-cohort-
|
|
1
|
+
import { a as RunResult, R as RunOptions } from '../run-flow-B24QUO1H.cjs';
|
|
2
|
+
export { r as runFlow } from '../run-flow-B24QUO1H.cjs';
|
|
3
|
+
import { g as NodeRunStatus, F as FlowGraph, E as ExecutorRegistry, a as FlowNode, d as FlowEdge } from '../types-7cXcSQlx.cjs';
|
|
4
|
+
export { b as RunIdentity, c as RunIdentityJson, i as escapeSegment } from '../types-7cXcSQlx.cjs';
|
|
5
|
+
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from '../run-cohort-DYCL8Qv6.cjs';
|
|
6
6
|
import { NodeChange, EdgeChange, Connection } from '@xyflow/react';
|
|
7
7
|
|
|
8
8
|
type FlowRunFeedEntry = {
|
|
9
9
|
id: string;
|
|
10
10
|
at: number;
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* `message` is a node's own human-facing announcement (`startingMsg` /
|
|
13
|
+
* `stoppingMsg`), kept distinct from `status` and `info` so a progress UI can
|
|
14
|
+
* show ONLY the narration. Folded in with diagnostics it would be unfindable,
|
|
15
|
+
* which is the same as not having it.
|
|
16
|
+
*/
|
|
17
|
+
level: "info" | "warn" | "error" | "status" | "message";
|
|
12
18
|
text: string;
|
|
13
19
|
nodeId?: string;
|
|
14
20
|
detail?: unknown;
|
|
@@ -20,6 +26,12 @@ type UseFlowRunReturn = {
|
|
|
20
26
|
statusText: Record<string, string | undefined>;
|
|
21
27
|
/** Latest computed output value per node (for reactive kinds). */
|
|
22
28
|
outputs: Record<string, unknown>;
|
|
29
|
+
/**
|
|
30
|
+
* Latest status message per nodeId, from the node's own `startingMsg` /
|
|
31
|
+
* `stoppingMsg`. Undefined for the nodes that declared none, which is most
|
|
32
|
+
* of them by design.
|
|
33
|
+
*/
|
|
34
|
+
nodeMessages: Record<string, string | undefined>;
|
|
23
35
|
/** Live event log (capped to last N). */
|
|
24
36
|
feed: FlowRunFeedEntry[];
|
|
25
37
|
/** Whether a run is currently in progress. */
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
import { a as RunResult, R as RunOptions } from '../run-flow-
|
|
2
|
-
export { r as runFlow } from '../run-flow-
|
|
3
|
-
import { g as NodeRunStatus, F as FlowGraph, E as ExecutorRegistry, a as FlowNode, d as FlowEdge } from '../types-
|
|
4
|
-
export { b as RunIdentity, c as RunIdentityJson, i as escapeSegment } from '../types-
|
|
5
|
-
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from '../run-cohort-
|
|
1
|
+
import { a as RunResult, R as RunOptions } from '../run-flow-DPUPAWk6.js';
|
|
2
|
+
export { r as runFlow } from '../run-flow-DPUPAWk6.js';
|
|
3
|
+
import { g as NodeRunStatus, F as FlowGraph, E as ExecutorRegistry, a as FlowNode, d as FlowEdge } from '../types-7cXcSQlx.js';
|
|
4
|
+
export { b as RunIdentity, c as RunIdentityJson, i as escapeSegment } from '../types-7cXcSQlx.js';
|
|
5
|
+
export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from '../run-cohort-VX4JG21l.js';
|
|
6
6
|
import { NodeChange, EdgeChange, Connection } from '@xyflow/react';
|
|
7
7
|
|
|
8
8
|
type FlowRunFeedEntry = {
|
|
9
9
|
id: string;
|
|
10
10
|
at: number;
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* `message` is a node's own human-facing announcement (`startingMsg` /
|
|
13
|
+
* `stoppingMsg`), kept distinct from `status` and `info` so a progress UI can
|
|
14
|
+
* show ONLY the narration. Folded in with diagnostics it would be unfindable,
|
|
15
|
+
* which is the same as not having it.
|
|
16
|
+
*/
|
|
17
|
+
level: "info" | "warn" | "error" | "status" | "message";
|
|
12
18
|
text: string;
|
|
13
19
|
nodeId?: string;
|
|
14
20
|
detail?: unknown;
|
|
@@ -20,6 +26,12 @@ type UseFlowRunReturn = {
|
|
|
20
26
|
statusText: Record<string, string | undefined>;
|
|
21
27
|
/** Latest computed output value per node (for reactive kinds). */
|
|
22
28
|
outputs: Record<string, unknown>;
|
|
29
|
+
/**
|
|
30
|
+
* Latest status message per nodeId, from the node's own `startingMsg` /
|
|
31
|
+
* `stoppingMsg`. Undefined for the nodes that declared none, which is most
|
|
32
|
+
* of them by design.
|
|
33
|
+
*/
|
|
34
|
+
nodeMessages: Record<string, string | undefined>;
|
|
23
35
|
/** Live event log (capped to last N). */
|
|
24
36
|
feed: FlowRunFeedEntry[];
|
|
25
37
|
/** Whether a run is currently in progress. */
|
package/dist/runtime.cjs
CHANGED
|
@@ -9145,7 +9145,10 @@ var subflowExecutor = async (ctx) => {
|
|
|
9145
9145
|
};
|
|
9146
9146
|
const result = await runFlow(
|
|
9147
9147
|
child,
|
|
9148
|
-
|
|
9148
|
+
// Inherit the parent's registry, then let the graph layer its own on top.
|
|
9149
|
+
// The inherited half is the fix; the layered half keeps a graph that
|
|
9150
|
+
// deliberately hands its child extra or different executors working.
|
|
9151
|
+
{ ...ctx.executors ?? {}, ...config.executors ?? {} },
|
|
9149
9152
|
forward,
|
|
9150
9153
|
{
|
|
9151
9154
|
initialInputs: config.inputs ?? {
|
|
@@ -10276,6 +10279,7 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
10276
10279
|
continue;
|
|
10277
10280
|
}
|
|
10278
10281
|
onEvent({ type: "node-status", nodeId: node.id, status: "running" });
|
|
10282
|
+
announce(onEvent, node, "start");
|
|
10279
10283
|
const inputs = collectInputs(node, incoming, portValues, initialInputs);
|
|
10280
10284
|
const exec = pickExecutor(executors, node);
|
|
10281
10285
|
if (!exec) {
|
|
@@ -10294,6 +10298,7 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
10294
10298
|
throw new Error(reason ?? "aborted");
|
|
10295
10299
|
},
|
|
10296
10300
|
emit: onEvent,
|
|
10301
|
+
executors,
|
|
10297
10302
|
depth,
|
|
10298
10303
|
run
|
|
10299
10304
|
})
|
|
@@ -10306,6 +10311,7 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
10306
10311
|
}
|
|
10307
10312
|
completed.add(node.id);
|
|
10308
10313
|
onEvent({ type: "node-status", nodeId: node.id, status: "done" });
|
|
10314
|
+
announce(onEvent, node, "end");
|
|
10309
10315
|
} catch (e) {
|
|
10310
10316
|
const msg = e instanceof Error ? e.message : String(e);
|
|
10311
10317
|
errors.push(msg);
|
|
@@ -10358,6 +10364,9 @@ function collectInputs(node, incoming, portValues, initial) {
|
|
|
10358
10364
|
const key = `${e.source}:${e.sourceHandle ?? "out"}`;
|
|
10359
10365
|
if (!portValues.has(key)) continue;
|
|
10360
10366
|
inputs[portId] = portValues.get(key);
|
|
10367
|
+
if (e.targetHandle == null && !(e.source in inputs)) {
|
|
10368
|
+
inputs[e.source] = portValues.get(key);
|
|
10369
|
+
}
|
|
10361
10370
|
}
|
|
10362
10371
|
return inputs;
|
|
10363
10372
|
}
|
|
@@ -10389,6 +10398,14 @@ function activatedPorts(node, result) {
|
|
|
10389
10398
|
const declared = resolveNodePorts(node, kind).outputs?.map((p) => p.id);
|
|
10390
10399
|
return { ports: declared?.length ? declared : ["out"], value: result };
|
|
10391
10400
|
}
|
|
10401
|
+
function announce(onEvent, node, phase) {
|
|
10402
|
+
const data = node.data;
|
|
10403
|
+
const raw = phase === "start" ? data?.startingMsg : data?.stoppingMsg;
|
|
10404
|
+
if (typeof raw !== "string") return;
|
|
10405
|
+
const message = raw.trim();
|
|
10406
|
+
if (message === "") return;
|
|
10407
|
+
onEvent({ type: "node-message", nodeId: node.id, phase, message });
|
|
10408
|
+
}
|
|
10392
10409
|
|
|
10393
10410
|
// src/runtime/run-cohort.ts
|
|
10394
10411
|
async function runCohort(flows, executors, onEvent = () => {
|
|
@@ -10437,6 +10454,7 @@ function errorText(error) {
|
|
|
10437
10454
|
function useFlowRun({ maxFeed = 200 } = {}) {
|
|
10438
10455
|
const [statuses, setStatuses] = ReactExports.useState({});
|
|
10439
10456
|
const [statusText, setStatusText] = ReactExports.useState({});
|
|
10457
|
+
const [nodeMessages, setNodeMessages] = ReactExports.useState({});
|
|
10440
10458
|
const [outputs, setOutputs] = ReactExports.useState({});
|
|
10441
10459
|
const [feed, setFeed] = ReactExports.useState([]);
|
|
10442
10460
|
const [running, setRunning] = ReactExports.useState(false);
|
|
@@ -10450,6 +10468,10 @@ function useFlowRun({ maxFeed = 200 } = {}) {
|
|
|
10450
10468
|
setStatusText((t) => ({ ...t, [e.nodeId]: e.text }));
|
|
10451
10469
|
appendFeed({ level: "status", text: `${e.nodeId} \u2192 ${e.status}${e.text ? ` (${e.text})` : ""}`, nodeId: e.nodeId });
|
|
10452
10470
|
break;
|
|
10471
|
+
case "node-message":
|
|
10472
|
+
setNodeMessages((m) => ({ ...m, [e.nodeId]: e.message }));
|
|
10473
|
+
appendFeed({ level: "message", text: e.message, nodeId: e.nodeId });
|
|
10474
|
+
break;
|
|
10453
10475
|
case "node-output":
|
|
10454
10476
|
setOutputs((o) => ({ ...o, [e.nodeId]: e.value }));
|
|
10455
10477
|
appendFeed({ level: "info", text: `${e.nodeId}.${e.portId} = ${preview(e.value)}`, nodeId: e.nodeId, detail: e.value });
|
|
@@ -10509,7 +10531,7 @@ function useFlowRun({ maxFeed = 200 } = {}) {
|
|
|
10509
10531
|
setFeed([]);
|
|
10510
10532
|
setLastResult(null);
|
|
10511
10533
|
}, []);
|
|
10512
|
-
return { statuses, statusText, outputs, feed, running, lastResult, run, cancel, reset };
|
|
10534
|
+
return { statuses, statusText, nodeMessages, outputs, feed, running, lastResult, run, cancel, reset };
|
|
10513
10535
|
}
|
|
10514
10536
|
function applyOutputsToNodes(nodes, outputs) {
|
|
10515
10537
|
return nodes.map((n) => {
|