@flowdrop/flowdrop 2.0.0-beta.1 → 2.0.0-beta.10
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/CHANGELOG.md +173 -0
- package/MIGRATION-2.0.md +173 -3
- package/README.md +5 -5
- package/dist/adapters/WorkflowAdapter.js +4 -5
- package/dist/adapters/agentspec/AgentSpecAdapter.js +3 -3
- package/dist/adapters/agentspec/defaultNodeTypes.js +9 -9
- package/dist/api/enhanced-client.js +6 -11
- package/dist/commands/executor.js +51 -26
- package/dist/commands/storeIntegration.svelte.js +11 -1
- package/dist/commands/types.js +5 -5
- package/dist/components/App.svelte +547 -386
- package/dist/components/App.svelte.d.ts +16 -8
- package/dist/components/Button.stories.svelte +65 -0
- package/dist/components/Button.stories.svelte.d.ts +19 -0
- package/dist/components/Button.svelte +62 -0
- package/dist/components/Button.svelte.d.ts +24 -0
- package/dist/components/CanvasIconButton.svelte +76 -0
- package/dist/components/CanvasIconButton.svelte.d.ts +18 -0
- package/dist/components/ConfigForm.svelte +167 -562
- package/dist/components/ConfigForm.svelte.d.ts +24 -7
- package/dist/components/ConfigModal.svelte +9 -1
- package/dist/components/ConfigPanel.svelte +234 -15
- package/dist/components/ConfigPanel.svelte.d.ts +6 -0
- package/dist/components/EditorStatusBar.stories.svelte +44 -0
- package/dist/components/EditorStatusBar.stories.svelte.d.ts +27 -0
- package/dist/components/EditorStatusBar.svelte +99 -0
- package/dist/components/EditorStatusBar.svelte.d.ts +15 -0
- package/dist/components/IconButton.svelte +80 -0
- package/dist/components/IconButton.svelte.d.ts +30 -0
- package/dist/components/Input.svelte +74 -0
- package/dist/components/Input.svelte.d.ts +17 -0
- package/dist/components/LogoWordmark.svelte +113 -0
- package/dist/components/LogoWordmark.svelte.d.ts +26 -0
- package/dist/components/Navbar.svelte +17 -63
- package/dist/components/Navbar.svelte.d.ts +3 -0
- package/dist/components/NodeSidebar.svelte +21 -126
- package/dist/components/NodeSwapPicker.svelte +12 -30
- package/dist/components/PipelineStatus.svelte +6 -1
- package/dist/components/PipelineStatus.svelte.d.ts +3 -0
- package/dist/components/PortMappingRow.svelte +0 -2
- package/dist/components/SchemaForm.svelte +4 -14
- package/dist/components/Select.svelte +53 -0
- package/dist/components/Select.svelte.d.ts +15 -0
- package/dist/components/SettingsModal.svelte +0 -5
- package/dist/components/SettingsPanel.svelte +24 -6
- package/dist/components/Textarea.svelte +39 -0
- package/dist/components/Textarea.svelte.d.ts +12 -0
- package/dist/components/ThemeToggle.svelte +15 -94
- package/dist/components/UniversalNode.svelte +36 -4
- package/dist/components/UniversalNode.svelte.d.ts +1 -1
- package/dist/components/WorkflowEditor.svelte +66 -52
- package/dist/components/WorkflowEditor.svelte.d.ts +21 -0
- package/dist/components/chat/AIChatPanel.svelte +7 -2
- package/dist/components/console/ConsoleAutocomplete.svelte +1 -1
- package/dist/components/console/ConsoleInput.svelte +3 -3
- package/dist/components/console/ConsoleOutput.svelte +2 -2
- package/dist/components/form/FormArray.svelte +37 -173
- package/dist/components/form/FormAutocomplete.svelte +18 -15
- package/dist/components/form/FormCheckboxGroup.svelte +1 -5
- package/dist/components/form/FormCodeEditor.svelte +9 -7
- package/dist/components/form/FormField.svelte +18 -42
- package/dist/components/form/FormFieldLight.svelte +52 -48
- package/dist/components/form/FormFieldLight.svelte.d.ts +12 -0
- package/dist/components/form/FormFieldset.svelte +45 -11
- package/dist/components/form/FormMarkdownEditor.svelte +8 -5
- package/dist/components/form/FormNumberField.svelte +4 -36
- package/dist/components/form/FormPorts.svelte +262 -0
- package/dist/components/form/FormPorts.svelte.d.ts +13 -0
- package/dist/components/form/FormRangeField.svelte +61 -30
- package/dist/components/form/FormSelect.svelte +13 -75
- package/dist/components/form/FormTemplateEditor.svelte +6 -4
- package/dist/components/form/FormTextField.svelte +3 -35
- package/dist/components/form/FormTextarea.svelte +4 -39
- package/dist/components/form/FormToggle.svelte +0 -4
- package/dist/components/form/FormUISchemaRenderer.svelte +3 -1
- package/dist/components/form/resolveFieldType.d.ts +24 -0
- package/dist/components/form/resolveFieldType.js +55 -0
- package/dist/components/icons/CloseIcon.svelte +6 -0
- package/dist/components/icons/CloseIcon.svelte.d.ts +26 -0
- package/dist/components/icons/CommandLineIcon.svelte +15 -0
- package/dist/components/icons/CommandLineIcon.svelte.d.ts +26 -0
- package/dist/components/icons/MenuIcon.svelte +4 -0
- package/dist/components/icons/MenuIcon.svelte.d.ts +26 -0
- package/dist/components/icons/MenuOpenIcon.svelte +6 -0
- package/dist/components/icons/MenuOpenIcon.svelte.d.ts +26 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +0 -10
- package/dist/components/interrupt/ConfirmationPrompt.svelte +0 -5
- package/dist/components/interrupt/InterruptBubble.svelte +11 -12
- package/dist/components/interrupt/ReviewPrompt.svelte +0 -20
- package/dist/components/interrupt/TextInputPrompt.svelte +0 -6
- package/dist/components/layouts/MainLayout.svelte +4 -5
- package/dist/components/nodes/AtomNode.svelte +62 -76
- package/dist/components/nodes/AtomNode.svelte.d.ts +1 -1
- package/dist/components/nodes/GatewayNode.svelte +117 -164
- package/dist/components/nodes/GatewayNode.svelte.d.ts +1 -1
- package/dist/components/nodes/IdeaNode.svelte +72 -98
- package/dist/components/nodes/IdeaNode.svelte.d.ts +8 -4
- package/dist/components/nodes/NodeConfigButton.svelte +86 -0
- package/dist/components/nodes/NodeConfigButton.svelte.d.ts +15 -0
- package/dist/components/nodes/NotesNode.svelte +76 -85
- package/dist/components/nodes/NotesNode.svelte.d.ts +8 -4
- package/dist/components/nodes/SimpleNode.svelte +59 -133
- package/dist/components/nodes/SimpleNode.svelte.d.ts +4 -4
- package/dist/components/nodes/SquareNode.svelte +110 -164
- package/dist/components/nodes/SquareNode.svelte.d.ts +4 -4
- package/dist/components/nodes/TerminalNode.svelte +62 -124
- package/dist/components/nodes/TerminalNode.svelte.d.ts +4 -4
- package/dist/components/nodes/ToolNode.svelte +92 -103
- package/dist/components/nodes/ToolNode.svelte.d.ts +6 -6
- package/dist/components/nodes/WorkflowNode.svelte +132 -191
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +1 -1
- package/dist/components/playground/ChatInput.svelte +0 -1
- package/dist/components/playground/InputCollector.svelte +11 -48
- package/dist/components/playground/PipelineKanbanView.svelte +6 -4
- package/dist/components/playground/PipelineKanbanView.svelte.d.ts +2 -0
- package/dist/components/playground/PipelinePanel.svelte +20 -3
- package/dist/components/playground/PipelinePanel.svelte.d.ts +2 -0
- package/dist/components/playground/PipelineTableView.svelte +6 -4
- package/dist/components/playground/PipelineTableView.svelte.d.ts +2 -0
- package/dist/components/playground/Playground.svelte +76 -25
- package/dist/components/playground/Playground.svelte.d.ts +3 -0
- package/dist/components/playground/PlaygroundApp.svelte +6 -1
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +3 -0
- package/dist/components/playground/PlaygroundModal.svelte +5 -0
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +3 -0
- package/dist/components/playground/PlaygroundStudio.svelte +7 -6
- package/dist/components/playground/PlaygroundStudio.svelte.d.ts +3 -0
- package/dist/components/playground/pipelineViewUtils.svelte.d.ts +2 -1
- package/dist/components/playground/pipelineViewUtils.svelte.js +2 -2
- package/dist/components/surfaces/SurfaceOverlay.svelte +153 -0
- package/dist/components/surfaces/SurfaceOverlay.svelte.d.ts +14 -0
- package/dist/components/surfaces/TabbedSurface.svelte +133 -0
- package/dist/components/surfaces/TabbedSurface.svelte.d.ts +27 -0
- package/dist/config/endpoints.d.ts +23 -0
- package/dist/config/endpoints.js +28 -0
- package/dist/core/index.d.ts +2 -3
- package/dist/core/index.js +2 -6
- package/dist/display/index.d.ts +6 -1
- package/dist/display/index.js +9 -1
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.js +1 -1
- package/dist/form/full.d.ts +2 -1
- package/dist/form/full.js +4 -1
- package/dist/form/index.d.ts +0 -1
- package/dist/form/index.js +3 -2
- package/dist/helpers/workflowEditorHelper.d.ts +4 -2
- package/dist/helpers/workflowEditorHelper.js +8 -8
- package/dist/messages/index.d.ts +1 -1
- package/dist/messages/index.js +1 -1
- package/dist/openapi/v1/openapi.yaml +35 -23
- package/dist/playground/index.d.ts +2 -2
- package/dist/playground/index.js +2 -2
- package/dist/playground/mount.d.ts +19 -5
- package/dist/playground/mount.js +16 -8
- package/dist/registry/builtinNodeTypes.d.ts +53 -0
- package/dist/registry/builtinNodeTypes.js +67 -0
- package/dist/registry/builtinNodes.d.ts +2 -39
- package/dist/registry/builtinNodes.js +6 -53
- package/dist/registry/nodeComponentRegistry.d.ts +2 -1
- package/dist/schemas/v1/workflow.schema.json +16 -14
- package/dist/services/agentSpecExecutionService.d.ts +0 -2
- package/dist/services/agentSpecExecutionService.js +0 -2
- package/dist/services/apiVariableService.js +12 -26
- package/dist/services/categoriesApi.js +3 -6
- package/dist/services/chatService.d.ts +4 -3
- package/dist/services/chatService.js +13 -18
- package/dist/services/dynamicSchemaService.d.ts +31 -4
- package/dist/services/dynamicSchemaService.js +62 -33
- package/dist/services/historyService.d.ts +30 -8
- package/dist/services/historyService.js +51 -15
- package/dist/services/interruptService.d.ts +7 -6
- package/dist/services/interruptService.js +19 -21
- package/dist/services/playgroundService.d.ts +9 -8
- package/dist/services/playgroundService.js +23 -25
- package/dist/services/portConfigApi.js +3 -6
- package/dist/services/settingsService.d.ts +9 -4
- package/dist/services/settingsService.js +23 -12
- package/dist/skins/drafter.d.ts +30 -0
- package/dist/skins/drafter.js +198 -0
- package/dist/skins/index.d.ts +2 -1
- package/dist/skins/index.js +4 -2
- package/dist/stores/apiContext.d.ts +11 -0
- package/dist/stores/apiContext.js +15 -0
- package/dist/stores/categoriesStore.svelte.js +0 -1
- package/dist/stores/historyStore.svelte.d.ts +17 -3
- package/dist/stores/historyStore.svelte.js +30 -3
- package/dist/stores/instanceContainer.svelte.js +5 -0
- package/dist/stores/playgroundStore.svelte.js +1 -3
- package/dist/stores/settingsStore.svelte.d.ts +13 -0
- package/dist/stores/settingsStore.svelte.js +32 -0
- package/dist/stores/workflowStore.svelte.d.ts +42 -5
- package/dist/stores/workflowStore.svelte.js +109 -32
- package/dist/styles/base.css +285 -14
- package/dist/styles/tokens.css +60 -2
- package/dist/svelte-app.d.ts +18 -1
- package/dist/svelte-app.js +75 -110
- package/dist/themes/drafter.d.ts +2 -0
- package/dist/themes/drafter.js +15 -0
- package/dist/themes/index.d.ts +2 -1
- package/dist/themes/index.js +8 -2
- package/dist/types/auth.d.ts +9 -51
- package/dist/types/auth.js +4 -54
- package/dist/types/events.d.ts +18 -0
- package/dist/types/events.js +2 -1
- package/dist/types/index.d.ts +84 -29
- package/dist/types/index.js +0 -1
- package/dist/types/settings.d.ts +17 -1
- package/dist/types/settings.js +4 -2
- package/dist/types/skin.d.ts +1 -1
- package/dist/types/theme.d.ts +16 -2
- package/dist/types/uischema.d.ts +5 -0
- package/dist/utils/colors.d.ts +27 -0
- package/dist/utils/colors.js +23 -0
- package/dist/utils/connections.js +20 -56
- package/dist/utils/edgeStyling.js +9 -5
- package/dist/utils/fetchWithAuth.d.ts +36 -15
- package/dist/utils/fetchWithAuth.js +53 -23
- package/dist/utils/nodeIds.d.ts +1 -1
- package/dist/utils/nodeIds.js +1 -1
- package/dist/utils/nodeSwap.js +3 -6
- package/dist/utils/nodeTypes.js +1 -1
- package/dist/utils/portUtils.d.ts +47 -11
- package/dist/utils/portUtils.js +67 -14
- package/dist/utils/portal.d.ts +18 -0
- package/dist/utils/portal.js +34 -0
- package/dist/utils/schemaMerge.d.ts +25 -0
- package/dist/utils/schemaMerge.js +61 -0
- package/package.json +2 -1
package/dist/form/index.js
CHANGED
|
@@ -66,8 +66,9 @@ export { default as SchemaForm } from '../components/SchemaForm.svelte';
|
|
|
66
66
|
// ============================================================================
|
|
67
67
|
// Use the light version of FormField that uses the registry for heavy editors
|
|
68
68
|
export { default as FormField } from '../components/form/FormFieldLight.svelte';
|
|
69
|
-
//
|
|
70
|
-
|
|
69
|
+
// NOTE: `FormFieldFull` — the variant that *statically* bundles every editor
|
|
70
|
+
// (including CodeMirror) — is intentionally NOT exported here; it would pull
|
|
71
|
+
// CodeMirror into this light entry. Import it from `@flowdrop/flowdrop/form/full`.
|
|
71
72
|
export { default as FormFieldWrapper } from '../components/form/FormFieldWrapper.svelte';
|
|
72
73
|
export { default as FormTextField } from '../components/form/FormTextField.svelte';
|
|
73
74
|
export { default as FormTextarea } from '../components/form/FormTextarea.svelte';
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import type { WorkflowNode as WorkflowNodeType, NodeMetadata, Workflow, WorkflowEdge, NodeExecutionInfo } from '../types/index.js';
|
|
6
6
|
import { type FlowDropInstance } from '../stores/instanceContainer.svelte.js';
|
|
7
7
|
import type { ApiContext } from '../stores/apiContext.js';
|
|
8
|
+
import type { AuthProvider } from '../types/auth.js';
|
|
8
9
|
import type { EndpointConfig } from '../config/endpoints.js';
|
|
9
10
|
export { generateNodeId, extractConfigDefaults } from '../utils/nodeIds.js';
|
|
10
11
|
/**
|
|
@@ -134,7 +135,8 @@ export declare class WorkflowOperationsHelper {
|
|
|
134
135
|
*/
|
|
135
136
|
export declare class ConfigurationHelper {
|
|
136
137
|
/**
|
|
137
|
-
* Configure API endpoints
|
|
138
|
+
* Configure API endpoints (and optionally the auth provider) on the given
|
|
139
|
+
* instance's API context.
|
|
138
140
|
*/
|
|
139
|
-
static configureEndpoints(api: ApiContext, config: EndpointConfig): void;
|
|
141
|
+
static configureEndpoints(api: ApiContext, config: EndpointConfig, authProvider?: AuthProvider): void;
|
|
140
142
|
}
|
|
@@ -63,7 +63,7 @@ export class NodeOperationsHelper {
|
|
|
63
63
|
// Use fallback sample nodes
|
|
64
64
|
return [
|
|
65
65
|
{
|
|
66
|
-
|
|
66
|
+
node_type_id: 'text-input',
|
|
67
67
|
name: 'Text Input',
|
|
68
68
|
category: 'inputs',
|
|
69
69
|
description: 'Simple text input field',
|
|
@@ -73,7 +73,7 @@ export class NodeOperationsHelper {
|
|
|
73
73
|
outputs: [{ id: 'text', name: 'text', type: 'output', dataType: 'string' }]
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
|
-
|
|
76
|
+
node_type_id: 'text-output',
|
|
77
77
|
name: 'Text Output',
|
|
78
78
|
category: 'outputs',
|
|
79
79
|
description: 'Display text output',
|
|
@@ -128,7 +128,7 @@ export class NodeOperationsHelper {
|
|
|
128
128
|
};
|
|
129
129
|
}
|
|
130
130
|
// Generate node ID based on node type and existing nodes
|
|
131
|
-
const newNodeId = generateNodeId(nodeType.
|
|
131
|
+
const newNodeId = generateNodeId(nodeType.node_type_id, existingNodes);
|
|
132
132
|
// All nodes use "universalNode" type
|
|
133
133
|
// UniversalNode component handles internal switching based on metadata and config
|
|
134
134
|
const newNode = {
|
|
@@ -137,8 +137,7 @@ export class NodeOperationsHelper {
|
|
|
137
137
|
position, // Use the position calculated from the drop event
|
|
138
138
|
deletable: true,
|
|
139
139
|
data: {
|
|
140
|
-
...nodeData
|
|
141
|
-
nodeId: newNodeId // Use the same ID
|
|
140
|
+
...nodeData
|
|
142
141
|
}
|
|
143
142
|
};
|
|
144
143
|
return newNode;
|
|
@@ -382,9 +381,10 @@ export class WorkflowOperationsHelper {
|
|
|
382
381
|
*/
|
|
383
382
|
export class ConfigurationHelper {
|
|
384
383
|
/**
|
|
385
|
-
* Configure API endpoints
|
|
384
|
+
* Configure API endpoints (and optionally the auth provider) on the given
|
|
385
|
+
* instance's API context.
|
|
386
386
|
*/
|
|
387
|
-
static configureEndpoints(api, config) {
|
|
388
|
-
api.configure(config);
|
|
387
|
+
static configureEndpoints(api, config, authProvider) {
|
|
388
|
+
api.configure(config, authProvider);
|
|
389
389
|
}
|
|
390
390
|
}
|
package/dist/messages/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Messages module — typed, overridable, translation-ready user-facing strings.
|
|
3
3
|
*
|
|
4
4
|
* See `./defaults.ts` for the canonical shape, `./context.ts` for the runtime
|
|
5
|
-
* plumbing, and the i18n guide in
|
|
5
|
+
* plumbing, and the i18n guide in the docs site (`.docs/`) for consumer recipes.
|
|
6
6
|
*/
|
|
7
7
|
export { defaultMessages } from './defaults.js';
|
|
8
8
|
export { mergeMessages } from './merge.js';
|
package/dist/messages/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Messages module — typed, overridable, translation-ready user-facing strings.
|
|
3
3
|
*
|
|
4
4
|
* See `./defaults.ts` for the canonical shape, `./context.ts` for the runtime
|
|
5
|
-
* plumbing, and the i18n guide in
|
|
5
|
+
* plumbing, and the i18n guide in the docs site (`.docs/`) for consumer recipes.
|
|
6
6
|
*/
|
|
7
7
|
export { defaultMessages } from './defaults.js';
|
|
8
8
|
export { mergeMessages } from './merge.js';
|
|
@@ -37,8 +37,8 @@ info:
|
|
|
37
37
|
email: shibinkidd@gmail.com
|
|
38
38
|
url: https://www.drupal.org/project/issues/flowdrop?categories=All
|
|
39
39
|
servers:
|
|
40
|
-
- url: http://localhost:
|
|
41
|
-
description: Local development server
|
|
40
|
+
- url: http://localhost:7104/api/flowdrop
|
|
41
|
+
description: Local development server
|
|
42
42
|
- url: https://flowdrop.ddev.site/api/flowdrop
|
|
43
43
|
description: Local Drupal server
|
|
44
44
|
security:
|
|
@@ -250,7 +250,7 @@ paths:
|
|
|
250
250
|
value:
|
|
251
251
|
success: true
|
|
252
252
|
data:
|
|
253
|
-
-
|
|
253
|
+
- node_type_id: openai_chat_executor
|
|
254
254
|
name: OpenAI Chat
|
|
255
255
|
description: Chat completion using OpenAI's GPT models
|
|
256
256
|
category: ai
|
|
@@ -563,7 +563,7 @@ paths:
|
|
|
563
563
|
config:
|
|
564
564
|
placeholder: Enter your question
|
|
565
565
|
metadata:
|
|
566
|
-
|
|
566
|
+
node_type_id: text_input
|
|
567
567
|
name: Text Input
|
|
568
568
|
description: Text input field for user data
|
|
569
569
|
category: inputs
|
|
@@ -2550,10 +2550,12 @@ components:
|
|
|
2550
2550
|
for user-defined input/output handles
|
|
2551
2551
|
- **gateway**: Supports `config.branches` for conditional branching paths
|
|
2552
2552
|
|
|
2553
|
-
##
|
|
2553
|
+
## Port order + exposure
|
|
2554
2554
|
|
|
2555
|
-
|
|
2556
|
-
|
|
2555
|
+
Render order and exposure are controlled per instance via `config.ports`
|
|
2556
|
+
(a per-direction ordered list of `{id, exposed?}`), over each port's metadata
|
|
2557
|
+
`displayOrder` / `exposedByDefault` defaults. Order is cosmetic; a not-exposed
|
|
2558
|
+
port is hidden, not wireable, and not runtime-overridable.
|
|
2557
2559
|
NodeExecutionStatus:
|
|
2558
2560
|
type: string
|
|
2559
2561
|
enum:
|
|
@@ -3213,6 +3215,26 @@ components:
|
|
|
3213
3215
|
example: Parsed JSON response from the HTTP request
|
|
3214
3216
|
defaultValue:
|
|
3215
3217
|
description: Default value used when no connection provides data
|
|
3218
|
+
exposedByDefault:
|
|
3219
|
+
type: boolean
|
|
3220
|
+
default: true
|
|
3221
|
+
description: |
|
|
3222
|
+
Whether the port is exposed when the instance sets no explicit exposure
|
|
3223
|
+
for it (in `data.config.ports`). Defaults to true — a missing override
|
|
3224
|
+
reads as exposed. Reserved ports that ship hidden until an author opts in
|
|
3225
|
+
(e.g. the `error` output) carry false. In v2 exposure is semantic: a
|
|
3226
|
+
not-exposed port is hidden on the canvas, not wireable, and not
|
|
3227
|
+
runtime-overridable.
|
|
3228
|
+
displayOrder:
|
|
3229
|
+
type: integer
|
|
3230
|
+
default: 0
|
|
3231
|
+
description: |
|
|
3232
|
+
Default sort weight for the port's render position, ascending; ties
|
|
3233
|
+
break on declaration order. Author-declared ports default to 0. Reserved
|
|
3234
|
+
ports (the `error` output and `trigger`/`tool` control ports) need no
|
|
3235
|
+
value — the renderer sinks them to the bottom automatically; set this
|
|
3236
|
+
only to override that. Cosmetic only. The instance's `config.ports`
|
|
3237
|
+
order overrides this when present.
|
|
3216
3238
|
schema:
|
|
3217
3239
|
$ref: '#/components/schemas/PortDataSchema'
|
|
3218
3240
|
description: |
|
|
@@ -3449,13 +3471,6 @@ components:
|
|
|
3449
3471
|
|
|
3450
3472
|
Instance-level settings take precedence over type-level defaults.
|
|
3451
3473
|
properties:
|
|
3452
|
-
hideUnconnectedHandles:
|
|
3453
|
-
type: boolean
|
|
3454
|
-
description: |
|
|
3455
|
-
Show/hide unconnected handles (ports) to reduce visual noise.
|
|
3456
|
-
When true, only ports with active connections are displayed.
|
|
3457
|
-
Useful for nodes with many optional ports.
|
|
3458
|
-
example: true
|
|
3459
3474
|
atom:
|
|
3460
3475
|
$ref: '#/components/schemas/AtomUIConfig'
|
|
3461
3476
|
style:
|
|
@@ -3492,7 +3507,6 @@ components:
|
|
|
3492
3507
|
additionalProperties: true
|
|
3493
3508
|
example:
|
|
3494
3509
|
ui:
|
|
3495
|
-
hideUnconnectedHandles: true
|
|
3496
3510
|
style:
|
|
3497
3511
|
opacity: 0.8
|
|
3498
3512
|
agentspec:component_type: llm_node
|
|
@@ -3514,10 +3528,11 @@ components:
|
|
|
3514
3528
|
## Extensions Support
|
|
3515
3529
|
|
|
3516
3530
|
The `extensions` property allows storing UI settings and 3rd party data:
|
|
3517
|
-
- Use `extensions.ui.
|
|
3531
|
+
- Use `extensions.ui.style` for custom per-node styling
|
|
3518
3532
|
- Use namespaced keys for custom integrations (e.g., "myapp:settings")
|
|
3533
|
+
(Port order + exposure live in `config.ports`, not here.)
|
|
3519
3534
|
properties:
|
|
3520
|
-
|
|
3535
|
+
node_type_id:
|
|
3521
3536
|
type: string
|
|
3522
3537
|
description: Node type unique identifier
|
|
3523
3538
|
example: calculator
|
|
@@ -3607,7 +3622,7 @@ components:
|
|
|
3607
3622
|
Default extension properties for all instances of this node type.
|
|
3608
3623
|
Can be overridden at the instance level via WorkflowNode.data.extensions.
|
|
3609
3624
|
required:
|
|
3610
|
-
-
|
|
3625
|
+
- node_type_id
|
|
3611
3626
|
- name
|
|
3612
3627
|
- description
|
|
3613
3628
|
- category
|
|
@@ -3801,7 +3816,7 @@ components:
|
|
|
3801
3816
|
description: Node instance UUID
|
|
3802
3817
|
type:
|
|
3803
3818
|
type: string
|
|
3804
|
-
description: Node type ID (references NodeMetadata.
|
|
3819
|
+
description: Node type ID (references NodeMetadata.node_type_id)
|
|
3805
3820
|
example: calculator
|
|
3806
3821
|
position:
|
|
3807
3822
|
$ref: '#/components/schemas/Position'
|
|
@@ -3825,9 +3840,6 @@ components:
|
|
|
3825
3840
|
error:
|
|
3826
3841
|
type: string
|
|
3827
3842
|
description: Error message if node execution failed
|
|
3828
|
-
nodeId:
|
|
3829
|
-
type: string
|
|
3830
|
-
description: Alternative node ID
|
|
3831
3843
|
executionInfo:
|
|
3832
3844
|
$ref: '#/components/schemas/NodeExecutionInfo'
|
|
3833
3845
|
extensions:
|
|
@@ -3838,8 +3850,8 @@ components:
|
|
|
3838
3850
|
Use for instance-specific UI states or custom data.
|
|
3839
3851
|
|
|
3840
3852
|
Common use cases:
|
|
3841
|
-
- `extensions.ui.hideUnconnectedHandles`: Hide ports without connections
|
|
3842
3853
|
- `extensions.ui.style`: Custom styling for this node instance
|
|
3854
|
+
(Port order + exposure live in `config.ports`, not here.)
|
|
3843
3855
|
required:
|
|
3844
3856
|
- label
|
|
3845
3857
|
- config
|
|
@@ -126,8 +126,8 @@ export { default as InputCollector } from '../components/playground/InputCollect
|
|
|
126
126
|
export { default as ExecutionLogs } from '../components/playground/ExecutionLogs.svelte';
|
|
127
127
|
export { default as MessageBubble } from '../components/playground/MessageBubble.svelte';
|
|
128
128
|
export { InterruptBubble, ConfirmationPrompt, ChoicePrompt, TextInputPrompt, FormPrompt, ReviewPrompt } from '../components/interrupt/index.js';
|
|
129
|
-
export { PlaygroundService
|
|
130
|
-
export { InterruptService
|
|
129
|
+
export { PlaygroundService } from '../services/playgroundService.js';
|
|
130
|
+
export { InterruptService } from '../services/interruptService.js';
|
|
131
131
|
export { PlaygroundStore } from '../stores/playgroundStore.svelte.js';
|
|
132
132
|
export type { PlaygroundSession, PlaygroundMessage, PlaygroundInputField, PlaygroundMessageRequest, PlaygroundMessagesResult, PlaygroundConfig, PlaygroundMode, PlaygroundSessionStatus, PlaygroundMessageRole, PlaygroundMessageLevel, PlaygroundMessageMetadata, PlaygroundApiResponse, PlaygroundSessionsResponse, PlaygroundSessionResponse, PlaygroundMessageResponse, PlaygroundMessagesApiResponse, PlaygroundExecution } from '../types/playground.js';
|
|
133
133
|
export { isChatInputNode, CHAT_INPUT_PATTERNS, defaultShouldStopPolling, defaultIsTerminalStatus, DEFAULT_STOP_POLLING_STATUSES, DEFAULT_TERMINAL_STATUSES } from '../types/playground.js';
|
package/dist/playground/index.js
CHANGED
|
@@ -135,11 +135,11 @@ export { InterruptBubble, ConfirmationPrompt, ChoicePrompt, TextInputPrompt, For
|
|
|
135
135
|
// ============================================================================
|
|
136
136
|
// Playground Service
|
|
137
137
|
// ============================================================================
|
|
138
|
-
export { PlaygroundService
|
|
138
|
+
export { PlaygroundService } from '../services/playgroundService.js';
|
|
139
139
|
// ============================================================================
|
|
140
140
|
// Interrupt Service (Human-in-the-Loop)
|
|
141
141
|
// ============================================================================
|
|
142
|
-
export { InterruptService
|
|
142
|
+
export { InterruptService } from '../services/interruptService.js';
|
|
143
143
|
// ============================================================================
|
|
144
144
|
// Playground Store
|
|
145
145
|
// ============================================================================
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
*/
|
|
46
46
|
import type { Workflow } from '../types/index.js';
|
|
47
47
|
import type { EndpointConfig } from '../config/endpoints.js';
|
|
48
|
+
import type { AuthProvider } from '../types/auth.js';
|
|
48
49
|
import type { PlaygroundMode, PlaygroundConfig, PlaygroundSession, PlaygroundMessagesApiResponse, PlaygroundSessionStatus } from '../types/playground.js';
|
|
49
50
|
import type { PartialSettings, SettingsCategory } from '../types/settings.js';
|
|
50
51
|
import type { NavbarAction } from '../types/navbar.js';
|
|
@@ -81,6 +82,15 @@ export interface PlaygroundMountOptions {
|
|
|
81
82
|
* Use createEndpointConfig() to create this
|
|
82
83
|
*/
|
|
83
84
|
endpointConfig?: EndpointConfig;
|
|
85
|
+
/**
|
|
86
|
+
* Authentication provider for API requests.
|
|
87
|
+
*
|
|
88
|
+
* Applied to this instance via `fd.api.configure()` so every request the
|
|
89
|
+
* playground makes (sessions, messages, polling, interrupts) carries the
|
|
90
|
+
* provider's headers — e.g. an `Authorization` bearer token or an
|
|
91
|
+
* `X-CSRF-Token`. Omit for unauthenticated backends.
|
|
92
|
+
*/
|
|
93
|
+
authProvider?: AuthProvider;
|
|
84
94
|
/**
|
|
85
95
|
* Playground-specific configuration options
|
|
86
96
|
*/
|
|
@@ -242,7 +252,7 @@ export interface PlaygroundAppMountOptions extends Omit<PlaygroundStudioMountOpt
|
|
|
242
252
|
* @default "standalone"
|
|
243
253
|
*/
|
|
244
254
|
mode?: 'standalone' | 'embedded';
|
|
245
|
-
/** Render the FlowDrop Navbar above the playground (default:
|
|
255
|
+
/** Render the FlowDrop Navbar above the playground (default: false). */
|
|
246
256
|
showNavbar?: boolean;
|
|
247
257
|
/** Title shown in the navbar. Falls back to the workflow name, then "Playground". */
|
|
248
258
|
navbarTitle?: string;
|
|
@@ -258,17 +268,21 @@ export interface PlaygroundAppMountOptions extends Omit<PlaygroundStudioMountOpt
|
|
|
258
268
|
showSettingsResetButton?: boolean;
|
|
259
269
|
}
|
|
260
270
|
/**
|
|
261
|
-
* Mount the full-page PlaygroundApp (
|
|
271
|
+
* Mount the full-page PlaygroundApp (PlaygroundStudio, optionally wrapped in the
|
|
272
|
+
* FlowDrop Navbar) into a container.
|
|
262
273
|
*
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
274
|
+
* The navbar is opt-in (`showNavbar: true`) — matching the editor mount, so
|
|
275
|
+
* embedding into a page that already has its own header never double-stacks a
|
|
276
|
+
* header. Pass `showNavbar: true` when FlowDrop owns the whole page and you want
|
|
277
|
+
* its chrome (logo, branding, settings modal). For a leaner embeddable
|
|
278
|
+
* split-pane, mountPlaygroundStudio() omits the navbar wrapper entirely.
|
|
266
279
|
*
|
|
267
280
|
* @example
|
|
268
281
|
* ```typescript
|
|
269
282
|
* const app = await mountPlaygroundApp(container, {
|
|
270
283
|
* workflowId: 'wf-123',
|
|
271
284
|
* endpointConfig: createEndpointConfig('/api/flowdrop'),
|
|
285
|
+
* showNavbar: true,
|
|
272
286
|
* navbarTitle: 'My Workflow',
|
|
273
287
|
* primaryActions: [
|
|
274
288
|
* { label: 'Edit', href: '/workflows/wf-123/edit', icon: 'mdi:pencil-outline', variant: 'secondary' },
|
package/dist/playground/mount.js
CHANGED
|
@@ -125,7 +125,7 @@ function buildMountedPlayground(svelteApp, workflowId, config, fd, ownsInstance,
|
|
|
125
125
|
startPolling: () => {
|
|
126
126
|
const session = fd.playground.currentSession;
|
|
127
127
|
if (session) {
|
|
128
|
-
playgroundService.startPolling(fd.api.config, session.id, (response) => fd.playground.applyServerResponse(response, session.id), pollingInterval, config.shouldStopPolling, playgroundService.getLastSequenceNumber());
|
|
128
|
+
playgroundService.startPolling(fd.api.config, session.id, (response) => fd.playground.applyServerResponse(response, session.id), pollingInterval, config.shouldStopPolling, playgroundService.getLastSequenceNumber(), fd.api.authProvider);
|
|
129
129
|
}
|
|
130
130
|
},
|
|
131
131
|
pushMessages: (response) => fd.playground.applyServerResponse(response, null),
|
|
@@ -165,7 +165,7 @@ function buildMountedPlayground(svelteApp, workflowId, config, fd, ownsInstance,
|
|
|
165
165
|
* ```
|
|
166
166
|
*/
|
|
167
167
|
export async function mountPlayground(container, options) {
|
|
168
|
-
const { workflowId, workflow, mode = 'standalone', initialSessionId, endpointConfig, config = {}, height, width, settings: initialSettings, onClose, onSessionStatusChange, instanceId } = options;
|
|
168
|
+
const { workflowId, workflow, mode = 'standalone', initialSessionId, endpointConfig, authProvider, config = {}, height, width, settings: initialSettings, onClose, onSessionStatusChange, instanceId } = options;
|
|
169
169
|
// Validate required parameters
|
|
170
170
|
if (!workflowId) {
|
|
171
171
|
throw new Error('workflowId is required for mountPlayground()');
|
|
@@ -200,6 +200,7 @@ export async function mountPlayground(container, options) {
|
|
|
200
200
|
workflow,
|
|
201
201
|
initialSessionId,
|
|
202
202
|
endpointConfig: finalEndpointConfig,
|
|
203
|
+
authProvider,
|
|
203
204
|
config,
|
|
204
205
|
onClose: () => {
|
|
205
206
|
if (onClose) {
|
|
@@ -219,6 +220,7 @@ export async function mountPlayground(container, options) {
|
|
|
219
220
|
mode,
|
|
220
221
|
initialSessionId,
|
|
221
222
|
endpointConfig: finalEndpointConfig,
|
|
223
|
+
authProvider,
|
|
222
224
|
config,
|
|
223
225
|
onClose
|
|
224
226
|
}
|
|
@@ -247,7 +249,7 @@ export function unmountPlayground(app) {
|
|
|
247
249
|
}
|
|
248
250
|
}
|
|
249
251
|
export async function mountPlaygroundStudio(container, options) {
|
|
250
|
-
const { workflowId, workflow, mode = 'standalone', initialSessionId, endpointConfig, config = {}, height, width, initialPipelineOpen, minChatWidth, initialPipelineWidth, settings: initialSettings, onClose, onSessionNavigate, onSessionStatusChange, pipelineViews, instanceId } = options;
|
|
252
|
+
const { workflowId, workflow, mode = 'standalone', initialSessionId, endpointConfig, authProvider, config = {}, height, width, initialPipelineOpen, minChatWidth, initialPipelineWidth, settings: initialSettings, onClose, onSessionNavigate, onSessionStatusChange, pipelineViews, instanceId } = options;
|
|
251
253
|
if (!workflowId) {
|
|
252
254
|
throw new Error('workflowId is required for mountPlaygroundStudio()');
|
|
253
255
|
}
|
|
@@ -272,6 +274,7 @@ export async function mountPlaygroundStudio(container, options) {
|
|
|
272
274
|
mode,
|
|
273
275
|
initialSessionId,
|
|
274
276
|
endpointConfig: finalEndpointConfig,
|
|
277
|
+
authProvider,
|
|
275
278
|
config,
|
|
276
279
|
onClose,
|
|
277
280
|
onSessionNavigate,
|
|
@@ -284,17 +287,21 @@ export async function mountPlaygroundStudio(container, options) {
|
|
|
284
287
|
return buildMountedPlayground(svelteApp, workflowId, config, fd, ownsInstance, onSessionStatusChange);
|
|
285
288
|
}
|
|
286
289
|
/**
|
|
287
|
-
* Mount the full-page PlaygroundApp (
|
|
290
|
+
* Mount the full-page PlaygroundApp (PlaygroundStudio, optionally wrapped in the
|
|
291
|
+
* FlowDrop Navbar) into a container.
|
|
288
292
|
*
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
293
|
+
* The navbar is opt-in (`showNavbar: true`) — matching the editor mount, so
|
|
294
|
+
* embedding into a page that already has its own header never double-stacks a
|
|
295
|
+
* header. Pass `showNavbar: true` when FlowDrop owns the whole page and you want
|
|
296
|
+
* its chrome (logo, branding, settings modal). For a leaner embeddable
|
|
297
|
+
* split-pane, mountPlaygroundStudio() omits the navbar wrapper entirely.
|
|
292
298
|
*
|
|
293
299
|
* @example
|
|
294
300
|
* ```typescript
|
|
295
301
|
* const app = await mountPlaygroundApp(container, {
|
|
296
302
|
* workflowId: 'wf-123',
|
|
297
303
|
* endpointConfig: createEndpointConfig('/api/flowdrop'),
|
|
304
|
+
* showNavbar: true,
|
|
298
305
|
* navbarTitle: 'My Workflow',
|
|
299
306
|
* primaryActions: [
|
|
300
307
|
* { label: 'Edit', href: '/workflows/wf-123/edit', icon: 'mdi:pencil-outline', variant: 'secondary' },
|
|
@@ -304,7 +311,7 @@ export async function mountPlaygroundStudio(container, options) {
|
|
|
304
311
|
* ```
|
|
305
312
|
*/
|
|
306
313
|
export async function mountPlaygroundApp(container, options) {
|
|
307
|
-
const { workflowId, workflow, mode = 'standalone', initialSessionId, endpointConfig, config = {}, height, width, showNavbar =
|
|
314
|
+
const { workflowId, workflow, mode = 'standalone', initialSessionId, endpointConfig, authProvider, config = {}, height, width, showNavbar = false, navbarTitle, primaryActions, showSettings = true, settingsCategories, showSettingsSyncButton, showSettingsResetButton, initialPipelineOpen, minChatWidth, initialPipelineWidth, settings: initialSettings, onClose, onSessionNavigate, onSessionStatusChange, instanceId } = options;
|
|
308
315
|
if (!workflowId) {
|
|
309
316
|
throw new Error('workflowId is required for mountPlaygroundApp()');
|
|
310
317
|
}
|
|
@@ -332,6 +339,7 @@ export async function mountPlaygroundApp(container, options) {
|
|
|
332
339
|
mode,
|
|
333
340
|
initialSessionId,
|
|
334
341
|
endpointConfig: finalEndpointConfig,
|
|
342
|
+
authProvider,
|
|
335
343
|
config,
|
|
336
344
|
showNavbar,
|
|
337
345
|
navbarTitle,
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in Node Type Metadata (pure — no component imports)
|
|
3
|
+
*
|
|
4
|
+
* The type identifiers, aliases, and resolution helpers for FlowDrop's built-in
|
|
5
|
+
* node types, with ZERO dependency on the Svelte node components. Utilities that
|
|
6
|
+
* only need to reason about type strings (e.g. `utils/nodeTypes.ts`, reachable
|
|
7
|
+
* from `@flowdrop/flowdrop/core`) import from here, so the lightweight `core`
|
|
8
|
+
* entry never statically pulls in node components, marked, or DOMPurify.
|
|
9
|
+
*
|
|
10
|
+
* The component registrations themselves live in `./builtinNodes.ts`, which
|
|
11
|
+
* re-exports everything here for backward compatibility.
|
|
12
|
+
*
|
|
13
|
+
* @module registry/builtinNodeTypes
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Source identifier for built-in FlowDrop components.
|
|
17
|
+
*/
|
|
18
|
+
export declare const FLOWDROP_SOURCE = "flowdrop";
|
|
19
|
+
/**
|
|
20
|
+
* Type for built-in node types.
|
|
21
|
+
* Use this when you specifically need a built-in type.
|
|
22
|
+
*/
|
|
23
|
+
export type BuiltinNodeType = 'workflowNode' | 'simple' | 'square' | 'atom' | 'tool' | 'gateway' | 'note' | 'terminal' | 'idea';
|
|
24
|
+
/**
|
|
25
|
+
* Array of built-in type strings for runtime validation.
|
|
26
|
+
*/
|
|
27
|
+
export declare const BUILTIN_NODE_TYPES: BuiltinNodeType[];
|
|
28
|
+
/**
|
|
29
|
+
* Alias mapping for type resolution.
|
|
30
|
+
* Maps alternative type names to their canonical registration.
|
|
31
|
+
*/
|
|
32
|
+
export declare const BUILTIN_TYPE_ALIASES: Record<string, string>;
|
|
33
|
+
/**
|
|
34
|
+
* Get the canonical type for a given type string.
|
|
35
|
+
* Handles aliases like "default" -> "workflowNode".
|
|
36
|
+
*
|
|
37
|
+
* @param type - The type string to resolve
|
|
38
|
+
* @returns The canonical type string
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolveBuiltinAlias(type: string): string;
|
|
41
|
+
/**
|
|
42
|
+
* Check if a type is a built-in FlowDrop type.
|
|
43
|
+
*
|
|
44
|
+
* @param type - The type to check
|
|
45
|
+
* @returns true if this is a built-in type
|
|
46
|
+
*/
|
|
47
|
+
export declare function isBuiltinType(type: string): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Get all built-in type identifiers.
|
|
50
|
+
*
|
|
51
|
+
* @returns Array of built-in type strings
|
|
52
|
+
*/
|
|
53
|
+
export declare function getBuiltinTypes(): string[];
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Built-in Node Type Metadata (pure — no component imports)
|
|
3
|
+
*
|
|
4
|
+
* The type identifiers, aliases, and resolution helpers for FlowDrop's built-in
|
|
5
|
+
* node types, with ZERO dependency on the Svelte node components. Utilities that
|
|
6
|
+
* only need to reason about type strings (e.g. `utils/nodeTypes.ts`, reachable
|
|
7
|
+
* from `@flowdrop/flowdrop/core`) import from here, so the lightweight `core`
|
|
8
|
+
* entry never statically pulls in node components, marked, or DOMPurify.
|
|
9
|
+
*
|
|
10
|
+
* The component registrations themselves live in `./builtinNodes.ts`, which
|
|
11
|
+
* re-exports everything here for backward compatibility.
|
|
12
|
+
*
|
|
13
|
+
* @module registry/builtinNodeTypes
|
|
14
|
+
*/
|
|
15
|
+
/**
|
|
16
|
+
* Source identifier for built-in FlowDrop components.
|
|
17
|
+
*/
|
|
18
|
+
export const FLOWDROP_SOURCE = 'flowdrop';
|
|
19
|
+
/**
|
|
20
|
+
* Array of built-in type strings for runtime validation.
|
|
21
|
+
*/
|
|
22
|
+
export const BUILTIN_NODE_TYPES = [
|
|
23
|
+
'workflowNode',
|
|
24
|
+
'simple',
|
|
25
|
+
'square',
|
|
26
|
+
'atom',
|
|
27
|
+
'tool',
|
|
28
|
+
'gateway',
|
|
29
|
+
'note',
|
|
30
|
+
'terminal',
|
|
31
|
+
'idea'
|
|
32
|
+
];
|
|
33
|
+
/**
|
|
34
|
+
* Alias mapping for type resolution.
|
|
35
|
+
* Maps alternative type names to their canonical registration.
|
|
36
|
+
*/
|
|
37
|
+
export const BUILTIN_TYPE_ALIASES = {
|
|
38
|
+
default: 'workflowNode'
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Get the canonical type for a given type string.
|
|
42
|
+
* Handles aliases like "default" -> "workflowNode".
|
|
43
|
+
*
|
|
44
|
+
* @param type - The type string to resolve
|
|
45
|
+
* @returns The canonical type string
|
|
46
|
+
*/
|
|
47
|
+
export function resolveBuiltinAlias(type) {
|
|
48
|
+
return BUILTIN_TYPE_ALIASES[type] ?? type;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a type is a built-in FlowDrop type.
|
|
52
|
+
*
|
|
53
|
+
* @param type - The type to check
|
|
54
|
+
* @returns true if this is a built-in type
|
|
55
|
+
*/
|
|
56
|
+
export function isBuiltinType(type) {
|
|
57
|
+
const canonicalType = resolveBuiltinAlias(type);
|
|
58
|
+
return BUILTIN_NODE_TYPES.includes(canonicalType);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get all built-in type identifiers.
|
|
62
|
+
*
|
|
63
|
+
* @returns Array of built-in type strings
|
|
64
|
+
*/
|
|
65
|
+
export function getBuiltinTypes() {
|
|
66
|
+
return [...BUILTIN_NODE_TYPES];
|
|
67
|
+
}
|
|
@@ -6,47 +6,10 @@
|
|
|
6
6
|
* ensuring all built-in node types are available without user action.
|
|
7
7
|
*/
|
|
8
8
|
import { type NodeComponentRegistration } from './nodeComponentRegistry.js';
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
*/
|
|
12
|
-
export declare const FLOWDROP_SOURCE = "flowdrop";
|
|
9
|
+
export { FLOWDROP_SOURCE, BUILTIN_TYPE_ALIASES, BUILTIN_NODE_TYPES, resolveBuiltinAlias, isBuiltinType, getBuiltinTypes } from './builtinNodeTypes.js';
|
|
10
|
+
export type { BuiltinNodeType } from './builtinNodeTypes.js';
|
|
13
11
|
/**
|
|
14
12
|
* Built-in FlowDrop node component registrations.
|
|
15
13
|
* These are the default node types that ship with FlowDrop.
|
|
16
14
|
*/
|
|
17
15
|
export declare const BUILTIN_NODE_COMPONENTS: NodeComponentRegistration[];
|
|
18
|
-
/**
|
|
19
|
-
* Alias mapping for type resolution.
|
|
20
|
-
* Maps alternative type names to their canonical registration.
|
|
21
|
-
*/
|
|
22
|
-
export declare const BUILTIN_TYPE_ALIASES: Record<string, string>;
|
|
23
|
-
/**
|
|
24
|
-
* Get the canonical type for a given type string.
|
|
25
|
-
* Handles aliases like "default" -> "workflowNode".
|
|
26
|
-
*
|
|
27
|
-
* @param type - The type string to resolve
|
|
28
|
-
* @returns The canonical type string
|
|
29
|
-
*/
|
|
30
|
-
export declare function resolveBuiltinAlias(type: string): string;
|
|
31
|
-
/**
|
|
32
|
-
* Check if a type is a built-in FlowDrop type.
|
|
33
|
-
*
|
|
34
|
-
* @param type - The type to check
|
|
35
|
-
* @returns true if this is a built-in type
|
|
36
|
-
*/
|
|
37
|
-
export declare function isBuiltinType(type: string): boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Get all built-in type identifiers.
|
|
40
|
-
*
|
|
41
|
-
* @returns Array of built-in type strings
|
|
42
|
-
*/
|
|
43
|
-
export declare function getBuiltinTypes(): string[];
|
|
44
|
-
/**
|
|
45
|
-
* Type for built-in node types.
|
|
46
|
-
* Use this when you specifically need a built-in type.
|
|
47
|
-
*/
|
|
48
|
-
export type BuiltinNodeType = 'workflowNode' | 'simple' | 'square' | 'atom' | 'tool' | 'gateway' | 'note' | 'terminal' | 'idea';
|
|
49
|
-
/**
|
|
50
|
-
* Array of built-in type strings for runtime validation.
|
|
51
|
-
*/
|
|
52
|
-
export declare const BUILTIN_NODE_TYPES: BuiltinNodeType[];
|