@particle-academy/fancy-flow 0.50.0 → 0.51.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 (81) hide show
  1. package/dist/{ConfigFieldRenderer-CrXFq6Eb.d.cts → ConfigFieldRenderer-Bc9Txnql.d.cts} +2 -2
  2. package/dist/{ConfigFieldRenderer-u3nYHovX.d.ts → ConfigFieldRenderer-Bt3RGT7Z.d.ts} +2 -2
  3. package/dist/{FlowViewer-DRgjeWJ7.d.ts → FlowViewer-BI_AyyvU.d.ts} +1 -1
  4. package/dist/{FlowViewer-CFSMlCqi.d.cts → FlowViewer-DABx-6A-.d.cts} +1 -1
  5. package/dist/{capabilities-VzgDApur.d.cts → capabilities-BYa5p5jw.d.cts} +1 -1
  6. package/dist/{capabilities-B00VXLUp.d.ts → capabilities-COOXRiNL.d.ts} +1 -1
  7. package/dist/{chunk-I4F6GI3A.js → chunk-6AI6CBNL.js} +3 -3
  8. package/dist/{chunk-I4F6GI3A.js.map → chunk-6AI6CBNL.js.map} +1 -1
  9. package/dist/{chunk-OWDSPRAF.js → chunk-7XTTXMGB.js} +4 -4
  10. package/dist/{chunk-OWDSPRAF.js.map → chunk-7XTTXMGB.js.map} +1 -1
  11. package/dist/{chunk-BAHJVX3S.js → chunk-HXGGCMR7.js} +3 -3
  12. package/dist/{chunk-BAHJVX3S.js.map → chunk-HXGGCMR7.js.map} +1 -1
  13. package/dist/{chunk-3W26FA7Q.js → chunk-LH76EIFL.js} +18 -4
  14. package/dist/chunk-LH76EIFL.js.map +1 -0
  15. package/dist/{chunk-DQJIU55F.js → chunk-SKEZ5AGI.js} +3 -3
  16. package/dist/{chunk-DQJIU55F.js.map → chunk-SKEZ5AGI.js.map} +1 -1
  17. package/dist/{chunk-XJMWMU4J.js → chunk-XCT2CJ5O.js} +72 -4
  18. package/dist/chunk-XCT2CJ5O.js.map +1 -0
  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 +70 -2
  24. package/dist/durable.cjs.map +1 -1
  25. package/dist/durable.js +1 -1
  26. package/dist/engine.cjs +70 -2
  27. package/dist/engine.cjs.map +1 -1
  28. package/dist/engine.d.cts +7 -7
  29. package/dist/engine.d.ts +7 -7
  30. package/dist/engine.js +3 -3
  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 +85 -3
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.d.cts +11 -11
  36. package/dist/index.d.ts +11 -11
  37. package/dist/index.js +11 -11
  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 +2 -2
  41. package/dist/llm/prism.d.ts +2 -2
  42. package/dist/llm/vercel-ai.d.cts +2 -2
  43. package/dist/llm/vercel-ai.d.ts +2 -2
  44. package/dist/registry/index.d.cts +6 -6
  45. package/dist/registry/index.d.ts +6 -6
  46. package/dist/{registry-6cB5wCv6.d.ts → registry-3RkSYrMi.d.ts} +1 -1
  47. package/dist/{registry-DQh7ZmnM.d.cts → registry-C6TMfiD_.d.cts} +1 -1
  48. package/dist/registry.cjs +70 -2
  49. package/dist/registry.cjs.map +1 -1
  50. package/dist/registry.js +2 -2
  51. package/dist/{run-cohort-VX4JG21l.d.ts → run-cohort-BPIOpE8A.d.ts} +2 -2
  52. package/dist/{run-cohort-DYCL8Qv6.d.cts → run-cohort-r-L8dMED.d.cts} +2 -2
  53. package/dist/{run-flow-B24QUO1H.d.cts → run-flow-COdAOFg2.d.cts} +10 -1
  54. package/dist/{run-flow-DPUPAWk6.d.ts → run-flow-DJ7KYT6E.d.ts} +10 -1
  55. package/dist/runtime/index.d.cts +5 -5
  56. package/dist/runtime/index.d.ts +5 -5
  57. package/dist/runtime.cjs +70 -2
  58. package/dist/runtime.cjs.map +1 -1
  59. package/dist/runtime.js +3 -3
  60. package/dist/schema/index.d.cts +12 -1
  61. package/dist/schema/index.d.ts +12 -1
  62. package/dist/schema.cjs +85 -3
  63. package/dist/schema.cjs.map +1 -1
  64. package/dist/schema.js +2 -2
  65. package/dist/screens.cjs +70 -2
  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/{types-BtMOnb9I.d.cts → types-3sPauVRT.d.cts} +1 -1
  71. package/dist/{types-7cXcSQlx.d.cts → types-JFYjPJAG.d.cts} +37 -1
  72. package/dist/{types-7cXcSQlx.d.ts → types-JFYjPJAG.d.ts} +37 -1
  73. package/dist/{types-CDgIIj4c.d.ts → types-s643U1Hi.d.ts} +1 -1
  74. package/dist/ux.cjs +70 -2
  75. package/dist/ux.cjs.map +1 -1
  76. package/dist/ux.d.cts +2 -2
  77. package/dist/ux.d.ts +2 -2
  78. package/dist/ux.js +1 -1
  79. package/package.json +1 -1
  80. package/dist/chunk-3W26FA7Q.js.map +0 -1
  81. package/dist/chunk-XJMWMU4J.js.map +0 -1
package/dist/index.d.cts CHANGED
@@ -3,24 +3,24 @@ 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, g as NodeRunStatus, E as ExecutorRegistry } from './types-7cXcSQlx.cjs';
7
- export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, d as FlowEdge, e as FlowNodeData, f as FlowNodeKind, N as NodeExecutor, h as NoteNodeData, O as OutputNodeData, P as PortDescriptor, R as RunEvent, S as SubgraphNodeData, T as TriggerNodeData } from './types-7cXcSQlx.cjs';
8
- import { C as ConfigFieldRenderFn } from './ConfigFieldRenderer-CrXFq6Eb.cjs';
9
- export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './ConfigFieldRenderer-CrXFq6Eb.cjs';
6
+ import { a as FlowNode, F as FlowGraph, g as NodeRunStatus, E as ExecutorRegistry } from './types-JFYjPJAG.cjs';
7
+ export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, d as FlowEdge, e as FlowNodeData, f as FlowNodeKind, N as NodeExecutor, h as NoteNodeData, O as OutputNodeData, P as PortDescriptor, R as RunEvent, S as SubgraphNodeData, T as TriggerNodeData } from './types-JFYjPJAG.cjs';
8
+ import { C as ConfigFieldRenderFn } from './ConfigFieldRenderer-Bc9Txnql.cjs';
9
+ export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './ConfigFieldRenderer-Bc9Txnql.cjs';
10
10
  import { WorkflowSchema, WorkflowMetadata } from './schema/index.cjs';
11
11
  export { ImportIssue, ImportOptions, ImportResult, WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, WorkflowSchemaEdge, WorkflowSchemaNode, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './schema/index.cjs';
12
12
  import { AutoLayoutOptions } from './layout/index.cjs';
13
13
  export { AutoLayoutDirection } from './layout/index.cjs';
14
- import { a as NodeCategory, N as NodeKindDefinition } from './types-BtMOnb9I.cjs';
15
- export { A as AvailableVariable, C as ConfigField, D as DocumentConfigField, r as ExpressionForm, t as ExpressionGrammarHelp, K as KeyValueConfigField, O as OutputField, h as OutputShape, P as PortSpec, R as RenderBodyContext, m as RepeaterConfigField, n as RepeaterRowField, u as availableVariables, w as baseVariables, x as describeExpressionGrammar, y as outputFieldsFor } from './types-BtMOnb9I.cjs';
16
- export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-CFSMlCqi.cjs';
14
+ import { a as NodeCategory, N as NodeKindDefinition } from './types-3sPauVRT.cjs';
15
+ export { A as AvailableVariable, C as ConfigField, D as DocumentConfigField, r as ExpressionForm, t as ExpressionGrammarHelp, K as KeyValueConfigField, O as OutputField, h as OutputShape, P as PortSpec, R as RenderBodyContext, m as RepeaterConfigField, n as RepeaterRowField, u as availableVariables, w as baseVariables, x as describeExpressionGrammar, y as outputFieldsFor } from './types-3sPauVRT.cjs';
16
+ export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-DABx-6A-.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-B24QUO1H.cjs';
20
- export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-DYCL8Qv6.cjs';
19
+ export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-COdAOFg2.cjs';
20
+ export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-r-L8dMED.cjs';
21
21
  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';
22
- export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, v as validateConfig } from './registry-DQh7ZmnM.cjs';
23
- import './capabilities-VzgDApur.cjs';
22
+ export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, v as validateConfig } from './registry-C6TMfiD_.cjs';
23
+ import './capabilities-BYa5p5jw.cjs';
24
24
 
25
25
  type FlowCanvasProps = Omit<ReactFlowProps<FlowNode, Edge>, "nodes" | "edges" | "height"> & {
26
26
  nodes: FlowNode[];
package/dist/index.d.ts CHANGED
@@ -3,24 +3,24 @@ 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, g as NodeRunStatus, E as ExecutorRegistry } from './types-7cXcSQlx.js';
7
- export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, d as FlowEdge, e as FlowNodeData, f as FlowNodeKind, N as NodeExecutor, h as NoteNodeData, O as OutputNodeData, P as PortDescriptor, R as RunEvent, S as SubgraphNodeData, T as TriggerNodeData } from './types-7cXcSQlx.js';
8
- import { C as ConfigFieldRenderFn } from './ConfigFieldRenderer-u3nYHovX.js';
9
- export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './ConfigFieldRenderer-u3nYHovX.js';
6
+ import { a as FlowNode, F as FlowGraph, g as NodeRunStatus, E as ExecutorRegistry } from './types-JFYjPJAG.js';
7
+ export { A as ActionNodeData, B as BaseNodeData, D as DecisionNodeData, d as FlowEdge, e as FlowNodeData, f as FlowNodeKind, N as NodeExecutor, h as NoteNodeData, O as OutputNodeData, P as PortDescriptor, R as RunEvent, S as SubgraphNodeData, T as TriggerNodeData } from './types-JFYjPJAG.js';
8
+ import { C as ConfigFieldRenderFn } from './ConfigFieldRenderer-Bt3RGT7Z.js';
9
+ export { a as ConfigFieldRenderContext, b as ConfigFieldRenderer, c as ConfigFieldRendererProps } from './ConfigFieldRenderer-Bt3RGT7Z.js';
10
10
  import { WorkflowSchema, WorkflowMetadata } from './schema/index.js';
11
11
  export { ImportIssue, ImportOptions, ImportResult, WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, WorkflowSchemaEdge, WorkflowSchemaNode, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './schema/index.js';
12
12
  import { AutoLayoutOptions } from './layout/index.js';
13
13
  export { AutoLayoutDirection } from './layout/index.js';
14
- import { a as NodeCategory, N as NodeKindDefinition } from './types-CDgIIj4c.js';
15
- export { A as AvailableVariable, C as ConfigField, D as DocumentConfigField, r as ExpressionForm, t as ExpressionGrammarHelp, K as KeyValueConfigField, O as OutputField, h as OutputShape, P as PortSpec, R as RenderBodyContext, m as RepeaterConfigField, n as RepeaterRowField, u as availableVariables, w as baseVariables, x as describeExpressionGrammar, y as outputFieldsFor } from './types-CDgIIj4c.js';
16
- export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-DRgjeWJ7.js';
14
+ import { a as NodeCategory, N as NodeKindDefinition } from './types-s643U1Hi.js';
15
+ export { A as AvailableVariable, C as ConfigField, D as DocumentConfigField, r as ExpressionForm, t as ExpressionGrammarHelp, K as KeyValueConfigField, O as OutputField, h as OutputShape, P as PortSpec, R as RenderBodyContext, m as RepeaterConfigField, n as RepeaterRowField, u as availableVariables, w as baseVariables, x as describeExpressionGrammar, y as outputFieldsFor } from './types-s643U1Hi.js';
16
+ export { F as FlowNodeStatus, a as FlowViewer, b as FlowViewerClassNames, c as FlowViewerProps } from './FlowViewer-BI_AyyvU.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-DPUPAWk6.js';
20
- export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-VX4JG21l.js';
19
+ export { R as RunOptions, a as RunResult, r as runFlow } from './run-flow-DJ7KYT6E.js';
20
+ export { C as CohortGuard, a as CohortOptions, b as CohortPolicy, c as CohortResult, r as runCohort } from './run-cohort-BPIOpE8A.js';
21
21
  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';
22
- export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, v as validateConfig } from './registry-6cB5wCv6.js';
23
- import './capabilities-B00VXLUp.js';
22
+ export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, v as validateConfig } from './registry-3RkSYrMi.js';
23
+ import './capabilities-COOXRiNL.js';
24
24
 
25
25
  type FlowCanvasProps = Omit<ReactFlowProps<FlowNode, Edge>, "nodes" | "edges" | "height"> & {
26
26
  nodes: FlowNode[];
package/dist/index.js CHANGED
@@ -1,16 +1,16 @@
1
- import { removeNodes, removeEdges, cloneSubgraph, alignNodes, distributeNodes, reconnectEdge, assignToLane, removeFromLane, duplicateNode, setEdgeLabel, FlowCanvas } from './chunk-OWDSPRAF.js';
2
- export { ActionNode, DecisionNode, FlowCanvas, FlowViewer, NodeShell, OutputNode, SubgraphNode, TriggerNode, alignNodes, cloneSubgraph, defaultNodeTypes, distributeNodes, reconnectEdge } from './chunk-OWDSPRAF.js';
3
- import { useFlowState, useFlowRun, useFlowHistory, applyOutputsToNodes, applyStatusesToNodes } from './chunk-BAHJVX3S.js';
4
- export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-BAHJVX3S.js';
5
- export { runCohort } from './chunk-DQJIU55F.js';
1
+ import { removeNodes, removeEdges, cloneSubgraph, alignNodes, distributeNodes, reconnectEdge, assignToLane, removeFromLane, duplicateNode, setEdgeLabel, FlowCanvas } from './chunk-7XTTXMGB.js';
2
+ export { ActionNode, DecisionNode, FlowCanvas, FlowViewer, NodeShell, OutputNode, SubgraphNode, TriggerNode, alignNodes, cloneSubgraph, defaultNodeTypes, distributeNodes, reconnectEdge } from './chunk-7XTTXMGB.js';
3
+ import { useFlowState, useFlowRun, useFlowHistory, applyOutputsToNodes, applyStatusesToNodes } from './chunk-HXGGCMR7.js';
4
+ export { applyOutputsToNodes, applyStatusesToNodes, createHistory, useFlowHistory, useFlowRun, useFlowState } from './chunk-HXGGCMR7.js';
5
+ export { runCohort } from './chunk-SKEZ5AGI.js';
6
6
  export { evaluateConfig, evaluateExpression, resolvePath, text, truthy } from './chunk-BHM5HGXH.js';
7
- import { buildNodeTypes } from './chunk-I4F6GI3A.js';
8
- export { ANY_PORT_TYPE, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility } from './chunk-I4F6GI3A.js';
7
+ import { buildNodeTypes } from './chunk-6AI6CBNL.js';
8
+ export { ANY_PORT_TYPE, RegistryNode, buildNodeTypes, createConnectionValidator, defaultPortCompatibility } from './chunk-6AI6CBNL.js';
9
9
  export { LEGACY_PAUSE_PREFIXES, PAUSE_PREFIX, decodePause, encodePause, isPause, pauseForHuman } from './chunk-UEOE6B52.js';
10
- import { workflowToBlob, importWorkflow, exportWorkflow } from './chunk-3W26FA7Q.js';
11
- export { WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './chunk-3W26FA7Q.js';
12
- import { ReactFlowProvider, useReactFlow, onNodeKindsChanged, listNodeKinds, getNodeKind, defaultConfigFor, FlowEditorProvider, addEdge, applyEdgeChanges, applyNodeChanges, Position, ensureBuiltinKinds, validateConfig, categoryAccent, Handle } from './chunk-XJMWMU4J.js';
13
- export { BUILTIN_KINDS, LaneNode, NoteNode, categoryAccent, clearNodeKindOverrides, defaultConfigFor, ensureBuiltinKinds, getNodeKind, listNodeKinds, onNodeKindsChanged, overrideNodeKind, registerBuiltinKinds, registerNodeKind, resolveNodePorts, resolvePortSpec, runFlow, useFlowEditor, useFlowEditorOptional, validateConfig } from './chunk-XJMWMU4J.js';
10
+ import { workflowToBlob, importWorkflow, exportWorkflow } from './chunk-LH76EIFL.js';
11
+ export { WORKFLOW_SCHEMA_URL, WORKFLOW_SCHEMA_VERSION, exportWorkflow, importWorkflow, migrateSchema, workflowToBlob } from './chunk-LH76EIFL.js';
12
+ import { ReactFlowProvider, useReactFlow, onNodeKindsChanged, listNodeKinds, getNodeKind, defaultConfigFor, FlowEditorProvider, addEdge, applyEdgeChanges, applyNodeChanges, Position, ensureBuiltinKinds, validateConfig, categoryAccent, Handle } from './chunk-XCT2CJ5O.js';
13
+ export { BUILTIN_KINDS, LaneNode, NoteNode, categoryAccent, clearNodeKindOverrides, defaultConfigFor, ensureBuiltinKinds, getNodeKind, listNodeKinds, onNodeKindsChanged, overrideNodeKind, registerBuiltinKinds, registerNodeKind, resolveNodePorts, resolvePortSpec, runFlow, useFlowEditor, useFlowEditorOptional, validateConfig } from './chunk-XCT2CJ5O.js';
14
14
  import { getRichInputAdapter } from './chunk-F5RPRB7A.js';
15
15
  export { RichInputPreview, getRichInputAdapter, isRichInputEnabled, onRichInputAdapterChanged, registerRichInputAdapter } from './chunk-F5RPRB7A.js';
16
16
  import './chunk-USL4FMFU.js';
@@ -1,4 +1,4 @@
1
- import { F as FlowGraph, a as FlowNode } from '../types-7cXcSQlx.cjs';
1
+ import { F as FlowGraph, a as FlowNode } from '../types-JFYjPJAG.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-7cXcSQlx.js';
1
+ import { F as FlowGraph, a as FlowNode } from '../types-JFYjPJAG.js';
2
2
  import '@xyflow/react';
3
3
 
4
4
  type AutoLayoutDirection = "LR" | "TB" | "RL" | "BT";
@@ -1,5 +1,5 @@
1
- import { L as LlmClient } from '../capabilities-VzgDApur.cjs';
2
- import '../types-7cXcSQlx.cjs';
1
+ import { L as LlmClient } from '../capabilities-BYa5p5jw.cjs';
2
+ import '../types-JFYjPJAG.cjs';
3
3
  import '@xyflow/react';
4
4
 
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { L as LlmClient } from '../capabilities-B00VXLUp.js';
2
- import '../types-7cXcSQlx.js';
1
+ import { L as LlmClient } from '../capabilities-COOXRiNL.js';
2
+ import '../types-JFYjPJAG.js';
3
3
  import '@xyflow/react';
4
4
 
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  import { LanguageModel } from 'ai';
2
- import { a as LlmRouteRequest, L as LlmClient } from '../capabilities-VzgDApur.cjs';
3
- import '../types-7cXcSQlx.cjs';
2
+ import { a as LlmRouteRequest, L as LlmClient } from '../capabilities-BYa5p5jw.cjs';
3
+ import '../types-JFYjPJAG.cjs';
4
4
  import '@xyflow/react';
5
5
 
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  import { LanguageModel } from 'ai';
2
- import { a as LlmRouteRequest, L as LlmClient } from '../capabilities-B00VXLUp.js';
3
- import '../types-7cXcSQlx.js';
2
+ import { a as LlmRouteRequest, L as LlmClient } from '../capabilities-COOXRiNL.js';
3
+ import '../types-JFYjPJAG.js';
4
4
  import '@xyflow/react';
5
5
 
6
6
  /**
@@ -1,13 +1,13 @@
1
- import { N as NodeKindDefinition, P as PortSpec } from '../types-BtMOnb9I.cjs';
2
- export { C as ConfigField, k as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, l as NumberConfigField, R as RenderBodyContext, m as RepeaterConfigField, n as RepeaterRowField, o as SelectConfigField, p as SwitchConfigField, T as TextConfigField, q as TextareaConfigField } from '../types-BtMOnb9I.cjs';
3
- import { P as PortDescriptor, a as FlowNode, N as NodeExecutor } from '../types-7cXcSQlx.cjs';
1
+ import { N as NodeKindDefinition, P as PortSpec } from '../types-3sPauVRT.cjs';
2
+ export { C as ConfigField, k as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, l as NumberConfigField, R as RenderBodyContext, m as RepeaterConfigField, n as RepeaterRowField, o as SelectConfigField, p as SwitchConfigField, T as TextConfigField, q as TextareaConfigField } from '../types-3sPauVRT.cjs';
3
+ import { P as PortDescriptor, a as FlowNode, N as NodeExecutor } from '../types-JFYjPJAG.cjs';
4
4
  import { Connection, Edge, NodeProps, NodeTypes } from '@xyflow/react';
5
- import { b as LlmRoute } from '../capabilities-VzgDApur.cjs';
6
- export { C as CapabilityId, L as LlmClient, c as LlmRouteChoice, a as LlmRouteRequest, d as WorkflowResolution, e as WorkflowResolutionFailure, W as WorkflowResolver, f as capabilityStatus, g as getLlmClient, h as getWorkflowResolver, i as isResolutionFailure, r as registerLlmClient, j as registerWorkflowResolver } from '../capabilities-VzgDApur.cjs';
5
+ import { b as LlmRoute } from '../capabilities-BYa5p5jw.cjs';
6
+ export { C as CapabilityId, L as LlmClient, c as LlmRouteChoice, a as LlmRouteRequest, d as WorkflowResolution, e as WorkflowResolutionFailure, W as WorkflowResolver, f as capabilityStatus, g as getLlmClient, h as getWorkflowResolver, i as isResolutionFailure, r as registerLlmClient, j as registerWorkflowResolver } from '../capabilities-BYa5p5jw.cjs';
7
7
  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';
8
8
  import * as react from 'react';
9
9
  import { ComponentType, ReactNode } from 'react';
10
- export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, a as resolveKindId, v as validateConfig } from '../registry-DQh7ZmnM.cjs';
10
+ export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, a as resolveKindId, v as validateConfig } from '../registry-C6TMfiD_.cjs';
11
11
 
12
12
  /**
13
13
  * Connection validation — the single rule that decides whether an edge between
@@ -1,13 +1,13 @@
1
- import { N as NodeKindDefinition, P as PortSpec } from '../types-CDgIIj4c.js';
2
- export { C as ConfigField, k as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, l as NumberConfigField, R as RenderBodyContext, m as RepeaterConfigField, n as RepeaterRowField, o as SelectConfigField, p as SwitchConfigField, T as TextConfigField, q as TextareaConfigField } from '../types-CDgIIj4c.js';
3
- import { P as PortDescriptor, a as FlowNode, N as NodeExecutor } from '../types-7cXcSQlx.js';
1
+ import { N as NodeKindDefinition, P as PortSpec } from '../types-s643U1Hi.js';
2
+ export { C as ConfigField, k as CredentialConfigField, D as DocumentConfigField, E as ExpressionConfigField, J as JsonConfigField, K as KeyValueConfigField, a as NodeCategory, l as NumberConfigField, R as RenderBodyContext, m as RepeaterConfigField, n as RepeaterRowField, o as SelectConfigField, p as SwitchConfigField, T as TextConfigField, q as TextareaConfigField } from '../types-s643U1Hi.js';
3
+ import { P as PortDescriptor, a as FlowNode, N as NodeExecutor } from '../types-JFYjPJAG.js';
4
4
  import { Connection, Edge, NodeProps, NodeTypes } from '@xyflow/react';
5
- import { b as LlmRoute } from '../capabilities-B00VXLUp.js';
6
- export { C as CapabilityId, L as LlmClient, c as LlmRouteChoice, a as LlmRouteRequest, d as WorkflowResolution, e as WorkflowResolutionFailure, W as WorkflowResolver, f as capabilityStatus, g as getLlmClient, h as getWorkflowResolver, i as isResolutionFailure, r as registerLlmClient, j as registerWorkflowResolver } from '../capabilities-B00VXLUp.js';
5
+ import { b as LlmRoute } from '../capabilities-COOXRiNL.js';
6
+ export { C as CapabilityId, L as LlmClient, c as LlmRouteChoice, a as LlmRouteRequest, d as WorkflowResolution, e as WorkflowResolutionFailure, W as WorkflowResolver, f as capabilityStatus, g as getLlmClient, h as getWorkflowResolver, i as isResolutionFailure, r as registerLlmClient, j as registerWorkflowResolver } from '../capabilities-COOXRiNL.js';
7
7
  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';
8
8
  import * as react from 'react';
9
9
  import { ComponentType, ReactNode } from 'react';
10
- export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, a as resolveKindId, v as validateConfig } from '../registry-6cB5wCv6.js';
10
+ export { N as NodeKindPresentation, c as categoryAccent, b as clearNodeKindOverrides, d as defaultConfigFor, e as ensureBuiltinKinds, g as getNodeKind, k as kindIds, l as listNodeKinds, o as onNodeKindsChanged, f as overrideNodeKind, r as registerNodeKind, a as resolveKindId, v as validateConfig } from '../registry-3RkSYrMi.js';
11
11
 
12
12
  /**
13
13
  * Connection validation — the single rule that decides whether an edge between
@@ -1,4 +1,4 @@
1
- import { N as NodeKindDefinition } from './types-CDgIIj4c.js';
1
+ import { N as NodeKindDefinition } from './types-s643U1Hi.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 { N as NodeKindDefinition } from './types-BtMOnb9I.cjs';
1
+ import { N as NodeKindDefinition } from './types-3sPauVRT.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
@@ -9368,6 +9368,61 @@ var RunIdentity = class _RunIdentity {
9368
9368
  }
9369
9369
  };
9370
9370
 
9371
+ // src/runtime/workflow-props.ts
9372
+ function typeOf(value) {
9373
+ if (value === null) return "null";
9374
+ if (Array.isArray(value)) return "array";
9375
+ return typeof value;
9376
+ }
9377
+ function resolveWorkflowProps(declared, passed) {
9378
+ const inputs = declared ?? [];
9379
+ const given = passed ?? {};
9380
+ const byName = new Map(inputs.map((input) => [input.name, input]));
9381
+ for (const name of Object.keys(given)) {
9382
+ if (!byName.has(name)) {
9383
+ const known = inputs.map((input) => input.name);
9384
+ const suffix = known.length === 0 ? "this workflow declares no inputs" : `known inputs: ${known.join(", ")}`;
9385
+ return {
9386
+ ok: false,
9387
+ code: "unknown_input",
9388
+ error: `Unknown workflow input "${name}" \u2014 ${suffix}.`
9389
+ };
9390
+ }
9391
+ }
9392
+ const resolved = {};
9393
+ for (const input of inputs) {
9394
+ const supplied = Object.prototype.hasOwnProperty.call(given, input.name);
9395
+ const hasDefault = Object.prototype.hasOwnProperty.call(input, "default");
9396
+ if (!supplied) {
9397
+ if (hasDefault) {
9398
+ resolved[input.name] = input.default;
9399
+ continue;
9400
+ }
9401
+ if (input.required) {
9402
+ return {
9403
+ ok: false,
9404
+ code: "missing_required",
9405
+ error: `Missing required workflow input "${input.name}"${input.type ? ` (${input.type})` : ""}.`
9406
+ };
9407
+ }
9408
+ continue;
9409
+ }
9410
+ const value = given[input.name];
9411
+ if (input.type !== void 0) {
9412
+ const actual = typeOf(value);
9413
+ if (actual !== input.type) {
9414
+ return {
9415
+ ok: false,
9416
+ code: "type_mismatch",
9417
+ error: `Workflow input "${input.name}" expects ${input.type}, got ${actual}.`
9418
+ };
9419
+ }
9420
+ }
9421
+ resolved[input.name] = value;
9422
+ }
9423
+ return { ok: true, props: resolved };
9424
+ }
9425
+
9371
9426
  // src/runtime/run-flow.ts
9372
9427
  async function runFlow(graph, executors, onEvent = () => {
9373
9428
  }, options = {}) {
@@ -9383,6 +9438,13 @@ async function runFlow(graph, executors, onEvent = () => {
9383
9438
  onEvent({ type: "run-error", error: msg });
9384
9439
  return { ok: false, outputs, error: msg };
9385
9440
  }
9441
+ const propsCheck = resolveWorkflowProps(graph.inputs, options.props);
9442
+ if (!propsCheck.ok) {
9443
+ onEvent({ type: "run-error", error: propsCheck.error });
9444
+ return { ok: false, outputs, error: propsCheck.error };
9445
+ }
9446
+ const props = propsCheck.props;
9447
+ const declaresProps = (graph.inputs?.length ?? 0) > 0;
9386
9448
  const incomingByNode = indexIncoming(graph.edges);
9387
9449
  const timer2 = timeoutMs ? setTimeout(() => errors.push(`Run timed out after ${timeoutMs}ms`), timeoutMs) : null;
9388
9450
  onEvent({ type: "run-start" });
@@ -9424,7 +9486,7 @@ async function runFlow(graph, executors, onEvent = () => {
9424
9486
  }
9425
9487
  onEvent({ type: "node-status", nodeId: node.id, status: "running" });
9426
9488
  announce(onEvent, node, "start");
9427
- const inputs = collectInputs(node, incoming, portValues, initialInputs);
9489
+ const inputs = collectInputs(node, incoming, portValues, initialInputs, props, declaresProps);
9428
9490
  const exec = pickExecutor(executors, node);
9429
9491
  if (!exec) {
9430
9492
  const msg = `No executor registered for kind=${node.type}`;
@@ -9501,8 +9563,13 @@ function topoSort(graph) {
9501
9563
  const byId = new Map(graph.nodes.map((n) => [n.id, n]));
9502
9564
  return ordered.map((id2) => byId.get(id2)).filter(Boolean);
9503
9565
  }
9504
- function collectInputs(node, incoming, portValues, initial) {
9566
+ function collectInputs(node, incoming, portValues, initial, props, declaresProps) {
9505
9567
  const inputs = { ...initial[node.id] ?? {} };
9568
+ if (incoming.length === 0) {
9569
+ for (const [name, value] of Object.entries(props)) {
9570
+ if (!(name in inputs)) inputs[name] = value;
9571
+ }
9572
+ }
9506
9573
  for (const e of incoming) {
9507
9574
  const portId = e.targetHandle ?? "in";
9508
9575
  const key = `${e.source}:${e.sourceHandle ?? "out"}`;
@@ -9512,6 +9579,7 @@ function collectInputs(node, incoming, portValues, initial) {
9512
9579
  inputs[e.source] = portValues.get(key);
9513
9580
  }
9514
9581
  }
9582
+ if (declaresProps) inputs.$props = props;
9515
9583
  return inputs;
9516
9584
  }
9517
9585
  function pickExecutor(executors, node) {