@particle-academy/fancy-flow 0.72.0 → 0.72.1

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 (53) hide show
  1. package/dist/{chunk-57QTX3S3.js → chunk-3RXQGYGH.js} +3 -3
  2. package/dist/{chunk-57QTX3S3.js.map → chunk-3RXQGYGH.js.map} +1 -1
  3. package/dist/{chunk-RQP666FB.js → chunk-7DJ56PUA.js} +4 -4
  4. package/dist/{chunk-RQP666FB.js.map → chunk-7DJ56PUA.js.map} +1 -1
  5. package/dist/{chunk-C5K2DSZB.js → chunk-EX34GCKK.js} +7 -5
  6. package/dist/chunk-EX34GCKK.js.map +1 -0
  7. package/dist/{chunk-ZEDBF2V6.js → chunk-GQ5LEA7Q.js} +3 -3
  8. package/dist/{chunk-ZEDBF2V6.js.map → chunk-GQ5LEA7Q.js.map} +1 -1
  9. package/dist/{chunk-E3U3MBKI.js → chunk-K7KO3UJ3.js} +3 -3
  10. package/dist/{chunk-E3U3MBKI.js.map → chunk-K7KO3UJ3.js.map} +1 -1
  11. package/dist/{chunk-R3GQ72WA.js → chunk-LYYQO7EY.js} +4 -4
  12. package/dist/{chunk-R3GQ72WA.js.map → chunk-LYYQO7EY.js.map} +1 -1
  13. package/dist/{chunk-6TC44VCY.js → chunk-VAF2SWTC.js} +3 -3
  14. package/dist/{chunk-6TC44VCY.js.map → chunk-VAF2SWTC.js.map} +1 -1
  15. package/dist/durable/index.d.cts +45 -12
  16. package/dist/durable/index.d.ts +45 -12
  17. package/dist/durable.cjs +23 -11
  18. package/dist/durable.cjs.map +1 -1
  19. package/dist/durable.js +19 -10
  20. package/dist/durable.js.map +1 -1
  21. package/dist/engine.cjs +5 -3
  22. package/dist/engine.cjs.map +1 -1
  23. package/dist/engine.d.cts +2 -2
  24. package/dist/engine.d.ts +2 -2
  25. package/dist/engine.js +4 -4
  26. package/dist/index.cjs +5 -3
  27. package/dist/index.cjs.map +1 -1
  28. package/dist/index.d.cts +2 -2
  29. package/dist/index.d.ts +2 -2
  30. package/dist/index.js +12 -12
  31. package/dist/registry.cjs +5 -3
  32. package/dist/registry.cjs.map +1 -1
  33. package/dist/registry.js +2 -2
  34. package/dist/{run-cohort-DL9JzzPU.d.cts → run-cohort-DNpPa0mq.d.cts} +1 -1
  35. package/dist/{run-cohort-CjUBWg6X.d.ts → run-cohort-rgT_FX3V.d.ts} +1 -1
  36. package/dist/{run-flow-CxEGBOxd.d.ts → run-flow-BLP9rXfO.d.ts} +22 -1
  37. package/dist/{run-flow-B_8hgO5_.d.cts → run-flow-pW0PllaZ.d.cts} +22 -1
  38. package/dist/runtime/index.d.cts +3 -3
  39. package/dist/runtime/index.d.ts +3 -3
  40. package/dist/runtime.cjs +5 -3
  41. package/dist/runtime.cjs.map +1 -1
  42. package/dist/runtime.js +3 -3
  43. package/dist/schema.cjs +5 -3
  44. package/dist/schema.cjs.map +1 -1
  45. package/dist/schema.js +3 -3
  46. package/dist/screens.cjs +5 -3
  47. package/dist/screens.cjs.map +1 -1
  48. package/dist/screens.js +4 -4
  49. package/dist/ux.cjs +5 -3
  50. package/dist/ux.cjs.map +1 -1
  51. package/dist/ux.js +1 -1
  52. package/package.json +1 -1
  53. package/dist/chunk-C5K2DSZB.js.map +0 -1
package/dist/registry.js CHANGED
@@ -1,8 +1,8 @@
1
- export { ANY_PORT_TYPE, BUILTIN_KINDS, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, registerBuiltinKinds } from './chunk-57QTX3S3.js';
1
+ export { ANY_PORT_TYPE, BUILTIN_KINDS, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, registerBuiltinKinds } from './chunk-3RXQGYGH.js';
2
2
  export { RichInputPreview, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerRichInputAdapter } from './chunk-F5RPRB7A.js';
3
3
  import './chunk-OWENS2H5.js';
4
4
  export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, decodePause, encodePause, isPause, pauseForHuman } from './chunk-UEOE6B52.js';
5
- export { DEFAULT_MAX_DEPTH, applyKindSchemaOverlay, categoryAccent, clearKindSchemaOverlays, clearNodeKindOverrides, declaredRoutes, defaultConfigFor, ensureBuiltinKinds, getNodeKind, kindIds, listNodeKinds, llmRouterExecutor as llmBranchExecutor, llmRouterExecutor, nodeConfig, onNodeKindsChanged, overrideNodeKind, registerNodeKind, resolveFallbackPort, resolveKindId, resolveNodePorts, resolvePortSpec, subflowExecutor, subflowMode, subflowPorts, unregisterNodeKind, validateConfig } from './chunk-C5K2DSZB.js';
5
+ export { DEFAULT_MAX_DEPTH, applyKindSchemaOverlay, categoryAccent, clearKindSchemaOverlays, clearNodeKindOverrides, declaredRoutes, defaultConfigFor, ensureBuiltinKinds, getNodeKind, kindIds, listNodeKinds, llmRouterExecutor as llmBranchExecutor, llmRouterExecutor, nodeConfig, onNodeKindsChanged, overrideNodeKind, registerNodeKind, resolveFallbackPort, resolveKindId, resolveNodePorts, resolvePortSpec, subflowExecutor, subflowMode, subflowPorts, unregisterNodeKind, validateConfig } from './chunk-EX34GCKK.js';
6
6
  export { capabilityStatus, getLlmClient, getTerminalHost, getWorkflowResolver, isResolutionFailure, registerLlmClient, registerTerminalHost, registerWorkflowResolver } from './chunk-2QXKDLGT.js';
7
7
  //# sourceMappingURL=registry.js.map
8
8
  //# sourceMappingURL=registry.js.map
@@ -1,5 +1,5 @@
1
1
  import { F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-B-Syk9-M.cjs';
2
- import { R as RunOptions, a as RunResult } from './run-flow-B_8hgO5_.cjs';
2
+ import { R as RunOptions, a as RunResult } from './run-flow-pW0PllaZ.cjs';
3
3
 
4
4
  /**
5
5
  * How the flows one trigger fired should treat each other.
@@ -1,5 +1,5 @@
1
1
  import { F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-B-Syk9-M.js';
2
- import { R as RunOptions, a as RunResult } from './run-flow-CxEGBOxd.js';
2
+ import { R as RunOptions, a as RunResult } from './run-flow-BLP9rXfO.js';
3
3
 
4
4
  /**
5
5
  * How the flows one trigger fired should treat each other.
@@ -1,4 +1,4 @@
1
- import { c as RunIdentity, d as RunIdentityJson, F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-B-Syk9-M.js';
1
+ import { c as RunIdentity, d as RunIdentityJson, N as NodeExecutor, F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-B-Syk9-M.js';
2
2
 
3
3
  type RunOptions = {
4
4
  /** Stop the run after this many ms. Default: no timeout. */
@@ -69,6 +69,27 @@ type RunOptions = {
69
69
  * and Python runtimes have always resumed.
70
70
  */
71
71
  resumeOutputs?: Record<string, unknown>;
72
+ /**
73
+ * Executors bound to ONE node id each, matched against `node.id` and nothing
74
+ * else. They outrank every entry of the executor registry.
75
+ *
76
+ * The registry cannot say this. It is one flat object, and `executorLookupIds`
77
+ * tries a key as the node's id AND as its kind, so a key that is both is both:
78
+ * binding `host_kind` to pin the node CALLED `host_kind` also rebinds every
79
+ * node whose kind is `host_kind`. That is the registry's contract (pinned by
80
+ * `flow/executor-resolution`) and it stays. This is the separate channel for a
81
+ * binding that must not leak into the kind namespace -- the PHP twin's
82
+ * `bindNode`, which has always been kept apart from `bind`.
83
+ *
84
+ * The durable replay fences every node but its target through this. Through
85
+ * the registry, a node whose id matched a kind fenced every node of that kind,
86
+ * and the durable run reported success having run nothing.
87
+ *
88
+ * NOT handed down to a nested run. Node ids belong to one graph: a `subflow`
89
+ * child's `t` is not its parent's `t`, so `ctx.executors` stays the registry
90
+ * alone.
91
+ */
92
+ nodeExecutors?: Record<string, NodeExecutor>;
72
93
  };
73
94
  type RunResult = {
74
95
  ok: boolean;
@@ -1,4 +1,4 @@
1
- import { c as RunIdentity, d as RunIdentityJson, F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-B-Syk9-M.cjs';
1
+ import { c as RunIdentity, d as RunIdentityJson, N as NodeExecutor, F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-B-Syk9-M.cjs';
2
2
 
3
3
  type RunOptions = {
4
4
  /** Stop the run after this many ms. Default: no timeout. */
@@ -69,6 +69,27 @@ type RunOptions = {
69
69
  * and Python runtimes have always resumed.
70
70
  */
71
71
  resumeOutputs?: Record<string, unknown>;
72
+ /**
73
+ * Executors bound to ONE node id each, matched against `node.id` and nothing
74
+ * else. They outrank every entry of the executor registry.
75
+ *
76
+ * The registry cannot say this. It is one flat object, and `executorLookupIds`
77
+ * tries a key as the node's id AND as its kind, so a key that is both is both:
78
+ * binding `host_kind` to pin the node CALLED `host_kind` also rebinds every
79
+ * node whose kind is `host_kind`. That is the registry's contract (pinned by
80
+ * `flow/executor-resolution`) and it stays. This is the separate channel for a
81
+ * binding that must not leak into the kind namespace -- the PHP twin's
82
+ * `bindNode`, which has always been kept apart from `bind`.
83
+ *
84
+ * The durable replay fences every node but its target through this. Through
85
+ * the registry, a node whose id matched a kind fenced every node of that kind,
86
+ * and the durable run reported success having run nothing.
87
+ *
88
+ * NOT handed down to a nested run. Node ids belong to one graph: a `subflow`
89
+ * child's `t` is not its parent's `t`, so `ctx.executors` stays the registry
90
+ * alone.
91
+ */
92
+ nodeExecutors?: Record<string, NodeExecutor>;
72
93
  };
73
94
  type RunResult = {
74
95
  ok: boolean;
@@ -1,8 +1,8 @@
1
- import { a as RunResult, R as RunOptions } from '../run-flow-B_8hgO5_.cjs';
2
- export { r as runFlow } from '../run-flow-B_8hgO5_.cjs';
1
+ import { a as RunResult, R as RunOptions } from '../run-flow-pW0PllaZ.cjs';
2
+ export { r as runFlow } from '../run-flow-pW0PllaZ.cjs';
3
3
  import { h as NodeRunStatus, F as FlowGraph, E as ExecutorRegistry, a as FlowNode, e as FlowEdge } from '../types-B-Syk9-M.cjs';
4
4
  export { c as RunIdentity, d as RunIdentityJson, k as escapeSegment } from '../types-B-Syk9-M.cjs';
5
- export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from '../run-cohort-DL9JzzPU.cjs';
5
+ export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from '../run-cohort-DNpPa0mq.cjs';
6
6
  import { NodeChange, EdgeChange, Connection } from '@xyflow/react';
7
7
 
8
8
  type FlowRunFeedEntry = {
@@ -1,8 +1,8 @@
1
- import { a as RunResult, R as RunOptions } from '../run-flow-CxEGBOxd.js';
2
- export { r as runFlow } from '../run-flow-CxEGBOxd.js';
1
+ import { a as RunResult, R as RunOptions } from '../run-flow-BLP9rXfO.js';
2
+ export { r as runFlow } from '../run-flow-BLP9rXfO.js';
3
3
  import { h as NodeRunStatus, F as FlowGraph, E as ExecutorRegistry, a as FlowNode, e as FlowEdge } from '../types-B-Syk9-M.js';
4
4
  export { c as RunIdentity, d as RunIdentityJson, k as escapeSegment } from '../types-B-Syk9-M.js';
5
- export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from '../run-cohort-CjUBWg6X.js';
5
+ export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from '../run-cohort-rgT_FX3V.js';
6
6
  import { NodeChange, EdgeChange, Connection } from '@xyflow/react';
7
7
 
8
8
  type FlowRunFeedEntry = {
package/dist/runtime.cjs CHANGED
@@ -2303,7 +2303,7 @@ function resolveWorkflowProps(declared, passed) {
2303
2303
  // src/runtime/run-flow.ts
2304
2304
  async function runFlow(graph, executors, onEvent = () => {
2305
2305
  }, options = {}) {
2306
- const { signal, initialInputs = {}, timeoutMs, depth = 0, resumeOutputs = {}, entryNodes } = options;
2306
+ const { signal, initialInputs = {}, timeoutMs, depth = 0, resumeOutputs = {}, entryNodes, nodeExecutors } = options;
2307
2307
  const run = options.run === void 0 ? void 0 : RunIdentity.from(options.run);
2308
2308
  const outputs = {};
2309
2309
  const portValues = /* @__PURE__ */ new Map();
@@ -2391,7 +2391,7 @@ async function runFlow(graph, executors, onEvent = () => {
2391
2391
  onEvent({ type: "node-status", nodeId: node.id, status: "running" });
2392
2392
  announce(onEvent, node, "start");
2393
2393
  const inputs = collectInputs(node, incoming, portValues, initialInputs, props, declaresProps);
2394
- const exec = pickExecutor(executors, node);
2394
+ const exec = pickExecutor(executors, node, nodeExecutors);
2395
2395
  if (!exec) {
2396
2396
  const tried = executorLookupIds(node);
2397
2397
  const msg = `No executor registered for kind=${node.type} \u2014 tried ${tried.map((id2) => `"${id2}"`).join(", ")}. Key your registry by one of those.`;
@@ -2511,7 +2511,9 @@ function executorLookupIds(node) {
2511
2511
  ids.push("*");
2512
2512
  return [...new Set(ids)];
2513
2513
  }
2514
- function pickExecutor(executors, node) {
2514
+ function pickExecutor(executors, node, nodeExecutors) {
2515
+ const pinned = nodeExecutors && Object.prototype.hasOwnProperty.call(nodeExecutors, node.id) ? nodeExecutors[node.id] : void 0;
2516
+ if (pinned) return pinned;
2515
2517
  for (const id2 of executorLookupIds(node)) {
2516
2518
  if (executors[id2]) return executors[id2];
2517
2519
  }