@flowdrop/flowdrop 1.15.0 → 2.0.0-beta.2
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 +508 -0
- package/MIGRATION-2.0.md +629 -0
- package/README.md +23 -23
- package/dist/adapters/WorkflowAdapter.d.ts +1 -1
- package/dist/adapters/WorkflowAdapter.js +14 -8
- package/dist/adapters/agentspec/AgentSpecAdapter.js +7 -7
- package/dist/api/enhanced-client.js +6 -11
- package/dist/chat/batchFeedback.d.ts +39 -0
- package/dist/chat/batchFeedback.js +51 -0
- package/dist/commands/executor.js +15 -1
- package/dist/commands/storeIntegration.svelte.d.ts +4 -1
- package/dist/commands/storeIntegration.svelte.js +26 -21
- package/dist/commands/types.d.ts +2 -0
- package/dist/components/App.svelte +163 -192
- package/dist/components/App.svelte.d.ts +47 -8
- package/dist/components/ConfigForm.svelte +77 -49
- package/dist/components/ConfigModal.svelte +7 -2
- package/dist/components/ConnectionLine.svelte +4 -2
- package/dist/components/Navbar.svelte +61 -1
- package/dist/components/NodeSidebar.svelte +27 -45
- package/dist/components/NodeStatusOverlay.svelte +94 -6
- package/dist/components/NodeSwapPicker.svelte +10 -8
- package/dist/components/PipelineStatus.svelte +22 -68
- package/dist/components/PipelineStatus.svelte.d.ts +3 -0
- package/dist/components/PortCoordinateTracker.svelte +5 -6
- package/dist/components/SchemaForm.stories.svelte +1 -3
- package/dist/components/SchemaForm.svelte +22 -27
- package/dist/components/SchemaForm.svelte.d.ts +0 -8
- package/dist/components/SettingsModal.svelte +8 -3
- package/dist/components/SettingsPanel.svelte +20 -4
- package/dist/components/SwapMappingEditor.svelte +67 -49
- package/dist/components/SwapMappingEditor.svelte.d.ts +0 -2
- package/dist/components/UniversalNode.svelte +9 -7
- package/dist/components/WorkflowEditor.svelte +121 -111
- package/dist/components/WorkflowEditor.svelte.d.ts +21 -10
- package/dist/components/chat/AIChatPanel.svelte +98 -89
- package/dist/components/chat/AIChatPanel.svelte.d.ts +0 -4
- package/dist/components/chat/CommandPreview.svelte +2 -1
- package/dist/components/console/CommandConsole.svelte +7 -5
- package/dist/components/console/ConsoleAutocomplete.svelte +10 -11
- package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +6 -0
- package/dist/components/console/ConsoleInput.svelte +15 -6
- package/dist/components/console/ConsoleOutput.svelte +2 -1
- package/dist/components/form/FormArray.svelte +5 -9
- package/dist/components/form/FormArray.svelte.d.ts +2 -1
- package/dist/components/form/FormAutocomplete.svelte +16 -15
- package/dist/components/form/FormField.svelte +4 -2
- package/dist/components/form/FormFieldLight.svelte +34 -3
- package/dist/components/form/FormFieldLight.svelte.d.ts +12 -0
- package/dist/components/form/FormMarkdownEditor.svelte +9 -4
- package/dist/components/form/FormRangeField.svelte +1 -0
- package/dist/components/form/FormTemplateEditor.svelte +11 -3
- package/dist/components/form/FormToggle.svelte +5 -12
- package/dist/components/form/FormToggle.svelte.d.ts +4 -2
- package/dist/components/form/FormUISchemaRenderer.svelte +3 -1
- package/dist/components/form/templateAutocomplete.js +1 -5
- package/dist/components/form/types.d.ts +1 -14
- package/dist/components/interrupt/FormPrompt.svelte +3 -2
- package/dist/components/interrupt/InterruptBubble.svelte +25 -17
- package/dist/components/interrupt/ReviewPrompt.svelte +10 -3
- package/dist/components/interrupt/TextInputPrompt.svelte +2 -1
- package/dist/components/layouts/MainLayout.svelte +20 -13
- package/dist/components/layouts/MainLayout.svelte.d.ts +4 -0
- package/dist/components/nodes/AtomNode.svelte +17 -5
- package/dist/components/nodes/GatewayNode.svelte +19 -10
- package/dist/components/nodes/IdeaNode.svelte +7 -0
- package/dist/components/nodes/SimpleNode.svelte +11 -6
- package/dist/components/nodes/SquareNode.svelte +15 -8
- package/dist/components/nodes/TerminalNode.svelte +9 -4
- package/dist/components/nodes/ToolNode.svelte +7 -1
- package/dist/components/nodes/WorkflowNode.svelte +16 -7
- package/dist/components/playground/ChatInput.svelte +11 -14
- package/dist/components/playground/ChatPanel.svelte +6 -49
- package/dist/components/playground/ChatPanel.svelte.d.ts +0 -14
- package/dist/components/playground/ControlPanel.svelte +134 -123
- package/dist/components/playground/ControlPanel.svelte.d.ts +3 -0
- package/dist/components/playground/ExecutionLogs.svelte +11 -9
- package/dist/components/playground/InputCollector.svelte +11 -9
- package/dist/components/playground/MessageStream.svelte +17 -23
- package/dist/components/playground/PipelineKanbanView.svelte +69 -8
- package/dist/components/playground/PipelineKanbanView.svelte.d.ts +2 -0
- package/dist/components/playground/PipelinePanel.svelte +31 -8
- package/dist/components/playground/PipelinePanel.svelte.d.ts +2 -0
- package/dist/components/playground/PipelineTableView.svelte +188 -44
- package/dist/components/playground/PipelineTableView.svelte.d.ts +2 -0
- package/dist/components/playground/Playground.svelte +154 -105
- package/dist/components/playground/Playground.svelte.d.ts +5 -0
- package/dist/components/playground/PlaygroundApp.svelte +11 -1
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +6 -0
- package/dist/components/playground/PlaygroundModal.svelte +18 -3
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +6 -0
- package/dist/components/playground/PlaygroundStudio.svelte +40 -32
- package/dist/components/playground/PlaygroundStudio.svelte.d.ts +6 -0
- package/dist/components/playground/SessionManager.svelte +9 -12
- package/dist/components/playground/pipelineViewUtils.svelte.d.ts +30 -1
- package/dist/components/playground/pipelineViewUtils.svelte.js +40 -3
- package/dist/config/endpoints.d.ts +23 -7
- package/dist/config/endpoints.js +30 -10
- package/dist/core/index.d.ts +5 -6
- package/dist/core/index.js +8 -12
- package/dist/display/index.d.ts +6 -3
- package/dist/display/index.js +7 -5
- package/dist/editor/index.d.ts +20 -21
- package/dist/editor/index.js +26 -36
- package/dist/form/code.d.ts +25 -15
- package/dist/form/code.js +44 -41
- package/dist/form/fieldRegistry.d.ts +17 -13
- package/dist/form/fieldRegistry.js +32 -12
- package/dist/form/full.d.ts +19 -14
- package/dist/form/full.js +26 -28
- package/dist/form/index.d.ts +3 -4
- package/dist/form/index.js +6 -5
- package/dist/form/markdown.d.ts +13 -8
- package/dist/form/markdown.js +22 -23
- package/dist/helpers/proximityConnect.d.ts +3 -2
- package/dist/helpers/proximityConnect.js +2 -5
- package/dist/helpers/workflowEditorHelper.d.ts +14 -5
- package/dist/helpers/workflowEditorHelper.js +28 -25
- package/dist/index.d.ts +28 -24
- package/dist/index.js +27 -50
- package/dist/messages/defaults.d.ts +2 -5
- package/dist/messages/defaults.js +3 -6
- package/dist/messages/index.d.ts +0 -1
- package/dist/messages/index.js +0 -1
- package/dist/mocks/app-forms.d.ts +6 -2
- package/dist/mocks/app-forms.js +11 -4
- package/dist/openapi/v1/openapi.yaml +3 -3
- package/dist/playground/index.d.ts +4 -5
- package/dist/playground/index.js +4 -32
- package/dist/playground/mount.d.ts +25 -0
- package/dist/playground/mount.js +50 -20
- package/dist/registry/{BaseRegistry.d.ts → BaseRegistry.svelte.d.ts} +22 -1
- package/dist/registry/{BaseRegistry.js → BaseRegistry.svelte.js} +37 -1
- package/dist/registry/builtinFormats.d.ts +9 -18
- package/dist/registry/builtinFormats.js +9 -39
- package/dist/registry/builtinNodeTypes.d.ts +53 -0
- package/dist/registry/builtinNodeTypes.js +67 -0
- package/dist/registry/builtinNodes.d.ts +2 -64
- package/dist/registry/builtinNodes.js +7 -103
- package/dist/registry/index.d.ts +3 -4
- package/dist/registry/index.js +4 -6
- package/dist/registry/nodeComponentRegistry.d.ts +182 -15
- package/dist/registry/nodeComponentRegistry.js +235 -17
- package/dist/registry/workflowFormatRegistry.d.ts +14 -9
- package/dist/registry/workflowFormatRegistry.js +24 -8
- package/dist/{schema → schemas}/index.d.ts +2 -2
- package/dist/{schema → schemas}/index.js +2 -2
- package/dist/schemas/v1/workflow.schema.json +3 -3
- package/dist/services/agentSpecExecutionService.d.ts +0 -2
- package/dist/services/agentSpecExecutionService.js +0 -3
- package/dist/services/apiVariableService.d.ts +2 -1
- package/dist/services/apiVariableService.js +16 -47
- package/dist/services/autoSaveService.d.ts +7 -0
- package/dist/services/autoSaveService.js +6 -4
- package/dist/services/categoriesApi.js +3 -6
- package/dist/services/chatService.d.ts +9 -4
- package/dist/services/chatService.js +23 -28
- package/dist/services/draftStorage.d.ts +129 -13
- package/dist/services/draftStorage.js +185 -37
- package/dist/services/dynamicSchemaService.d.ts +2 -1
- package/dist/services/dynamicSchemaService.js +5 -22
- package/dist/services/globalSave.d.ts +13 -12
- package/dist/services/globalSave.js +29 -51
- package/dist/services/historyService.d.ts +9 -3
- package/dist/services/historyService.js +9 -3
- package/dist/services/interruptService.d.ts +15 -9
- package/dist/services/interruptService.js +35 -37
- package/dist/services/nodeExecutionService.d.ts +18 -3
- package/dist/services/nodeExecutionService.js +71 -45
- package/dist/services/playgroundService.d.ts +16 -10
- package/dist/services/playgroundService.js +42 -43
- package/dist/services/portConfigApi.js +3 -6
- package/dist/services/settingsService.d.ts +9 -4
- package/dist/services/settingsService.js +23 -12
- package/dist/services/variableService.d.ts +2 -1
- package/dist/services/variableService.js +2 -2
- package/dist/services/workflowStorage.js +6 -6
- package/dist/stores/apiContext.d.ts +56 -0
- package/dist/stores/apiContext.js +80 -0
- package/dist/stores/categoriesStore.svelte.d.ts +28 -23
- package/dist/stores/categoriesStore.svelte.js +69 -64
- package/dist/stores/getInstance.svelte.d.ts +39 -0
- package/dist/stores/getInstance.svelte.js +65 -0
- package/dist/stores/historyStore.svelte.d.ts +77 -93
- package/dist/stores/historyStore.svelte.js +134 -160
- package/dist/stores/instanceContainer.svelte.d.ts +111 -0
- package/dist/stores/instanceContainer.svelte.js +114 -0
- package/dist/stores/interruptStore.svelte.d.ts +112 -82
- package/dist/stores/interruptStore.svelte.js +253 -226
- package/dist/stores/pipelinePanelStore.svelte.d.ts +27 -3
- package/dist/stores/pipelinePanelStore.svelte.js +61 -14
- package/dist/stores/playgroundStore.svelte.d.ts +169 -222
- package/dist/stores/playgroundStore.svelte.js +513 -580
- package/dist/stores/portCoordinateStore.svelte.d.ts +57 -51
- package/dist/stores/portCoordinateStore.svelte.js +109 -98
- package/dist/stores/settingsStore.svelte.d.ts +4 -1
- package/dist/stores/settingsStore.svelte.js +47 -12
- package/dist/stores/workflowStore.svelte.d.ts +178 -213
- package/dist/stores/workflowStore.svelte.js +449 -501
- package/dist/stories/EdgeDecorator.svelte +5 -2
- package/dist/stories/NodeDecorator.svelte +5 -3
- package/dist/svelte-app.d.ts +60 -10
- package/dist/svelte-app.js +159 -54
- package/dist/types/auth.d.ts +9 -51
- package/dist/types/auth.js +4 -54
- package/dist/types/events.d.ts +6 -3
- package/dist/types/index.d.ts +37 -5
- package/dist/types/index.js +0 -1
- package/dist/types/navbar.d.ts +7 -0
- package/dist/types/playground.d.ts +18 -3
- package/dist/types/settings.d.ts +13 -0
- package/dist/types/settings.js +1 -0
- package/dist/utils/colors.d.ts +47 -21
- package/dist/utils/colors.js +69 -68
- package/dist/utils/connections.d.ts +9 -15
- package/dist/utils/connections.js +13 -32
- package/dist/utils/duration.d.ts +13 -0
- package/dist/utils/duration.js +45 -0
- 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/icons.d.ts +5 -2
- package/dist/utils/icons.js +6 -5
- package/dist/utils/nodeSwap.d.ts +6 -2
- package/dist/utils/nodeSwap.js +62 -126
- package/dist/utils/nodeTypes.d.ts +17 -8
- package/dist/utils/nodeTypes.js +27 -20
- package/dist/utils/performanceUtils.js +7 -0
- package/package.json +7 -5
- package/dist/messages/deprecation.d.ts +0 -20
- package/dist/messages/deprecation.js +0 -33
- package/dist/registry/plugin.d.ts +0 -215
- package/dist/registry/plugin.js +0 -249
- package/dist/services/api.d.ts +0 -129
- package/dist/services/api.js +0 -217
package/dist/types/auth.js
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
* Authentication Provider Types for FlowDrop
|
|
3
3
|
*
|
|
4
4
|
* Provides interfaces and implementations for authentication in FlowDrop.
|
|
5
|
-
* AuthProvider is
|
|
5
|
+
* An AuthProvider is supplied at mount time (or via `fd.api.configure`) and can
|
|
6
|
+
* be swapped at runtime with `fd.api.setAuthProvider(...)` — e.g. on login or
|
|
7
|
+
* logout — without remounting.
|
|
6
8
|
*
|
|
7
9
|
* @module types/auth
|
|
8
10
|
*/
|
|
@@ -55,7 +57,7 @@ export class StaticAuthProvider {
|
|
|
55
57
|
break;
|
|
56
58
|
case 'api_key':
|
|
57
59
|
if (config.apiKey) {
|
|
58
|
-
this.headers['X-API-Key'] = config.apiKey;
|
|
60
|
+
this.headers[config.apiKeyHeader ?? 'X-API-Key'] = config.apiKey;
|
|
59
61
|
}
|
|
60
62
|
break;
|
|
61
63
|
case 'custom':
|
|
@@ -79,35 +81,6 @@ export class StaticAuthProvider {
|
|
|
79
81
|
async getAuthHeaders() {
|
|
80
82
|
return this.headers;
|
|
81
83
|
}
|
|
82
|
-
/**
|
|
83
|
-
* Check if authenticated
|
|
84
|
-
*
|
|
85
|
-
* Returns true if any auth headers are configured.
|
|
86
|
-
*
|
|
87
|
-
* @returns true if headers are configured
|
|
88
|
-
*/
|
|
89
|
-
isAuthenticated() {
|
|
90
|
-
return Object.keys(this.headers).length > 0;
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Handle unauthorized response
|
|
94
|
-
*
|
|
95
|
-
* Static provider cannot refresh tokens, so always returns false.
|
|
96
|
-
*
|
|
97
|
-
* @returns Promise resolving to false (cannot refresh)
|
|
98
|
-
*/
|
|
99
|
-
async onUnauthorized() {
|
|
100
|
-
// Static provider cannot refresh tokens
|
|
101
|
-
return false;
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Handle forbidden response
|
|
105
|
-
*
|
|
106
|
-
* Static provider has no special handling for 403.
|
|
107
|
-
*/
|
|
108
|
-
async onForbidden() {
|
|
109
|
-
// No special handling for static provider
|
|
110
|
-
}
|
|
111
84
|
}
|
|
112
85
|
/**
|
|
113
86
|
* Callback-based authentication provider
|
|
@@ -162,19 +135,6 @@ export class CallbackAuthProvider {
|
|
|
162
135
|
}
|
|
163
136
|
return {};
|
|
164
137
|
}
|
|
165
|
-
/**
|
|
166
|
-
* Check if authenticated
|
|
167
|
-
*
|
|
168
|
-
* For callback-based auth, we assume authenticated if getToken exists.
|
|
169
|
-
* The actual token validity is checked when making requests.
|
|
170
|
-
*
|
|
171
|
-
* @returns true (assumes authenticated, actual check happens on request)
|
|
172
|
-
*/
|
|
173
|
-
isAuthenticated() {
|
|
174
|
-
// For callback-based auth, we assume authenticated if getToken exists
|
|
175
|
-
// The actual token validity is checked when making requests
|
|
176
|
-
return true;
|
|
177
|
-
}
|
|
178
138
|
/**
|
|
179
139
|
* Handle unauthorized response
|
|
180
140
|
*
|
|
@@ -216,14 +176,4 @@ export class NoAuthProvider {
|
|
|
216
176
|
async getAuthHeaders() {
|
|
217
177
|
return {};
|
|
218
178
|
}
|
|
219
|
-
/**
|
|
220
|
-
* Check if authenticated
|
|
221
|
-
*
|
|
222
|
-
* Always returns false (no auth configured).
|
|
223
|
-
*
|
|
224
|
-
* @returns false
|
|
225
|
-
*/
|
|
226
|
-
isAuthenticated() {
|
|
227
|
-
return false;
|
|
228
|
-
}
|
|
229
179
|
}
|
package/dist/types/events.d.ts
CHANGED
|
@@ -166,10 +166,13 @@ export interface FlowDropEventHandlers {
|
|
|
166
166
|
*/
|
|
167
167
|
export interface FlowDropFeatures {
|
|
168
168
|
/**
|
|
169
|
-
* Save drafts to
|
|
169
|
+
* Save drafts to browser storage automatically
|
|
170
170
|
*
|
|
171
171
|
* When enabled, FlowDrop will periodically save the current workflow
|
|
172
|
-
* to
|
|
172
|
+
* to draft storage (localStorage by default, configurable via the
|
|
173
|
+
* `draftStorage` mount option). This helps prevent data loss. End users
|
|
174
|
+
* can additionally opt out at runtime via the "Store Drafts in Browser"
|
|
175
|
+
* behavior setting.
|
|
173
176
|
*
|
|
174
177
|
* @default true
|
|
175
178
|
*/
|
|
@@ -177,7 +180,7 @@ export interface FlowDropFeatures {
|
|
|
177
180
|
/**
|
|
178
181
|
* Auto-save interval in milliseconds
|
|
179
182
|
*
|
|
180
|
-
* How often to save drafts to
|
|
183
|
+
* How often to save drafts to storage when autoSaveDraft is enabled.
|
|
181
184
|
*
|
|
182
185
|
* @default 30000 (30 seconds)
|
|
183
186
|
*/
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Core types for the Workflow Library
|
|
3
3
|
*/
|
|
4
4
|
import type { Component } from 'svelte';
|
|
5
|
-
import type { Node, Edge, XYPosition } from '@xyflow/svelte';
|
|
6
|
-
import { ConnectionLineType } from '@xyflow/svelte';
|
|
5
|
+
import type { Node, Edge, XYPosition, ConnectionLineType } from '@xyflow/svelte';
|
|
7
6
|
import type { EndpointConfig } from '../config/endpoints.js';
|
|
7
|
+
import type { AuthProvider } from './auth.js';
|
|
8
8
|
/**
|
|
9
9
|
* Built-in node categories that ship with FlowDrop.
|
|
10
10
|
* These categories have predefined icons, colors, and display names.
|
|
@@ -208,7 +208,7 @@ export type BuiltinNodeType = 'note' | 'simple' | 'square' | 'atom' | 'tool' | '
|
|
|
208
208
|
* Includes built-in types and allows custom registered types.
|
|
209
209
|
*
|
|
210
210
|
* Built-in types: note, simple, square, tool, gateway, terminal, default
|
|
211
|
-
* Custom types: Any string registered via
|
|
211
|
+
* Custom types: Any string registered via fd.nodes
|
|
212
212
|
*
|
|
213
213
|
* @example
|
|
214
214
|
* ```typescript
|
|
@@ -1188,8 +1188,9 @@ export interface Workflow {
|
|
|
1188
1188
|
description?: string;
|
|
1189
1189
|
nodes: WorkflowNode[];
|
|
1190
1190
|
edges: WorkflowEdge[];
|
|
1191
|
-
metadata
|
|
1192
|
-
version
|
|
1191
|
+
metadata: {
|
|
1192
|
+
/** Workflow schema format version — identifies the document format, not the workflow's own revision. */
|
|
1193
|
+
schemaVersion: string;
|
|
1193
1194
|
createdAt: string;
|
|
1194
1195
|
updatedAt: string;
|
|
1195
1196
|
author?: string;
|
|
@@ -1230,6 +1231,8 @@ export interface PipelineViewProps {
|
|
|
1230
1231
|
pipelineId: string | null;
|
|
1231
1232
|
workflow: Workflow;
|
|
1232
1233
|
endpointConfig: EndpointConfig;
|
|
1234
|
+
/** Auth provider for building authenticated API clients in custom views. */
|
|
1235
|
+
authProvider?: AuthProvider;
|
|
1233
1236
|
refreshTrigger?: number;
|
|
1234
1237
|
}
|
|
1235
1238
|
/** A custom view injected into the PipelinePanel view switcher. */
|
|
@@ -1243,6 +1246,31 @@ export interface PipelineViewDef {
|
|
|
1243
1246
|
/** Svelte component that receives PipelineViewProps */
|
|
1244
1247
|
component: Component<PipelineViewProps>;
|
|
1245
1248
|
}
|
|
1249
|
+
/**
|
|
1250
|
+
* One job execution of a node within a pipeline run.
|
|
1251
|
+
*
|
|
1252
|
+
* Loop-orchestrated workflows create one job per iteration for the same
|
|
1253
|
+
* node (labels carry an iteration suffix, e.g. "Invoke tool #2"), so a node
|
|
1254
|
+
* can have several of these per run.
|
|
1255
|
+
*/
|
|
1256
|
+
export interface NodeJobExecution {
|
|
1257
|
+
/** Job entity ID */
|
|
1258
|
+
id?: string;
|
|
1259
|
+
/** Job label, carries the iteration suffix (e.g. "Invoke tool #2") */
|
|
1260
|
+
label?: string;
|
|
1261
|
+
/** Job status */
|
|
1262
|
+
status: NodeExecutionStatus;
|
|
1263
|
+
/** ISO timestamp the job started, if it ran */
|
|
1264
|
+
started?: string;
|
|
1265
|
+
/** ISO timestamp the job completed, if it finished */
|
|
1266
|
+
completed?: string;
|
|
1267
|
+
/** Execution duration in milliseconds, if the job ran to completion */
|
|
1268
|
+
executionTime?: number;
|
|
1269
|
+
/** Precise execution duration in microseconds, when the backend provides it */
|
|
1270
|
+
executionTimeUs?: number;
|
|
1271
|
+
/** Error message if the job failed */
|
|
1272
|
+
error?: string;
|
|
1273
|
+
}
|
|
1246
1274
|
/**
|
|
1247
1275
|
* Node execution tracking information
|
|
1248
1276
|
*/
|
|
@@ -1255,12 +1283,16 @@ export interface NodeExecutionInfo {
|
|
|
1255
1283
|
lastExecuted?: string;
|
|
1256
1284
|
/** Last execution duration in milliseconds */
|
|
1257
1285
|
lastExecutionDuration?: number;
|
|
1286
|
+
/** Precise last execution duration in microseconds, when the backend provides it */
|
|
1287
|
+
lastExecutionDurationUs?: number;
|
|
1258
1288
|
/** Last error message if execution failed */
|
|
1259
1289
|
lastError?: string;
|
|
1260
1290
|
/** Whether the node is currently being executed */
|
|
1261
1291
|
isExecuting: boolean;
|
|
1262
1292
|
/** Execution output data (e.g., active branches for gateway nodes) */
|
|
1263
1293
|
output?: Record<string, unknown>;
|
|
1294
|
+
/** Per-job execution history (loop iterations), in pipeline order */
|
|
1295
|
+
jobs?: NodeJobExecution[];
|
|
1264
1296
|
}
|
|
1265
1297
|
/**
|
|
1266
1298
|
* Workflow execution status
|
package/dist/types/index.js
CHANGED
package/dist/types/navbar.d.ts
CHANGED
|
@@ -11,4 +11,11 @@ export interface NavbarAction {
|
|
|
11
11
|
onclick?: (event: Event) => void;
|
|
12
12
|
/** If true, opens link in new tab with `rel="noopener noreferrer"`. */
|
|
13
13
|
external?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Optional group label. Items sharing the same `group` cluster together
|
|
16
|
+
* under a header inside the flyout dropdown. Ungrouped items render first.
|
|
17
|
+
* Group order follows first occurrence in the array. Ignored when the
|
|
18
|
+
* navbar is in split mode (the inline row of buttons).
|
|
19
|
+
*/
|
|
20
|
+
group?: string;
|
|
14
21
|
}
|
|
@@ -376,11 +376,26 @@ export interface PlaygroundConfig {
|
|
|
376
376
|
*/
|
|
377
377
|
showSidebar?: boolean;
|
|
378
378
|
/**
|
|
379
|
-
* Whether to show the
|
|
380
|
-
* When false, the header
|
|
381
|
-
*
|
|
379
|
+
* Whether to show the ControlPanel header bar (default: true)
|
|
380
|
+
* When false, hides the entire header row: session label, session chip
|
|
381
|
+
* (with its New Session / session list popover) and the toolbar actions
|
|
382
|
+
* (Pipeline / Refresh / Logs). Use for a minimal, locked-down playground.
|
|
382
383
|
*/
|
|
383
384
|
showSessionHeader?: boolean;
|
|
385
|
+
/**
|
|
386
|
+
* Whether to show the "New Session" entry in the session chip popover
|
|
387
|
+
* (default: true). When false, users cannot create additional sessions
|
|
388
|
+
* from the UI — useful for single-session playground embeds.
|
|
389
|
+
* No effect when showSessionHeader is false.
|
|
390
|
+
*/
|
|
391
|
+
showNewSessionButton?: boolean;
|
|
392
|
+
/**
|
|
393
|
+
* Whether to show the session chip selector and its session list (default:
|
|
394
|
+
* true). When false, the chip dropdown is hidden entirely — users cannot
|
|
395
|
+
* switch sessions or see other sessions. Useful for locking a playground
|
|
396
|
+
* embed to a single session. No effect when showSessionHeader is false.
|
|
397
|
+
*/
|
|
398
|
+
showSessionList?: boolean;
|
|
384
399
|
/**
|
|
385
400
|
* Determines if polling should stop for a given session status.
|
|
386
401
|
* Override to customize which statuses pause polling.
|
package/dist/types/settings.d.ts
CHANGED
|
@@ -72,6 +72,19 @@ export interface BehaviorSettings {
|
|
|
72
72
|
autoSave: boolean;
|
|
73
73
|
/** Auto-save interval in milliseconds */
|
|
74
74
|
autoSaveInterval: number;
|
|
75
|
+
/**
|
|
76
|
+
* Persist workflow drafts in browser storage.
|
|
77
|
+
*
|
|
78
|
+
* When enabled (default), unsaved changes are written to browser storage
|
|
79
|
+
* so they survive page reloads. On the default `localStorage` backend,
|
|
80
|
+
* drafts remain stored on the device even after the tab or browser is
|
|
81
|
+
* closed, until they are saved or cleared. Turning this off stops draft
|
|
82
|
+
* writes and removes the current draft.
|
|
83
|
+
*
|
|
84
|
+
* Caveat: the toggle applies per tab. Other tabs that are already open
|
|
85
|
+
* read settings at load time and keep writing drafts until reloaded.
|
|
86
|
+
*/
|
|
87
|
+
storeDraftsInBrowser: boolean;
|
|
75
88
|
/** Maximum number of undo history entries */
|
|
76
89
|
undoHistoryLimit: number;
|
|
77
90
|
/** Show confirmation dialog before deleting nodes */
|
package/dist/types/settings.js
CHANGED
package/dist/utils/colors.d.ts
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* Uses BEM syntax for CSS classes
|
|
5
5
|
*/
|
|
6
6
|
import type { NodeCategory, PortDataTypeConfig } from '../types/index.js';
|
|
7
|
+
import type { PortCompatibilityChecker } from './connections.js';
|
|
8
|
+
import type { CategoriesStore } from '../stores/categoriesStore.svelte.js';
|
|
7
9
|
/**
|
|
8
10
|
* Category color mapping to design tokens (CSS variables)
|
|
9
11
|
* Uses --fd-node-* tokens from tokens.css
|
|
@@ -14,20 +16,27 @@ export declare const CATEGORY_COLOR_TOKENS: Record<string, string>;
|
|
|
14
16
|
* Get the design token for a category color.
|
|
15
17
|
* Checks the categories store first (which includes API overrides),
|
|
16
18
|
* then falls back to the static CATEGORY_COLOR_TOKENS map, then to slate.
|
|
19
|
+
* @param categories - The instance's categories store (e.g. `fd.categories`)
|
|
20
|
+
* @param category - The node category
|
|
17
21
|
*/
|
|
18
|
-
export declare function getCategoryColorToken(category: NodeCategory): string;
|
|
22
|
+
export declare function getCategoryColorToken(categories: CategoriesStore, category: NodeCategory): string;
|
|
19
23
|
/**
|
|
20
24
|
* Get the reference color token for a data type (configurable version)
|
|
25
|
+
* @param checker - The instance's port compatibility checker (provides data-type config)
|
|
26
|
+
* @param dataType - The data type
|
|
21
27
|
*/
|
|
22
|
-
export declare function getDataTypeColorToken(dataType: string): string;
|
|
28
|
+
export declare function getDataTypeColorToken(checker: PortCompatibilityChecker, dataType: string): string;
|
|
23
29
|
/**
|
|
24
30
|
* Get data type configuration from port config
|
|
31
|
+
* @param checker - The instance's port compatibility checker
|
|
32
|
+
* @param dataType - The data type
|
|
25
33
|
*/
|
|
26
|
-
export declare function getDataTypeConfig(dataType: string): PortDataTypeConfig | undefined;
|
|
34
|
+
export declare function getDataTypeConfig(checker: PortCompatibilityChecker, dataType: string): PortDataTypeConfig | undefined;
|
|
27
35
|
/**
|
|
28
36
|
* Get all available data types from port configuration
|
|
37
|
+
* @param checker - The instance's port compatibility checker
|
|
29
38
|
*/
|
|
30
|
-
export declare function getAvailableDataTypes(): PortDataTypeConfig[];
|
|
39
|
+
export declare function getAvailableDataTypes(checker: PortCompatibilityChecker): PortDataTypeConfig[];
|
|
31
40
|
/**
|
|
32
41
|
* Default colors for fallback cases
|
|
33
42
|
*/
|
|
@@ -39,43 +48,49 @@ export declare const DEFAULT_COLORS: {
|
|
|
39
48
|
};
|
|
40
49
|
/**
|
|
41
50
|
* Get category colors
|
|
51
|
+
* @param categories - The instance's categories store (e.g. `fd.categories`)
|
|
42
52
|
* @param category - The node category
|
|
43
53
|
* @returns The color configuration for the category
|
|
44
54
|
*/
|
|
45
|
-
export declare function getCategoryColors(category: NodeCategory): string;
|
|
55
|
+
export declare function getCategoryColors(categories: CategoriesStore, category: NodeCategory): string;
|
|
46
56
|
/**
|
|
47
57
|
* Get category background color
|
|
58
|
+
* @param categories - The instance's categories store (e.g. `fd.categories`)
|
|
48
59
|
* @param category - The node category
|
|
49
60
|
* @returns The background color class
|
|
50
61
|
*/
|
|
51
|
-
export declare function getCategoryBackground(category: NodeCategory): string;
|
|
62
|
+
export declare function getCategoryBackground(categories: CategoriesStore, category: NodeCategory): string;
|
|
52
63
|
/**
|
|
53
64
|
* Get category accent color
|
|
65
|
+
* @param categories - The instance's categories store (e.g. `fd.categories`)
|
|
54
66
|
* @param category - The node category
|
|
55
67
|
* @returns The accent color class
|
|
56
68
|
*/
|
|
57
|
-
export declare function getCategoryAccent(category: NodeCategory): string;
|
|
69
|
+
export declare function getCategoryAccent(categories: CategoriesStore, category: NodeCategory): string;
|
|
58
70
|
/**
|
|
59
71
|
* Get category text color
|
|
72
|
+
* @param categories - The instance's categories store (e.g. `fd.categories`)
|
|
60
73
|
* @param category - The node category
|
|
61
74
|
* @returns The text color class
|
|
62
75
|
*/
|
|
63
|
-
export declare function getCategoryText(category: NodeCategory): string;
|
|
76
|
+
export declare function getCategoryText(categories: CategoriesStore, category: NodeCategory): string;
|
|
64
77
|
/**
|
|
65
78
|
* Get category border color
|
|
79
|
+
* @param categories - The instance's categories store (e.g. `fd.categories`)
|
|
66
80
|
* @param category - The node category
|
|
67
81
|
* @returns The border color class
|
|
68
82
|
*/
|
|
69
|
-
export declare function getCategoryBorder(category: NodeCategory): string;
|
|
83
|
+
export declare function getCategoryBorder(categories: CategoriesStore, category: NodeCategory): string;
|
|
70
84
|
/**
|
|
71
85
|
* Get node colors based on category and state
|
|
86
|
+
* @param categories - The instance's categories store (e.g. `fd.categories`)
|
|
72
87
|
* @param category - The node category
|
|
73
88
|
* @param isError - Whether the node is in error state
|
|
74
89
|
* @param isProcessing - Whether the node is processing
|
|
75
90
|
* @param isSelected - Whether the node is selected
|
|
76
91
|
* @returns The color configuration object
|
|
77
92
|
*/
|
|
78
|
-
export declare function getNodeColors(category: NodeCategory, isError?: boolean, isProcessing?: boolean, isSelected?: boolean): {
|
|
93
|
+
export declare function getNodeColors(categories: CategoriesStore, category: NodeCategory, isError?: boolean, isProcessing?: boolean, isSelected?: boolean): {
|
|
79
94
|
background: string;
|
|
80
95
|
accent: string;
|
|
81
96
|
text: string;
|
|
@@ -83,52 +98,58 @@ export declare function getNodeColors(category: NodeCategory, isError?: boolean,
|
|
|
83
98
|
};
|
|
84
99
|
/**
|
|
85
100
|
* Get node background color
|
|
101
|
+
* @param categories - The instance's categories store (e.g. `fd.categories`)
|
|
86
102
|
* @param category - The node category
|
|
87
103
|
* @param isError - Whether the node is in error state
|
|
88
104
|
* @param isProcessing - Whether the node is processing
|
|
89
105
|
* @param isSelected - Whether the node is selected
|
|
90
106
|
* @returns The background color
|
|
91
107
|
*/
|
|
92
|
-
export declare function getNodeBackground(category: NodeCategory, isError?: boolean, isProcessing?: boolean, isSelected?: boolean): string;
|
|
108
|
+
export declare function getNodeBackground(categories: CategoriesStore, category: NodeCategory, isError?: boolean, isProcessing?: boolean, isSelected?: boolean): string;
|
|
93
109
|
/**
|
|
94
110
|
* Get node accent color
|
|
111
|
+
* @param categories - The instance's categories store (e.g. `fd.categories`)
|
|
95
112
|
* @param category - The node category
|
|
96
113
|
* @param isError - Whether the node is in error state
|
|
97
114
|
* @param isProcessing - Whether the node is processing
|
|
98
115
|
* @param isSelected - Whether the node is selected
|
|
99
116
|
* @returns The accent color
|
|
100
117
|
*/
|
|
101
|
-
export declare function getNodeAccent(category: NodeCategory, isError?: boolean, isProcessing?: boolean, isSelected?: boolean): string;
|
|
118
|
+
export declare function getNodeAccent(categories: CategoriesStore, category: NodeCategory, isError?: boolean, isProcessing?: boolean, isSelected?: boolean): string;
|
|
102
119
|
/**
|
|
103
120
|
* Get node text color
|
|
121
|
+
* @param categories - The instance's categories store (e.g. `fd.categories`)
|
|
104
122
|
* @param category - The node category
|
|
105
123
|
* @param isError - Whether the node is in error state
|
|
106
124
|
* @param isProcessing - Whether the node is processing
|
|
107
125
|
* @param isSelected - Whether the node is selected
|
|
108
126
|
* @returns The text color
|
|
109
127
|
*/
|
|
110
|
-
export declare function getNodeText(category: NodeCategory, isError?: boolean, isProcessing?: boolean, isSelected?: boolean): string;
|
|
128
|
+
export declare function getNodeText(categories: CategoriesStore, category: NodeCategory, isError?: boolean, isProcessing?: boolean, isSelected?: boolean): string;
|
|
111
129
|
/**
|
|
112
130
|
* Get node border color
|
|
131
|
+
* @param categories - The instance's categories store (e.g. `fd.categories`)
|
|
113
132
|
* @param category - The node category
|
|
114
133
|
* @param isError - Whether the node is in error state
|
|
115
134
|
* @param isProcessing - Whether the node is processing
|
|
116
135
|
* @param isSelected - Whether the node is selected
|
|
117
136
|
* @returns The border color
|
|
118
137
|
*/
|
|
119
|
-
export declare function getNodeBorder(category: NodeCategory, isError?: boolean, isProcessing?: boolean, isSelected?: boolean): string;
|
|
138
|
+
export declare function getNodeBorder(categories: CategoriesStore, category: NodeCategory, isError?: boolean, isProcessing?: boolean, isSelected?: boolean): string;
|
|
120
139
|
/**
|
|
121
140
|
* Get data type color
|
|
141
|
+
* @param checker - The instance's port compatibility checker
|
|
122
142
|
* @param dataType - The data type
|
|
123
143
|
* @returns The color for the data type
|
|
124
144
|
*/
|
|
125
|
-
export declare function getDataTypeColor(dataType: string): string;
|
|
145
|
+
export declare function getDataTypeColor(checker: PortCompatibilityChecker, dataType: string): string;
|
|
126
146
|
/**
|
|
127
147
|
* Parse typed array notation and get display information
|
|
148
|
+
* @param checker - The instance's port compatibility checker
|
|
128
149
|
* @param dataType - The data type (e.g., "string[]", "number", "object[]")
|
|
129
150
|
* @returns Object with display information
|
|
130
151
|
*/
|
|
131
|
-
export declare function parseDataTypeDisplay(dataType: string): {
|
|
152
|
+
export declare function parseDataTypeDisplay(checker: PortCompatibilityChecker, dataType: string): {
|
|
132
153
|
baseType: string;
|
|
133
154
|
isArray: boolean;
|
|
134
155
|
displayName: string;
|
|
@@ -136,10 +157,11 @@ export declare function parseDataTypeDisplay(dataType: string): {
|
|
|
136
157
|
};
|
|
137
158
|
/**
|
|
138
159
|
* Get formatted display text for a data type
|
|
160
|
+
* @param checker - The instance's port compatibility checker
|
|
139
161
|
* @param dataType - The data type
|
|
140
162
|
* @returns Formatted display text
|
|
141
163
|
*/
|
|
142
|
-
export declare function getDataTypeDisplayText(dataType: string): string;
|
|
164
|
+
export declare function getDataTypeDisplayText(checker: PortCompatibilityChecker, dataType: string): string;
|
|
143
165
|
/**
|
|
144
166
|
* Check if a data type represents an array
|
|
145
167
|
* @param dataType - The data type
|
|
@@ -191,30 +213,34 @@ export declare function getContrastTextColor(backgroundColor: string): string;
|
|
|
191
213
|
export declare function resolveColorToken(token: string): string;
|
|
192
214
|
/**
|
|
193
215
|
* Get the appropriate contrast text color for a data type badge
|
|
216
|
+
* @param checker - The instance's port compatibility checker
|
|
194
217
|
* @param dataType - The data type (e.g., "array", "string", "number")
|
|
195
218
|
* @returns CSS color value for text that provides good contrast on the data type's background
|
|
196
219
|
*/
|
|
197
|
-
export declare function getContrastTextColorForDataType(dataType: string): string;
|
|
220
|
+
export declare function getContrastTextColorForDataType(checker: PortCompatibilityChecker, dataType: string): string;
|
|
198
221
|
/**
|
|
199
222
|
* Get the appropriate contrast text color for a category badge
|
|
223
|
+
* @param categories - The instance's categories store (e.g. `fd.categories`)
|
|
200
224
|
* @param category - The node category
|
|
201
225
|
* @returns CSS color value for text that provides good contrast on the category's background
|
|
202
226
|
*/
|
|
203
|
-
export declare function getContrastTextColorForCategory(category: NodeCategory): string;
|
|
227
|
+
export declare function getContrastTextColorForCategory(categories: CategoriesStore, category: NodeCategory): string;
|
|
204
228
|
/**
|
|
205
229
|
* Get a semi-transparent tinted background color for ports
|
|
206
230
|
* Creates a cohesive look with the icon wrapper styling
|
|
231
|
+
* @param checker - The instance's port compatibility checker
|
|
207
232
|
* @param dataType - The data type
|
|
208
233
|
* @param opacity - Opacity percentage (default 25%)
|
|
209
234
|
* @returns CSS color-mix expression for the tinted background
|
|
210
235
|
*/
|
|
211
|
-
export declare function getPortBackgroundColor(dataType: string, opacity?: number): string;
|
|
236
|
+
export declare function getPortBackgroundColor(checker: PortCompatibilityChecker, dataType: string, opacity?: number): string;
|
|
212
237
|
/**
|
|
213
238
|
* Get the border color for ports (solid data type color)
|
|
239
|
+
* @param checker - The instance's port compatibility checker
|
|
214
240
|
* @param dataType - The data type
|
|
215
241
|
* @returns CSS color value for the port border
|
|
216
242
|
*/
|
|
217
|
-
export declare function getPortBorderColor(dataType: string): string;
|
|
243
|
+
export declare function getPortBorderColor(checker: PortCompatibilityChecker, dataType: string): string;
|
|
218
244
|
/**
|
|
219
245
|
* Convert RGB components to hex color string
|
|
220
246
|
* @param r - Red component (0-255)
|