@flowdrop/flowdrop 1.0.1 → 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.
- 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 +1081 -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 +46 -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 +900 -746
- package/dist/components/NodeSidebar.svelte.d.ts +3 -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/schemas/v1/workflow.schema.json +22 -107
- 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 +9 -9
- package/dist/svelte-app.js +39 -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
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module stores/interruptStore
|
|
8
8
|
*/
|
|
9
|
-
import { SvelteMap } from
|
|
10
|
-
import { initialState, transition, isTerminalState, isSubmitting as checkIsSubmitting, hasError as checkHasError, getErrorMessage, getResolvedValue, toLegacyStatus } from
|
|
11
|
-
import { logger } from
|
|
9
|
+
import { SvelteMap } from "svelte/reactivity";
|
|
10
|
+
import { initialState, transition, isTerminalState, isSubmitting as checkIsSubmitting, hasError as checkHasError, getErrorMessage, getResolvedValue, toLegacyStatus, } from "../types/interruptState.js";
|
|
11
|
+
import { logger } from "../utils/logger.js";
|
|
12
12
|
// =========================================================================
|
|
13
13
|
// Core Reactive State
|
|
14
14
|
// =========================================================================
|
|
@@ -64,7 +64,7 @@ export function getPendingInterruptCount() {
|
|
|
64
64
|
export function getResolvedInterrupts() {
|
|
65
65
|
const resolved = [];
|
|
66
66
|
interrupts.forEach((interrupt) => {
|
|
67
|
-
if (interrupt.machineState.status ===
|
|
67
|
+
if (interrupt.machineState.status === "resolved") {
|
|
68
68
|
resolved.push(interrupt);
|
|
69
69
|
}
|
|
70
70
|
});
|
|
@@ -97,7 +97,7 @@ function applyAction(interruptId, action) {
|
|
|
97
97
|
return {
|
|
98
98
|
state: initialState,
|
|
99
99
|
valid: false,
|
|
100
|
-
error: `Interrupt not found: ${interruptId}
|
|
100
|
+
error: `Interrupt not found: ${interruptId}`,
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
const result = transition(interrupt.machineState, action);
|
|
@@ -110,11 +110,11 @@ function applyAction(interruptId, action) {
|
|
|
110
110
|
machineState: result.state,
|
|
111
111
|
status: toLegacyStatus(result.state),
|
|
112
112
|
responseValue: getResolvedValue(result.state) ?? current.responseValue,
|
|
113
|
-
resolvedAt: result.state.status ===
|
|
113
|
+
resolvedAt: result.state.status === "resolved"
|
|
114
114
|
? result.state.resolvedAt
|
|
115
|
-
: result.state.status ===
|
|
115
|
+
: result.state.status === "cancelled"
|
|
116
116
|
? result.state.cancelledAt
|
|
117
|
-
: current.resolvedAt
|
|
117
|
+
: current.resolvedAt,
|
|
118
118
|
};
|
|
119
119
|
interrupts.set(interruptId, newInterrupt);
|
|
120
120
|
}
|
|
@@ -142,7 +142,7 @@ export const interruptActions = {
|
|
|
142
142
|
const machineState = existing?.machineState ?? initialState;
|
|
143
143
|
const interruptWithState = {
|
|
144
144
|
...interrupt,
|
|
145
|
-
machineState
|
|
145
|
+
machineState,
|
|
146
146
|
};
|
|
147
147
|
interrupts.set(interrupt.id, interruptWithState);
|
|
148
148
|
},
|
|
@@ -159,7 +159,7 @@ export const interruptActions = {
|
|
|
159
159
|
const machineState = existing?.machineState ?? initialState;
|
|
160
160
|
const interruptWithState = {
|
|
161
161
|
...interrupt,
|
|
162
|
-
machineState
|
|
162
|
+
machineState,
|
|
163
163
|
};
|
|
164
164
|
interrupts.set(interrupt.id, interruptWithState);
|
|
165
165
|
});
|
|
@@ -172,7 +172,7 @@ export const interruptActions = {
|
|
|
172
172
|
* @returns Transition result
|
|
173
173
|
*/
|
|
174
174
|
startSubmit: (interruptId, value) => {
|
|
175
|
-
return applyAction(interruptId, { type:
|
|
175
|
+
return applyAction(interruptId, { type: "SUBMIT", value });
|
|
176
176
|
},
|
|
177
177
|
/**
|
|
178
178
|
* Start cancelling an interrupt (user clicked cancel)
|
|
@@ -181,7 +181,7 @@ export const interruptActions = {
|
|
|
181
181
|
* @returns Transition result
|
|
182
182
|
*/
|
|
183
183
|
startCancel: (interruptId) => {
|
|
184
|
-
return applyAction(interruptId, { type:
|
|
184
|
+
return applyAction(interruptId, { type: "CANCEL" });
|
|
185
185
|
},
|
|
186
186
|
/**
|
|
187
187
|
* Mark submission as successful
|
|
@@ -190,7 +190,7 @@ export const interruptActions = {
|
|
|
190
190
|
* @returns Transition result
|
|
191
191
|
*/
|
|
192
192
|
submitSuccess: (interruptId) => {
|
|
193
|
-
return applyAction(interruptId, { type:
|
|
193
|
+
return applyAction(interruptId, { type: "SUCCESS" });
|
|
194
194
|
},
|
|
195
195
|
/**
|
|
196
196
|
* Mark submission as failed
|
|
@@ -200,7 +200,7 @@ export const interruptActions = {
|
|
|
200
200
|
* @returns Transition result
|
|
201
201
|
*/
|
|
202
202
|
submitFailure: (interruptId, error) => {
|
|
203
|
-
return applyAction(interruptId, { type:
|
|
203
|
+
return applyAction(interruptId, { type: "FAILURE", error });
|
|
204
204
|
},
|
|
205
205
|
/**
|
|
206
206
|
* Retry a failed submission
|
|
@@ -209,7 +209,7 @@ export const interruptActions = {
|
|
|
209
209
|
* @returns Transition result
|
|
210
210
|
*/
|
|
211
211
|
retry: (interruptId) => {
|
|
212
|
-
return applyAction(interruptId, { type:
|
|
212
|
+
return applyAction(interruptId, { type: "RETRY" });
|
|
213
213
|
},
|
|
214
214
|
/**
|
|
215
215
|
* Reset an interrupt to idle state
|
|
@@ -218,7 +218,7 @@ export const interruptActions = {
|
|
|
218
218
|
* @returns Transition result
|
|
219
219
|
*/
|
|
220
220
|
resetInterrupt: (interruptId) => {
|
|
221
|
-
return applyAction(interruptId, { type:
|
|
221
|
+
return applyAction(interruptId, { type: "RESET" });
|
|
222
222
|
},
|
|
223
223
|
/**
|
|
224
224
|
* Mark an interrupt as resolved with the user's response
|
|
@@ -227,9 +227,9 @@ export const interruptActions = {
|
|
|
227
227
|
* @param value - The resolved value
|
|
228
228
|
*/
|
|
229
229
|
resolveInterrupt: (interruptId, value) => {
|
|
230
|
-
const submitResult = applyAction(interruptId, { type:
|
|
230
|
+
const submitResult = applyAction(interruptId, { type: "SUBMIT", value });
|
|
231
231
|
if (submitResult.valid) {
|
|
232
|
-
applyAction(interruptId, { type:
|
|
232
|
+
applyAction(interruptId, { type: "SUCCESS" });
|
|
233
233
|
}
|
|
234
234
|
},
|
|
235
235
|
/**
|
|
@@ -238,9 +238,9 @@ export const interruptActions = {
|
|
|
238
238
|
* @param interruptId - The interrupt ID
|
|
239
239
|
*/
|
|
240
240
|
cancelInterrupt: (interruptId) => {
|
|
241
|
-
const cancelResult = applyAction(interruptId, { type:
|
|
241
|
+
const cancelResult = applyAction(interruptId, { type: "CANCEL" });
|
|
242
242
|
if (cancelResult.valid) {
|
|
243
|
-
applyAction(interruptId, { type:
|
|
243
|
+
applyAction(interruptId, { type: "SUCCESS" });
|
|
244
244
|
}
|
|
245
245
|
},
|
|
246
246
|
/**
|
|
@@ -276,7 +276,7 @@ export const interruptActions = {
|
|
|
276
276
|
*/
|
|
277
277
|
reset: () => {
|
|
278
278
|
interrupts.clear();
|
|
279
|
-
}
|
|
279
|
+
},
|
|
280
280
|
};
|
|
281
281
|
// =========================================================================
|
|
282
282
|
// Utilities
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module stores/playgroundStore
|
|
8
8
|
*/
|
|
9
|
-
import type { PlaygroundSession, PlaygroundMessage, PlaygroundInputField, PlaygroundSessionStatus, PlaygroundMessagesApiResponse } from
|
|
10
|
-
import type { Workflow } from
|
|
9
|
+
import type { PlaygroundSession, PlaygroundMessage, PlaygroundInputField, PlaygroundSessionStatus, PlaygroundMessagesApiResponse } from "../types/playground.js";
|
|
10
|
+
import type { Workflow } from "../types/index.js";
|
|
11
11
|
/**
|
|
12
12
|
* Get the current session
|
|
13
13
|
*/
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @module stores/playgroundStore
|
|
8
8
|
*/
|
|
9
|
-
import { isChatInputNode, defaultIsTerminalStatus } from
|
|
10
|
-
import { logger } from
|
|
9
|
+
import { isChatInputNode, defaultIsTerminalStatus, } from "../types/playground.js";
|
|
10
|
+
import { logger } from "../utils/logger.js";
|
|
11
11
|
// =========================================================================
|
|
12
12
|
// Core State
|
|
13
13
|
// =========================================================================
|
|
@@ -101,7 +101,7 @@ export function getLastPollTimestamp() {
|
|
|
101
101
|
* Get current session status
|
|
102
102
|
*/
|
|
103
103
|
export function getSessionStatus() {
|
|
104
|
-
return _currentSession?.status ??
|
|
104
|
+
return _currentSession?.status ?? "idle";
|
|
105
105
|
}
|
|
106
106
|
/**
|
|
107
107
|
* Get message count
|
|
@@ -113,13 +113,13 @@ export function getMessageCount() {
|
|
|
113
113
|
* Get chat messages (excludes log messages)
|
|
114
114
|
*/
|
|
115
115
|
export function getChatMessages() {
|
|
116
|
-
return _messages.filter((m) => m.role !==
|
|
116
|
+
return _messages.filter((m) => m.role !== "log");
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
119
|
* Get log messages only
|
|
120
120
|
*/
|
|
121
121
|
export function getLogMessages() {
|
|
122
|
-
return _messages.filter((m) => m.role ===
|
|
122
|
+
return _messages.filter((m) => m.role === "log");
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Get the latest message
|
|
@@ -145,21 +145,21 @@ export function getInputFields() {
|
|
|
145
145
|
const nodeTypeId = node.data.metadata?.id ?? node.type;
|
|
146
146
|
// Check if this is an input-type node
|
|
147
147
|
// The category can be "inputs" (standard) or variations like "input"
|
|
148
|
-
const categoryStr = String(category ||
|
|
149
|
-
const isInputCategory = categoryStr ===
|
|
148
|
+
const categoryStr = String(category || "");
|
|
149
|
+
const isInputCategory = categoryStr === "inputs" || categoryStr === "input";
|
|
150
150
|
if (isInputCategory || isChatInputNode(nodeTypeId)) {
|
|
151
151
|
// Get output ports that provide data
|
|
152
152
|
const outputs = node.data.metadata?.outputs ?? [];
|
|
153
153
|
outputs.forEach((output) => {
|
|
154
|
-
if (output.type ===
|
|
154
|
+
if (output.type === "output") {
|
|
155
155
|
// Create a field for each output
|
|
156
156
|
const field = {
|
|
157
157
|
nodeId: node.id,
|
|
158
158
|
fieldId: output.id,
|
|
159
159
|
label: node.data.label || output.name || nodeTypeId,
|
|
160
|
-
type: output.dataType ||
|
|
160
|
+
type: output.dataType || "string",
|
|
161
161
|
defaultValue: node.data.config?.[output.id],
|
|
162
|
-
required: output.required ?? false
|
|
162
|
+
required: output.required ?? false,
|
|
163
163
|
};
|
|
164
164
|
// Check for schema in configSchema
|
|
165
165
|
const configSchema = node.data.metadata?.configSchema;
|
|
@@ -178,10 +178,10 @@ export function getInputFields() {
|
|
|
178
178
|
nodeId: node.id,
|
|
179
179
|
fieldId: key,
|
|
180
180
|
label: schema.title || key,
|
|
181
|
-
type: schema.type ||
|
|
181
|
+
type: schema.type || "string",
|
|
182
182
|
defaultValue: node.data.config?.[key] ?? schema.default,
|
|
183
183
|
required: configSchema.required?.includes(key) ?? false,
|
|
184
|
-
schema
|
|
184
|
+
schema,
|
|
185
185
|
};
|
|
186
186
|
fields.push(field);
|
|
187
187
|
});
|
|
@@ -196,7 +196,7 @@ export function getInputFields() {
|
|
|
196
196
|
*/
|
|
197
197
|
export function getHasChatInput() {
|
|
198
198
|
const fields = getInputFields();
|
|
199
|
-
return fields.some((field) => isChatInputNode(field.nodeId) || field.type ===
|
|
199
|
+
return fields.some((field) => isChatInputNode(field.nodeId) || field.type === "string");
|
|
200
200
|
}
|
|
201
201
|
/**
|
|
202
202
|
* Get session count
|
|
@@ -272,12 +272,16 @@ export const playgroundActions = {
|
|
|
272
272
|
*/
|
|
273
273
|
updateSessionStatus: (status) => {
|
|
274
274
|
if (_currentSession) {
|
|
275
|
-
_currentSession = {
|
|
275
|
+
_currentSession = {
|
|
276
|
+
..._currentSession,
|
|
277
|
+
status,
|
|
278
|
+
updatedAt: new Date().toISOString(),
|
|
279
|
+
};
|
|
276
280
|
}
|
|
277
281
|
// Also update in sessions list
|
|
278
282
|
const session = _currentSession;
|
|
279
283
|
if (session) {
|
|
280
|
-
_sessions = _sessions.map((s) =>
|
|
284
|
+
_sessions = _sessions.map((s) => s.id === session.id ? { ...s, status } : s);
|
|
281
285
|
}
|
|
282
286
|
},
|
|
283
287
|
/**
|
|
@@ -340,7 +344,10 @@ export const playgroundActions = {
|
|
|
340
344
|
const existingIds = new Set(_messages.map((m) => m.id));
|
|
341
345
|
const uniqueNewMessages = newMessages.filter((m) => !existingIds.has(m.id));
|
|
342
346
|
// Sort the combined messages chronologically
|
|
343
|
-
_messages = sortMessagesChronologically([
|
|
347
|
+
_messages = sortMessagesChronologically([
|
|
348
|
+
..._messages,
|
|
349
|
+
...uniqueNewMessages,
|
|
350
|
+
]);
|
|
344
351
|
},
|
|
345
352
|
/**
|
|
346
353
|
* Clear all messages
|
|
@@ -406,7 +413,7 @@ export const playgroundActions = {
|
|
|
406
413
|
_messages = [];
|
|
407
414
|
_lastPollTimestamp = null;
|
|
408
415
|
}
|
|
409
|
-
}
|
|
416
|
+
},
|
|
410
417
|
};
|
|
411
418
|
// =========================================================================
|
|
412
419
|
// Polling Callback Factory
|
|
@@ -510,6 +517,6 @@ export async function refreshSessionMessages(fetchMessages, isTerminalStatus) {
|
|
|
510
517
|
callback(response);
|
|
511
518
|
}
|
|
512
519
|
catch (err) {
|
|
513
|
-
logger.error(
|
|
520
|
+
logger.error("[playgroundStore] Failed to refresh messages:", err);
|
|
514
521
|
}
|
|
515
522
|
}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* which SvelteFlow already maintains for all node types. This avoids replicating
|
|
13
13
|
* CSS positioning logic and stays automatically accurate.
|
|
14
14
|
*/
|
|
15
|
-
import type { WorkflowNode as WorkflowNodeType, PortCoordinate, PortCoordinateMap } from
|
|
16
|
-
import type { InternalNode } from
|
|
15
|
+
import type { WorkflowNode as WorkflowNodeType, PortCoordinate, PortCoordinateMap } from "../types/index.js";
|
|
16
|
+
import type { InternalNode } from "@xyflow/svelte";
|
|
17
17
|
/**
|
|
18
18
|
* Rebuild coordinates for ALL nodes from SvelteFlow internals.
|
|
19
19
|
* Call on initial workflow load (after render) and after bulk changes.
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
* which SvelteFlow already maintains for all node types. This avoids replicating
|
|
13
13
|
* CSS positioning logic and stays automatically accurate.
|
|
14
14
|
*/
|
|
15
|
-
import { SvelteMap } from
|
|
16
|
-
import { ProximityConnectHelper } from
|
|
15
|
+
import { SvelteMap } from "svelte/reactivity";
|
|
16
|
+
import { ProximityConnectHelper } from "../helpers/proximityConnect.js";
|
|
17
17
|
/** Reactive state holding all port absolute coordinates, keyed by handleId */
|
|
18
18
|
let coordinates = $state(new SvelteMap());
|
|
19
19
|
/**
|
|
@@ -27,11 +27,15 @@ function parseHandleId(handleId) {
|
|
|
27
27
|
// Match the last occurrence of -input- or -output- to handle nodeIds with hyphens
|
|
28
28
|
const inputMatch = handleId.match(/^(.+)-input-(.+)$/);
|
|
29
29
|
if (inputMatch) {
|
|
30
|
-
return { nodeId: inputMatch[1], direction:
|
|
30
|
+
return { nodeId: inputMatch[1], direction: "input", portId: inputMatch[2] };
|
|
31
31
|
}
|
|
32
32
|
const outputMatch = handleId.match(/^(.+)-output-(.+)$/);
|
|
33
33
|
if (outputMatch) {
|
|
34
|
-
return {
|
|
34
|
+
return {
|
|
35
|
+
nodeId: outputMatch[1],
|
|
36
|
+
direction: "output",
|
|
37
|
+
portId: outputMatch[2],
|
|
38
|
+
};
|
|
35
39
|
}
|
|
36
40
|
return null;
|
|
37
41
|
}
|
|
@@ -41,11 +45,11 @@ function parseHandleId(handleId) {
|
|
|
41
45
|
*/
|
|
42
46
|
function buildPortDataTypeLookup(node) {
|
|
43
47
|
const lookup = new Map();
|
|
44
|
-
const inputs = ProximityConnectHelper.getAllPorts(node,
|
|
48
|
+
const inputs = ProximityConnectHelper.getAllPorts(node, "input");
|
|
45
49
|
for (const port of inputs) {
|
|
46
50
|
lookup.set(`input-${port.id}`, port.dataType);
|
|
47
51
|
}
|
|
48
|
-
const outputs = ProximityConnectHelper.getAllPorts(node,
|
|
52
|
+
const outputs = ProximityConnectHelper.getAllPorts(node, "output");
|
|
49
53
|
for (const port of outputs) {
|
|
50
54
|
lookup.set(`output-${port.id}`, port.dataType);
|
|
51
55
|
}
|
|
@@ -65,7 +69,10 @@ function computeNodePortCoordinates(node, internalNode) {
|
|
|
65
69
|
const posAbs = internalNode.internals.positionAbsolute;
|
|
66
70
|
const dataTypeLookup = buildPortDataTypeLookup(node);
|
|
67
71
|
const result = [];
|
|
68
|
-
const allHandles = [
|
|
72
|
+
const allHandles = [
|
|
73
|
+
...(handleBounds.source ?? []),
|
|
74
|
+
...(handleBounds.target ?? []),
|
|
75
|
+
];
|
|
69
76
|
for (const handle of allHandles) {
|
|
70
77
|
if (!handle.id)
|
|
71
78
|
continue;
|
|
@@ -82,7 +89,7 @@ function computeNodePortCoordinates(node, internalNode) {
|
|
|
82
89
|
handleId: handle.id,
|
|
83
90
|
nodeId: parsed.nodeId,
|
|
84
91
|
direction: parsed.direction,
|
|
85
|
-
dataType
|
|
92
|
+
dataType,
|
|
86
93
|
});
|
|
87
94
|
}
|
|
88
95
|
return result;
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @module stores/settingsStore
|
|
11
11
|
*/
|
|
12
|
-
import type { FlowDropSettings, ThemeSettings, EditorSettings, UISettings, BehaviorSettings, ApiSettings, PartialSettings, SyncStatus, ResolvedTheme, ThemePreference, SettingsChangeCallback, SettingsCategory } from
|
|
13
|
-
export type { ThemePreference, ResolvedTheme } from
|
|
12
|
+
import type { FlowDropSettings, ThemeSettings, EditorSettings, UISettings, BehaviorSettings, ApiSettings, PartialSettings, SyncStatus, ResolvedTheme, ThemePreference, SettingsChangeCallback, SettingsCategory } from "../types/settings.js";
|
|
13
|
+
export type { ThemePreference, ResolvedTheme } from "../types/settings.js";
|
|
14
14
|
/**
|
|
15
15
|
* Get current settings (replaces settingsStore derived store)
|
|
16
16
|
*/
|