@flowdrop/flowdrop 1.0.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/LICENSE +21 -0
- package/README.md +252 -0
- package/dist/adapters/WorkflowAdapter.d.ts +167 -0
- package/dist/adapters/WorkflowAdapter.js +368 -0
- package/dist/adapters/agentspec/AgentSpecAdapter.d.ts +96 -0
- package/dist/adapters/agentspec/AgentSpecAdapter.js +626 -0
- package/dist/adapters/agentspec/agentAdapter.d.ts +59 -0
- package/dist/adapters/agentspec/agentAdapter.js +91 -0
- package/dist/adapters/agentspec/autoLayout.d.ts +34 -0
- package/dist/adapters/agentspec/autoLayout.js +127 -0
- package/dist/adapters/agentspec/componentTypeDefaults.d.ts +73 -0
- package/dist/adapters/agentspec/componentTypeDefaults.js +238 -0
- package/dist/adapters/agentspec/defaultNodeTypes.d.ts +53 -0
- package/dist/adapters/agentspec/defaultNodeTypes.js +561 -0
- package/dist/adapters/agentspec/index.d.ts +37 -0
- package/dist/adapters/agentspec/index.js +39 -0
- package/dist/adapters/agentspec/validator.d.ts +34 -0
- package/dist/adapters/agentspec/validator.js +169 -0
- package/dist/api/enhanced-client.d.ts +183 -0
- package/dist/api/enhanced-client.js +430 -0
- package/dist/components/App.svelte +981 -0
- package/dist/components/App.svelte.d.ts +54 -0
- package/dist/components/CanvasBanner.stories.svelte +29 -0
- package/dist/components/CanvasBanner.stories.svelte.d.ts +27 -0
- package/dist/components/CanvasBanner.svelte +57 -0
- package/dist/components/CanvasBanner.svelte.d.ts +8 -0
- package/dist/components/ConfigForm.svelte +1138 -0
- package/dist/components/ConfigForm.svelte.d.ts +44 -0
- package/dist/components/ConfigModal.svelte +188 -0
- package/dist/components/ConfigModal.svelte.d.ts +13 -0
- package/dist/components/ConfigPanel.stories.svelte +47 -0
- package/dist/components/ConfigPanel.stories.svelte.d.ts +27 -0
- package/dist/components/ConfigPanel.svelte +182 -0
- package/dist/components/ConfigPanel.svelte.d.ts +32 -0
- package/dist/components/ConnectionLine.svelte +32 -0
- package/dist/components/ConnectionLine.svelte.d.ts +3 -0
- package/dist/components/EdgeRefresher.svelte +41 -0
- package/dist/components/EdgeRefresher.svelte.d.ts +9 -0
- package/dist/components/FlowDropZone.svelte +83 -0
- package/dist/components/FlowDropZone.svelte.d.ts +13 -0
- package/dist/components/LoadingSpinner.stories.svelte +30 -0
- package/dist/components/LoadingSpinner.stories.svelte.d.ts +27 -0
- package/dist/components/LoadingSpinner.svelte +36 -0
- package/dist/components/LoadingSpinner.svelte.d.ts +8 -0
- package/dist/components/Logo.stories.svelte +22 -0
- package/dist/components/Logo.stories.svelte.d.ts +27 -0
- package/dist/components/Logo.svelte +102 -0
- package/dist/components/Logo.svelte.d.ts +26 -0
- package/dist/components/LogsSidebar.svelte +563 -0
- package/dist/components/LogsSidebar.svelte.d.ts +17 -0
- package/dist/components/MarkdownDisplay.stories.svelte +36 -0
- package/dist/components/MarkdownDisplay.stories.svelte.d.ts +27 -0
- package/dist/components/MarkdownDisplay.svelte +29 -0
- package/dist/components/MarkdownDisplay.svelte.d.ts +7 -0
- package/dist/components/Navbar.stories.svelte +53 -0
- package/dist/components/Navbar.stories.svelte.d.ts +27 -0
- package/dist/components/Navbar.svelte +726 -0
- package/dist/components/Navbar.svelte.d.ts +29 -0
- package/dist/components/NodeSidebar.svelte +762 -0
- package/dist/components/NodeSidebar.svelte.d.ts +9 -0
- package/dist/components/NodeStatusOverlay.stories.svelte +85 -0
- package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +27 -0
- package/dist/components/NodeStatusOverlay.svelte +327 -0
- package/dist/components/NodeStatusOverlay.svelte.d.ts +11 -0
- package/dist/components/PipelineStatus.svelte +314 -0
- package/dist/components/PipelineStatus.svelte.d.ts +20 -0
- package/dist/components/PortCoordinateTracker.svelte +58 -0
- package/dist/components/PortCoordinateTracker.svelte.d.ts +12 -0
- package/dist/components/ReadOnlyDetails.svelte +170 -0
- package/dist/components/ReadOnlyDetails.svelte.d.ts +25 -0
- package/dist/components/SchemaForm.stories.svelte +116 -0
- package/dist/components/SchemaForm.stories.svelte.d.ts +27 -0
- package/dist/components/SchemaForm.svelte +536 -0
- package/dist/components/SchemaForm.svelte.d.ts +83 -0
- package/dist/components/SettingsModal.svelte +279 -0
- package/dist/components/SettingsModal.svelte.d.ts +23 -0
- package/dist/components/SettingsPanel.svelte +638 -0
- package/dist/components/SettingsPanel.svelte.d.ts +21 -0
- package/dist/components/StatusIcon.stories.svelte +60 -0
- package/dist/components/StatusIcon.stories.svelte.d.ts +27 -0
- package/dist/components/StatusIcon.svelte +119 -0
- package/dist/components/StatusIcon.svelte.d.ts +10 -0
- package/dist/components/StatusLabel.stories.svelte +17 -0
- package/dist/components/StatusLabel.stories.svelte.d.ts +27 -0
- package/dist/components/StatusLabel.svelte +33 -0
- package/dist/components/StatusLabel.svelte.d.ts +7 -0
- package/dist/components/ThemeToggle.stories.svelte +25 -0
- package/dist/components/ThemeToggle.stories.svelte.d.ts +27 -0
- package/dist/components/ThemeToggle.svelte +185 -0
- package/dist/components/ThemeToggle.svelte.d.ts +14 -0
- package/dist/components/UniversalNode.svelte +155 -0
- package/dist/components/UniversalNode.svelte.d.ts +15 -0
- package/dist/components/WorkflowEditor.svelte +1035 -0
- package/dist/components/WorkflowEditor.svelte.d.ts +23 -0
- package/dist/components/form/FormArray.svelte +1049 -0
- package/dist/components/form/FormArray.svelte.d.ts +22 -0
- package/dist/components/form/FormAutocomplete.svelte +1009 -0
- package/dist/components/form/FormAutocomplete.svelte.d.ts +25 -0
- package/dist/components/form/FormCheckboxGroup.stories.svelte +28 -0
- package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormCheckboxGroup.svelte +155 -0
- package/dist/components/form/FormCheckboxGroup.svelte.d.ts +17 -0
- package/dist/components/form/FormCodeEditor.svelte +458 -0
- package/dist/components/form/FormCodeEditor.svelte.d.ts +25 -0
- package/dist/components/form/FormField.svelte +417 -0
- package/dist/components/form/FormField.svelte.d.ts +29 -0
- package/dist/components/form/FormFieldLight.svelte +425 -0
- package/dist/components/form/FormFieldLight.svelte.d.ts +18 -0
- package/dist/components/form/FormFieldWrapper.stories.svelte +53 -0
- package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormFieldWrapper.svelte +125 -0
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +18 -0
- package/dist/components/form/FormFieldset.svelte +142 -0
- package/dist/components/form/FormFieldset.svelte.d.ts +11 -0
- package/dist/components/form/FormMarkdownEditor.svelte +752 -0
- package/dist/components/form/FormMarkdownEditor.svelte.d.ts +33 -0
- package/dist/components/form/FormNumberField.stories.svelte +36 -0
- package/dist/components/form/FormNumberField.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormNumberField.svelte +112 -0
- package/dist/components/form/FormNumberField.svelte.d.ts +25 -0
- package/dist/components/form/FormRangeField.stories.svelte +31 -0
- package/dist/components/form/FormRangeField.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormRangeField.svelte +246 -0
- package/dist/components/form/FormRangeField.svelte.d.ts +23 -0
- package/dist/components/form/FormSelect.stories.svelte +50 -0
- package/dist/components/form/FormSelect.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormSelect.svelte +129 -0
- package/dist/components/form/FormSelect.svelte.d.ts +20 -0
- package/dist/components/form/FormTemplateEditor.svelte +825 -0
- package/dist/components/form/FormTemplateEditor.svelte.d.ts +41 -0
- package/dist/components/form/FormTextField.stories.svelte +30 -0
- package/dist/components/form/FormTextField.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormTextField.svelte +91 -0
- package/dist/components/form/FormTextField.svelte.d.ts +19 -0
- package/dist/components/form/FormTextarea.stories.svelte +34 -0
- package/dist/components/form/FormTextarea.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormTextarea.svelte +97 -0
- package/dist/components/form/FormTextarea.svelte.d.ts +21 -0
- package/dist/components/form/FormToggle.stories.svelte +30 -0
- package/dist/components/form/FormToggle.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormToggle.svelte +126 -0
- package/dist/components/form/FormToggle.svelte.d.ts +19 -0
- package/dist/components/form/FormUISchemaRenderer.svelte +136 -0
- package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +32 -0
- package/dist/components/form/index.d.ts +50 -0
- package/dist/components/form/index.js +54 -0
- package/dist/components/form/templateAutocomplete.d.ts +29 -0
- package/dist/components/form/templateAutocomplete.js +254 -0
- package/dist/components/form/types.d.ts +485 -0
- package/dist/components/form/types.js +73 -0
- package/dist/components/interrupt/ChoicePrompt.stories.svelte +52 -0
- package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +401 -0
- package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +23 -0
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +71 -0
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/ConfirmationPrompt.svelte +292 -0
- package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +25 -0
- package/dist/components/interrupt/FormPrompt.svelte +236 -0
- package/dist/components/interrupt/FormPrompt.svelte.d.ts +23 -0
- package/dist/components/interrupt/InterruptBubble.svelte +601 -0
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +16 -0
- package/dist/components/interrupt/ReviewPrompt.stories.svelte +67 -0
- package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/ReviewPrompt.svelte +861 -0
- package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +23 -0
- package/dist/components/interrupt/TextInputPrompt.stories.svelte +47 -0
- package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/TextInputPrompt.svelte +346 -0
- package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +23 -0
- package/dist/components/interrupt/index.d.ts +13 -0
- package/dist/components/interrupt/index.js +15 -0
- package/dist/components/layouts/MainLayout.svelte +718 -0
- package/dist/components/layouts/MainLayout.svelte.d.ts +62 -0
- package/dist/components/nodes/GatewayNode.stories.svelte +108 -0
- package/dist/components/nodes/GatewayNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/GatewayNode.svelte +591 -0
- package/dist/components/nodes/GatewayNode.svelte.d.ts +15 -0
- package/dist/components/nodes/IdeaNode.stories.svelte +52 -0
- package/dist/components/nodes/IdeaNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/IdeaNode.svelte +455 -0
- package/dist/components/nodes/IdeaNode.svelte.d.ts +24 -0
- package/dist/components/nodes/NotesNode.stories.svelte +76 -0
- package/dist/components/nodes/NotesNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/NotesNode.svelte +378 -0
- package/dist/components/nodes/NotesNode.svelte.d.ts +24 -0
- package/dist/components/nodes/SimpleNode.stories.svelte +159 -0
- package/dist/components/nodes/SimpleNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/SimpleNode.svelte +451 -0
- package/dist/components/nodes/SimpleNode.svelte.d.ts +25 -0
- package/dist/components/nodes/SquareNode.stories.svelte +82 -0
- package/dist/components/nodes/SquareNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/SquareNode.svelte +407 -0
- package/dist/components/nodes/SquareNode.svelte.d.ts +25 -0
- package/dist/components/nodes/TerminalNode.stories.svelte +25 -0
- package/dist/components/nodes/TerminalNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/TerminalNode.svelte +690 -0
- package/dist/components/nodes/TerminalNode.svelte.d.ts +25 -0
- package/dist/components/nodes/ToolNode.stories.svelte +189 -0
- package/dist/components/nodes/ToolNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/ToolNode.svelte +471 -0
- package/dist/components/nodes/ToolNode.svelte.d.ts +36 -0
- package/dist/components/nodes/WorkflowNode.stories.svelte +55 -0
- package/dist/components/nodes/WorkflowNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/WorkflowNode.svelte +571 -0
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +15 -0
- package/dist/components/playground/ChatPanel.svelte +905 -0
- package/dist/components/playground/ChatPanel.svelte.d.ts +46 -0
- package/dist/components/playground/ExecutionLogs.svelte +488 -0
- package/dist/components/playground/ExecutionLogs.svelte.d.ts +14 -0
- package/dist/components/playground/InputCollector.svelte +444 -0
- package/dist/components/playground/InputCollector.svelte.d.ts +16 -0
- package/dist/components/playground/MessageBubble.stories.svelte +62 -0
- package/dist/components/playground/MessageBubble.stories.svelte.d.ts +27 -0
- package/dist/components/playground/MessageBubble.svelte +633 -0
- package/dist/components/playground/MessageBubble.svelte.d.ts +24 -0
- package/dist/components/playground/Playground.svelte +1075 -0
- package/dist/components/playground/Playground.svelte.d.ts +25 -0
- package/dist/components/playground/PlaygroundModal.svelte +220 -0
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +25 -0
- package/dist/components/playground/SessionManager.svelte +538 -0
- package/dist/components/playground/SessionManager.svelte.d.ts +20 -0
- package/dist/config/agentSpecEndpoints.d.ts +70 -0
- package/dist/config/agentSpecEndpoints.js +65 -0
- package/dist/config/constants.d.ts +43 -0
- package/dist/config/constants.js +31 -0
- package/dist/config/defaultCategories.d.ts +7 -0
- package/dist/config/defaultCategories.js +126 -0
- package/dist/config/defaultPortConfig.d.ts +6 -0
- package/dist/config/defaultPortConfig.js +201 -0
- package/dist/config/endpoints.d.ts +160 -0
- package/dist/config/endpoints.js +146 -0
- package/dist/config/runtimeConfig.d.ts +47 -0
- package/dist/config/runtimeConfig.js +80 -0
- package/dist/core/index.d.ts +75 -0
- package/dist/core/index.js +92 -0
- package/dist/display/index.d.ts +29 -0
- package/dist/display/index.js +36 -0
- package/dist/editor/index.d.ts +95 -0
- package/dist/editor/index.js +138 -0
- package/dist/form/code.d.ts +101 -0
- package/dist/form/code.js +168 -0
- package/dist/form/fieldRegistry.d.ts +169 -0
- package/dist/form/fieldRegistry.js +152 -0
- package/dist/form/full.d.ts +56 -0
- package/dist/form/full.js +80 -0
- package/dist/form/index.d.ts +77 -0
- package/dist/form/index.js +91 -0
- package/dist/form/markdown.d.ts +69 -0
- package/dist/form/markdown.js +103 -0
- package/dist/helpers/nodeLayoutHelper.d.ts +14 -0
- package/dist/helpers/nodeLayoutHelper.js +19 -0
- package/dist/helpers/proximityConnect.d.ts +94 -0
- package/dist/helpers/proximityConnect.js +314 -0
- package/dist/helpers/workflowEditorHelper.d.ts +183 -0
- package/dist/helpers/workflowEditorHelper.js +595 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +64 -0
- package/dist/mocks/app-environment.d.ts +8 -0
- package/dist/mocks/app-environment.js +16 -0
- package/dist/mocks/app-forms.d.ts +2 -0
- package/dist/mocks/app-forms.js +22 -0
- package/dist/mocks/app-navigation.d.ts +5 -0
- package/dist/mocks/app-navigation.js +36 -0
- package/dist/mocks/app-stores.d.ts +14 -0
- package/dist/mocks/app-stores.js +26 -0
- package/dist/playground/index.d.ts +131 -0
- package/dist/playground/index.js +172 -0
- package/dist/playground/mount.d.ts +203 -0
- package/dist/playground/mount.js +235 -0
- package/dist/registry/BaseRegistry.d.ts +92 -0
- package/dist/registry/BaseRegistry.js +124 -0
- package/dist/registry/builtinFormats.d.ts +23 -0
- package/dist/registry/builtinFormats.js +70 -0
- package/dist/registry/builtinNodes.d.ts +77 -0
- package/dist/registry/builtinNodes.js +211 -0
- package/dist/registry/index.d.ts +8 -0
- package/dist/registry/index.js +12 -0
- package/dist/registry/nodeComponentRegistry.d.ts +276 -0
- package/dist/registry/nodeComponentRegistry.js +262 -0
- package/dist/registry/plugin.d.ts +215 -0
- package/dist/registry/plugin.js +249 -0
- package/dist/registry/workflowFormatRegistry.d.ts +122 -0
- package/dist/registry/workflowFormatRegistry.js +96 -0
- package/dist/schema/index.d.ts +23 -0
- package/dist/schema/index.js +23 -0
- package/dist/schemas/v1/workflow.schema.json +1078 -0
- package/dist/services/agentSpecExecutionService.d.ts +106 -0
- package/dist/services/agentSpecExecutionService.js +334 -0
- package/dist/services/api.d.ts +115 -0
- package/dist/services/api.js +214 -0
- package/dist/services/apiVariableService.d.ts +114 -0
- package/dist/services/apiVariableService.js +338 -0
- package/dist/services/autoSaveService.d.ts +112 -0
- package/dist/services/autoSaveService.js +227 -0
- package/dist/services/categoriesApi.d.ts +14 -0
- package/dist/services/categoriesApi.js +49 -0
- package/dist/services/draftStorage.d.ts +171 -0
- package/dist/services/draftStorage.js +299 -0
- package/dist/services/dynamicSchemaService.d.ts +108 -0
- package/dist/services/dynamicSchemaService.js +444 -0
- package/dist/services/globalSave.d.ts +69 -0
- package/dist/services/globalSave.js +248 -0
- package/dist/services/historyService.d.ts +208 -0
- package/dist/services/historyService.js +321 -0
- package/dist/services/interruptService.d.ts +133 -0
- package/dist/services/interruptService.js +280 -0
- package/dist/services/nodeExecutionService.d.ts +63 -0
- package/dist/services/nodeExecutionService.js +266 -0
- package/dist/services/playgroundService.d.ts +130 -0
- package/dist/services/playgroundService.js +321 -0
- package/dist/services/portConfigApi.d.ts +14 -0
- package/dist/services/portConfigApi.js +54 -0
- package/dist/services/settingsService.d.ts +92 -0
- package/dist/services/settingsService.js +196 -0
- package/dist/services/toastService.d.ts +156 -0
- package/dist/services/toastService.js +265 -0
- package/dist/services/variableService.d.ts +141 -0
- package/dist/services/variableService.js +463 -0
- package/dist/services/workflowStorage.d.ts +37 -0
- package/dist/services/workflowStorage.js +116 -0
- package/dist/settings/index.d.ts +25 -0
- package/dist/settings/index.js +33 -0
- package/dist/stores/categoriesStore.svelte.d.ts +32 -0
- package/dist/stores/categoriesStore.svelte.js +77 -0
- package/dist/stores/editorStateMachine.svelte.d.ts +42 -0
- package/dist/stores/editorStateMachine.svelte.js +132 -0
- package/dist/stores/historyStore.svelte.d.ts +136 -0
- package/dist/stores/historyStore.svelte.js +207 -0
- package/dist/stores/interruptStore.svelte.d.ts +179 -0
- package/dist/stores/interruptStore.svelte.js +346 -0
- package/dist/stores/playgroundStore.svelte.d.ts +230 -0
- package/dist/stores/playgroundStore.svelte.js +515 -0
- package/dist/stores/portCoordinateStore.svelte.d.ts +66 -0
- package/dist/stores/portCoordinateStore.svelte.js +186 -0
- package/dist/stores/settingsStore.svelte.d.ts +158 -0
- package/dist/stores/settingsStore.svelte.js +544 -0
- package/dist/stores/workflowStore.svelte.d.ts +260 -0
- package/dist/stores/workflowStore.svelte.js +649 -0
- package/dist/stories/CanvasDecorator.svelte +49 -0
- package/dist/stories/CanvasDecorator.svelte.d.ts +8 -0
- package/dist/stories/NodeDecorator.svelte +73 -0
- package/dist/stories/NodeDecorator.svelte.d.ts +8 -0
- package/dist/stories/utils.d.ts +93 -0
- package/dist/stories/utils.js +122 -0
- package/dist/styles/base.css +1300 -0
- package/dist/styles/toast.css +35 -0
- package/dist/styles/tokens.css +475 -0
- package/dist/svelte-app.d.ts +150 -0
- package/dist/svelte-app.js +295 -0
- package/dist/types/agentspec.d.ts +318 -0
- package/dist/types/agentspec.js +48 -0
- package/dist/types/auth.d.ts +263 -0
- package/dist/types/auth.js +229 -0
- package/dist/types/config.d.ts +151 -0
- package/dist/types/config.js +7 -0
- package/dist/types/events.d.ts +190 -0
- package/dist/types/events.js +30 -0
- package/dist/types/index.d.ts +1234 -0
- package/dist/types/index.js +27 -0
- package/dist/types/interrupt.d.ts +390 -0
- package/dist/types/interrupt.js +145 -0
- package/dist/types/interruptState.d.ts +211 -0
- package/dist/types/interruptState.js +308 -0
- package/dist/types/playground.d.ts +351 -0
- package/dist/types/playground.js +95 -0
- package/dist/types/settings.d.ts +189 -0
- package/dist/types/settings.js +97 -0
- package/dist/types/uischema.d.ts +144 -0
- package/dist/types/uischema.js +51 -0
- package/dist/utils/colors.d.ts +288 -0
- package/dist/utils/colors.js +548 -0
- package/dist/utils/config.d.ts +37 -0
- package/dist/utils/config.js +226 -0
- package/dist/utils/connections.d.ts +125 -0
- package/dist/utils/connections.js +414 -0
- package/dist/utils/errors.d.ts +28 -0
- package/dist/utils/errors.js +44 -0
- package/dist/utils/fetchWithAuth.d.ts +25 -0
- package/dist/utils/fetchWithAuth.js +34 -0
- package/dist/utils/handleIds.d.ts +35 -0
- package/dist/utils/handleIds.js +58 -0
- package/dist/utils/handlePositioning.d.ts +31 -0
- package/dist/utils/handlePositioning.js +35 -0
- package/dist/utils/icons.d.ts +106 -0
- package/dist/utils/icons.js +157 -0
- package/dist/utils/logger.d.ts +47 -0
- package/dist/utils/logger.js +72 -0
- package/dist/utils/nodeStatus.d.ts +53 -0
- package/dist/utils/nodeStatus.js +183 -0
- package/dist/utils/nodeTypes.d.ts +117 -0
- package/dist/utils/nodeTypes.js +244 -0
- package/dist/utils/nodeWrapper.d.ts +39 -0
- package/dist/utils/nodeWrapper.js +62 -0
- package/dist/utils/performanceUtils.d.ts +30 -0
- package/dist/utils/performanceUtils.js +108 -0
- package/dist/utils/sanitize.d.ts +19 -0
- package/dist/utils/sanitize.js +31 -0
- package/dist/utils/uischema.d.ts +52 -0
- package/dist/utils/uischema.js +88 -0
- package/dist/utils/validation.d.ts +29 -0
- package/dist/utils/validation.js +39 -0
- package/package.json +292 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowDrop Plugin System
|
|
3
|
+
* Provides APIs for external libraries to register custom node components.
|
|
4
|
+
*
|
|
5
|
+
* This enables a plugin ecosystem where:
|
|
6
|
+
* - Third-party libraries can provide custom node types
|
|
7
|
+
* - Custom nodes are namespaced to avoid conflicts
|
|
8
|
+
* - Registration is simplified with a clean API
|
|
9
|
+
*/
|
|
10
|
+
import { nodeComponentRegistry, createNamespacedType } from './nodeComponentRegistry.js';
|
|
11
|
+
/**
|
|
12
|
+
* Register a FlowDrop plugin with custom node components.
|
|
13
|
+
* All node types are automatically namespaced with the plugin namespace.
|
|
14
|
+
*
|
|
15
|
+
* @param config - Plugin configuration with namespace and node definitions
|
|
16
|
+
* @returns Result object with registered types and any errors
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import { registerFlowDropPlugin } from "@flowdrop/lib";
|
|
21
|
+
* import FancyNode from "./FancyNode.svelte";
|
|
22
|
+
* import GlowNode from "./GlowNode.svelte";
|
|
23
|
+
*
|
|
24
|
+
* const result = registerFlowDropPlugin({
|
|
25
|
+
* namespace: "awesome",
|
|
26
|
+
* name: "Awesome Nodes",
|
|
27
|
+
* version: "1.0.0",
|
|
28
|
+
* nodes: [
|
|
29
|
+
* {
|
|
30
|
+
* type: "fancy",
|
|
31
|
+
* displayName: "Fancy Node",
|
|
32
|
+
* component: FancyNode,
|
|
33
|
+
* icon: "mdi:sparkles"
|
|
34
|
+
* },
|
|
35
|
+
* {
|
|
36
|
+
* type: "glow",
|
|
37
|
+
* displayName: "Glowing Node",
|
|
38
|
+
* component: GlowNode,
|
|
39
|
+
* icon: "mdi:lightbulb"
|
|
40
|
+
* }
|
|
41
|
+
* ]
|
|
42
|
+
* });
|
|
43
|
+
*
|
|
44
|
+
* // Result:
|
|
45
|
+
* // {
|
|
46
|
+
* // success: true,
|
|
47
|
+
* // namespace: "awesome",
|
|
48
|
+
* // registeredTypes: ["awesome:fancy", "awesome:glow"],
|
|
49
|
+
* // errors: []
|
|
50
|
+
* // }
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export function registerFlowDropPlugin(config) {
|
|
54
|
+
const result = {
|
|
55
|
+
success: true,
|
|
56
|
+
namespace: config.namespace,
|
|
57
|
+
registeredTypes: [],
|
|
58
|
+
errors: []
|
|
59
|
+
};
|
|
60
|
+
// Validate namespace
|
|
61
|
+
if (!isValidNamespace(config.namespace)) {
|
|
62
|
+
result.success = false;
|
|
63
|
+
result.errors.push(`Invalid namespace "${config.namespace}". ` +
|
|
64
|
+
`Namespace must be lowercase alphanumeric with optional hyphens.`);
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
// Register each node
|
|
68
|
+
for (const nodeDef of config.nodes) {
|
|
69
|
+
try {
|
|
70
|
+
const namespacedType = createNamespacedType(config.namespace, nodeDef.type);
|
|
71
|
+
const registration = {
|
|
72
|
+
type: namespacedType,
|
|
73
|
+
displayName: nodeDef.displayName,
|
|
74
|
+
description: nodeDef.description,
|
|
75
|
+
component: nodeDef.component,
|
|
76
|
+
icon: nodeDef.icon,
|
|
77
|
+
category: nodeDef.category ?? 'custom',
|
|
78
|
+
source: config.namespace,
|
|
79
|
+
statusPosition: nodeDef.statusPosition,
|
|
80
|
+
statusSize: nodeDef.statusSize
|
|
81
|
+
};
|
|
82
|
+
nodeComponentRegistry.register(registration);
|
|
83
|
+
result.registeredTypes.push(namespacedType);
|
|
84
|
+
}
|
|
85
|
+
catch (error) {
|
|
86
|
+
result.success = false;
|
|
87
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
88
|
+
result.errors.push(`Failed to register ${config.namespace}:${nodeDef.type}: ${errorMessage}`);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return result;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Unregister all nodes from a plugin by namespace.
|
|
95
|
+
*
|
|
96
|
+
* @param namespace - The plugin namespace to unregister
|
|
97
|
+
* @returns Array of unregistered type identifiers
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```typescript
|
|
101
|
+
* const removed = unregisterFlowDropPlugin("awesome");
|
|
102
|
+
* // Returns ["awesome:fancy", "awesome:glow"]
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
export function unregisterFlowDropPlugin(namespace) {
|
|
106
|
+
const unregistered = [];
|
|
107
|
+
const types = nodeComponentRegistry.getTypes();
|
|
108
|
+
for (const type of types) {
|
|
109
|
+
if (type.startsWith(`${namespace}:`)) {
|
|
110
|
+
if (nodeComponentRegistry.unregister(type)) {
|
|
111
|
+
unregistered.push(type);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return unregistered;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Check if a namespace is valid.
|
|
119
|
+
* Must be lowercase alphanumeric with optional hyphens.
|
|
120
|
+
*
|
|
121
|
+
* @param namespace - The namespace to validate
|
|
122
|
+
* @returns true if valid
|
|
123
|
+
*/
|
|
124
|
+
export function isValidNamespace(namespace) {
|
|
125
|
+
return /^[a-z][a-z0-9-]*$/.test(namespace);
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Get all registered plugins (unique namespaces).
|
|
129
|
+
*
|
|
130
|
+
* @returns Array of namespace strings
|
|
131
|
+
*/
|
|
132
|
+
export function getRegisteredPlugins() {
|
|
133
|
+
const sources = new Set();
|
|
134
|
+
const registrations = nodeComponentRegistry.getAll();
|
|
135
|
+
for (const reg of registrations) {
|
|
136
|
+
if (reg.source && reg.source !== 'flowdrop') {
|
|
137
|
+
sources.add(reg.source);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
return Array.from(sources);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Get the count of nodes registered by a plugin.
|
|
144
|
+
*
|
|
145
|
+
* @param namespace - The plugin namespace
|
|
146
|
+
* @returns Number of nodes registered by this plugin
|
|
147
|
+
*/
|
|
148
|
+
export function getPluginNodeCount(namespace) {
|
|
149
|
+
return nodeComponentRegistry.getBySource(namespace).length;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Register a single custom node without a full plugin.
|
|
153
|
+
* Useful for project-specific custom nodes.
|
|
154
|
+
*
|
|
155
|
+
* @param type - Type identifier (can be namespaced or plain)
|
|
156
|
+
* @param displayName - Display name for UI
|
|
157
|
+
* @param component - Svelte component
|
|
158
|
+
* @param options - Additional options
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```typescript
|
|
162
|
+
* import { registerCustomNode } from "@flowdrop/lib";
|
|
163
|
+
* import MyNode from "./MyNode.svelte";
|
|
164
|
+
*
|
|
165
|
+
* registerCustomNode("myproject:special", "Special Node", MyNode, {
|
|
166
|
+
* icon: "mdi:star",
|
|
167
|
+
* description: "A special node for my project"
|
|
168
|
+
* });
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
export function registerCustomNode(type, displayName, component, options = {}) {
|
|
172
|
+
nodeComponentRegistry.register({
|
|
173
|
+
type,
|
|
174
|
+
displayName,
|
|
175
|
+
component,
|
|
176
|
+
description: options.description,
|
|
177
|
+
icon: options.icon,
|
|
178
|
+
category: options.category ?? 'custom',
|
|
179
|
+
source: options.source ?? 'custom',
|
|
180
|
+
statusPosition: options.statusPosition,
|
|
181
|
+
statusSize: options.statusSize
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Create a plugin builder for a fluent API experience.
|
|
186
|
+
*
|
|
187
|
+
* @param namespace - Plugin namespace
|
|
188
|
+
* @param name - Plugin name
|
|
189
|
+
* @returns Plugin builder with chainable methods
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```typescript
|
|
193
|
+
* import { createPlugin } from "@flowdrop/lib";
|
|
194
|
+
*
|
|
195
|
+
* createPlugin("awesome", "Awesome Nodes")
|
|
196
|
+
* .version("1.0.0")
|
|
197
|
+
* .node("fancy", "Fancy Node", FancyNode)
|
|
198
|
+
* .node("glow", "Glowing Node", GlowNode, { icon: "mdi:lightbulb" })
|
|
199
|
+
* .register();
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
202
|
+
export function createPlugin(namespace, name) {
|
|
203
|
+
const config = {
|
|
204
|
+
namespace,
|
|
205
|
+
name,
|
|
206
|
+
nodes: []
|
|
207
|
+
};
|
|
208
|
+
const builder = {
|
|
209
|
+
/**
|
|
210
|
+
* Set plugin version
|
|
211
|
+
*/
|
|
212
|
+
version(v) {
|
|
213
|
+
config.version = v;
|
|
214
|
+
return builder;
|
|
215
|
+
},
|
|
216
|
+
/**
|
|
217
|
+
* Set plugin description
|
|
218
|
+
*/
|
|
219
|
+
description(desc) {
|
|
220
|
+
config.description = desc;
|
|
221
|
+
return builder;
|
|
222
|
+
},
|
|
223
|
+
/**
|
|
224
|
+
* Add a node to the plugin
|
|
225
|
+
*/
|
|
226
|
+
node(type, displayName, component, options = {}) {
|
|
227
|
+
config.nodes.push({
|
|
228
|
+
type,
|
|
229
|
+
displayName,
|
|
230
|
+
component,
|
|
231
|
+
...options
|
|
232
|
+
});
|
|
233
|
+
return builder;
|
|
234
|
+
},
|
|
235
|
+
/**
|
|
236
|
+
* Register the plugin
|
|
237
|
+
*/
|
|
238
|
+
register() {
|
|
239
|
+
return registerFlowDropPlugin(config);
|
|
240
|
+
},
|
|
241
|
+
/**
|
|
242
|
+
* Get the config without registering (for testing/inspection)
|
|
243
|
+
*/
|
|
244
|
+
getConfig() {
|
|
245
|
+
return { ...config };
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
return builder;
|
|
249
|
+
}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Format Registry
|
|
3
|
+
*
|
|
4
|
+
* Central registry for workflow format adapters that allows built-in and
|
|
5
|
+
* third-party formats to be registered and resolved at runtime.
|
|
6
|
+
*
|
|
7
|
+
* This enables:
|
|
8
|
+
* - Custom workflow formats (e.g., n8n, LangGraph) to be registered by users
|
|
9
|
+
* - Format adapters to bundle their own node types
|
|
10
|
+
* - Bidirectional conversion between FlowDrop's StandardWorkflow and external formats
|
|
11
|
+
*
|
|
12
|
+
* Extends BaseRegistry for shared mechanics (subscribe, onClear, etc.).
|
|
13
|
+
*/
|
|
14
|
+
import type { StandardWorkflow } from '../adapters/WorkflowAdapter.js';
|
|
15
|
+
import type { NodeMetadata, WorkflowFormat } from '../types/index.js';
|
|
16
|
+
import { BaseRegistry } from './BaseRegistry.js';
|
|
17
|
+
/**
|
|
18
|
+
* Validation result returned by format adapters.
|
|
19
|
+
*/
|
|
20
|
+
export interface FormatValidationResult {
|
|
21
|
+
valid: boolean;
|
|
22
|
+
errors: string[];
|
|
23
|
+
warnings: string[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Interface that all workflow format adapters must implement.
|
|
27
|
+
* Adapters handle bidirectional conversion between FlowDrop's StandardWorkflow
|
|
28
|
+
* and an external workflow format.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* const myAdapter: WorkflowFormatAdapter = {
|
|
33
|
+
* id: 'n8n',
|
|
34
|
+
* name: 'n8n Workflow',
|
|
35
|
+
* export: (workflow) => JSON.stringify(convertToN8n(workflow)),
|
|
36
|
+
* import: (data) => convertFromN8n(JSON.parse(data)),
|
|
37
|
+
* };
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export interface WorkflowFormatAdapter {
|
|
41
|
+
/** Unique format identifier (e.g., 'agentspec', 'n8n') */
|
|
42
|
+
id: WorkflowFormat;
|
|
43
|
+
/** Display name for UI (e.g., 'Agent Spec (Oracle)') */
|
|
44
|
+
name: string;
|
|
45
|
+
/** Description */
|
|
46
|
+
description?: string;
|
|
47
|
+
/** Version */
|
|
48
|
+
version?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Optional node types specific to this format.
|
|
51
|
+
* When provided, these nodes are merged into the sidebar
|
|
52
|
+
* and automatically tagged with this format.
|
|
53
|
+
*/
|
|
54
|
+
nodes?: NodeMetadata[];
|
|
55
|
+
/** Convert a StandardWorkflow to this format's JSON string */
|
|
56
|
+
export(workflow: StandardWorkflow): string;
|
|
57
|
+
/** Parse this format's input and convert to StandardWorkflow */
|
|
58
|
+
import(data: string): StandardWorkflow;
|
|
59
|
+
/** Validate whether a workflow can be exported to this format */
|
|
60
|
+
validate?(workflow: StandardWorkflow): FormatValidationResult;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Central registry for workflow format adapters.
|
|
64
|
+
* Singleton — extends BaseRegistry for shared mechanics.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```typescript
|
|
68
|
+
* // Register a custom format
|
|
69
|
+
* workflowFormatRegistry.register({
|
|
70
|
+
* id: 'n8n',
|
|
71
|
+
* name: 'n8n Workflow',
|
|
72
|
+
* export: (workflow) => JSON.stringify(convertToN8n(workflow)),
|
|
73
|
+
* import: (data) => convertFromN8n(JSON.parse(data)),
|
|
74
|
+
* });
|
|
75
|
+
*
|
|
76
|
+
* // Get an adapter
|
|
77
|
+
* const adapter = workflowFormatRegistry.get('n8n');
|
|
78
|
+
* ```
|
|
79
|
+
*/
|
|
80
|
+
declare class WorkflowFormatRegistry extends BaseRegistry<string, WorkflowFormatAdapter> {
|
|
81
|
+
/**
|
|
82
|
+
* Register a workflow format adapter.
|
|
83
|
+
*
|
|
84
|
+
* @param adapter - The format adapter to register
|
|
85
|
+
* @param overwrite - If true, allows overwriting existing registrations
|
|
86
|
+
* @throws Error if format already registered and overwrite is false
|
|
87
|
+
*/
|
|
88
|
+
register(adapter: WorkflowFormatAdapter, overwrite?: boolean): void;
|
|
89
|
+
/**
|
|
90
|
+
* Get all registered format identifiers.
|
|
91
|
+
*
|
|
92
|
+
* @returns Array of format id strings
|
|
93
|
+
*/
|
|
94
|
+
getIds(): string[];
|
|
95
|
+
/**
|
|
96
|
+
* Get all node types provided by registered format adapters.
|
|
97
|
+
* Collects `adapter.nodes` from all adapters that provide them.
|
|
98
|
+
*
|
|
99
|
+
* @returns Array of NodeMetadata from all format adapters
|
|
100
|
+
*/
|
|
101
|
+
getAllFormatNodes(): NodeMetadata[];
|
|
102
|
+
/**
|
|
103
|
+
* Get node types for a specific format.
|
|
104
|
+
*
|
|
105
|
+
* @param formatId - The format identifier
|
|
106
|
+
* @returns Array of NodeMetadata for the format, or empty array
|
|
107
|
+
*/
|
|
108
|
+
getFormatNodes(formatId: WorkflowFormat): NodeMetadata[];
|
|
109
|
+
/**
|
|
110
|
+
* Get oneOf options for config forms.
|
|
111
|
+
* Returns array suitable for JSON Schema oneOf with const/title.
|
|
112
|
+
*
|
|
113
|
+
* @returns Array of oneOf items
|
|
114
|
+
*/
|
|
115
|
+
getOneOfOptions(): Array<{
|
|
116
|
+
const: string;
|
|
117
|
+
title: string;
|
|
118
|
+
}>;
|
|
119
|
+
}
|
|
120
|
+
/** Singleton instance of the workflow format registry */
|
|
121
|
+
export declare const workflowFormatRegistry: WorkflowFormatRegistry;
|
|
122
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Workflow Format Registry
|
|
3
|
+
*
|
|
4
|
+
* Central registry for workflow format adapters that allows built-in and
|
|
5
|
+
* third-party formats to be registered and resolved at runtime.
|
|
6
|
+
*
|
|
7
|
+
* This enables:
|
|
8
|
+
* - Custom workflow formats (e.g., n8n, LangGraph) to be registered by users
|
|
9
|
+
* - Format adapters to bundle their own node types
|
|
10
|
+
* - Bidirectional conversion between FlowDrop's StandardWorkflow and external formats
|
|
11
|
+
*
|
|
12
|
+
* Extends BaseRegistry for shared mechanics (subscribe, onClear, etc.).
|
|
13
|
+
*/
|
|
14
|
+
import { BaseRegistry } from './BaseRegistry.js';
|
|
15
|
+
/**
|
|
16
|
+
* Central registry for workflow format adapters.
|
|
17
|
+
* Singleton — extends BaseRegistry for shared mechanics.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* // Register a custom format
|
|
22
|
+
* workflowFormatRegistry.register({
|
|
23
|
+
* id: 'n8n',
|
|
24
|
+
* name: 'n8n Workflow',
|
|
25
|
+
* export: (workflow) => JSON.stringify(convertToN8n(workflow)),
|
|
26
|
+
* import: (data) => convertFromN8n(JSON.parse(data)),
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
29
|
+
* // Get an adapter
|
|
30
|
+
* const adapter = workflowFormatRegistry.get('n8n');
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
class WorkflowFormatRegistry extends BaseRegistry {
|
|
34
|
+
/**
|
|
35
|
+
* Register a workflow format adapter.
|
|
36
|
+
*
|
|
37
|
+
* @param adapter - The format adapter to register
|
|
38
|
+
* @param overwrite - If true, allows overwriting existing registrations
|
|
39
|
+
* @throws Error if format already registered and overwrite is false
|
|
40
|
+
*/
|
|
41
|
+
register(adapter, overwrite = false) {
|
|
42
|
+
if (this.items.has(adapter.id) && !overwrite) {
|
|
43
|
+
throw new Error(`Workflow format "${adapter.id}" is already registered. ` +
|
|
44
|
+
`Use overwrite: true to replace it.`);
|
|
45
|
+
}
|
|
46
|
+
this.items.set(adapter.id, adapter);
|
|
47
|
+
this.notifyListeners();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Get all registered format identifiers.
|
|
51
|
+
*
|
|
52
|
+
* @returns Array of format id strings
|
|
53
|
+
*/
|
|
54
|
+
getIds() {
|
|
55
|
+
return this.getKeys();
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Get all node types provided by registered format adapters.
|
|
59
|
+
* Collects `adapter.nodes` from all adapters that provide them.
|
|
60
|
+
*
|
|
61
|
+
* @returns Array of NodeMetadata from all format adapters
|
|
62
|
+
*/
|
|
63
|
+
getAllFormatNodes() {
|
|
64
|
+
const allNodes = [];
|
|
65
|
+
for (const adapter of this.items.values()) {
|
|
66
|
+
if (adapter.nodes && adapter.nodes.length > 0) {
|
|
67
|
+
allNodes.push(...adapter.nodes);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return allNodes;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Get node types for a specific format.
|
|
74
|
+
*
|
|
75
|
+
* @param formatId - The format identifier
|
|
76
|
+
* @returns Array of NodeMetadata for the format, or empty array
|
|
77
|
+
*/
|
|
78
|
+
getFormatNodes(formatId) {
|
|
79
|
+
const adapter = this.items.get(formatId);
|
|
80
|
+
return adapter?.nodes ?? [];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get oneOf options for config forms.
|
|
84
|
+
* Returns array suitable for JSON Schema oneOf with const/title.
|
|
85
|
+
*
|
|
86
|
+
* @returns Array of oneOf items
|
|
87
|
+
*/
|
|
88
|
+
getOneOfOptions() {
|
|
89
|
+
return this.getAll().map((adapter) => ({
|
|
90
|
+
const: adapter.id,
|
|
91
|
+
title: adapter.name
|
|
92
|
+
}));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/** Singleton instance of the workflow format registry */
|
|
96
|
+
export const workflowFormatRegistry = new WorkflowFormatRegistry();
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowDrop Workflow JSON Schema
|
|
3
|
+
*
|
|
4
|
+
* Provides the versioned JSON Schema for the FlowDrop workflow document format.
|
|
5
|
+
* The schema is generated from the OpenAPI YAML definitions in `api/v1/components/schemas/`.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { workflowSchema, WORKFLOW_SCHEMA_VERSION } from '@flowdrop/flowdrop/core';
|
|
10
|
+
*
|
|
11
|
+
* // Use with any JSON Schema validator (e.g., Ajv)
|
|
12
|
+
* import Ajv from 'ajv/dist/2020';
|
|
13
|
+
* const ajv = new Ajv();
|
|
14
|
+
* const validate = ajv.compile(workflowSchema);
|
|
15
|
+
* const valid = validate(myWorkflow);
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @module schema
|
|
19
|
+
*/
|
|
20
|
+
import workflowSchema from '../schemas/v1/workflow.schema.json';
|
|
21
|
+
/** Current workflow schema format version */
|
|
22
|
+
export declare const WORKFLOW_SCHEMA_VERSION = "1.0.0";
|
|
23
|
+
export { workflowSchema };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowDrop Workflow JSON Schema
|
|
3
|
+
*
|
|
4
|
+
* Provides the versioned JSON Schema for the FlowDrop workflow document format.
|
|
5
|
+
* The schema is generated from the OpenAPI YAML definitions in `api/v1/components/schemas/`.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* import { workflowSchema, WORKFLOW_SCHEMA_VERSION } from '@flowdrop/flowdrop/core';
|
|
10
|
+
*
|
|
11
|
+
* // Use with any JSON Schema validator (e.g., Ajv)
|
|
12
|
+
* import Ajv from 'ajv/dist/2020';
|
|
13
|
+
* const ajv = new Ajv();
|
|
14
|
+
* const validate = ajv.compile(workflowSchema);
|
|
15
|
+
* const valid = validate(myWorkflow);
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @module schema
|
|
19
|
+
*/
|
|
20
|
+
import workflowSchema from '../schemas/v1/workflow.schema.json';
|
|
21
|
+
/** Current workflow schema format version */
|
|
22
|
+
export const WORKFLOW_SCHEMA_VERSION = '1.0.0';
|
|
23
|
+
export { workflowSchema };
|