@particle-academy/fancy-flow 0.77.1 → 0.79.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 (82) hide show
  1. package/dist/{FlowViewer-Ak8kbY0e.d.cts → FlowViewer-BqYQl2vS.d.cts} +1 -1
  2. package/dist/{FlowViewer-BAV29Zpi.d.ts → FlowViewer-_Fq8AX9V.d.ts} +1 -1
  3. package/dist/{HumanPrompt-xYPCL2jO.d.cts → HumanPrompt-Sl1wD9Bx.d.cts} +2 -2
  4. package/dist/{HumanPrompt-Ge_ccCgS.d.ts → HumanPrompt-_SKIdSpx.d.ts} +2 -2
  5. package/dist/{chunk-T6WIIGSK.js → chunk-I5EPWHNM.js} +3 -3
  6. package/dist/{chunk-T6WIIGSK.js.map → chunk-I5EPWHNM.js.map} +1 -1
  7. package/dist/{chunk-EGXA4SYJ.js → chunk-J66LOLJR.js} +4 -4
  8. package/dist/{chunk-EGXA4SYJ.js.map → chunk-J66LOLJR.js.map} +1 -1
  9. package/dist/{chunk-G5RAGPVD.js → chunk-KMONOPAK.js} +3 -3
  10. package/dist/{chunk-G5RAGPVD.js.map → chunk-KMONOPAK.js.map} +1 -1
  11. package/dist/{chunk-ARSOSEJV.js → chunk-LBE4L3DS.js} +4 -4
  12. package/dist/{chunk-ARSOSEJV.js.map → chunk-LBE4L3DS.js.map} +1 -1
  13. package/dist/{chunk-EEIWAIXW.js → chunk-OZHBAXMA.js} +125 -8
  14. package/dist/chunk-OZHBAXMA.js.map +1 -0
  15. package/dist/{chunk-2VI24UPB.js → chunk-QMJVUT7C.js} +3 -3
  16. package/dist/{chunk-2VI24UPB.js.map → chunk-QMJVUT7C.js.map} +1 -1
  17. package/dist/{chunk-CQAMEPPI.js → chunk-R4G7SPLD.js} +3 -3
  18. package/dist/{chunk-CQAMEPPI.js.map → chunk-R4G7SPLD.js.map} +1 -1
  19. package/dist/connectors.d.cts +2 -2
  20. package/dist/connectors.d.ts +2 -2
  21. package/dist/durable/index.d.cts +2 -2
  22. package/dist/durable/index.d.ts +2 -2
  23. package/dist/durable.cjs +123 -6
  24. package/dist/durable.cjs.map +1 -1
  25. package/dist/durable.js +1 -1
  26. package/dist/engine.cjs +123 -6
  27. package/dist/engine.cjs.map +1 -1
  28. package/dist/engine.d.cts +6 -6
  29. package/dist/engine.d.ts +6 -6
  30. package/dist/engine.js +4 -4
  31. package/dist/fields/react-fancy.d.cts +3 -3
  32. package/dist/fields/react-fancy.d.ts +3 -3
  33. package/dist/index.cjs +123 -6
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.d.cts +10 -10
  36. package/dist/index.d.ts +10 -10
  37. package/dist/index.js +12 -12
  38. package/dist/layout/index.d.cts +1 -1
  39. package/dist/layout/index.d.ts +1 -1
  40. package/dist/llm/prism.d.cts +1 -1
  41. package/dist/llm/prism.d.ts +1 -1
  42. package/dist/llm/vercel-ai.d.cts +1 -1
  43. package/dist/llm/vercel-ai.d.ts +1 -1
  44. package/dist/registry/index.d.cts +5 -5
  45. package/dist/registry/index.d.ts +5 -5
  46. package/dist/{registry-JUcN_xWK.d.ts → registry-C4GcH583.d.ts} +1 -1
  47. package/dist/{registry-B6SiTaLZ.d.cts → registry-DWIY3bMP.d.cts} +1 -1
  48. package/dist/registry.cjs +123 -6
  49. package/dist/registry.cjs.map +1 -1
  50. package/dist/registry.js +2 -2
  51. package/dist/{run-cohort-rgT_FX3V.d.ts → run-cohort-DAfhZm-p.d.ts} +2 -2
  52. package/dist/{run-cohort-DNpPa0mq.d.cts → run-cohort-DRJvUWO9.d.cts} +2 -2
  53. package/dist/{run-flow-pW0PllaZ.d.cts → run-flow-Bdrn4lQV.d.cts} +1 -1
  54. package/dist/{run-flow-BLP9rXfO.d.ts → run-flow-D2iOjWsj.d.ts} +1 -1
  55. package/dist/runtime/index.d.cts +5 -5
  56. package/dist/runtime/index.d.ts +5 -5
  57. package/dist/runtime.cjs +123 -6
  58. package/dist/runtime.cjs.map +1 -1
  59. package/dist/runtime.js +3 -3
  60. package/dist/schema/index.d.cts +1 -1
  61. package/dist/schema/index.d.ts +1 -1
  62. package/dist/schema.cjs +123 -6
  63. package/dist/schema.cjs.map +1 -1
  64. package/dist/schema.js +3 -3
  65. package/dist/screens.cjs +123 -6
  66. package/dist/screens.cjs.map +1 -1
  67. package/dist/screens.d.cts +2 -2
  68. package/dist/screens.d.ts +2 -2
  69. package/dist/screens.js +4 -4
  70. package/dist/terminal/fancy-term-host.d.cts +1 -1
  71. package/dist/terminal/fancy-term-host.d.ts +1 -1
  72. package/dist/{types-BdkXxjFh.d.cts → types-B1jftRa9.d.cts} +1 -1
  73. package/dist/{types-CbekKMMO.d.ts → types-D5SBBpbe.d.ts} +1 -1
  74. package/dist/{types-B-Syk9-M.d.ts → types-E48Dpesq.d.cts} +20 -0
  75. package/dist/{types-B-Syk9-M.d.cts → types-E48Dpesq.d.ts} +20 -0
  76. package/dist/ux.cjs +123 -6
  77. package/dist/ux.cjs.map +1 -1
  78. package/dist/ux.d.cts +2 -2
  79. package/dist/ux.d.ts +2 -2
  80. package/dist/ux.js +1 -1
  81. package/package.json +2 -2
  82. package/dist/chunk-EEIWAIXW.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -3,23 +3,23 @@ import { ReactNode, CSSProperties, ComponentProps, ComponentType } from 'react';
3
3
  import { ReactFlowProps, Edge, BackgroundVariant, Connection, NodeProps, NodeTypes } from '@xyflow/react';
4
4
  import { ConnectionValidatorOptions } from './registry/index.cjs';
5
5
  export { ANY_PORT_TYPE, BUILTIN_KINDS, PortCompatibility, RegistryNode, RichInputAdapter, RichInputPreview, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerBuiltinKinds, registerRichInputAdapter, resolveNodePorts, resolvePortSpec } from './registry/index.cjs';
6
- import { a as FlowNode, F as FlowGraph, h as NodeRunStatus, E as ExecutorRegistry } from './types-B-Syk9-M.cjs';
7
- export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, e as FlowEdge, f as FlowNodeData, g as FlowNodeKind, N as NodeExecutor, i as NoteNodeData, O as OutputNodeData, P as PortDescriptor, R as RunEvent, S as SubgraphNodeData, j as TriggerNodeData } from './types-B-Syk9-M.cjs';
8
- import { a as NodeCategory, N as NodeKindDefinition, C as ConfigField } from './types-BdkXxjFh.cjs';
9
- export { A as AvailableVariable, D as DocumentConfigField, E as EmitsRelation, t as ExpressionForm, u as ExpressionGrammarHelp, K as KeyValueConfigField, O as OutputField, h as OutputShape, P as PortSpec, R as RenderBodyContext, n as RepeaterConfigField, o as RepeaterRowField, w as availableVariables, x as baseVariables, y as describeExpressionGrammar, z as outputFieldsFor } from './types-BdkXxjFh.cjs';
10
- import { C as ConfigFieldRenderFn, H as HumanFieldRenderers } from './HumanPrompt-xYPCL2jO.cjs';
11
- export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './HumanPrompt-xYPCL2jO.cjs';
6
+ import { a as FlowNode, F as FlowGraph, h as NodeRunStatus, E as ExecutorRegistry } from './types-E48Dpesq.cjs';
7
+ export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, e as FlowEdge, f as FlowNodeData, g as FlowNodeKind, N as NodeExecutor, i as NoteNodeData, O as OutputNodeData, P as PortDescriptor, R as RunEvent, S as SubgraphNodeData, j as TriggerNodeData } from './types-E48Dpesq.cjs';
8
+ import { a as NodeCategory, N as NodeKindDefinition, C as ConfigField } from './types-B1jftRa9.cjs';
9
+ export { A as AvailableVariable, D as DocumentConfigField, E as EmitsRelation, t as ExpressionForm, u as ExpressionGrammarHelp, K as KeyValueConfigField, O as OutputField, h as OutputShape, P as PortSpec, R as RenderBodyContext, n as RepeaterConfigField, o as RepeaterRowField, w as availableVariables, x as baseVariables, y as describeExpressionGrammar, z as outputFieldsFor } from './types-B1jftRa9.cjs';
10
+ import { C as ConfigFieldRenderFn, H as HumanFieldRenderers } from './HumanPrompt-Sl1wD9Bx.cjs';
11
+ export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './HumanPrompt-Sl1wD9Bx.cjs';
12
12
  import { WorkflowSchema, WorkflowMetadata } from './schema/index.cjs';
13
13
  export { ImportIssue, ImportOptions, ImportResult, WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, WorkflowSchemaEdge, WorkflowSchemaNode, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './schema/index.cjs';
14
14
  import { AutoLayoutOptions } from './layout/index.cjs';
15
15
  export { AutoLayoutDirection } from './layout/index.cjs';
16
- export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-Ak8kbY0e.cjs';
16
+ export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-BqYQl2vS.cjs';
17
17
  import { FlowRunFeedEntry } from './runtime/index.cjs';
18
18
  export { HistoryController, UseFlowHistoryReturn, UseFlowRunOptions, UseFlowRunReturn, UseFlowStateReturn, applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './runtime/index.cjs';
19
- export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-pW0PllaZ.cjs';
20
- export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-DNpPa0mq.cjs';
19
+ export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-Bdrn4lQV.cjs';
20
+ export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-DRJvUWO9.cjs';
21
21
  export { E as EvaluateOptions, a as ExprContext, b as ExprValue, R as Resolution, U as UnresolvedPathError, c as UnresolvedPolicy, e as evaluateConfig, d as evaluateExpression, r as resolvePath, t as text, f as truthy, g as tryResolvePath } from './expr-BfXDrs4H.cjs';
22
- export { K as KindSchemaOverlay, a as KindSchemaOverlayResult, N as NodeKindPresentation, b as applyKindSchemaOverlay, f as categoryAccent, c as clearKindSchemaOverlays, h as clearNodeKindOverrides, d as defaultConfigFor, i as ensureBuiltinKinds, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, j as overrideNodeKind, r as registerNodeKind, u as unregisterNodeKind, v as validateConfig } from './registry-B6SiTaLZ.cjs';
22
+ export { K as KindSchemaOverlay, a as KindSchemaOverlayResult, N as NodeKindPresentation, b as applyKindSchemaOverlay, f as categoryAccent, c as clearKindSchemaOverlays, h as clearNodeKindOverrides, d as defaultConfigFor, i as ensureBuiltinKinds, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, j as overrideNodeKind, r as registerNodeKind, u as unregisterNodeKind, v as validateConfig } from './registry-DWIY3bMP.cjs';
23
23
  export { L as LEGACY_PAUSE_PREFIXES, a as PAUSE_PREFIX, P as PauseAwaiting, b as PauseSignal, d as decodePause, e as encodePause, i as isPause, p as pauseForHuman } from './pause-9iT4tCEV.cjs';
24
24
 
25
25
  type FlowCanvasProps = Omit<ReactFlowProps<FlowNode, Edge>, "nodes" | "edges" | "height"> & {
package/dist/index.d.ts CHANGED
@@ -3,23 +3,23 @@ import { ReactNode, CSSProperties, ComponentProps, ComponentType } from 'react';
3
3
  import { ReactFlowProps, Edge, BackgroundVariant, Connection, NodeProps, NodeTypes } from '@xyflow/react';
4
4
  import { ConnectionValidatorOptions } from './registry/index.js';
5
5
  export { ANY_PORT_TYPE, BUILTIN_KINDS, PortCompatibility, RegistryNode, RichInputAdapter, RichInputPreview, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerBuiltinKinds, registerRichInputAdapter, resolveNodePorts, resolvePortSpec } from './registry/index.js';
6
- import { a as FlowNode, F as FlowGraph, h as NodeRunStatus, E as ExecutorRegistry } from './types-B-Syk9-M.js';
7
- export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, e as FlowEdge, f as FlowNodeData, g as FlowNodeKind, N as NodeExecutor, i as NoteNodeData, O as OutputNodeData, P as PortDescriptor, R as RunEvent, S as SubgraphNodeData, j as TriggerNodeData } from './types-B-Syk9-M.js';
8
- import { a as NodeCategory, N as NodeKindDefinition, C as ConfigField } from './types-CbekKMMO.js';
9
- export { A as AvailableVariable, D as DocumentConfigField, E as EmitsRelation, t as ExpressionForm, u as ExpressionGrammarHelp, K as KeyValueConfigField, O as OutputField, h as OutputShape, P as PortSpec, R as RenderBodyContext, n as RepeaterConfigField, o as RepeaterRowField, w as availableVariables, x as baseVariables, y as describeExpressionGrammar, z as outputFieldsFor } from './types-CbekKMMO.js';
10
- import { C as ConfigFieldRenderFn, H as HumanFieldRenderers } from './HumanPrompt-Ge_ccCgS.js';
11
- export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './HumanPrompt-Ge_ccCgS.js';
6
+ import { a as FlowNode, F as FlowGraph, h as NodeRunStatus, E as ExecutorRegistry } from './types-E48Dpesq.js';
7
+ export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, e as FlowEdge, f as FlowNodeData, g as FlowNodeKind, N as NodeExecutor, i as NoteNodeData, O as OutputNodeData, P as PortDescriptor, R as RunEvent, S as SubgraphNodeData, j as TriggerNodeData } from './types-E48Dpesq.js';
8
+ import { a as NodeCategory, N as NodeKindDefinition, C as ConfigField } from './types-D5SBBpbe.js';
9
+ export { A as AvailableVariable, D as DocumentConfigField, E as EmitsRelation, t as ExpressionForm, u as ExpressionGrammarHelp, K as KeyValueConfigField, O as OutputField, h as OutputShape, P as PortSpec, R as RenderBodyContext, n as RepeaterConfigField, o as RepeaterRowField, w as availableVariables, x as baseVariables, y as describeExpressionGrammar, z as outputFieldsFor } from './types-D5SBBpbe.js';
10
+ import { C as ConfigFieldRenderFn, H as HumanFieldRenderers } from './HumanPrompt-_SKIdSpx.js';
11
+ export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './HumanPrompt-_SKIdSpx.js';
12
12
  import { WorkflowSchema, WorkflowMetadata } from './schema/index.js';
13
13
  export { ImportIssue, ImportOptions, ImportResult, WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, WorkflowSchemaEdge, WorkflowSchemaNode, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './schema/index.js';
14
14
  import { AutoLayoutOptions } from './layout/index.js';
15
15
  export { AutoLayoutDirection } from './layout/index.js';
16
- export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-BAV29Zpi.js';
16
+ export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-_Fq8AX9V.js';
17
17
  import { FlowRunFeedEntry } from './runtime/index.js';
18
18
  export { HistoryController, UseFlowHistoryReturn, UseFlowRunOptions, UseFlowRunReturn, UseFlowStateReturn, applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './runtime/index.js';
19
- export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-BLP9rXfO.js';
20
- export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-rgT_FX3V.js';
19
+ export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-D2iOjWsj.js';
20
+ export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-DAfhZm-p.js';
21
21
  export { E as EvaluateOptions, a as ExprContext, b as ExprValue, R as Resolution, U as UnresolvedPathError, c as UnresolvedPolicy, e as evaluateConfig, d as evaluateExpression, r as resolvePath, t as text, f as truthy, g as tryResolvePath } from './expr-BfXDrs4H.js';
22
- export { K as KindSchemaOverlay, a as KindSchemaOverlayResult, N as NodeKindPresentation, b as applyKindSchemaOverlay, f as categoryAccent, c as clearKindSchemaOverlays, h as clearNodeKindOverrides, d as defaultConfigFor, i as ensureBuiltinKinds, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, j as overrideNodeKind, r as registerNodeKind, u as unregisterNodeKind, v as validateConfig } from './registry-JUcN_xWK.js';
22
+ export { K as KindSchemaOverlay, a as KindSchemaOverlayResult, N as NodeKindPresentation, b as applyKindSchemaOverlay, f as categoryAccent, c as clearKindSchemaOverlays, h as clearNodeKindOverrides, d as defaultConfigFor, i as ensureBuiltinKinds, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, j as overrideNodeKind, r as registerNodeKind, u as unregisterNodeKind, v as validateConfig } from './registry-C4GcH583.js';
23
23
  export { L as LEGACY_PAUSE_PREFIXES, a as PAUSE_PREFIX, P as PauseAwaiting, b as PauseSignal, d as decodePause, e as encodePause, i as isPause, p as pauseForHuman } from './pause-9iT4tCEV.js';
24
24
 
25
25
  type FlowCanvasProps = Omit<ReactFlowProps<FlowNode, Edge>, "nodes" | "edges" | "height"> & {
package/dist/index.js CHANGED
@@ -1,18 +1,18 @@
1
- import { removeNodes, removeEdges, cloneSubgraph, alignNodes, distributeNodes, reconnectEdge, assignToLane, removeFromLane, duplicateNode, setEdgeLabel, FlowCanvas } from './chunk-EGXA4SYJ.js';
2
- export { ActionNode, DecisionNode, FlowCanvas, FlowViewer, NodeShell, OutputNode, SubgraphNode, TriggerNode, alignNodes, cloneSubgraph, defaultNodeTypes, distributeNodes, reconnectEdge } from './chunk-EGXA4SYJ.js';
3
- import { useFlowState, useFlowRun, useFlowHistory, applyOutputsToNodes, applyStatusesToNodes } from './chunk-2VI24UPB.js';
4
- export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-2VI24UPB.js';
5
- export { runCohort } from './chunk-CQAMEPPI.js';
6
- import { buildNodeTypes, FlowEditorProvider, registerBuiltinKinds } from './chunk-T6WIIGSK.js';
7
- export { ANY_PORT_TYPE, BUILTIN_KINDS, LaneNode, NoteNode, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, registerBuiltinKinds, useFlowEditor, useFlowEditorOptional } from './chunk-T6WIIGSK.js';
1
+ import { removeNodes, removeEdges, cloneSubgraph, alignNodes, distributeNodes, reconnectEdge, assignToLane, removeFromLane, duplicateNode, setEdgeLabel, FlowCanvas } from './chunk-J66LOLJR.js';
2
+ export { ActionNode, DecisionNode, FlowCanvas, FlowViewer, NodeShell, OutputNode, SubgraphNode, TriggerNode, alignNodes, cloneSubgraph, defaultNodeTypes, distributeNodes, reconnectEdge } from './chunk-J66LOLJR.js';
3
+ import { useFlowState, useFlowRun, useFlowHistory, applyOutputsToNodes, applyStatusesToNodes } from './chunk-QMJVUT7C.js';
4
+ export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-QMJVUT7C.js';
5
+ export { runCohort } from './chunk-R4G7SPLD.js';
6
+ import { buildNodeTypes, FlowEditorProvider, registerBuiltinKinds } from './chunk-I5EPWHNM.js';
7
+ export { ANY_PORT_TYPE, BUILTIN_KINDS, LaneNode, NoteNode, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility, registerBuiltinKinds, useFlowEditor, useFlowEditorOptional } from './chunk-I5EPWHNM.js';
8
8
  import { getRichInputAdapter } from './chunk-F5RPRB7A.js';
9
9
  export { RichInputPreview, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerRichInputAdapter } from './chunk-F5RPRB7A.js';
10
10
  import { ReactFlowProvider, useReactFlow, addEdge, applyEdgeChanges, applyNodeChanges, Position, Handle } from './chunk-OWENS2H5.js';
11
- import { workflowToBlob, importWorkflow, exportWorkflow } from './chunk-ARSOSEJV.js';
12
- export { WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './chunk-ARSOSEJV.js';
13
- import './chunk-G5RAGPVD.js';
14
- import { humanInputFields, onNodeKindsChanged, listNodeKinds, getNodeKind, defaultConfigFor, ensureBuiltinKinds, validateConfig, categoryAccent, availableVariables, baseVariables, describeExpressionGrammar } from './chunk-EEIWAIXW.js';
15
- export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, UnresolvedPathError, applyKindSchemaOverlay, availableVariables, baseVariables, categoryAccent, clearKindSchemaOverlays, clearNodeKindOverrides, decodePause, defaultConfigFor, describeExpressionGrammar, encodePause, ensureBuiltinKinds, evaluateConfig, evaluateExpression, getNodeKind, isPause, listNodeKinds, onNodeKindsChanged, outputFieldsFor, overrideNodeKind, pauseForHuman, registerNodeKind, resolveNodePorts, resolvePath, resolvePortSpec, runFlow, text, truthy, tryResolvePath, unregisterNodeKind, validateConfig } from './chunk-EEIWAIXW.js';
11
+ import { workflowToBlob, importWorkflow, exportWorkflow } from './chunk-LBE4L3DS.js';
12
+ export { WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './chunk-LBE4L3DS.js';
13
+ import './chunk-KMONOPAK.js';
14
+ import { humanInputFields, onNodeKindsChanged, listNodeKinds, getNodeKind, defaultConfigFor, ensureBuiltinKinds, validateConfig, categoryAccent, availableVariables, baseVariables, describeExpressionGrammar } from './chunk-OZHBAXMA.js';
15
+ export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, UnresolvedPathError, applyKindSchemaOverlay, availableVariables, baseVariables, categoryAccent, clearKindSchemaOverlays, clearNodeKindOverrides, decodePause, defaultConfigFor, describeExpressionGrammar, encodePause, ensureBuiltinKinds, evaluateConfig, evaluateExpression, getNodeKind, isPause, listNodeKinds, onNodeKindsChanged, outputFieldsFor, overrideNodeKind, pauseForHuman, registerNodeKind, resolveNodePorts, resolvePath, resolvePortSpec, runFlow, text, truthy, tryResolvePath, unregisterNodeKind, validateConfig } from './chunk-OZHBAXMA.js';
16
16
  import './chunk-2QXKDLGT.js';
17
17
  import { forwardRef, useState, useMemo, useEffect, useCallback, useRef, useImperativeHandle, useId, memo } from 'react';
18
18
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -1,4 +1,4 @@
1
- import { F as FlowGraph, a as FlowNode } from '../types-B-Syk9-M.cjs';
1
+ import { F as FlowGraph, a as FlowNode } from '../types-E48Dpesq.cjs';
2
2
  import '@xyflow/react';
3
3
 
4
4
  type AutoLayoutDirection = "LR" | "TB" | "RL" | "BT";
@@ -1,4 +1,4 @@
1
- import { F as FlowGraph, a as FlowNode } from '../types-B-Syk9-M.js';
1
+ import { F as FlowGraph, a as FlowNode } from '../types-E48Dpesq.js';
2
2
  import '@xyflow/react';
3
3
 
4
4
  type AutoLayoutDirection = "LR" | "TB" | "RL" | "BT";
@@ -1,4 +1,4 @@
1
- import { L as LlmClient } from '../types-B-Syk9-M.cjs';
1
+ import { L as LlmClient } from '../types-E48Dpesq.cjs';
2
2
  import '@xyflow/react';
3
3
 
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { L as LlmClient } from '../types-B-Syk9-M.js';
1
+ import { L as LlmClient } from '../types-E48Dpesq.js';
2
2
  import '@xyflow/react';
3
3
 
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { LanguageModel } from 'ai';
2
- import { b as LlmRouteRequest, L as LlmClient } from '../types-B-Syk9-M.cjs';
2
+ import { b as LlmRouteRequest, L as LlmClient } from '../types-E48Dpesq.cjs';
3
3
  import '@xyflow/react';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import { LanguageModel } from 'ai';
2
- import { b as LlmRouteRequest, L as LlmClient } from '../types-B-Syk9-M.js';
2
+ import { b as LlmRouteRequest, L as LlmClient } from '../types-E48Dpesq.js';
3
3
  import '@xyflow/react';
4
4
 
5
5
  /**
@@ -1,12 +1,12 @@
1
- import { N as NodeKindDefinition, P as PortSpec } from '../types-BdkXxjFh.cjs';
2
- export { C as ConfigField, k as CredentialConfigField, D as DocumentConfigField, E as EmitsRelation, l as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, m as NumberConfigField, R as RenderBodyContext, n as RepeaterConfigField, o as RepeaterRowField, p as SelectConfigField, q as SwitchConfigField, T as TextConfigField, r as TextareaConfigField } from '../types-BdkXxjFh.cjs';
3
- import { P as PortDescriptor, a as FlowNode, N as NodeExecutor, l as LlmRoute } from '../types-B-Syk9-M.cjs';
4
- export { C as CapabilityId, L as LlmClient, m as LlmRouteChoice, b as LlmRouteRequest, n as TerminalExit, T as TerminalHost, o as TerminalSession, p as TerminalSessionSpec, q as WorkflowResolution, r as WorkflowResolutionFailure, W as WorkflowResolver, s as capabilityStatus, t as getLlmClient, u as getTerminalHost, v as getWorkflowResolver, w as isResolutionFailure, x as registerLlmClient, y as registerTerminalHost, z as registerWorkflowResolver } from '../types-B-Syk9-M.cjs';
1
+ import { N as NodeKindDefinition, P as PortSpec } from '../types-B1jftRa9.cjs';
2
+ export { C as ConfigField, k as CredentialConfigField, D as DocumentConfigField, E as EmitsRelation, l as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, m as NumberConfigField, R as RenderBodyContext, n as RepeaterConfigField, o as RepeaterRowField, p as SelectConfigField, q as SwitchConfigField, T as TextConfigField, r as TextareaConfigField } from '../types-B1jftRa9.cjs';
3
+ import { P as PortDescriptor, a as FlowNode, N as NodeExecutor, l as LlmRoute } from '../types-E48Dpesq.cjs';
4
+ export { C as CapabilityId, L as LlmClient, m as LlmRouteChoice, b as LlmRouteRequest, n as TerminalExit, T as TerminalHost, o as TerminalSession, p as TerminalSessionSpec, q as WorkflowResolution, r as WorkflowResolutionFailure, W as WorkflowResolver, s as capabilityStatus, t as getLlmClient, u as getTerminalHost, v as getWorkflowResolver, w as isResolutionFailure, x as registerLlmClient, y as registerTerminalHost, z as registerWorkflowResolver } from '../types-E48Dpesq.cjs';
5
5
  import { Connection, Edge, NodeProps, NodeTypes } from '@xyflow/react';
6
6
  export { L as LEGACY_PAUSE_PREFIXES, a as PAUSE_PREFIX, P as PauseAwaiting, b as PauseSignal, d as decodePause, e as encodePause, i as isPause, p as pauseForHuman } from '../pause-9iT4tCEV.cjs';
7
7
  import * as react from 'react';
8
8
  import { ComponentType, ReactNode } from 'react';
9
- export { K as KindSchemaOverlay, a as KindSchemaOverlayResult, N as NodeKindPresentation, b as applyKindSchemaOverlay, f as categoryAccent, c as clearKindSchemaOverlays, h as clearNodeKindOverrides, d as defaultConfigFor, i as ensureBuiltinKinds, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, j as overrideNodeKind, r as registerNodeKind, e as resolveKindId, u as unregisterNodeKind, v as validateConfig } from '../registry-B6SiTaLZ.cjs';
9
+ export { K as KindSchemaOverlay, a as KindSchemaOverlayResult, N as NodeKindPresentation, b as applyKindSchemaOverlay, f as categoryAccent, c as clearKindSchemaOverlays, h as clearNodeKindOverrides, d as defaultConfigFor, i as ensureBuiltinKinds, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, j as overrideNodeKind, r as registerNodeKind, e as resolveKindId, u as unregisterNodeKind, v as validateConfig } from '../registry-DWIY3bMP.cjs';
10
10
 
11
11
  /**
12
12
  * Connection validation — the single rule that decides whether an edge between
@@ -1,12 +1,12 @@
1
- import { N as NodeKindDefinition, P as PortSpec } from '../types-CbekKMMO.js';
2
- export { C as ConfigField, k as CredentialConfigField, D as DocumentConfigField, E as EmitsRelation, l as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, m as NumberConfigField, R as RenderBodyContext, n as RepeaterConfigField, o as RepeaterRowField, p as SelectConfigField, q as SwitchConfigField, T as TextConfigField, r as TextareaConfigField } from '../types-CbekKMMO.js';
3
- import { P as PortDescriptor, a as FlowNode, N as NodeExecutor, l as LlmRoute } from '../types-B-Syk9-M.js';
4
- export { C as CapabilityId, L as LlmClient, m as LlmRouteChoice, b as LlmRouteRequest, n as TerminalExit, T as TerminalHost, o as TerminalSession, p as TerminalSessionSpec, q as WorkflowResolution, r as WorkflowResolutionFailure, W as WorkflowResolver, s as capabilityStatus, t as getLlmClient, u as getTerminalHost, v as getWorkflowResolver, w as isResolutionFailure, x as registerLlmClient, y as registerTerminalHost, z as registerWorkflowResolver } from '../types-B-Syk9-M.js';
1
+ import { N as NodeKindDefinition, P as PortSpec } from '../types-D5SBBpbe.js';
2
+ export { C as ConfigField, k as CredentialConfigField, D as DocumentConfigField, E as EmitsRelation, l as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, m as NumberConfigField, R as RenderBodyContext, n as RepeaterConfigField, o as RepeaterRowField, p as SelectConfigField, q as SwitchConfigField, T as TextConfigField, r as TextareaConfigField } from '../types-D5SBBpbe.js';
3
+ import { P as PortDescriptor, a as FlowNode, N as NodeExecutor, l as LlmRoute } from '../types-E48Dpesq.js';
4
+ export { C as CapabilityId, L as LlmClient, m as LlmRouteChoice, b as LlmRouteRequest, n as TerminalExit, T as TerminalHost, o as TerminalSession, p as TerminalSessionSpec, q as WorkflowResolution, r as WorkflowResolutionFailure, W as WorkflowResolver, s as capabilityStatus, t as getLlmClient, u as getTerminalHost, v as getWorkflowResolver, w as isResolutionFailure, x as registerLlmClient, y as registerTerminalHost, z as registerWorkflowResolver } from '../types-E48Dpesq.js';
5
5
  import { Connection, Edge, NodeProps, NodeTypes } from '@xyflow/react';
6
6
  export { L as LEGACY_PAUSE_PREFIXES, a as PAUSE_PREFIX, P as PauseAwaiting, b as PauseSignal, d as decodePause, e as encodePause, i as isPause, p as pauseForHuman } from '../pause-9iT4tCEV.js';
7
7
  import * as react from 'react';
8
8
  import { ComponentType, ReactNode } from 'react';
9
- export { K as KindSchemaOverlay, a as KindSchemaOverlayResult, N as NodeKindPresentation, b as applyKindSchemaOverlay, f as categoryAccent, c as clearKindSchemaOverlays, h as clearNodeKindOverrides, d as defaultConfigFor, i as ensureBuiltinKinds, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, j as overrideNodeKind, r as registerNodeKind, e as resolveKindId, u as unregisterNodeKind, v as validateConfig } from '../registry-JUcN_xWK.js';
9
+ export { K as KindSchemaOverlay, a as KindSchemaOverlayResult, N as NodeKindPresentation, b as applyKindSchemaOverlay, f as categoryAccent, c as clearKindSchemaOverlays, h as clearNodeKindOverrides, d as defaultConfigFor, i as ensureBuiltinKinds, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, j as overrideNodeKind, r as registerNodeKind, e as resolveKindId, u as unregisterNodeKind, v as validateConfig } from '../registry-C4GcH583.js';
10
10
 
11
11
  /**
12
12
  * Connection validation — the single rule that decides whether an edge between
@@ -1,4 +1,4 @@
1
- import { C as ConfigField, a as NodeCategory, N as NodeKindDefinition } from './types-CbekKMMO.js';
1
+ import { C as ConfigField, a as NodeCategory, N as NodeKindDefinition } from './types-D5SBBpbe.js';
2
2
 
3
3
  /**
4
4
  * Put the builtin kit in the registry before anyone reads or writes it.
@@ -1,4 +1,4 @@
1
- import { C as ConfigField, a as NodeCategory, N as NodeKindDefinition } from './types-BdkXxjFh.cjs';
1
+ import { C as ConfigField, a as NodeCategory, N as NodeKindDefinition } from './types-B1jftRa9.cjs';
2
2
 
3
3
  /**
4
4
  * Put the builtin kit in the registry before anyone reads or writes it.
package/dist/registry.cjs CHANGED
@@ -784,6 +784,9 @@ async function runFlow(graph, executors, onEvent = () => {
784
784
  executors,
785
785
  depth,
786
786
  run,
787
+ // Structural executors derive a nested lane from the graph they are
788
+ // in; `for_each`'s `item` port cannot be implemented without it.
789
+ graph,
787
790
  terminal: terminalAccessorFor(node)
788
791
  })
789
792
  );
@@ -1228,6 +1231,7 @@ var branchExecutor = (ctx) => {
1228
1231
  const inputs = ctx.inputs;
1229
1232
  let taken;
1230
1233
  const raw = config.condition;
1234
+ validateRoutingExpression(ctx, raw, "branch", "condition");
1231
1235
  if (typeof raw === "string" && raw.trim() !== "") {
1232
1236
  taken = truthy(resolve(raw, inputs));
1233
1237
  warnIfUnresolved(ctx, raw, taken ? "true" : "false");
@@ -1282,14 +1286,102 @@ var mergeExecutor = (ctx) => {
1282
1286
  }
1283
1287
  return merged;
1284
1288
  };
1285
- var forEachExecutor = (ctx) => {
1286
- const source = resolve(configOf(ctx.node).source, ctx.inputs);
1289
+ var FOR_EACH_DEFAULT_MAX_ITEMS = 1e3;
1290
+ var FOR_EACH_HARD_MAX_ITEMS = 1e4;
1291
+ function reachable(adjacency, starts) {
1292
+ const seen = /* @__PURE__ */ new Set();
1293
+ const queue = [...starts];
1294
+ for (let cursor = 0; cursor < queue.length; cursor += 1) {
1295
+ const id2 = queue[cursor];
1296
+ if (seen.has(id2)) continue;
1297
+ seen.add(id2);
1298
+ for (const target of adjacency.get(id2) ?? []) queue.push(target);
1299
+ }
1300
+ return seen;
1301
+ }
1302
+ function forEachLane(graph, nodeId) {
1303
+ const handleOf = (edge) => edge.sourceHandle ?? "out";
1304
+ const itemEdges = graph.edges.filter((e) => e.source === nodeId && handleOf(e) === "item");
1305
+ if (itemEdges.length === 0) return null;
1306
+ const adjacency = /* @__PURE__ */ new Map();
1307
+ for (const edge of graph.edges) {
1308
+ const list = adjacency.get(edge.source) ?? [];
1309
+ list.push(edge.target);
1310
+ adjacency.set(edge.source, list);
1311
+ }
1312
+ const done = reachable(
1313
+ adjacency,
1314
+ graph.edges.filter((e) => e.source === nodeId && handleOf(e) === "done").map((e) => e.target)
1315
+ );
1316
+ const body = new Set(
1317
+ [...reachable(adjacency, itemEdges.map((e) => e.target))].filter(
1318
+ (id2) => !done.has(id2) && id2 !== nodeId
1319
+ )
1320
+ );
1321
+ return {
1322
+ graph: {
1323
+ nodes: graph.nodes.filter((n) => body.has(n.id)),
1324
+ edges: graph.edges.filter((e) => body.has(e.source) && body.has(e.target)),
1325
+ ...graph.inputs === void 0 ? {} : { inputs: graph.inputs }
1326
+ },
1327
+ entries: itemEdges.filter((e) => body.has(e.target))
1328
+ };
1329
+ }
1330
+ var forEachExecutor = async (ctx) => {
1331
+ const config = configOf(ctx.node);
1332
+ const source = resolve(config.source, ctx.inputs);
1287
1333
  let items;
1288
1334
  if (Array.isArray(source)) items = source;
1289
1335
  else if (source === null || source === void 0) items = [];
1290
1336
  else if (typeof source === "object") items = Object.values(source);
1291
1337
  else items = [source];
1292
- return { items, count: items.length };
1338
+ const lane = ctx.graph ? forEachLane(ctx.graph, ctx.node.id) : null;
1339
+ if (lane === null || config.mode === "collect") {
1340
+ return { items, count: items.length };
1341
+ }
1342
+ if (lane.graph.nodes.length === 0) {
1343
+ ctx.abort(`for_each "${ctx.node.id}" has an item edge but its derived lane is empty`);
1344
+ }
1345
+ const maxItems = Number(config.maxItems ?? FOR_EACH_DEFAULT_MAX_ITEMS);
1346
+ if (!Number.isFinite(maxItems) || maxItems < 1 || maxItems > FOR_EACH_HARD_MAX_ITEMS) {
1347
+ ctx.abort(`for_each "${ctx.node.id}" maxItems must be between 1 and ${FOR_EACH_HARD_MAX_ITEMS}`);
1348
+ }
1349
+ if (items.length > maxItems) {
1350
+ ctx.abort(
1351
+ `for_each "${ctx.node.id}" resolved ${items.length} items exceeds its maxItems cap of ${maxItems}`
1352
+ );
1353
+ }
1354
+ const results = [];
1355
+ const failures = [];
1356
+ for (const [index2, item] of items.entries()) {
1357
+ const initialInputs = {};
1358
+ for (const edge of lane.entries) {
1359
+ initialInputs[edge.target] = {
1360
+ ...initialInputs[edge.target] ?? {},
1361
+ [edge.targetHandle ?? "in"]: item
1362
+ };
1363
+ }
1364
+ const nested = await runFlow(lane.graph, { ...ctx.executors ?? {} }, () => {
1365
+ }, {
1366
+ initialInputs,
1367
+ depth: (ctx.depth ?? 0) + 1,
1368
+ // The index rides on the identity, so a node in iteration 3 cannot share
1369
+ // an idempotency key with the same node in iteration 4.
1370
+ run: ctx.run?.descend(ctx.node.id, index2)
1371
+ });
1372
+ if (!nested.ok) {
1373
+ const reason = nested.error ?? "unknown error";
1374
+ if (decodePause(reason)) ctx.abort(reason);
1375
+ results.push(null);
1376
+ failures.push({ index: index2, item, error: reason });
1377
+ continue;
1378
+ }
1379
+ results.push(nested.outputs);
1380
+ }
1381
+ return {
1382
+ __port: "done",
1383
+ value: { items, results, failures, count: items.length }
1384
+ };
1293
1385
  };
1294
1386
  var manualTriggerExecutor = (ctx) => ctx.inputs;
1295
1387
  var outputExecutor = (ctx) => {
@@ -1309,6 +1401,7 @@ var switchCaseExecutor = (ctx) => {
1309
1401
  const config = configOf(ctx.node);
1310
1402
  const inputs = ctx.inputs;
1311
1403
  const expression = config.value;
1404
+ validateRoutingExpression(ctx, expression, "switch_case", "value");
1312
1405
  const value = text(resolve(expression, inputs));
1313
1406
  const cases = config.cases ?? {};
1314
1407
  const matched = Object.prototype.hasOwnProperty.call(cases, value);
@@ -1316,6 +1409,21 @@ var switchCaseExecutor = (ctx) => {
1316
1409
  warnIfUnresolved(ctx, expression, port, "value");
1317
1410
  return { __port: port, value: inputs.in ?? inputs };
1318
1411
  };
1412
+ function validateRoutingExpression(ctx, value, kind, field) {
1413
+ if (typeof value !== "string" || value.trim() === "") return;
1414
+ const bare = value.trim();
1415
+ const subject = `${kind} "${ctx.node.id}" ${field} "${bare}"`;
1416
+ if (!value.includes("{{")) {
1417
+ ctx.abort(`${subject} is not an expression -- wrap it: {{ ${bare} }}`);
1418
+ }
1419
+ let open = 0;
1420
+ for (const [delimiter] of value.matchAll(/\{\{|\}\}/g)) {
1421
+ open = delimiter === "{{" ? open + 1 : Math.max(0, open - 1);
1422
+ }
1423
+ if (open > 0) {
1424
+ ctx.abort(`${subject} has an unclosed expression -- close every {{ with }}`);
1425
+ }
1426
+ }
1319
1427
 
1320
1428
  // src/registry/terminal-nodes.ts
1321
1429
  var DEFAULT_TIMEOUT_MS = 12e4;
@@ -1807,7 +1915,7 @@ var KINDS = [
1807
1915
  key: "condition",
1808
1916
  label: "Raw expression (advanced)",
1809
1917
  example: "{{ $json.active && $json.score > 10 }}",
1810
- description: "Escape hatch for logic the builder can't express. Overrides the conditions above when set."
1918
+ description: "Escape hatch for logic the builder can't express. Overrides the conditions above when set. String values must be {{ }}-wrapped expressions; bare strings and unclosed templates abort the run."
1811
1919
  }
1812
1920
  ]
1813
1921
  },
@@ -1827,7 +1935,7 @@ var KINDS = [
1827
1935
  // moves the ports on the canvas and the ports the runtime activates.
1828
1936
  outputs: (config) => casePorts(config?.cases),
1829
1937
  configSchema: [
1830
- { type: "expression", key: "value", label: "Switch on", example: "{{ $json.kind }}", required: true },
1938
+ { type: "expression", key: "value", label: "Switch on", description: "String values must be {{ }}-wrapped expressions; bare strings and unclosed templates abort the run.", example: "{{ $json.kind }}", required: true },
1831
1939
  {
1832
1940
  type: "keyvalue",
1833
1941
  key: "cases",
@@ -1846,6 +1954,15 @@ var KINDS = [
1846
1954
  name: "@particle-academy/for_each",
1847
1955
  outputShape: [
1848
1956
  { path: "items", type: "array" },
1957
+ // `results` and `failures` are the WIRED shape -- what a lane produces
1958
+ // when the `item` port is connected. Declared unconditionally because a
1959
+ // declaration describes the kind, not one graph's use of it, and because
1960
+ // the shared table requires them: fancy-conformance 0.30.0 added
1961
+ // `results` and 0.31.0 added `failures`, both BREAKING, both so that a
1962
+ // runtime which has not implemented iteration fails here rather than
1963
+ // reporting surface parity it does not have.
1964
+ { path: "results", type: "array" },
1965
+ { path: "failures", type: "array" },
1849
1966
  { path: "count", type: "number" }
1850
1967
  ],
1851
1968
  aliases: ["for_each", "@fancy/for_each"],
@@ -1854,7 +1971,7 @@ var KINDS = [
1854
1971
  executor: forEachExecutor,
1855
1972
  category: "logic",
1856
1973
  label: "For Each",
1857
- description: "Publishes the resolved list and its size on BOTH `item` and `done`. Fan-out as DATA, not as jobs -- nothing runs per item.",
1974
+ description: "Wire `item` to a lane and it runs once per item, aggregating `results` and `failures` on `done`. Leave `item` unwired (or set `mode: collect`) and it just publishes the list and its size -- one node, one checkpoint.",
1858
1975
  icon: "\u21BB",
1859
1976
  inputs: [{ id: "in" }],
1860
1977
  outputs: [{ id: "item", label: "item" }, { id: "done", label: "done" }],