@d34dman/flowdrop 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +307 -215
- package/dist/adapters/WorkflowAdapter.d.ts +1 -1
- package/dist/adapters/WorkflowAdapter.js +30 -30
- package/dist/api/client.d.ts +24 -1
- package/dist/api/client.js +55 -38
- package/dist/api/enhanced-client.d.ts +46 -0
- package/dist/api/enhanced-client.js +211 -0
- package/dist/clients/ApiClient.d.ts +19 -23
- package/dist/clients/ApiClient.js +36 -34
- package/dist/components/App.svelte +1299 -230
- package/dist/components/App.svelte.d.ts +21 -1
- package/dist/components/CanvasBanner.svelte +50 -44
- package/dist/components/CanvasBanner.svelte.d.ts +5 -19
- package/dist/components/ConfigForm.svelte +555 -0
- package/dist/components/ConfigForm.svelte.d.ts +32 -0
- package/dist/components/ConfigModal.svelte +261 -0
- package/dist/components/ConfigModal.svelte.d.ts +31 -0
- package/dist/components/ConfigSidebar.svelte +934 -0
- package/dist/components/ConfigSidebar.svelte.d.ts +51 -0
- package/dist/components/ConnectionLine.svelte +32 -0
- package/dist/components/ConnectionLine.svelte.d.ts +3 -0
- package/dist/components/GatewayNode.svelte +471 -0
- package/dist/components/GatewayNode.svelte.d.ts +15 -0
- package/dist/components/LoadingSpinner.svelte +23 -23
- package/dist/components/LoadingSpinner.svelte.d.ts +1 -1
- package/dist/components/Logo.svelte +82 -0
- package/dist/components/Logo.svelte.d.ts +26 -0
- package/dist/components/LogsSidebar.svelte +565 -0
- package/dist/components/LogsSidebar.svelte.d.ts +34 -0
- package/dist/components/MarkdownDisplay.svelte +28 -0
- package/dist/components/MarkdownDisplay.svelte.d.ts +7 -0
- package/dist/components/Navbar.svelte +663 -0
- package/dist/components/Navbar.svelte.d.ts +21 -0
- package/dist/components/NodeSidebar.svelte +629 -488
- package/dist/components/NodeSidebar.svelte.d.ts +1 -2
- package/dist/components/NodeStatusOverlay.svelte +327 -0
- package/dist/components/NodeStatusOverlay.svelte.d.ts +11 -0
- package/dist/components/NotesNode.svelte +566 -0
- package/dist/components/NotesNode.svelte.d.ts +43 -0
- package/dist/components/PipelineStatus.svelte +331 -0
- package/dist/components/PipelineStatus.svelte.d.ts +18 -0
- package/dist/components/SimpleNode.svelte +447 -0
- package/dist/components/SimpleNode.svelte.d.ts +24 -0
- package/dist/components/SquareNode.svelte +346 -0
- package/dist/components/SquareNode.svelte.d.ts +24 -0
- package/dist/components/StatusIcon.svelte +112 -0
- package/dist/components/StatusIcon.svelte.d.ts +10 -0
- package/dist/components/StatusLabel.svelte +33 -0
- package/dist/components/StatusLabel.svelte.d.ts +7 -0
- package/dist/components/ToolNode.svelte +385 -0
- package/dist/components/ToolNode.svelte.d.ts +36 -0
- package/dist/components/UniversalNode.svelte +126 -0
- package/dist/components/UniversalNode.svelte.d.ts +15 -0
- package/dist/components/WorkflowEditor.svelte +871 -528
- package/dist/components/WorkflowEditor.svelte.d.ts +15 -5
- package/dist/components/WorkflowNode.svelte +428 -542
- package/dist/components/WorkflowNode.svelte.d.ts +7 -3
- package/dist/config/apiConfig.d.ts +33 -0
- package/dist/config/apiConfig.js +39 -0
- package/dist/config/defaultPortConfig.d.ts +6 -0
- package/dist/config/defaultPortConfig.js +192 -0
- package/dist/config/demo.d.ts +58 -0
- package/dist/config/demo.js +142 -0
- package/dist/config/endpoints.d.ts +106 -0
- package/dist/config/endpoints.js +128 -0
- package/dist/data/samples.d.ts +38 -4
- package/dist/data/samples.js +2789 -737
- package/dist/examples/adapter-usage.d.ts +4 -4
- package/dist/examples/adapter-usage.js +21 -26
- package/dist/examples/api-client-usage.d.ts +6 -6
- package/dist/examples/api-client-usage.js +55 -54
- package/dist/index.d.ts +23 -15
- package/dist/index.js +23 -15
- 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 +21 -0
- package/dist/mocks/app-navigation.d.ts +5 -0
- package/dist/mocks/app-navigation.js +34 -0
- package/dist/mocks/app-stores.d.ts +14 -0
- package/dist/mocks/app-stores.js +26 -0
- package/dist/services/api.d.ts +13 -3
- package/dist/services/api.js +91 -36
- package/dist/services/globalSave.d.ts +20 -0
- package/dist/services/globalSave.js +165 -0
- package/dist/services/nodeExecutionService.d.ts +63 -0
- package/dist/services/nodeExecutionService.js +261 -0
- package/dist/services/portConfigApi.d.ts +14 -0
- package/dist/services/portConfigApi.js +69 -0
- package/dist/services/toastService.d.ts +147 -0
- package/dist/services/toastService.js +235 -0
- package/dist/services/workflowStorage.d.ts +2 -2
- package/dist/services/workflowStorage.js +10 -10
- package/dist/stores/workflowStore.d.ts +53 -0
- package/dist/stores/workflowStore.js +264 -0
- package/dist/styles/base.css +896 -363
- package/dist/svelte-app.d.ts +52 -5
- package/dist/svelte-app.js +128 -6
- package/dist/types/config.d.ts +291 -0
- package/dist/types/config.js +4 -0
- package/dist/types/index.d.ts +231 -19
- package/dist/types/index.js +1 -1
- package/dist/utils/colors.d.ts +67 -33
- package/dist/utils/colors.js +183 -118
- package/dist/utils/config.d.ts +41 -0
- package/dist/utils/config.js +248 -0
- package/dist/utils/connections.d.ts +40 -3
- package/dist/utils/connections.js +115 -44
- package/dist/utils/icons.d.ts +1 -1
- package/dist/utils/icons.js +71 -70
- package/dist/utils/nodeStatus.d.ts +53 -0
- package/dist/utils/nodeStatus.js +183 -0
- package/dist/utils/nodeTypes.d.ts +57 -0
- package/dist/utils/nodeTypes.js +109 -0
- package/dist/utils/nodeWrapper.d.ts +39 -0
- package/dist/utils/nodeWrapper.js +62 -0
- package/package.json +132 -97
- package/dist/app.css +0 -0
- package/dist/components/Node.svelte +0 -38
- package/dist/components/Node.svelte.d.ts +0 -4
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type { WorkflowNode } from
|
|
1
|
+
import type { WorkflowNode } from '../types/index.js';
|
|
2
2
|
interface Props {
|
|
3
|
-
data: WorkflowNode[
|
|
3
|
+
data: WorkflowNode['data'] & {
|
|
4
4
|
nodeId?: string;
|
|
5
|
+
onConfigOpen?: (node: {
|
|
6
|
+
id: string;
|
|
7
|
+
type: string;
|
|
8
|
+
data: WorkflowNode['data'];
|
|
9
|
+
}) => void;
|
|
5
10
|
};
|
|
6
11
|
selected?: boolean;
|
|
7
|
-
onPortClick?: (nodeId: string, portId: string, isOutput: boolean, event: MouseEvent) => void;
|
|
8
12
|
}
|
|
9
13
|
declare const WorkflowNode: import("svelte").Component<Props, {}, "">;
|
|
10
14
|
type WorkflowNode = ReturnType<typeof WorkflowNode>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Configuration
|
|
3
|
+
* Centralized configuration for all API endpoints
|
|
4
|
+
*/
|
|
5
|
+
export interface ApiConfig {
|
|
6
|
+
baseUrl: string;
|
|
7
|
+
endpoints: {
|
|
8
|
+
workflows: {
|
|
9
|
+
list: string;
|
|
10
|
+
get: string;
|
|
11
|
+
create: string;
|
|
12
|
+
update: string;
|
|
13
|
+
delete: string;
|
|
14
|
+
execute: string;
|
|
15
|
+
executionState: string;
|
|
16
|
+
};
|
|
17
|
+
executions: {
|
|
18
|
+
active: string;
|
|
19
|
+
};
|
|
20
|
+
nodes: {
|
|
21
|
+
list: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Default API configuration
|
|
27
|
+
* Can be overridden by environment variables or runtime config
|
|
28
|
+
*/
|
|
29
|
+
export declare const defaultApiConfig: ApiConfig;
|
|
30
|
+
/**
|
|
31
|
+
* Get full URL for an endpoint
|
|
32
|
+
*/
|
|
33
|
+
export declare function getEndpointUrl(config: ApiConfig, endpoint: string, params?: Record<string, string>): string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Configuration
|
|
3
|
+
* Centralized configuration for all API endpoints
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Default API configuration
|
|
7
|
+
* Can be overridden by environment variables or runtime config
|
|
8
|
+
*/
|
|
9
|
+
export const defaultApiConfig = {
|
|
10
|
+
baseUrl: import.meta.env.VITE_API_BASE_URL || '/api/flowdrop',
|
|
11
|
+
endpoints: {
|
|
12
|
+
workflows: {
|
|
13
|
+
list: '/workflows',
|
|
14
|
+
get: '/workflows/{id}',
|
|
15
|
+
create: '/workflows',
|
|
16
|
+
update: '/workflows/{id}',
|
|
17
|
+
delete: '/workflows/{id}',
|
|
18
|
+
execute: '/workflows/{id}/execute',
|
|
19
|
+
executionState: '/workflows/{id}/executions/{execution_id}/state'
|
|
20
|
+
},
|
|
21
|
+
executions: {
|
|
22
|
+
active: '/executions/active'
|
|
23
|
+
},
|
|
24
|
+
nodes: {
|
|
25
|
+
list: '/nodes'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Get full URL for an endpoint
|
|
31
|
+
*/
|
|
32
|
+
export function getEndpointUrl(config, endpoint, params = {}) {
|
|
33
|
+
let url = config.baseUrl + endpoint;
|
|
34
|
+
// Replace path parameters
|
|
35
|
+
for (const [key, value] of Object.entries(params)) {
|
|
36
|
+
url = url.replace(`{${key}}`, value);
|
|
37
|
+
}
|
|
38
|
+
return url;
|
|
39
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default port configuration for FlowDrop
|
|
3
|
+
* Provides backward compatibility and serves as an example configuration
|
|
4
|
+
*/
|
|
5
|
+
export const DEFAULT_PORT_CONFIG = {
|
|
6
|
+
version: '1.0.0',
|
|
7
|
+
defaultDataType: 'string',
|
|
8
|
+
dataTypes: [
|
|
9
|
+
// Text and basic types
|
|
10
|
+
{
|
|
11
|
+
id: 'trigger',
|
|
12
|
+
name: 'Trigger',
|
|
13
|
+
description: 'Control flow of the workflow',
|
|
14
|
+
color: 'var(--color-ref-purple-500)',
|
|
15
|
+
category: 'basic',
|
|
16
|
+
enabled: true
|
|
17
|
+
},
|
|
18
|
+
// Text and basic types
|
|
19
|
+
{
|
|
20
|
+
id: 'string',
|
|
21
|
+
name: 'String',
|
|
22
|
+
description: 'Text data',
|
|
23
|
+
color: 'var(--color-ref-emerald-500)',
|
|
24
|
+
category: 'basic',
|
|
25
|
+
enabled: true
|
|
26
|
+
},
|
|
27
|
+
// Numeric types
|
|
28
|
+
{
|
|
29
|
+
id: 'number',
|
|
30
|
+
name: 'Number',
|
|
31
|
+
description: 'Numeric data',
|
|
32
|
+
color: 'var(--color-ref-blue-600)',
|
|
33
|
+
category: 'numeric',
|
|
34
|
+
enabled: true
|
|
35
|
+
},
|
|
36
|
+
// Boolean types
|
|
37
|
+
{
|
|
38
|
+
id: 'boolean',
|
|
39
|
+
name: 'Boolean',
|
|
40
|
+
description: 'True/false values',
|
|
41
|
+
color: 'var(--color-ref-purple-600)',
|
|
42
|
+
category: 'logical',
|
|
43
|
+
enabled: true
|
|
44
|
+
},
|
|
45
|
+
// Collection types
|
|
46
|
+
{
|
|
47
|
+
id: 'array',
|
|
48
|
+
name: 'Array',
|
|
49
|
+
description: 'Ordered list of items',
|
|
50
|
+
color: 'var(--color-ref-amber-500)',
|
|
51
|
+
category: 'collection',
|
|
52
|
+
enabled: true
|
|
53
|
+
},
|
|
54
|
+
// Typed arrays
|
|
55
|
+
{
|
|
56
|
+
id: 'string[]',
|
|
57
|
+
name: 'String Array',
|
|
58
|
+
description: 'Array of strings',
|
|
59
|
+
color: 'var(--color-ref-emerald-400)',
|
|
60
|
+
category: 'collection',
|
|
61
|
+
enabled: true
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 'number[]',
|
|
65
|
+
name: 'Number Array',
|
|
66
|
+
description: 'Array of numbers',
|
|
67
|
+
color: 'var(--color-ref-blue-400)',
|
|
68
|
+
category: 'collection',
|
|
69
|
+
enabled: true
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 'boolean[]',
|
|
73
|
+
name: 'Boolean Array',
|
|
74
|
+
description: 'Array of true/false values',
|
|
75
|
+
color: 'var(--color-ref-purple-400)',
|
|
76
|
+
category: 'collection',
|
|
77
|
+
enabled: true
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: 'json[]',
|
|
81
|
+
name: 'JSON Array',
|
|
82
|
+
description: 'Array of JSON objects',
|
|
83
|
+
color: 'var(--color-ref-orange-400)',
|
|
84
|
+
category: 'collection',
|
|
85
|
+
enabled: true
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: 'file[]',
|
|
89
|
+
name: 'File Array',
|
|
90
|
+
description: 'Array of files',
|
|
91
|
+
color: 'var(--color-ref-red-400)',
|
|
92
|
+
category: 'collection',
|
|
93
|
+
enabled: true
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
id: 'image[]',
|
|
97
|
+
name: 'Image Array',
|
|
98
|
+
description: 'Array of images',
|
|
99
|
+
color: 'var(--color-ref-pink-400)',
|
|
100
|
+
category: 'collection',
|
|
101
|
+
enabled: true
|
|
102
|
+
},
|
|
103
|
+
// Complex types
|
|
104
|
+
{
|
|
105
|
+
id: 'json',
|
|
106
|
+
name: 'JSON',
|
|
107
|
+
description: 'JSON structured data',
|
|
108
|
+
color: 'var(--color-ref-orange-500)',
|
|
109
|
+
category: 'complex',
|
|
110
|
+
enabled: true
|
|
111
|
+
},
|
|
112
|
+
// File types
|
|
113
|
+
{
|
|
114
|
+
id: 'file',
|
|
115
|
+
name: 'File',
|
|
116
|
+
description: 'File data',
|
|
117
|
+
color: 'var(--color-ref-red-500)',
|
|
118
|
+
category: 'file',
|
|
119
|
+
enabled: true
|
|
120
|
+
},
|
|
121
|
+
// Media types
|
|
122
|
+
{
|
|
123
|
+
id: 'image',
|
|
124
|
+
name: 'Image',
|
|
125
|
+
description: 'Image data',
|
|
126
|
+
color: 'var(--color-ref-pink-500)',
|
|
127
|
+
category: 'media',
|
|
128
|
+
enabled: true
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: 'audio',
|
|
132
|
+
name: 'Audio',
|
|
133
|
+
description: 'Audio data',
|
|
134
|
+
color: 'var(--color-ref-indigo-500)',
|
|
135
|
+
category: 'media',
|
|
136
|
+
enabled: true
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: 'video',
|
|
140
|
+
name: 'Video',
|
|
141
|
+
description: 'Video data',
|
|
142
|
+
color: 'var(--color-ref-teal-500)',
|
|
143
|
+
category: 'media',
|
|
144
|
+
enabled: true
|
|
145
|
+
},
|
|
146
|
+
// Special types
|
|
147
|
+
{
|
|
148
|
+
id: 'url',
|
|
149
|
+
name: 'URL',
|
|
150
|
+
description: 'Web address',
|
|
151
|
+
color: 'var(--color-ref-cyan-500)',
|
|
152
|
+
category: 'special',
|
|
153
|
+
enabled: true
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
id: 'email',
|
|
157
|
+
name: 'Email',
|
|
158
|
+
description: 'Email address',
|
|
159
|
+
color: 'var(--color-ref-cyan-500)',
|
|
160
|
+
category: 'special',
|
|
161
|
+
enabled: true
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: 'date',
|
|
165
|
+
name: 'Date',
|
|
166
|
+
description: 'Date value',
|
|
167
|
+
color: 'var(--color-ref-lime-500)',
|
|
168
|
+
category: 'temporal',
|
|
169
|
+
enabled: true
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
id: 'datetime',
|
|
173
|
+
name: 'DateTime',
|
|
174
|
+
description: 'Date and time value',
|
|
175
|
+
color: 'var(--color-ref-lime-500)',
|
|
176
|
+
category: 'temporal',
|
|
177
|
+
enabled: true
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: 'time',
|
|
181
|
+
name: 'Time',
|
|
182
|
+
description: 'Time value',
|
|
183
|
+
color: 'var(--color-ref-lime-500)',
|
|
184
|
+
category: 'temporal',
|
|
185
|
+
enabled: true
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
compatibilityRules: [
|
|
189
|
+
// Pure same-type compatibility: string connects to string, number to number, etc.
|
|
190
|
+
// No additional rules needed - the system handles same-type connections automatically
|
|
191
|
+
]
|
|
192
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Demo configuration for FlowDrop UI
|
|
3
|
+
* Controls which nodes and workflows are shown in demo mode
|
|
4
|
+
*/
|
|
5
|
+
import type { DemoConfig } from '../data/samples.js';
|
|
6
|
+
/**
|
|
7
|
+
* Default demo configuration
|
|
8
|
+
* Change this to enable/disable demo mode and control what's shown
|
|
9
|
+
*/
|
|
10
|
+
export declare const defaultDemoConfig: DemoConfig;
|
|
11
|
+
/**
|
|
12
|
+
* Demo mode presets for different scenarios
|
|
13
|
+
*/
|
|
14
|
+
export declare const demoPresets: Record<string, DemoConfig>;
|
|
15
|
+
/**
|
|
16
|
+
* Get the current demo configuration
|
|
17
|
+
* You can modify this function to read from localStorage, URL params, etc.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getCurrentDemoConfig(): DemoConfig;
|
|
20
|
+
/**
|
|
21
|
+
* Set demo configuration (for future use with UI controls)
|
|
22
|
+
*/
|
|
23
|
+
export declare function setDemoConfig(config: DemoConfig): void;
|
|
24
|
+
/**
|
|
25
|
+
* Load demo configuration from localStorage
|
|
26
|
+
*/
|
|
27
|
+
export declare function loadDemoConfig(): DemoConfig;
|
|
28
|
+
/**
|
|
29
|
+
* Demo workflow configuration
|
|
30
|
+
*/
|
|
31
|
+
export declare const demoWorkflowConfig: {
|
|
32
|
+
defaultWorkflow: string;
|
|
33
|
+
autoLoadDemo: boolean;
|
|
34
|
+
sampleWorkflowName: string;
|
|
35
|
+
sampleWorkflowDescription: string;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Demo instructions for non-technical users
|
|
39
|
+
*/
|
|
40
|
+
export declare const demoInstructions: {
|
|
41
|
+
title: string;
|
|
42
|
+
description: string;
|
|
43
|
+
steps: ({
|
|
44
|
+
step: number;
|
|
45
|
+
title: string;
|
|
46
|
+
description: string;
|
|
47
|
+
example: string;
|
|
48
|
+
note?: undefined;
|
|
49
|
+
} | {
|
|
50
|
+
step: number;
|
|
51
|
+
title: string;
|
|
52
|
+
description: string;
|
|
53
|
+
note: string;
|
|
54
|
+
example?: undefined;
|
|
55
|
+
})[];
|
|
56
|
+
benefits: string[];
|
|
57
|
+
useCases: string[];
|
|
58
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Demo configuration for FlowDrop UI
|
|
3
|
+
* Controls which nodes and workflows are shown in demo mode
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Default demo configuration
|
|
7
|
+
* Change this to enable/disable demo mode and control what's shown
|
|
8
|
+
*/
|
|
9
|
+
export const defaultDemoConfig = {
|
|
10
|
+
enabled: true, // Set to true to enable demo mode
|
|
11
|
+
mode: 'content-management' // Show only whitelisted content management nodes
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Demo mode presets for different scenarios
|
|
15
|
+
*/
|
|
16
|
+
export const demoPresets = {
|
|
17
|
+
// Content management demo mode - show only whitelisted nodes
|
|
18
|
+
'content-management': {
|
|
19
|
+
enabled: true,
|
|
20
|
+
mode: 'content-management'
|
|
21
|
+
},
|
|
22
|
+
// Show all nodes (disable demo filtering)
|
|
23
|
+
'all-nodes': {
|
|
24
|
+
enabled: false,
|
|
25
|
+
mode: 'all'
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Get the current demo configuration
|
|
30
|
+
* You can modify this function to read from localStorage, URL params, etc.
|
|
31
|
+
*/
|
|
32
|
+
export function getCurrentDemoConfig() {
|
|
33
|
+
// For now, return the default config
|
|
34
|
+
// In the future, this could check localStorage or URL parameters
|
|
35
|
+
return defaultDemoConfig;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Set demo configuration (for future use with UI controls)
|
|
39
|
+
*/
|
|
40
|
+
export function setDemoConfig(config) {
|
|
41
|
+
// Store in localStorage for persistence
|
|
42
|
+
if (typeof localStorage !== 'undefined') {
|
|
43
|
+
localStorage.setItem('flowdrop-demo-config', JSON.stringify(config));
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Load demo configuration from localStorage
|
|
48
|
+
*/
|
|
49
|
+
export function loadDemoConfig() {
|
|
50
|
+
if (typeof localStorage !== 'undefined') {
|
|
51
|
+
const stored = localStorage.getItem('flowdrop-demo-config');
|
|
52
|
+
if (stored) {
|
|
53
|
+
try {
|
|
54
|
+
return JSON.parse(stored);
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
// Fall back to default if parsing fails
|
|
58
|
+
return defaultDemoConfig;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return defaultDemoConfig;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Demo workflow configuration
|
|
66
|
+
*/
|
|
67
|
+
export const demoWorkflowConfig = {
|
|
68
|
+
// Which workflow to show by default in demo mode
|
|
69
|
+
defaultWorkflow: 'sample', // Use sample workflow for now
|
|
70
|
+
// Whether to auto-load a workflow on startup
|
|
71
|
+
autoLoadDemo: false,
|
|
72
|
+
// Sample workflow is used in demo mode
|
|
73
|
+
sampleWorkflowName: 'Simple Chat Workflow',
|
|
74
|
+
sampleWorkflowDescription: 'A basic workflow demonstrating direct text input to AI model response'
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Demo instructions for non-technical users
|
|
78
|
+
*/
|
|
79
|
+
export const demoInstructions = {
|
|
80
|
+
title: 'Multi-Agent Content Management Demo',
|
|
81
|
+
description: 'This demo shows how FlowDrop uses multiple AI agents working together to manage and improve your Drupal content.',
|
|
82
|
+
steps: [
|
|
83
|
+
{
|
|
84
|
+
step: 1,
|
|
85
|
+
title: 'User Input',
|
|
86
|
+
description: 'Start by telling the main agent what content management task you need.',
|
|
87
|
+
example: "Find all blog posts about 'XB' and check if it's being used correctly as an acronym"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
step: 2,
|
|
91
|
+
title: 'Main Agent Orchestration',
|
|
92
|
+
description: 'The main conversational agent understands your request and coordinates with specialized sub-agents.',
|
|
93
|
+
note: 'Acts as the intelligent orchestrator of the entire workflow'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
step: 3,
|
|
97
|
+
title: 'Content Analysis Agent',
|
|
98
|
+
description: 'Specialized agent analyzes content using RAG search tools to find and examine relevant content.',
|
|
99
|
+
note: 'Uses Drupal Search API RAG tool for intelligent content discovery'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
step: 4,
|
|
103
|
+
title: 'Content Editor Agent',
|
|
104
|
+
description: 'Specialized agent makes improvements using available tools like date formatters and draft creators.',
|
|
105
|
+
note: 'Has access to multiple tools and makes conservative, tracked changes'
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
step: 5,
|
|
109
|
+
title: 'Tool Integration',
|
|
110
|
+
description: 'Sub-agents use specialized tools: RAG search, draft creation, date formatting, etc.',
|
|
111
|
+
note: "Tools are connected via special 'tool' interface ports"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
step: 6,
|
|
115
|
+
title: 'Agent Collaboration',
|
|
116
|
+
description: 'Sub-agents report back to the main agent with their findings and completed work.',
|
|
117
|
+
note: 'Multi-agent coordination ensures comprehensive task completion'
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
step: 7,
|
|
121
|
+
title: 'Orchestrated Response',
|
|
122
|
+
description: 'Main agent compiles results from all sub-agents and provides a comprehensive response.',
|
|
123
|
+
note: 'Includes summaries, draft links, and next steps for human review'
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
benefits: [
|
|
127
|
+
'Multi-agent collaboration for complex tasks',
|
|
128
|
+
'Specialized agents for specific content management functions',
|
|
129
|
+
'Intelligent task orchestration and coordination',
|
|
130
|
+
'Tool-based architecture for extensibility',
|
|
131
|
+
'Human oversight through draft approval process',
|
|
132
|
+
'Scalable agent-to-agent communication patterns'
|
|
133
|
+
],
|
|
134
|
+
useCases: [
|
|
135
|
+
'Multi-agent content analysis and improvement',
|
|
136
|
+
'Coordinated acronym standardization workflows',
|
|
137
|
+
'Agent-orchestrated style guide enforcement',
|
|
138
|
+
'Collaborative content quality assessment',
|
|
139
|
+
'Tool-assisted bulk content transformations',
|
|
140
|
+
'Intelligent editorial workflow automation'
|
|
141
|
+
]
|
|
142
|
+
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FlowDrop Endpoint Configuration
|
|
3
|
+
* Provides configurable endpoints for all API actions
|
|
4
|
+
*/
|
|
5
|
+
export interface EndpointConfig {
|
|
6
|
+
/** Base URL for all endpoints */
|
|
7
|
+
baseUrl: string;
|
|
8
|
+
/** Individual endpoint paths */
|
|
9
|
+
endpoints: {
|
|
10
|
+
nodes: {
|
|
11
|
+
list: string;
|
|
12
|
+
get: string;
|
|
13
|
+
byCategory: string;
|
|
14
|
+
metadata: string;
|
|
15
|
+
};
|
|
16
|
+
portConfig: string;
|
|
17
|
+
workflows: {
|
|
18
|
+
list: string;
|
|
19
|
+
get: string;
|
|
20
|
+
create: string;
|
|
21
|
+
update: string;
|
|
22
|
+
delete: string;
|
|
23
|
+
validate: string;
|
|
24
|
+
export: string;
|
|
25
|
+
import: string;
|
|
26
|
+
};
|
|
27
|
+
executions: {
|
|
28
|
+
execute: string;
|
|
29
|
+
status: string;
|
|
30
|
+
cancel: string;
|
|
31
|
+
logs: string;
|
|
32
|
+
history: string;
|
|
33
|
+
};
|
|
34
|
+
pipelines: {
|
|
35
|
+
list: string;
|
|
36
|
+
get: string;
|
|
37
|
+
create: string;
|
|
38
|
+
update: string;
|
|
39
|
+
delete: string;
|
|
40
|
+
status: string;
|
|
41
|
+
logs: string;
|
|
42
|
+
execute: string;
|
|
43
|
+
stop: string;
|
|
44
|
+
};
|
|
45
|
+
templates: {
|
|
46
|
+
list: string;
|
|
47
|
+
get: string;
|
|
48
|
+
create: string;
|
|
49
|
+
update: string;
|
|
50
|
+
delete: string;
|
|
51
|
+
};
|
|
52
|
+
users: {
|
|
53
|
+
profile: string;
|
|
54
|
+
preferences: string;
|
|
55
|
+
};
|
|
56
|
+
system: {
|
|
57
|
+
health: string;
|
|
58
|
+
config: string;
|
|
59
|
+
version: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
/** HTTP method overrides for specific endpoints */
|
|
63
|
+
methods?: {
|
|
64
|
+
[key: string]: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
65
|
+
};
|
|
66
|
+
/** Custom headers for specific endpoints */
|
|
67
|
+
headers?: {
|
|
68
|
+
[key: string]: Record<string, string>;
|
|
69
|
+
};
|
|
70
|
+
/** Authentication configuration */
|
|
71
|
+
auth?: {
|
|
72
|
+
type: 'none' | 'bearer' | 'api_key' | 'custom';
|
|
73
|
+
token?: string;
|
|
74
|
+
apiKey?: string;
|
|
75
|
+
headers?: Record<string, string>;
|
|
76
|
+
};
|
|
77
|
+
/** Request timeout in milliseconds */
|
|
78
|
+
timeout?: number;
|
|
79
|
+
/** Retry configuration */
|
|
80
|
+
retry?: {
|
|
81
|
+
enabled: boolean;
|
|
82
|
+
maxAttempts: number;
|
|
83
|
+
delay: number;
|
|
84
|
+
backoff?: 'linear' | 'exponential';
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Default endpoint configuration
|
|
89
|
+
*/
|
|
90
|
+
export declare const defaultEndpointConfig: EndpointConfig;
|
|
91
|
+
/**
|
|
92
|
+
* Create endpoint configuration with custom base URL
|
|
93
|
+
*/
|
|
94
|
+
export declare function createEndpointConfig(baseUrl: string, overrides?: Partial<EndpointConfig>): EndpointConfig;
|
|
95
|
+
/**
|
|
96
|
+
* Build full URL for an endpoint
|
|
97
|
+
*/
|
|
98
|
+
export declare function buildEndpointUrl(config: EndpointConfig, endpointPath: string, params?: Record<string, string>): string;
|
|
99
|
+
/**
|
|
100
|
+
* Get HTTP method for an endpoint
|
|
101
|
+
*/
|
|
102
|
+
export declare function getEndpointMethod(config: EndpointConfig, endpointKey: string): string;
|
|
103
|
+
/**
|
|
104
|
+
* Get custom headers for an endpoint
|
|
105
|
+
*/
|
|
106
|
+
export declare function getEndpointHeaders(config: EndpointConfig, endpointKey: string): Record<string, string>;
|