@particle-academy/fancy-flow 0.10.1 → 0.12.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 (49) hide show
  1. package/dist/{chunk-2DMBJN2O.js → chunk-D6W5FMCT.js} +6 -5
  2. package/dist/chunk-D6W5FMCT.js.map +1 -0
  3. package/dist/{chunk-NCPQDVUE.js → chunk-IK5DS5JP.js} +262 -29
  4. package/dist/chunk-IK5DS5JP.js.map +1 -0
  5. package/dist/{chunk-HNBO4HP3.js → chunk-L4AX73Q6.js} +12 -5
  6. package/dist/chunk-L4AX73Q6.js.map +1 -0
  7. package/dist/{chunk-VEI743ZX.js → chunk-MFMRTRPO.js} +3 -3
  8. package/dist/{chunk-VEI743ZX.js.map → chunk-MFMRTRPO.js.map} +1 -1
  9. package/dist/{chunk-CPSOC27D.js → chunk-U5F22BHV.js} +18 -4
  10. package/dist/chunk-U5F22BHV.js.map +1 -0
  11. package/dist/engine.cjs +20 -3
  12. package/dist/engine.cjs.map +1 -1
  13. package/dist/engine.d.cts +4 -2
  14. package/dist/engine.d.ts +4 -2
  15. package/dist/engine.js +2 -2
  16. package/dist/index.cjs +417 -189
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.cts +4 -4
  19. package/dist/index.d.ts +4 -4
  20. package/dist/index.js +9 -9
  21. package/dist/registry/index.d.cts +149 -5
  22. package/dist/registry/index.d.ts +149 -5
  23. package/dist/registry.cjs +475 -71
  24. package/dist/registry.cjs.map +1 -1
  25. package/dist/registry.js +3 -2
  26. package/dist/runtime/index.d.cts +1 -1
  27. package/dist/runtime/index.d.ts +1 -1
  28. package/dist/runtime.cjs +20 -3
  29. package/dist/runtime.cjs.map +1 -1
  30. package/dist/runtime.js +3 -3
  31. package/dist/schema/index.d.cts +1 -1
  32. package/dist/schema/index.d.ts +1 -1
  33. package/dist/schema.cjs +11 -3
  34. package/dist/schema.cjs.map +1 -1
  35. package/dist/schema.js +2 -2
  36. package/dist/{types-BS3Gwnkq.d.cts → types-Dg2REAz5.d.cts} +6 -0
  37. package/dist/{types-BS3Gwnkq.d.ts → types-Dg2REAz5.d.ts} +6 -0
  38. package/dist/{types-BocBFh6l.d.ts → types-DnQ4TEHN.d.cts} +16 -2
  39. package/dist/{types-DKqaUjF_.d.cts → types-DtXOwXjA.d.ts} +16 -2
  40. package/dist/ux.cjs +5 -0
  41. package/dist/ux.cjs.map +1 -1
  42. package/dist/ux.d.cts +2 -2
  43. package/dist/ux.d.ts +2 -2
  44. package/dist/ux.js +1 -1
  45. package/package.json +1 -1
  46. package/dist/chunk-2DMBJN2O.js.map +0 -1
  47. package/dist/chunk-CPSOC27D.js.map +0 -1
  48. package/dist/chunk-HNBO4HP3.js.map +0 -1
  49. package/dist/chunk-NCPQDVUE.js.map +0 -1
package/dist/registry.js CHANGED
@@ -1,7 +1,8 @@
1
- export { BUILTIN_KINDS, RegistryNode, buildNodeTypes, registerBuiltinKinds } from './chunk-NCPQDVUE.js';
1
+ export { BUILTIN_KINDS, DEFAULT_MAX_DEPTH, RegistryNode, buildNodeTypes, capabilityStatus, declaredRoutes, getLlmClient, getWorkflowResolver, llmBranchExecutor, registerBuiltinKinds, registerLlmClient, registerWorkflowResolver, resolveFallbackPort, subflowExecutor, subflowMode, subflowPorts } from './chunk-IK5DS5JP.js';
2
2
  import './chunk-NF6NPY5N.js';
3
+ import './chunk-L4AX73Q6.js';
3
4
  export { nodeConfig, resolveNodePorts, resolvePortSpec } from './chunk-TITD5W4Y.js';
4
- export { categoryAccent, defaultConfigFor, getNodeKind, listNodeKinds, onNodeKindsChanged, registerNodeKind, validateConfig } from './chunk-CPSOC27D.js';
5
+ export { categoryAccent, defaultConfigFor, getNodeKind, kindIds, listNodeKinds, onNodeKindsChanged, registerNodeKind, resolveKindId, validateConfig } from './chunk-U5F22BHV.js';
5
6
  export { RichInputPreview, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerRichInputAdapter } from './chunk-F5RPRB7A.js';
6
7
  //# sourceMappingURL=registry.js.map
7
8
  //# sourceMappingURL=registry.js.map
@@ -1,6 +1,6 @@
1
1
  import { RunResult, RunOptions } from '../engine.cjs';
2
2
  export { runFlow } from '../engine.cjs';
3
- import { b as NodeRunStatus, a as FlowGraph, E as ExecutorRegistry, F as FlowNode, c as FlowEdge } from '../types-BS3Gwnkq.cjs';
3
+ import { b as NodeRunStatus, a as FlowGraph, E as ExecutorRegistry, F as FlowNode, c as FlowEdge } from '../types-Dg2REAz5.cjs';
4
4
  import { NodeChange, EdgeChange, Connection } from '@xyflow/react';
5
5
 
6
6
  type FlowRunFeedEntry = {
@@ -1,6 +1,6 @@
1
1
  import { RunResult, RunOptions } from '../engine.js';
2
2
  export { runFlow } from '../engine.js';
3
- import { b as NodeRunStatus, a as FlowGraph, E as ExecutorRegistry, F as FlowNode, c as FlowEdge } from '../types-BS3Gwnkq.js';
3
+ import { b as NodeRunStatus, a as FlowGraph, E as ExecutorRegistry, F as FlowNode, c as FlowEdge } from '../types-Dg2REAz5.js';
4
4
  import { NodeChange, EdgeChange, Connection } from '@xyflow/react';
5
5
 
6
6
  type FlowRunFeedEntry = {
package/dist/runtime.cjs CHANGED
@@ -10,8 +10,18 @@ var ReactExports__default = /*#__PURE__*/_interopDefault(ReactExports);
10
10
 
11
11
  // src/registry/registry.ts
12
12
  var kinds = /* @__PURE__ */ new Map();
13
+ var aliases = /* @__PURE__ */ new Map();
14
+ function resolveKindId(id2) {
15
+ if (kinds.has(id2)) return id2;
16
+ const canonical = aliases.get(id2);
17
+ return canonical && kinds.has(canonical) ? canonical : null;
18
+ }
13
19
  function getNodeKind(name) {
14
- return kinds.get(name) ?? null;
20
+ const canonical = resolveKindId(name);
21
+ return canonical ? kinds.get(canonical) ?? null : null;
22
+ }
23
+ function kindIds(kind) {
24
+ return [kind.name, ...kind.aliases ?? []];
15
25
  }
16
26
 
17
27
  // src/registry/ports.ts
@@ -40,7 +50,7 @@ function resolveNodePorts(node, kind) {
40
50
  // src/runtime/run-flow.ts
41
51
  async function runFlow(graph, executors, onEvent = () => {
42
52
  }, options = {}) {
43
- const { signal, initialInputs = {}, timeoutMs } = options;
53
+ const { signal, initialInputs = {}, timeoutMs, depth = 0 } = options;
44
54
  const outputs = {};
45
55
  const portValues = /* @__PURE__ */ new Map();
46
56
  const completed = /* @__PURE__ */ new Set();
@@ -88,7 +98,8 @@ async function runFlow(graph, executors, onEvent = () => {
88
98
  abort: (reason) => {
89
99
  throw new Error(reason ?? "aborted");
90
100
  },
91
- emit: onEvent
101
+ emit: onEvent,
102
+ depth
92
103
  })
93
104
  );
94
105
  outputs[node.id] = result;
@@ -156,6 +167,12 @@ function collectInputs(node, incoming, portValues, initial) {
156
167
  function pickExecutor(executors, node) {
157
168
  if (executors[node.id]) return executors[node.id];
158
169
  if (node.type && executors[node.type]) return executors[node.type];
170
+ const kind = node.type ? getNodeKind(node.type) : null;
171
+ if (kind) {
172
+ for (const id2 of kindIds(kind)) {
173
+ if (executors[id2]) return executors[id2];
174
+ }
175
+ }
159
176
  return executors["*"];
160
177
  }
161
178
  function activatedPorts(node, result) {