@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/runtime.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-
|
|
2
|
-
export { runCohort } from './chunk-
|
|
3
|
-
export { RunIdentity, escapeSegment, runFlow } from './chunk-
|
|
1
|
+
export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-BAHJVX3S.js';
|
|
2
|
+
export { runCohort } from './chunk-DQJIU55F.js';
|
|
3
|
+
export { RunIdentity, escapeSegment, runFlow } from './chunk-XJMWMU4J.js';
|
|
4
4
|
import './chunk-F5RPRB7A.js';
|
|
5
5
|
import './chunk-USL4FMFU.js';
|
|
6
6
|
//# sourceMappingURL=runtime.js.map
|
package/dist/schema/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PortDescriptor, F as FlowGraph } from '../types-
|
|
1
|
+
import { P as PortDescriptor, F as FlowGraph } from '../types-7cXcSQlx.cjs';
|
|
2
2
|
import '@xyflow/react';
|
|
3
3
|
|
|
4
4
|
/** Schema version. Bump on breaking shape changes; add migrations as needed. */
|
|
@@ -39,6 +39,14 @@ type WorkflowSchemaNode = {
|
|
|
39
39
|
};
|
|
40
40
|
label?: string;
|
|
41
41
|
description?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Announced to a person just before / just after this node runs. Omitted
|
|
44
|
+
* entirely when unset, so a graph of ordinary plumbing nodes does not carry
|
|
45
|
+
* a pair of empty keys per node and every diff of a saved graph stays
|
|
46
|
+
* readable.
|
|
47
|
+
*/
|
|
48
|
+
startingMsg?: string;
|
|
49
|
+
stoppingMsg?: string;
|
|
42
50
|
config?: Record<string, unknown>;
|
|
43
51
|
/**
|
|
44
52
|
* Resolved ports, written on export.
|
package/dist/schema/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { P as PortDescriptor, F as FlowGraph } from '../types-
|
|
1
|
+
import { P as PortDescriptor, F as FlowGraph } from '../types-7cXcSQlx.js';
|
|
2
2
|
import '@xyflow/react';
|
|
3
3
|
|
|
4
4
|
/** Schema version. Bump on breaking shape changes; add migrations as needed. */
|
|
@@ -39,6 +39,14 @@ type WorkflowSchemaNode = {
|
|
|
39
39
|
};
|
|
40
40
|
label?: string;
|
|
41
41
|
description?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Announced to a person just before / just after this node runs. Omitted
|
|
44
|
+
* entirely when unset, so a graph of ordinary plumbing nodes does not carry
|
|
45
|
+
* a pair of empty keys per node and every diff of a saved graph stays
|
|
46
|
+
* readable.
|
|
47
|
+
*/
|
|
48
|
+
startingMsg?: string;
|
|
49
|
+
stoppingMsg?: string;
|
|
42
50
|
config?: Record<string, unknown>;
|
|
43
51
|
/**
|
|
44
52
|
* Resolved ports, written on export.
|
package/dist/schema.cjs
CHANGED
|
@@ -9281,6 +9281,7 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
9281
9281
|
continue;
|
|
9282
9282
|
}
|
|
9283
9283
|
onEvent({ type: "node-status", nodeId: node.id, status: "running" });
|
|
9284
|
+
announce(onEvent, node, "start");
|
|
9284
9285
|
const inputs = collectInputs(node, incoming, portValues, initialInputs);
|
|
9285
9286
|
const exec = pickExecutor(executors, node);
|
|
9286
9287
|
if (!exec) {
|
|
@@ -9299,6 +9300,7 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
9299
9300
|
throw new Error(reason ?? "aborted");
|
|
9300
9301
|
},
|
|
9301
9302
|
emit: onEvent,
|
|
9303
|
+
executors,
|
|
9302
9304
|
depth,
|
|
9303
9305
|
run
|
|
9304
9306
|
})
|
|
@@ -9311,6 +9313,7 @@ async function runFlow(graph, executors, onEvent = () => {
|
|
|
9311
9313
|
}
|
|
9312
9314
|
completed.add(node.id);
|
|
9313
9315
|
onEvent({ type: "node-status", nodeId: node.id, status: "done" });
|
|
9316
|
+
announce(onEvent, node, "end");
|
|
9314
9317
|
} catch (e) {
|
|
9315
9318
|
const msg = e instanceof Error ? e.message : String(e);
|
|
9316
9319
|
errors.push(msg);
|
|
@@ -9363,6 +9366,9 @@ function collectInputs(node, incoming, portValues, initial) {
|
|
|
9363
9366
|
const key = `${e.source}:${e.sourceHandle ?? "out"}`;
|
|
9364
9367
|
if (!portValues.has(key)) continue;
|
|
9365
9368
|
inputs[portId] = portValues.get(key);
|
|
9369
|
+
if (e.targetHandle == null && !(e.source in inputs)) {
|
|
9370
|
+
inputs[e.source] = portValues.get(key);
|
|
9371
|
+
}
|
|
9366
9372
|
}
|
|
9367
9373
|
return inputs;
|
|
9368
9374
|
}
|
|
@@ -9394,6 +9400,14 @@ function activatedPorts(node, result) {
|
|
|
9394
9400
|
const declared = resolveNodePorts(node, kind).outputs?.map((p) => p.id);
|
|
9395
9401
|
return { ports: declared?.length ? declared : ["out"], value: result };
|
|
9396
9402
|
}
|
|
9403
|
+
function announce(onEvent, node, phase) {
|
|
9404
|
+
const data = node.data;
|
|
9405
|
+
const raw = phase === "start" ? data?.startingMsg : data?.stoppingMsg;
|
|
9406
|
+
if (typeof raw !== "string") return;
|
|
9407
|
+
const message = raw.trim();
|
|
9408
|
+
if (message === "") return;
|
|
9409
|
+
onEvent({ type: "node-message", nodeId: node.id, phase, message });
|
|
9410
|
+
}
|
|
9397
9411
|
|
|
9398
9412
|
// src/registry/subflow.ts
|
|
9399
9413
|
var DEFAULT_MAX_DEPTH = 8;
|
|
@@ -9447,7 +9461,10 @@ var subflowExecutor = async (ctx) => {
|
|
|
9447
9461
|
};
|
|
9448
9462
|
const result = await runFlow(
|
|
9449
9463
|
child,
|
|
9450
|
-
|
|
9464
|
+
// Inherit the parent's registry, then let the graph layer its own on top.
|
|
9465
|
+
// The inherited half is the fix; the layered half keeps a graph that
|
|
9466
|
+
// deliberately hands its child extra or different executors working.
|
|
9467
|
+
{ ...ctx.executors ?? {}, ...config.executors ?? {} },
|
|
9451
9468
|
forward,
|
|
9452
9469
|
{
|
|
9453
9470
|
initialInputs: config.inputs ?? {
|
|
@@ -10507,6 +10524,8 @@ function toSchemaNode(n) {
|
|
|
10507
10524
|
position: { x: n.position.x, y: n.position.y },
|
|
10508
10525
|
label: data.label,
|
|
10509
10526
|
description: data.description,
|
|
10527
|
+
...typeof data.startingMsg === "string" && data.startingMsg !== "" ? { startingMsg: data.startingMsg } : {},
|
|
10528
|
+
...typeof data.stoppingMsg === "string" && data.stoppingMsg !== "" ? { stoppingMsg: data.stoppingMsg } : {},
|
|
10510
10529
|
config: data.config,
|
|
10511
10530
|
inputs: ports.inputs,
|
|
10512
10531
|
outputs: ports.outputs,
|
|
@@ -10579,6 +10598,8 @@ function importWorkflow(schema, options = {}) {
|
|
|
10579
10598
|
kind: kindId,
|
|
10580
10599
|
label: n.label ?? kind?.label ?? n.kind,
|
|
10581
10600
|
description: n.description,
|
|
10601
|
+
...n.startingMsg ? { startingMsg: n.startingMsg } : {},
|
|
10602
|
+
...n.stoppingMsg ? { stoppingMsg: n.stoppingMsg } : {},
|
|
10582
10603
|
config,
|
|
10583
10604
|
// Carry serialized ports back onto the node so a round-trip is stable
|
|
10584
10605
|
// and an unknown kind still routes the way the document described.
|