@flowdrop/flowdrop 1.0.0 → 1.1.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 (388) hide show
  1. package/README.md +50 -50
  2. package/dist/adapters/WorkflowAdapter.d.ts +1 -1
  3. package/dist/adapters/WorkflowAdapter.js +25 -25
  4. package/dist/adapters/agentspec/AgentSpecAdapter.d.ts +2 -2
  5. package/dist/adapters/agentspec/AgentSpecAdapter.js +133 -122
  6. package/dist/adapters/agentspec/agentAdapter.d.ts +2 -2
  7. package/dist/adapters/agentspec/agentAdapter.js +10 -10
  8. package/dist/adapters/agentspec/autoLayout.d.ts +1 -1
  9. package/dist/adapters/agentspec/autoLayout.js +2 -2
  10. package/dist/adapters/agentspec/componentTypeDefaults.d.ts +1 -1
  11. package/dist/adapters/agentspec/componentTypeDefaults.js +120 -120
  12. package/dist/adapters/agentspec/defaultNodeTypes.d.ts +2 -2
  13. package/dist/adapters/agentspec/defaultNodeTypes.js +307 -307
  14. package/dist/adapters/agentspec/index.d.ts +10 -10
  15. package/dist/adapters/agentspec/index.js +6 -6
  16. package/dist/adapters/agentspec/validator.d.ts +2 -2
  17. package/dist/adapters/agentspec/validator.js +22 -20
  18. package/dist/api/enhanced-client.d.ts +3 -3
  19. package/dist/api/enhanced-client.js +73 -72
  20. package/dist/components/App.svelte +1081 -961
  21. package/dist/components/App.svelte.d.ts +9 -6
  22. package/dist/components/CanvasBanner.stories.svelte +23 -20
  23. package/dist/components/CanvasBanner.stories.svelte.d.ts +1 -1
  24. package/dist/components/CanvasBanner.svelte +46 -46
  25. package/dist/components/ConfigForm.svelte +1164 -1065
  26. package/dist/components/ConfigForm.svelte.d.ts +2 -2
  27. package/dist/components/ConfigModal.svelte +180 -180
  28. package/dist/components/ConfigModal.svelte.d.ts +1 -1
  29. package/dist/components/ConfigPanel.stories.svelte +35 -35
  30. package/dist/components/ConfigPanel.stories.svelte.d.ts +1 -1
  31. package/dist/components/ConfigPanel.svelte +178 -167
  32. package/dist/components/ConfigPanel.svelte.d.ts +1 -1
  33. package/dist/components/ConnectionLine.svelte +25 -25
  34. package/dist/components/EdgeRefresher.svelte +26 -26
  35. package/dist/components/FlowDropEdge.stories.svelte +197 -0
  36. package/dist/components/FlowDropEdge.stories.svelte.d.ts +26 -0
  37. package/dist/components/FlowDropEdge.svelte +168 -0
  38. package/dist/components/FlowDropEdge.svelte.d.ts +4 -0
  39. package/dist/components/FlowDropZone.svelte +63 -60
  40. package/dist/components/FlowDropZone.svelte.d.ts +1 -1
  41. package/dist/components/LoadingSpinner.stories.svelte +19 -19
  42. package/dist/components/LoadingSpinner.stories.svelte.d.ts +1 -1
  43. package/dist/components/LoadingSpinner.svelte +21 -21
  44. package/dist/components/LoadingSpinner.svelte.d.ts +1 -1
  45. package/dist/components/Logo.stories.svelte +13 -13
  46. package/dist/components/Logo.stories.svelte.d.ts +1 -1
  47. package/dist/components/Logo.svelte +101 -95
  48. package/dist/components/LogsSidebar.svelte +553 -546
  49. package/dist/components/LogsSidebar.svelte.d.ts +1 -1
  50. package/dist/components/MarkdownDisplay.stories.svelte +29 -23
  51. package/dist/components/MarkdownDisplay.stories.svelte.d.ts +1 -1
  52. package/dist/components/MarkdownDisplay.svelte +16 -14
  53. package/dist/components/Navbar.stories.svelte +43 -38
  54. package/dist/components/Navbar.stories.svelte.d.ts +1 -1
  55. package/dist/components/Navbar.svelte +760 -706
  56. package/dist/components/Navbar.svelte.d.ts +1 -1
  57. package/dist/components/NodeSidebar.svelte +900 -746
  58. package/dist/components/NodeSidebar.svelte.d.ts +3 -1
  59. package/dist/components/NodeStatusOverlay.stories.svelte +82 -70
  60. package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +1 -1
  61. package/dist/components/NodeStatusOverlay.svelte +295 -280
  62. package/dist/components/NodeStatusOverlay.svelte.d.ts +3 -3
  63. package/dist/components/PipelineStatus.svelte +326 -300
  64. package/dist/components/PipelineStatus.svelte.d.ts +4 -4
  65. package/dist/components/PortCoordinateTracker.svelte +49 -47
  66. package/dist/components/PortCoordinateTracker.svelte.d.ts +1 -1
  67. package/dist/components/ReadOnlyDetails.svelte +156 -156
  68. package/dist/components/SchemaForm.stories.svelte +106 -98
  69. package/dist/components/SchemaForm.stories.svelte.d.ts +1 -1
  70. package/dist/components/SchemaForm.svelte +490 -463
  71. package/dist/components/SchemaForm.svelte.d.ts +2 -2
  72. package/dist/components/SettingsModal.svelte +226 -223
  73. package/dist/components/SettingsModal.svelte.d.ts +1 -1
  74. package/dist/components/SettingsPanel.svelte +637 -601
  75. package/dist/components/SettingsPanel.svelte.d.ts +1 -1
  76. package/dist/components/StatusIcon.stories.svelte +62 -49
  77. package/dist/components/StatusIcon.stories.svelte.d.ts +1 -1
  78. package/dist/components/StatusIcon.svelte +87 -87
  79. package/dist/components/StatusIcon.svelte.d.ts +2 -2
  80. package/dist/components/StatusLabel.stories.svelte +12 -12
  81. package/dist/components/StatusLabel.stories.svelte.d.ts +1 -1
  82. package/dist/components/StatusLabel.svelte +19 -19
  83. package/dist/components/ThemeToggle.stories.svelte +16 -16
  84. package/dist/components/ThemeToggle.stories.svelte.d.ts +1 -1
  85. package/dist/components/ThemeToggle.svelte +180 -169
  86. package/dist/components/ThemeToggle.svelte.d.ts +1 -1
  87. package/dist/components/UniversalNode.svelte +150 -138
  88. package/dist/components/UniversalNode.svelte.d.ts +3 -3
  89. package/dist/components/WorkflowEditor.svelte +1069 -1007
  90. package/dist/components/WorkflowEditor.svelte.d.ts +4 -4
  91. package/dist/components/form/FormArray.svelte +1034 -973
  92. package/dist/components/form/FormArray.svelte.d.ts +1 -1
  93. package/dist/components/form/FormAutocomplete.svelte +1021 -978
  94. package/dist/components/form/FormAutocomplete.svelte.d.ts +1 -1
  95. package/dist/components/form/FormCheckboxGroup.stories.svelte +23 -20
  96. package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +1 -1
  97. package/dist/components/form/FormCheckboxGroup.svelte +136 -136
  98. package/dist/components/form/FormCodeEditor.svelte +452 -434
  99. package/dist/components/form/FormField.svelte +366 -355
  100. package/dist/components/form/FormField.svelte.d.ts +2 -2
  101. package/dist/components/form/FormFieldLight.svelte +400 -384
  102. package/dist/components/form/FormFieldLight.svelte.d.ts +1 -1
  103. package/dist/components/form/FormFieldWrapper.stories.svelte +42 -42
  104. package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +1 -1
  105. package/dist/components/form/FormFieldWrapper.svelte +100 -93
  106. package/dist/components/form/FormFieldWrapper.svelte.d.ts +1 -1
  107. package/dist/components/form/FormFieldset.svelte +108 -108
  108. package/dist/components/form/FormFieldset.svelte.d.ts +2 -2
  109. package/dist/components/form/FormMarkdownEditor.svelte +758 -725
  110. package/dist/components/form/FormNumberField.stories.svelte +25 -25
  111. package/dist/components/form/FormNumberField.stories.svelte.d.ts +1 -1
  112. package/dist/components/form/FormNumberField.svelte +88 -88
  113. package/dist/components/form/FormRangeField.stories.svelte +20 -20
  114. package/dist/components/form/FormRangeField.stories.svelte.d.ts +1 -1
  115. package/dist/components/form/FormRangeField.svelte +234 -226
  116. package/dist/components/form/FormSelect.stories.svelte +38 -38
  117. package/dist/components/form/FormSelect.stories.svelte.d.ts +1 -1
  118. package/dist/components/form/FormSelect.svelte +101 -101
  119. package/dist/components/form/FormSelect.svelte.d.ts +1 -1
  120. package/dist/components/form/FormTemplateEditor.svelte +847 -798
  121. package/dist/components/form/FormTemplateEditor.svelte.d.ts +1 -1
  122. package/dist/components/form/FormTextField.stories.svelte +29 -23
  123. package/dist/components/form/FormTextField.stories.svelte.d.ts +1 -1
  124. package/dist/components/form/FormTextField.svelte +68 -68
  125. package/dist/components/form/FormTextarea.stories.svelte +28 -25
  126. package/dist/components/form/FormTextarea.stories.svelte.d.ts +1 -1
  127. package/dist/components/form/FormTextarea.svelte +74 -74
  128. package/dist/components/form/FormToggle.stories.svelte +23 -20
  129. package/dist/components/form/FormToggle.stories.svelte.d.ts +1 -1
  130. package/dist/components/form/FormToggle.svelte +98 -98
  131. package/dist/components/form/FormUISchemaRenderer.svelte +120 -113
  132. package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +3 -3
  133. package/dist/components/form/index.d.ts +19 -19
  134. package/dist/components/form/index.js +18 -18
  135. package/dist/components/form/templateAutocomplete.d.ts +2 -2
  136. package/dist/components/form/templateAutocomplete.js +64 -55
  137. package/dist/components/form/types.d.ts +6 -6
  138. package/dist/components/form/types.js +9 -4
  139. package/dist/components/icons/AlertCircleIcon.svelte +11 -0
  140. package/dist/components/icons/AlertCircleIcon.svelte.d.ts +26 -0
  141. package/dist/components/icons/CogIcon.svelte +11 -0
  142. package/dist/components/icons/CogIcon.svelte.d.ts +26 -0
  143. package/dist/components/interrupt/ChoicePrompt.stories.svelte +54 -38
  144. package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +1 -1
  145. package/dist/components/interrupt/ChoicePrompt.svelte +407 -383
  146. package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +1 -1
  147. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +48 -48
  148. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +1 -1
  149. package/dist/components/interrupt/ConfirmationPrompt.svelte +280 -274
  150. package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +1 -1
  151. package/dist/components/interrupt/FormPrompt.svelte +223 -218
  152. package/dist/components/interrupt/FormPrompt.svelte.d.ts +1 -1
  153. package/dist/components/interrupt/InterruptBubble.svelte +617 -583
  154. package/dist/components/interrupt/InterruptBubble.svelte.d.ts +2 -2
  155. package/dist/components/interrupt/ReviewPrompt.stories.svelte +66 -56
  156. package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +1 -1
  157. package/dist/components/interrupt/ReviewPrompt.svelte +861 -841
  158. package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +1 -1
  159. package/dist/components/interrupt/TextInputPrompt.stories.svelte +38 -33
  160. package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +1 -1
  161. package/dist/components/interrupt/TextInputPrompt.svelte +333 -328
  162. package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +1 -1
  163. package/dist/components/interrupt/index.d.ts +5 -5
  164. package/dist/components/interrupt/index.js +5 -5
  165. package/dist/components/layouts/MainLayout.svelte +724 -691
  166. package/dist/components/layouts/MainLayout.svelte.d.ts +6 -6
  167. package/dist/components/nodes/GatewayNode.stories.svelte +100 -99
  168. package/dist/components/nodes/GatewayNode.svelte +605 -571
  169. package/dist/components/nodes/GatewayNode.svelte.d.ts +3 -3
  170. package/dist/components/nodes/IdeaNode.stories.svelte +44 -43
  171. package/dist/components/nodes/IdeaNode.svelte +451 -437
  172. package/dist/components/nodes/IdeaNode.svelte.d.ts +1 -1
  173. package/dist/components/nodes/NotesNode.stories.svelte +65 -64
  174. package/dist/components/nodes/NotesNode.svelte +380 -369
  175. package/dist/components/nodes/NotesNode.svelte.d.ts +1 -1
  176. package/dist/components/nodes/SimpleNode.stories.svelte +145 -144
  177. package/dist/components/nodes/SimpleNode.svelte +486 -424
  178. package/dist/components/nodes/SimpleNode.svelte.d.ts +1 -1
  179. package/dist/components/nodes/SquareNode.stories.svelte +73 -73
  180. package/dist/components/nodes/SquareNode.svelte +439 -380
  181. package/dist/components/nodes/SquareNode.svelte.d.ts +1 -1
  182. package/dist/components/nodes/TerminalNode.stories.svelte +13 -13
  183. package/dist/components/nodes/TerminalNode.svelte +709 -670
  184. package/dist/components/nodes/TerminalNode.svelte.d.ts +1 -1
  185. package/dist/components/nodes/ToolNode.stories.svelte +181 -180
  186. package/dist/components/nodes/ToolNode.svelte +505 -447
  187. package/dist/components/nodes/ToolNode.svelte.d.ts +1 -1
  188. package/dist/components/nodes/WorkflowNode.stories.svelte +70 -46
  189. package/dist/components/nodes/WorkflowNode.svelte +621 -551
  190. package/dist/components/nodes/WorkflowNode.svelte.d.ts +3 -3
  191. package/dist/components/playground/ChatPanel.svelte +945 -889
  192. package/dist/components/playground/ExecutionLogs.svelte +495 -472
  193. package/dist/components/playground/InputCollector.svelte +449 -428
  194. package/dist/components/playground/MessageBubble.stories.svelte +47 -47
  195. package/dist/components/playground/MessageBubble.stories.svelte.d.ts +1 -1
  196. package/dist/components/playground/MessageBubble.svelte +626 -610
  197. package/dist/components/playground/MessageBubble.svelte.d.ts +1 -1
  198. package/dist/components/playground/Playground.svelte +1088 -1057
  199. package/dist/components/playground/Playground.svelte.d.ts +3 -3
  200. package/dist/components/playground/PlaygroundModal.svelte +208 -204
  201. package/dist/components/playground/PlaygroundModal.svelte.d.ts +3 -3
  202. package/dist/components/playground/SessionManager.svelte +527 -521
  203. package/dist/components/playground/SessionManager.svelte.d.ts +1 -1
  204. package/dist/config/agentSpecEndpoints.d.ts +1 -1
  205. package/dist/config/agentSpecEndpoints.js +20 -20
  206. package/dist/config/constants.d.ts +8 -0
  207. package/dist/config/constants.js +10 -2
  208. package/dist/config/defaultCategories.d.ts +1 -1
  209. package/dist/config/defaultCategories.js +86 -86
  210. package/dist/config/defaultPortConfig.d.ts +1 -1
  211. package/dist/config/defaultPortConfig.js +144 -144
  212. package/dist/config/endpoints.d.ts +4 -4
  213. package/dist/config/endpoints.js +65 -65
  214. package/dist/config/runtimeConfig.d.ts +2 -2
  215. package/dist/config/runtimeConfig.js +8 -8
  216. package/dist/core/index.d.ts +63 -59
  217. package/dist/core/index.js +35 -33
  218. package/dist/display/index.d.ts +2 -2
  219. package/dist/display/index.js +2 -2
  220. package/dist/editor/index.d.ts +62 -62
  221. package/dist/editor/index.js +53 -53
  222. package/dist/form/code.d.ts +5 -5
  223. package/dist/form/code.js +14 -14
  224. package/dist/form/fieldRegistry.d.ts +3 -3
  225. package/dist/form/fieldRegistry.js +11 -9
  226. package/dist/form/full.d.ts +8 -8
  227. package/dist/form/full.js +9 -9
  228. package/dist/form/index.d.ts +18 -18
  229. package/dist/form/index.js +16 -16
  230. package/dist/form/markdown.d.ts +4 -4
  231. package/dist/form/markdown.js +8 -8
  232. package/dist/helpers/proximityConnect.d.ts +3 -3
  233. package/dist/helpers/proximityConnect.js +34 -32
  234. package/dist/helpers/workflowEditorHelper.d.ts +5 -5
  235. package/dist/helpers/workflowEditorHelper.js +108 -96
  236. package/dist/index.d.ts +6 -6
  237. package/dist/index.js +6 -6
  238. package/dist/mocks/app-environment.js +2 -2
  239. package/dist/mocks/app-forms.js +9 -9
  240. package/dist/mocks/app-navigation.js +11 -11
  241. package/dist/mocks/app-stores.js +8 -8
  242. package/dist/playground/index.d.ts +19 -19
  243. package/dist/playground/index.js +16 -16
  244. package/dist/playground/mount.d.ts +3 -3
  245. package/dist/playground/mount.js +24 -24
  246. package/dist/registry/builtinFormats.js +13 -13
  247. package/dist/registry/builtinNodes.d.ts +2 -2
  248. package/dist/registry/builtinNodes.js +77 -77
  249. package/dist/registry/index.d.ts +4 -4
  250. package/dist/registry/index.js +4 -4
  251. package/dist/registry/nodeComponentRegistry.d.ts +8 -8
  252. package/dist/registry/nodeComponentRegistry.js +11 -9
  253. package/dist/registry/plugin.d.ts +2 -2
  254. package/dist/registry/plugin.js +11 -11
  255. package/dist/registry/workflowFormatRegistry.d.ts +3 -3
  256. package/dist/registry/workflowFormatRegistry.js +2 -2
  257. package/dist/schema/index.d.ts +1 -1
  258. package/dist/schema/index.js +2 -2
  259. package/dist/schemas/v1/workflow.schema.json +22 -107
  260. package/dist/services/agentSpecExecutionService.d.ts +3 -3
  261. package/dist/services/agentSpecExecutionService.js +59 -55
  262. package/dist/services/api.d.ts +18 -4
  263. package/dist/services/api.js +46 -43
  264. package/dist/services/apiVariableService.d.ts +1 -1
  265. package/dist/services/apiVariableService.js +41 -34
  266. package/dist/services/autoSaveService.js +8 -8
  267. package/dist/services/categoriesApi.d.ts +2 -2
  268. package/dist/services/categoriesApi.js +8 -8
  269. package/dist/services/draftStorage.d.ts +1 -1
  270. package/dist/services/draftStorage.js +11 -11
  271. package/dist/services/dynamicSchemaService.d.ts +1 -1
  272. package/dist/services/dynamicSchemaService.js +41 -39
  273. package/dist/services/globalSave.d.ts +2 -2
  274. package/dist/services/globalSave.js +53 -42
  275. package/dist/services/historyService.d.ts +1 -1
  276. package/dist/services/historyService.js +8 -8
  277. package/dist/services/interruptService.d.ts +1 -1
  278. package/dist/services/interruptService.js +35 -29
  279. package/dist/services/nodeExecutionService.d.ts +1 -1
  280. package/dist/services/nodeExecutionService.js +45 -44
  281. package/dist/services/playgroundService.d.ts +1 -1
  282. package/dist/services/playgroundService.js +29 -29
  283. package/dist/services/portConfigApi.d.ts +2 -2
  284. package/dist/services/portConfigApi.js +8 -8
  285. package/dist/services/settingsService.d.ts +2 -2
  286. package/dist/services/settingsService.js +25 -19
  287. package/dist/services/toastService.d.ts +4 -4
  288. package/dist/services/toastService.js +33 -33
  289. package/dist/services/variableService.d.ts +1 -1
  290. package/dist/services/variableService.js +36 -36
  291. package/dist/services/workflowStorage.d.ts +2 -2
  292. package/dist/services/workflowStorage.js +13 -13
  293. package/dist/settings/index.d.ts +7 -7
  294. package/dist/settings/index.js +6 -6
  295. package/dist/skins/default.d.ts +2 -0
  296. package/dist/skins/default.js +1 -0
  297. package/dist/skins/index.d.ts +13 -0
  298. package/dist/skins/index.js +30 -0
  299. package/dist/skins/slate.d.ts +2 -0
  300. package/dist/skins/slate.js +78 -0
  301. package/dist/stores/categoriesStore.svelte.d.ts +1 -1
  302. package/dist/stores/categoriesStore.svelte.js +5 -5
  303. package/dist/stores/editorStateMachine.svelte.d.ts +2 -2
  304. package/dist/stores/editorStateMachine.svelte.js +65 -33
  305. package/dist/stores/historyStore.svelte.d.ts +4 -4
  306. package/dist/stores/historyStore.svelte.js +4 -4
  307. package/dist/stores/interruptStore.svelte.d.ts +3 -3
  308. package/dist/stores/interruptStore.svelte.js +21 -21
  309. package/dist/stores/playgroundStore.svelte.d.ts +2 -2
  310. package/dist/stores/playgroundStore.svelte.js +25 -18
  311. package/dist/stores/portCoordinateStore.svelte.d.ts +2 -2
  312. package/dist/stores/portCoordinateStore.svelte.js +15 -8
  313. package/dist/stores/settingsStore.svelte.d.ts +2 -2
  314. package/dist/stores/settingsStore.svelte.js +62 -57
  315. package/dist/stores/workflowStore.svelte.d.ts +3 -3
  316. package/dist/stores/workflowStore.svelte.js +50 -47
  317. package/dist/stories/CanvasDecorator.svelte +35 -32
  318. package/dist/stories/CanvasDecorator.svelte.d.ts +2 -2
  319. package/dist/stories/EdgeDecorator.svelte +125 -0
  320. package/dist/stories/EdgeDecorator.svelte.d.ts +17 -0
  321. package/dist/stories/NodeDecorator.svelte +59 -53
  322. package/dist/stories/NodeDecorator.svelte.d.ts +1 -1
  323. package/dist/stories/utils.d.ts +2 -2
  324. package/dist/stories/utils.js +105 -67
  325. package/dist/styles/base.css +599 -595
  326. package/dist/styles/toast.css +14 -14
  327. package/dist/styles/tokens.css +409 -378
  328. package/dist/svelte-app.d.ts +9 -9
  329. package/dist/svelte-app.js +39 -39
  330. package/dist/themes/default.d.ts +2 -0
  331. package/dist/themes/default.js +9 -0
  332. package/dist/themes/index.d.ts +13 -0
  333. package/dist/themes/index.js +44 -0
  334. package/dist/themes/minimal.d.ts +2 -0
  335. package/dist/themes/minimal.js +11 -0
  336. package/dist/types/agentspec.d.ts +18 -18
  337. package/dist/types/agentspec.js +2 -2
  338. package/dist/types/auth.d.ts +1 -1
  339. package/dist/types/auth.js +6 -6
  340. package/dist/types/config.d.ts +6 -6
  341. package/dist/types/events.d.ts +2 -2
  342. package/dist/types/events.js +2 -2
  343. package/dist/types/index.d.ts +32 -32
  344. package/dist/types/index.js +6 -6
  345. package/dist/types/interrupt.d.ts +6 -6
  346. package/dist/types/interrupt.js +21 -21
  347. package/dist/types/interruptState.d.ts +12 -12
  348. package/dist/types/interruptState.js +66 -66
  349. package/dist/types/playground.d.ts +7 -7
  350. package/dist/types/playground.js +14 -14
  351. package/dist/types/settings.d.ts +5 -3
  352. package/dist/types/settings.js +25 -18
  353. package/dist/types/skin.d.ts +31 -0
  354. package/dist/types/skin.js +1 -0
  355. package/dist/types/theme.d.ts +35 -0
  356. package/dist/types/theme.js +1 -0
  357. package/dist/types/uischema.d.ts +4 -4
  358. package/dist/types/uischema.js +3 -3
  359. package/dist/utils/colors.d.ts +1 -1
  360. package/dist/utils/colors.js +97 -95
  361. package/dist/utils/config.d.ts +2 -2
  362. package/dist/utils/config.js +48 -48
  363. package/dist/utils/connections.d.ts +2 -2
  364. package/dist/utils/connections.js +15 -15
  365. package/dist/utils/errors.js +3 -3
  366. package/dist/utils/fetchWithAuth.d.ts +1 -1
  367. package/dist/utils/fetchWithAuth.js +2 -2
  368. package/dist/utils/handleIds.d.ts +2 -2
  369. package/dist/utils/handleIds.js +8 -8
  370. package/dist/utils/handlePositioning.d.ts +1 -1
  371. package/dist/utils/handlePositioning.js +2 -2
  372. package/dist/utils/icons.d.ts +1 -1
  373. package/dist/utils/icons.js +74 -74
  374. package/dist/utils/logger.d.ts +1 -1
  375. package/dist/utils/logger.js +7 -7
  376. package/dist/utils/nodeStatus.d.ts +1 -1
  377. package/dist/utils/nodeStatus.js +48 -48
  378. package/dist/utils/nodeTypes.d.ts +1 -1
  379. package/dist/utils/nodeTypes.js +21 -20
  380. package/dist/utils/nodeWrapper.d.ts +7 -7
  381. package/dist/utils/nodeWrapper.js +21 -19
  382. package/dist/utils/performanceUtils.d.ts +1 -1
  383. package/dist/utils/performanceUtils.js +2 -1
  384. package/dist/utils/sanitize.js +1 -1
  385. package/dist/utils/uischema.d.ts +2 -2
  386. package/dist/utils/uischema.js +8 -8
  387. package/dist/utils/validation.js +20 -8
  388. package/package.json +296 -291
@@ -5,9 +5,9 @@
5
5
  *
6
6
  * @module services/apiVariableService
7
7
  */
8
- import { getEndpointConfig } from './api.js';
9
- import { logger } from '../utils/logger.js';
10
- import { DEFAULT_CACHE_TTL_MS } from '../config/constants.js';
8
+ import { getEndpointConfig } from "./api.js";
9
+ import { logger } from "../utils/logger.js";
10
+ import { DEFAULT_CACHE_TTL_MS } from "../config/constants.js";
11
11
  /**
12
12
  * Variable schema cache with TTL support
13
13
  * Key format: `variables:{workflowId}:{nodeId}`
@@ -48,7 +48,7 @@ export function resolveEndpointUrl(template, context) {
48
48
  * @returns A unique cache key string
49
49
  */
50
50
  function generateVariableCacheKey(workflowId, nodeId) {
51
- return `variables:${workflowId || 'unknown'}:${nodeId}`;
51
+ return `variables:${workflowId || "unknown"}:${nodeId}`;
52
52
  }
53
53
  /**
54
54
  * Checks if a cached variable schema is still valid (not expired).
@@ -71,7 +71,7 @@ function isCacheValid(entry, ttl = DEFAULT_VARIABLE_CACHE_TTL) {
71
71
  function resolveBodyTemplates(body, context) {
72
72
  const resolved = {};
73
73
  for (const [key, value] of Object.entries(body)) {
74
- if (typeof value === 'string') {
74
+ if (typeof value === "string") {
75
75
  // Resolve template variables in string values
76
76
  let resolvedValue = value;
77
77
  if (context.workflowId) {
@@ -80,7 +80,9 @@ function resolveBodyTemplates(body, context) {
80
80
  resolvedValue = resolvedValue.replace(/\{nodeId\}/g, encodeURIComponent(context.nodeId));
81
81
  resolved[key] = resolvedValue;
82
82
  }
83
- else if (typeof value === 'object' && value !== null && !Array.isArray(value)) {
83
+ else if (typeof value === "object" &&
84
+ value !== null &&
85
+ !Array.isArray(value)) {
84
86
  // Recursively resolve nested objects
85
87
  resolved[key] = resolveBodyTemplates(value, context);
86
88
  }
@@ -129,27 +131,27 @@ export async function fetchVariableSchema(workflowId, nodeId, config, authProvid
129
131
  return {
130
132
  success: true,
131
133
  schema: cached.schema,
132
- fromCache: true
134
+ fromCache: true,
133
135
  };
134
136
  }
135
137
  }
136
138
  // Resolve the URL with template variables
137
139
  let url = resolveEndpointUrl(endpoint.url, context);
138
140
  // If URL is relative, prepend base URL from endpoint config
139
- if (url.startsWith('/')) {
141
+ if (url.startsWith("/")) {
140
142
  const currentConfig = getEndpointConfig();
141
143
  if (currentConfig?.baseUrl) {
142
- const baseUrl = currentConfig.baseUrl.replace(/\/$/, '');
144
+ const baseUrl = currentConfig.baseUrl.replace(/\/$/, "");
143
145
  url = `${baseUrl}${url}`;
144
146
  }
145
147
  }
146
148
  // Prepare request options
147
- const method = endpoint.method ?? 'GET';
149
+ const method = endpoint.method ?? "GET";
148
150
  const timeout = endpoint.timeout ?? 30000;
149
151
  const headers = {
150
- Accept: 'application/json',
151
- 'Content-Type': 'application/json',
152
- ...endpoint.headers
152
+ Accept: "application/json",
153
+ "Content-Type": "application/json",
154
+ ...endpoint.headers,
153
155
  };
154
156
  // Add auth headers from AuthProvider if available
155
157
  if (authProvider) {
@@ -158,19 +160,22 @@ export async function fetchVariableSchema(workflowId, nodeId, config, authProvid
158
160
  Object.assign(headers, authHeaders);
159
161
  }
160
162
  catch (error) {
161
- logger.warn('Failed to get auth headers:', error);
163
+ logger.warn("Failed to get auth headers:", error);
162
164
  }
163
165
  }
164
166
  // Add auth headers from endpoint config as fallback
165
167
  const currentConfig = getEndpointConfig();
166
168
  if (currentConfig?.auth) {
167
- if (currentConfig.auth.type === 'bearer' && currentConfig.auth.token) {
168
- headers['Authorization'] = headers['Authorization'] ?? `Bearer ${currentConfig.auth.token}`;
169
+ if (currentConfig.auth.type === "bearer" && currentConfig.auth.token) {
170
+ headers["Authorization"] =
171
+ headers["Authorization"] ?? `Bearer ${currentConfig.auth.token}`;
169
172
  }
170
- else if (currentConfig.auth.type === 'api_key' && currentConfig.auth.apiKey) {
171
- headers['X-API-Key'] = headers['X-API-Key'] ?? currentConfig.auth.apiKey;
173
+ else if (currentConfig.auth.type === "api_key" &&
174
+ currentConfig.auth.apiKey) {
175
+ headers["X-API-Key"] = headers["X-API-Key"] ?? currentConfig.auth.apiKey;
172
176
  }
173
- else if (currentConfig.auth.type === 'custom' && currentConfig.auth.headers) {
177
+ else if (currentConfig.auth.type === "custom" &&
178
+ currentConfig.auth.headers) {
174
179
  Object.assign(headers, currentConfig.auth.headers);
175
180
  }
176
181
  }
@@ -178,10 +183,10 @@ export async function fetchVariableSchema(workflowId, nodeId, config, authProvid
178
183
  const fetchOptions = {
179
184
  method,
180
185
  headers,
181
- signal: AbortSignal.timeout(timeout)
186
+ signal: AbortSignal.timeout(timeout),
182
187
  };
183
188
  // Add body for non-GET requests
184
- if (method !== 'GET' && endpoint.body) {
189
+ if (method !== "GET" && endpoint.body) {
185
190
  const resolvedBody = resolveBodyTemplates(endpoint.body, context);
186
191
  fetchOptions.body = JSON.stringify(resolvedBody);
187
192
  }
@@ -192,7 +197,7 @@ export async function fetchVariableSchema(workflowId, nodeId, config, authProvid
192
197
  return {
193
198
  success: true,
194
199
  schema: { variables: {} },
195
- fromCache: false
200
+ fromCache: false,
196
201
  };
197
202
  }
198
203
  if (!response.ok) {
@@ -207,13 +212,13 @@ export async function fetchVariableSchema(workflowId, nodeId, config, authProvid
207
212
  }
208
213
  return {
209
214
  success: false,
210
- error: 'Authentication failed'
215
+ error: "Authentication failed",
211
216
  };
212
217
  }
213
218
  const errorText = await response.text();
214
219
  return {
215
220
  success: false,
216
- error: `HTTP ${response.status}: ${errorText || response.statusText}`
221
+ error: `HTTP ${response.status}: ${errorText || response.statusText}`,
217
222
  };
218
223
  }
219
224
  const data = await response.json();
@@ -223,15 +228,17 @@ export async function fetchVariableSchema(workflowId, nodeId, config, authProvid
223
228
  // 3. Wrapped in { schema: { variables: {...} } }
224
229
  // 4. Wrapped in { success: true, data: { variables: {...} } }
225
230
  let schema;
226
- if (data.variables && typeof data.variables === 'object') {
231
+ if (data.variables && typeof data.variables === "object") {
227
232
  // Direct VariableSchema
228
233
  schema = data;
229
234
  }
230
- else if (data.data?.variables && typeof data.data.variables === 'object') {
235
+ else if (data.data?.variables &&
236
+ typeof data.data.variables === "object") {
231
237
  // Wrapped in { data: ... }
232
238
  schema = data.data;
233
239
  }
234
- else if (data.schema?.variables && typeof data.schema.variables === 'object') {
240
+ else if (data.schema?.variables &&
241
+ typeof data.schema.variables === "object") {
235
242
  // Wrapped in { schema: ... }
236
243
  schema = data.schema;
237
244
  }
@@ -242,7 +249,7 @@ export async function fetchVariableSchema(workflowId, nodeId, config, authProvid
242
249
  if (!schema) {
243
250
  return {
244
251
  success: false,
245
- error: 'Invalid variable schema format received from endpoint'
252
+ error: "Invalid variable schema format received from endpoint",
246
253
  };
247
254
  }
248
255
  // Cache the schema (if caching is enabled)
@@ -250,32 +257,32 @@ export async function fetchVariableSchema(workflowId, nodeId, config, authProvid
250
257
  variableCache.set(cacheKey, {
251
258
  schema,
252
259
  cachedAt: Date.now(),
253
- cacheKey
260
+ cacheKey,
254
261
  });
255
262
  }
256
263
  return {
257
264
  success: true,
258
265
  schema,
259
- fromCache: false
266
+ fromCache: false,
260
267
  };
261
268
  }
262
269
  catch (error) {
263
270
  // Handle specific error types
264
271
  if (error instanceof Error) {
265
- if (error.name === 'AbortError' || error.name === 'TimeoutError') {
272
+ if (error.name === "AbortError" || error.name === "TimeoutError") {
266
273
  return {
267
274
  success: false,
268
- error: `Request timed out after ${timeout}ms`
275
+ error: `Request timed out after ${timeout}ms`,
269
276
  };
270
277
  }
271
278
  return {
272
279
  success: false,
273
- error: error.message
280
+ error: error.message,
274
281
  };
275
282
  }
276
283
  return {
277
284
  success: false,
278
- error: 'Unknown error occurred while fetching variable schema'
285
+ error: "Unknown error occurred while fetching variable schema",
279
286
  };
280
287
  }
281
288
  }
@@ -6,9 +6,9 @@
6
6
  *
7
7
  * @module services/autoSaveService
8
8
  */
9
- import { getBehaviorSettings, onSettingsChange } from '../stores/settingsStore.svelte.js';
10
- import { isDirty } from '../stores/workflowStore.svelte.js';
11
- import { logger } from '../utils/logger.js';
9
+ import { getBehaviorSettings, onSettingsChange, } from "../stores/settingsStore.svelte.js";
10
+ import { isDirty } from "../stores/workflowStore.svelte.js";
11
+ import { logger } from "../utils/logger.js";
12
12
  /**
13
13
  * Initialize auto-save functionality based on user settings
14
14
  *
@@ -45,7 +45,7 @@ export function initAutoSave(options) {
45
45
  intervalId: null,
46
46
  isSaving: false,
47
47
  settingsUnsubscriber: null,
48
- dirtyUnsubscriber: null
48
+ dirtyUnsubscriber: null,
49
49
  };
50
50
  /**
51
51
  * Perform auto-save if conditions are met
@@ -62,7 +62,7 @@ export function initAutoSave(options) {
62
62
  }
63
63
  catch (error) {
64
64
  const err = error instanceof Error ? error : new Error(String(error));
65
- logger.error('Auto-save failed:', err);
65
+ logger.error("Auto-save failed:", err);
66
66
  onError?.(err);
67
67
  }
68
68
  finally {
@@ -88,7 +88,7 @@ export function initAutoSave(options) {
88
88
  }
89
89
  // Listen for settings changes to react to auto-save toggle/interval changes
90
90
  state.settingsUnsubscriber = onSettingsChange((event) => {
91
- if (event.category === 'behavior') {
91
+ if (event.category === "behavior") {
92
92
  updateAutoSaveInterval();
93
93
  }
94
94
  });
@@ -147,7 +147,7 @@ export class AutoSaveManager {
147
147
  return; // Already started
148
148
  }
149
149
  this.settingsUnsubscriber = onSettingsChange((event) => {
150
- if (event.category === 'behavior') {
150
+ if (event.category === "behavior") {
151
151
  this.updateInterval();
152
152
  }
153
153
  });
@@ -217,7 +217,7 @@ export class AutoSaveManager {
217
217
  }
218
218
  catch (error) {
219
219
  const err = error instanceof Error ? error : new Error(String(error));
220
- logger.error('Auto-save failed:', err);
220
+ logger.error("Auto-save failed:", err);
221
221
  this.onError?.(err);
222
222
  }
223
223
  finally {
@@ -2,8 +2,8 @@
2
2
  * Categories API Service
3
3
  * Handles fetching category definitions from the backend
4
4
  */
5
- import type { CategoryDefinition } from '../types/index.js';
6
- import type { EndpointConfig } from '../config/endpoints.js';
5
+ import type { CategoryDefinition } from "../types/index.js";
6
+ import type { EndpointConfig } from "../config/endpoints.js";
7
7
  /**
8
8
  * Fetch category definitions from API
9
9
  */
@@ -2,9 +2,9 @@
2
2
  * Categories API Service
3
3
  * Handles fetching category definitions from the backend
4
4
  */
5
- import { buildEndpointUrl } from '../config/endpoints.js';
6
- import { DEFAULT_CATEGORIES } from '../config/defaultCategories.js';
7
- import { logger } from '../utils/logger.js';
5
+ import { buildEndpointUrl } from "../config/endpoints.js";
6
+ import { DEFAULT_CATEGORIES } from "../config/defaultCategories.js";
7
+ import { logger } from "../utils/logger.js";
8
8
  /**
9
9
  * Fetch category definitions from API
10
10
  */
@@ -12,7 +12,7 @@ export async function fetchCategories(endpointConfig) {
12
12
  try {
13
13
  const url = buildEndpointUrl(endpointConfig, endpointConfig.endpoints.categories);
14
14
  const response = await fetch(url, {
15
- headers: { 'Content-Type': 'application/json' }
15
+ headers: { "Content-Type": "application/json" },
16
16
  });
17
17
  if (!response.ok) {
18
18
  throw new Error(`HTTP ${response.status}: ${response.statusText}`);
@@ -20,13 +20,13 @@ export async function fetchCategories(endpointConfig) {
20
20
  const data = await response.json();
21
21
  const categories = data.data ?? data;
22
22
  if (!categories || !Array.isArray(categories)) {
23
- logger.warn('Invalid categories received from API, using default');
23
+ logger.warn("Invalid categories received from API, using default");
24
24
  return DEFAULT_CATEGORIES;
25
25
  }
26
26
  return categories;
27
27
  }
28
28
  catch (error) {
29
- logger.error('Error fetching categories:', error);
29
+ logger.error("Error fetching categories:", error);
30
30
  return DEFAULT_CATEGORIES;
31
31
  }
32
32
  }
@@ -38,10 +38,10 @@ export function validateCategories(categories) {
38
38
  return false;
39
39
  }
40
40
  for (const category of categories) {
41
- if (!category.name || typeof category.name !== 'string') {
41
+ if (!category.name || typeof category.name !== "string") {
42
42
  return false;
43
43
  }
44
- if (!category.label || typeof category.label !== 'string') {
44
+ if (!category.label || typeof category.label !== "string") {
45
45
  return false;
46
46
  }
47
47
  }
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @module services/draftStorage
8
8
  */
9
- import type { Workflow } from '../types/index.js';
9
+ import type { Workflow } from "../types/index.js";
10
10
  /**
11
11
  * Draft metadata stored alongside the workflow
12
12
  */
@@ -6,11 +6,11 @@
6
6
  *
7
7
  * @module services/draftStorage
8
8
  */
9
- import { logger } from '../utils/logger.js';
9
+ import { logger } from "../utils/logger.js";
10
10
  /**
11
11
  * Default storage key prefix
12
12
  */
13
- const STORAGE_KEY_PREFIX = 'flowdrop:draft';
13
+ const STORAGE_KEY_PREFIX = "flowdrop:draft";
14
14
  /**
15
15
  * Generate a storage key for a workflow
16
16
  *
@@ -44,15 +44,15 @@ export function saveDraft(workflow, storageKey) {
44
44
  metadata: {
45
45
  savedAt: new Date().toISOString(),
46
46
  workflowId: workflow.id,
47
- workflowName: workflow.name
48
- }
47
+ workflowName: workflow.name,
48
+ },
49
49
  };
50
50
  localStorage.setItem(storageKey, JSON.stringify(draft));
51
51
  return true;
52
52
  }
53
53
  catch (error) {
54
54
  // localStorage might be full or disabled
55
- logger.warn('Failed to save draft to localStorage:', error);
55
+ logger.warn("Failed to save draft to localStorage:", error);
56
56
  return false;
57
57
  }
58
58
  }
@@ -71,13 +71,13 @@ export function loadDraft(storageKey) {
71
71
  const draft = JSON.parse(stored);
72
72
  // Validate the draft structure
73
73
  if (!draft.workflow || !draft.metadata) {
74
- logger.warn('Invalid draft structure in localStorage');
74
+ logger.warn("Invalid draft structure in localStorage");
75
75
  return null;
76
76
  }
77
77
  return draft;
78
78
  }
79
79
  catch (error) {
80
- logger.warn('Failed to load draft from localStorage:', error);
80
+ logger.warn("Failed to load draft from localStorage:", error);
81
81
  return null;
82
82
  }
83
83
  }
@@ -91,7 +91,7 @@ export function deleteDraft(storageKey) {
91
91
  localStorage.removeItem(storageKey);
92
92
  }
93
93
  catch (error) {
94
- logger.warn('Failed to delete draft from localStorage:', error);
94
+ logger.warn("Failed to delete draft from localStorage:", error);
95
95
  }
96
96
  }
97
97
  /**
@@ -272,15 +272,15 @@ export class DraftAutoSaveManager {
272
272
  nodes: workflow.nodes.map((n) => ({
273
273
  id: n.id,
274
274
  position: n.position,
275
- data: n.data
275
+ data: n.data,
276
276
  })),
277
277
  edges: workflow.edges.map((e) => ({
278
278
  id: e.id,
279
279
  source: e.source,
280
280
  target: e.target,
281
281
  sourceHandle: e.sourceHandle,
282
- targetHandle: e.targetHandle
283
- }))
282
+ targetHandle: e.targetHandle,
283
+ })),
284
284
  };
285
285
  return JSON.stringify(toHash);
286
286
  }
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * @module services/dynamicSchemaService
7
7
  */
8
- import type { ConfigSchema, DynamicSchemaEndpoint, ExternalEditLink, ConfigEditOptions, WorkflowNode } from '../types/index.js';
8
+ import type { ConfigSchema, DynamicSchemaEndpoint, ExternalEditLink, ConfigEditOptions, WorkflowNode } from "../types/index.js";
9
9
  /**
10
10
  * Result of a dynamic schema fetch operation
11
11
  */
@@ -5,8 +5,8 @@
5
5
  *
6
6
  * @module services/dynamicSchemaService
7
7
  */
8
- import { getEndpointConfig } from './api.js';
9
- import { DEFAULT_CACHE_TTL_MS } from '../config/constants.js';
8
+ import { getEndpointConfig } from "./api.js";
9
+ import { DEFAULT_CACHE_TTL_MS } from "../config/constants.js";
10
10
  /**
11
11
  * Schema cache with TTL support
12
12
  * Key format: `{nodeTypeId}:{instanceId}` or `{nodeTypeId}` for type-level caching
@@ -30,13 +30,13 @@ const DEFAULT_CACHE_TTL = DEFAULT_CACHE_TTL_MS;
30
30
  * ```
31
31
  */
32
32
  function resolveVariablePath(context, path) {
33
- const parts = path.split('.');
33
+ const parts = path.split(".");
34
34
  let current = context;
35
35
  for (const part of parts) {
36
36
  if (current === null || current === undefined) {
37
37
  return undefined;
38
38
  }
39
- if (typeof current === 'object' && part in current) {
39
+ if (typeof current === "object" && part in current) {
40
40
  current = current[part];
41
41
  }
42
42
  else {
@@ -77,7 +77,7 @@ function resolveTemplate(template, parameterMapping, context) {
77
77
  const value = resolveVariablePath(context, contextPath);
78
78
  if (value !== undefined) {
79
79
  // Use global regex to replace all occurrences
80
- const regex = new RegExp(`\\{${variableName}\\}`, 'g');
80
+ const regex = new RegExp(`\\{${variableName}\\}`, "g");
81
81
  resolved = resolved.replace(regex, encodeURIComponent(value));
82
82
  }
83
83
  }
@@ -145,7 +145,7 @@ export async function fetchDynamicSchema(endpoint, node, workflowId) {
145
145
  metadata: node.data.metadata,
146
146
  config: node.data.config,
147
147
  extensions: node.data.extensions,
148
- workflowId
148
+ workflowId,
149
149
  };
150
150
  // Generate cache key
151
151
  const cacheKey = generateCacheKey(endpoint, context);
@@ -156,39 +156,41 @@ export async function fetchDynamicSchema(endpoint, node, workflowId) {
156
156
  return {
157
157
  success: true,
158
158
  schema: cached.schema,
159
- fromCache: true
159
+ fromCache: true,
160
160
  };
161
161
  }
162
162
  }
163
163
  // Resolve the URL with template variables
164
164
  let url = resolveTemplate(endpoint.url, endpoint.parameterMapping, context);
165
165
  // If URL is relative, try to prepend base URL from endpoint config
166
- if (url.startsWith('/')) {
166
+ if (url.startsWith("/")) {
167
167
  const currentConfig = getEndpointConfig();
168
168
  if (currentConfig?.baseUrl) {
169
169
  // Remove trailing slash from base URL and leading slash from relative URL
170
- const baseUrl = currentConfig.baseUrl.replace(/\/$/, '');
170
+ const baseUrl = currentConfig.baseUrl.replace(/\/$/, "");
171
171
  url = `${baseUrl}${url}`;
172
172
  }
173
173
  }
174
174
  // Prepare request options
175
- const method = endpoint.method ?? 'GET';
175
+ const method = endpoint.method ?? "GET";
176
176
  const timeout = endpoint.timeout ?? 10000;
177
177
  const headers = {
178
- Accept: 'application/json',
179
- 'Content-Type': 'application/json',
180
- ...endpoint.headers
178
+ Accept: "application/json",
179
+ "Content-Type": "application/json",
180
+ ...endpoint.headers,
181
181
  };
182
182
  // Add auth headers from endpoint config if available
183
183
  const currentConfig = getEndpointConfig();
184
184
  if (currentConfig?.auth) {
185
- if (currentConfig.auth.type === 'bearer' && currentConfig.auth.token) {
186
- headers['Authorization'] = `Bearer ${currentConfig.auth.token}`;
185
+ if (currentConfig.auth.type === "bearer" && currentConfig.auth.token) {
186
+ headers["Authorization"] = `Bearer ${currentConfig.auth.token}`;
187
187
  }
188
- else if (currentConfig.auth.type === 'api_key' && currentConfig.auth.apiKey) {
189
- headers['X-API-Key'] = currentConfig.auth.apiKey;
188
+ else if (currentConfig.auth.type === "api_key" &&
189
+ currentConfig.auth.apiKey) {
190
+ headers["X-API-Key"] = currentConfig.auth.apiKey;
190
191
  }
191
- else if (currentConfig.auth.type === 'custom' && currentConfig.auth.headers) {
192
+ else if (currentConfig.auth.type === "custom" &&
193
+ currentConfig.auth.headers) {
192
194
  Object.assign(headers, currentConfig.auth.headers);
193
195
  }
194
196
  }
@@ -196,14 +198,14 @@ export async function fetchDynamicSchema(endpoint, node, workflowId) {
196
198
  const fetchOptions = {
197
199
  method,
198
200
  headers,
199
- signal: AbortSignal.timeout(timeout)
201
+ signal: AbortSignal.timeout(timeout),
200
202
  };
201
203
  // Add body for non-GET requests
202
- if (method !== 'GET' && endpoint.body) {
204
+ if (method !== "GET" && endpoint.body) {
203
205
  // Resolve any template variables in the body
204
206
  const resolvedBody = {};
205
207
  for (const [key, value] of Object.entries(endpoint.body)) {
206
- if (typeof value === 'string') {
208
+ if (typeof value === "string") {
207
209
  resolvedBody[key] = resolveTemplate(value, endpoint.parameterMapping, context);
208
210
  }
209
211
  else {
@@ -218,7 +220,7 @@ export async function fetchDynamicSchema(endpoint, node, workflowId) {
218
220
  const errorText = await response.text();
219
221
  return {
220
222
  success: false,
221
- error: `HTTP ${response.status}: ${errorText || response.statusText}`
223
+ error: `HTTP ${response.status}: ${errorText || response.statusText}`,
222
224
  };
223
225
  }
224
226
  const data = await response.json();
@@ -227,26 +229,26 @@ export async function fetchDynamicSchema(endpoint, node, workflowId) {
227
229
  // 2. Wrapped in { data: ConfigSchema } or { schema: ConfigSchema }
228
230
  // 3. Wrapped in { success: true, data: ConfigSchema }
229
231
  let schema;
230
- if (data.type === 'object' && data.properties) {
232
+ if (data.type === "object" && data.properties) {
231
233
  // Direct ConfigSchema
232
234
  schema = data;
233
235
  }
234
- else if (data.data?.type === 'object' && data.data?.properties) {
236
+ else if (data.data?.type === "object" && data.data?.properties) {
235
237
  // Wrapped in { data: ... }
236
238
  schema = data.data;
237
239
  }
238
- else if (data.schema?.type === 'object' && data.schema?.properties) {
240
+ else if (data.schema?.type === "object" && data.schema?.properties) {
239
241
  // Wrapped in { schema: ... }
240
242
  schema = data.schema;
241
243
  }
242
- else if (data.success && data.data?.type === 'object') {
244
+ else if (data.success && data.data?.type === "object") {
243
245
  // Wrapped in { success: true, data: ... }
244
246
  schema = data.data;
245
247
  }
246
248
  if (!schema) {
247
249
  return {
248
250
  success: false,
249
- error: 'Invalid schema format received from endpoint'
251
+ error: "Invalid schema format received from endpoint",
250
252
  };
251
253
  }
252
254
  // Cache the schema (if caching is enabled)
@@ -254,32 +256,32 @@ export async function fetchDynamicSchema(endpoint, node, workflowId) {
254
256
  schemaCache.set(cacheKey, {
255
257
  schema,
256
258
  cachedAt: Date.now(),
257
- cacheKey
259
+ cacheKey,
258
260
  });
259
261
  }
260
262
  return {
261
263
  success: true,
262
264
  schema,
263
- fromCache: false
265
+ fromCache: false,
264
266
  };
265
267
  }
266
268
  catch (error) {
267
269
  // Handle specific error types
268
270
  if (error instanceof Error) {
269
- if (error.name === 'AbortError' || error.name === 'TimeoutError') {
271
+ if (error.name === "AbortError" || error.name === "TimeoutError") {
270
272
  return {
271
273
  success: false,
272
- error: `Request timed out after ${timeout}ms`
274
+ error: `Request timed out after ${timeout}ms`,
273
275
  };
274
276
  }
275
277
  return {
276
278
  success: false,
277
- error: error.message
279
+ error: error.message,
278
280
  };
279
281
  }
280
282
  return {
281
283
  success: false,
282
- error: 'Unknown error occurred while fetching schema'
284
+ error: "Unknown error occurred while fetching schema",
283
285
  };
284
286
  }
285
287
  }
@@ -311,13 +313,13 @@ export function resolveExternalEditUrl(link, node, workflowId, callbackUrl) {
311
313
  metadata: node.data.metadata,
312
314
  config: node.data.config,
313
315
  extensions: node.data.extensions,
314
- workflowId
316
+ workflowId,
315
317
  };
316
318
  // Resolve the URL with template variables
317
319
  let url = resolveTemplate(link.url, link.parameterMapping, context);
318
320
  // Append callback URL if configured
319
321
  if (callbackUrl && link.callbackUrlParam) {
320
- const separator = url.includes('?') ? '&' : '?';
322
+ const separator = url.includes("?") ? "&" : "?";
321
323
  url = `${url}${separator}${link.callbackUrlParam}=${encodeURIComponent(callbackUrl)}`;
322
324
  }
323
325
  return url;
@@ -351,16 +353,16 @@ export function getEffectiveConfigEditOptions(node) {
351
353
  externalEditLink: (instanceConfig.externalEditLink ?? typeConfig.externalEditLink)
352
354
  ? {
353
355
  ...(typeConfig.externalEditLink ?? {}),
354
- ...(instanceConfig.externalEditLink ?? {})
356
+ ...(instanceConfig.externalEditLink ?? {}),
355
357
  }
356
358
  : undefined,
357
359
  // Deep merge dynamic schema
358
360
  dynamicSchema: (instanceConfig.dynamicSchema ?? typeConfig.dynamicSchema)
359
361
  ? {
360
362
  ...(typeConfig.dynamicSchema ?? {}),
361
- ...(instanceConfig.dynamicSchema ?? {})
363
+ ...(instanceConfig.dynamicSchema ?? {}),
362
364
  }
363
- : undefined
365
+ : undefined,
364
366
  };
365
367
  }
366
368
  /**
@@ -393,7 +395,7 @@ export function invalidateSchemaCache(node, endpoint) {
393
395
  type: node.type,
394
396
  metadata: node.data.metadata,
395
397
  config: node.data.config,
396
- extensions: node.data.extensions
398
+ extensions: node.data.extensions,
397
399
  };
398
400
  const cacheKey = generateCacheKey(endpoint, context);
399
401
  schemaCache.delete(cacheKey);