@particle-academy/fancy-flow 0.48.1 → 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-M7H3ASBI.js → chunk-6FP3F5YR.js} +17 -3
- package/dist/chunk-6FP3F5YR.js.map +1 -0
- package/dist/{chunk-HHGU7JXJ.js → chunk-6XKR65XM.js} +3 -3
- package/dist/{chunk-HHGU7JXJ.js.map → chunk-6XKR65XM.js.map} +1 -1
- package/dist/{chunk-FCCGV52I.js → chunk-AVRGZFXG.js} +4 -4
- package/dist/{chunk-FCCGV52I.js.map → chunk-AVRGZFXG.js.map} +1 -1
- package/dist/{chunk-6HGXAU5L.js → chunk-UL3DGSSG.js} +9 -4
- package/dist/chunk-UL3DGSSG.js.map +1 -0
- package/dist/{chunk-54SN6LML.js → chunk-VUL7CUFW.js} +3 -3
- package/dist/{chunk-54SN6LML.js.map → chunk-VUL7CUFW.js.map} +1 -1
- package/dist/{chunk-ACGCHWCM.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 +15 -1
- package/dist/durable.cjs.map +1 -1
- package/dist/durable.js +1 -1
- package/dist/engine.cjs +15 -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 +56 -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 +15 -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 +21 -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 +19 -1
- package/dist/schema.cjs.map +1 -1
- package/dist/schema.js +2 -2
- package/dist/screens.cjs +15 -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 +15 -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-UL3DGSSG.js';
|
|
2
|
+
export { runCohort } from './chunk-VUL7CUFW.js';
|
|
3
|
+
export { RunIdentity, escapeSegment, runFlow } from './chunk-6FP3F5YR.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);
|
|
@@ -9394,6 +9397,14 @@ function activatedPorts(node, result) {
|
|
|
9394
9397
|
const declared = resolveNodePorts(node, kind).outputs?.map((p) => p.id);
|
|
9395
9398
|
return { ports: declared?.length ? declared : ["out"], value: result };
|
|
9396
9399
|
}
|
|
9400
|
+
function announce(onEvent, node, phase) {
|
|
9401
|
+
const data = node.data;
|
|
9402
|
+
const raw = phase === "start" ? data?.startingMsg : data?.stoppingMsg;
|
|
9403
|
+
if (typeof raw !== "string") return;
|
|
9404
|
+
const message = raw.trim();
|
|
9405
|
+
if (message === "") return;
|
|
9406
|
+
onEvent({ type: "node-message", nodeId: node.id, phase, message });
|
|
9407
|
+
}
|
|
9397
9408
|
|
|
9398
9409
|
// src/registry/subflow.ts
|
|
9399
9410
|
var DEFAULT_MAX_DEPTH = 8;
|
|
@@ -9447,7 +9458,10 @@ var subflowExecutor = async (ctx) => {
|
|
|
9447
9458
|
};
|
|
9448
9459
|
const result = await runFlow(
|
|
9449
9460
|
child,
|
|
9450
|
-
|
|
9461
|
+
// Inherit the parent's registry, then let the graph layer its own on top.
|
|
9462
|
+
// The inherited half is the fix; the layered half keeps a graph that
|
|
9463
|
+
// deliberately hands its child extra or different executors working.
|
|
9464
|
+
{ ...ctx.executors ?? {}, ...config.executors ?? {} },
|
|
9451
9465
|
forward,
|
|
9452
9466
|
{
|
|
9453
9467
|
initialInputs: config.inputs ?? {
|
|
@@ -10507,6 +10521,8 @@ function toSchemaNode(n) {
|
|
|
10507
10521
|
position: { x: n.position.x, y: n.position.y },
|
|
10508
10522
|
label: data.label,
|
|
10509
10523
|
description: data.description,
|
|
10524
|
+
...typeof data.startingMsg === "string" && data.startingMsg !== "" ? { startingMsg: data.startingMsg } : {},
|
|
10525
|
+
...typeof data.stoppingMsg === "string" && data.stoppingMsg !== "" ? { stoppingMsg: data.stoppingMsg } : {},
|
|
10510
10526
|
config: data.config,
|
|
10511
10527
|
inputs: ports.inputs,
|
|
10512
10528
|
outputs: ports.outputs,
|
|
@@ -10579,6 +10595,8 @@ function importWorkflow(schema, options = {}) {
|
|
|
10579
10595
|
kind: kindId,
|
|
10580
10596
|
label: n.label ?? kind?.label ?? n.kind,
|
|
10581
10597
|
description: n.description,
|
|
10598
|
+
...n.startingMsg ? { startingMsg: n.startingMsg } : {},
|
|
10599
|
+
...n.stoppingMsg ? { stoppingMsg: n.stoppingMsg } : {},
|
|
10582
10600
|
config,
|
|
10583
10601
|
// Carry serialized ports back onto the node so a round-trip is stable
|
|
10584
10602
|
// and an unknown kind still routes the way the document described.
|