@particle-academy/fancy-flow 0.74.1 → 0.75.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 (41) hide show
  1. package/dist/{chunk-2GU3V2ZD.js → chunk-2H5H2DDP.js} +4 -4
  2. package/dist/{chunk-2GU3V2ZD.js.map → chunk-2H5H2DDP.js.map} +1 -1
  3. package/dist/{chunk-3RXQGYGH.js → chunk-4BPCA3ZO.js} +3 -3
  4. package/dist/{chunk-3RXQGYGH.js.map → chunk-4BPCA3ZO.js.map} +1 -1
  5. package/dist/{chunk-K7KO3UJ3.js → chunk-LKEDPVR3.js} +3 -3
  6. package/dist/{chunk-K7KO3UJ3.js.map → chunk-LKEDPVR3.js.map} +1 -1
  7. package/dist/{chunk-7DJ56PUA.js → chunk-T7E7QPHI.js} +4 -4
  8. package/dist/{chunk-7DJ56PUA.js.map → chunk-T7E7QPHI.js.map} +1 -1
  9. package/dist/{chunk-EX34GCKK.js → chunk-W7DMO3H7.js} +18 -6
  10. package/dist/chunk-W7DMO3H7.js.map +1 -0
  11. package/dist/{chunk-VAF2SWTC.js → chunk-XZFLPKO2.js} +3 -3
  12. package/dist/{chunk-VAF2SWTC.js.map → chunk-XZFLPKO2.js.map} +1 -1
  13. package/dist/{chunk-GQ5LEA7Q.js → chunk-ZBHIEKCN.js} +3 -3
  14. package/dist/{chunk-GQ5LEA7Q.js.map → chunk-ZBHIEKCN.js.map} +1 -1
  15. package/dist/durable.cjs +16 -4
  16. package/dist/durable.cjs.map +1 -1
  17. package/dist/durable.js +1 -1
  18. package/dist/engine.cjs +16 -4
  19. package/dist/engine.cjs.map +1 -1
  20. package/dist/engine.js +4 -4
  21. package/dist/index.cjs +16 -4
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.js +12 -12
  24. package/dist/registry.cjs +16 -4
  25. package/dist/registry.cjs.map +1 -1
  26. package/dist/registry.js +2 -2
  27. package/dist/runtime.cjs +16 -4
  28. package/dist/runtime.cjs.map +1 -1
  29. package/dist/runtime.js +3 -3
  30. package/dist/schema.cjs +16 -4
  31. package/dist/schema.cjs.map +1 -1
  32. package/dist/schema.js +3 -3
  33. package/dist/screens.cjs +16 -4
  34. package/dist/screens.cjs.map +1 -1
  35. package/dist/screens.js +4 -4
  36. package/dist/ux.cjs +17 -5
  37. package/dist/ux.cjs.map +1 -1
  38. package/dist/ux.js +2 -2
  39. package/dist/ux.js.map +1 -1
  40. package/package.json +2 -2
  41. package/dist/chunk-EX34GCKK.js.map +0 -1
package/dist/engine.js CHANGED
@@ -1,9 +1,9 @@
1
- export { runCohort } from './chunk-K7KO3UJ3.js';
1
+ export { runCohort } from './chunk-LKEDPVR3.js';
2
2
  import { decodePause } from './chunk-UEOE6B52.js';
3
3
  export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, decodePause, encodePause, isPause, pauseForHuman } from './chunk-UEOE6B52.js';
4
- export { checkGraphConnectivity, mayFloat } from './chunk-VAF2SWTC.js';
5
- import { runFlow, getNodeKind, resolveNodePorts } from './chunk-EX34GCKK.js';
6
- export { RunIdentity, UnresolvedPathError, applyKindSchemaOverlay, clearKindSchemaOverlays, defaultConfigFor, escapeSegment, evaluateConfig, evaluateExpression, getNodeKind, kindIds, listNodeKinds, registerNodeKind, resolveKindId, resolvePath, runFlow, text, truthy, tryResolvePath, unregisterNodeKind, validateConfig } from './chunk-EX34GCKK.js';
4
+ export { checkGraphConnectivity, mayFloat } from './chunk-XZFLPKO2.js';
5
+ import { runFlow, getNodeKind, resolveNodePorts } from './chunk-W7DMO3H7.js';
6
+ export { RunIdentity, UnresolvedPathError, applyKindSchemaOverlay, clearKindSchemaOverlays, defaultConfigFor, escapeSegment, evaluateConfig, evaluateExpression, getNodeKind, kindIds, listNodeKinds, registerNodeKind, resolveKindId, resolvePath, runFlow, text, truthy, tryResolvePath, unregisterNodeKind, validateConfig } from './chunk-W7DMO3H7.js';
7
7
  import { isResolutionFailure, registerLlmClient, registerWorkflowResolver } from './chunk-2QXKDLGT.js';
8
8
 
9
9
  // src/marketplace/manifest.ts
package/dist/index.cjs CHANGED
@@ -2472,8 +2472,9 @@ async function runFlow(graph, executors, onEvent = () => {
2472
2472
  outputs[node.id] = stored;
2473
2473
  const activated = activatedPorts(node, stored);
2474
2474
  for (const portId of activated.ports) {
2475
- portValues.set(`${node.id}:${portId}`, activated.value);
2476
- onEvent({ type: "node-output", nodeId: node.id, portId, value: activated.value });
2475
+ const value = portValueOf(activated, portId);
2476
+ portValues.set(`${node.id}:${portId}`, value);
2477
+ onEvent({ type: "node-output", nodeId: node.id, portId, value });
2477
2478
  }
2478
2479
  completed.add(node.id);
2479
2480
  onEvent({ type: "node-status", nodeId: node.id, status: "done", text: "resumed" });
@@ -2536,8 +2537,9 @@ async function runFlow(graph, executors, onEvent = () => {
2536
2537
  outputs[node.id] = result;
2537
2538
  const activated = activatedPorts(node, result);
2538
2539
  for (const portId of activated.ports) {
2539
- portValues.set(`${node.id}:${portId}`, activated.value);
2540
- onEvent({ type: "node-output", nodeId: node.id, portId, value: activated.value });
2540
+ const value = portValueOf(activated, portId);
2541
+ portValues.set(`${node.id}:${portId}`, value);
2542
+ onEvent({ type: "node-output", nodeId: node.id, portId, value });
2541
2543
  }
2542
2544
  completed.add(node.id);
2543
2545
  onEvent({ type: "node-status", nodeId: node.id, status: "done" });
@@ -2643,6 +2645,13 @@ function activatedPorts(node, result) {
2643
2645
  if (typeof r.__port === "string") {
2644
2646
  return { ports: [r.__port], value: r.value };
2645
2647
  }
2648
+ if (Array.isArray(r.__ports)) {
2649
+ return { ports: r.__ports.filter((p2) => typeof p2 === "string"), value: r.value };
2650
+ }
2651
+ if (r.__ports && typeof r.__ports === "object") {
2652
+ const values = r.__ports;
2653
+ return { ports: Object.keys(values), value: r.value, values };
2654
+ }
2646
2655
  if (typeof r.branch === "string") {
2647
2656
  return { ports: [r.branch], value: Object.prototype.hasOwnProperty.call(r, "value") ? r.value : r };
2648
2657
  }
@@ -2651,6 +2660,9 @@ function activatedPorts(node, result) {
2651
2660
  const declared = resolveNodePorts(node, kind).outputs?.map((p2) => p2.id);
2652
2661
  return { ports: declared?.length ? declared : ["out"], value: result };
2653
2662
  }
2663
+ function portValueOf(activated, portId) {
2664
+ return activated.values && Object.prototype.hasOwnProperty.call(activated.values, portId) ? activated.values[portId] : activated.value;
2665
+ }
2654
2666
  function announce(onEvent, node, phase) {
2655
2667
  const data = node.data;
2656
2668
  const raw = phase === "start" ? data?.startingMsg : data?.stoppingMsg;