@particle-academy/fancy-flow 0.48.0 → 0.49.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-MJ3A3TAI.js → chunk-6FP3F5YR.js} +21 -4
- package/dist/chunk-6FP3F5YR.js.map +1 -0
- package/dist/{chunk-DRRZEAYB.js → chunk-6XKR65XM.js} +3 -3
- package/dist/{chunk-DRRZEAYB.js.map → chunk-6XKR65XM.js.map} +1 -1
- package/dist/{chunk-UVP43XU2.js → chunk-AVRGZFXG.js} +4 -4
- package/dist/{chunk-UVP43XU2.js.map → chunk-AVRGZFXG.js.map} +1 -1
- package/dist/{chunk-E6T3FZZP.js → chunk-UL3DGSSG.js} +9 -4
- package/dist/chunk-UL3DGSSG.js.map +1 -0
- package/dist/{chunk-7DTUZUTB.js → chunk-VUL7CUFW.js} +3 -3
- package/dist/{chunk-7DTUZUTB.js.map → chunk-VUL7CUFW.js.map} +1 -1
- package/dist/{chunk-KTGXZBUM.js → chunk-YOK3WKWC.js} +7 -3
- package/dist/chunk-YOK3WKWC.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 +19 -2
- package/dist/durable.cjs.map +1 -1
- package/dist/durable.js +1 -1
- package/dist/engine.cjs +19 -2
- 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 +60 -3
- 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 +19 -2
- 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 +25 -3
- 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 +23 -2
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/screens.cjs +19 -2
- 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.ts → types-7cXcSQlx.d.cts} +50 -0
- package/dist/{types-Jx1TwehV.d.cts → 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 +19 -2
- 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-E6T3FZZP.js.map +0 -1
- package/dist/chunk-KTGXZBUM.js.map +0 -1
- package/dist/chunk-MJ3A3TAI.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-6XKR65XM.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-6FP3F5YR.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);
|
|
@@ -10364,7 +10370,10 @@ function collectInputs(node, incoming, portValues, initial) {
|
|
|
10364
10370
|
function pickExecutor(executors, node) {
|
|
10365
10371
|
if (executors[node.id]) return executors[node.id];
|
|
10366
10372
|
if (node.type && executors[node.type]) return executors[node.type];
|
|
10367
|
-
const
|
|
10373
|
+
const declared = node.data?.kind;
|
|
10374
|
+
const kindName = typeof declared === "string" && declared !== "" ? declared : node.type;
|
|
10375
|
+
if (kindName && kindName !== node.type && executors[kindName]) return executors[kindName];
|
|
10376
|
+
const kind = kindName ? getNodeKind(kindName) : null;
|
|
10368
10377
|
if (kind) {
|
|
10369
10378
|
for (const id2 of kindIds(kind)) {
|
|
10370
10379
|
if (executors[id2]) return executors[id2];
|
|
@@ -10386,6 +10395,14 @@ function activatedPorts(node, result) {
|
|
|
10386
10395
|
const declared = resolveNodePorts(node, kind).outputs?.map((p) => p.id);
|
|
10387
10396
|
return { ports: declared?.length ? declared : ["out"], value: result };
|
|
10388
10397
|
}
|
|
10398
|
+
function announce(onEvent, node, phase) {
|
|
10399
|
+
const data = node.data;
|
|
10400
|
+
const raw = phase === "start" ? data?.startingMsg : data?.stoppingMsg;
|
|
10401
|
+
if (typeof raw !== "string") return;
|
|
10402
|
+
const message = raw.trim();
|
|
10403
|
+
if (message === "") return;
|
|
10404
|
+
onEvent({ type: "node-message", nodeId: node.id, phase, message });
|
|
10405
|
+
}
|
|
10389
10406
|
|
|
10390
10407
|
// src/runtime/run-cohort.ts
|
|
10391
10408
|
async function runCohort(flows, executors, onEvent = () => {
|
|
@@ -10434,6 +10451,7 @@ function errorText(error) {
|
|
|
10434
10451
|
function useFlowRun({ maxFeed = 200 } = {}) {
|
|
10435
10452
|
const [statuses, setStatuses] = ReactExports.useState({});
|
|
10436
10453
|
const [statusText, setStatusText] = ReactExports.useState({});
|
|
10454
|
+
const [nodeMessages, setNodeMessages] = ReactExports.useState({});
|
|
10437
10455
|
const [outputs, setOutputs] = ReactExports.useState({});
|
|
10438
10456
|
const [feed, setFeed] = ReactExports.useState([]);
|
|
10439
10457
|
const [running, setRunning] = ReactExports.useState(false);
|
|
@@ -10447,6 +10465,10 @@ function useFlowRun({ maxFeed = 200 } = {}) {
|
|
|
10447
10465
|
setStatusText((t) => ({ ...t, [e.nodeId]: e.text }));
|
|
10448
10466
|
appendFeed({ level: "status", text: `${e.nodeId} \u2192 ${e.status}${e.text ? ` (${e.text})` : ""}`, nodeId: e.nodeId });
|
|
10449
10467
|
break;
|
|
10468
|
+
case "node-message":
|
|
10469
|
+
setNodeMessages((m) => ({ ...m, [e.nodeId]: e.message }));
|
|
10470
|
+
appendFeed({ level: "message", text: e.message, nodeId: e.nodeId });
|
|
10471
|
+
break;
|
|
10450
10472
|
case "node-output":
|
|
10451
10473
|
setOutputs((o) => ({ ...o, [e.nodeId]: e.value }));
|
|
10452
10474
|
appendFeed({ level: "info", text: `${e.nodeId}.${e.portId} = ${preview(e.value)}`, nodeId: e.nodeId, detail: e.value });
|
|
@@ -10506,7 +10528,7 @@ function useFlowRun({ maxFeed = 200 } = {}) {
|
|
|
10506
10528
|
setFeed([]);
|
|
10507
10529
|
setLastResult(null);
|
|
10508
10530
|
}, []);
|
|
10509
|
-
return { statuses, statusText, outputs, feed, running, lastResult, run, cancel, reset };
|
|
10531
|
+
return { statuses, statusText, nodeMessages, outputs, feed, running, lastResult, run, cancel, reset };
|
|
10510
10532
|
}
|
|
10511
10533
|
function applyOutputsToNodes(nodes, outputs) {
|
|
10512
10534
|
return nodes.map((n) => {
|