@particle-academy/fancy-flow 0.53.0 → 0.55.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 (59) hide show
  1. package/dist/{ConfigFieldRenderer-Bc9Txnql.d.cts → HumanPrompt-CPl-Spmp.d.cts} +75 -1
  2. package/dist/{ConfigFieldRenderer-Bt3RGT7Z.d.ts → HumanPrompt-DlJSFi3F.d.ts} +75 -1
  3. package/dist/{chunk-CIBW5ATA.js → chunk-22OJOD4X.js} +7 -3
  4. package/dist/chunk-22OJOD4X.js.map +1 -0
  5. package/dist/{chunk-VWANLNL5.js → chunk-E3AGYTHP.js} +3 -3
  6. package/dist/{chunk-VWANLNL5.js.map → chunk-E3AGYTHP.js.map} +1 -1
  7. package/dist/{chunk-FTGVVKWX.js → chunk-HMEI2LFU.js} +4 -4
  8. package/dist/{chunk-FTGVVKWX.js.map → chunk-HMEI2LFU.js.map} +1 -1
  9. package/dist/{chunk-WCFRKXH5.js → chunk-KP4TBF3A.js} +3 -3
  10. package/dist/{chunk-WCFRKXH5.js.map → chunk-KP4TBF3A.js.map} +1 -1
  11. package/dist/{chunk-FG3C7LIG.js → chunk-L4QAAGLV.js} +3 -3
  12. package/dist/{chunk-FG3C7LIG.js.map → chunk-L4QAAGLV.js.map} +1 -1
  13. package/dist/{chunk-FH6MWLKD.js → chunk-YVLOLS25.js} +3 -3
  14. package/dist/{chunk-FH6MWLKD.js.map → chunk-YVLOLS25.js.map} +1 -1
  15. package/dist/durable/index.d.cts +1 -1
  16. package/dist/durable/index.d.ts +1 -1
  17. package/dist/durable.cjs +5 -1
  18. package/dist/durable.cjs.map +1 -1
  19. package/dist/durable.js +1 -1
  20. package/dist/engine.cjs +5 -1
  21. package/dist/engine.cjs.map +1 -1
  22. package/dist/engine.d.cts +2 -2
  23. package/dist/engine.d.ts +2 -2
  24. package/dist/engine.js +3 -3
  25. package/dist/fields/react-fancy.cjs +66 -0
  26. package/dist/fields/react-fancy.cjs.map +1 -1
  27. package/dist/fields/react-fancy.d.cts +35 -2
  28. package/dist/fields/react-fancy.d.ts +35 -2
  29. package/dist/fields/react-fancy.js +67 -2
  30. package/dist/fields/react-fancy.js.map +1 -1
  31. package/dist/index.cjs +34 -10
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.cts +15 -4
  34. package/dist/index.d.ts +15 -4
  35. package/dist/index.js +40 -20
  36. package/dist/index.js.map +1 -1
  37. package/dist/registry.cjs +5 -1
  38. package/dist/registry.cjs.map +1 -1
  39. package/dist/registry.js +2 -2
  40. package/dist/{run-cohort-BPIOpE8A.d.ts → run-cohort-C1nRh_mi.d.ts} +1 -1
  41. package/dist/{run-cohort-r-L8dMED.d.cts → run-cohort-CBRAUj-z.d.cts} +1 -1
  42. package/dist/{run-flow-COdAOFg2.d.cts → run-flow-2XsHBwpd.d.cts} +31 -0
  43. package/dist/{run-flow-DJ7KYT6E.d.ts → run-flow-D7AOCcfE.d.ts} +31 -0
  44. package/dist/runtime/index.d.cts +3 -3
  45. package/dist/runtime/index.d.ts +3 -3
  46. package/dist/runtime.cjs +5 -1
  47. package/dist/runtime.cjs.map +1 -1
  48. package/dist/runtime.js +3 -3
  49. package/dist/schema.cjs +5 -1
  50. package/dist/schema.cjs.map +1 -1
  51. package/dist/schema.js +2 -2
  52. package/dist/screens.cjs +5 -1
  53. package/dist/screens.cjs.map +1 -1
  54. package/dist/screens.js +4 -4
  55. package/dist/ux.cjs +5 -1
  56. package/dist/ux.cjs.map +1 -1
  57. package/dist/ux.js +1 -1
  58. package/package.json +2 -2
  59. package/dist/chunk-CIBW5ATA.js.map +0 -1
package/dist/registry.js CHANGED
@@ -1,6 +1,6 @@
1
- export { ANY_PORT_TYPE, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility } from './chunk-VWANLNL5.js';
1
+ export { ANY_PORT_TYPE, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility } from './chunk-E3AGYTHP.js';
2
2
  export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, decodePause, encodePause, isPause, pauseForHuman } from './chunk-UEOE6B52.js';
3
- export { BUILTIN_KINDS, DEFAULT_MAX_DEPTH, categoryAccent, clearNodeKindOverrides, declaredRoutes, defaultConfigFor, ensureBuiltinKinds, getNodeKind, kindIds, listNodeKinds, llmRouterExecutor as llmBranchExecutor, llmRouterExecutor, nodeConfig, onNodeKindsChanged, overrideNodeKind, registerBuiltinKinds, registerNodeKind, resolveFallbackPort, resolveKindId, resolveNodePorts, resolvePortSpec, subflowExecutor, subflowMode, subflowPorts, validateConfig } from './chunk-CIBW5ATA.js';
3
+ export { BUILTIN_KINDS, DEFAULT_MAX_DEPTH, categoryAccent, clearNodeKindOverrides, declaredRoutes, defaultConfigFor, ensureBuiltinKinds, getNodeKind, kindIds, listNodeKinds, llmRouterExecutor as llmBranchExecutor, llmRouterExecutor, nodeConfig, onNodeKindsChanged, overrideNodeKind, registerBuiltinKinds, registerNodeKind, resolveFallbackPort, resolveKindId, resolveNodePorts, resolvePortSpec, subflowExecutor, subflowMode, subflowPorts, validateConfig } from './chunk-22OJOD4X.js';
4
4
  export { RichInputPreview, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerRichInputAdapter } from './chunk-F5RPRB7A.js';
5
5
  export { capabilityStatus, getLlmClient, getWorkflowResolver, isResolutionFailure, registerLlmClient, registerWorkflowResolver } from './chunk-USL4FMFU.js';
6
6
  //# sourceMappingURL=registry.js.map
@@ -1,5 +1,5 @@
1
1
  import { F as FlowGraph, E as ExecutorRegistry, R as RunEvent } from './types-JFYjPJAG.js';
2
- import { R as RunOptions, a as RunResult } from './run-flow-DJ7KYT6E.js';
2
+ import { R as RunOptions, a as RunResult } from './run-flow-D7AOCcfE.js';
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-JFYjPJAG.cjs';
2
- import { R as RunOptions, a as RunResult } from './run-flow-COdAOFg2.cjs';
2
+ import { R as RunOptions, a as RunResult } from './run-flow-2XsHBwpd.cjs';
3
3
 
4
4
  /**
5
5
  * How the flows one trigger fired should treat each other.
@@ -16,6 +16,37 @@ type RunOptions = {
16
16
  * `graph.inputs`, so a misspelling fails the run instead of sitting unread.
17
17
  */
18
18
  props?: Record<string, unknown>;
19
+ /**
20
+ * Which ENTRY POINTS are live — the ids of nodes with NO incoming edges this
21
+ * run should start from. Omit it and every entry point runs, exactly as
22
+ * before the option existed.
23
+ *
24
+ * A graph may hold more than one trigger — a `manual_trigger` for
25
+ * hand-testing beside the event trigger that runs it for real — and a trigger
26
+ * has no inbound edges, which IS the readiness rule. So without this, every
27
+ * trigger's branch runs on every run, whichever one fired. The triggers
28
+ * themselves are harmless; everything DOWNSTREAM of the ones that did not
29
+ * fire is not. A `user_input` stranded on the manual branch parks an
30
+ * event-driven run to ask a person for data the event already supplied,
31
+ * which from outside looks like the event trigger being ignored.
32
+ *
33
+ * Naming the live entry points makes the others INACTIVE, and the existing
34
+ * "at least one active inbound edge" rule then skips everything reachable
35
+ * only from them. No new routing logic.
36
+ *
37
+ * Three edges, each pinned by `flow/entry-points` in
38
+ * `@particle-academy/fancy-conformance`:
39
+ * - `undefined` is NOT `[]`. Unset runs every entry point; an empty array
40
+ * says none is live and runs nothing.
41
+ * - A node reachable from SEVERAL entry points still runs when any one of
42
+ * them fires — one active inbound edge is enough, as always.
43
+ * - Naming a node that HAS inbound edges names no entry point, so every real
44
+ * entry is inactive and nothing runs. That falls out of the rule rather
45
+ * than being special-cased; validate your ids if you want a typo to be
46
+ * loud, because the runtime cannot tell one from a deliberate empty
47
+ * selection.
48
+ */
49
+ entryNodes?: string[];
19
50
  /** Nesting depth — set by `subflow` when it runs a child graph. */
20
51
  depth?: number;
21
52
  /**
@@ -16,6 +16,37 @@ type RunOptions = {
16
16
  * `graph.inputs`, so a misspelling fails the run instead of sitting unread.
17
17
  */
18
18
  props?: Record<string, unknown>;
19
+ /**
20
+ * Which ENTRY POINTS are live — the ids of nodes with NO incoming edges this
21
+ * run should start from. Omit it and every entry point runs, exactly as
22
+ * before the option existed.
23
+ *
24
+ * A graph may hold more than one trigger — a `manual_trigger` for
25
+ * hand-testing beside the event trigger that runs it for real — and a trigger
26
+ * has no inbound edges, which IS the readiness rule. So without this, every
27
+ * trigger's branch runs on every run, whichever one fired. The triggers
28
+ * themselves are harmless; everything DOWNSTREAM of the ones that did not
29
+ * fire is not. A `user_input` stranded on the manual branch parks an
30
+ * event-driven run to ask a person for data the event already supplied,
31
+ * which from outside looks like the event trigger being ignored.
32
+ *
33
+ * Naming the live entry points makes the others INACTIVE, and the existing
34
+ * "at least one active inbound edge" rule then skips everything reachable
35
+ * only from them. No new routing logic.
36
+ *
37
+ * Three edges, each pinned by `flow/entry-points` in
38
+ * `@particle-academy/fancy-conformance`:
39
+ * - `undefined` is NOT `[]`. Unset runs every entry point; an empty array
40
+ * says none is live and runs nothing.
41
+ * - A node reachable from SEVERAL entry points still runs when any one of
42
+ * them fires — one active inbound edge is enough, as always.
43
+ * - Naming a node that HAS inbound edges names no entry point, so every real
44
+ * entry is inactive and nothing runs. That falls out of the rule rather
45
+ * than being special-cased; validate your ids if you want a typo to be
46
+ * loud, because the runtime cannot tell one from a deliberate empty
47
+ * selection.
48
+ */
49
+ entryNodes?: string[];
19
50
  /** Nesting depth — set by `subflow` when it runs a child graph. */
20
51
  depth?: number;
21
52
  /**
@@ -1,8 +1,8 @@
1
- import { a as RunResult, R as RunOptions } from '../run-flow-COdAOFg2.cjs';
2
- export { r as runFlow } from '../run-flow-COdAOFg2.cjs';
1
+ import { a as RunResult, R as RunOptions } from '../run-flow-2XsHBwpd.cjs';
2
+ export { r as runFlow } from '../run-flow-2XsHBwpd.cjs';
3
3
  import { g as NodeRunStatus, F as FlowGraph, E as ExecutorRegistry, a as FlowNode, d as FlowEdge } from '../types-JFYjPJAG.cjs';
4
4
  export { b as RunIdentity, c as RunIdentityJson, i as escapeSegment } from '../types-JFYjPJAG.cjs';
5
- export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from '../run-cohort-r-L8dMED.cjs';
5
+ export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from '../run-cohort-CBRAUj-z.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-DJ7KYT6E.js';
2
- export { r as runFlow } from '../run-flow-DJ7KYT6E.js';
1
+ import { a as RunResult, R as RunOptions } from '../run-flow-D7AOCcfE.js';
2
+ export { r as runFlow } from '../run-flow-D7AOCcfE.js';
3
3
  import { g as NodeRunStatus, F as FlowGraph, E as ExecutorRegistry, a as FlowNode, d as FlowEdge } from '../types-JFYjPJAG.js';
4
4
  export { b as RunIdentity, c as RunIdentityJson, i as escapeSegment } from '../types-JFYjPJAG.js';
5
- export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from '../run-cohort-BPIOpE8A.js';
5
+ export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from '../run-cohort-C1nRh_mi.js';
6
6
  import { NodeChange, EdgeChange, Connection } from '@xyflow/react';
7
7
 
8
8
  type FlowRunFeedEntry = {
package/dist/runtime.cjs CHANGED
@@ -10383,7 +10383,7 @@ function resolveWorkflowProps(declared, passed) {
10383
10383
  // src/runtime/run-flow.ts
10384
10384
  async function runFlow(graph, executors, onEvent = () => {
10385
10385
  }, options = {}) {
10386
- const { signal, initialInputs = {}, timeoutMs, depth = 0, resumeOutputs = {} } = options;
10386
+ const { signal, initialInputs = {}, timeoutMs, depth = 0, resumeOutputs = {}, entryNodes } = options;
10387
10387
  const run = options.run === void 0 ? void 0 : RunIdentity.from(options.run);
10388
10388
  const outputs = {};
10389
10389
  const portValues = /* @__PURE__ */ new Map();
@@ -10422,6 +10422,10 @@ async function runFlow(graph, executors, onEvent = () => {
10422
10422
  continue;
10423
10423
  }
10424
10424
  const incoming = incomingByNode.get(node.id) ?? [];
10425
+ if (incoming.length === 0 && entryNodes !== void 0 && !entryNodes.includes(node.id)) {
10426
+ onEvent({ type: "node-status", nodeId: node.id, status: "idle", text: "skipped" });
10427
+ continue;
10428
+ }
10425
10429
  if (incoming.length > 0) {
10426
10430
  const anyActive = incoming.some((e) => portValues.has(`${e.source}:${e.sourceHandle ?? "out"}`));
10427
10431
  if (!anyActive) {