@flowdrop/flowdrop 2.0.0-beta.1 → 2.0.0-beta.11
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.
- package/CHANGELOG.md +210 -0
- package/MIGRATION-2.0.md +173 -3
- package/README.md +5 -5
- package/dist/adapters/WorkflowAdapter.js +4 -5
- package/dist/adapters/agentspec/AgentSpecAdapter.js +3 -3
- package/dist/adapters/agentspec/defaultNodeTypes.js +9 -9
- package/dist/api/enhanced-client.js +6 -11
- package/dist/chat/batchFeedback.js +1 -1
- package/dist/chat/commandClassifier.d.ts +11 -0
- package/dist/chat/commandClassifier.js +20 -0
- package/dist/chat/historyBuilder.d.ts +39 -0
- package/dist/chat/historyBuilder.js +82 -0
- package/dist/chat/index.d.ts +2 -1
- package/dist/chat/index.js +2 -1
- package/dist/chat/responseParser.js +16 -12
- package/dist/commands/executor.js +51 -26
- package/dist/commands/parser.d.ts +12 -0
- package/dist/commands/parser.js +33 -6
- package/dist/commands/storeIntegration.svelte.js +11 -1
- package/dist/commands/types.js +5 -5
- package/dist/components/App.svelte +547 -386
- package/dist/components/App.svelte.d.ts +16 -8
- package/dist/components/Button.stories.svelte +65 -0
- package/dist/components/Button.stories.svelte.d.ts +19 -0
- package/dist/components/Button.svelte +62 -0
- package/dist/components/Button.svelte.d.ts +24 -0
- package/dist/components/CanvasIconButton.svelte +76 -0
- package/dist/components/CanvasIconButton.svelte.d.ts +18 -0
- package/dist/components/ConfigForm.svelte +194 -565
- package/dist/components/ConfigForm.svelte.d.ts +24 -7
- package/dist/components/ConfigModal.svelte +9 -1
- package/dist/components/ConfigPanel.svelte +234 -15
- package/dist/components/ConfigPanel.svelte.d.ts +6 -0
- package/dist/components/EditorStatusBar.stories.svelte +44 -0
- package/dist/components/EditorStatusBar.stories.svelte.d.ts +27 -0
- package/dist/components/EditorStatusBar.svelte +99 -0
- package/dist/components/EditorStatusBar.svelte.d.ts +15 -0
- package/dist/components/IconButton.svelte +80 -0
- package/dist/components/IconButton.svelte.d.ts +30 -0
- package/dist/components/Input.svelte +74 -0
- package/dist/components/Input.svelte.d.ts +17 -0
- package/dist/components/LogoWordmark.svelte +113 -0
- package/dist/components/LogoWordmark.svelte.d.ts +26 -0
- package/dist/components/Navbar.svelte +17 -63
- package/dist/components/Navbar.svelte.d.ts +3 -0
- package/dist/components/NodeSidebar.svelte +21 -126
- package/dist/components/NodeSwapPicker.svelte +12 -30
- package/dist/components/PipelineStatus.svelte +6 -1
- package/dist/components/PipelineStatus.svelte.d.ts +3 -0
- package/dist/components/PortMappingRow.svelte +0 -2
- package/dist/components/SchemaForm.svelte +4 -14
- package/dist/components/Select.svelte +53 -0
- package/dist/components/Select.svelte.d.ts +15 -0
- package/dist/components/SettingsModal.svelte +0 -5
- package/dist/components/SettingsPanel.svelte +33 -6
- package/dist/components/Textarea.svelte +39 -0
- package/dist/components/Textarea.svelte.d.ts +12 -0
- package/dist/components/ThemeToggle.svelte +15 -94
- package/dist/components/UniversalNode.svelte +36 -4
- package/dist/components/UniversalNode.svelte.d.ts +1 -1
- package/dist/components/WorkflowEditor.svelte +71 -54
- package/dist/components/WorkflowEditor.svelte.d.ts +21 -0
- package/dist/components/chat/AIChatPanel.svelte +49 -8
- package/dist/components/chat/CommandPreview.svelte +10 -1
- package/dist/components/console/ConsoleAutocomplete.svelte +1 -1
- package/dist/components/console/ConsoleInput.svelte +3 -3
- package/dist/components/console/ConsoleOutput.svelte +2 -2
- package/dist/components/form/FormArray.svelte +37 -173
- package/dist/components/form/FormAutocomplete.svelte +18 -15
- package/dist/components/form/FormCheckboxGroup.svelte +1 -5
- package/dist/components/form/FormCodeEditor.svelte +9 -7
- package/dist/components/form/FormField.svelte +18 -42
- package/dist/components/form/FormFieldLight.svelte +52 -48
- package/dist/components/form/FormFieldLight.svelte.d.ts +12 -0
- package/dist/components/form/FormFieldset.svelte +45 -11
- package/dist/components/form/FormMarkdownEditor.svelte +8 -5
- package/dist/components/form/FormNumberField.svelte +4 -36
- package/dist/components/form/FormPorts.svelte +280 -0
- package/dist/components/form/FormPorts.svelte.d.ts +13 -0
- package/dist/components/form/FormRangeField.svelte +63 -30
- package/dist/components/form/FormSelect.svelte +13 -75
- package/dist/components/form/FormTemplateEditor.svelte +6 -4
- package/dist/components/form/FormTextField.svelte +3 -35
- package/dist/components/form/FormTextarea.svelte +4 -39
- package/dist/components/form/FormToggle.svelte +27 -6
- package/dist/components/form/FormToggle.svelte.d.ts +5 -0
- package/dist/components/form/FormUISchemaRenderer.svelte +3 -1
- package/dist/components/form/resolveFieldType.d.ts +24 -0
- package/dist/components/form/resolveFieldType.js +55 -0
- package/dist/components/icons/CloseIcon.svelte +6 -0
- package/dist/components/icons/CloseIcon.svelte.d.ts +26 -0
- package/dist/components/icons/CommandLineIcon.svelte +15 -0
- package/dist/components/icons/CommandLineIcon.svelte.d.ts +26 -0
- package/dist/components/icons/MenuIcon.svelte +4 -0
- package/dist/components/icons/MenuIcon.svelte.d.ts +26 -0
- package/dist/components/icons/MenuOpenIcon.svelte +6 -0
- package/dist/components/icons/MenuOpenIcon.svelte.d.ts +26 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +0 -10
- package/dist/components/interrupt/ConfirmationPrompt.svelte +0 -5
- package/dist/components/interrupt/InterruptBubble.svelte +11 -12
- package/dist/components/interrupt/ReviewPrompt.svelte +0 -20
- package/dist/components/interrupt/TextInputPrompt.svelte +0 -6
- package/dist/components/layouts/MainLayout.svelte +4 -5
- package/dist/components/nodes/AtomNode.svelte +62 -76
- package/dist/components/nodes/AtomNode.svelte.d.ts +1 -1
- package/dist/components/nodes/GatewayNode.svelte +117 -164
- package/dist/components/nodes/GatewayNode.svelte.d.ts +1 -1
- package/dist/components/nodes/IdeaNode.svelte +72 -98
- package/dist/components/nodes/IdeaNode.svelte.d.ts +8 -4
- package/dist/components/nodes/NodeConfigButton.svelte +86 -0
- package/dist/components/nodes/NodeConfigButton.svelte.d.ts +15 -0
- package/dist/components/nodes/NotesNode.svelte +76 -85
- package/dist/components/nodes/NotesNode.svelte.d.ts +8 -4
- package/dist/components/nodes/SimpleNode.svelte +59 -133
- package/dist/components/nodes/SimpleNode.svelte.d.ts +4 -4
- package/dist/components/nodes/SquareNode.svelte +110 -164
- package/dist/components/nodes/SquareNode.svelte.d.ts +4 -4
- package/dist/components/nodes/TerminalNode.svelte +62 -124
- package/dist/components/nodes/TerminalNode.svelte.d.ts +4 -4
- package/dist/components/nodes/ToolNode.svelte +92 -103
- package/dist/components/nodes/ToolNode.svelte.d.ts +6 -6
- package/dist/components/nodes/WorkflowNode.svelte +132 -191
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +1 -1
- package/dist/components/playground/ChatInput.svelte +316 -27
- package/dist/components/playground/ChatInput.svelte.d.ts +31 -1
- package/dist/components/playground/ControlPanel.svelte +22 -0
- package/dist/components/playground/ControlPanel.svelte.d.ts +13 -0
- package/dist/components/playground/InputCollector.svelte +11 -48
- package/dist/components/playground/PipelineKanbanView.svelte +6 -4
- package/dist/components/playground/PipelineKanbanView.svelte.d.ts +2 -0
- package/dist/components/playground/PipelinePanel.svelte +20 -3
- package/dist/components/playground/PipelinePanel.svelte.d.ts +2 -0
- package/dist/components/playground/PipelineTableView.svelte +6 -4
- package/dist/components/playground/PipelineTableView.svelte.d.ts +2 -0
- package/dist/components/playground/Playground.svelte +292 -28
- package/dist/components/playground/Playground.svelte.d.ts +3 -0
- package/dist/components/playground/PlaygroundApp.svelte +6 -1
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +3 -0
- package/dist/components/playground/PlaygroundModal.svelte +5 -0
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +3 -0
- package/dist/components/playground/PlaygroundStudio.svelte +7 -6
- package/dist/components/playground/PlaygroundStudio.svelte.d.ts +3 -0
- package/dist/components/playground/pipelineViewUtils.svelte.d.ts +2 -1
- package/dist/components/playground/pipelineViewUtils.svelte.js +2 -2
- package/dist/components/surfaces/SurfaceOverlay.svelte +153 -0
- package/dist/components/surfaces/SurfaceOverlay.svelte.d.ts +14 -0
- package/dist/components/surfaces/TabbedSurface.svelte +133 -0
- package/dist/components/surfaces/TabbedSurface.svelte.d.ts +27 -0
- package/dist/config/endpoints.d.ts +71 -1
- package/dist/config/endpoints.js +46 -5
- package/dist/core/index.d.ts +2 -3
- package/dist/core/index.js +2 -6
- package/dist/display/index.d.ts +6 -1
- package/dist/display/index.js +9 -1
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.js +1 -1
- package/dist/form/full.d.ts +2 -1
- package/dist/form/full.js +4 -1
- package/dist/form/index.d.ts +0 -1
- package/dist/form/index.js +3 -2
- package/dist/helpers/workflowEditorHelper.d.ts +4 -2
- package/dist/helpers/workflowEditorHelper.js +8 -8
- package/dist/messages/defaults.d.ts +98 -0
- package/dist/messages/defaults.js +58 -1
- package/dist/messages/index.d.ts +1 -1
- package/dist/messages/index.js +1 -1
- package/dist/openapi/v1/openapi.yaml +35 -23
- package/dist/playground/commands/args.d.ts +32 -0
- package/dist/playground/commands/args.js +50 -0
- package/dist/playground/commands/dispatch.d.ts +143 -0
- package/dist/playground/commands/dispatch.js +162 -0
- package/dist/playground/commands/index.d.ts +14 -0
- package/dist/playground/commands/index.js +10 -0
- package/dist/playground/commands/parser.d.ts +38 -0
- package/dist/playground/commands/parser.js +163 -0
- package/dist/playground/commands/registry.d.ts +42 -0
- package/dist/playground/commands/registry.js +122 -0
- package/dist/playground/commands/suggest.d.ts +37 -0
- package/dist/playground/commands/suggest.js +46 -0
- package/dist/playground/commands/types.d.ts +111 -0
- package/dist/playground/commands/types.js +15 -0
- package/dist/playground/index.d.ts +21 -2
- package/dist/playground/index.js +27 -2
- package/dist/playground/mount.d.ts +19 -5
- package/dist/playground/mount.js +16 -8
- package/dist/playground/runAction.d.ts +48 -0
- package/dist/playground/runAction.js +31 -0
- package/dist/registry/builtinNodeTypes.d.ts +53 -0
- package/dist/registry/builtinNodeTypes.js +67 -0
- package/dist/registry/builtinNodes.d.ts +2 -39
- package/dist/registry/builtinNodes.js +6 -53
- package/dist/registry/nodeComponentRegistry.d.ts +2 -1
- package/dist/schemas/v1/workflow.schema.json +16 -14
- package/dist/services/agentSpecExecutionService.d.ts +0 -2
- package/dist/services/agentSpecExecutionService.js +0 -2
- package/dist/services/apiVariableService.js +12 -26
- package/dist/services/categoriesApi.js +3 -6
- package/dist/services/chatService.d.ts +4 -3
- package/dist/services/chatService.js +13 -18
- package/dist/services/dynamicSchemaService.d.ts +31 -4
- package/dist/services/dynamicSchemaService.js +62 -33
- package/dist/services/historyService.d.ts +30 -8
- package/dist/services/historyService.js +51 -15
- package/dist/services/interruptService.d.ts +7 -6
- package/dist/services/interruptService.js +19 -21
- package/dist/services/pipelineSignalService.d.ts +97 -0
- package/dist/services/pipelineSignalService.js +94 -0
- package/dist/services/playgroundService.d.ts +21 -8
- package/dist/services/playgroundService.js +45 -25
- package/dist/services/portConfigApi.js +3 -6
- package/dist/services/settingsService.d.ts +9 -4
- package/dist/services/settingsService.js +23 -12
- package/dist/services/workflowLaunchService.d.ts +74 -0
- package/dist/services/workflowLaunchService.js +74 -0
- package/dist/skins/drafter.d.ts +30 -0
- package/dist/skins/drafter.js +198 -0
- package/dist/skins/index.d.ts +2 -1
- package/dist/skins/index.js +4 -2
- package/dist/stores/apiContext.d.ts +11 -0
- package/dist/stores/apiContext.js +15 -0
- package/dist/stores/categoriesStore.svelte.js +0 -1
- package/dist/stores/historyStore.svelte.d.ts +17 -3
- package/dist/stores/historyStore.svelte.js +30 -3
- package/dist/stores/instanceContainer.svelte.js +5 -0
- package/dist/stores/playgroundStore.svelte.js +1 -3
- package/dist/stores/settingsStore.svelte.d.ts +13 -0
- package/dist/stores/settingsStore.svelte.js +32 -0
- package/dist/stores/workflowStore.svelte.d.ts +42 -5
- package/dist/stores/workflowStore.svelte.js +109 -32
- package/dist/styles/base.css +285 -14
- package/dist/styles/tokens.css +60 -2
- package/dist/svelte-app.d.ts +18 -1
- package/dist/svelte-app.js +75 -110
- package/dist/themes/drafter.d.ts +2 -0
- package/dist/themes/drafter.js +15 -0
- package/dist/themes/index.d.ts +2 -1
- package/dist/themes/index.js +8 -2
- package/dist/types/auth.d.ts +9 -51
- package/dist/types/auth.js +4 -54
- package/dist/types/chat.d.ts +5 -1
- package/dist/types/events.d.ts +18 -0
- package/dist/types/events.js +2 -1
- package/dist/types/index.d.ts +84 -29
- package/dist/types/index.js +0 -1
- package/dist/types/settings.d.ts +28 -1
- package/dist/types/settings.js +6 -3
- package/dist/types/skin.d.ts +1 -1
- package/dist/types/theme.d.ts +16 -2
- package/dist/types/uischema.d.ts +5 -0
- package/dist/utils/canvasSelection.d.ts +25 -0
- package/dist/utils/canvasSelection.js +37 -0
- package/dist/utils/colors.d.ts +27 -0
- package/dist/utils/colors.js +23 -0
- package/dist/utils/connections.js +20 -56
- package/dist/utils/edgeStyling.js +9 -5
- package/dist/utils/fetchWithAuth.d.ts +36 -15
- package/dist/utils/fetchWithAuth.js +53 -23
- package/dist/utils/nodeFormSchema.d.ts +51 -0
- package/dist/utils/nodeFormSchema.js +87 -0
- package/dist/utils/nodeIds.d.ts +1 -1
- package/dist/utils/nodeIds.js +1 -1
- package/dist/utils/nodeSwap.js +3 -6
- package/dist/utils/nodeTypes.js +1 -1
- package/dist/utils/portUtils.d.ts +47 -11
- package/dist/utils/portUtils.js +67 -14
- package/dist/utils/portal.d.ts +18 -0
- package/dist/utils/portal.js +34 -0
- package/dist/utils/schemaMerge.d.ts +25 -0
- package/dist/utils/schemaMerge.js +61 -0
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,216 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [2.0.0-beta.11] - 2026-07-31
|
|
11
|
+
|
|
12
|
+
Eleventh 2.0 beta, published under the npm `beta` dist-tag (`npm install @flowdrop/flowdrop@beta`). `latest` remains 1.15.0 until 2.0.0 GA. This release gives the playground an **operator control lane**: slash commands typed in the composer act on a session or on a running pipeline without entering the conversation as chat turns, and a run can now be started without fabricating a user message. It also stops the AI assistant re-arranging hand-made layouts unasked, tells it what actually happened to the commands it emitted, and fixes an empty config panel for node types that contribute no schema.
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- **Slash commands in the playground composer.** A leading `/` routes input to the control plane instead of the pipeline, so composer input stops meaning exactly one thing ("launch a run with this as input"). Ships `/help`, `/run`, `/new`, `/stop`, `/reset`, `/delete`, `/pause`, `/resume` and `/cancel`. Commands never become session messages — control traffic that entered the conversation would be replayed as chat input on the following turn — and their results render as transient composer feedback instead. Opt-in per surface via `enableCommands` (default `false`), because the lane is only safe where the send handler actually dispatches commands: a surface that forwards input straight to a backend would post `/stop` as literal text. `//` escapes a literal leading slash, consuming exactly one so the rule composes, and an unrecognised command reports itself as unknown with distance-1 suggestions rather than being forwarded as a message — a typo must not launch a run with `/stpo` as its input.
|
|
17
|
+
- **Pipeline signals — `pause`, `resume`, `cancel`.** Signals travel _into_ a running pipeline, the opposite direction from interrupts, which a node raises and awaits. Acceptance is not application: backends observe signals cooperatively between steps, so the in-flight step always finishes first and the new `PipelineSignalService` reports `accepted` rather than claiming the run is paused, leaving the status poll to report what actually happened. Refusals ("the run already finished", "not paused", "already pending") come back as typed results rather than thrown errors, since they are outcomes to render. New `signals` endpoint block, with its own group-level `baseUrl`.
|
|
18
|
+
- **Starting a run without posting a message.** New `WorkflowLaunchService` and a `workflows.run` endpoint. Sending a message to start a run fabricates a user turn that is indistinguishable downstream from something the user actually typed; hosts that wire `onRunWorkflow` get a RUN button and a `/run` command that launch instead. `/run --key=value` passes named inputs. A rejected launch distinguishes bad inputs (the caller's to fix) from an invalid workflow (an authoring problem), surfacing the backend's own per-field locators.
|
|
19
|
+
- **Command autocomplete palette.** Typing `/` offers the commands available against the current configuration, reusing the editor console's listbox so both surfaces look and behave alike. Completes command _names_ only — argument values would mean guessing a workflow's declared launch inputs, which live server-side, and offering inputs the backend then rejects.
|
|
20
|
+
- **Optional session reset endpoint.** `playground.resetSession` plus `PlaygroundService.resetSession()`, for returning a stuck session to idle.
|
|
21
|
+
- **`behavior.chatAllowLayoutChanges` (default `true`).** When off, `AIChatPanel` skips layout commands rather than executing them. See the layout fix below; the default preserves existing behaviour.
|
|
22
|
+
- **`hideLabel` on `FormToggle`.** Keeps the state text as the switch's accessible name without rendering it. Defaults to `false`, so every other toggle is unchanged.
|
|
23
|
+
|
|
24
|
+
Commands are available **only where their endpoint is configured** — a host pointed at a backend without session reset gets no `/reset`, rather than a command that 404s. Commands bind to endpoint _keys_, never to paths or to any one backend's vocabulary, so this works against any API implementing the shape.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **The assistant re-arranged hand-made layouts unasked (#36).** Auto-beautify re-positions every node, so an unrequested `layout auto` / `layout beautify` destroyed a hand-crafted layout. The root cause was the prompt rather than the executor: the DSL prompt docs told the assistant to auto-arrange after building and to always end with `canvas fitview`. Both mandates are gone, layout commands are marked user-requested-only and must be emitted alone so they can be undone independently. Since the library cannot control how a remote backend renders those prompts, `chatAllowLayoutChanges` adds a local enforcement point.
|
|
29
|
+
- **Triple-quoted blocks swallowed every later command (#35).** The response _extractor_ only closed a `"""` block when a line was exactly `"""`; an assistant that put the closer at the end of a content line left the buffer open, collapsing 7 commands to 2 and consuming the closing fence and trailing prose. Both the extractor and the parser now track delimiter _parity_ (escaped `\"""` excluded), so a closer is valid inline or on its own line.
|
|
30
|
+
- **The assistant was never told what happened to its commands (#35).** `getHistory()` sent only the explanation, and approve/dismiss outcomes lived purely in UI state — which is what drove the duplicate-node loop on "try again". History now carries the raw response plus a per-command outcome report (APPLIED / FAILED / SKIPPED / DISMISSED / NOT APPLIED YET), read at send time so it is always current.
|
|
31
|
+
- **Node-level settings vanished for node types with no config schema (#34).** `ConfigForm` rendered its whole form inside one `{:else if configSchema}` branch, so a node whose type contributes no schema fell through to "No configuration options available" — taking the node-level settings the editor owns (port order and exposure) down with it. A reserved `ports` field is now composed into the node's effective schema, so a schema-less node with ports simply has a schema. No-op when a backend already serves a `ports` property, when there is no node, or when the node has no ports to configure. Nothing is persisted on panel open.
|
|
32
|
+
- **Port drags started a text selection in Safari (#37).** Dragging from a port handle text-selected content outside the canvas. xyflow sets `user-select: none`, but WebKit still _begins_ a selection drag from a mousedown on unselectable content, anchoring at the nearest selectable text; node and pane drags call `preventDefault()`, xyflow's `Handle` does not. A capture-phase `mousedown` on the canvas wrapper now suppresses the gesture for primary-button presses inside `.svelte-flow__handle` and re-applies the focus the default action would have moved.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- **`CommandExecutionStatus` gains `'skipped'`.** A widened union: consumers switching exhaustively on it will need to handle the new member. A skip is a non-failure, so the rest of a batch still applies and no retry feedback is generated.
|
|
37
|
+
- **Port rows in the ports widget are more compact.** The written "Exposed"/"Hidden" label next to each switch reserved a label column and let long port names widen the row. The switch alone now carries the state; a hidden row's name and type badge are dimmed to stay legible, and both ellipsize with `title` attributes preserving the full text.
|
|
38
|
+
- **`buildEndpointUrl` accepts a base-URL override**, so a group of endpoints can sit under a different prefix from the rest of the config. Additive — existing three-argument calls are unchanged.
|
|
39
|
+
|
|
40
|
+
### Internal
|
|
41
|
+
|
|
42
|
+
- The range field's one-time step inference reads its initial value inside `untrack()`, making the read-once intent explicit and clearing a `state_referenced_locally` warning. No behaviour change.
|
|
43
|
+
- Restored the missing `## [2.0.0-beta.9]` heading below: that release's summary and its "Fixed" section had been absorbed into beta.10's section since the beta.10 release commit.
|
|
44
|
+
|
|
45
|
+
## [2.0.0-beta.10] - 2026-07-22
|
|
46
|
+
|
|
47
|
+
Tenth 2.0 beta, published under the npm `beta` dist-tag (`npm install @flowdrop/flowdrop@beta`). `latest` remains 1.15.0 until 2.0.0 GA. This release reworks how node-config edits are committed and how the undo stack records state, fixing two editor bugs (a Safari save failure and a multi-step undo that reverted more than one edit) and the freeze that the prior on-blur commit was working around. It also re-establishes the editor font on the standalone `ConfigModal` export.
|
|
48
|
+
|
|
49
|
+
### Fixed
|
|
50
|
+
|
|
51
|
+
- **Safari dropped config edits toggled with a checkbox or select (#38).** Node config committed only on the config form's `focusout`, but WebKit doesn't focus checkboxes/selects on click — so toggling one and clicking Save never fired `focusout` and the edit was lost. Node config now commits **live** per change (no focus dependency), making the bug structurally impossible. Workflow settings keep the blur-commit path but retain an immediate commit for discrete controls, so they stay correct on Safari too.
|
|
52
|
+
- **A single undo reverted more than one edit (#39).** The undo stack stored the _pre-change_ state of each mutation, so after two or more sequential edits a single undo skipped a step (reverting two edits at once) and redo could not reconstruct the intermediate state. The stack now stores **post-change** snapshots — the stack top is the current committed state — so one undo == one edit. `WorkflowStore` mutations (`addNode`/`removeNode`/`addEdge`/`removeEdge`/`updateNode`/`batchUpdate`/`swapNode`) push after mutating, and config-edit transactions commit their final state.
|
|
53
|
+
- **The editor no longer freezes while typing in a config field.** The old on-blur commit was itself a workaround for committing on every change deep-cloning the whole workflow onto the undo stack, pushing a per-keystroke undo entry, firing `onWorkflowChange`, and recomputing edge geometry — all per keystroke. A field-editing session now applies each change cheaply inside a lazily-opened history transaction and coalesces into a single undo step; the workflow event fires and edges refresh once per session, on finalize.
|
|
54
|
+
- **Standalone `ConfigModal` inherited the host page's font.** `ConfigModal` (exported via `@flowdrop/flowdrop/editor`) is mounted standalone by embedders on bare host pages, so its `font-family: inherit` text fell back to the host theme font (e.g. serif on Drupal) instead of the FlowDrop sans. It now declares its own `font-family` on the modal root, mirroring the `SurfaceOverlay` / `ConfigPanel` fix from beta.9.
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
|
|
58
|
+
- **History commits now require the final state, and undo/redo finalize any open edit first.** Hardening follow-up to the #39 fix: `commitTransaction(finalWorkflow)` is now required (the pre-change `?? transactionSnapshot` fallback that could silently reintroduce the off-by-one is gone). The service no longer guesses at the live state to auto-commit a dangling transaction inside `undo()`/`redo()`; instead the state owners finalize first (a `HistoryStore` before-navigate hook wired to `finalizeNodeConfig()`, and command-dispatch undo/redo), and if the service still finds an open transaction it abandons it with a warning rather than committing wrong state. New shared `clearTransaction()` internally.
|
|
59
|
+
|
|
60
|
+
## [2.0.0-beta.9] - 2026-07-12
|
|
61
|
+
|
|
62
|
+
Ninth 2.0 beta, published under the npm `beta` dist-tag (`npm install @flowdrop/flowdrop@beta`). `latest` remains 1.15.0 until 2.0.0 GA. A follow-up fix to the relocatable surfaces shipped in beta.8: config surfaces hosted in the modal placement (and the config panel's pop-out) now keep the editor's font instead of falling back to the host page's default.
|
|
63
|
+
|
|
64
|
+
### Fixed
|
|
65
|
+
|
|
66
|
+
- **Modal config surfaces no longer inherit the host page's font.** The `SurfaceOverlay` (modal placement) and the `ConfigPanel` pop-out both portal to `document.body` so their fixed backdrop escapes any ancestor that establishes a containing block. That also moved them out of the mount container that carries the app font, so — since the library sets no base font of its own and relies on inheriting the host's — the modal fell back to the page default (rendering as serif on a bare Drupal editor page, whose `<body>` resolves to `Times`) while the rest of the editor stayed sans-serif. Each portalled backdrop now re-declares `font-family: var(--fd-font-family, system-ui, -apple-system, sans-serif)`, mirroring the mount container's own declaration, so a portalled surface matches the editor and still honours a consumer's `--fd-font-family` override.
|
|
67
|
+
|
|
68
|
+
## [2.0.0-beta.8] - 2026-07-11
|
|
69
|
+
|
|
70
|
+
Eighth 2.0 beta, published under the npm `beta` dist-tag (`npm install @flowdrop/flowdrop@beta`). `latest` remains 1.15.0 until 2.0.0 GA. This release makes auxiliary surfaces relocatable: the config panel and the console/AI Assistant group are no longer pinned to fixed spots — each can be hosted in the **right sidebar**, a **centered modal overlay**, or the **bottom panel**, chosen independently per surface. Surfaces routed to the same host coexist as tabs. Defaults are unchanged (config in the sidebar, console/chat in the bottom panel), so existing embeds look and behave exactly as before.
|
|
71
|
+
|
|
72
|
+
### Added
|
|
73
|
+
|
|
74
|
+
- **Configurable surface placement.** A new `SurfacePlacement` enum (`'sidebar' | 'modal' | 'below'`) with two UI settings — `configPlacement` (default `sidebar`) and `consolePlacement` (default `below`) — controls where the config panel and the console/AI Assistant group are hosted. Both are exposed in the Settings panel and as `configPlacement` / `consolePlacement` mount options; the mount options **seed** the setting on first load without overriding a returning user's persisted choice (library default < host default < user snapshot), via the new `seedUiDefaults` store helper. Modelled as one enum per surface so invalid combinations (two hosts at once, or none) are unrepresentable.
|
|
75
|
+
- **`TabbedSurface` component.** A reusable tabbed container that hosts one or more surfaces in the sidebar, bottom panel, or modal. All tab bodies stay mounted (toggled via `display`) so surface state — console scrollback, chat history, in-progress form edits — survives tab switches, and the tab bar hides itself when only a single surface is present so a lone surface reads as a plain panel.
|
|
76
|
+
- **`SurfaceOverlay` component + `portal` action.** A modal shell that hosts a surface (or a `TabbedSurface` of several) in the `modal` placement, closable via Esc, backdrop click, or the close button. It portals to `document.body` through a new `portal` Svelte action so its fixed backdrop escapes any ancestor that establishes a containing block (`transform`, `filter`, `backdrop-filter`, …); the action is a no-op during SSR.
|
|
77
|
+
|
|
78
|
+
## [2.0.0-beta.7] - 2026-07-09
|
|
79
|
+
|
|
80
|
+
Seventh 2.0 beta, published under the npm `beta` dist-tag (`npm install @flowdrop/flowdrop@beta`). `latest` remains 1.15.0 until 2.0.0 GA. Dynamic config schemas become composable and self-refreshing. A dynamic-schema endpoint can now **layer onto** a node's static schema instead of replacing the whole form — merging in the fields it owns, or targeting a single region — so an endpoint only returns what it actually drives and the rest of the form stays exactly as authored. The fetched form also **refetches on its own** when a config value its URL depends on changes (e.g. picking a different trigger `event_type`), rather than loading only once on mount. All additive: the historical whole-form `replace` behaviour is still the default, so existing dynamic-schema configs are unchanged.
|
|
81
|
+
|
|
82
|
+
### Added
|
|
83
|
+
|
|
84
|
+
- **Dynamic config schema can layer onto the static schema (`mergeStrategy` + `target`).** `DynamicSchemaEndpoint` gains two optional fields. `mergeStrategy: 'replace' | 'merge'` — `merge` combines the fetched schema with the node's static schema (`schema` prop / `metadata.configSchema`): properties are merged (fetched wins per key), `required` is unioned, so an endpoint only has to return the fields it drives. `target` — a dot-path of property keys (e.g. `"advanced"` or `"advanced.retry"`) that restricts the fetch to one region of the form, splicing the fetched schema in at that location and leaving every other field static; `mergeStrategy` then decides replace-vs-merge at that node. Both default to whole-form `replace`, matching prior behaviour. When `merge`/`target` is configured, the schema is now fetched even if a static schema is present (previously a static schema suppressed the fetch). New `applyFetchedSchema` util backs the combination.
|
|
85
|
+
- **Dynamic schema auto-refetches when its inputs change.** `ConfigForm` now watches the resolved endpoint URL — template variables substituted from the node context — as a reactive key and refetches whenever it changes, so choosing a different value that the endpoint depends on (e.g. a trigger's `event_type`) reloads the matching schema instead of showing the schema captured at mount. A fetch already in flight is left to settle before the next one runs, and the key only reflects what the URL actually references, so static endpoints never spuriously refetch. New `resolveDynamicSchemaKey` export.
|
|
86
|
+
- **Dynamic schema endpoints can return a companion `uiSchema`.** When the endpoint response includes a `uiSchema` (read from `uiSchema`, `data.uiSchema`, or `schema.uiSchema`), `ConfigForm` uses it to lay out the fetched schema and caches it alongside the schema. It takes precedence over the node's static-metadata `uiSchema` — which can only reference the static schema's fields and would mislay a server-hydrated form — while a directly-passed `uiSchema` prop still wins. `DynamicSchemaResult` and the cache entry gain an optional `uiSchema`.
|
|
87
|
+
|
|
88
|
+
### Fixed
|
|
89
|
+
|
|
90
|
+
- **Config values are no longer silently dropped on save.** `ConfigForm` rebuilt the saved config solely from the active schema's properties, so any stored config key the schema didn't render — for example after a dynamic schema returned a narrower field set — was lost on the next blur/save. The commit paths (`onChange` on blur, and explicit save) now preserve config keys the active schema doesn't own, with the rendered fields still taking precedence.
|
|
91
|
+
- **`invalidateSchemaCache` now matches the fetch cache key.** It built the node context without the `workflowId`, so for endpoints whose URL references `{workflowId}` it resolved a different cache key than `fetchDynamicSchema` and failed to evict the entry — a manual schema refresh then re-served the stale cached schema. It now accepts `workflowId` (matching the fetch context); the context-building for schema-URL, external-edit-URL, and cache-key resolution was consolidated so they can no longer drift apart.
|
|
92
|
+
|
|
93
|
+
## [2.0.0-beta.6] - 2026-06-22
|
|
94
|
+
|
|
95
|
+
Sixth 2.0 beta, published under the npm `beta` dist-tag (`npm install @flowdrop/flowdrop@beta`). `latest` remains 1.15.0 until 2.0.0 GA. This release unifies port **order** and **exposure** into a single per-instance `data.config.ports` value and makes exposure semantic — "what you see is what runs": a not-exposed port is hidden on the canvas, not wireable, and not runtime-overridable. The two older, separate mechanisms (`extensions.ui.portOrder` for order and `hideUnconnectedHandles` for visibility) are removed. A single combined "Ports" widget in the config panel now handles both reorder and expose/hide per port, and reserved ports (the `error` output and `trigger`/`tool` control ports) sort to the bottom automatically.
|
|
96
|
+
|
|
97
|
+
### Breaking Changes
|
|
98
|
+
|
|
99
|
+
- **Port order + exposure unified into `data.config.ports`.** Order and exposure are now one per-direction ordered list of `{ id, exposed? }` entries (`PortsConfig`): array position encodes display order, and the optional `exposed` flag overrides the port's metadata `exposedByDefault` — stored only when it diverges. An untouched node persists no `ports` key. This replaces `extensions.ui.portOrder` (removed) and the interim `exposedPorts` map. Consumers that read or write either must migrate to `config.ports`; the OpenAPI/JSON schema (`PortsConfig`, `PortConfigEntry`, `NodePort.displayOrder`) was updated to match.
|
|
100
|
+
- **`hideUnconnectedHandles` removed end-to-end.** Visibility is no longer derived from connection state. A port renders iff it is exposed (`config.ports` override, else metadata `exposedByDefault`, which defaults to exposed). Dropped from `NodeUIExtensions`, every node renderer, the config form, fixtures, and the schema; `hiddenPorts` retired with it.
|
|
101
|
+
|
|
102
|
+
### Added
|
|
103
|
+
|
|
104
|
+
- **Combined `FormPorts` widget.** A single "Ports" group in the config panel renders one row per port with reorder (up/down) and an expose/hide toggle, replacing the separate Port Order panel and the interim exposed-ports widget. Edits write the minimal `config.ports` value and collapse back to `undefined` on the default order with no exposure override.
|
|
105
|
+
- **`NodePort.displayOrder` + automatic reserved-port ordering.** A cosmetic default sort weight (ascending; ties on declaration order). Reserved ports — the `error` output and `trigger`/`tool` control ports — sink to the bottom of their direction automatically via `RESERVED_PORT_DISPLAY_ORDER`, with no value required from authors; an explicit `displayOrder` overrides. New `byDefaultOrder`, `orderPortsFor`, `isPortExposed`, and `isReservedPort` utilities.
|
|
106
|
+
|
|
107
|
+
### Fixed
|
|
108
|
+
|
|
109
|
+
- **OpenAPI `NodeMetadata` aligned with the `node_type_id` rename.** Follow-up to beta.5: the spec's `NodeMetadata` now references `node_type_id` consistently (the bundled spec shipped in the package was regenerated).
|
|
110
|
+
|
|
111
|
+
### Docs
|
|
112
|
+
|
|
113
|
+
- **`maxRetries` added to the reserved config-property table.**
|
|
114
|
+
|
|
115
|
+
## [2.0.0-beta.5] - 2026-06-20
|
|
116
|
+
|
|
117
|
+
Fifth 2.0 beta, published under the npm `beta` dist-tag (`npm install @flowdrop/flowdrop@beta`). `latest` remains 1.15.0 until 2.0.0 GA. This release is a node-identity cleanup: node components now derive their instance id from the canonical `id` prop SvelteFlow already passes, dropping the duplicate `data.nodeId` copy and its load-time healing, and the node-_type_ entity id is renamed `metadata.id` → `metadata.node_type_id` to disambiguate it from the instance id. Six node components were also moved off the type-erasing `$props<T>()` onto a typed `interface Props`, which surfaced and fixed latent config-access errors in `ToolNode`.
|
|
118
|
+
|
|
119
|
+
### Breaking Changes
|
|
120
|
+
|
|
121
|
+
- **Node-type entity id renamed `metadata.id` → `metadata.node_type_id`.** The node-type entity id collided conceptually with the node _instance_ id; it is now `metadata.node_type_id` to disambiguate the two. It is a server-owned wire field, so the library preserves the snake_case name as a non-opinionated passthrough — adapters, the command type-map, connection validation, and the dynamic-schema paths were all updated to match. Consumers reading `metadata.id` for the node type must read `metadata.node_type_id`. **Backend impact:** the `GET /nodes` response and `metadata` blocks in persisted workflows must now use `node_type_id`; the OpenAPI spec (`NodeMetadata`) and the bundled spec shipped in the package were updated accordingly.
|
|
122
|
+
- **Dropped the duplicate `data.nodeId` field.** Node components now derive their id from the canonical `id` prop that SvelteFlow already passes to every node, instead of a copy stored in `data.nodeId`. Handle ids, config-open callbacks, and status overlays read `id` directly. The field and its load-time "healing" are gone, so an intact graph can no longer look corrupted from a missing copy. `WorkflowNode.data.nodeId` was also removed from the OpenAPI spec.
|
|
123
|
+
|
|
124
|
+
### Changed (internal — no API change)
|
|
125
|
+
|
|
126
|
+
- **Six node components typed properly.** The node components that used `$props<T>()` — which returns `any` and silently disabled type-checking — now declare an `interface Props` with `let props: Props = $props()`. This surfaced and fixed latent config-access errors in `ToolNode`.
|
|
127
|
+
|
|
128
|
+
## [2.0.0-beta.4] - 2026-06-13
|
|
129
|
+
|
|
130
|
+
Fourth 2.0 beta, published under the npm `beta` dist-tag (`npm install @flowdrop/flowdrop@beta`). `latest` remains 1.15.0 until 2.0.0 GA. This release is mostly an internal design-system consolidation pass — new shared `Button` / `IconButton` / `Input` / `Select` / `Textarea` primitives route every control through the `base.css` class system as the single source of truth, so themes (including Drafter) style fields and buttons consistently. User-visible changes are a navbar `end` snippet for embedding custom trailing controls, a new `--fd-control-radius` theming token, a range-slider fill fix, and opaque Drafter buttons. The archived Astro docs site is retired in favor of the Mintlify docs at `flowdrop.mintlify.app`.
|
|
131
|
+
|
|
132
|
+
### Added
|
|
133
|
+
|
|
134
|
+
- **`end` snippet on the navbar.** A new `end` snippet prop renders custom trailing content in the navbar (before the settings gear), letting consuming apps inject their own controls — e.g. a theme toggle — without forking the navbar.
|
|
135
|
+
- **`--fd-control-radius` theming token.** Form controls (inputs, selects, textareas, the array action buttons, fieldset/checkbox-group/config-form borders) now read their corner radius from `--fd-control-radius`, so themes can tighten field corners independently of cards and panels. Drafter sets it to `2px` for its crisp blueprint look; other themes inherit the existing radius.
|
|
136
|
+
|
|
137
|
+
### Fixed
|
|
138
|
+
|
|
139
|
+
- **Range slider fill now tracks the thumb center.** The colored fill measured 0–100% of the raw track width while the browser keeps the thumb inside the track, so the fill and thumb drifted apart — worst at the extremes and visible on load. The fill now mirrors the thumb's actual travel (`thumb/2` to `100% − thumb/2`) via a new `--fd-range-fill` calc, with the thumb size tokenized.
|
|
140
|
+
- **Drafter buttons are opaque and flat.** Several buttons in the Drafter skin (file-upload node config, canvas toggles) rendered with translucent backgrounds and read as see-through; they are now flat and opaque.
|
|
141
|
+
|
|
142
|
+
### Changed (internal — no API change)
|
|
143
|
+
|
|
144
|
+
- **Shared form-control and button primitives.** New typed `Button`, `IconButton`, `Input`, `Select`, and `Textarea` wrappers sit over the existing `.flowdrop-btn*` / `.flowdrop-input*` / `.flowdrop-btn--icon*` classes in `base.css`, making it the single source for control look (`:disabled` is the only muted state). `ThemeToggle`, the config form, sidebar search, the node swap picker, `FormArray` move/delete buttons, `InputCollector`, and the playground inputs were migrated onto them, dropping their hand-rolled, duplicated CSS. The primitives are internal (not exported), so their APIs aren't frozen before GA; public component prop APIs (e.g. `ThemeToggle`) are unchanged.
|
|
145
|
+
- **`EditorStatusBar` extracted onto the shared button system.** The endpoint-error banner — previously inline in `App.svelte` with its own button CSS and a centered `80rem` layout — is now an `EditorStatusBar` component that routes actions through the `Button` primitive, spans the editor chrome flush, and uses a proper `CloseIcon` for dismissal. Added Storybook stories for `Button` and `EditorStatusBar`.
|
|
146
|
+
- **Navbar control heights from one token.** Three hardcoded `height: 2.5rem` rules now use `var(--fd-size-btn-min)`, sharing a single source of truth with `.flowdrop-btn`.
|
|
147
|
+
- **Extracted shared logic flagged by the duplication review.** `connections.ts` gains a shared `detectCycles()` (used by both `hasCycles` / `hasInvalidCycles`); `svelte-app.ts` extracts a `configureInstance()` shared by `mountFlowDropApp` / `mountWorkflowEditor`; and `FormField` / `FormFieldLight` share a `resolveBaseFieldType()` for the basic-type switch (with a unit test pinning resolution order) while keeping the deliberate full/light rendering split for the bundle-guard contract. No behavioral change.
|
|
148
|
+
|
|
149
|
+
### Docs
|
|
150
|
+
|
|
151
|
+
- **Retired the archived Astro/Starlight docs site (`apps/docs`)** and its docker-publish workflow; the Mintlify site at `flowdrop.mintlify.app` is canonical. All live documentation links (README, AGENTS, quick-start, i18n guide, API README, dev playground navbar, docker-playground landing, interrupt-feature doc) were repointed there. `apps/api-docs` is kept only to back the `api:lint` / `api:bundle` tooling and CI. Corrected the local dev-server port reference to the recommended Express demo.
|
|
152
|
+
|
|
153
|
+
## [2.0.0-beta.3] - 2026-06-12
|
|
154
|
+
|
|
155
|
+
Third 2.0 beta, published under the npm `beta` dist-tag (`npm install @flowdrop/flowdrop@beta`). `latest` remains 1.15.0 until 2.0.0 GA. This release finishes the navbar/theme defaults pass started in beta.2 (navbar opt-in everywhere, light as the default theme, the FlowDrop wordmark in the header), adds the **Drafter** blueprint theme with per-theme canvas grids, and lands a keyboard-navigation and focus-ring overhaul alongside the 20px node-grid alignment.
|
|
156
|
+
|
|
157
|
+
### Breaking Changes
|
|
158
|
+
|
|
159
|
+
- **`mountPlaygroundApp` / `<PlaygroundApp>` no longer render the navbar by default.** `showNavbar` now defaults to `false`, matching `mountFlowDropApp` / `<App>` — so every mount path is navbar-off by default and embedding FlowDrop into a page that already has its own header never double-stacks a header. Pass `showNavbar: true` to opt back into the FlowDrop navbar (logo, branding, settings modal) when FlowDrop owns the whole page.
|
|
160
|
+
|
|
161
|
+
### Added
|
|
162
|
+
|
|
163
|
+
- **Drafter blueprint theme.** A third built-in editor theme (`'drafter'`), shipping light + dark variants: a blueprint aesthetic with a soft mint canvas, a subtle emerald line grid, and translucent green-tinted flat nodes. Data-type port colors and category icon colors are left untouched so they keep popping against the muted draft surface. Selectable from the Settings → UI Theme picker; the `FlowDropSkinName` / theme / skin name unions gain `'drafter'`.
|
|
164
|
+
- **Per-theme canvas grid.** A new `FlowDropGridVariant` type (`'dots' | 'lines' | 'cross'`) and `themeConfig.canvas.grid` config let any theme drive the editor's background grid (previously hardcoded to dots). The grid pattern color is the `--fd-grid-pattern-color` token, whose default matches xyflow's dot color, so the default/minimal themes render unchanged. `resolveTheme` now merges `config.canvas` alongside `config.sidebar`.
|
|
165
|
+
- **`features.builtinEditors` opt-out.** The built-in markdown/code/template editors are batteries-included in the full editor by default. Pass `features: { builtinEditors: false }` to `mountFlowDropApp` (or `builtinEditors: false` to `mountWorkflowEditor` / `<WorkflowEditor>`) to skip registering them — keeping the textarea fallback or leaving room to register your own field components via `instance.fields.register(...)`. The corrected fallback hint now points at the registry-scoped API (`registerMarkdownEditorField(instance.fields)`).
|
|
166
|
+
- **FlowDrop wordmark logo in the navbar.** The header now renders the FlowDrop wordmark in place of the plain text title.
|
|
167
|
+
|
|
168
|
+
### Changed
|
|
169
|
+
|
|
170
|
+
- **The default theme preference is now `'light'` (was `'dark'`).** `DEFAULT_THEME_SETTINGS.preference` was hardcoded to `'dark'`, so any embed with no persisted theme choice rendered dark. Embeds now default to light; hosts that want dark by default should set the preference explicitly.
|
|
171
|
+
- **Editor / node / chrome surface tokens are scoped per surface,** refining how themes (including Drafter) tint the canvas, nodes, and surrounding chrome independently.
|
|
172
|
+
|
|
173
|
+
### Fixed
|
|
174
|
+
|
|
175
|
+
- **Nodes are a single tab stop again.** The node config (gear) button sat in the tab order, so leaving a node required a second `Tab` press. The gear button is removed from the tab order (it stays mouse/Enter-activatable), and node focus defers to xyflow's own node focus — Tab now moves one node per press. `nodesFocusable` redundancy was removed to eliminate the duplicate stop.
|
|
176
|
+
- **The full editor renders markdown/code/config editors out of the box again.** The beta.2 light-entry split made the heavy form editors opt-in everywhere, which inadvertently left `<WorkflowEditor>` / `<App>` / the playground showing the "Editor component not registered" textarea fallback for node config fields with `format: 'markdown' | 'code' | 'template'`. The full editor now registers the built-in editors on its own instance's field registry on mount. Registration uses a dynamic `import()`, so the chunks stay code-split (loaded lazily) and the light `/editor` static bundle is unaffected — the bundle guard still passes. The standalone `@flowdrop/flowdrop/form` primitive is unchanged and remains opt-in.
|
|
177
|
+
- **`<App navbarActions>` accepts the full `NavbarAction` shape.** The component prop was typed with an inline subset that silently dropped `external` and `group`, even though the underlying `<Navbar>` (and the `mountFlowDropApp` option) already supported them. It now uses the canonical `NavbarAction` type, so external-link and grouped actions type-check through the component as they always did through the mount API.
|
|
178
|
+
- **The node header no longer shows a top-accent line.**
|
|
179
|
+
|
|
180
|
+
### Changed (internal — no API change)
|
|
181
|
+
|
|
182
|
+
- **One centralized focus ring across the whole component library.** New `--fd-ring-width` / `--fd-ring-offset` tokens and a single `.flowdrop-root :focus-visible` rule in `base.css` replace ~200 lines of component-local focus CSS (mismatched outlines, hardcoded `rgba(59,130,246)` box-shadow glows, `color-mix` rings) removed across 41 files. CodeMirror editors in `overflow:hidden` containers use a `:focus-within` ring (outline paints outside the box and would clip); range-input thumbs ring on the parent.
|
|
183
|
+
- **Extracted shared `NodeConfigButton` and `CanvasIconButton` components,** replacing per-node config-button and per-canvas floating-button duplication (including an inline-SVG cog) with one keyboard-correct implementation each.
|
|
184
|
+
- **Node geometry converted from `rem` to `px` and snapped to a 20px grid** across all eight node types — header, port rows (fixed 60px), icon sizes, paddings, gaps, and font sizes — so nodes stay aligned to the canvas coordinate grid regardless of the host's root font-size.
|
|
185
|
+
- **The code / markdown / template editors now rest on the shared input surface** instead of carrying their own background.
|
|
186
|
+
|
|
187
|
+
## [2.0.0-beta.2] - 2026-06-09
|
|
188
|
+
|
|
189
|
+
Second 2.0 beta, published under the npm `beta` dist-tag (`npm install @flowdrop/flowdrop@beta`). This release tightens the 2.0 package boundaries, finishes `AuthProvider` propagation across the editor and playground runtime surfaces, and adds a regression guard for light-entry bundle size.
|
|
190
|
+
|
|
191
|
+
### Breaking Changes
|
|
192
|
+
|
|
193
|
+
- **Heavy dependencies no longer leak into the light entries.** Three exports moved so that `@flowdrop/flowdrop/core` and the light `@flowdrop/flowdrop/form` never statically pull CodeMirror, `marked`, DOMPurify, or `@xyflow/svelte` (enforced by a new CI bundle guard, see below):
|
|
194
|
+
- `sanitizeHtml` moved from `@flowdrop/flowdrop/core` to `@flowdrop/flowdrop/display` (it is DOMPurify-backed; `/core` is the zero-heavy-dep entry).
|
|
195
|
+
- `FormFieldFull` moved from `@flowdrop/flowdrop/form` to `@flowdrop/flowdrop/form/full` — it statically bundles every editor (CodeMirror), so keeping it in the light `/form` entry pulled CodeMirror into every `SchemaForm` import. The `FormField` exported from `/form` remains the registry-based light factory.
|
|
196
|
+
- Service singleton _instances_ (`playgroundService`, `interruptService` from `/playground`; `nodeExecutionService` from `/editor`; `agentSpecExecutionService` from `/core`) are no longer exported — they were constructed eagerly at import time, pulling the service and its dependencies into the entry's static graph. The classes (`PlaygroundService`, `InterruptService`, `NodeExecutionService`, `AgentSpecExecutionService`) remain; call `getInstance()` for the shared instance. See [MIGRATION-2.0.md section 4](./MIGRATION-2.0.md#keeping-heavy-dependencies-out-of-the-light-entries).
|
|
197
|
+
|
|
198
|
+
### Changed (internal — no API change)
|
|
199
|
+
|
|
200
|
+
- `SchemaForm`, `ConfigForm`, and the UISchema renderer now use the registry-based light `FormFieldLight` internally, so importing `SchemaForm` no longer statically pulls CodeMirror (heavy editors stay opt-in via `/form/code` and `/form/markdown`).
|
|
201
|
+
- Built-in node **type metadata** (aliases, `resolveBuiltinAlias`, `isBuiltinType`) split into a component-free `registry/builtinNodeTypes` module so `/core`'s node-type utilities no longer drag in the node components (and transitively `marked`/DOMPurify).
|
|
202
|
+
- `utils/edgeStyling` and the `ConnectionLineType` reference in `types/index.ts` use type-only imports of `@xyflow/svelte`, removing the runtime `@xyflow/svelte` dependency from the headless command DSL reachable from `/core`.
|
|
203
|
+
|
|
204
|
+
### Added
|
|
205
|
+
|
|
206
|
+
- **Bundle-size guard (`pnpm run check:bundle`)** and a CI workflow that walk each published entry's static import graph and fail if a heavy dependency (CodeMirror, `@xyflow/svelte`, `marked`, DOMPurify) becomes statically reachable from a light entry (`/core`, `/form`, `/editor`). Dynamic `import()` — how `/form/code` lazy-loads CodeMirror — is intentionally ignored.
|
|
207
|
+
- **500-node editor render benchmark.** The e2e performance suite now includes a large trigger-chain workflow fixture so regressions in large-canvas rendering show up before release.
|
|
208
|
+
|
|
209
|
+
### Fixed
|
|
210
|
+
|
|
211
|
+
- **`AuthProvider` now reaches all documented runtime surfaces.** Playground, chat, interrupt, settings, editor, and pipeline requests now consistently route through the configured provider, including standalone playground mounts and the editor/pipeline views that previously dropped auth headers on secondary requests.
|
|
212
|
+
- **Theme skin tokens clear when switching back to the default skin.** Returning from a custom/base skin to the default theme no longer leaves stale CSS custom properties behind.
|
|
213
|
+
|
|
214
|
+
### Changed
|
|
215
|
+
|
|
216
|
+
- **`AuthProvider` request handling is centralized.** Services now share the `fetchWithAuth` path, and the public provider interface is slimmer while preserving bearer, API-key, custom-header, and callback authentication behavior.
|
|
217
|
+
|
|
8
218
|
## [2.0.0-beta.1] - 2026-06-07
|
|
9
219
|
|
|
10
220
|
Pre-release of 2.0.0, published under the npm `beta` dist-tag (`npm install @flowdrop/flowdrop@beta`). `latest` remains 1.15.0 until 2.0.0 GA. See [MIGRATION-2.0.md](./MIGRATION-2.0.md) for the upgrade guide.
|
package/MIGRATION-2.0.md
CHANGED
|
@@ -80,6 +80,52 @@ authProvider)` for you. Services that previously read the singleton (playground,
|
|
|
80
80
|
interrupt, chat, node-execution, dynamic-schema, variable) now take the endpoint
|
|
81
81
|
config as their first argument — pass `fd.api.config`.
|
|
82
82
|
|
|
83
|
+
These services also accept the instance's `AuthProvider` as an **optional
|
|
84
|
+
trailing argument** so every request they make is authenticated consistently
|
|
85
|
+
with `fd.api.client` (the typed workflow/node API). The built-in components and
|
|
86
|
+
mount helpers pass `fd.api.authProvider` for you — no action is needed for the
|
|
87
|
+
normal mounted flow. Only direct callers of the service singletons need to
|
|
88
|
+
forward it:
|
|
89
|
+
|
|
90
|
+
```js
|
|
91
|
+
import { playgroundService } from '@flowdrop/flowdrop/playground';
|
|
92
|
+
|
|
93
|
+
// 2.0 — authenticate playground requests by forwarding the provider
|
|
94
|
+
await playgroundService.listSessions(fd.api.config, workflowId, undefined, fd.api.authProvider);
|
|
95
|
+
await playgroundService.sendMessage(fd.api.config, sessionId, text, undefined, fd.api.authProvider);
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The settings-sync entry points gained the same optional provider:
|
|
99
|
+
`setSettingsEndpointConfig(config, authProvider?)` and
|
|
100
|
+
`createSettingsService(config, authProvider?)` — pass an `AuthProvider` if your
|
|
101
|
+
backend's preferences endpoint requires auth.
|
|
102
|
+
|
|
103
|
+
The standalone playground mounts — `mountPlayground`, `mountPlaygroundStudio`,
|
|
104
|
+
and `mountPlaygroundApp` — accept an `authProvider` option that they wire into
|
|
105
|
+
`fd.api` for you (the editor's built-in playground already inherits the
|
|
106
|
+
provider from `mountFlowDropApp`). Pass it so playground requests (sessions,
|
|
107
|
+
messages, polling, interrupts) carry your auth/CSRF headers:
|
|
108
|
+
|
|
109
|
+
```js
|
|
110
|
+
mountPlayground(el, {
|
|
111
|
+
workflowId,
|
|
112
|
+
endpointConfig: createEndpointConfig('/api/flowdrop'),
|
|
113
|
+
authProvider: new CallbackAuthProvider({ getToken: () => session.getCsrfToken() })
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
The same plumbing was extended to the editor and pipeline surfaces, which
|
|
118
|
+
previously built unauthenticated API clients from `endpointConfig` alone:
|
|
119
|
+
|
|
120
|
+
- The exported `<WorkflowEditor>` component accepts an `authProvider` prop
|
|
121
|
+
(threaded for you by `mountFlowDropApp` / `mountWorkflowEditor` / `<App>`).
|
|
122
|
+
Pass it when using `<WorkflowEditor>` directly.
|
|
123
|
+
- `<PipelineStatus>` accepts an `authProvider` prop (used when it builds its own
|
|
124
|
+
client from `endpointConfig` / `baseUrl`; ignored when you pass `apiClient`).
|
|
125
|
+
- `PipelineViewProps` — the contract for custom pipeline views registered via
|
|
126
|
+
`pipelineViews` — gained an optional `authProvider`, so custom views can build
|
|
127
|
+
authenticated clients the same way the built-in graph/kanban/table views do.
|
|
128
|
+
|
|
83
129
|
### `EndpointConfig.auth` is removed — use an `AuthProvider`
|
|
84
130
|
|
|
85
131
|
The `auth` block on `EndpointConfig` (and its header-injection branch) is gone.
|
|
@@ -108,6 +154,65 @@ mountFlowDropApp(el, {
|
|
|
108
154
|
| `{ type: 'api_key', apiKey }` | `new StaticAuthProvider({ type: 'api_key', apiKey })` |
|
|
109
155
|
| `{ type: 'custom', headers }` | `new StaticAuthProvider({ type: 'custom', headers })` |
|
|
110
156
|
|
|
157
|
+
`StaticAuthProvider`'s `api_key` type now accepts an optional `apiKeyHeader` to
|
|
158
|
+
override the header name (defaults to `X-API-Key`):
|
|
159
|
+
|
|
160
|
+
```js
|
|
161
|
+
new StaticAuthProvider({ type: 'api_key', apiKey: KEY, apiKeyHeader: 'X-Tenant-Key' });
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### `AuthProvider.isAuthenticated()` is removed
|
|
165
|
+
|
|
166
|
+
The `isAuthenticated()` method has been dropped from the `AuthProvider`
|
|
167
|
+
interface and all built-in providers. It was never consulted by the library —
|
|
168
|
+
request authentication is driven entirely by `getAuthHeaders()` and the optional
|
|
169
|
+
`onUnauthorized()` / `onForbidden()` hooks. If you implemented a **custom**
|
|
170
|
+
`AuthProvider`, you can delete the method; no replacement is needed.
|
|
171
|
+
|
|
172
|
+
```ts
|
|
173
|
+
// 1.x — required
|
|
174
|
+
const provider: AuthProvider = {
|
|
175
|
+
getAuthHeaders: async () => ({ Authorization: `Bearer ${token}` }),
|
|
176
|
+
isAuthenticated: () => Boolean(token) // ← remove this
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// 2.0
|
|
180
|
+
const provider: AuthProvider = {
|
|
181
|
+
getAuthHeaders: async () => ({ Authorization: `Bearer ${token}` })
|
|
182
|
+
};
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Auth refresh (`401`) now applies to every request
|
|
186
|
+
|
|
187
|
+
Previously only the typed workflow/node API (`fd.api.client`) refreshed and
|
|
188
|
+
retried on `401`. The per-instance services (playground, chat, interrupt,
|
|
189
|
+
settings, port config, categories) and form autocomplete attached auth headers
|
|
190
|
+
but did **not** invoke `onUnauthorized()`. They now all route through one
|
|
191
|
+
authenticated-fetch path, so a configured `onUnauthorized()` fires — and the
|
|
192
|
+
request retries once with a refreshed token — uniformly across the library.
|
|
193
|
+
|
|
194
|
+
This is not a source change for consumers, but if your `onUnauthorized()` had
|
|
195
|
+
side effects (analytics, redirects) it may now be called from request paths
|
|
196
|
+
where it previously was not. Make it idempotent.
|
|
197
|
+
|
|
198
|
+
### Swap the auth provider at runtime — `fd.api.setAuthProvider()`
|
|
199
|
+
|
|
200
|
+
The `AuthProvider` is still supplied at mount time, but you no longer have to
|
|
201
|
+
remount to change it (e.g. on login/logout). `ApiContext` gained
|
|
202
|
+
`setAuthProvider()`, which updates the live client and is picked up by services
|
|
203
|
+
on their next request:
|
|
204
|
+
|
|
205
|
+
```js
|
|
206
|
+
import { getInstance } from '@flowdrop/flowdrop/editor';
|
|
207
|
+
const fd = getInstance();
|
|
208
|
+
|
|
209
|
+
// after the user logs in / refreshes their session
|
|
210
|
+
fd.api.setAuthProvider(new StaticAuthProvider({ type: 'bearer', token: newToken }));
|
|
211
|
+
|
|
212
|
+
// on logout
|
|
213
|
+
fd.api.setAuthProvider(new NoAuthProvider());
|
|
214
|
+
```
|
|
215
|
+
|
|
111
216
|
### Instance-scoped port compatibility
|
|
112
217
|
|
|
113
218
|
`initializePortCompatibility()`, `getPortCompatibilityChecker()`, and
|
|
@@ -190,6 +295,19 @@ import { getInstance } from '@flowdrop/flowdrop/editor';
|
|
|
190
295
|
registerCodeEditorField(getInstance().fields);
|
|
191
296
|
```
|
|
192
297
|
|
|
298
|
+
**You only need this for the standalone `@flowdrop/flowdrop/form` primitive.**
|
|
299
|
+
The full editor is batteries-included: `<WorkflowEditor>` / `<App>` and the
|
|
300
|
+
playground register the built-in markdown, code, and template editors on their
|
|
301
|
+
own instance's `fields` registry on mount, so node config fields with
|
|
302
|
+
`format: 'markdown' | 'code' | 'template'` render real editors out of the box —
|
|
303
|
+
no host call required. Registration is a dynamic `import()`, so the CodeMirror /
|
|
304
|
+
`marked` chunks stay code-split (the light `/editor` static bundle is
|
|
305
|
+
unaffected) and load lazily on first use. To strip them, pass
|
|
306
|
+
`features: { builtinEditors: false }` to `mountFlowDropApp` (or
|
|
307
|
+
`builtinEditors: false` to `mountWorkflowEditor` / `<WorkflowEditor>`) and either
|
|
308
|
+
accept the textarea fallback or register your own field components via
|
|
309
|
+
`instance.fields.register(...)`.
|
|
310
|
+
|
|
193
311
|
Category color/icon helpers likewise take a `CategoriesStore` as an explicit
|
|
194
312
|
parameter — the last global-instance fallback in `utils` is gone.
|
|
195
313
|
|
|
@@ -206,16 +324,16 @@ barrel no longer re-exports `marked`.
|
|
|
206
324
|
|
|
207
325
|
- **Playground exports** (`Playground`, `PlaygroundModal`, `ChatPanel`,
|
|
208
326
|
`SessionManager`, `InputCollector`, `ExecutionLogs`, `MessageBubble`,
|
|
209
|
-
`PlaygroundService`, `
|
|
327
|
+
`PlaygroundService`, `PlaygroundStore`) are removed from
|
|
210
328
|
`@flowdrop/flowdrop/editor`. Import them from `@flowdrop/flowdrop/playground`
|
|
211
329
|
instead.
|
|
212
330
|
|
|
213
331
|
```js
|
|
214
332
|
// 1.x
|
|
215
|
-
import { Playground,
|
|
333
|
+
import { Playground, PlaygroundStore } from '@flowdrop/flowdrop/editor';
|
|
216
334
|
|
|
217
335
|
// 2.0
|
|
218
|
-
import { Playground,
|
|
336
|
+
import { Playground, PlaygroundStore } from '@flowdrop/flowdrop/playground';
|
|
219
337
|
```
|
|
220
338
|
|
|
221
339
|
- **`marked`** is no longer re-exported from `@flowdrop/flowdrop/display`. If you
|
|
@@ -284,6 +402,58 @@ This also tightens tree-shaking: importing `App` and a couple of types from the
|
|
|
284
402
|
main entry no longer pulls the form, display, playground, and settings barrels
|
|
285
403
|
into your bundle.
|
|
286
404
|
|
|
405
|
+
### Keeping heavy dependencies out of the light entries
|
|
406
|
+
|
|
407
|
+
A few more exports moved so that the lightweight entries (`/core`, the light
|
|
408
|
+
`/form`) never statically pull a heavy dependency (CodeMirror, `marked`,
|
|
409
|
+
DOMPurify, `@xyflow/svelte`). These are enforced by a bundle guard in CI, so
|
|
410
|
+
they cannot silently regress.
|
|
411
|
+
|
|
412
|
+
- **`sanitizeHtml` moved from `@flowdrop/flowdrop/core` to
|
|
413
|
+
`@flowdrop/flowdrop/display`.** It is DOMPurify-backed, and `/core` is the
|
|
414
|
+
"zero heavy dependencies" entry, so it now lives alongside `MarkdownDisplay`.
|
|
415
|
+
|
|
416
|
+
```js
|
|
417
|
+
// before
|
|
418
|
+
import { sanitizeHtml } from '@flowdrop/flowdrop/core';
|
|
419
|
+
// 2.0
|
|
420
|
+
import { sanitizeHtml } from '@flowdrop/flowdrop/display';
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
- **`FormFieldFull` moved from `@flowdrop/flowdrop/form` to
|
|
424
|
+
`@flowdrop/flowdrop/form/full`.** `FormFieldFull` statically bundles every
|
|
425
|
+
editor (including CodeMirror); keeping it in the light `/form` entry pulled
|
|
426
|
+
CodeMirror into every `SchemaForm` import. The default `FormField` exported
|
|
427
|
+
from `/form` is the registry-based light field factory — register heavy
|
|
428
|
+
editors via `/form/code` / `/form/markdown` (unchanged). Use `/form/full`
|
|
429
|
+
only if you specifically want every editor statically bundled.
|
|
430
|
+
|
|
431
|
+
```js
|
|
432
|
+
// before
|
|
433
|
+
import { FormFieldFull } from '@flowdrop/flowdrop/form';
|
|
434
|
+
// 2.0
|
|
435
|
+
import { FormFieldFull } from '@flowdrop/flowdrop/form/full';
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
- **Service singleton _instances_ are no longer exported.**
|
|
439
|
+
`playgroundService` and `interruptService` (`@flowdrop/flowdrop/playground`),
|
|
440
|
+
`nodeExecutionService` (`@flowdrop/flowdrop/editor`), and
|
|
441
|
+
`agentSpecExecutionService` (`@flowdrop/flowdrop/core`) are removed. They were
|
|
442
|
+
module-level instances constructed at import time, which forced the service
|
|
443
|
+
(and its dependencies) to be built the moment the entry was imported. The
|
|
444
|
+
**classes** remain exported (`PlaygroundService`, `InterruptService`,
|
|
445
|
+
`NodeExecutionService`, `AgentSpecExecutionService`). Most apps never touched
|
|
446
|
+
these directly (use `fd.playground` / `fd.interrupts`); if you did, call
|
|
447
|
+
`getInstance()` to obtain the shared instance:
|
|
448
|
+
|
|
449
|
+
```js
|
|
450
|
+
// before
|
|
451
|
+
import { playgroundService } from '@flowdrop/flowdrop/playground';
|
|
452
|
+
// 2.0
|
|
453
|
+
import { PlaygroundService } from '@flowdrop/flowdrop/playground';
|
|
454
|
+
const playgroundService = PlaygroundService.getInstance();
|
|
455
|
+
```
|
|
456
|
+
|
|
287
457
|
## 5. Workflow `metadata` is required and `version` → `schemaVersion`
|
|
288
458
|
|
|
289
459
|
The workflow document's `metadata` object is now **required** on the `Workflow`
|
package/README.md
CHANGED
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
</p>
|
|
24
24
|
|
|
25
25
|
<p align="center">
|
|
26
|
-
<a href="https://
|
|
26
|
+
<a href="https://flowdrop.mintlify.app/docs/quickstart">Quickstart</a> •
|
|
27
27
|
<a href="#features">Features</a> •
|
|
28
28
|
<a href="#integration">Integration</a> •
|
|
29
|
-
<a href="https://
|
|
29
|
+
<a href="https://flowdrop.mintlify.app">Docs</a>
|
|
30
30
|
</p>
|
|
31
31
|
|
|
32
32
|
<p align="center">
|
|
@@ -139,7 +139,7 @@ Every user-facing string flows through a typed `Messages` tree. Pass a callback
|
|
|
139
139
|
<App messages={() => ({ form: { schema: { save: 'Apply' } } })} />
|
|
140
140
|
```
|
|
141
141
|
|
|
142
|
-
Wire the callback to your i18n library (paraglide-js, sveltekit-i18n, etc.) — locale changes propagate automatically. See the [i18n & Custom Messages guide](https://
|
|
142
|
+
Wire the callback to your i18n library (paraglide-js, sveltekit-i18n, etc.) — locale changes propagate automatically. See the [i18n & Custom Messages guide](https://flowdrop.mintlify.app/guides/i18n) for the full shape and a paraglide-js worked example.
|
|
143
143
|
|
|
144
144
|
## Sub-Module Exports
|
|
145
145
|
|
|
@@ -283,8 +283,8 @@ Runtime configuration means you build once and deploy to staging, production, or
|
|
|
283
283
|
|
|
284
284
|
| Resource | Description |
|
|
285
285
|
| -------------------------------------------------------------------------------------------- | ------------------------ |
|
|
286
|
-
| [QUICK_START.md](https://
|
|
287
|
-
| [API Documentation](https://
|
|
286
|
+
| [QUICK_START.md](https://flowdrop.mintlify.app/docs/quickstart) | Get running in 5 minutes |
|
|
287
|
+
| [API Documentation](https://flowdrop.mintlify.app/api-reference/introduction) | REST API specification |
|
|
288
288
|
| [CHANGELOG.md](https://github.com/flowdrop-io/flowdrop/blob/main/libs/flowdrop/CHANGELOG.md) | Version history |
|
|
289
289
|
|
|
290
290
|
## Development
|
|
@@ -46,7 +46,7 @@ export class WorkflowAdapter {
|
|
|
46
46
|
* Add a node to a workflow
|
|
47
47
|
*/
|
|
48
48
|
addNode(workflow, nodeType, position, config) {
|
|
49
|
-
const metadata = this.nodeTypes.find((nt) => nt.
|
|
49
|
+
const metadata = this.nodeTypes.find((nt) => nt.node_type_id === nodeType);
|
|
50
50
|
if (!metadata) {
|
|
51
51
|
throw new Error(`Node type '${nodeType}' not found`);
|
|
52
52
|
}
|
|
@@ -248,7 +248,7 @@ export class WorkflowAdapter {
|
|
|
248
248
|
description: svelteFlowWorkflow.description,
|
|
249
249
|
nodes: svelteFlowWorkflow.nodes.map((node) => ({
|
|
250
250
|
id: node.id,
|
|
251
|
-
type: node.data.metadata.
|
|
251
|
+
type: node.data.metadata.node_type_id,
|
|
252
252
|
position: node.position,
|
|
253
253
|
data: {
|
|
254
254
|
label: node.data.label,
|
|
@@ -282,8 +282,7 @@ export class WorkflowAdapter {
|
|
|
282
282
|
data: {
|
|
283
283
|
label: node.data.label,
|
|
284
284
|
config: node.data.config,
|
|
285
|
-
metadata: node.data.metadata
|
|
286
|
-
nodeId: node.id
|
|
285
|
+
metadata: node.data.metadata
|
|
287
286
|
}
|
|
288
287
|
})),
|
|
289
288
|
edges: workflow.edges.map((edge) => ({
|
|
@@ -326,7 +325,7 @@ export class WorkflowAdapter {
|
|
|
326
325
|
const nodeTypeCounts = new Map();
|
|
327
326
|
cloned.nodes.forEach((node) => {
|
|
328
327
|
const oldId = node.id;
|
|
329
|
-
const nodeTypeId = node.data.metadata.
|
|
328
|
+
const nodeTypeId = node.data.metadata.node_type_id;
|
|
330
329
|
// Get the current count for this node type
|
|
331
330
|
const currentCount = nodeTypeCounts.get(nodeTypeId) || 0;
|
|
332
331
|
const newCount = currentCount + 1;
|
|
@@ -266,7 +266,7 @@ export class AgentSpecAdapter {
|
|
|
266
266
|
metadata: {
|
|
267
267
|
'flowdrop:position': node.position,
|
|
268
268
|
'flowdrop:node_id': node.id,
|
|
269
|
-
'flowdrop:node_type_id': node.data.metadata.
|
|
269
|
+
'flowdrop:node_type_id': node.data.metadata.node_type_id
|
|
270
270
|
}
|
|
271
271
|
};
|
|
272
272
|
// Add type-specific attributes from config
|
|
@@ -362,7 +362,7 @@ export class AgentSpecAdapter {
|
|
|
362
362
|
return ext;
|
|
363
363
|
}
|
|
364
364
|
// Infer from FlowDrop node type ID
|
|
365
|
-
const fromId = extractComponentType(node.data.metadata.
|
|
365
|
+
const fromId = extractComponentType(node.data.metadata.node_type_id);
|
|
366
366
|
if (fromId)
|
|
367
367
|
return fromId;
|
|
368
368
|
// Infer from FlowDrop visual type + category
|
|
@@ -404,7 +404,7 @@ export class AgentSpecAdapter {
|
|
|
404
404
|
const nodeTypeId = asNode.metadata?.['flowdrop:node_type_id'] ||
|
|
405
405
|
`${AGENTSPEC_NAMESPACE}.${asNode.component_type}`;
|
|
406
406
|
const metadata = {
|
|
407
|
-
|
|
407
|
+
node_type_id: nodeTypeId,
|
|
408
408
|
name: defaults.defaultName,
|
|
409
409
|
type: defaults.visualType,
|
|
410
410
|
description: asNode.description || defaults.defaultDescription,
|