@flowdrop/flowdrop 1.0.1 → 1.2.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.
- package/README.md +50 -50
- package/dist/adapters/WorkflowAdapter.d.ts +1 -1
- package/dist/adapters/WorkflowAdapter.js +25 -25
- package/dist/adapters/agentspec/AgentSpecAdapter.d.ts +2 -2
- package/dist/adapters/agentspec/AgentSpecAdapter.js +133 -122
- package/dist/adapters/agentspec/agentAdapter.d.ts +2 -2
- package/dist/adapters/agentspec/agentAdapter.js +10 -10
- package/dist/adapters/agentspec/autoLayout.d.ts +1 -1
- package/dist/adapters/agentspec/autoLayout.js +2 -2
- package/dist/adapters/agentspec/componentTypeDefaults.d.ts +1 -1
- package/dist/adapters/agentspec/componentTypeDefaults.js +120 -120
- package/dist/adapters/agentspec/defaultNodeTypes.d.ts +2 -2
- package/dist/adapters/agentspec/defaultNodeTypes.js +307 -307
- package/dist/adapters/agentspec/index.d.ts +10 -10
- package/dist/adapters/agentspec/index.js +6 -6
- package/dist/adapters/agentspec/validator.d.ts +2 -2
- package/dist/adapters/agentspec/validator.js +22 -20
- package/dist/api/enhanced-client.d.ts +3 -3
- package/dist/api/enhanced-client.js +73 -72
- package/dist/components/App.svelte +1090 -961
- package/dist/components/App.svelte.d.ts +9 -6
- package/dist/components/CanvasBanner.stories.svelte +23 -20
- package/dist/components/CanvasBanner.stories.svelte.d.ts +1 -1
- package/dist/components/CanvasBanner.svelte +52 -46
- package/dist/components/ConfigForm.svelte +1164 -1065
- package/dist/components/ConfigForm.svelte.d.ts +2 -2
- package/dist/components/ConfigModal.svelte +180 -180
- package/dist/components/ConfigModal.svelte.d.ts +1 -1
- package/dist/components/ConfigPanel.stories.svelte +35 -35
- package/dist/components/ConfigPanel.stories.svelte.d.ts +1 -1
- package/dist/components/ConfigPanel.svelte +178 -167
- package/dist/components/ConfigPanel.svelte.d.ts +1 -1
- package/dist/components/ConnectionLine.svelte +25 -25
- package/dist/components/EdgeRefresher.svelte +26 -26
- package/dist/components/FlowDropEdge.stories.svelte +179 -143
- package/dist/components/FlowDropEdge.svelte +147 -147
- package/dist/components/FlowDropEdge.svelte.d.ts +1 -1
- package/dist/components/FlowDropZone.svelte +63 -60
- package/dist/components/FlowDropZone.svelte.d.ts +1 -1
- package/dist/components/LoadingSpinner.stories.svelte +19 -19
- package/dist/components/LoadingSpinner.stories.svelte.d.ts +1 -1
- package/dist/components/LoadingSpinner.svelte +21 -21
- package/dist/components/LoadingSpinner.svelte.d.ts +1 -1
- package/dist/components/Logo.stories.svelte +13 -13
- package/dist/components/Logo.stories.svelte.d.ts +1 -1
- package/dist/components/Logo.svelte +101 -95
- package/dist/components/LogsSidebar.svelte +553 -546
- package/dist/components/LogsSidebar.svelte.d.ts +1 -1
- package/dist/components/MarkdownDisplay.stories.svelte +29 -23
- package/dist/components/MarkdownDisplay.stories.svelte.d.ts +1 -1
- package/dist/components/MarkdownDisplay.svelte +16 -14
- package/dist/components/Navbar.stories.svelte +43 -38
- package/dist/components/Navbar.stories.svelte.d.ts +1 -1
- package/dist/components/Navbar.svelte +760 -706
- package/dist/components/Navbar.svelte.d.ts +1 -1
- package/dist/components/NodeSidebar.svelte +905 -746
- package/dist/components/NodeSidebar.svelte.d.ts +5 -1
- package/dist/components/NodeStatusOverlay.stories.svelte +82 -70
- package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +1 -1
- package/dist/components/NodeStatusOverlay.svelte +295 -280
- package/dist/components/NodeStatusOverlay.svelte.d.ts +3 -3
- package/dist/components/PipelineStatus.svelte +326 -300
- package/dist/components/PipelineStatus.svelte.d.ts +4 -4
- package/dist/components/PortCoordinateTracker.svelte +49 -47
- package/dist/components/PortCoordinateTracker.svelte.d.ts +1 -1
- package/dist/components/ReadOnlyDetails.svelte +156 -156
- package/dist/components/SchemaForm.stories.svelte +106 -98
- package/dist/components/SchemaForm.stories.svelte.d.ts +1 -1
- package/dist/components/SchemaForm.svelte +490 -463
- package/dist/components/SchemaForm.svelte.d.ts +2 -2
- package/dist/components/SettingsModal.svelte +226 -223
- package/dist/components/SettingsModal.svelte.d.ts +1 -1
- package/dist/components/SettingsPanel.svelte +637 -601
- package/dist/components/SettingsPanel.svelte.d.ts +1 -1
- package/dist/components/StatusIcon.stories.svelte +62 -49
- package/dist/components/StatusIcon.stories.svelte.d.ts +1 -1
- package/dist/components/StatusIcon.svelte +87 -87
- package/dist/components/StatusIcon.svelte.d.ts +2 -2
- package/dist/components/StatusLabel.stories.svelte +12 -12
- package/dist/components/StatusLabel.stories.svelte.d.ts +1 -1
- package/dist/components/StatusLabel.svelte +19 -19
- package/dist/components/ThemeToggle.stories.svelte +16 -16
- package/dist/components/ThemeToggle.stories.svelte.d.ts +1 -1
- package/dist/components/ThemeToggle.svelte +180 -169
- package/dist/components/ThemeToggle.svelte.d.ts +1 -1
- package/dist/components/UniversalNode.svelte +150 -138
- package/dist/components/UniversalNode.svelte.d.ts +3 -3
- package/dist/components/WorkflowEditor.svelte +1069 -1014
- package/dist/components/WorkflowEditor.svelte.d.ts +4 -4
- package/dist/components/form/FormArray.svelte +1034 -973
- package/dist/components/form/FormArray.svelte.d.ts +1 -1
- package/dist/components/form/FormAutocomplete.svelte +1021 -978
- package/dist/components/form/FormAutocomplete.svelte.d.ts +1 -1
- package/dist/components/form/FormCheckboxGroup.stories.svelte +23 -20
- package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormCheckboxGroup.svelte +136 -136
- package/dist/components/form/FormCodeEditor.svelte +452 -434
- package/dist/components/form/FormField.svelte +366 -355
- package/dist/components/form/FormField.svelte.d.ts +2 -2
- package/dist/components/form/FormFieldLight.svelte +400 -384
- package/dist/components/form/FormFieldLight.svelte.d.ts +1 -1
- package/dist/components/form/FormFieldWrapper.stories.svelte +42 -42
- package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormFieldWrapper.svelte +100 -93
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +1 -1
- package/dist/components/form/FormFieldset.svelte +108 -108
- package/dist/components/form/FormFieldset.svelte.d.ts +2 -2
- package/dist/components/form/FormMarkdownEditor.svelte +758 -725
- package/dist/components/form/FormNumberField.stories.svelte +25 -25
- package/dist/components/form/FormNumberField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormNumberField.svelte +88 -88
- package/dist/components/form/FormRangeField.stories.svelte +20 -20
- package/dist/components/form/FormRangeField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormRangeField.svelte +234 -226
- package/dist/components/form/FormSelect.stories.svelte +38 -38
- package/dist/components/form/FormSelect.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormSelect.svelte +101 -101
- package/dist/components/form/FormSelect.svelte.d.ts +1 -1
- package/dist/components/form/FormTemplateEditor.svelte +847 -798
- package/dist/components/form/FormTemplateEditor.svelte.d.ts +1 -1
- package/dist/components/form/FormTextField.stories.svelte +29 -23
- package/dist/components/form/FormTextField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormTextField.svelte +68 -68
- package/dist/components/form/FormTextarea.stories.svelte +28 -25
- package/dist/components/form/FormTextarea.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormTextarea.svelte +74 -74
- package/dist/components/form/FormToggle.stories.svelte +23 -20
- package/dist/components/form/FormToggle.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormToggle.svelte +98 -98
- package/dist/components/form/FormUISchemaRenderer.svelte +120 -113
- package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +3 -3
- package/dist/components/form/index.d.ts +19 -19
- package/dist/components/form/index.js +18 -18
- package/dist/components/form/templateAutocomplete.d.ts +2 -2
- package/dist/components/form/templateAutocomplete.js +64 -55
- package/dist/components/form/types.d.ts +6 -6
- package/dist/components/form/types.js +9 -4
- package/dist/components/icons/AlertCircleIcon.svelte +11 -0
- package/dist/components/icons/AlertCircleIcon.svelte.d.ts +26 -0
- package/dist/components/icons/CogIcon.svelte +11 -0
- package/dist/components/icons/CogIcon.svelte.d.ts +26 -0
- package/dist/components/interrupt/ChoicePrompt.stories.svelte +54 -38
- package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ChoicePrompt.svelte +407 -383
- package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +48 -48
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ConfirmationPrompt.svelte +280 -274
- package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/FormPrompt.svelte +223 -218
- package/dist/components/interrupt/FormPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/InterruptBubble.svelte +617 -583
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +2 -2
- package/dist/components/interrupt/ReviewPrompt.stories.svelte +66 -56
- package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ReviewPrompt.svelte +861 -841
- package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/TextInputPrompt.stories.svelte +38 -33
- package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/TextInputPrompt.svelte +333 -328
- package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/index.d.ts +5 -5
- package/dist/components/interrupt/index.js +5 -5
- package/dist/components/layouts/MainLayout.svelte +724 -691
- package/dist/components/layouts/MainLayout.svelte.d.ts +6 -6
- package/dist/components/nodes/GatewayNode.stories.svelte +100 -99
- package/dist/components/nodes/GatewayNode.svelte +605 -571
- package/dist/components/nodes/GatewayNode.svelte.d.ts +3 -3
- package/dist/components/nodes/IdeaNode.stories.svelte +44 -43
- package/dist/components/nodes/IdeaNode.svelte +451 -437
- package/dist/components/nodes/IdeaNode.svelte.d.ts +1 -1
- package/dist/components/nodes/NotesNode.stories.svelte +65 -64
- package/dist/components/nodes/NotesNode.svelte +380 -369
- package/dist/components/nodes/NotesNode.svelte.d.ts +1 -1
- package/dist/components/nodes/SimpleNode.stories.svelte +145 -144
- package/dist/components/nodes/SimpleNode.svelte +486 -424
- package/dist/components/nodes/SimpleNode.svelte.d.ts +1 -1
- package/dist/components/nodes/SquareNode.stories.svelte +73 -73
- package/dist/components/nodes/SquareNode.svelte +439 -380
- package/dist/components/nodes/SquareNode.svelte.d.ts +1 -1
- package/dist/components/nodes/TerminalNode.stories.svelte +13 -13
- package/dist/components/nodes/TerminalNode.svelte +709 -670
- package/dist/components/nodes/TerminalNode.svelte.d.ts +1 -1
- package/dist/components/nodes/ToolNode.stories.svelte +181 -180
- package/dist/components/nodes/ToolNode.svelte +505 -447
- package/dist/components/nodes/ToolNode.svelte.d.ts +1 -1
- package/dist/components/nodes/WorkflowNode.stories.svelte +70 -46
- package/dist/components/nodes/WorkflowNode.svelte +621 -551
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +3 -3
- package/dist/components/playground/ChatPanel.svelte +945 -889
- package/dist/components/playground/ExecutionLogs.svelte +495 -472
- package/dist/components/playground/InputCollector.svelte +449 -428
- package/dist/components/playground/MessageBubble.stories.svelte +47 -47
- package/dist/components/playground/MessageBubble.stories.svelte.d.ts +1 -1
- package/dist/components/playground/MessageBubble.svelte +626 -610
- package/dist/components/playground/MessageBubble.svelte.d.ts +1 -1
- package/dist/components/playground/Playground.svelte +1088 -1057
- package/dist/components/playground/Playground.svelte.d.ts +3 -3
- package/dist/components/playground/PlaygroundModal.svelte +208 -204
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +3 -3
- package/dist/components/playground/SessionManager.svelte +527 -521
- package/dist/components/playground/SessionManager.svelte.d.ts +1 -1
- package/dist/config/agentSpecEndpoints.d.ts +1 -1
- package/dist/config/agentSpecEndpoints.js +20 -20
- package/dist/config/constants.js +2 -2
- package/dist/config/defaultCategories.d.ts +1 -1
- package/dist/config/defaultCategories.js +86 -86
- package/dist/config/defaultPortConfig.d.ts +1 -1
- package/dist/config/defaultPortConfig.js +144 -144
- package/dist/config/endpoints.d.ts +4 -4
- package/dist/config/endpoints.js +65 -65
- package/dist/config/runtimeConfig.d.ts +2 -2
- package/dist/config/runtimeConfig.js +8 -8
- package/dist/core/index.d.ts +63 -59
- package/dist/core/index.js +35 -33
- package/dist/display/index.d.ts +2 -2
- package/dist/display/index.js +2 -2
- package/dist/editor/index.d.ts +62 -62
- package/dist/editor/index.js +53 -53
- package/dist/form/code.d.ts +5 -5
- package/dist/form/code.js +14 -14
- package/dist/form/fieldRegistry.d.ts +3 -3
- package/dist/form/fieldRegistry.js +11 -9
- package/dist/form/full.d.ts +8 -8
- package/dist/form/full.js +9 -9
- package/dist/form/index.d.ts +18 -18
- package/dist/form/index.js +16 -16
- package/dist/form/markdown.d.ts +4 -4
- package/dist/form/markdown.js +8 -8
- package/dist/helpers/proximityConnect.d.ts +3 -3
- package/dist/helpers/proximityConnect.js +34 -32
- package/dist/helpers/workflowEditorHelper.d.ts +5 -5
- package/dist/helpers/workflowEditorHelper.js +108 -96
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/mocks/app-environment.js +2 -2
- package/dist/mocks/app-forms.js +9 -9
- package/dist/mocks/app-navigation.js +11 -11
- package/dist/mocks/app-stores.js +8 -8
- package/dist/playground/index.d.ts +19 -19
- package/dist/playground/index.js +16 -16
- package/dist/playground/mount.d.ts +3 -3
- package/dist/playground/mount.js +24 -24
- package/dist/registry/builtinFormats.js +13 -13
- package/dist/registry/builtinNodes.d.ts +2 -2
- package/dist/registry/builtinNodes.js +77 -77
- package/dist/registry/index.d.ts +4 -4
- package/dist/registry/index.js +4 -4
- package/dist/registry/nodeComponentRegistry.d.ts +8 -8
- package/dist/registry/nodeComponentRegistry.js +11 -9
- package/dist/registry/plugin.d.ts +2 -2
- package/dist/registry/plugin.js +11 -11
- package/dist/registry/workflowFormatRegistry.d.ts +3 -3
- package/dist/registry/workflowFormatRegistry.js +2 -2
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.js +2 -2
- package/dist/services/agentSpecExecutionService.d.ts +3 -3
- package/dist/services/agentSpecExecutionService.js +59 -55
- package/dist/services/api.d.ts +2 -2
- package/dist/services/api.js +37 -37
- package/dist/services/apiVariableService.d.ts +1 -1
- package/dist/services/apiVariableService.js +41 -34
- package/dist/services/autoSaveService.js +8 -8
- package/dist/services/categoriesApi.d.ts +2 -2
- package/dist/services/categoriesApi.js +8 -8
- package/dist/services/draftStorage.d.ts +1 -1
- package/dist/services/draftStorage.js +11 -11
- package/dist/services/dynamicSchemaService.d.ts +1 -1
- package/dist/services/dynamicSchemaService.js +41 -39
- package/dist/services/globalSave.d.ts +2 -2
- package/dist/services/globalSave.js +41 -38
- package/dist/services/historyService.d.ts +1 -1
- package/dist/services/historyService.js +8 -8
- package/dist/services/interruptService.d.ts +1 -1
- package/dist/services/interruptService.js +35 -29
- package/dist/services/nodeExecutionService.d.ts +1 -1
- package/dist/services/nodeExecutionService.js +45 -44
- package/dist/services/playgroundService.d.ts +1 -1
- package/dist/services/playgroundService.js +29 -29
- package/dist/services/portConfigApi.d.ts +2 -2
- package/dist/services/portConfigApi.js +8 -8
- package/dist/services/settingsService.d.ts +2 -2
- package/dist/services/settingsService.js +25 -19
- package/dist/services/toastService.d.ts +4 -4
- package/dist/services/toastService.js +33 -33
- package/dist/services/variableService.d.ts +1 -1
- package/dist/services/variableService.js +36 -36
- package/dist/services/workflowStorage.d.ts +2 -2
- package/dist/services/workflowStorage.js +13 -13
- package/dist/settings/index.d.ts +7 -7
- package/dist/settings/index.js +6 -6
- package/dist/skins/default.d.ts +2 -0
- package/dist/skins/default.js +1 -0
- package/dist/skins/index.d.ts +13 -0
- package/dist/skins/index.js +30 -0
- package/dist/skins/slate.d.ts +2 -0
- package/dist/skins/slate.js +78 -0
- package/dist/stores/categoriesStore.svelte.d.ts +1 -1
- package/dist/stores/categoriesStore.svelte.js +5 -5
- package/dist/stores/editorStateMachine.svelte.d.ts +2 -2
- package/dist/stores/editorStateMachine.svelte.js +65 -33
- package/dist/stores/historyStore.svelte.d.ts +4 -4
- package/dist/stores/historyStore.svelte.js +4 -4
- package/dist/stores/interruptStore.svelte.d.ts +3 -3
- package/dist/stores/interruptStore.svelte.js +21 -21
- package/dist/stores/playgroundStore.svelte.d.ts +2 -2
- package/dist/stores/playgroundStore.svelte.js +25 -18
- package/dist/stores/portCoordinateStore.svelte.d.ts +2 -2
- package/dist/stores/portCoordinateStore.svelte.js +15 -8
- package/dist/stores/settingsStore.svelte.d.ts +2 -2
- package/dist/stores/settingsStore.svelte.js +62 -57
- package/dist/stores/workflowStore.svelte.d.ts +3 -3
- package/dist/stores/workflowStore.svelte.js +50 -47
- package/dist/stories/CanvasDecorator.svelte +35 -32
- package/dist/stories/CanvasDecorator.svelte.d.ts +2 -2
- package/dist/stories/EdgeDecorator.svelte +102 -99
- package/dist/stories/EdgeDecorator.svelte.d.ts +1 -1
- package/dist/stories/NodeDecorator.svelte +59 -53
- package/dist/stories/NodeDecorator.svelte.d.ts +1 -1
- package/dist/stories/utils.d.ts +2 -2
- package/dist/stories/utils.js +105 -67
- package/dist/styles/base.css +599 -595
- package/dist/styles/toast.css +14 -14
- package/dist/styles/tokens.css +409 -378
- package/dist/svelte-app.d.ts +12 -9
- package/dist/svelte-app.js +40 -39
- package/dist/themes/default.d.ts +2 -0
- package/dist/themes/default.js +9 -0
- package/dist/themes/index.d.ts +13 -0
- package/dist/themes/index.js +44 -0
- package/dist/themes/minimal.d.ts +2 -0
- package/dist/themes/minimal.js +11 -0
- package/dist/types/agentspec.d.ts +18 -18
- package/dist/types/agentspec.js +2 -2
- package/dist/types/auth.d.ts +1 -1
- package/dist/types/auth.js +6 -6
- package/dist/types/config.d.ts +6 -6
- package/dist/types/events.d.ts +2 -2
- package/dist/types/events.js +2 -2
- package/dist/types/index.d.ts +32 -32
- package/dist/types/index.js +6 -6
- package/dist/types/interrupt.d.ts +6 -6
- package/dist/types/interrupt.js +21 -21
- package/dist/types/interruptState.d.ts +12 -12
- package/dist/types/interruptState.js +66 -66
- package/dist/types/playground.d.ts +7 -7
- package/dist/types/playground.js +14 -14
- package/dist/types/settings.d.ts +5 -3
- package/dist/types/settings.js +25 -18
- package/dist/types/skin.d.ts +31 -0
- package/dist/types/skin.js +1 -0
- package/dist/types/theme.d.ts +35 -0
- package/dist/types/theme.js +1 -0
- package/dist/types/uischema.d.ts +4 -4
- package/dist/types/uischema.js +3 -3
- package/dist/utils/colors.d.ts +1 -1
- package/dist/utils/colors.js +97 -95
- package/dist/utils/config.d.ts +2 -2
- package/dist/utils/config.js +48 -48
- package/dist/utils/connections.d.ts +2 -2
- package/dist/utils/connections.js +15 -15
- package/dist/utils/errors.js +3 -3
- package/dist/utils/fetchWithAuth.d.ts +1 -1
- package/dist/utils/fetchWithAuth.js +2 -2
- package/dist/utils/handleIds.d.ts +2 -2
- package/dist/utils/handleIds.js +8 -8
- package/dist/utils/handlePositioning.d.ts +1 -1
- package/dist/utils/handlePositioning.js +2 -2
- package/dist/utils/icons.d.ts +1 -1
- package/dist/utils/icons.js +74 -74
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/logger.js +7 -7
- package/dist/utils/nodeStatus.d.ts +1 -1
- package/dist/utils/nodeStatus.js +48 -48
- package/dist/utils/nodeTypes.d.ts +1 -1
- package/dist/utils/nodeTypes.js +21 -20
- package/dist/utils/nodeWrapper.d.ts +7 -7
- package/dist/utils/nodeWrapper.js +21 -19
- package/dist/utils/performanceUtils.d.ts +1 -1
- package/dist/utils/performanceUtils.js +2 -1
- package/dist/utils/sanitize.js +1 -1
- package/dist/utils/uischema.d.ts +2 -2
- package/dist/utils/uischema.js +8 -8
- package/dist/utils/validation.js +20 -8
- package/package.json +1 -1
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
* Workflow Editor Helper
|
|
3
3
|
* Contains business logic for workflow operations
|
|
4
4
|
*/
|
|
5
|
-
import { MarkerType } from
|
|
6
|
-
import { hasCycles, hasInvalidCycles, isLoopbackEdge } from
|
|
7
|
-
import { workflowApi, nodeApi, setEndpointConfig } from
|
|
8
|
-
import { v4 as uuidv4 } from
|
|
9
|
-
import { workflowActions } from
|
|
10
|
-
import { nodeExecutionService } from
|
|
11
|
-
import { WorkflowAdapter } from
|
|
12
|
-
import { AgentSpecAdapter } from
|
|
13
|
-
import { validateForAgentSpecExport } from
|
|
14
|
-
import { extractPortId } from
|
|
15
|
-
import { EDGE_MARKER_SIZES } from
|
|
16
|
-
import { logger } from
|
|
5
|
+
import { MarkerType } from "@xyflow/svelte";
|
|
6
|
+
import { hasCycles, hasInvalidCycles, isLoopbackEdge, } from "../utils/connections.js";
|
|
7
|
+
import { workflowApi, nodeApi, setEndpointConfig } from "../services/api.js";
|
|
8
|
+
import { v4 as uuidv4 } from "uuid";
|
|
9
|
+
import { workflowActions } from "../stores/workflowStore.svelte.js";
|
|
10
|
+
import { nodeExecutionService } from "../services/nodeExecutionService.js";
|
|
11
|
+
import { WorkflowAdapter } from "../adapters/WorkflowAdapter.js";
|
|
12
|
+
import { AgentSpecAdapter } from "../adapters/agentspec/AgentSpecAdapter.js";
|
|
13
|
+
import { validateForAgentSpecExport } from "../adapters/agentspec/validator.js";
|
|
14
|
+
import { extractPortId } from "../utils/handleIds.js";
|
|
15
|
+
import { EDGE_MARKER_SIZES } from "../config/constants.js";
|
|
16
|
+
import { logger } from "../utils/logger.js";
|
|
17
17
|
/**
|
|
18
18
|
* Generate a unique node ID based on node type and existing nodes
|
|
19
19
|
* Format: <node_type>.<number>
|
|
@@ -57,7 +57,7 @@ export class EdgeStylingHelper {
|
|
|
57
57
|
static isGatewayBranch(node, portId) {
|
|
58
58
|
// Check if this is a gateway node with dynamic branches
|
|
59
59
|
const nodeType = node.data?.metadata?.type || node.type;
|
|
60
|
-
if (nodeType !==
|
|
60
|
+
if (nodeType !== "gateway") {
|
|
61
61
|
return false;
|
|
62
62
|
}
|
|
63
63
|
// Check if the portId matches a branch name in config.branches
|
|
@@ -77,7 +77,9 @@ export class EdgeStylingHelper {
|
|
|
77
77
|
*/
|
|
78
78
|
static getPortDataType(node, portId, portType) {
|
|
79
79
|
// First, check static ports in metadata
|
|
80
|
-
const ports = portType ===
|
|
80
|
+
const ports = portType === "output"
|
|
81
|
+
? node.data?.metadata?.outputs
|
|
82
|
+
: node.data?.metadata?.inputs;
|
|
81
83
|
if (ports && Array.isArray(ports)) {
|
|
82
84
|
const port = ports.find((p) => p.id === portId);
|
|
83
85
|
if (port?.dataType) {
|
|
@@ -85,7 +87,7 @@ export class EdgeStylingHelper {
|
|
|
85
87
|
}
|
|
86
88
|
}
|
|
87
89
|
// Check dynamic ports from config (dynamicInputs/dynamicOutputs)
|
|
88
|
-
const dynamicKey = portType ===
|
|
90
|
+
const dynamicKey = portType === "output" ? "dynamicOutputs" : "dynamicInputs";
|
|
89
91
|
const dynamicPorts = node.data?.config?.[dynamicKey];
|
|
90
92
|
if (dynamicPorts && Array.isArray(dynamicPorts)) {
|
|
91
93
|
const dynamicPort = dynamicPorts.find((p) => p.name === portId);
|
|
@@ -95,8 +97,8 @@ export class EdgeStylingHelper {
|
|
|
95
97
|
}
|
|
96
98
|
// For output ports, also check dynamic Gateway branches
|
|
97
99
|
// Gateway branches are always trigger type (control flow)
|
|
98
|
-
if (portType ===
|
|
99
|
-
return
|
|
100
|
+
if (portType === "output" && this.isGatewayBranch(node, portId)) {
|
|
101
|
+
return "trigger";
|
|
100
102
|
}
|
|
101
103
|
return null;
|
|
102
104
|
}
|
|
@@ -109,14 +111,14 @@ export class EdgeStylingHelper {
|
|
|
109
111
|
* @returns The edge category for styling
|
|
110
112
|
*/
|
|
111
113
|
static getEdgeCategory(sourcePortDataType) {
|
|
112
|
-
if (sourcePortDataType ===
|
|
113
|
-
return
|
|
114
|
+
if (sourcePortDataType === "trigger") {
|
|
115
|
+
return "trigger";
|
|
114
116
|
}
|
|
115
|
-
if (sourcePortDataType ===
|
|
116
|
-
return
|
|
117
|
+
if (sourcePortDataType === "tool") {
|
|
118
|
+
return "tool";
|
|
117
119
|
}
|
|
118
120
|
// All other data types (string, number, boolean, array, etc.) are "data" edges
|
|
119
|
-
return
|
|
121
|
+
return "data";
|
|
120
122
|
}
|
|
121
123
|
/**
|
|
122
124
|
* Determine the full edge category including loopback detection
|
|
@@ -130,7 +132,7 @@ export class EdgeStylingHelper {
|
|
|
130
132
|
// Loopback edges are identified by their target handle
|
|
131
133
|
// Check this first as it takes precedence
|
|
132
134
|
if (isLoopbackEdge(edge)) {
|
|
133
|
-
return
|
|
135
|
+
return "loopback";
|
|
134
136
|
}
|
|
135
137
|
// Fall back to source port data type categorization
|
|
136
138
|
return this.getEdgeCategory(sourcePortDataType);
|
|
@@ -147,53 +149,54 @@ export class EdgeStylingHelper {
|
|
|
147
149
|
const sourcePortId = this.extractPortIdFromHandle(edge.sourceHandle);
|
|
148
150
|
// Get the source port's data type
|
|
149
151
|
const sourcePortDataType = sourcePortId
|
|
150
|
-
? this.getPortDataType(sourceNode, sourcePortId,
|
|
152
|
+
? this.getPortDataType(sourceNode, sourcePortId, "output")
|
|
151
153
|
: null;
|
|
152
154
|
// Determine edge category (loopback takes precedence)
|
|
153
155
|
const edgeCategory = this.getEdgeCategoryWithLoopback(edge, sourcePortDataType);
|
|
154
156
|
// Apply styling based on edge category
|
|
155
157
|
// Marker colors use CSS custom properties so they respond to theme changes automatically
|
|
156
158
|
switch (edgeCategory) {
|
|
157
|
-
case
|
|
159
|
+
case "loopback":
|
|
158
160
|
// Loopback edges: dashed gray line for loop iteration
|
|
159
161
|
edge.style =
|
|
160
|
-
|
|
161
|
-
edge.class =
|
|
162
|
+
"stroke: var(--fd-edge-loopback); stroke-dasharray: var(--fd-edge-loopback-dasharray); stroke-width: var(--fd-edge-loopback-width); opacity: var(--fd-edge-loopback-opacity);";
|
|
163
|
+
edge.class = "flowdrop--edge--loopback";
|
|
162
164
|
edge.markerEnd = {
|
|
163
165
|
type: MarkerType.ArrowClosed,
|
|
164
166
|
...EDGE_MARKER_SIZES.loopback,
|
|
165
|
-
color:
|
|
167
|
+
color: "var(--fd-edge-loopback)",
|
|
166
168
|
};
|
|
167
169
|
break;
|
|
168
|
-
case
|
|
170
|
+
case "trigger":
|
|
169
171
|
// Trigger edges: solid dark line for control flow
|
|
170
|
-
edge.style =
|
|
171
|
-
|
|
172
|
+
edge.style =
|
|
173
|
+
"stroke: var(--fd-edge-trigger); stroke-width: var(--fd-edge-trigger-width);";
|
|
174
|
+
edge.class = "flowdrop--edge--trigger";
|
|
172
175
|
edge.markerEnd = {
|
|
173
176
|
type: MarkerType.ArrowClosed,
|
|
174
177
|
...EDGE_MARKER_SIZES.trigger,
|
|
175
|
-
color:
|
|
178
|
+
color: "var(--fd-edge-trigger)",
|
|
176
179
|
};
|
|
177
180
|
break;
|
|
178
|
-
case
|
|
181
|
+
case "tool":
|
|
179
182
|
// Tool edges: dashed amber line
|
|
180
|
-
edge.style =
|
|
181
|
-
edge.class =
|
|
183
|
+
edge.style = "stroke: var(--fd-edge-tool); stroke-dasharray: 5 3;";
|
|
184
|
+
edge.class = "flowdrop--edge--tool";
|
|
182
185
|
edge.markerEnd = {
|
|
183
186
|
type: MarkerType.ArrowClosed,
|
|
184
187
|
...EDGE_MARKER_SIZES.tool,
|
|
185
|
-
color:
|
|
188
|
+
color: "var(--fd-edge-tool)",
|
|
186
189
|
};
|
|
187
190
|
break;
|
|
188
|
-
case
|
|
191
|
+
case "data":
|
|
189
192
|
default:
|
|
190
193
|
// Data edges: normal gray line
|
|
191
|
-
edge.style =
|
|
192
|
-
edge.class =
|
|
194
|
+
edge.style = "stroke: var(--fd-edge-data);";
|
|
195
|
+
edge.class = "flowdrop--edge--data";
|
|
193
196
|
edge.markerEnd = {
|
|
194
197
|
type: MarkerType.ArrowClosed,
|
|
195
198
|
...EDGE_MARKER_SIZES.data,
|
|
196
|
-
color:
|
|
199
|
+
color: "var(--fd-edge-data)",
|
|
197
200
|
};
|
|
198
201
|
break;
|
|
199
202
|
}
|
|
@@ -203,10 +206,10 @@ export class EdgeStylingHelper {
|
|
|
203
206
|
metadata: {
|
|
204
207
|
...(edge.data?.metadata || {}),
|
|
205
208
|
edgeType: edgeCategory,
|
|
206
|
-
sourcePortDataType: sourcePortDataType ?? undefined
|
|
209
|
+
sourcePortDataType: sourcePortDataType ?? undefined,
|
|
207
210
|
},
|
|
208
211
|
targetNodeType: targetNode.type,
|
|
209
|
-
targetCategory: targetNode.data.metadata.category
|
|
212
|
+
targetCategory: targetNode.data.metadata.category,
|
|
210
213
|
};
|
|
211
214
|
}
|
|
212
215
|
/**
|
|
@@ -225,8 +228,8 @@ export class EdgeStylingHelper {
|
|
|
225
228
|
...updatedEdge.data,
|
|
226
229
|
metadata: {
|
|
227
230
|
...(updatedEdge.data?.metadata || {}),
|
|
228
|
-
edgeType:
|
|
229
|
-
}
|
|
231
|
+
edgeType: "data",
|
|
232
|
+
},
|
|
230
233
|
};
|
|
231
234
|
return updatedEdge;
|
|
232
235
|
}
|
|
@@ -254,29 +257,33 @@ export class NodeOperationsHelper {
|
|
|
254
257
|
return fetchedNodes;
|
|
255
258
|
}
|
|
256
259
|
catch (error) {
|
|
257
|
-
logger.error(
|
|
260
|
+
logger.error("Failed to load nodes from API:", error);
|
|
258
261
|
// Use fallback sample nodes
|
|
259
262
|
return [
|
|
260
263
|
{
|
|
261
|
-
id:
|
|
262
|
-
name:
|
|
263
|
-
category:
|
|
264
|
-
description:
|
|
265
|
-
version:
|
|
266
|
-
icon:
|
|
264
|
+
id: "text-input",
|
|
265
|
+
name: "Text Input",
|
|
266
|
+
category: "inputs",
|
|
267
|
+
description: "Simple text input field",
|
|
268
|
+
version: "1.0.0",
|
|
269
|
+
icon: "mdi:text-box",
|
|
267
270
|
inputs: [],
|
|
268
|
-
outputs: [
|
|
271
|
+
outputs: [
|
|
272
|
+
{ id: "text", name: "text", type: "output", dataType: "string" },
|
|
273
|
+
],
|
|
269
274
|
},
|
|
270
275
|
{
|
|
271
|
-
id:
|
|
272
|
-
name:
|
|
273
|
-
category:
|
|
274
|
-
description:
|
|
275
|
-
version:
|
|
276
|
-
icon:
|
|
277
|
-
inputs: [
|
|
278
|
-
|
|
279
|
-
|
|
276
|
+
id: "text-output",
|
|
277
|
+
name: "Text Output",
|
|
278
|
+
category: "outputs",
|
|
279
|
+
description: "Display text output",
|
|
280
|
+
version: "1.0.0",
|
|
281
|
+
icon: "mdi:text-box-outline",
|
|
282
|
+
inputs: [
|
|
283
|
+
{ id: "text", name: "text", type: "input", dataType: "string" },
|
|
284
|
+
],
|
|
285
|
+
outputs: [],
|
|
286
|
+
},
|
|
280
287
|
];
|
|
281
288
|
}
|
|
282
289
|
}
|
|
@@ -295,7 +302,7 @@ export class NodeOperationsHelper {
|
|
|
295
302
|
return executionInfo;
|
|
296
303
|
}
|
|
297
304
|
catch (error) {
|
|
298
|
-
logger.error(
|
|
305
|
+
logger.error("Failed to load node execution info:", error);
|
|
299
306
|
return {};
|
|
300
307
|
}
|
|
301
308
|
}
|
|
@@ -308,7 +315,7 @@ export class NodeOperationsHelper {
|
|
|
308
315
|
// Handle both old format (with type: "node") and new format (direct NodeMetadata)
|
|
309
316
|
let nodeType;
|
|
310
317
|
let nodeData;
|
|
311
|
-
if (parsedData.type ===
|
|
318
|
+
if (parsedData.type === "node") {
|
|
312
319
|
// Old format from sidebar
|
|
313
320
|
nodeType = parsedData.nodeData.metadata;
|
|
314
321
|
nodeData = parsedData.nodeData;
|
|
@@ -318,12 +325,13 @@ export class NodeOperationsHelper {
|
|
|
318
325
|
nodeType = parsedData;
|
|
319
326
|
// Extract initial config from configSchema
|
|
320
327
|
let initialConfig = {};
|
|
321
|
-
if (nodeType.configSchema &&
|
|
328
|
+
if (nodeType.configSchema &&
|
|
329
|
+
typeof nodeType.configSchema === "object") {
|
|
322
330
|
// If configSchema is a JSON Schema, extract default values
|
|
323
331
|
if (nodeType.configSchema.properties) {
|
|
324
332
|
// JSON Schema format - extract defaults
|
|
325
333
|
Object.entries(nodeType.configSchema.properties).forEach(([key, prop]) => {
|
|
326
|
-
if (prop && typeof prop ===
|
|
334
|
+
if (prop && typeof prop === "object" && "default" in prop) {
|
|
327
335
|
initialConfig[key] = prop.default;
|
|
328
336
|
}
|
|
329
337
|
});
|
|
@@ -336,7 +344,7 @@ export class NodeOperationsHelper {
|
|
|
336
344
|
nodeData = {
|
|
337
345
|
label: nodeType.name,
|
|
338
346
|
config: initialConfig,
|
|
339
|
-
metadata: nodeType
|
|
347
|
+
metadata: nodeType,
|
|
340
348
|
};
|
|
341
349
|
}
|
|
342
350
|
// Generate node ID based on node type and existing nodes
|
|
@@ -345,18 +353,18 @@ export class NodeOperationsHelper {
|
|
|
345
353
|
// UniversalNode component handles internal switching based on metadata and config
|
|
346
354
|
const newNode = {
|
|
347
355
|
id: newNodeId,
|
|
348
|
-
type:
|
|
356
|
+
type: "universalNode",
|
|
349
357
|
position, // Use the position calculated from the drop event
|
|
350
358
|
deletable: true,
|
|
351
359
|
data: {
|
|
352
360
|
...nodeData,
|
|
353
|
-
nodeId: newNodeId // Use the same ID
|
|
354
|
-
}
|
|
361
|
+
nodeId: newNodeId, // Use the same ID
|
|
362
|
+
},
|
|
355
363
|
};
|
|
356
364
|
return newNode;
|
|
357
365
|
}
|
|
358
366
|
catch (error) {
|
|
359
|
-
logger.error(
|
|
367
|
+
logger.error("Error parsing node data:", error);
|
|
360
368
|
return null;
|
|
361
369
|
}
|
|
362
370
|
}
|
|
@@ -371,12 +379,12 @@ export class WorkflowOperationsHelper {
|
|
|
371
379
|
static generateMetadata(existingMetadata) {
|
|
372
380
|
const now = new Date().toISOString();
|
|
373
381
|
return {
|
|
374
|
-
version:
|
|
382
|
+
version: "1.0.0",
|
|
375
383
|
createdAt: now,
|
|
376
384
|
...(existingMetadata ?? {}),
|
|
377
385
|
updatedAt: now,
|
|
378
386
|
versionId: `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`,
|
|
379
|
-
updateNumber: (existingMetadata?.updateNumber || 0) + 1
|
|
387
|
+
updateNumber: (existingMetadata?.updateNumber || 0) + 1,
|
|
380
388
|
};
|
|
381
389
|
}
|
|
382
390
|
/**
|
|
@@ -387,7 +395,7 @@ export class WorkflowOperationsHelper {
|
|
|
387
395
|
...workflow,
|
|
388
396
|
nodes,
|
|
389
397
|
edges,
|
|
390
|
-
metadata: this.generateMetadata(workflow.metadata)
|
|
398
|
+
metadata: this.generateMetadata(workflow.metadata),
|
|
391
399
|
};
|
|
392
400
|
}
|
|
393
401
|
/**
|
|
@@ -398,7 +406,7 @@ export class WorkflowOperationsHelper {
|
|
|
398
406
|
...workflow,
|
|
399
407
|
nodes: [],
|
|
400
408
|
edges: [],
|
|
401
|
-
metadata: this.generateMetadata(workflow.metadata)
|
|
409
|
+
metadata: this.generateMetadata(workflow.metadata),
|
|
402
410
|
};
|
|
403
411
|
}
|
|
404
412
|
/**
|
|
@@ -410,10 +418,10 @@ export class WorkflowOperationsHelper {
|
|
|
410
418
|
nodes: workflow.nodes.map((node) => node.id === nodeId
|
|
411
419
|
? {
|
|
412
420
|
...node,
|
|
413
|
-
data: { ...node.data, config: { ...newConfig } }
|
|
421
|
+
data: { ...node.data, config: { ...newConfig } },
|
|
414
422
|
}
|
|
415
423
|
: node),
|
|
416
|
-
metadata: this.generateMetadata(workflow.metadata)
|
|
424
|
+
metadata: this.generateMetadata(workflow.metadata),
|
|
417
425
|
};
|
|
418
426
|
}
|
|
419
427
|
/**
|
|
@@ -423,7 +431,7 @@ export class WorkflowOperationsHelper {
|
|
|
423
431
|
return {
|
|
424
432
|
...workflow,
|
|
425
433
|
nodes: [...workflow.nodes, node],
|
|
426
|
-
metadata: this.generateMetadata(workflow.metadata)
|
|
434
|
+
metadata: this.generateMetadata(workflow.metadata),
|
|
427
435
|
};
|
|
428
436
|
}
|
|
429
437
|
/**
|
|
@@ -431,7 +439,7 @@ export class WorkflowOperationsHelper {
|
|
|
431
439
|
*/
|
|
432
440
|
static async saveWorkflow(workflow) {
|
|
433
441
|
if (!workflow) {
|
|
434
|
-
logger.warn(
|
|
442
|
+
logger.warn("No workflow data available to save");
|
|
435
443
|
return null;
|
|
436
444
|
}
|
|
437
445
|
try {
|
|
@@ -447,14 +455,14 @@ export class WorkflowOperationsHelper {
|
|
|
447
455
|
}
|
|
448
456
|
const workflowToSave = {
|
|
449
457
|
id: workflowId,
|
|
450
|
-
name: workflow.name ||
|
|
458
|
+
name: workflow.name || "Untitled Workflow",
|
|
451
459
|
nodes: workflow.nodes || [],
|
|
452
460
|
edges: workflow.edges || [],
|
|
453
461
|
metadata: {
|
|
454
|
-
version:
|
|
462
|
+
version: "1.0.0",
|
|
455
463
|
createdAt: workflow.metadata?.createdAt || new Date().toISOString(),
|
|
456
|
-
updatedAt: new Date().toISOString()
|
|
457
|
-
}
|
|
464
|
+
updatedAt: new Date().toISOString(),
|
|
465
|
+
},
|
|
458
466
|
};
|
|
459
467
|
const savedWorkflow = await workflowApi.saveWorkflow(workflowToSave);
|
|
460
468
|
// Update the workflow ID if it changed (new workflow)
|
|
@@ -465,14 +473,14 @@ export class WorkflowOperationsHelper {
|
|
|
465
473
|
name: workflowToSave.name,
|
|
466
474
|
metadata: {
|
|
467
475
|
...workflowToSave.metadata,
|
|
468
|
-
...savedWorkflow.metadata
|
|
469
|
-
}
|
|
476
|
+
...savedWorkflow.metadata,
|
|
477
|
+
},
|
|
470
478
|
});
|
|
471
479
|
}
|
|
472
480
|
return savedWorkflow;
|
|
473
481
|
}
|
|
474
482
|
catch (error) {
|
|
475
|
-
logger.error(
|
|
483
|
+
logger.error("Failed to save workflow:", error);
|
|
476
484
|
throw error;
|
|
477
485
|
}
|
|
478
486
|
}
|
|
@@ -481,26 +489,26 @@ export class WorkflowOperationsHelper {
|
|
|
481
489
|
*/
|
|
482
490
|
static exportWorkflow(workflow) {
|
|
483
491
|
if (!workflow) {
|
|
484
|
-
logger.warn(
|
|
492
|
+
logger.warn("No workflow data available to export");
|
|
485
493
|
return;
|
|
486
494
|
}
|
|
487
495
|
// Use the same ID logic as saveWorkflow
|
|
488
496
|
const workflowId = workflow.id || uuidv4();
|
|
489
497
|
const workflowToExport = {
|
|
490
498
|
id: workflowId,
|
|
491
|
-
name: workflow.name ||
|
|
499
|
+
name: workflow.name || "Untitled Workflow",
|
|
492
500
|
nodes: workflow.nodes || [],
|
|
493
501
|
edges: workflow.edges || [],
|
|
494
502
|
metadata: {
|
|
495
|
-
version:
|
|
503
|
+
version: "1.0.0",
|
|
496
504
|
createdAt: workflow.metadata?.createdAt || new Date().toISOString(),
|
|
497
|
-
updatedAt: new Date().toISOString()
|
|
498
|
-
}
|
|
505
|
+
updatedAt: new Date().toISOString(),
|
|
506
|
+
},
|
|
499
507
|
};
|
|
500
508
|
const dataStr = JSON.stringify(workflowToExport, null, 2);
|
|
501
|
-
const dataBlob = new Blob([dataStr], { type:
|
|
509
|
+
const dataBlob = new Blob([dataStr], { type: "application/json" });
|
|
502
510
|
const url = URL.createObjectURL(dataBlob);
|
|
503
|
-
const link = document.createElement(
|
|
511
|
+
const link = document.createElement("a");
|
|
504
512
|
link.href = url;
|
|
505
513
|
link.download = `${workflowToExport.name}.json`;
|
|
506
514
|
link.click();
|
|
@@ -517,7 +525,11 @@ export class WorkflowOperationsHelper {
|
|
|
517
525
|
*/
|
|
518
526
|
static exportAsAgentSpec(workflow) {
|
|
519
527
|
if (!workflow) {
|
|
520
|
-
return {
|
|
528
|
+
return {
|
|
529
|
+
valid: false,
|
|
530
|
+
errors: ["No workflow data available to export"],
|
|
531
|
+
warnings: [],
|
|
532
|
+
};
|
|
521
533
|
}
|
|
522
534
|
// Convert to StandardWorkflow first
|
|
523
535
|
const workflowAdapter = new WorkflowAdapter();
|
|
@@ -531,11 +543,11 @@ export class WorkflowOperationsHelper {
|
|
|
531
543
|
const agentSpecAdapter = new AgentSpecAdapter();
|
|
532
544
|
const agentSpecJson = agentSpecAdapter.exportJSON(standardWorkflow);
|
|
533
545
|
// Trigger download
|
|
534
|
-
const dataBlob = new Blob([agentSpecJson], { type:
|
|
546
|
+
const dataBlob = new Blob([agentSpecJson], { type: "application/json" });
|
|
535
547
|
const url = URL.createObjectURL(dataBlob);
|
|
536
|
-
const link = document.createElement(
|
|
548
|
+
const link = document.createElement("a");
|
|
537
549
|
link.href = url;
|
|
538
|
-
link.download = `${workflow.name ||
|
|
550
|
+
link.download = `${workflow.name || "workflow"}-agentspec.json`;
|
|
539
551
|
link.click();
|
|
540
552
|
URL.revokeObjectURL(url);
|
|
541
553
|
return validation;
|
package/dist/index.d.ts
CHANGED
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
*
|
|
30
30
|
* @module flowdrop
|
|
31
31
|
*/
|
|
32
|
-
export * from
|
|
33
|
-
export * from
|
|
34
|
-
export * from
|
|
35
|
-
export * from
|
|
36
|
-
export * from
|
|
37
|
-
export * from
|
|
32
|
+
export * from "./core/index.js";
|
|
33
|
+
export * from "./form/index.js";
|
|
34
|
+
export * from "./display/index.js";
|
|
35
|
+
export * from "./playground/index.js";
|
|
36
|
+
export * from "./editor/index.js";
|
|
37
|
+
export * from "./settings/index.js";
|
package/dist/index.js
CHANGED
|
@@ -39,26 +39,26 @@
|
|
|
39
39
|
// ============================================================================
|
|
40
40
|
// Core Exports (Types & Utilities - No Heavy Dependencies)
|
|
41
41
|
// ============================================================================
|
|
42
|
-
export * from
|
|
42
|
+
export * from "./core/index.js";
|
|
43
43
|
// ============================================================================
|
|
44
44
|
// Form Exports
|
|
45
45
|
// ============================================================================
|
|
46
|
-
export * from
|
|
46
|
+
export * from "./form/index.js";
|
|
47
47
|
// Note: Heavy form fields (code, markdown) are NOT auto-registered.
|
|
48
48
|
// Users must import from form/code or form/markdown and register explicitly.
|
|
49
49
|
// ============================================================================
|
|
50
50
|
// Display Exports
|
|
51
51
|
// ============================================================================
|
|
52
|
-
export * from
|
|
52
|
+
export * from "./display/index.js";
|
|
53
53
|
// ============================================================================
|
|
54
54
|
// Playground Exports
|
|
55
55
|
// ============================================================================
|
|
56
|
-
export * from
|
|
56
|
+
export * from "./playground/index.js";
|
|
57
57
|
// ============================================================================
|
|
58
58
|
// Editor Exports (includes @xyflow/svelte and auto-registers builtin nodes)
|
|
59
59
|
// ============================================================================
|
|
60
|
-
export * from
|
|
60
|
+
export * from "./editor/index.js";
|
|
61
61
|
// ============================================================================
|
|
62
62
|
// Settings Exports (stores, services, components, types)
|
|
63
63
|
// ============================================================================
|
|
64
|
-
export * from
|
|
64
|
+
export * from "./settings/index.js";
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
// Mock browser check
|
|
7
|
-
export const browser = typeof window !==
|
|
7
|
+
export const browser = typeof window !== "undefined";
|
|
8
8
|
|
|
9
9
|
// Mock dev check
|
|
10
10
|
export const dev = false;
|
|
@@ -13,4 +13,4 @@ export const dev = false;
|
|
|
13
13
|
export const building = false;
|
|
14
14
|
|
|
15
15
|
// Mock version
|
|
16
|
-
export const version =
|
|
16
|
+
export const version = "1.0.0";
|
package/dist/mocks/app-forms.js
CHANGED
|
@@ -6,17 +6,17 @@
|
|
|
6
6
|
|
|
7
7
|
// Mock enhance function
|
|
8
8
|
export const enhance = (form, options = {}) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
return (event) => {
|
|
10
|
+
event.preventDefault();
|
|
11
|
+
// Basic form handling for library context
|
|
12
|
+
if (options.onResult) {
|
|
13
|
+
options.onResult({ type: "success" });
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
// Mock applyAction function
|
|
19
19
|
export const applyAction = (action) => {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
// No-op for library context
|
|
21
|
+
return action;
|
|
22
22
|
};
|
|
@@ -3,34 +3,34 @@
|
|
|
3
3
|
* Provides minimal implementations for SvelteKit navigation in library context
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { logger } from
|
|
6
|
+
import { logger } from "../utils/logger.js";
|
|
7
7
|
|
|
8
8
|
// Mock goto function
|
|
9
9
|
export const goto = async () => {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
// No-op for library context
|
|
11
|
+
logger.warn("Navigation not available in library context");
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
// Mock invalidate function
|
|
15
15
|
export const invalidate = async () => {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
// No-op for library context
|
|
17
|
+
return Promise.resolve();
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
// Mock invalidateAll function
|
|
21
21
|
export const invalidateAll = async () => {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
// No-op for library context
|
|
23
|
+
return Promise.resolve();
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
// Mock preloadData function
|
|
27
27
|
export const preloadData = async () => {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
// No-op for library context
|
|
29
|
+
return Promise.resolve({});
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
// Mock preloadCode function
|
|
33
33
|
export const preloadCode = async () => {
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
// No-op for library context
|
|
35
|
+
return Promise.resolve();
|
|
36
36
|
};
|
package/dist/mocks/app-stores.js
CHANGED
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
* Provides minimal implementations for SvelteKit stores in library context
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { writable } from
|
|
6
|
+
import { writable } from "svelte/store";
|
|
7
7
|
|
|
8
8
|
// Mock page store
|
|
9
9
|
export const page = writable({
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
url: new URL("http://localhost:3000"),
|
|
11
|
+
params: {},
|
|
12
|
+
route: { id: null },
|
|
13
|
+
status: 200,
|
|
14
|
+
error: null,
|
|
15
|
+
data: {},
|
|
16
|
+
form: null,
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
// Mock navigating store
|