@flowdrop/flowdrop 2.11.0 → 2.12.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 (455) hide show
  1. package/CHANGELOG.md +223 -0
  2. package/dist/adapters/agentspec/autoLayout.d.ts +18 -36
  3. package/dist/adapters/agentspec/autoLayout.js +75 -93
  4. package/dist/chat/activity.d.ts +49 -0
  5. package/dist/chat/activity.js +65 -0
  6. package/dist/chat/commandClassifier.js +2 -1
  7. package/dist/commands/executor.js +186 -27
  8. package/dist/commands/index.d.ts +2 -1
  9. package/dist/commands/index.js +2 -0
  10. package/dist/commands/parser.js +43 -3
  11. package/dist/commands/session.d.ts +60 -0
  12. package/dist/commands/session.js +332 -0
  13. package/dist/commands/storeIntegration.svelte.js +18 -1
  14. package/dist/commands/types.d.ts +77 -4
  15. package/dist/components/App.svelte +966 -226
  16. package/dist/components/App.svelte.d.ts +26 -2
  17. package/dist/components/BindablePortListbox.svelte +68 -369
  18. package/dist/components/Button.svelte +17 -14
  19. package/dist/components/Button.svelte.d.ts +2 -2
  20. package/dist/components/CanvasContextMenu.svelte +31 -10
  21. package/dist/components/CanvasController.svelte +146 -3
  22. package/dist/components/CanvasController.svelte.d.ts +25 -33
  23. package/dist/components/CanvasIconButton.svelte +6 -6
  24. package/dist/components/CanvasToolbar.svelte +103 -0
  25. package/dist/components/CanvasToolbar.svelte.d.ts +23 -0
  26. package/dist/components/CanvasZoomControls.svelte +122 -0
  27. package/dist/components/CanvasZoomControls.svelte.d.ts +15 -0
  28. package/dist/components/ConfigForm.svelte +159 -121
  29. package/dist/components/ConfigModal.svelte +11 -54
  30. package/dist/components/ConfigPanel.svelte +98 -228
  31. package/dist/components/ConfigPanel.svelte.d.ts +2 -2
  32. package/dist/components/ConnectPortPicker.svelte +153 -0
  33. package/dist/components/ConnectPortPicker.svelte.d.ts +22 -0
  34. package/dist/components/DoctorMenu.svelte +422 -0
  35. package/dist/components/DoctorMenu.svelte.d.ts +7 -0
  36. package/dist/components/ExternalLinkRow.svelte +82 -0
  37. package/dist/components/ExternalLinkRow.svelte.d.ts +14 -0
  38. package/dist/components/FlowDropEdge.svelte +52 -2
  39. package/dist/components/FlowDropEdge.svelte.d.ts +5 -1
  40. package/dist/components/InterfaceNameInput.svelte +103 -0
  41. package/dist/components/InterfaceNameInput.svelte.d.ts +13 -0
  42. package/dist/components/InterfaceTag.svelte +215 -0
  43. package/dist/components/InterfaceTag.svelte.d.ts +20 -0
  44. package/dist/components/InterfaceTagAnchor.svelte +103 -0
  45. package/dist/components/InterfaceTagAnchor.svelte.d.ts +12 -0
  46. package/dist/components/InterfaceTagLayer.svelte +314 -0
  47. package/dist/components/InterfaceTagLayer.svelte.d.ts +28 -0
  48. package/dist/components/LogsSidebar.svelte +43 -43
  49. package/dist/components/LoopbackLanes.svelte +54 -0
  50. package/dist/components/LoopbackLanes.svelte.d.ts +8 -0
  51. package/dist/components/Navbar.svelte +539 -169
  52. package/dist/components/Navbar.svelte.d.ts +20 -1
  53. package/dist/components/NodeInspector.svelte +153 -0
  54. package/dist/components/NodeInspector.svelte.d.ts +19 -0
  55. package/dist/components/NodeLastRun.svelte +212 -0
  56. package/dist/components/NodeLastRun.svelte.d.ts +13 -0
  57. package/dist/components/NodeSidebar.svelte +279 -23
  58. package/dist/components/NodeSidebar.svelte.d.ts +11 -0
  59. package/dist/components/NodeStatusOverlay.svelte +144 -353
  60. package/dist/components/NodeStatusOverlay.svelte.d.ts +4 -1
  61. package/dist/components/PortMappingRow.svelte +28 -44
  62. package/dist/components/PortPickerListbox.svelte +475 -0
  63. package/dist/components/PortPickerListbox.svelte.d.ts +73 -0
  64. package/dist/components/ReadOnlyDetails.svelte +52 -89
  65. package/dist/components/RunBar.svelte +222 -0
  66. package/dist/components/RunBar.svelte.d.ts +20 -0
  67. package/dist/components/RunsMenu.svelte +649 -0
  68. package/dist/components/RunsMenu.svelte.d.ts +14 -0
  69. package/dist/components/SettingsModal.svelte +27 -59
  70. package/dist/components/SettingsPanel.svelte +515 -241
  71. package/dist/components/StraightGuides.svelte +46 -0
  72. package/dist/components/StraightGuides.svelte.d.ts +7 -0
  73. package/dist/components/ThemeToggle.svelte +14 -4
  74. package/dist/components/UniversalNode.svelte +152 -51
  75. package/dist/components/WebMCPBridgeMenu.svelte +336 -0
  76. package/dist/components/WebMCPBridgeMenu.svelte.d.ts +3 -0
  77. package/dist/components/WorkflowEditor.svelte +789 -136
  78. package/dist/components/WorkflowEditor.svelte.d.ts +43 -1
  79. package/dist/components/WorkflowInterfaceEditor.svelte +63 -92
  80. package/dist/components/WorkflowInterfaceEntryCard.svelte +478 -549
  81. package/dist/components/WorkflowInterfaceEntryComposer.svelte +23 -67
  82. package/dist/components/WorkflowPlaygroundSettings.svelte +48 -85
  83. package/dist/components/WorkflowSettingsPanel.svelte +311 -0
  84. package/dist/components/WorkflowSettingsPanel.svelte.d.ts +20 -0
  85. package/dist/components/ZoomTier.svelte +56 -0
  86. package/dist/components/ZoomTier.svelte.d.ts +4 -0
  87. package/dist/components/chat/AIChatPanel.svelte +463 -312
  88. package/dist/components/chat/ActivityList.svelte +130 -0
  89. package/dist/components/chat/ActivityList.svelte.d.ts +11 -0
  90. package/dist/components/chat/ActivityRow.svelte +179 -0
  91. package/dist/components/chat/ActivityRow.svelte.d.ts +16 -0
  92. package/dist/components/chat/CommandPreview.svelte +42 -64
  93. package/dist/components/console/CommandConsole.svelte +106 -41
  94. package/dist/components/console/CommandConsole.svelte.d.ts +2 -0
  95. package/dist/components/console/ConsoleAutocomplete.svelte +14 -13
  96. package/dist/components/console/ConsoleInput.svelte +60 -27
  97. package/dist/components/console/ConsoleOutput.svelte +86 -24
  98. package/dist/components/console/ConsoleStrip.svelte +80 -0
  99. package/dist/components/console/ConsoleStrip.svelte.d.ts +13 -0
  100. package/dist/components/form/FieldFactory.svelte +30 -4
  101. package/dist/components/form/FormArray.svelte +306 -339
  102. package/dist/components/form/FormArray.svelte.d.ts +10 -0
  103. package/dist/components/form/FormArrayRows.svelte +443 -0
  104. package/dist/components/form/FormArrayRows.svelte.d.ts +18 -0
  105. package/dist/components/form/FormAutocomplete.svelte +2 -2
  106. package/dist/components/form/FormCheckboxGroup.svelte +10 -85
  107. package/dist/components/form/FormCodeEditor.svelte +3 -3
  108. package/dist/components/form/FormFieldWrapper.svelte +98 -18
  109. package/dist/components/form/FormFieldWrapper.svelte.d.ts +10 -0
  110. package/dist/components/form/FormFieldset.svelte +44 -28
  111. package/dist/components/form/FormMarkdownEditor.svelte +6 -6
  112. package/dist/components/form/FormPorts.svelte +437 -141
  113. package/dist/components/form/FormSelect.svelte +1 -1
  114. package/dist/components/form/FormTemplateEditor.svelte +22 -26
  115. package/dist/components/form/FormToggle.svelte +15 -106
  116. package/dist/components/form/FormToggle.svelte.d.ts +3 -2
  117. package/dist/components/form/FormUISchemaRenderer.svelte +38 -3
  118. package/dist/components/form/humanizeKey.d.ts +7 -0
  119. package/dist/components/form/humanizeKey.js +21 -0
  120. package/dist/components/form/types.d.ts +6 -0
  121. package/dist/components/icons/MenuOpenIcon.svelte +8 -1
  122. package/dist/components/interrupt/ChoicePrompt.svelte +51 -152
  123. package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +0 -2
  124. package/dist/components/interrupt/ConfirmationPrompt.svelte +18 -201
  125. package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +0 -4
  126. package/dist/components/interrupt/FormPrompt.svelte +22 -147
  127. package/dist/components/interrupt/FormPrompt.svelte.d.ts +0 -4
  128. package/dist/components/interrupt/InterruptBubble.svelte +198 -355
  129. package/dist/components/interrupt/InterruptBubble.svelte.d.ts +0 -2
  130. package/dist/components/interrupt/ReviewPrompt.svelte +0 -10
  131. package/dist/components/interrupt/TextInputPrompt.svelte +23 -120
  132. package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +0 -2
  133. package/dist/components/layouts/MainLayout.svelte +110 -75
  134. package/dist/components/layouts/MainLayout.svelte.d.ts +17 -0
  135. package/dist/components/nodes/CaptionNode.svelte +7 -0
  136. package/dist/components/nodes/GatewayNode.svelte +66 -431
  137. package/dist/components/nodes/IdeaNode.svelte +6 -5
  138. package/dist/components/nodes/NodeCard.svelte +1051 -0
  139. package/dist/components/nodes/NodeCard.svelte.d.ts +30 -0
  140. package/dist/components/nodes/NodeConfigButton.svelte +28 -9
  141. package/dist/components/nodes/NodeProblemMark.svelte +113 -0
  142. package/dist/components/nodes/NodeProblemMark.svelte.d.ts +8 -0
  143. package/dist/components/nodes/NodeTip.svelte +104 -0
  144. package/dist/components/nodes/NodeTip.svelte.d.ts +15 -0
  145. package/dist/components/nodes/NotesNode.svelte +183 -150
  146. package/dist/components/nodes/SimpleNode.svelte +176 -44
  147. package/dist/components/nodes/SquareNode.svelte +127 -34
  148. package/dist/components/nodes/TerminalNode.svelte +232 -88
  149. package/dist/components/nodes/ToolNode.svelte +49 -381
  150. package/dist/components/nodes/WorkflowNode.svelte +40 -399
  151. package/dist/components/playground/ChatBubble.svelte +248 -62
  152. package/dist/components/playground/ChatInput.svelte +134 -297
  153. package/dist/components/playground/ChatInput.svelte.d.ts +17 -0
  154. package/dist/components/playground/ControlPanel.svelte +290 -190
  155. package/dist/components/playground/ControlPanel.svelte.d.ts +10 -2
  156. package/dist/components/playground/DockedPlayground.svelte +75 -0
  157. package/dist/components/playground/DockedPlayground.svelte.d.ts +24 -0
  158. package/dist/components/playground/ExecutionConsole.svelte +54 -36
  159. package/dist/components/playground/ExecutionConsole.svelte.d.ts +12 -0
  160. package/dist/components/playground/ExecutionLogs.svelte +4 -0
  161. package/dist/components/playground/HeaderMenu.svelte +170 -0
  162. package/dist/components/playground/HeaderMenu.svelte.d.ts +22 -0
  163. package/dist/components/playground/InputCollector.svelte +8 -32
  164. package/dist/components/playground/InputFields.svelte +246 -0
  165. package/dist/components/playground/InputFields.svelte.d.ts +16 -0
  166. package/dist/components/playground/InterfaceInputForm.svelte +285 -30
  167. package/dist/components/playground/InterfaceInputForm.svelte.d.ts +20 -0
  168. package/dist/components/playground/InterfaceJsonInput.svelte +92 -0
  169. package/dist/components/playground/InterfaceJsonInput.svelte.d.ts +10 -0
  170. package/dist/components/playground/LogRow.svelte +12 -12
  171. package/dist/components/playground/MessageMarkdown.svelte +11 -11
  172. package/dist/components/playground/MessageStream.svelte +154 -182
  173. package/dist/components/playground/Playground.svelte +17 -1139
  174. package/dist/components/playground/PlaygroundApp.svelte +12 -2
  175. package/dist/components/playground/PlaygroundApp.svelte.d.ts +2 -1
  176. package/dist/components/playground/PlaygroundHeader.svelte +309 -0
  177. package/dist/components/playground/PlaygroundHeader.svelte.d.ts +22 -0
  178. package/dist/components/playground/PlaygroundModal.svelte +6 -0
  179. package/dist/components/playground/PlaygroundStudio.svelte +30 -32
  180. package/dist/components/playground/PlaygroundSurface.svelte +648 -0
  181. package/dist/components/playground/PlaygroundSurface.svelte.d.ts +79 -0
  182. package/dist/components/playground/StepsSummary.svelte +312 -0
  183. package/dist/components/playground/StepsSummary.svelte.d.ts +11 -0
  184. package/dist/components/playground/messageDisplay.d.ts +9 -0
  185. package/dist/components/playground/messageDisplay.js +24 -2
  186. package/dist/components/playground/stepSummary.d.ts +71 -0
  187. package/dist/components/playground/stepSummary.js +152 -0
  188. package/dist/components/ports/PortTypeBadge.svelte +13 -1
  189. package/dist/components/primitives/Button.svelte +226 -0
  190. package/dist/components/primitives/Button.svelte.d.ts +31 -0
  191. package/dist/components/primitives/Card.svelte +110 -0
  192. package/dist/components/primitives/Card.svelte.d.ts +20 -0
  193. package/dist/components/primitives/Checkbox.svelte +126 -0
  194. package/dist/components/primitives/Checkbox.svelte.d.ts +15 -0
  195. package/dist/components/primitives/Chip.svelte +143 -0
  196. package/dist/components/primitives/Chip.svelte.d.ts +22 -0
  197. package/dist/components/primitives/Combobox.svelte +444 -0
  198. package/dist/components/primitives/Combobox.svelte.d.ts +22 -0
  199. package/dist/components/primitives/Composer.svelte +293 -0
  200. package/dist/components/primitives/Composer.svelte.d.ts +47 -0
  201. package/dist/components/primitives/EmptyState.svelte +113 -0
  202. package/dist/components/primitives/EmptyState.svelte.d.ts +18 -0
  203. package/dist/components/primitives/Field.svelte +178 -0
  204. package/dist/components/primitives/Field.svelte.d.ts +30 -0
  205. package/dist/components/primitives/IconButton.svelte +156 -0
  206. package/dist/components/primitives/IconButton.svelte.d.ts +27 -0
  207. package/dist/components/primitives/Menu.svelte +435 -0
  208. package/dist/components/primitives/Menu.svelte.d.ts +61 -0
  209. package/dist/components/primitives/Notice.svelte +161 -0
  210. package/dist/components/primitives/Notice.svelte.d.ts +22 -0
  211. package/dist/components/primitives/PanelHeader.svelte +134 -0
  212. package/dist/components/primitives/PanelHeader.svelte.d.ts +23 -0
  213. package/dist/components/primitives/Segmented.svelte +198 -0
  214. package/dist/components/primitives/Segmented.svelte.d.ts +32 -0
  215. package/dist/components/primitives/Select.svelte +130 -0
  216. package/dist/components/primitives/Select.svelte.d.ts +26 -0
  217. package/dist/components/primitives/StatusPill.svelte +218 -0
  218. package/dist/components/primitives/StatusPill.svelte.d.ts +24 -0
  219. package/dist/components/primitives/Switch.svelte +113 -0
  220. package/dist/components/primitives/Switch.svelte.d.ts +14 -0
  221. package/dist/components/primitives/Tabs.svelte +209 -0
  222. package/dist/components/primitives/Tabs.svelte.d.ts +32 -0
  223. package/dist/components/primitives/Toolbar.svelte +94 -0
  224. package/dist/components/primitives/Toolbar.svelte.d.ts +14 -0
  225. package/dist/components/primitives/ToolbarSeparator.svelte +40 -0
  226. package/dist/components/primitives/ToolbarSeparator.svelte.d.ts +7 -0
  227. package/dist/components/surfaces/SurfaceOverlay.svelte +10 -40
  228. package/dist/components/surfaces/TabbedSurface.svelte +49 -39
  229. package/dist/components/surfaces/TabbedSurface.svelte.d.ts +8 -0
  230. package/dist/components/toast/DismissibleToast.svelte +94 -32
  231. package/dist/components/toast/DismissibleToast.svelte.d.ts +17 -7
  232. package/dist/config/endpoints.d.ts +43 -1
  233. package/dist/config/endpoints.js +21 -3
  234. package/dist/core/index.d.ts +8 -5
  235. package/dist/core/index.js +1 -1
  236. package/dist/editor/connectCandidates.d.ts +56 -0
  237. package/dist/editor/connectCandidates.js +131 -0
  238. package/dist/editor/contextMenu.d.ts +31 -2
  239. package/dist/editor/contextMenu.js +96 -9
  240. package/dist/editor/index.d.ts +3 -1
  241. package/dist/editor/index.js +1 -0
  242. package/dist/editor/interfaceMenu.d.ts +35 -0
  243. package/dist/editor/interfaceMenu.js +47 -0
  244. package/dist/editor/portMenu.d.ts +23 -0
  245. package/dist/editor/portMenu.js +34 -0
  246. package/dist/editor/tidy.d.ts +30 -0
  247. package/dist/editor/tidy.js +66 -0
  248. package/dist/helpers/workflowEditorHelper.d.ts +3 -0
  249. package/dist/helpers/workflowEditorHelper.js +8 -3
  250. package/dist/layout/fromWorkflow.d.ts +42 -0
  251. package/dist/layout/fromWorkflow.js +135 -0
  252. package/dist/layout/geometry.d.ts +102 -0
  253. package/dist/layout/geometry.js +317 -0
  254. package/dist/layout/index.d.ts +21 -0
  255. package/dist/layout/index.js +14 -0
  256. package/dist/layout/inspect.d.ts +18 -0
  257. package/dist/layout/inspect.js +81 -0
  258. package/dist/layout/lanePath.d.ts +23 -0
  259. package/dist/layout/lanePath.js +47 -0
  260. package/dist/layout/measure.d.ts +141 -0
  261. package/dist/layout/measure.js +477 -0
  262. package/dist/layout/primitives.d.ts +124 -0
  263. package/dist/layout/primitives.js +461 -0
  264. package/dist/layout/sweep.d.ts +59 -0
  265. package/dist/layout/sweep.js +257 -0
  266. package/dist/layout/toWorkflow.d.ts +43 -0
  267. package/dist/layout/toWorkflow.js +131 -0
  268. package/dist/layout/types.d.ts +93 -0
  269. package/dist/layout/types.js +35 -0
  270. package/dist/messages/defaults.d.ts +641 -26
  271. package/dist/messages/defaults.js +578 -25
  272. package/dist/messages/types.d.ts +21 -1
  273. package/dist/openapi/v1/openapi.yaml +109 -0
  274. package/dist/playground/index.d.ts +28 -1
  275. package/dist/playground/index.js +29 -0
  276. package/dist/playground/mount.d.ts +28 -2
  277. package/dist/playground/mount.js +41 -15
  278. package/dist/playground/runAction.d.ts +29 -0
  279. package/dist/playground/runAction.js +38 -0
  280. package/dist/services/doctorService.d.ts +52 -0
  281. package/dist/services/doctorService.js +113 -0
  282. package/dist/services/globalSave.js +12 -29
  283. package/dist/services/nodeExecutionService.d.ts +12 -1
  284. package/dist/services/nodeExecutionService.js +58 -58
  285. package/dist/services/playgroundService.d.ts +17 -2
  286. package/dist/services/playgroundService.js +48 -5
  287. package/dist/services/runsService.d.ts +42 -0
  288. package/dist/services/runsService.js +87 -0
  289. package/dist/services/toastQueue.d.ts +33 -0
  290. package/dist/services/toastQueue.js +38 -0
  291. package/dist/services/toastService.d.ts +30 -9
  292. package/dist/services/toastService.js +81 -46
  293. package/dist/settings/index.d.ts +1 -0
  294. package/dist/skins/graphite.d.ts +26 -0
  295. package/dist/skins/graphite.js +473 -0
  296. package/dist/skins/index.d.ts +2 -1
  297. package/dist/skins/index.js +4 -2
  298. package/dist/skins/slate.js +4 -4
  299. package/dist/stores/attachedRunStore.svelte.d.ts +35 -0
  300. package/dist/stores/attachedRunStore.svelte.js +47 -0
  301. package/dist/stores/connectDragStore.svelte.d.ts +39 -0
  302. package/dist/stores/connectDragStore.svelte.js +42 -0
  303. package/dist/stores/doctorStore.svelte.d.ts +79 -0
  304. package/dist/stores/doctorStore.svelte.js +244 -0
  305. package/dist/stores/editedNodesStore.svelte.d.ts +42 -0
  306. package/dist/stores/editedNodesStore.svelte.js +84 -0
  307. package/dist/stores/editorModeStore.svelte.d.ts +34 -0
  308. package/dist/stores/editorModeStore.svelte.js +55 -0
  309. package/dist/stores/instanceContainer.svelte.d.ts +53 -0
  310. package/dist/stores/instanceContainer.svelte.js +38 -1
  311. package/dist/stores/loopbackLanesStore.svelte.d.ts +18 -0
  312. package/dist/stores/loopbackLanesStore.svelte.js +25 -0
  313. package/dist/stores/nodeHighlightStore.svelte.d.ts +34 -0
  314. package/dist/stores/nodeHighlightStore.svelte.js +56 -0
  315. package/dist/stores/playgroundStore.svelte.d.ts +66 -2
  316. package/dist/stores/playgroundStore.svelte.js +164 -2
  317. package/dist/stores/runController.svelte.d.ts +382 -0
  318. package/dist/stores/runController.svelte.js +1217 -0
  319. package/dist/stores/settingsStore.svelte.d.ts +80 -18
  320. package/dist/stores/settingsStore.svelte.js +180 -62
  321. package/dist/stores/workflowStore.svelte.d.ts +14 -0
  322. package/dist/stores/workflowStore.svelte.js +22 -1
  323. package/dist/styles/base.css +286 -25
  324. package/dist/styles/fonts/Inter-LICENSE.txt +93 -0
  325. package/dist/styles/fonts/inter-latin-wght-normal.woff2 +0 -0
  326. package/dist/styles/fonts/inter.css +19 -0
  327. package/dist/styles/toast.css +100 -20
  328. package/dist/styles/tokenAliases.js +118 -1
  329. package/dist/styles/tokens.css +586 -14
  330. package/dist/svelte-app.d.ts +38 -5
  331. package/dist/svelte-app.js +14 -3
  332. package/dist/themes/graphite.d.ts +2 -0
  333. package/dist/themes/graphite.js +15 -0
  334. package/dist/themes/index.d.ts +2 -1
  335. package/dist/themes/index.js +22 -3
  336. package/dist/themes/minimal.js +10 -0
  337. package/dist/themes/scopedSkinCss.d.ts +22 -5
  338. package/dist/themes/scopedSkinCss.js +136 -11
  339. package/dist/types/chat.d.ts +6 -0
  340. package/dist/types/doctor.d.ts +82 -0
  341. package/dist/types/doctor.js +11 -0
  342. package/dist/types/events.d.ts +35 -0
  343. package/dist/types/events.js +4 -1
  344. package/dist/types/index.d.ts +17 -2
  345. package/dist/types/navbar.d.ts +36 -0
  346. package/dist/types/playground.d.ts +66 -0
  347. package/dist/types/settings.d.ts +120 -7
  348. package/dist/types/settings.js +35 -3
  349. package/dist/types/skin.d.ts +21 -8
  350. package/dist/types/theme.d.ts +40 -2
  351. package/dist/utils/appearance.d.ts +19 -0
  352. package/dist/utils/appearance.js +13 -0
  353. package/dist/utils/canvasFit.d.ts +41 -0
  354. package/dist/utils/canvasFit.js +44 -0
  355. package/dist/utils/chipTitles.d.ts +9 -0
  356. package/dist/utils/chipTitles.js +19 -0
  357. package/dist/utils/connections.js +8 -0
  358. package/dist/utils/consoleHighlight.d.ts +28 -0
  359. package/dist/utils/consoleHighlight.js +269 -0
  360. package/dist/utils/deprecation.d.ts +17 -0
  361. package/dist/utils/deprecation.js +29 -0
  362. package/dist/utils/doctorOperations.d.ts +40 -0
  363. package/dist/utils/doctorOperations.js +237 -0
  364. package/dist/utils/duration.d.ts +13 -0
  365. package/dist/utils/duration.js +40 -0
  366. package/dist/utils/inspectorContext.d.ts +19 -0
  367. package/dist/utils/inspectorContext.js +12 -0
  368. package/dist/utils/inspectorSections.d.ts +20 -0
  369. package/dist/utils/inspectorSections.js +44 -0
  370. package/dist/utils/inspectorSurface.d.ts +46 -0
  371. package/dist/utils/inspectorSurface.js +51 -0
  372. package/dist/utils/interfaceTags.d.ts +102 -0
  373. package/dist/utils/interfaceTags.js +211 -0
  374. package/dist/utils/itemRef.d.ts +86 -0
  375. package/dist/utils/itemRef.js +106 -0
  376. package/dist/utils/lastRun.d.ts +35 -0
  377. package/dist/utils/lastRun.js +73 -0
  378. package/dist/utils/messageNodeLink.d.ts +17 -0
  379. package/dist/utils/messageNodeLink.js +16 -0
  380. package/dist/utils/minimapVisibility.d.ts +28 -0
  381. package/dist/utils/minimapVisibility.js +34 -0
  382. package/dist/utils/nodeAriaLabel.d.ts +12 -0
  383. package/dist/utils/nodeAriaLabel.js +17 -0
  384. package/dist/utils/nodeFingerprint.d.ts +27 -0
  385. package/dist/utils/nodeFingerprint.js +66 -0
  386. package/dist/utils/nodeFormSchema.d.ts +10 -0
  387. package/dist/utils/nodeFormSchema.js +2 -2
  388. package/dist/utils/nodeGeometry.d.ts +168 -0
  389. package/dist/utils/nodeGeometry.js +204 -0
  390. package/dist/utils/nodeProblem.d.ts +19 -0
  391. package/dist/utils/nodeProblem.js +9 -0
  392. package/dist/utils/nodeStatus.d.ts +38 -3
  393. package/dist/utils/nodeStatus.js +67 -39
  394. package/dist/utils/nodeSwap.js +9 -1
  395. package/dist/utils/nodeWrapper.d.ts +1 -0
  396. package/dist/utils/playgroundHistory.d.ts +48 -0
  397. package/dist/utils/playgroundHistory.js +38 -0
  398. package/dist/utils/playgroundInputRuns.d.ts +26 -0
  399. package/dist/utils/playgroundInputRuns.js +50 -0
  400. package/dist/utils/portExposure.d.ts +49 -0
  401. package/dist/utils/portExposure.js +122 -0
  402. package/dist/utils/portUtils.d.ts +16 -0
  403. package/dist/utils/portUtils.js +37 -0
  404. package/dist/utils/portal.d.ts +0 -19
  405. package/dist/utils/portal.js +8 -1
  406. package/dist/utils/reservedPorts.d.ts +59 -0
  407. package/dist/utils/reservedPorts.js +60 -0
  408. package/dist/utils/runEdges.d.ts +24 -0
  409. package/dist/utils/runEdges.js +35 -0
  410. package/dist/utils/runsList.d.ts +69 -0
  411. package/dist/utils/runsList.js +134 -0
  412. package/dist/utils/selectOptions.d.ts +62 -0
  413. package/dist/utils/selectOptions.js +137 -0
  414. package/dist/utils/sessionRuns.d.ts +62 -0
  415. package/dist/utils/sessionRuns.js +123 -0
  416. package/dist/utils/sheetWidths.d.ts +29 -0
  417. package/dist/utils/sheetWidths.js +41 -0
  418. package/dist/utils/sidebarWidths.d.ts +34 -0
  419. package/dist/utils/sidebarWidths.js +47 -0
  420. package/dist/utils/straightWires.d.ts +73 -0
  421. package/dist/utils/straightWires.js +99 -0
  422. package/dist/utils/themeScope.svelte.d.ts +10 -0
  423. package/dist/utils/themeScope.svelte.js +80 -0
  424. package/dist/utils/wiredHandles.d.ts +10 -0
  425. package/dist/utils/wiredHandles.js +14 -0
  426. package/dist/utils/workflowDraft.d.ts +9 -0
  427. package/dist/utils/workflowDraft.js +39 -0
  428. package/dist/utils/workflowInterface.d.ts +40 -7
  429. package/dist/utils/workflowInterface.js +66 -16
  430. package/dist/utils/zoomTier.d.ts +43 -0
  431. package/dist/utils/zoomTier.js +107 -0
  432. package/dist/utils/zoomTierRows.d.ts +41 -0
  433. package/dist/utils/zoomTierRows.js +103 -0
  434. package/dist/webmcp/WebMCPConfirm.svelte +1 -1
  435. package/dist/webmcp/bridge.d.ts +5 -0
  436. package/dist/webmcp/bridge.js +8 -0
  437. package/dist/webmcp/bridgeController.svelte.d.ts +84 -0
  438. package/dist/webmcp/bridgeController.svelte.js +224 -0
  439. package/dist/webmcp/descriptors.d.ts +1 -1
  440. package/dist/webmcp/descriptors.js +66 -5
  441. package/dist/webmcp/fakeWidget.d.ts +34 -0
  442. package/dist/webmcp/fakeWidget.js +75 -0
  443. package/dist/webmcp/gate.js +4 -0
  444. package/dist/webmcp/index.d.ts +2 -0
  445. package/dist/webmcp/index.js +1 -0
  446. package/dist/webmcp/runtime.js +4 -1
  447. package/dist/webmcp/types.d.ts +2 -0
  448. package/dist/webmcp/validate.js +5 -1
  449. package/package.json +8 -2
  450. package/dist/components/Select.svelte +0 -53
  451. package/dist/components/Select.svelte.d.ts +0 -15
  452. package/dist/components/icons/CommandLineIcon.svelte +0 -15
  453. package/dist/components/icons/CommandLineIcon.svelte.d.ts +0 -26
  454. package/dist/components/toast/WarningIcon.svelte +0 -28
  455. package/dist/components/toast/WarningIcon.svelte.d.ts +0 -26
package/CHANGELOG.md CHANGED
@@ -5,6 +5,229 @@ 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
+ ## [2.12.0] - 2026-10-14
9
+
10
+ ### Added
11
+
12
+ - **Test mode.** An **Edit | Test** switch in a toolbar at the canvas's top-left. Test docks the Playground in
13
+ the left slot (below 1200 px a drawer over the canvas), targets the editor's current workflow including its
14
+ unsaved edits, and creates the test session on the first send. The session and a running run survive
15
+ switching back to Edit. With nothing selected there is no right column; clicking a node opens its inspector
16
+ as a 360 px sheet over the canvas, on a **Last run** tab (status, duration, timestamps, tokens, input,
17
+ output, error). `N` opens the node library as a popover, `T` toggles the mode.
18
+ - The mode is held per instance: `fd.editorMode` (`EditorModeStore`: `current`, `isTest`,
19
+ `set('edit' | 'test')`, `toggle()`, `onChange(listener)`; type `EditorMode` from `core`). Start in Test with
20
+ the `editorMode` prop of `App` or the `editorMode` mount option, follow changes with `onEditorModeChange`.
21
+ Test only takes effect for a saved workflow on an editable canvas (`mode: 'edit'`, no `pipelineId`);
22
+ `features.testMode: false` removes the switch. `WorkflowEditor` takes `editorMode`, `onEditorModeChange`,
23
+ `showRunBar` and `onOpenTest`.
24
+ - The docked Playground's header is a **history chip** (Conversations the Playground created, plus **New
25
+ conversation**, and the Runs of the open one; picking a run calls `fd.playground.pinExecution`) and a **⋯
26
+ menu** (**Expand steps by default**, **JSON view**, **Playground settings**, **Refresh**, **Reset stuck
27
+ session**).
28
+ - **Save & send**: Send (and Run) read "Save & send" while the workflow has unsaved edits; the editor saves
29
+ first and nothing is sent when the save fails. `fd.runs.needsSave` and `fd.runs.saveFirst()`.
30
+ - A **"Saved: new version" divider** marks where the workflow changed between runs. Needs
31
+ `GET /sessions/{id}/runs` (FlowDrop for Drupal 2.7.0; in the OpenAPI spec, optional endpoint
32
+ `sessions.runs`, `PlaygroundService.getSessionRuns()`): a server without it answers 404 and the editor shows
33
+ no dividers and no error. `fd.playground.sessionRuns`, `fd.runs.loadSessionRuns()`; `isRunStale()` and
34
+ `versionDividersFromRuns()` from `playground`. Sessions carry `thirdPartySettings`; the Playground's own are
35
+ marked `flowdrop_playground.created` (`PLAYGROUND_SESSION_MARK`, `isPlaygroundSession()`,
36
+ `playgroundSessionsOf()`), and the history lists only those.
37
+ - A **Runs list** in the toolbar (`features.runsList`, default on; Test mode only) lists the workflow's past
38
+ runs from `endpoints.pipelines.list`; opening one shows its node statuses on the canvas. Optional
39
+ endpoints `pipelines.rerun` and `pipelines.cancel` add Re-run and Cancel; `features.adminLinks`
40
+ (`{ runs?, run? }` URL templates) adds "Open in admin" links.
41
+ - **Message-to-node links**: a reply's "via <node>" label selects the node, opens its Last run tab and brings
42
+ it into view, and hovering lights the node on the canvas (`fd.highlight`). `NodeJobExecution` gains `input`
43
+ and `output`; `canvasFocusNode(id)` on `WorkflowEditor`.
44
+ - A **form-first Playground**: a workflow with inputs and no chat opens on an **Inputs** card (one field per
45
+ input, JSON fields for array and object inputs with example chips, **Run** also on ⌘↵ / Ctrl+↵, **Fill from
46
+ last run**); chat plus inputs folds the inputs into one row above the composer.
47
+ - **Run state per instance.** `fd.runs` (`RunController`, from `playground`; types from `core`) holds the
48
+ session and run executors that used to live inside the Playground component, shared by the Playground, Test
49
+ mode and the Console. `fd.runs.activeRun` (`ActiveRun`), `stopRun()`, `dismissRun()`, `isLive`,
50
+ `requestNodeStatuses()`, `loadNodeStatuses(pipelineId?, workflow?)`, and `wrapHostHooks(hooks)`, which routes
51
+ a host's `onRun` / `onRunStatus` through the controller (the hooks answer as before; a host run is followed
52
+ only when `onRunStatus` is supplied). `fd.runs.stopHostPolling()` ends a host run's status poll; `app.destroy()`
53
+ and `fd.runs.dispose()` call it. `fd.playground.onSessionStatusChange(listener)` is a synchronous listener
54
+ (unlike `subscribeToSessionStatus`, which batches). `stripExecutionInfo(nodes)` from `core`.
55
+ - **Run status on the canvas.** Run status of the nodes lives in `fd.playground.nodeStatuses`
56
+ (`nodeStatusFor(id)`, `setNodeStatuses`, `clearNodeStatuses`), so an edit no longer wipes the badges and two
57
+ editors on one page never share statuses. Nodes show a labelled pill (Running, Completed, Waiting for you,
58
+ Failed, Skipped, with ×N for repeats), centred on the node's top edge at screen size; in Test mode the node
59
+ border takes the status colour and a node whose configuration changed since the shown run gets an `edited`
60
+ mark. Edges between a completed node and a reached node draw as hot (class `flowdrop-edge--hot`; never
61
+ written into saved edges). A run pill in the toolbar shows the live run (running, waiting, failed, done,
62
+ stopped) with **Stop**, **Open** (needs `onOpenTest`) and **Ask the Assistant**, and fades when the run
63
+ ends; changes are announced politely.
64
+ - **Console `session` commands**: `session send "…"` (triple-quoted for several lines), `session run
65
+ [key=value …]`, `session stop`, `session new`, `session status`. Console only: not part of the editing
66
+ commands, the Assistant or WebMCP. A batch containing a `session` line is refused before anything runs.
67
+ - **Run context for the Assistant.** A run can be attached to the AI Assistant (a run chip, **+ Attach a
68
+ run**, **Ask the Assistant** on a failed node or run); the tool-calling chat request then carries
69
+ `attachedRunId` (`ChatRequest.attachedRunId`; a server without run tools ignores it). `fd.attachedRun`
70
+ (`attach(id, hint?)`, `detach()`, per instance). Needs fddo 2.7.0 (`site_get_run`, `site_get_node_run`).
71
+ - **Problems indicator.** With the optional endpoints `workflows.diagnose` and `workflows.remedy` set, the
72
+ navbar lists the draft's problems, nodes carry a badge, and a remedy applies as one undoable edit. A backend
73
+ without them shows nothing.
74
+ - **Graphite theme** (`theme: 'graphite'`, light and dark), the new default (see Changed): near-black primary
75
+ action, one blue accent for selection, focus and running, separate green / amber / red for run status, 4 px
76
+ radius, 1 px rules; every text pair passes WCAG AA. Its font is Inter, shipped as the opt-in stylesheet
77
+ `@flowdrop/flowdrop/styles/fonts/inter.css` (variable, Latin, 47 KB, OFL); without it the editor uses the
78
+ system font. Graphite carries a redesigned node card (header, category tile, port rows on a fixed grid, exec
79
+ pin), calmer notes (20 px height snap), top-centre toasts, a terminal-style Console and flat form rows; the
80
+ card structure, notes and toasts apply to every theme.
81
+ - **`colorScheme` mount option** (`ColorSchemeOption`, `HostColorSchemeValue`; `mountFlowDropApp` and
82
+ `mountPlaygroundApp`): `colorScheme: { host: { value: 'light' | 'dark' | 'auto', label, subscribe? } }` adds a
83
+ fourth choice, `'host'` (`ThemePreference` gains it), shown verbatim as `label` in the navbar's Appearance menu
84
+ and Settings. With it `'host'` is the default; a stored preference the user never chose moves to it, an
85
+ explicit Light or Dark is kept. `host.subscribe` re-resolves on live changes and is released by
86
+ `app.destroy()`. Without the option nothing changes.
87
+ - **`branding`** option on `mountFlowDropApp`, `mountPlaygroundApp` and `App`:
88
+ `{ logo?: string | Component; name?: string; logoAlt?: string; href?: string }` (type `NavbarBranding`). `logo`
89
+ replaces the wordmark (image URL or component, max 24 px high), `name` replaces "FlowDrop" in the page title
90
+ and the logo's label, `logoAlt` overrides the alt text, `href` links the logo. The default wordmark is
91
+ labelled with the `navigation.appName` message, which also drives the page title.
92
+ - `FlowDropThemeConfig.display` (`nodeIcon`, `sidebarList`, `sidebarSearch`, `sidebarHeader`, `navbarActions`;
93
+ type `FlowDropDisplayConfig`): typed layout switches, used by the `minimal` theme. A skin can name a `font`
94
+ (a CSS font-family; the host loads the face).
95
+ - New `@public` design tokens: run-status roles `--fd-status-{running,completed,waiting,failed,skipped}` and
96
+ `-soft`, control heights `--fd-control-sm` / `-md` / `-lg` (24 / 28 / 32 px) and `--fd-panel-header` (40 px).
97
+ - **Zoom tiers.** The canvas draws a node at up to four levels of detail by zoom (full, outline, glyph, map),
98
+ published as `data-fd-zoom` on `.flowdrop-root`. The `editor.zoomTiers` setting (`ZoomTierConfig`,
99
+ `ZoomTierName` from `settings`) gives the zoom each tier starts at; default
100
+ `{ full: 0.75, outline: 0.45, glyph: 0.25, map: 0 }`, `{ full: 0 }` turns tiers off, an invalid value falls
101
+ back to the default with one console warning. Settings > Editor > Zoom levels edits it.
102
+ - **Node layout.** Commands `layout node inspect <nodeId>` and `layout node beautify <nodeId>
103
+ [column|ports|align|clear|all] [--dry-run]`, both with `--gap-x` / `--gap-y`, and the WebMCP tools
104
+ `inspect_node_layout` and `beautify_node` (`gapX` / `gapY`). Settings `editor.layoutGapX` / `layoutGapY`
105
+ (defaults 120 / 40 px) set the spacing the layout keeps. Loopbacks (`loop_back` edges) are drawn as return lanes
106
+ (out of the source, under the loop body, back along a lane) instead of a curve through the cards, and layout
107
+ keeps those lanes free. A card's interface tags count as part of the card.
108
+ - **Tidy up.** A broom in the canvas controls and **Tidy up** (⇧⌥T) in the pane menu run the graph layout; **Tidy
109
+ node** (⇧S) in the node menu tidies one node. One undo step each. The toast says what changed, how many
110
+ overlaps are left and anything that got worse; a layout that would not improve is left alone. Graphs over
111
+ 120 nodes are refused (`TOO_LARGE`; tidy single nodes instead). See Changed for `layout beautify`.
112
+ - **Ports.** **Hide unconnected ports** / **Show hidden ports** in the node menu (data ports only), **Connect
113
+ to…** in a port's menu (a searchable picker of compatible ports on other nodes), and ports ready to receive
114
+ light up while a wire is dragged. Nothing is ever blocked by type: compatible ports are highlighted, the rest
115
+ dulled. A wire being dragged aligns magnetically with a port on the target.
116
+ - **Interface tags on the canvas**: a published port shows a tag beside it (rename, remove, or expose a port
117
+ from its menu), and a trigger shows a read-only `event:<node-id>` tag beside its event input, with a hover
118
+ explanation. A trigger's event input cannot be wired, hidden or published. `EVENT_PORT_ID`,
119
+ `RESERVED_INPUT_EVENT_PREFIX`, `isTriggerNode`, `isTriggerEventInput`, `isEventInputConnection`,
120
+ `reservedInputs`, `isReservedInputName` and `ReservedInput` are exported from `editor`.
121
+ - New settings: `editor.showNodeDescriptions` (default off; a 60 px band under every node's header when on),
122
+ `ui.sidebarWidths` (`{ nodes: 280, assistant: 380 }`, the resizable left column per tab) and
123
+ `ui.sheetWidths` (`{ workflow: 420 }`, the resizable workflow-settings sheet).
124
+ - WebMCP: `getBridgeController()` and `createBridgeController()` (`WebMCPBridgeController`, `BridgeStatus`,
125
+ `BridgeTool`, `BridgeSnapshot`) from `webmcp`, a typed controller over the desktop bridge widget; the editor
126
+ shows a bridge button as the last segment of the zoom controls.
127
+ - A flat row list for small array fields (inline-edit cells, a default mark for `x-item-ref` arrays).
128
+ - Messages: `connectTo.*` (including `optionCurrent`, `optionTaken`), `form.array.movedTo` and the other
129
+ `form.array` row messages, `layout.zoomLevelsTitle`, `layout.zoomLevelsHelp`, `nodes.configure`,
130
+ `nodes.configureTool`, `nodes.configureIdea`, `notice.dismiss`, plus new groups for the features above:
131
+ `tidy`, `runBar`, `runsList`, `doctor`, `nodeInspector`, `playground.header`, `playground.steps`,
132
+ `playground.inputForm`, `statusPill`, `select`, `webmcp.bridge`, `workflowInterface` (tags) and `chat.tools.verbs`.
133
+
134
+ ### Changed
135
+
136
+ - **Graphite is the default theme.** `DEFAULT_UI_SETTINGS.theme` is `'graphite'` (was `'default'`). An editor
137
+ with no `theme` prop and no saved choice starts in Graphite; a browser that saved its settings keeps its
138
+ theme. To keep the old look, pass `theme: 'default'`.
139
+ - **`<html data-theme>`.** The resolved colour scheme now lives on each editor's scope element, so two editors
140
+ on one page can differ. `<html data-theme>` is still mirrored for compatibility (see Deprecated).
141
+ - **`getStatusColor` / `getStatusBackgroundColor` / `getStatusTextColor`** return `var(--fd-status-*)` instead
142
+ of hex. They are valid in CSS only: host code that parses the hex value breaks.
143
+ - **`layout beautify`** (Console, WebMCP `beautify_layout`) now runs the same sweep as Tidy up instead of a
144
+ spacing-only pass: it puts every card in its column, clears overlaps and tight spacing, reorders ports and
145
+ straightens wires, keeps cards on the 20 px grid, and says so when nothing improved. `layout auto` aligns
146
+ tops along chains and places y on the grid. `--gap-x` / `--gap-y` are validated against the 20 px layout grid:
147
+ `INVALID_ARGUMENT` "a gap must be a non-negative multiple of the 20 px layout grid".
148
+ - **Settings.** A custom settings service's `getPreferences` may return partial settings. Grid size is 10 or
149
+ 20; any other stored value migrates to 20. `ui.consoleHeight` defaults to 220 (was 300).
150
+ - **Token scales collapsed** (values move, names stay). Type is 11 / 12 / 13 / 15 / 20 / 24 px (`--fd-text-sm`
151
+ 14 → 13, `--fd-text-base` 16 → 15, `--fd-text-lg` 18 → 20); spacing sits on a 4 px grid (`--fd-space-2xs` 6 →
152
+ 4, `--fd-space-sm` 10 → 8, `--fd-space-lg` 14 → 12); `--fd-radius-md` 6 → 4 px. Sites that override these
153
+ tokens are unaffected.
154
+ - **Lighter frame.** The navbar is 48 px (`--fd-navbar-height`, was 60). The status bar under the canvas is
155
+ gone: the node count sits in the zoom control, with the cycle warning. The minimap is 120×72 and hides when
156
+ the canvas is under 800 px wide (`showMinimap` still wins). The Console is a strip along the canvas's bottom
157
+ edge (opens at 220 px, height saved). One panel header and one composer are shared by the Playground, the
158
+ Assistant, the inspector, settings, overlays and the Console.
159
+ - **The AI Assistant** is a tab beside Nodes in the left slot, in Edit mode only; it keeps its conversation
160
+ across tab switches and Test mode. `consolePlacement` places the Command Console alone and the console
161
+ toggle opens only the Console; `consolePlacement: 'sidebar'` stays valid and `features.assistant: false`
162
+ still hides the Assistant. A host that set `disableSidebar` keeps the Assistant as a tab of the console group
163
+ (until 3.0). `bottomPanelTab: 'chat'` in stored settings is accepted and ignored.
164
+ - **Playground steps fold into one row per turn** ("8 steps · 82 ms · 1 waiting"), opening a compact table; a
165
+ failed step's error stays visible; the turn's run notices fold in. **Expand steps by default**
166
+ (`playground.expandSteps`, off) keeps them open. The status badge's hover details panel is gone: those facts
167
+ are in the inspector's Last run tab, and `status.overlay.tooltip` takes only `{ status }`.
168
+ - A workflow's settings open as a resizable sheet over the canvas. Toasts appear top-centre under the navbar
169
+ (at most three, one success at a time); a toast with an action stays until closed and every toast is
170
+ closable (the label comes from `notice.dismiss`).
171
+ - The Playground's "Nothing will reply here" notice sits in the empty conversation with a **Playground
172
+ settings** button. A refused Run (missing input, or the server's 400) is shown under the Run button, not in
173
+ the banner (`fd.playground.launchError`). A turn started by Run without a typed message reads "Started a run"
174
+ instead of an empty bubble. A form input of array or object type is sent as parsed JSON; invalid JSON stops
175
+ the run with "Not valid JSON for its type" (`InterfaceInputsResult`'s failure branch gains `invalid`).
176
+ - A saved or exported workflow no longer contains a node's `executionInfo`. The standalone Playground sends a
177
+ `predefinedMessage` starting with `/` as typed instead of reading it as a slash command.
178
+ `nodeExecutionService.fetchMultipleNodeExecutionInfo` rejects on a failed read (`getMultipleNodeExecutionInfo`
179
+ still never rejects).
180
+ - `ConfigPanel`'s `onClose` is optional; `NodeSidebar` takes a `popover` prop.
181
+ - `flowdrop:refresh-status` dispatched on one editor's mount container refreshes only that editor; dispatched
182
+ on `document` it still reaches all.
183
+ - Internal class names changed with the shared panel header, composer and steps rows (override CSS that targets
184
+ them): `.flowdrop-status-bar*`, `.flowdrop-text--error`, `.flowdrop-console-toggle`,
185
+ `.execution-console__header|__icon|__title`, `.message-stream__log-group*`, `.playground__vertical-resizer*`,
186
+ `.form-prompt__form-wrapper`, `.chat-input__textarea|__send-btn|__stop-btn|__run-btn|__command-feedback-dismiss`,
187
+ `.ai-chat-panel__input-area|__input|__send`, the `__header|__title|__close` families of `.config-panel`,
188
+ `.config-panel-modal`, `.config-modal`, `.flowdrop-settings-modal`, `.surface-overlay` and `.command-console`,
189
+ and `.node-status-overlay__icon`. The `.node-status-overlay--{status}` modifiers are now
190
+ `--{running,completed,waiting,failed,skipped}`, with the raw status in `data-execution-status`. New:
191
+ `.steps-summary*`, `.fd-zoom-status__count`, `.node-status-overlay__pill|__outline|--compact`.
192
+
193
+ ### Deprecated
194
+
195
+ - The `<html data-theme>` mirror: read the scheme from the editor's scope element instead. Removed in 3.0.
196
+ - `FormToggle.hideLabel`, `WorkflowEditor`'s `consoleOpen` / `onToggleConsole` / `consoleToggleLabel` (the
197
+ console is driven by the instance's UI state, `ui.consoleOpen`), `ControlPanel.notice` and
198
+ `NodeStatusOverlay`'s `size`, `position` and `showDetails` (and `NodeStatusConfig.showDetails`): accepted, no
199
+ effect. Removed in 3.0.
200
+ - `ui.sidebarWidth`: use `ui.sidebarWidths.nodes`; still read as its fallback.
201
+ - Messages `chat.tools.reading` / `read` / `applied` (unused), `playground.logGroup`,
202
+ `playground.executionConsole.header`, `readyTitle` and `readyText`; and the function form of
203
+ `chat.tools.awaitingApproval` / `rejected` (now strings; both are accepted).
204
+ - `ExecutionLogs` in the `playground` barrel (not rendered by any surface).
205
+ - The `--fd-*-display` skin tokens (`node-icon-display`, `node-circle-display`,
206
+ `sidebar-{search,header,card,flat}-display`, `navbar-{split,dropdown}-display`): use
207
+ `FlowDropThemeConfig.display`, which wins over them. They keep working and go in 3.0.
208
+ - The standalone Playground, in favour of the editor's **Test mode**: `Playground`, `PlaygroundStudio`,
209
+ `PlaygroundApp`, `PlaygroundModal` and the `mountPlayground`, `mountPlaygroundStudio`, `mountPlaygroundApp`
210
+ and `unmountPlayground` entries. They keep working and warn once per page on the console when mounted. They
211
+ are removed in 3.0. To migrate, embed the editor (`WorkflowEditor` / `mountFlowDropApp`) and use its Test mode.
212
+ - `data.executionInfo` on a node: read run status from `fd.playground.nodeStatusFor(id)`. Hosts that still
213
+ write it keep working (the overlay falls back to it), but it is no longer saved, exported or kept across
214
+ edits. `NodeOperationsHelper.applyExecutionInfo` is deprecated with it. Both go in 3.0.
215
+
216
+ ### Removed
217
+
218
+ - The status bar under the canvas, the floating Console button, the Playground's "Ready to run" empty state and
219
+ the resize splitter between its conversation and form, and the status badge's hover details panel.
220
+ - Messages `status.overlay.statusLabel`, `executionsLabel`, `lastRunLabel`, `durationLabel`, `errorLabel` and
221
+ `historyLabel` (with the details panel). Overrides of them no longer type-check.
222
+
223
+ ### Fixed
224
+
225
+ - An inline `theme.skin` on a named theme no longer drops that theme's dark palette (`resolveTheme`).
226
+ - A form field without a title shows a readable label instead of its raw schema key.
227
+ - Canvas nodes are named on the focusable wrapper (the inner `aria-label` was invalid ARIA), and the node
228
+ configure gear is visible on selected and focused nodes and on touch, not on hover only. Its label is
229
+ localisable (`nodes.configure`, `nodes.configureTool`, `nodes.configureIdea`).
230
+
8
231
  ## [2.11.0] - 2026-10-07
9
232
 
10
233
  ### Added
@@ -8,6 +8,11 @@
8
8
  * 2. Assign layers based on longest path from StartNode
9
9
  * 3. Position nodes with configurable spacing
10
10
  * 4. Fan out branches vertically from BranchingNode
11
+ * 5. Align tops along chains: a node's top sits at its first predecessor's top
12
+ * (pushed down only to clear its column neighbours), and every y is on the
13
+ * grid. Node cards keep their handle centres a multiple of 20 from the top,
14
+ * so row-1-to-row-1 wiring, trigger wire and data wire alike, comes out
15
+ * straight.
11
16
  */
12
17
  import type { AgentSpecFlow } from '../../types/agentspec.js';
13
18
  /** Measured dimensions for a node */
@@ -15,6 +20,15 @@ export interface NodeDimensions {
15
20
  width: number;
16
21
  height: number;
17
22
  }
23
+ /**
24
+ * Room a node needs beside it for its workflow-interface tags, in px: `left`
25
+ * for tags of its inputs, `right` for tags of its outputs (see
26
+ * `utils/interfaceTags.ts#interfaceTagReserve`). Keyed like the dimensions.
27
+ */
28
+ export type TagReserve = Map<string, {
29
+ left: number;
30
+ right: number;
31
+ }>;
18
32
  /** Layout configuration */
19
33
  export interface AutoLayoutConfig {
20
34
  /** Minimum horizontal gap between the right edge of one layer and the left edge of the next (px) */
@@ -29,6 +43,8 @@ export interface AutoLayoutConfig {
29
43
  defaultNodeWidth: number;
30
44
  /** Fallback node height when measured dimensions are unavailable */
31
45
  defaultNodeHeight: number;
46
+ /** Every y lands on a multiple of this (px); the node cards' handle offsets are multiples of 20 */
47
+ grid: number;
32
48
  }
33
49
  /**
34
50
  * Compute node positions for an Agent Spec flow using layered layout.
@@ -37,44 +53,10 @@ export interface AutoLayoutConfig {
37
53
  * @param flow - The Agent Spec flow to layout
38
54
  * @param config - Optional layout configuration
39
55
  * @param nodeDimensions - Optional map of node name to measured {width, height}
56
+ * @param tagReserve - Optional room each node needs beside it for interface tags
40
57
  * @returns Map of node name to {x, y} position
41
58
  */
42
- export declare function computeAutoLayout(flow: AgentSpecFlow, config?: Partial<AutoLayoutConfig>, nodeDimensions?: Map<string, NodeDimensions>): Map<string, {
43
- x: number;
44
- y: number;
45
- }>;
46
- /** Input position for beautify: existing node placement */
47
- export interface NodePosition {
48
- x: number;
49
- y: number;
50
- }
51
- /** Beautify configuration */
52
- export interface BeautifyLayoutConfig {
53
- /** Minimum horizontal gap between the right edge of one column and the left edge of the next (px) */
54
- horizontalGap: number;
55
- /** Minimum vertical gap between the bottom edge of one node and the top edge of the next in the same column (px) */
56
- verticalGap: number;
57
- /** Fallback node width when measured dimensions are unavailable */
58
- defaultNodeWidth: number;
59
- /** Fallback node height when measured dimensions are unavailable */
60
- defaultNodeHeight: number;
61
- }
62
- /**
63
- * Beautify existing node positions: preserve relative column/row ordering
64
- * but apply uniform spacing based on actual node dimensions.
65
- *
66
- * Algorithm:
67
- * 1. Cluster nodes into columns by X proximity (gap threshold = median width)
68
- * 2. Sort columns left-to-right by their median X
69
- * 3. Within each column, sort nodes top-to-bottom by their original Y
70
- * 4. Re-position with uniform horizontal and vertical gaps
71
- *
72
- * @param positions - Current node positions (keyed by node id)
73
- * @param config - Optional spacing configuration
74
- * @param nodeDimensions - Optional map of node id to measured {width, height}
75
- * @returns Map of node id to new {x, y} position
76
- */
77
- export declare function computeBeautifyLayout(positions: Map<string, NodePosition>, config?: Partial<BeautifyLayoutConfig>, nodeDimensions?: Map<string, NodeDimensions>): Map<string, {
59
+ export declare function computeAutoLayout(flow: AgentSpecFlow, config?: Partial<AutoLayoutConfig>, nodeDimensions?: Map<string, NodeDimensions>, tagReserve?: TagReserve): Map<string, {
78
60
  x: number;
79
61
  y: number;
80
62
  }>;
@@ -8,14 +8,32 @@
8
8
  * 2. Assign layers based on longest path from StartNode
9
9
  * 3. Position nodes with configurable spacing
10
10
  * 4. Fan out branches vertically from BranchingNode
11
+ * 5. Align tops along chains: a node's top sits at its first predecessor's top
12
+ * (pushed down only to clear its column neighbours), and every y is on the
13
+ * grid. Node cards keep their handle centres a multiple of 20 from the top,
14
+ * so row-1-to-row-1 wiring, trigger wire and data wire alike, comes out
15
+ * straight.
11
16
  */
17
+ /** Free space kept between a column's output tags and the next column's input tags (px). */
18
+ const TAG_BREATHING_ROOM = 40;
19
+ /** Gap between two adjacent columns: the configured gap, or more when their tags need it. */
20
+ function columnGap(horizontalGap, left, right, reserve) {
21
+ if (!reserve || !right)
22
+ return horizontalGap;
23
+ const out = Math.max(0, ...left.map((id) => reserve.get(id)?.right ?? 0));
24
+ const into = Math.max(0, ...right.map((id) => reserve.get(id)?.left ?? 0));
25
+ if (out === 0 && into === 0)
26
+ return horizontalGap;
27
+ return Math.max(horizontalGap, out + into + TAG_BREATHING_ROOM);
28
+ }
12
29
  const DEFAULT_CONFIG = {
13
30
  horizontalGap: 120,
14
31
  verticalGap: 40,
15
32
  startX: 100,
16
33
  startY: 100,
17
34
  defaultNodeWidth: 220,
18
- defaultNodeHeight: 150
35
+ defaultNodeHeight: 150,
36
+ grid: 20
19
37
  };
20
38
  /**
21
39
  * Compute node positions for an Agent Spec flow using layered layout.
@@ -24,9 +42,10 @@ const DEFAULT_CONFIG = {
24
42
  * @param flow - The Agent Spec flow to layout
25
43
  * @param config - Optional layout configuration
26
44
  * @param nodeDimensions - Optional map of node name to measured {width, height}
45
+ * @param tagReserve - Optional room each node needs beside it for interface tags
27
46
  * @returns Map of node name to {x, y} position
28
47
  */
29
- export function computeAutoLayout(flow, config = {}, nodeDimensions) {
48
+ export function computeAutoLayout(flow, config = {}, nodeDimensions, tagReserve) {
30
49
  const cfg = { ...DEFAULT_CONFIG, ...config };
31
50
  const positions = new Map();
32
51
  if (flow.nodes.length === 0)
@@ -82,109 +101,72 @@ export function computeAutoLayout(flow, config = {}, nodeDimensions) {
82
101
  // Compute X positions layer by layer, using the widest node in each layer
83
102
  const layerXPositions = new Map();
84
103
  let currentX = cfg.startX;
85
- for (const layerIndex of sortedLayers) {
104
+ for (const [i, layerIndex] of sortedLayers.entries()) {
86
105
  layerXPositions.set(layerIndex, currentX);
87
- // Advance X by the widest node in this layer + horizontal gap
106
+ // Advance X by the widest node in this layer + the gap (wider when interface tags need it)
88
107
  const nodesInLayer = layerGroups.get(layerIndex);
89
108
  const maxWidth = Math.max(...nodesInLayer.map((name) => getDims(name).width));
90
- currentX += maxWidth + cfg.horizontalGap;
109
+ const next = sortedLayers[i + 1];
110
+ currentX +=
111
+ maxWidth +
112
+ columnGap(cfg.horizontalGap, nodesInLayer, next === undefined ? undefined : layerGroups.get(next), tagReserve);
113
+ }
114
+ // Predecessors in edge order (control flow first), for aligning tops.
115
+ const predecessors = new Map();
116
+ const addPredecessor = (from, to) => {
117
+ const list = predecessors.get(to) ?? [];
118
+ if (!list.includes(from))
119
+ list.push(from);
120
+ predecessors.set(to, list);
121
+ };
122
+ for (const edge of flow.control_flow_connections)
123
+ addPredecessor(edge.from_node, edge.to_node);
124
+ for (const edge of flow.data_flow_connections ?? []) {
125
+ addPredecessor(edge.source_node, edge.destination_node);
91
126
  }
127
+ const grid = cfg.grid > 0 ? cfg.grid : 1;
128
+ const roundToGrid = (v) => Math.round(v / grid) * grid;
129
+ const ceilToGrid = (v) => Math.ceil(v / grid) * grid;
92
130
  // Compute Y positions within each layer, using actual node heights
93
131
  for (const layerIndex of sortedLayers) {
94
132
  const nodesInLayer = layerGroups.get(layerIndex);
95
133
  const x = layerXPositions.get(layerIndex);
96
- // Calculate total height of this column (sum of node heights + gaps)
97
- const heights = nodesInLayer.map((name) => getDims(name).height);
98
- const totalHeight = heights.reduce((sum, h) => sum + h, 0) + (nodesInLayer.length - 1) * cfg.verticalGap;
99
- // Center the column vertically around startY
100
- let y = cfg.startY - totalHeight / 2;
101
- for (let i = 0; i < nodesInLayer.length; i++) {
102
- positions.set(nodesInLayer[i], { x, y });
103
- y += heights[i] + cfg.verticalGap;
134
+ const heights = new Map(nodesInLayer.map((name) => [name, getDims(name).height]));
135
+ // The top a node wants: its first earlier-layer predecessor's top.
136
+ const wanted = new Map();
137
+ for (const name of nodesInLayer) {
138
+ const from = (predecessors.get(name) ?? []).find((p) => {
139
+ const layer = layers.get(p);
140
+ return layer !== undefined && layer < layerIndex && positions.has(p);
141
+ });
142
+ if (from !== undefined)
143
+ wanted.set(name, positions.get(from).y);
104
144
  }
105
- }
106
- return positions;
107
- }
108
- const DEFAULT_BEAUTIFY_CONFIG = {
109
- horizontalGap: 120,
110
- verticalGap: 40,
111
- defaultNodeWidth: 220,
112
- defaultNodeHeight: 150
113
- };
114
- /**
115
- * Beautify existing node positions: preserve relative column/row ordering
116
- * but apply uniform spacing based on actual node dimensions.
117
- *
118
- * Algorithm:
119
- * 1. Cluster nodes into columns by X proximity (gap threshold = median width)
120
- * 2. Sort columns left-to-right by their median X
121
- * 3. Within each column, sort nodes top-to-bottom by their original Y
122
- * 4. Re-position with uniform horizontal and vertical gaps
123
- *
124
- * @param positions - Current node positions (keyed by node id)
125
- * @param config - Optional spacing configuration
126
- * @param nodeDimensions - Optional map of node id to measured {width, height}
127
- * @returns Map of node id to new {x, y} position
128
- */
129
- export function computeBeautifyLayout(positions, config = {}, nodeDimensions) {
130
- const cfg = { ...DEFAULT_BEAUTIFY_CONFIG, ...config };
131
- const result = new Map();
132
- if (positions.size === 0)
133
- return result;
134
- const getDims = (id) => nodeDimensions?.get(id) ?? {
135
- width: cfg.defaultNodeWidth,
136
- height: cfg.defaultNodeHeight
137
- };
138
- // Collect all nodes sorted by X
139
- const entries = Array.from(positions.entries()).map(([id, pos]) => ({
140
- id,
141
- x: pos.x,
142
- y: pos.y
143
- }));
144
- entries.sort((a, b) => a.x - b.x);
145
- // Determine clustering threshold: half the median node width
146
- const widths = entries.map((e) => getDims(e.id).width);
147
- const sortedWidths = [...widths].sort((a, b) => a - b);
148
- const medianWidth = sortedWidths[Math.floor(sortedWidths.length / 2)];
149
- const clusterThreshold = medianWidth * 0.75;
150
- // Cluster into columns by X proximity
151
- const columns = [];
152
- let currentColumn = [entries[0]];
153
- for (let i = 1; i < entries.length; i++) {
154
- const prevX = currentColumn[currentColumn.length - 1].x;
155
- if (entries[i].x - prevX > clusterThreshold) {
156
- columns.push(currentColumn);
157
- currentColumn = [entries[i]];
145
+ if (wanted.size === 0) {
146
+ // Nothing to align to (the first layer, or loose nodes): a column centred on startY.
147
+ const total = nodesInLayer.reduce((sum, name) => sum + heights.get(name), 0) +
148
+ (nodesInLayer.length - 1) * cfg.verticalGap;
149
+ let y = roundToGrid(cfg.startY - total / 2);
150
+ for (const name of nodesInLayer) {
151
+ positions.set(name, { x, y });
152
+ y = ceilToGrid(y + heights.get(name) + cfg.verticalGap);
153
+ }
154
+ continue;
158
155
  }
159
- else {
160
- currentColumn.push(entries[i]);
156
+ // Aligned nodes keep their wanted top in order, pushed down only to clear the node above;
157
+ // nodes with nothing to align to go below them.
158
+ const aligned = nodesInLayer
159
+ .filter((name) => wanted.has(name))
160
+ .sort((a, b) => wanted.get(a) - wanted.get(b));
161
+ const loose = nodesInLayer.filter((name) => !wanted.has(name));
162
+ let cursor = -Infinity;
163
+ for (const name of [...aligned, ...loose]) {
164
+ const y = Math.max(wanted.get(name) ?? cursor, cursor);
165
+ positions.set(name, { x, y });
166
+ cursor = ceilToGrid(y + heights.get(name) + cfg.verticalGap);
161
167
  }
162
168
  }
163
- columns.push(currentColumn);
164
- // Sort each column's nodes top-to-bottom by original Y
165
- for (const col of columns) {
166
- col.sort((a, b) => a.y - b.y);
167
- }
168
- // Compute the global vertical center from the original positions
169
- const allYs = entries.map((e) => e.y);
170
- const globalCenterY = (Math.min(...allYs) + Math.max(...allYs)) / 2;
171
- // Assign new positions column by column
172
- let currentX = entries[0].x; // Start from the leftmost original X
173
- for (const col of columns) {
174
- // Find the widest node in this column
175
- const maxWidth = Math.max(...col.map((e) => getDims(e.id).width));
176
- // Calculate total height of this column
177
- const heights = col.map((e) => getDims(e.id).height);
178
- const totalHeight = heights.reduce((sum, h) => sum + h, 0) + (col.length - 1) * cfg.verticalGap;
179
- // Center column vertically around the global center
180
- let y = globalCenterY - totalHeight / 2;
181
- for (let i = 0; i < col.length; i++) {
182
- result.set(col[i].id, { x: currentX, y });
183
- y += heights[i] + cfg.verticalGap;
184
- }
185
- currentX += maxWidth + cfg.horizontalGap;
186
- }
187
- return result;
169
+ return positions;
188
170
  }
189
171
  // ============================================================================
190
172
  // Layer Assignment (for auto-layout)
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Chat — the activity rows of the AI Assistant.
3
+ *
4
+ * One row pattern shows what the assistant is doing: a tool call, a note, a
5
+ * retry. This module is the pure part — the human label of a tool call, the
6
+ * one-line detail of its arguments, how long it took, and the summary a
7
+ * finished turn folds into. No Svelte, no DOM.
8
+ *
9
+ * @module chat/activity
10
+ */
11
+ /** How a row stands: still going, done, or how it ended. */
12
+ export type ActivityStatus = 'running' | 'ok' | 'rejected' | 'failed' | 'note';
13
+ /** One row of the activity list. */
14
+ export interface ActivityRow {
15
+ status: ActivityStatus;
16
+ /** The human label, shown strong: "Read workflow". For a note, the note's text. */
17
+ verb: string;
18
+ /** What it acted on, shown muted after the label: `"trim"`. */
19
+ detail: string;
20
+ /** How long the call took, in ms. Absent while running, and after a wait on the person. */
21
+ ms?: number;
22
+ }
23
+ /** The label of one tool in its two tenses. */
24
+ export interface ToolVerb {
25
+ running: string;
26
+ done: string;
27
+ }
28
+ /** The label of `tool`, in the tense of `phase`. Unknown tools fall back to their id. */
29
+ export declare function toolVerb(tool: string, phase: 'running' | 'done', verbs: Readonly<Record<string, ToolVerb>>, fallback: (tool: string, phase: 'running' | 'done') => string): string;
30
+ /**
31
+ * The arguments of a call as one muted line: the primitive values, joined
32
+ * and cut at 60 characters. A search is quoted, so `"trim"` reads as the
33
+ * thing searched for.
34
+ */
35
+ export declare function describeArgs(tool: string, args: Record<string, unknown>): string;
36
+ /** A duration for a row or a summary: `0.2 s`, `1.6 s`, `1 m 05 s`. Under 0.1 s it says so. */
37
+ export declare function formatActivityDuration(ms: number): string;
38
+ /** The duration a row shows: nothing for a step too quick to be worth a number (under 0.1 s). */
39
+ export declare function rowDuration(ms: number | undefined): string;
40
+ /** What a finished turn folds into: how many tools ran, how many went wrong, how long they took. */
41
+ export interface ActivitySummary {
42
+ /** Tool calls, notes not counted. */
43
+ tools: number;
44
+ /** Calls that failed or that the person rejected. */
45
+ problems: number;
46
+ /** The sum of the calls' own durations (the fold prefers the turn's wall-clock time). */
47
+ totalMs: number;
48
+ }
49
+ export declare function summarizeActivity(rows: readonly ActivityRow[]): ActivitySummary;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Chat — the activity rows of the AI Assistant.
3
+ *
4
+ * One row pattern shows what the assistant is doing: a tool call, a note, a
5
+ * retry. This module is the pure part — the human label of a tool call, the
6
+ * one-line detail of its arguments, how long it took, and the summary a
7
+ * finished turn folds into. No Svelte, no DOM.
8
+ *
9
+ * @module chat/activity
10
+ */
11
+ const MAX_DETAIL = 60;
12
+ /** The label of `tool`, in the tense of `phase`. Unknown tools fall back to their id. */
13
+ export function toolVerb(tool, phase, verbs, fallback) {
14
+ const known = Object.prototype.hasOwnProperty.call(verbs, tool) ? verbs[tool] : undefined;
15
+ return known ? known[phase] : fallback(tool, phase);
16
+ }
17
+ /**
18
+ * The arguments of a call as one muted line: the primitive values, joined
19
+ * and cut at 60 characters. A search is quoted, so `"trim"` reads as the
20
+ * thing searched for.
21
+ */
22
+ export function describeArgs(tool, args) {
23
+ const parts = [];
24
+ for (const value of Object.values(args ?? {})) {
25
+ if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {
26
+ parts.push(String(value));
27
+ }
28
+ }
29
+ let text = parts.join(' ');
30
+ if (text === '')
31
+ return '';
32
+ if (tool === 'search_types')
33
+ text = `"${text}"`;
34
+ return text.length > MAX_DETAIL ? `${text.slice(0, MAX_DETAIL - 1)}…` : text;
35
+ }
36
+ /** A duration for a row or a summary: `0.2 s`, `1.6 s`, `1 m 05 s`. Under 0.1 s it says so. */
37
+ export function formatActivityDuration(ms) {
38
+ if (!Number.isFinite(ms) || ms < 0)
39
+ return '';
40
+ if (ms < 50)
41
+ return '<0.1 s';
42
+ if (ms < 60_000)
43
+ return `${(ms / 1000).toFixed(1)} s`;
44
+ const minutes = Math.floor(ms / 60_000);
45
+ const seconds = Math.round((ms % 60_000) / 1000);
46
+ return `${minutes} m ${String(seconds).padStart(2, '0')} s`;
47
+ }
48
+ /** The duration a row shows: nothing for a step too quick to be worth a number (under 0.1 s). */
49
+ export function rowDuration(ms) {
50
+ return ms === undefined || ms < 100 ? '' : formatActivityDuration(ms);
51
+ }
52
+ export function summarizeActivity(rows) {
53
+ let tools = 0;
54
+ let problems = 0;
55
+ let totalMs = 0;
56
+ for (const row of rows) {
57
+ if (row.status === 'note')
58
+ continue;
59
+ tools++;
60
+ if (row.status === 'failed' || row.status === 'rejected')
61
+ problems++;
62
+ totalMs += row.ms ?? 0;
63
+ }
64
+ return { tools, problems, totalMs };
65
+ }