@d34dman/flowdrop 0.0.1 → 0.0.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.
Files changed (119) hide show
  1. package/README.md +307 -215
  2. package/dist/adapters/WorkflowAdapter.d.ts +1 -1
  3. package/dist/adapters/WorkflowAdapter.js +30 -30
  4. package/dist/api/client.d.ts +24 -1
  5. package/dist/api/client.js +55 -38
  6. package/dist/api/enhanced-client.d.ts +46 -0
  7. package/dist/api/enhanced-client.js +211 -0
  8. package/dist/clients/ApiClient.d.ts +19 -23
  9. package/dist/clients/ApiClient.js +36 -34
  10. package/dist/components/App.svelte +1299 -230
  11. package/dist/components/App.svelte.d.ts +21 -1
  12. package/dist/components/CanvasBanner.svelte +50 -44
  13. package/dist/components/CanvasBanner.svelte.d.ts +5 -19
  14. package/dist/components/ConfigForm.svelte +555 -0
  15. package/dist/components/ConfigForm.svelte.d.ts +32 -0
  16. package/dist/components/ConfigModal.svelte +261 -0
  17. package/dist/components/ConfigModal.svelte.d.ts +31 -0
  18. package/dist/components/ConfigSidebar.svelte +934 -0
  19. package/dist/components/ConfigSidebar.svelte.d.ts +51 -0
  20. package/dist/components/ConnectionLine.svelte +32 -0
  21. package/dist/components/ConnectionLine.svelte.d.ts +3 -0
  22. package/dist/components/GatewayNode.svelte +471 -0
  23. package/dist/components/GatewayNode.svelte.d.ts +15 -0
  24. package/dist/components/LoadingSpinner.svelte +23 -23
  25. package/dist/components/LoadingSpinner.svelte.d.ts +1 -1
  26. package/dist/components/Logo.svelte +82 -0
  27. package/dist/components/Logo.svelte.d.ts +26 -0
  28. package/dist/components/LogsSidebar.svelte +565 -0
  29. package/dist/components/LogsSidebar.svelte.d.ts +34 -0
  30. package/dist/components/MarkdownDisplay.svelte +28 -0
  31. package/dist/components/MarkdownDisplay.svelte.d.ts +7 -0
  32. package/dist/components/Navbar.svelte +663 -0
  33. package/dist/components/Navbar.svelte.d.ts +21 -0
  34. package/dist/components/NodeSidebar.svelte +629 -488
  35. package/dist/components/NodeSidebar.svelte.d.ts +1 -2
  36. package/dist/components/NodeStatusOverlay.svelte +327 -0
  37. package/dist/components/NodeStatusOverlay.svelte.d.ts +11 -0
  38. package/dist/components/NotesNode.svelte +566 -0
  39. package/dist/components/NotesNode.svelte.d.ts +43 -0
  40. package/dist/components/PipelineStatus.svelte +331 -0
  41. package/dist/components/PipelineStatus.svelte.d.ts +18 -0
  42. package/dist/components/SimpleNode.svelte +447 -0
  43. package/dist/components/SimpleNode.svelte.d.ts +24 -0
  44. package/dist/components/SquareNode.svelte +346 -0
  45. package/dist/components/SquareNode.svelte.d.ts +24 -0
  46. package/dist/components/StatusIcon.svelte +112 -0
  47. package/dist/components/StatusIcon.svelte.d.ts +10 -0
  48. package/dist/components/StatusLabel.svelte +33 -0
  49. package/dist/components/StatusLabel.svelte.d.ts +7 -0
  50. package/dist/components/ToolNode.svelte +385 -0
  51. package/dist/components/ToolNode.svelte.d.ts +36 -0
  52. package/dist/components/UniversalNode.svelte +126 -0
  53. package/dist/components/UniversalNode.svelte.d.ts +15 -0
  54. package/dist/components/WorkflowEditor.svelte +871 -528
  55. package/dist/components/WorkflowEditor.svelte.d.ts +15 -5
  56. package/dist/components/WorkflowNode.svelte +428 -542
  57. package/dist/components/WorkflowNode.svelte.d.ts +7 -3
  58. package/dist/config/apiConfig.d.ts +33 -0
  59. package/dist/config/apiConfig.js +39 -0
  60. package/dist/config/defaultPortConfig.d.ts +6 -0
  61. package/dist/config/defaultPortConfig.js +192 -0
  62. package/dist/config/demo.d.ts +58 -0
  63. package/dist/config/demo.js +142 -0
  64. package/dist/config/endpoints.d.ts +106 -0
  65. package/dist/config/endpoints.js +128 -0
  66. package/dist/data/samples.d.ts +38 -4
  67. package/dist/data/samples.js +2789 -737
  68. package/dist/examples/adapter-usage.d.ts +4 -4
  69. package/dist/examples/adapter-usage.js +21 -26
  70. package/dist/examples/api-client-usage.d.ts +6 -6
  71. package/dist/examples/api-client-usage.js +55 -54
  72. package/dist/index.d.ts +23 -15
  73. package/dist/index.js +23 -15
  74. package/dist/mocks/app-environment.d.ts +8 -0
  75. package/dist/mocks/app-environment.js +16 -0
  76. package/dist/mocks/app-forms.d.ts +2 -0
  77. package/dist/mocks/app-forms.js +21 -0
  78. package/dist/mocks/app-navigation.d.ts +5 -0
  79. package/dist/mocks/app-navigation.js +34 -0
  80. package/dist/mocks/app-stores.d.ts +14 -0
  81. package/dist/mocks/app-stores.js +26 -0
  82. package/dist/services/api.d.ts +13 -3
  83. package/dist/services/api.js +91 -36
  84. package/dist/services/globalSave.d.ts +20 -0
  85. package/dist/services/globalSave.js +165 -0
  86. package/dist/services/nodeExecutionService.d.ts +63 -0
  87. package/dist/services/nodeExecutionService.js +261 -0
  88. package/dist/services/portConfigApi.d.ts +14 -0
  89. package/dist/services/portConfigApi.js +69 -0
  90. package/dist/services/toastService.d.ts +147 -0
  91. package/dist/services/toastService.js +235 -0
  92. package/dist/services/workflowStorage.d.ts +2 -2
  93. package/dist/services/workflowStorage.js +10 -10
  94. package/dist/stores/workflowStore.d.ts +53 -0
  95. package/dist/stores/workflowStore.js +264 -0
  96. package/dist/styles/base.css +896 -363
  97. package/dist/svelte-app.d.ts +52 -5
  98. package/dist/svelte-app.js +128 -6
  99. package/dist/types/config.d.ts +291 -0
  100. package/dist/types/config.js +4 -0
  101. package/dist/types/index.d.ts +231 -19
  102. package/dist/types/index.js +1 -1
  103. package/dist/utils/colors.d.ts +67 -33
  104. package/dist/utils/colors.js +183 -118
  105. package/dist/utils/config.d.ts +41 -0
  106. package/dist/utils/config.js +248 -0
  107. package/dist/utils/connections.d.ts +40 -3
  108. package/dist/utils/connections.js +115 -44
  109. package/dist/utils/icons.d.ts +1 -1
  110. package/dist/utils/icons.js +71 -70
  111. package/dist/utils/nodeStatus.d.ts +53 -0
  112. package/dist/utils/nodeStatus.js +183 -0
  113. package/dist/utils/nodeTypes.d.ts +57 -0
  114. package/dist/utils/nodeTypes.js +109 -0
  115. package/dist/utils/nodeWrapper.d.ts +39 -0
  116. package/dist/utils/nodeWrapper.js +62 -0
  117. package/package.json +129 -97
  118. package/dist/components/Node.svelte +0 -38
  119. package/dist/components/Node.svelte.d.ts +0 -4
@@ -2,1192 +2,3244 @@
2
2
  * Sample data for FlowDrop development and testing
3
3
  * Full set matching Langflow's default categories and node types
4
4
  */
5
- import { v4 as uuidv4 } from "uuid";
6
- import { CATEGORY_ICONS } from "../utils/icons.js";
5
+ import { CATEGORY_ICONS } from '../utils/icons.js';
7
6
  /**
8
- * Sample node definitions for development
9
- * Full set matching Langflow's default categories
7
+ * Sample node data for development and testing
8
+ * These represent the available node types in the workflow editor
10
9
  */
11
10
  export const sampleNodes = [
12
11
  // ===== INPUTS CATEGORY =====
13
12
  {
14
- id: uuidv4(),
15
- name: "Text Input",
16
- version: "1.0.0",
17
- description: "Simple text input for user data",
18
- category: "inputs",
19
- icon: "mdi:text",
20
- color: "#22c55e",
13
+ id: 'sample-text-input',
14
+ name: 'Text Input',
15
+ type: 'simple',
16
+ supportedTypes: ['simple', 'square', 'default'],
17
+ version: '1.0.0',
18
+ description: 'User text input field',
19
+ category: 'inputs',
20
+ icon: 'mdi:text-box',
21
+ color: '#10b981',
21
22
  inputs: [],
22
23
  outputs: [
23
24
  {
24
- id: "text",
25
- name: "Text",
26
- type: "output",
27
- dataType: "string",
28
- description: "The input text value"
25
+ id: 'text',
26
+ name: 'Text',
27
+ type: 'output',
28
+ dataType: 'string',
29
+ description: 'User entered text'
29
30
  }
30
31
  ],
31
32
  configSchema: {
32
- placeholder: "Enter text here...",
33
- defaultValue: "",
34
- multiline: false
35
- },
36
- tags: ["input", "text", "user-input"]
37
- },
38
- {
39
- id: uuidv4(),
40
- name: "File",
41
- version: "1.0.0",
42
- description: "Upload and process files of various formats",
43
- category: "inputs",
44
- icon: "mdi:file-upload",
45
- color: "#ef4444",
46
- inputs: [],
47
- outputs: [
48
- {
49
- id: "data",
50
- name: "Data",
51
- type: "output",
52
- dataType: "file",
53
- description: "File content as Data object"
54
- },
55
- {
56
- id: "text",
57
- name: "Text",
58
- type: "output",
59
- dataType: "text",
60
- description: "File content as text"
33
+ type: 'object',
34
+ properties: {
35
+ nodeType: {
36
+ type: 'string',
37
+ title: 'Node Type',
38
+ description: 'Choose the visual representation for this node',
39
+ default: 'simple',
40
+ enum: ['simple', 'square', 'default'],
41
+ enumNames: [
42
+ 'Simple (compact layout)',
43
+ 'Square (square layout)',
44
+ 'Default (standard workflow node)'
45
+ ]
46
+ },
47
+ placeholder: {
48
+ type: 'string',
49
+ title: 'Placeholder',
50
+ description: 'Placeholder text for the input field',
51
+ default: 'Enter text...'
52
+ },
53
+ defaultValue: {
54
+ type: 'string',
55
+ title: 'Default Value',
56
+ description: 'Default text value',
57
+ default: ''
58
+ }
61
59
  }
62
- ],
63
- configSchema: {
64
- allowedTypes: ["txt", "pdf", "docx", "csv", "json"],
65
- maxSize: 10485760
66
60
  },
67
- tags: ["input", "file", "upload", "document"]
61
+ tags: ['input', 'text', 'user']
68
62
  },
69
63
  {
70
- id: uuidv4(),
71
- name: "URL",
72
- version: "1.0.0",
73
- description: "Fetch content from URLs",
74
- category: "inputs",
75
- icon: "mdi:link",
76
- color: "#3b82f6",
64
+ id: 'sample-file-upload',
65
+ name: 'File Upload',
66
+ type: 'simple',
67
+ supportedTypes: ['simple', 'default'],
68
+ version: '1.0.0',
69
+ description: 'File upload input with drag and drop support',
70
+ category: 'inputs',
71
+ icon: 'mdi:file-upload',
72
+ color: '#f59e0b',
77
73
  inputs: [],
78
74
  outputs: [
79
75
  {
80
- id: "data",
81
- name: "Data",
82
- type: "output",
83
- dataType: "text",
84
- description: "Fetched content as text"
85
- },
86
- {
87
- id: "dataframe",
88
- name: "DataFrame",
89
- type: "output",
90
- dataType: "json",
91
- description: "Structured data from URL"
76
+ id: 'file',
77
+ name: 'File',
78
+ type: 'output',
79
+ dataType: 'file',
80
+ description: 'Uploaded file data'
92
81
  }
93
82
  ],
94
83
  configSchema: {
95
- urls: [],
96
- maxDepth: 1,
97
- format: "text",
98
- timeout: 30
99
- },
100
- tags: ["input", "url", "web", "fetch"]
101
- },
102
- {
103
- id: uuidv4(),
104
- name: "API Request",
105
- version: "1.0.0",
106
- description: "Make HTTP requests to APIs",
107
- category: "inputs",
108
- icon: "mdi:api",
109
- color: "#8b5cf6",
110
- inputs: [],
111
- outputs: [
112
- {
113
- id: "data",
114
- name: "Data",
115
- type: "output",
116
- dataType: "json",
117
- description: "API response data"
118
- },
119
- {
120
- id: "dataframe",
121
- name: "DataFrame",
122
- type: "output",
123
- dataType: "json",
124
- description: "Response as structured data"
84
+ type: 'object',
85
+ properties: {
86
+ nodeType: {
87
+ type: 'string',
88
+ title: 'Node Type',
89
+ description: 'Choose the visual representation for this node',
90
+ default: 'simple',
91
+ enum: ['simple', 'square', 'default'],
92
+ enumNames: [
93
+ 'Simple (compact layout)',
94
+ 'Square (square layout)',
95
+ 'Default (standard workflow node)'
96
+ ]
97
+ },
98
+ accept: {
99
+ type: 'string',
100
+ title: 'Accepted File Types',
101
+ description: 'Comma-separated list of accepted file types',
102
+ default: '*'
103
+ },
104
+ maxSize: {
105
+ type: 'number',
106
+ title: 'Maximum File Size (MB)',
107
+ description: 'Maximum file size in megabytes',
108
+ default: 10
109
+ }
125
110
  }
126
- ],
127
- configSchema: {
128
- urls: [],
129
- method: "GET",
130
- headers: {},
131
- body: {},
132
- timeout: 30
133
111
  },
134
- tags: ["input", "api", "http", "rest"]
112
+ tags: ['input', 'file', 'upload']
135
113
  },
136
114
  {
137
- id: uuidv4(),
138
- name: "Webhook",
139
- version: "1.0.0",
140
- description: "Receive data from external webhooks",
141
- category: "inputs",
142
- icon: "mdi:webhook",
143
- color: "#06b6d4",
115
+ id: 'sample-webhook',
116
+ name: 'Webhook',
117
+ type: 'simple',
118
+ supportedTypes: ['simple', 'default'],
119
+ version: '1.0.0',
120
+ description: 'Receive data from external webhooks',
121
+ category: 'inputs',
122
+ icon: 'mdi:webhook',
123
+ color: '#8b5cf6',
144
124
  inputs: [],
145
125
  outputs: [
146
126
  {
147
- id: "data",
148
- name: "Data",
149
- type: "output",
150
- dataType: "json",
151
- description: "Webhook payload data"
127
+ id: 'data',
128
+ name: 'Data',
129
+ type: 'output',
130
+ dataType: 'json',
131
+ description: 'Webhook payload data'
152
132
  }
153
133
  ],
154
134
  configSchema: {
155
- endpoint: "",
156
- method: "POST"
135
+ type: 'object',
136
+ properties: {
137
+ nodeType: {
138
+ type: 'string',
139
+ title: 'Node Type',
140
+ description: 'Choose the visual representation for this node',
141
+ default: 'simple',
142
+ enum: ['simple', 'square', 'default'],
143
+ enumNames: [
144
+ 'Simple (compact layout)',
145
+ 'Square (square layout)',
146
+ 'Default (standard workflow node)'
147
+ ]
148
+ },
149
+ endpoint: {
150
+ type: 'string',
151
+ title: 'Endpoint',
152
+ description: 'Webhook endpoint URL',
153
+ default: ''
154
+ },
155
+ method: {
156
+ type: 'string',
157
+ title: 'HTTP Method',
158
+ description: 'HTTP method for the webhook',
159
+ default: 'POST',
160
+ enum: ['GET', 'POST', 'PUT', 'DELETE']
161
+ }
162
+ }
157
163
  },
158
- tags: ["input", "webhook", "external"]
164
+ tags: ['input', 'webhook', 'external']
159
165
  },
160
166
  // ===== OUTPUTS CATEGORY =====
161
167
  {
162
- id: uuidv4(),
163
- name: "Chat Output",
164
- version: "1.0.0",
165
- description: "Display chat-style output with formatting",
166
- category: "outputs",
167
- icon: "mdi:chat",
168
- color: "#8b5cf6",
168
+ id: 'sample-chat-output',
169
+ name: 'Chat Output',
170
+ type: 'simple',
171
+ supportedTypes: ['simple', 'default'],
172
+ version: '1.0.0',
173
+ description: 'Display chat-style output with formatting',
174
+ category: 'outputs',
175
+ icon: 'mdi:chat',
176
+ color: '#8b5cf6',
169
177
  inputs: [
170
178
  {
171
- id: "message",
172
- name: "Message",
173
- type: "input",
174
- dataType: "text",
179
+ id: 'message',
180
+ name: 'Message',
181
+ type: 'input',
182
+ dataType: 'string',
175
183
  required: true,
176
- description: "Message to display"
184
+ description: 'Message to display'
177
185
  }
178
186
  ],
179
187
  outputs: [],
180
188
  configSchema: {
181
- showTimestamp: true,
182
- maxLength: 2000,
183
- markdown: true
189
+ type: 'object',
190
+ properties: {
191
+ nodeType: {
192
+ type: 'string',
193
+ title: 'Node Type',
194
+ description: 'Choose the visual representation for this node',
195
+ default: 'simple',
196
+ enum: ['simple', 'square', 'default'],
197
+ enumNames: [
198
+ 'Simple (compact layout)',
199
+ 'Square (square layout)',
200
+ 'Default (standard workflow node)'
201
+ ]
202
+ },
203
+ showTimestamp: {
204
+ type: 'boolean',
205
+ title: 'Show Timestamp',
206
+ description: 'Display timestamp with messages',
207
+ default: true
208
+ },
209
+ maxLength: {
210
+ type: 'number',
211
+ title: 'Maximum Length',
212
+ description: 'Maximum message length',
213
+ default: 2000
214
+ },
215
+ markdown: {
216
+ type: 'boolean',
217
+ title: 'Markdown Support',
218
+ description: 'Enable markdown formatting',
219
+ default: true
220
+ }
221
+ }
184
222
  },
185
- tags: ["output", "chat", "display"]
223
+ tags: ['output', 'chat', 'display']
186
224
  },
187
225
  {
188
- id: uuidv4(),
189
- name: "Text Output",
190
- version: "1.0.0",
191
- description: "Display plain text output",
192
- category: "outputs",
193
- icon: "mdi:text-box",
194
- color: "#10b981",
226
+ id: 'sample-text-output',
227
+ name: 'Text Output',
228
+ type: 'simple',
229
+ supportedTypes: ['simple', 'default'],
230
+ version: '1.0.0',
231
+ description: 'Display plain text output',
232
+ category: 'outputs',
233
+ icon: 'mdi:text-box',
234
+ color: '#10b981',
195
235
  inputs: [
196
236
  {
197
- id: "text",
198
- name: "Text",
199
- type: "input",
200
- dataType: "text",
237
+ id: 'text',
238
+ name: 'Text',
239
+ type: 'input',
240
+ dataType: 'string',
201
241
  required: true,
202
- description: "Text to display"
242
+ description: 'Text to display'
203
243
  }
204
244
  ],
205
245
  outputs: [],
206
246
  configSchema: {
207
- showTimestamp: false,
208
- maxLength: 1000
247
+ type: 'object',
248
+ properties: {
249
+ nodeType: {
250
+ type: 'string',
251
+ title: 'Node Type',
252
+ description: 'Choose the visual representation for this node',
253
+ default: 'simple',
254
+ enum: ['simple', 'square', 'default'],
255
+ enumNames: [
256
+ 'Simple (compact layout)',
257
+ 'Square (square layout)',
258
+ 'Default (standard workflow node)'
259
+ ]
260
+ },
261
+ showTimestamp: {
262
+ type: 'boolean',
263
+ title: 'Show Timestamp',
264
+ description: 'Display timestamp with output',
265
+ default: false
266
+ },
267
+ maxLength: {
268
+ type: 'number',
269
+ title: 'Maximum Length',
270
+ description: 'Maximum text length',
271
+ default: 1000
272
+ }
273
+ }
209
274
  },
210
- tags: ["output", "text", "display"]
275
+ tags: ['output', 'text', 'display']
211
276
  },
212
277
  // ===== PROMPTS CATEGORY =====
213
278
  {
214
- id: uuidv4(),
215
- name: "Prompt",
216
- version: "1.0.0",
217
- description: "Template-based prompt with variables",
218
- category: "prompts",
219
- icon: "mdi:message-text",
220
- color: "#f59e0b",
279
+ id: 'sample-prompt',
280
+ name: 'Prompt',
281
+ type: 'simple',
282
+ supportedTypes: ['simple', 'default'],
283
+ version: '1.0.0',
284
+ description: 'Template-based prompt with variables',
285
+ category: 'prompts',
286
+ icon: 'mdi:message-text',
287
+ color: '#f59e0b',
221
288
  inputs: [
222
289
  {
223
- id: "variables",
224
- name: "Variables",
225
- type: "input",
226
- dataType: "json",
290
+ id: 'variables',
291
+ name: 'Variables',
292
+ type: 'input',
293
+ dataType: 'json',
227
294
  required: false,
228
- description: "Variables to inject into template"
295
+ description: 'Variables to inject into template'
229
296
  }
230
297
  ],
231
298
  outputs: [
232
299
  {
233
- id: "prompt",
234
- name: "Prompt",
235
- type: "output",
236
- dataType: "text",
237
- description: "Formatted prompt text"
300
+ id: 'prompt',
301
+ name: 'Prompt',
302
+ type: 'output',
303
+ dataType: 'string',
304
+ description: 'Formatted prompt text'
238
305
  }
239
306
  ],
240
307
  configSchema: {
241
- template: "You are a helpful assistant. {input}",
242
- variables: []
308
+ type: 'object',
309
+ properties: {
310
+ nodeType: {
311
+ type: 'string',
312
+ title: 'Node Type',
313
+ description: 'Choose the visual representation for this node',
314
+ default: 'simple',
315
+ enum: ['simple', 'square', 'default'],
316
+ enumNames: [
317
+ 'Simple (compact layout)',
318
+ 'Square (square layout)',
319
+ 'Default (standard workflow node)'
320
+ ]
321
+ },
322
+ template: {
323
+ type: 'string',
324
+ title: 'Template',
325
+ description: 'Prompt template with variables',
326
+ default: 'You are a helpful assistant. {input}'
327
+ },
328
+ variables: {
329
+ type: 'array',
330
+ title: 'Variables',
331
+ description: 'List of available variables',
332
+ default: []
333
+ }
334
+ }
243
335
  },
244
- tags: ["prompt", "template", "variables"]
336
+ tags: ['prompt', 'template', 'variables']
245
337
  },
246
338
  {
247
- id: uuidv4(),
248
- name: "Structured Output",
249
- version: "1.0.0",
250
- description: "Generate structured output from models",
251
- category: "prompts",
252
- icon: "mdi:table",
253
- color: "#6366f1",
339
+ id: 'sample-structured-output',
340
+ name: 'Structured Output',
341
+ type: 'default',
342
+ supportedTypes: ['default'],
343
+ version: '1.0.0',
344
+ description: 'Generate structured output from models',
345
+ category: 'prompts',
346
+ icon: 'mdi:table',
347
+ color: '#6366f1',
254
348
  inputs: [
255
349
  {
256
- id: "model",
257
- name: "Model",
258
- type: "input",
259
- dataType: "json",
350
+ id: 'model',
351
+ name: 'Model',
352
+ type: 'input',
353
+ dataType: 'json',
260
354
  required: true,
261
- description: "Model to use"
355
+ description: 'Model to use'
262
356
  },
263
357
  {
264
- id: "message",
265
- name: "Message",
266
- type: "input",
267
- dataType: "text",
358
+ id: 'message',
359
+ name: 'Message',
360
+ type: 'input',
361
+ dataType: 'string',
268
362
  required: true,
269
- description: "Input message"
363
+ description: 'Input message'
270
364
  }
271
365
  ],
272
366
  outputs: [
273
367
  {
274
- id: "dataframe",
275
- name: "DataFrame",
276
- type: "output",
277
- dataType: "json",
278
- description: "Structured output as DataFrame"
368
+ id: 'dataframe',
369
+ name: 'DataFrame',
370
+ type: 'output',
371
+ dataType: 'json',
372
+ description: 'Structured output as DataFrame'
279
373
  }
280
374
  ],
281
375
  configSchema: {
282
- schema: {},
283
- outputType: "json"
376
+ type: 'object',
377
+ properties: {
378
+ schema: {
379
+ type: 'object',
380
+ title: 'Schema',
381
+ description: 'JSON schema for structured output',
382
+ default: {}
383
+ },
384
+ outputType: {
385
+ type: 'string',
386
+ title: 'Output Type',
387
+ description: 'Type of structured output',
388
+ default: 'json',
389
+ enum: ['json', 'xml', 'yaml']
390
+ }
391
+ }
284
392
  },
285
- tags: ["prompt", "structured", "output", "schema"]
393
+ tags: ['prompt', 'structured', 'output', 'schema']
286
394
  },
287
395
  // ===== MODELS CATEGORY =====
288
396
  {
289
- id: uuidv4(),
290
- name: "OpenAI",
291
- version: "1.0.0",
292
- description: "OpenAI GPT models for text generation",
293
- category: "models",
294
- icon: "mdi:robot",
295
- color: "#10a37f",
397
+ id: 'sample-openai',
398
+ name: 'OpenAI',
399
+ type: 'default',
400
+ supportedTypes: ['default'],
401
+ version: '1.0.0',
402
+ description: 'OpenAI GPT models for text generation',
403
+ category: 'models',
404
+ icon: 'mdi:robot',
405
+ color: '#10a37f',
296
406
  inputs: [
297
407
  {
298
- id: "prompt",
299
- name: "Prompt",
300
- type: "input",
301
- dataType: "text",
408
+ id: 'prompt',
409
+ name: 'Prompt',
410
+ type: 'input',
411
+ dataType: 'string',
302
412
  required: true,
303
- description: "Input prompt for the model"
413
+ description: 'Input prompt for the model'
304
414
  },
305
415
  {
306
- id: "system_message",
307
- name: "System Message",
308
- type: "input",
309
- dataType: "text",
416
+ id: 'system_message',
417
+ name: 'System Message',
418
+ type: 'input',
419
+ dataType: 'string',
310
420
  required: false,
311
- description: "System message to set behavior"
421
+ description: 'System message to set behavior'
312
422
  }
313
423
  ],
314
424
  outputs: [
315
425
  {
316
- id: "response",
317
- name: "Response",
318
- type: "output",
319
- dataType: "text",
320
- description: "Model response"
426
+ id: 'response',
427
+ name: 'Response',
428
+ type: 'output',
429
+ dataType: 'string',
430
+ description: 'Model response'
321
431
  },
322
432
  {
323
- id: "usage",
324
- name: "Usage",
325
- type: "output",
326
- dataType: "json",
327
- description: "Token usage information"
433
+ id: 'usage',
434
+ name: 'Usage',
435
+ type: 'output',
436
+ dataType: 'json',
437
+ description: 'Token usage information'
328
438
  }
329
439
  ],
330
440
  configSchema: {
331
- model: "gpt-3.5-turbo",
332
- temperature: 0.7,
333
- maxTokens: 1000,
334
- apiKey: ""
441
+ type: 'object',
442
+ properties: {
443
+ model: {
444
+ type: 'string',
445
+ title: 'Model',
446
+ description: 'OpenAI model to use',
447
+ default: 'gpt-3.5-turbo',
448
+ enum: ['gpt-3.5-turbo', 'gpt-4', 'gpt-4-turbo']
449
+ },
450
+ temperature: {
451
+ type: 'number',
452
+ title: 'Temperature',
453
+ description: 'Creativity level (0-2)',
454
+ default: 0.7,
455
+ minimum: 0,
456
+ maximum: 2
457
+ },
458
+ maxTokens: {
459
+ type: 'number',
460
+ title: 'Max Tokens',
461
+ description: 'Maximum tokens to generate',
462
+ default: 1000,
463
+ minimum: 1,
464
+ maximum: 4000
465
+ },
466
+ apiKey: {
467
+ type: 'string',
468
+ title: 'API Key',
469
+ description: 'OpenAI API key',
470
+ default: ''
471
+ }
472
+ }
335
473
  },
336
- tags: ["model", "openai", "gpt", "chat"]
474
+ tags: ['model', 'openai', 'gpt', 'chat']
337
475
  },
338
476
  {
339
- id: uuidv4(),
340
- name: "Anthropic",
341
- version: "1.0.0",
342
- description: "Anthropic Claude models for text generation",
343
- category: "models",
344
- icon: "mdi:brain",
345
- color: "#7c3aed",
477
+ id: 'sample-anthropic',
478
+ name: 'Anthropic',
479
+ type: 'default',
480
+ supportedTypes: ['default'],
481
+ version: '1.0.0',
482
+ description: 'Anthropic Claude models for text generation',
483
+ category: 'models',
484
+ icon: 'mdi:brain',
485
+ color: '#7c3aed',
346
486
  inputs: [
347
487
  {
348
- id: "prompt",
349
- name: "Prompt",
350
- type: "input",
351
- dataType: "text",
488
+ id: 'prompt',
489
+ name: 'Prompt',
490
+ type: 'input',
491
+ dataType: 'string',
352
492
  required: true,
353
- description: "Input prompt for the model"
493
+ description: 'Input prompt for the model'
354
494
  }
355
495
  ],
356
496
  outputs: [
357
497
  {
358
- id: "response",
359
- name: "Response",
360
- type: "output",
361
- dataType: "text",
362
- description: "Model response"
498
+ id: 'response',
499
+ name: 'Response',
500
+ type: 'output',
501
+ dataType: 'string',
502
+ description: 'Model response'
363
503
  }
364
504
  ],
365
505
  configSchema: {
366
- model: "claude-3-sonnet-20240229",
367
- temperature: 0.7,
368
- maxTokens: 1000,
369
- apiKey: ""
506
+ type: 'object',
507
+ properties: {
508
+ model: {
509
+ type: 'string',
510
+ title: 'Model',
511
+ description: 'Anthropic model to use',
512
+ default: 'claude-3-sonnet-20240229',
513
+ enum: ['claude-3-sonnet-20240229', 'claude-3-opus-20240229', 'claude-3-haiku-20240307']
514
+ },
515
+ temperature: {
516
+ type: 'number',
517
+ title: 'Temperature',
518
+ description: 'Creativity level (0-1)',
519
+ default: 0.7,
520
+ minimum: 0,
521
+ maximum: 1
522
+ },
523
+ maxTokens: {
524
+ type: 'number',
525
+ title: 'Max Tokens',
526
+ description: 'Maximum tokens to generate',
527
+ default: 1000,
528
+ minimum: 1,
529
+ maximum: 4000
530
+ },
531
+ apiKey: {
532
+ type: 'string',
533
+ title: 'API Key',
534
+ description: 'Anthropic API key',
535
+ default: ''
536
+ }
537
+ }
370
538
  },
371
- tags: ["model", "anthropic", "claude"]
539
+ tags: ['model', 'anthropic', 'claude']
372
540
  },
373
541
  {
374
- id: uuidv4(),
375
- name: "Groq",
376
- version: "1.0.0",
377
- description: "Groq fast inference models",
378
- category: "models",
379
- icon: "mdi:lightning-bolt",
380
- color: "#f97316",
542
+ id: 'sample-groq',
543
+ name: 'Groq',
544
+ type: 'default',
545
+ supportedTypes: ['default'],
546
+ version: '1.0.0',
547
+ description: 'Groq fast inference models',
548
+ category: 'models',
549
+ icon: 'mdi:lightning-bolt',
550
+ color: '#f97316',
381
551
  inputs: [
382
552
  {
383
- id: "prompt",
384
- name: "Prompt",
385
- type: "input",
386
- dataType: "text",
553
+ id: 'prompt',
554
+ name: 'Prompt',
555
+ type: 'input',
556
+ dataType: 'string',
387
557
  required: true,
388
- description: "Input prompt for the model"
558
+ description: 'Input prompt for the model'
389
559
  }
390
560
  ],
391
561
  outputs: [
392
562
  {
393
- id: "response",
394
- name: "Response",
395
- type: "output",
396
- dataType: "text",
397
- description: "Model response"
563
+ id: 'response',
564
+ name: 'Response',
565
+ type: 'output',
566
+ dataType: 'string',
567
+ description: 'Model response'
398
568
  }
399
569
  ],
400
570
  configSchema: {
401
- model: "llama-3.1-8b-instant",
402
- temperature: 0.7,
403
- maxTokens: 1000,
404
- apiKey: ""
571
+ type: 'object',
572
+ properties: {
573
+ model: {
574
+ type: 'string',
575
+ title: 'Model',
576
+ description: 'Groq model to use',
577
+ default: 'llama-3.1-8b-instant',
578
+ enum: ['llama-3.1-8b-instant', 'llama-3.1-70b-versatile', 'mixtral-8x7b-32768']
579
+ },
580
+ temperature: {
581
+ type: 'number',
582
+ title: 'Temperature',
583
+ description: 'Creativity level (0-1)',
584
+ default: 0.7,
585
+ minimum: 0,
586
+ maximum: 1
587
+ },
588
+ maxTokens: {
589
+ type: 'number',
590
+ title: 'Max Tokens',
591
+ description: 'Maximum tokens to generate',
592
+ default: 1000,
593
+ minimum: 1,
594
+ maximum: 4000
595
+ },
596
+ apiKey: {
597
+ type: 'string',
598
+ title: 'API Key',
599
+ description: 'Groq API key',
600
+ default: ''
601
+ }
602
+ }
405
603
  },
406
- tags: ["model", "groq", "fast", "inference"]
604
+ tags: ['model', 'groq', 'fast', 'inference']
407
605
  },
408
606
  // ===== PROCESSING CATEGORY =====
409
607
  {
410
- id: uuidv4(),
411
- name: "Split Text",
412
- version: "1.0.0",
413
- description: "Split text into chunks for processing",
414
- category: "processing",
415
- icon: "mdi:content-cut",
416
- color: "#f59e0b",
608
+ id: 'sample-split-text',
609
+ name: 'Split Text',
610
+ type: 'default',
611
+ supportedTypes: ['default'],
612
+ version: '1.0.0',
613
+ description: 'Split text into chunks for processing',
614
+ category: 'processing',
615
+ icon: 'mdi:content-cut',
616
+ color: '#f59e0b',
417
617
  inputs: [
418
618
  {
419
- id: "text",
420
- name: "Text",
421
- type: "input",
422
- dataType: "text",
619
+ id: 'text',
620
+ name: 'Text',
621
+ type: 'input',
622
+ dataType: 'string',
423
623
  required: true,
424
- description: "Text to split"
624
+ description: 'Text to split'
425
625
  }
426
626
  ],
427
627
  outputs: [
428
628
  {
429
- id: "chunks",
430
- name: "Chunks",
431
- type: "output",
432
- dataType: "array",
433
- description: "Split text chunks"
629
+ id: 'chunks',
630
+ name: 'Chunks',
631
+ type: 'output',
632
+ dataType: 'string[]',
633
+ description: 'Split text chunks'
434
634
  },
435
635
  {
436
- id: "dataframe",
437
- name: "DataFrame",
438
- type: "output",
439
- dataType: "json",
440
- description: "Chunks as structured data"
636
+ id: 'dataframe',
637
+ name: 'DataFrame',
638
+ type: 'output',
639
+ dataType: 'json',
640
+ description: 'Chunks as structured data'
441
641
  }
442
642
  ],
443
643
  configSchema: {
444
- chunkSize: 1000,
445
- chunkOverlap: 200,
446
- separator: "\n"
644
+ type: 'object',
645
+ properties: {
646
+ chunkSize: {
647
+ type: 'number',
648
+ title: 'Chunk Size',
649
+ description: 'Size of each text chunk',
650
+ default: 1000,
651
+ minimum: 1,
652
+ maximum: 10000
653
+ },
654
+ chunkOverlap: {
655
+ type: 'number',
656
+ title: 'Chunk Overlap',
657
+ description: 'Overlap between chunks',
658
+ default: 200,
659
+ minimum: 0,
660
+ maximum: 1000
661
+ },
662
+ separator: {
663
+ type: 'string',
664
+ title: 'Separator',
665
+ description: 'Text separator for splitting',
666
+ default: '\n'
667
+ }
668
+ }
447
669
  },
448
- tags: ["processing", "text", "split", "chunking"]
670
+ tags: ['processing', 'text', 'split', 'chunking']
449
671
  },
450
672
  {
451
- id: uuidv4(),
452
- name: "Data Operations",
453
- version: "1.0.0",
454
- description: "Perform operations on Data objects",
455
- category: "processing",
456
- icon: "mdi:database-cog",
457
- color: "#6366f1",
673
+ id: 'sample-data-operations',
674
+ name: 'Data Operations',
675
+ version: '1.0.0',
676
+ description: 'Perform operations on Data objects',
677
+ category: 'processing',
678
+ icon: 'mdi:database-cog',
679
+ color: '#6366f1',
458
680
  inputs: [
459
681
  {
460
- id: "data",
461
- name: "Data",
462
- type: "input",
463
- dataType: "json",
682
+ id: 'data',
683
+ name: 'Data',
684
+ type: 'input',
685
+ dataType: 'json',
464
686
  required: true,
465
- description: "Data to operate on"
687
+ description: 'Data to operate on'
466
688
  }
467
689
  ],
468
690
  outputs: [
469
691
  {
470
- id: "result",
471
- name: "Result",
472
- type: "output",
473
- dataType: "json",
474
- description: "Processed data result"
692
+ id: 'result',
693
+ name: 'Result',
694
+ type: 'output',
695
+ dataType: 'json',
696
+ description: 'Processed data result'
475
697
  }
476
698
  ],
477
699
  configSchema: {
478
- operation: "select_keys",
479
- keys: [],
480
- filterKey: "",
481
- filterValue: ""
700
+ type: 'object',
701
+ properties: {
702
+ operation: {
703
+ type: 'string',
704
+ title: 'Operation',
705
+ description: 'Data operation to perform',
706
+ default: 'select_keys',
707
+ enum: ['select_keys', 'filter', 'sort', 'group']
708
+ },
709
+ keys: {
710
+ type: 'array',
711
+ title: 'Keys',
712
+ description: 'Keys to select or filter by',
713
+ default: []
714
+ },
715
+ filterKey: {
716
+ type: 'string',
717
+ title: 'Filter Key',
718
+ description: 'Key to filter by',
719
+ default: ''
720
+ },
721
+ filterValue: {
722
+ type: 'string',
723
+ title: 'Filter Value',
724
+ description: 'Value to filter by',
725
+ default: ''
726
+ }
727
+ }
482
728
  },
483
- tags: ["processing", "data", "operations"]
729
+ tags: ['processing', 'data', 'operations']
484
730
  },
485
731
  {
486
- id: uuidv4(),
487
- name: "DataFrame Operations",
488
- version: "1.0.0",
489
- description: "Perform operations on DataFrames",
490
- category: "processing",
491
- icon: "mdi:table-cog",
492
- color: "#84cc16",
732
+ id: 'sample-dataframe-operations',
733
+ name: 'DataFrame Operations',
734
+ version: '1.0.0',
735
+ description: 'Perform operations on DataFrames',
736
+ category: 'processing',
737
+ icon: 'mdi:table-cog',
738
+ color: '#84cc16',
493
739
  inputs: [
494
740
  {
495
- id: "dataframe",
496
- name: "DataFrame",
497
- type: "input",
498
- dataType: "json",
741
+ id: 'dataframe',
742
+ name: 'DataFrame',
743
+ type: 'input',
744
+ dataType: 'json',
499
745
  required: true,
500
- description: "DataFrame to operate on"
746
+ description: 'DataFrame to operate on'
501
747
  }
502
748
  ],
503
749
  outputs: [
504
750
  {
505
- id: "result",
506
- name: "Result",
507
- type: "output",
508
- dataType: "json",
509
- description: "Processed DataFrame"
751
+ id: 'result',
752
+ name: 'Result',
753
+ type: 'output',
754
+ dataType: 'json',
755
+ description: 'Processed DataFrame'
510
756
  }
511
757
  ],
512
758
  configSchema: {
513
- operation: "filter",
514
- columnName: "",
515
- filterValue: "",
516
- ascending: true
759
+ type: 'object',
760
+ properties: {
761
+ operation: {
762
+ type: 'string',
763
+ title: 'Operation',
764
+ description: 'DataFrame operation to perform',
765
+ default: 'filter',
766
+ enum: ['filter', 'sort', 'group', 'aggregate']
767
+ },
768
+ columnName: {
769
+ type: 'string',
770
+ title: 'Column Name',
771
+ description: 'Column to operate on',
772
+ default: ''
773
+ },
774
+ filterValue: {
775
+ type: 'string',
776
+ title: 'Filter Value',
777
+ description: 'Value to filter by',
778
+ default: ''
779
+ },
780
+ ascending: {
781
+ type: 'boolean',
782
+ title: 'Ascending',
783
+ description: 'Sort in ascending order',
784
+ default: true
785
+ }
786
+ }
517
787
  },
518
- tags: ["processing", "dataframe", "table", "operations"]
788
+ tags: ['processing', 'dataframe', 'table', 'operations']
519
789
  },
520
790
  {
521
- id: uuidv4(),
522
- name: "Regex Extractor",
523
- version: "1.0.0",
524
- description: "Extract patterns using regular expressions",
525
- category: "processing",
526
- icon: "mdi:regex",
527
- color: "#ec4899",
791
+ id: 'sample-regex-extractor',
792
+ name: 'Regex Extractor',
793
+ version: '1.0.0',
794
+ description: 'Extract patterns using regular expressions',
795
+ category: 'processing',
796
+ icon: 'mdi:regex',
797
+ color: '#ec4899',
528
798
  inputs: [
529
799
  {
530
- id: "text",
531
- name: "Text",
532
- type: "input",
533
- dataType: "text",
800
+ id: 'text',
801
+ name: 'Text',
802
+ type: 'input',
803
+ dataType: 'string',
534
804
  required: true,
535
- description: "Text to extract from"
805
+ description: 'Text to extract from'
536
806
  }
537
807
  ],
538
808
  outputs: [
539
809
  {
540
- id: "matches",
541
- name: "Matches",
542
- type: "output",
543
- dataType: "array",
544
- description: "Extracted matches"
810
+ id: 'matches',
811
+ name: 'Matches',
812
+ type: 'output',
813
+ dataType: 'string[]',
814
+ description: 'Extracted matches'
545
815
  }
546
816
  ],
547
817
  configSchema: {
548
- pattern: "",
549
- flags: "g"
818
+ type: 'object',
819
+ properties: {
820
+ pattern: {
821
+ type: 'string',
822
+ title: 'Pattern',
823
+ description: 'Regular expression pattern',
824
+ default: ''
825
+ },
826
+ flags: {
827
+ type: 'string',
828
+ title: 'Flags',
829
+ description: 'Regex flags',
830
+ default: 'g',
831
+ enum: ['g', 'i', 'm', 'gi', 'gm', 'im', 'gim']
832
+ }
833
+ }
550
834
  },
551
- tags: ["processing", "regex", "extract", "pattern"]
835
+ tags: ['processing', 'regex', 'extract', 'pattern']
552
836
  },
553
837
  {
554
- id: uuidv4(),
555
- name: "Smart Function",
556
- version: "1.0.0",
557
- description: "Use models to generate data processing functions",
558
- category: "processing",
559
- icon: "mdi:function-variant",
560
- color: "#06b6d4",
838
+ id: 'sample-smart-function',
839
+ name: 'Smart Function',
840
+ version: '1.0.0',
841
+ description: 'Use models to generate data processing functions',
842
+ category: 'processing',
843
+ icon: 'mdi:function-variant',
844
+ color: '#06b6d4',
561
845
  inputs: [
562
846
  {
563
- id: "data",
564
- name: "Data",
565
- type: "input",
566
- dataType: "json",
847
+ id: 'data',
848
+ name: 'Data',
849
+ type: 'input',
850
+ dataType: 'json',
567
851
  required: true,
568
- description: "Data to process"
852
+ description: 'Data to process'
569
853
  },
570
854
  {
571
- id: "model",
572
- name: "Model",
573
- type: "input",
574
- dataType: "json",
855
+ id: 'model',
856
+ name: 'Model',
857
+ type: 'input',
858
+ dataType: 'json',
575
859
  required: true,
576
- description: "Model for function generation"
860
+ description: 'Model for function generation'
577
861
  }
578
862
  ],
579
863
  outputs: [
580
864
  {
581
- id: "filtered_data",
582
- name: "Filtered Data",
583
- type: "output",
584
- dataType: "json",
585
- description: "Processed data"
865
+ id: 'filtered_data',
866
+ name: 'Filtered Data',
867
+ type: 'output',
868
+ dataType: 'json',
869
+ description: 'Processed data'
586
870
  },
587
871
  {
588
- id: "dataframe",
589
- name: "DataFrame",
590
- type: "output",
591
- dataType: "json",
592
- description: "Processed data as DataFrame"
872
+ id: 'dataframe',
873
+ name: 'DataFrame',
874
+ type: 'output',
875
+ dataType: 'json',
876
+ description: 'Processed data as DataFrame'
593
877
  }
594
878
  ],
595
879
  configSchema: {
596
- filter_instruction: "",
597
- sample_size: 1000,
598
- max_size: 10000
880
+ type: 'object',
881
+ properties: {
882
+ filter_instruction: {
883
+ type: 'string',
884
+ title: 'Filter Instruction',
885
+ description: 'Instruction for filtering data',
886
+ default: ''
887
+ },
888
+ sample_size: {
889
+ type: 'number',
890
+ title: 'Sample Size',
891
+ description: 'Number of samples to process',
892
+ default: 1000,
893
+ minimum: 1,
894
+ maximum: 10000
895
+ },
896
+ max_size: {
897
+ type: 'number',
898
+ title: 'Max Size',
899
+ description: 'Maximum size of filtered data',
900
+ default: 10000,
901
+ minimum: 1,
902
+ maximum: 100000
903
+ }
904
+ }
599
905
  },
600
- tags: ["processing", "smart", "function", "model"]
906
+ tags: ['processing', 'smart', 'function', 'model']
601
907
  },
602
908
  // ===== LOGIC CATEGORY =====
603
909
  {
604
- id: uuidv4(),
605
- name: "If-Else",
606
- version: "1.0.0",
607
- description: "Conditional routing based on text comparison",
608
- category: "logic",
609
- icon: "mdi:git-branch",
610
- color: "#06b6d4",
910
+ id: 'sample-if-else',
911
+ name: 'If-Else',
912
+ version: '1.0.0',
913
+ description: 'Conditional routing based on text comparison',
914
+ category: 'logic',
915
+ icon: 'mdi:git-branch',
916
+ color: '#06b6d4',
611
917
  inputs: [
612
918
  {
613
- id: "input_text",
614
- name: "Input Text",
615
- type: "input",
616
- dataType: "text",
919
+ id: 'input_text',
920
+ name: 'Input Text',
921
+ type: 'input',
922
+ dataType: 'string',
617
923
  required: true,
618
- description: "Text to evaluate"
924
+ description: 'Text to evaluate'
619
925
  },
620
926
  {
621
- id: "match_text",
622
- name: "Match Text",
623
- type: "input",
624
- dataType: "text",
927
+ id: 'match_text',
928
+ name: 'Match Text',
929
+ type: 'input',
930
+ dataType: 'string',
625
931
  required: true,
626
- description: "Text to compare against"
932
+ description: 'Text to compare against'
627
933
  }
628
934
  ],
629
935
  outputs: [
630
936
  {
631
- id: "true_result",
632
- name: "True",
633
- type: "output",
634
- dataType: "text",
635
- description: "Output when condition is true"
937
+ id: 'true_result',
938
+ name: 'True',
939
+ type: 'output',
940
+ dataType: 'string',
941
+ description: 'Output when condition is true'
636
942
  },
637
943
  {
638
- id: "false_result",
639
- name: "False",
640
- type: "output",
641
- dataType: "text",
642
- description: "Output when condition is false"
944
+ id: 'false_result',
945
+ name: 'False',
946
+ type: 'output',
947
+ dataType: 'string',
948
+ description: 'Output when condition is false'
643
949
  }
644
950
  ],
645
951
  configSchema: {
646
- operator: "equals",
647
- caseSensitive: false
952
+ type: 'object',
953
+ properties: {
954
+ operator: {
955
+ type: 'string',
956
+ title: 'Operator',
957
+ description: 'Comparison operator',
958
+ default: 'equals',
959
+ enum: ['equals', 'not_equals', 'greater_than', 'less_than', 'contains']
960
+ },
961
+ caseSensitive: {
962
+ type: 'boolean',
963
+ title: 'Case Sensitive',
964
+ description: 'Whether comparison is case sensitive',
965
+ default: false
966
+ }
967
+ }
648
968
  },
649
- tags: ["conditional", "logic", "routing", "if-else"]
969
+ tags: ['conditional', 'logic', 'routing', 'if-else']
650
970
  },
651
971
  {
652
- id: uuidv4(),
653
- name: "Loop",
654
- version: "1.0.0",
655
- description: "Iterate over data items",
656
- category: "logic",
657
- icon: "mdi:loop",
658
- color: "#8b5cf6",
972
+ id: 'sample-loop',
973
+ name: 'Loop',
974
+ version: '1.0.0',
975
+ description: 'Iterate over data items',
976
+ category: 'logic',
977
+ icon: 'mdi:loop',
978
+ color: '#8b5cf6',
659
979
  inputs: [
660
980
  {
661
- id: "data",
662
- name: "Data",
663
- type: "input",
664
- dataType: "array",
981
+ id: 'data',
982
+ name: 'Data',
983
+ type: 'input',
984
+ dataType: 'json[]',
665
985
  required: true,
666
- description: "Data to iterate over"
986
+ description: 'Data to iterate over'
667
987
  }
668
988
  ],
669
989
  outputs: [
670
990
  {
671
- id: "item",
672
- name: "Item",
673
- type: "output",
674
- dataType: "json",
675
- description: "Current item in iteration"
991
+ id: 'item',
992
+ name: 'Item',
993
+ type: 'output',
994
+ dataType: 'json',
995
+ description: 'Current item in iteration'
676
996
  },
677
997
  {
678
- id: "done",
679
- name: "Done",
680
- type: "output",
681
- dataType: "json",
682
- description: "Aggregated results when complete"
998
+ id: 'done',
999
+ name: 'Done',
1000
+ type: 'output',
1001
+ dataType: 'json',
1002
+ description: 'Aggregated results when complete'
683
1003
  }
684
1004
  ],
685
1005
  configSchema: {
686
- maxIterations: 100
1006
+ type: 'object',
1007
+ properties: {
1008
+ maxIterations: {
1009
+ type: 'number',
1010
+ title: 'Max Iterations',
1011
+ description: 'Maximum number of loop iterations',
1012
+ default: 100,
1013
+ minimum: 1,
1014
+ maximum: 1000
1015
+ }
1016
+ }
687
1017
  },
688
- tags: ["conditional", "logic", "loop", "iteration"]
1018
+ tags: ['conditional', 'logic', 'loop', 'iteration']
689
1019
  },
690
1020
  // ===== DATA CATEGORY =====
691
1021
  {
692
- id: uuidv4(),
693
- name: "Data to DataFrame",
694
- version: "1.0.0",
695
- description: "Convert Data objects to DataFrame",
696
- category: "data",
697
- icon: "mdi:table-plus",
698
- color: "#10b981",
1022
+ id: 'sample-data-to-dataframe',
1023
+ name: 'Data to DataFrame',
1024
+ version: '1.0.0',
1025
+ description: 'Convert Data objects to DataFrame',
1026
+ category: 'data',
1027
+ icon: 'mdi:table-plus',
1028
+ color: '#10b981',
699
1029
  inputs: [
700
1030
  {
701
- id: "data_list",
702
- name: "Data List",
703
- type: "input",
704
- dataType: "array",
1031
+ id: 'data_list',
1032
+ name: 'Data List',
1033
+ type: 'input',
1034
+ dataType: 'json[]',
705
1035
  required: true,
706
- description: "List of Data objects to convert"
1036
+ description: 'List of Data objects to convert'
707
1037
  }
708
1038
  ],
709
1039
  outputs: [
710
1040
  {
711
- id: "dataframe",
712
- name: "DataFrame",
713
- type: "output",
714
- dataType: "json",
715
- description: "Converted DataFrame"
1041
+ id: 'dataframe',
1042
+ name: 'DataFrame',
1043
+ type: 'output',
1044
+ dataType: 'json',
1045
+ description: 'Converted DataFrame'
716
1046
  }
717
1047
  ],
718
1048
  configSchema: {
719
- includeText: true
1049
+ type: 'object',
1050
+ properties: {
1051
+ includeText: {
1052
+ type: 'boolean',
1053
+ title: 'Include Text',
1054
+ description: 'Include text in DataFrame conversion',
1055
+ default: true
1056
+ }
1057
+ }
720
1058
  },
721
- tags: ["data", "dataframe", "convert", "table"]
1059
+ tags: ['data', 'dataframe', 'convert', 'table']
722
1060
  },
723
1061
  {
724
- id: uuidv4(),
725
- name: "Message to Data",
726
- version: "1.0.0",
727
- description: "Convert Message objects to Data objects",
728
- category: "data",
729
- icon: "mdi:message-arrow-right",
730
- color: "#f59e0b",
1062
+ id: 'sample-message-to-data',
1063
+ name: 'Message to Data',
1064
+ version: '1.0.0',
1065
+ description: 'Convert Message objects to Data objects',
1066
+ category: 'data',
1067
+ icon: 'mdi:message-arrow-right',
1068
+ color: '#f59e0b',
731
1069
  inputs: [
732
1070
  {
733
- id: "message",
734
- name: "Message",
735
- type: "input",
736
- dataType: "text",
1071
+ id: 'message',
1072
+ name: 'Message',
1073
+ type: 'input',
1074
+ dataType: 'string',
737
1075
  required: true,
738
- description: "Message to convert"
1076
+ description: 'Message to convert'
739
1077
  }
740
1078
  ],
741
1079
  outputs: [
742
1080
  {
743
- id: "data",
744
- name: "Data",
745
- type: "output",
746
- dataType: "json",
747
- description: "Converted Data object"
1081
+ id: 'data',
1082
+ name: 'Data',
1083
+ type: 'output',
1084
+ dataType: 'json',
1085
+ description: 'Converted Data object'
748
1086
  }
749
1087
  ],
750
- configSchema: {},
751
- tags: ["data", "message", "convert"]
1088
+ configSchema: {
1089
+ type: 'object',
1090
+ properties: {
1091
+ format: {
1092
+ type: 'string',
1093
+ title: 'Format',
1094
+ description: 'Input data format',
1095
+ default: 'auto',
1096
+ enum: ['auto', 'json', 'csv', 'xml']
1097
+ }
1098
+ }
1099
+ },
1100
+ tags: ['data', 'message', 'convert']
752
1101
  },
753
1102
  {
754
- id: uuidv4(),
755
- name: "Save to File",
756
- version: "1.0.0",
757
- description: "Save data to various file formats",
758
- category: "data",
759
- icon: "mdi:content-save",
760
- color: "#ef4444",
1103
+ id: 'sample-save-to-file',
1104
+ name: 'Save to File',
1105
+ version: '1.0.0',
1106
+ description: 'Save data to various file formats',
1107
+ category: 'data',
1108
+ icon: 'mdi:content-save',
1109
+ color: '#ef4444',
761
1110
  inputs: [
762
1111
  {
763
- id: "data",
764
- name: "Data",
765
- type: "input",
766
- dataType: "json",
1112
+ id: 'data',
1113
+ name: 'Data',
1114
+ type: 'input',
1115
+ dataType: 'json',
767
1116
  required: true,
768
- description: "Data to save"
1117
+ description: 'Data to save'
769
1118
  }
770
1119
  ],
771
1120
  outputs: [
772
1121
  {
773
- id: "confirmation",
774
- name: "Confirmation",
775
- type: "output",
776
- dataType: "text",
777
- description: "Save confirmation message"
1122
+ id: 'confirmation',
1123
+ name: 'Confirmation',
1124
+ type: 'output',
1125
+ dataType: 'string',
1126
+ description: 'Save confirmation message'
778
1127
  }
779
1128
  ],
780
1129
  configSchema: {
781
- fileFormat: "json",
782
- filePath: "./output/data.json"
1130
+ type: 'object',
1131
+ properties: {
1132
+ fileFormat: {
1133
+ type: 'string',
1134
+ title: 'File Format',
1135
+ description: 'Output file format',
1136
+ default: 'json',
1137
+ enum: ['json', 'csv', 'txt', 'xml']
1138
+ },
1139
+ filePath: {
1140
+ type: 'string',
1141
+ title: 'File Path',
1142
+ description: 'Output file path',
1143
+ default: './output/data.json'
1144
+ }
1145
+ }
783
1146
  },
784
- tags: ["data", "save", "file", "export"]
1147
+ tags: ['data', 'save', 'file', 'export']
785
1148
  },
786
1149
  // ===== TOOLS CATEGORY =====
787
1150
  {
788
- id: uuidv4(),
789
- name: "Calculator",
790
- version: "1.0.0",
791
- description: "Perform mathematical calculations",
792
- category: "tools",
793
- icon: "mdi:calculator",
794
- color: "#6366f1",
1151
+ id: 'sample-http-request',
1152
+ name: 'HTTP Request',
1153
+ type: 'tool',
1154
+ supportedTypes: ['tool', 'default'],
1155
+ version: '1.0.0',
1156
+ description: 'Advanced HTTP client with full request/response handling, similar to n8n',
1157
+ category: 'tools',
1158
+ icon: 'mdi:web',
1159
+ color: '#3b82f6',
1160
+ inputs: [
1161
+ {
1162
+ id: 'url',
1163
+ name: 'URL',
1164
+ type: 'input',
1165
+ dataType: 'string',
1166
+ required: false,
1167
+ description: 'Request URL (can be set in config or via input)'
1168
+ },
1169
+ {
1170
+ id: 'headers',
1171
+ name: 'Headers',
1172
+ type: 'input',
1173
+ dataType: 'json',
1174
+ required: false,
1175
+ description: 'Additional HTTP headers as JSON object'
1176
+ },
1177
+ {
1178
+ id: 'body',
1179
+ name: 'Body',
1180
+ type: 'input',
1181
+ dataType: 'mixed',
1182
+ required: false,
1183
+ description: 'Request body (JSON, string, or form data)'
1184
+ },
1185
+ {
1186
+ id: 'query_params',
1187
+ name: 'Query Parameters',
1188
+ type: 'input',
1189
+ dataType: 'json',
1190
+ required: false,
1191
+ description: 'URL query parameters as JSON object'
1192
+ }
1193
+ ],
1194
+ outputs: [
1195
+ {
1196
+ id: 'response',
1197
+ name: 'Response',
1198
+ type: 'output',
1199
+ dataType: 'json',
1200
+ description: 'Complete HTTP response object'
1201
+ },
1202
+ {
1203
+ id: 'body',
1204
+ name: 'Body',
1205
+ type: 'output',
1206
+ dataType: 'mixed',
1207
+ description: 'Response body (parsed JSON or raw text)'
1208
+ },
1209
+ {
1210
+ id: 'headers',
1211
+ name: 'Headers',
1212
+ type: 'output',
1213
+ dataType: 'json',
1214
+ description: 'Response headers as JSON object'
1215
+ },
1216
+ {
1217
+ id: 'status_code',
1218
+ name: 'Status Code',
1219
+ type: 'output',
1220
+ dataType: 'number',
1221
+ description: 'HTTP status code'
1222
+ },
1223
+ {
1224
+ id: 'status_text',
1225
+ name: 'Status Text',
1226
+ type: 'output',
1227
+ dataType: 'string',
1228
+ description: 'HTTP status text'
1229
+ },
1230
+ {
1231
+ id: 'tool',
1232
+ name: 'Tool Interface',
1233
+ type: 'output',
1234
+ dataType: 'tool',
1235
+ description: 'Tool interface for agent connections - provides tool metadata and callable interface'
1236
+ }
1237
+ ],
1238
+ configSchema: {
1239
+ type: 'object',
1240
+ properties: {
1241
+ nodeType: {
1242
+ type: 'string',
1243
+ title: 'Node Type',
1244
+ description: 'Choose the visual representation for this node',
1245
+ default: 'tool',
1246
+ enum: ['tool', 'default'],
1247
+ enumNames: ['Tool Node (with metadata port)', 'Default Node (standard ports)']
1248
+ },
1249
+ method: {
1250
+ type: 'string',
1251
+ title: 'HTTP Method',
1252
+ description: 'HTTP request method',
1253
+ default: 'GET',
1254
+ enum: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']
1255
+ },
1256
+ url: {
1257
+ type: 'string',
1258
+ title: 'URL',
1259
+ description: 'Request URL (overridden by input if provided)',
1260
+ default: 'https://api.example.com/endpoint'
1261
+ },
1262
+ authentication: {
1263
+ type: 'string',
1264
+ title: 'Authentication',
1265
+ description: 'Authentication method',
1266
+ default: 'none',
1267
+ enum: ['none', 'basic', 'bearer', 'api_key', 'oauth2']
1268
+ },
1269
+ auth_username: {
1270
+ type: 'string',
1271
+ title: 'Username',
1272
+ description: 'Username for basic authentication',
1273
+ default: ''
1274
+ },
1275
+ auth_password: {
1276
+ type: 'string',
1277
+ title: 'Password',
1278
+ description: 'Password for basic authentication',
1279
+ default: '',
1280
+ format: 'password'
1281
+ },
1282
+ auth_token: {
1283
+ type: 'string',
1284
+ title: 'Bearer Token',
1285
+ description: 'Bearer token for authentication',
1286
+ default: '',
1287
+ format: 'password'
1288
+ },
1289
+ api_key_header: {
1290
+ type: 'string',
1291
+ title: 'API Key Header',
1292
+ description: 'Header name for API key authentication',
1293
+ default: 'X-API-Key'
1294
+ },
1295
+ api_key_value: {
1296
+ type: 'string',
1297
+ title: 'API Key Value',
1298
+ description: 'API key value',
1299
+ default: '',
1300
+ format: 'password'
1301
+ },
1302
+ content_type: {
1303
+ type: 'string',
1304
+ title: 'Content Type',
1305
+ description: 'Request content type',
1306
+ default: 'application/json',
1307
+ enum: [
1308
+ 'application/json',
1309
+ 'application/x-www-form-urlencoded',
1310
+ 'multipart/form-data',
1311
+ 'text/plain',
1312
+ 'text/xml',
1313
+ 'application/xml'
1314
+ ]
1315
+ },
1316
+ timeout: {
1317
+ type: 'integer',
1318
+ title: 'Timeout (seconds)',
1319
+ description: 'Request timeout in seconds',
1320
+ default: 30,
1321
+ minimum: 1,
1322
+ maximum: 300
1323
+ },
1324
+ follow_redirects: {
1325
+ type: 'boolean',
1326
+ title: 'Follow Redirects',
1327
+ description: 'Automatically follow HTTP redirects',
1328
+ default: true
1329
+ },
1330
+ ssl_verify: {
1331
+ type: 'boolean',
1332
+ title: 'Verify SSL',
1333
+ description: 'Verify SSL certificates',
1334
+ default: true
1335
+ },
1336
+ retry_attempts: {
1337
+ type: 'integer',
1338
+ title: 'Retry Attempts',
1339
+ description: 'Number of retry attempts on failure',
1340
+ default: 0,
1341
+ minimum: 0,
1342
+ maximum: 5
1343
+ },
1344
+ retry_delay: {
1345
+ type: 'integer',
1346
+ title: 'Retry Delay (ms)',
1347
+ description: 'Delay between retry attempts in milliseconds',
1348
+ default: 1000,
1349
+ minimum: 100,
1350
+ maximum: 10000
1351
+ },
1352
+ response_format: {
1353
+ type: 'string',
1354
+ title: 'Response Format',
1355
+ description: 'How to parse the response body',
1356
+ default: 'auto',
1357
+ enum: ['auto', 'json', 'text', 'binary', 'xml']
1358
+ },
1359
+ include_response_headers: {
1360
+ type: 'boolean',
1361
+ title: 'Include Response Headers',
1362
+ description: 'Include response headers in output',
1363
+ default: true
1364
+ },
1365
+ custom_headers: {
1366
+ type: 'string',
1367
+ title: 'Custom Headers (JSON)',
1368
+ description: 'Custom headers as JSON string',
1369
+ default: '{}',
1370
+ format: 'multiline'
1371
+ },
1372
+ user_agent: {
1373
+ type: 'string',
1374
+ title: 'User Agent',
1375
+ description: 'Custom User-Agent header',
1376
+ default: 'FlowDrop-HTTP-Client/1.0'
1377
+ },
1378
+ proxy_url: {
1379
+ type: 'string',
1380
+ title: 'Proxy URL',
1381
+ description: 'HTTP proxy URL (optional)',
1382
+ default: ''
1383
+ },
1384
+ ignore_ssl_issues: {
1385
+ type: 'boolean',
1386
+ title: 'Ignore SSL Issues',
1387
+ description: 'Ignore SSL certificate errors (not recommended for production)',
1388
+ default: false
1389
+ }
1390
+ }
1391
+ },
1392
+ tags: ['tools', 'http', 'api', 'request', 'n8n', 'automation', 'integration']
1393
+ },
1394
+ {
1395
+ id: 'sample-json',
1396
+ name: 'JSON',
1397
+ type: 'tool',
1398
+ supportedTypes: ['tool', 'default'],
1399
+ version: '1.0.0',
1400
+ description: "Parse, manipulate, and transform JSON data like n8n's JSON node",
1401
+ category: 'tools',
1402
+ icon: 'mdi:code-json',
1403
+ color: '#f59e0b',
795
1404
  inputs: [
796
1405
  {
797
- id: "expression",
798
- name: "Expression",
799
- type: "input",
800
- dataType: "text",
1406
+ id: 'json_input',
1407
+ name: 'JSON Input',
1408
+ type: 'input',
1409
+ dataType: 'mixed',
1410
+ required: false,
1411
+ description: 'JSON data to process'
1412
+ }
1413
+ ],
1414
+ outputs: [
1415
+ {
1416
+ id: 'json_output',
1417
+ name: 'JSON Output',
1418
+ type: 'output',
1419
+ dataType: 'json',
1420
+ description: 'Processed JSON data'
1421
+ },
1422
+ {
1423
+ id: 'tool',
1424
+ name: 'Tool Interface',
1425
+ type: 'output',
1426
+ dataType: 'tool',
1427
+ description: 'Tool interface for agent connections - provides tool metadata and callable interface'
1428
+ }
1429
+ ],
1430
+ configSchema: {
1431
+ type: 'object',
1432
+ properties: {
1433
+ nodeType: {
1434
+ type: 'string',
1435
+ title: 'Node Type',
1436
+ description: 'Choose the visual representation for this node',
1437
+ default: 'tool',
1438
+ enum: ['tool', 'default'],
1439
+ enumNames: ['Tool Node (with metadata port)', 'Default Node (standard ports)']
1440
+ },
1441
+ operation: {
1442
+ type: 'string',
1443
+ title: 'Operation',
1444
+ description: 'JSON operation to perform',
1445
+ default: 'parse',
1446
+ enum: ['parse', 'stringify', 'extract', 'merge', 'filter', 'transform', 'validate']
1447
+ },
1448
+ json_path: {
1449
+ type: 'string',
1450
+ title: 'JSON Path',
1451
+ description: 'JSONPath expression for extraction (e.g., $.data.items[*].name)',
1452
+ default: '$'
1453
+ },
1454
+ merge_strategy: {
1455
+ type: 'string',
1456
+ title: 'Merge Strategy',
1457
+ description: 'How to merge JSON objects',
1458
+ default: 'deep',
1459
+ enum: ['shallow', 'deep', 'overwrite']
1460
+ },
1461
+ filter_expression: {
1462
+ type: 'string',
1463
+ title: 'Filter Expression',
1464
+ description: 'JavaScript expression for filtering (e.g., item.price > 100)',
1465
+ default: ''
1466
+ },
1467
+ transform_expression: {
1468
+ type: 'string',
1469
+ title: 'Transform Expression',
1470
+ description: 'JavaScript expression for transformation',
1471
+ default: '',
1472
+ format: 'multiline'
1473
+ },
1474
+ pretty_print: {
1475
+ type: 'boolean',
1476
+ title: 'Pretty Print',
1477
+ description: 'Format JSON output with indentation',
1478
+ default: true
1479
+ },
1480
+ validate_schema: {
1481
+ type: 'string',
1482
+ title: 'JSON Schema',
1483
+ description: 'JSON Schema for validation (optional)',
1484
+ default: '',
1485
+ format: 'multiline'
1486
+ }
1487
+ }
1488
+ },
1489
+ tags: ['tools', 'json', 'data', 'transform', 'n8n', 'parse']
1490
+ },
1491
+ {
1492
+ id: 'sample-set',
1493
+ name: 'Set',
1494
+ type: 'tool',
1495
+ supportedTypes: ['tool', 'default'],
1496
+ version: '1.0.0',
1497
+ description: "Set and manipulate data values like n8n's Set node",
1498
+ category: 'tools',
1499
+ icon: 'mdi:variable',
1500
+ color: '#10b981',
1501
+ inputs: [
1502
+ {
1503
+ id: 'input_data',
1504
+ name: 'Input Data',
1505
+ type: 'input',
1506
+ dataType: 'mixed',
1507
+ required: false,
1508
+ description: 'Input data to process'
1509
+ }
1510
+ ],
1511
+ outputs: [
1512
+ {
1513
+ id: 'output_data',
1514
+ name: 'Output Data',
1515
+ type: 'output',
1516
+ dataType: 'json',
1517
+ description: 'Processed output data'
1518
+ },
1519
+ {
1520
+ id: 'tool',
1521
+ name: 'Tool Interface',
1522
+ type: 'output',
1523
+ dataType: 'tool',
1524
+ description: 'Tool interface for agent connections - provides tool metadata and callable interface'
1525
+ }
1526
+ ],
1527
+ configSchema: {
1528
+ type: 'object',
1529
+ properties: {
1530
+ nodeType: {
1531
+ type: 'string',
1532
+ title: 'Node Type',
1533
+ description: 'Choose the visual representation for this node',
1534
+ default: 'tool',
1535
+ enum: ['tool', 'default'],
1536
+ enumNames: ['Tool Node (with metadata port)', 'Default Node (standard ports)']
1537
+ },
1538
+ operation: {
1539
+ type: 'string',
1540
+ title: 'Operation',
1541
+ description: 'Set operation to perform',
1542
+ default: 'set',
1543
+ enum: ['set', 'append', 'prepend', 'remove', 'rename', 'copy', 'move']
1544
+ },
1545
+ keep_only_set: {
1546
+ type: 'boolean',
1547
+ title: 'Keep Only Set Fields',
1548
+ description: 'Only keep the fields that are being set',
1549
+ default: false
1550
+ },
1551
+ values: {
1552
+ type: 'string',
1553
+ title: 'Values (JSON)',
1554
+ description: 'Values to set as JSON object',
1555
+ default: '{\n "key1": "value1",\n "key2": "{{ $json.input_field }}",\n "timestamp": "{{ new Date().toISOString() }}"\n}',
1556
+ format: 'multiline'
1557
+ },
1558
+ include_binary_data: {
1559
+ type: 'boolean',
1560
+ title: 'Include Binary Data',
1561
+ description: 'Include binary data in output',
1562
+ default: false
1563
+ },
1564
+ dot_notation: {
1565
+ type: 'boolean',
1566
+ title: 'Use Dot Notation',
1567
+ description: 'Support dot notation for nested properties (e.g., user.name)',
1568
+ default: true
1569
+ }
1570
+ }
1571
+ },
1572
+ tags: ['tools', 'set', 'data', 'transform', 'n8n', 'variables']
1573
+ },
1574
+ {
1575
+ id: 'sample-calculator',
1576
+ name: 'Calculator',
1577
+ type: 'tool',
1578
+ supportedTypes: ['tool', 'default'],
1579
+ version: '1.0.0',
1580
+ description: 'Perform mathematical calculations',
1581
+ category: 'tools',
1582
+ icon: 'mdi:calculator',
1583
+ color: '#6366f1',
1584
+ inputs: [
1585
+ {
1586
+ id: 'expression',
1587
+ name: 'Expression',
1588
+ type: 'input',
1589
+ dataType: 'string',
801
1590
  required: true,
802
- description: "Mathematical expression to evaluate"
1591
+ description: 'Mathematical expression to evaluate'
1592
+ }
1593
+ ],
1594
+ outputs: [
1595
+ {
1596
+ id: 'result',
1597
+ name: 'Result',
1598
+ type: 'output',
1599
+ dataType: 'number',
1600
+ description: 'Calculation result'
1601
+ },
1602
+ {
1603
+ id: 'tool',
1604
+ name: 'Tool Interface',
1605
+ type: 'output',
1606
+ dataType: 'tool',
1607
+ description: 'Tool interface for agent connections - provides tool metadata and callable interface'
1608
+ }
1609
+ ],
1610
+ configSchema: {
1611
+ type: 'object',
1612
+ properties: {
1613
+ nodeType: {
1614
+ type: 'string',
1615
+ title: 'Node Type',
1616
+ description: 'Choose the visual representation for this node',
1617
+ default: 'tool',
1618
+ enum: ['tool', 'default'],
1619
+ enumNames: ['Tool Node (with metadata port)', 'Default Node (standard ports)']
1620
+ },
1621
+ operation: {
1622
+ type: 'string',
1623
+ title: 'Operation',
1624
+ description: 'Mathematical operation to perform',
1625
+ default: 'add',
1626
+ enum: [
1627
+ 'add',
1628
+ 'subtract',
1629
+ 'multiply',
1630
+ 'divide',
1631
+ 'power',
1632
+ 'sqrt',
1633
+ 'average',
1634
+ 'min',
1635
+ 'max',
1636
+ 'median',
1637
+ 'mode'
1638
+ ]
1639
+ },
1640
+ precision: {
1641
+ type: 'integer',
1642
+ title: 'Precision',
1643
+ description: 'Number of decimal places',
1644
+ default: 2,
1645
+ minimum: 0,
1646
+ maximum: 10
1647
+ }
1648
+ }
1649
+ },
1650
+ tags: ['tools', 'calculator', 'math', 'compute']
1651
+ },
1652
+ {
1653
+ id: 'sample-date-time',
1654
+ name: 'Date & Time',
1655
+ type: 'tool',
1656
+ supportedTypes: ['tool', 'default'],
1657
+ version: '1.0.0',
1658
+ description: 'Handle date and time operations',
1659
+ category: 'tools',
1660
+ icon: 'mdi:calendar-clock',
1661
+ color: '#84cc16',
1662
+ inputs: [
1663
+ {
1664
+ id: 'date',
1665
+ name: 'Date',
1666
+ type: 'input',
1667
+ dataType: 'string',
1668
+ required: false,
1669
+ description: 'Input date string'
803
1670
  }
804
1671
  ],
805
1672
  outputs: [
806
1673
  {
807
- id: "result",
808
- name: "Result",
809
- type: "output",
810
- dataType: "number",
811
- description: "Calculation result"
1674
+ id: 'formatted_date',
1675
+ name: 'Formatted Date',
1676
+ type: 'output',
1677
+ dataType: 'string',
1678
+ description: 'Formatted date string'
1679
+ },
1680
+ {
1681
+ id: 'timestamp',
1682
+ name: 'Timestamp',
1683
+ type: 'output',
1684
+ dataType: 'number',
1685
+ description: 'Unix timestamp'
1686
+ },
1687
+ {
1688
+ id: 'tool',
1689
+ name: 'Tool Interface',
1690
+ type: 'output',
1691
+ dataType: 'tool',
1692
+ description: 'Tool interface for agent connections - provides tool metadata and callable interface'
812
1693
  }
813
1694
  ],
814
1695
  configSchema: {
815
- precision: 2
1696
+ type: 'object',
1697
+ properties: {
1698
+ nodeType: {
1699
+ type: 'string',
1700
+ title: 'Node Type',
1701
+ description: 'Choose the visual representation for this node',
1702
+ default: 'tool',
1703
+ enum: ['tool', 'default'],
1704
+ enumNames: ['Tool Node (with metadata port)', 'Default Node (standard ports)']
1705
+ },
1706
+ format: {
1707
+ type: 'string',
1708
+ title: 'Format',
1709
+ description: 'Date/time format',
1710
+ default: 'YYYY-MM-DD'
1711
+ },
1712
+ timezone: {
1713
+ type: 'string',
1714
+ title: 'Timezone',
1715
+ description: 'Timezone for date operations',
1716
+ default: 'UTC'
1717
+ }
1718
+ }
816
1719
  },
817
- tags: ["tools", "calculator", "math", "compute"]
1720
+ tags: ['tools', 'date', 'time', 'format']
818
1721
  },
819
1722
  {
820
- id: uuidv4(),
821
- name: "Date & Time",
822
- version: "1.0.0",
823
- description: "Handle date and time operations",
824
- category: "tools",
825
- icon: "mdi:calendar-clock",
826
- color: "#84cc16",
1723
+ id: 'sample-notes',
1724
+ name: 'Notes',
1725
+ type: 'note',
1726
+ supportedTypes: ['note'],
1727
+ version: '1.0.0',
1728
+ description: 'Add documentation and comments to your workflow with Markdown support',
1729
+ category: 'tools',
1730
+ icon: 'mdi:note-text',
1731
+ color: '#fbbf24',
1732
+ inputs: [],
1733
+ outputs: [],
1734
+ configSchema: {
1735
+ type: 'object',
1736
+ properties: {
1737
+ content: {
1738
+ type: 'string',
1739
+ title: 'Note Content',
1740
+ description: 'Documentation or comment text (supports Markdown)',
1741
+ default: '# Workflow Notes\n\nAdd your documentation here using **Markdown** formatting.\n\n## Features\n- Supports **bold** and *italic* text\n- Create lists and code blocks\n- Add links and more!'
1742
+ },
1743
+ noteType: {
1744
+ type: 'string',
1745
+ title: 'Note Type',
1746
+ description: 'Visual style and color of the note',
1747
+ default: 'info',
1748
+ enum: ['info', 'warning', 'success', 'error', 'note']
1749
+ }
1750
+ }
1751
+ },
1752
+ tags: ['tools', 'notes', 'documentation', 'comments', 'markdown']
1753
+ },
1754
+ {
1755
+ id: 'sample-simple-node',
1756
+ name: 'Simple Node',
1757
+ type: 'tool',
1758
+ supportedTypes: ['tool', 'default'],
1759
+ version: '1.0.0',
1760
+ description: 'A simple node with optional input and output ports',
1761
+ category: 'tools',
1762
+ icon: 'mdi:square',
1763
+ color: '#6366f1',
827
1764
  inputs: [
828
1765
  {
829
- id: "date",
830
- name: "Date",
831
- type: "input",
832
- dataType: "text",
1766
+ id: 'input',
1767
+ name: 'Input',
1768
+ type: 'input',
1769
+ dataType: 'mixed',
833
1770
  required: false,
834
- description: "Input date string"
1771
+ description: 'Optional input data'
835
1772
  }
836
1773
  ],
837
1774
  outputs: [
838
1775
  {
839
- id: "formatted_date",
840
- name: "Formatted Date",
841
- type: "output",
842
- dataType: "text",
843
- description: "Formatted date string"
1776
+ id: 'output',
1777
+ name: 'Output',
1778
+ type: 'output',
1779
+ dataType: 'mixed',
1780
+ description: 'Optional output data'
844
1781
  },
845
1782
  {
846
- id: "timestamp",
847
- name: "Timestamp",
848
- type: "output",
849
- dataType: "number",
850
- description: "Unix timestamp"
1783
+ id: 'tool',
1784
+ name: 'Tool Interface',
1785
+ type: 'output',
1786
+ dataType: 'tool',
1787
+ description: 'Tool interface for agent connections - provides tool metadata and callable interface'
851
1788
  }
852
1789
  ],
853
1790
  configSchema: {
854
- format: "YYYY-MM-DD",
855
- timezone: "UTC"
1791
+ type: 'object',
1792
+ properties: {
1793
+ nodeType: {
1794
+ type: 'string',
1795
+ title: 'Node Type',
1796
+ description: 'Choose the visual representation for this node',
1797
+ default: 'tool',
1798
+ enum: ['tool', 'default'],
1799
+ enumNames: ['Tool (specialized for agent tools)', 'Default (standard workflow node)']
1800
+ },
1801
+ icon: {
1802
+ type: 'string',
1803
+ title: 'Icon',
1804
+ description: 'Icon to display in the node (Iconify icon name)',
1805
+ default: 'mdi:square'
1806
+ },
1807
+ color: {
1808
+ type: 'string',
1809
+ title: 'Color',
1810
+ description: 'Background color of the node',
1811
+ default: '#6366f1'
1812
+ },
1813
+ layout: {
1814
+ type: 'string',
1815
+ title: 'Layout',
1816
+ description: 'Layout style of the simple node',
1817
+ default: 'normal',
1818
+ enum: ['compact', 'normal']
1819
+ },
1820
+ label: {
1821
+ type: 'string',
1822
+ title: 'Label',
1823
+ description: 'Custom label for the node',
1824
+ default: 'Simple Node'
1825
+ },
1826
+ description: {
1827
+ type: 'string',
1828
+ title: 'Description',
1829
+ description: 'Description of what this simple node does',
1830
+ default: '',
1831
+ format: 'multiline'
1832
+ }
1833
+ }
856
1834
  },
857
- tags: ["tools", "date", "time", "format"]
1835
+ tags: ['tools', 'simple', 'custom', 'visual', 'node']
1836
+ },
1837
+ {
1838
+ id: 'sample-trigger-action',
1839
+ name: 'Trigger Action',
1840
+ type: 'simple',
1841
+ supportedTypes: ['simple', 'square', 'default'],
1842
+ version: '1.0.0',
1843
+ description: 'An action that can be triggered and also processes data',
1844
+ category: 'tools',
1845
+ icon: 'mdi:lightning-bolt',
1846
+ color: '#f59e0b',
1847
+ inputs: [
1848
+ {
1849
+ id: 'trigger',
1850
+ name: 'Trigger',
1851
+ type: 'input',
1852
+ dataType: 'trigger',
1853
+ required: false,
1854
+ description: 'Control flow trigger to execute this action'
1855
+ },
1856
+ {
1857
+ id: 'data',
1858
+ name: 'Data',
1859
+ type: 'input',
1860
+ dataType: 'string',
1861
+ required: false,
1862
+ description: 'Optional data input to process'
1863
+ }
1864
+ ],
1865
+ outputs: [
1866
+ {
1867
+ id: 'trigger',
1868
+ name: 'Trigger',
1869
+ type: 'output',
1870
+ dataType: 'trigger',
1871
+ description: 'Control flow trigger after execution'
1872
+ },
1873
+ {
1874
+ id: 'result',
1875
+ name: 'Result',
1876
+ type: 'output',
1877
+ dataType: 'string',
1878
+ description: 'Processed data output'
1879
+ }
1880
+ ],
1881
+ configSchema: {
1882
+ type: 'object',
1883
+ properties: {
1884
+ nodeType: {
1885
+ type: 'string',
1886
+ title: 'Node Type',
1887
+ description: 'Choose the visual representation for this node',
1888
+ default: 'simple',
1889
+ enum: ['simple', 'square', 'default'],
1890
+ enumNames: [
1891
+ 'Simple (compact layout)',
1892
+ 'Square (square layout)',
1893
+ 'Default (standard workflow node)'
1894
+ ]
1895
+ },
1896
+ action: {
1897
+ type: 'string',
1898
+ title: 'Action',
1899
+ description: 'The action to perform when triggered',
1900
+ default: 'Process data'
1901
+ }
1902
+ }
1903
+ },
1904
+ tags: ['trigger', 'action', 'control-flow']
858
1905
  },
859
1906
  // ===== EMBEDDINGS CATEGORY =====
860
1907
  {
861
- id: uuidv4(),
862
- name: "OpenAI Embeddings",
863
- version: "1.0.0",
864
- description: "Generate embeddings using OpenAI models",
865
- category: "embeddings",
866
- icon: "mdi:vector-point",
867
- color: "#10a37f",
1908
+ id: 'sample-openai-embeddings',
1909
+ name: 'OpenAI Embeddings',
1910
+ version: '1.0.0',
1911
+ description: 'Generate embeddings using OpenAI models',
1912
+ category: 'embeddings',
1913
+ icon: 'mdi:vector-point',
1914
+ color: '#10a37f',
868
1915
  inputs: [
869
1916
  {
870
- id: "text",
871
- name: "Text",
872
- type: "input",
873
- dataType: "text",
1917
+ id: 'text',
1918
+ name: 'Text',
1919
+ type: 'input',
1920
+ dataType: 'string',
874
1921
  required: true,
875
- description: "Text to embed"
1922
+ description: 'Text to embed'
876
1923
  }
877
1924
  ],
878
1925
  outputs: [
879
1926
  {
880
- id: "embeddings",
881
- name: "Embeddings",
882
- type: "output",
883
- dataType: "array",
884
- description: "Generated embeddings"
1927
+ id: 'embeddings',
1928
+ name: 'Embeddings',
1929
+ type: 'output',
1930
+ dataType: 'number[]',
1931
+ description: 'Generated embeddings'
885
1932
  }
886
1933
  ],
887
1934
  configSchema: {
888
- model: "text-embedding-3-small",
889
- apiKey: ""
1935
+ type: 'object',
1936
+ properties: {
1937
+ model: {
1938
+ type: 'string',
1939
+ title: 'Model',
1940
+ description: 'OpenAI embedding model',
1941
+ default: 'text-embedding-3-small',
1942
+ enum: ['text-embedding-3-small', 'text-embedding-3-large']
1943
+ },
1944
+ apiKey: {
1945
+ type: 'string',
1946
+ title: 'API Key',
1947
+ description: 'OpenAI API key',
1948
+ default: ''
1949
+ }
1950
+ }
890
1951
  },
891
- tags: ["embeddings", "openai", "vector"]
1952
+ tags: ['embeddings', 'openai', 'vector']
892
1953
  },
893
1954
  {
894
- id: uuidv4(),
895
- name: "HuggingFace Embeddings",
896
- version: "1.0.0",
897
- description: "Generate embeddings using HuggingFace models",
898
- category: "embeddings",
899
- icon: "mdi:vector-square",
900
- color: "#f59e0b",
1955
+ id: 'sample-huggingface-embeddings',
1956
+ name: 'HuggingFace Embeddings',
1957
+ version: '1.0.0',
1958
+ description: 'Generate embeddings using HuggingFace models',
1959
+ category: 'embeddings',
1960
+ icon: 'mdi:vector-square',
1961
+ color: '#f59e0b',
901
1962
  inputs: [
902
1963
  {
903
- id: "text",
904
- name: "Text",
905
- type: "input",
906
- dataType: "text",
1964
+ id: 'text',
1965
+ name: 'Text',
1966
+ type: 'input',
1967
+ dataType: 'string',
907
1968
  required: true,
908
- description: "Text to embed"
1969
+ description: 'Text to embed'
909
1970
  }
910
1971
  ],
911
1972
  outputs: [
912
1973
  {
913
- id: "embeddings",
914
- name: "Embeddings",
915
- type: "output",
916
- dataType: "array",
917
- description: "Generated embeddings"
1974
+ id: 'embeddings',
1975
+ name: 'Embeddings',
1976
+ type: 'output',
1977
+ dataType: 'number[]',
1978
+ description: 'Generated embeddings'
918
1979
  }
919
1980
  ],
920
1981
  configSchema: {
921
- model: "sentence-transformers/all-MiniLM-L6-v2",
922
- apiToken: ""
1982
+ type: 'object',
1983
+ properties: {
1984
+ model: {
1985
+ type: 'string',
1986
+ title: 'Model',
1987
+ description: 'HuggingFace model name',
1988
+ default: 'sentence-transformers/all-MiniLM-L6-v2'
1989
+ },
1990
+ apiToken: {
1991
+ type: 'string',
1992
+ title: 'API Token',
1993
+ description: 'HuggingFace API token',
1994
+ default: ''
1995
+ }
1996
+ }
923
1997
  },
924
- tags: ["embeddings", "huggingface", "vector"]
1998
+ tags: ['embeddings', 'huggingface', 'vector']
925
1999
  },
926
2000
  // ===== MEMORIES CATEGORY =====
927
2001
  {
928
- id: uuidv4(),
929
- name: "Conversation Buffer",
930
- version: "1.0.0",
931
- description: "Store conversation history",
932
- category: "memories",
933
- icon: "mdi:chat-history",
934
- color: "#8b5cf6",
2002
+ id: 'sample-conversation-buffer',
2003
+ name: 'Conversation Buffer',
2004
+ version: '1.0.0',
2005
+ description: 'Store conversation history',
2006
+ category: 'memories',
2007
+ icon: 'mdi:chat-history',
2008
+ color: '#8b5cf6',
935
2009
  inputs: [
936
2010
  {
937
- id: "message",
938
- name: "Message",
939
- type: "input",
940
- dataType: "text",
2011
+ id: 'message',
2012
+ name: 'Message',
2013
+ type: 'input',
2014
+ dataType: 'string',
941
2015
  required: true,
942
- description: "Message to add to buffer"
2016
+ description: 'Message to add to buffer'
943
2017
  }
944
2018
  ],
945
2019
  outputs: [
946
2020
  {
947
- id: "history",
948
- name: "History",
949
- type: "output",
950
- dataType: "array",
951
- description: "Conversation history"
2021
+ id: 'history',
2022
+ name: 'History',
2023
+ type: 'output',
2024
+ dataType: 'string[]',
2025
+ description: 'Conversation history'
952
2026
  }
953
2027
  ],
954
2028
  configSchema: {
955
- maxTokens: 2000,
956
- returnMessages: true
2029
+ type: 'object',
2030
+ properties: {
2031
+ maxTokens: {
2032
+ type: 'number',
2033
+ title: 'Max Tokens',
2034
+ description: 'Maximum tokens in buffer',
2035
+ default: 2000,
2036
+ minimum: 100,
2037
+ maximum: 10000
2038
+ },
2039
+ returnMessages: {
2040
+ type: 'boolean',
2041
+ title: 'Return Messages',
2042
+ description: 'Return messages in response',
2043
+ default: true
2044
+ }
2045
+ }
957
2046
  },
958
- tags: ["memory", "conversation", "history", "buffer"]
2047
+ tags: ['memory', 'conversation', 'history', 'buffer']
959
2048
  },
960
2049
  // ===== AGENTS CATEGORY =====
961
2050
  {
962
- id: uuidv4(),
963
- name: "Simple Agent",
964
- version: "1.0.0",
965
- description: "Agent for tool orchestration",
966
- category: "agents",
967
- icon: "mdi:account-cog",
968
- color: "#06b6d4",
2051
+ id: 'sample-simple-agent',
2052
+ name: 'Simple Agent',
2053
+ version: '1.0.0',
2054
+ description: 'Agent for tool orchestration',
2055
+ category: 'agents',
2056
+ icon: 'mdi:account-cog',
2057
+ color: '#06b6d4',
2058
+ type: 'default',
2059
+ supportedTypes: ['default', 'tool'],
969
2060
  inputs: [
970
2061
  {
971
- id: "message",
972
- name: "Message",
973
- type: "input",
974
- dataType: "text",
2062
+ id: 'message',
2063
+ name: 'Message',
2064
+ type: 'input',
2065
+ dataType: 'string',
975
2066
  required: true,
976
- description: "User message for agent"
2067
+ description: 'User message for agent'
977
2068
  },
978
2069
  {
979
- id: "tools",
980
- name: "Tools",
981
- type: "input",
982
- dataType: "array",
2070
+ id: 'tools',
2071
+ name: 'Tools',
2072
+ type: 'input',
2073
+ dataType: 'tool',
983
2074
  required: false,
984
- description: "Tools available to agent"
2075
+ description: 'Tool interfaces available to agent - connect to tool output ports'
985
2076
  }
986
2077
  ],
987
2078
  outputs: [
988
2079
  {
989
- id: "response",
990
- name: "Response",
991
- type: "output",
992
- dataType: "text",
993
- description: "Agent response"
2080
+ id: 'response',
2081
+ name: 'Response',
2082
+ type: 'output',
2083
+ dataType: 'string',
2084
+ description: 'Agent response'
2085
+ },
2086
+ {
2087
+ id: 'tools',
2088
+ name: 'Tools',
2089
+ type: 'input',
2090
+ dataType: 'tool',
2091
+ required: false,
2092
+ description: 'Tool interfaces available to agent - connect to tool output ports'
994
2093
  }
995
2094
  ],
996
2095
  configSchema: {
997
- model: "gpt-3.5-turbo",
998
- temperature: 0.7,
999
- maxIterations: 5
2096
+ type: 'object',
2097
+ properties: {
2098
+ nodeType: {
2099
+ type: 'string',
2100
+ title: 'Node Type',
2101
+ description: 'Choose the visual representation for this node',
2102
+ default: 'default',
2103
+ enum: ['tool', 'default'],
2104
+ enumNames: ['Tool Node (with metadata port)', 'Default Node (standard ports)']
2105
+ },
2106
+ model: {
2107
+ type: 'string',
2108
+ title: 'Model',
2109
+ description: 'Chat model to use',
2110
+ default: 'gpt-3.5-turbo',
2111
+ enum: ['gpt-3.5-turbo', 'gpt-4', 'claude-3-sonnet']
2112
+ },
2113
+ temperature: {
2114
+ type: 'number',
2115
+ title: 'Temperature',
2116
+ description: 'Creativity level (0-1)',
2117
+ default: 0.7,
2118
+ minimum: 0,
2119
+ maximum: 1
2120
+ },
2121
+ maxIterations: {
2122
+ type: 'number',
2123
+ title: 'Max Iterations',
2124
+ description: 'Maximum agent iterations',
2125
+ default: 5,
2126
+ minimum: 1,
2127
+ maximum: 20
2128
+ }
2129
+ }
1000
2130
  },
1001
- tags: ["agent", "orchestration", "tools"]
2131
+ tags: ['agent', 'orchestration', 'tools']
1002
2132
  },
1003
2133
  // ===== VECTOR STORES CATEGORY =====
1004
2134
  {
1005
- id: uuidv4(),
1006
- name: "Chroma Vector Store",
1007
- version: "1.0.0",
1008
- description: "Store and retrieve vectors using Chroma",
1009
- category: "vector stores",
1010
- icon: "mdi:database",
1011
- color: "#84cc16",
2135
+ id: 'sample-chroma-vector-store',
2136
+ name: 'Chroma Vector Store',
2137
+ version: '1.0.0',
2138
+ description: 'Store and retrieve vectors using Chroma',
2139
+ category: 'vector stores',
2140
+ icon: 'mdi:database',
2141
+ color: '#84cc16',
2142
+ inputs: [
2143
+ {
2144
+ id: 'embeddings',
2145
+ name: 'Embeddings',
2146
+ type: 'input',
2147
+ dataType: 'number[]',
2148
+ required: true,
2149
+ description: 'Embeddings to store'
2150
+ },
2151
+ {
2152
+ id: 'query',
2153
+ name: 'Query',
2154
+ type: 'input',
2155
+ dataType: 'string',
2156
+ required: false,
2157
+ description: 'Query for similarity search'
2158
+ }
2159
+ ],
2160
+ outputs: [
2161
+ {
2162
+ id: 'results',
2163
+ name: 'Results',
2164
+ type: 'output',
2165
+ dataType: 'json[]',
2166
+ description: 'Search results'
2167
+ },
2168
+ {
2169
+ id: 'metadata',
2170
+ name: 'Metadata',
2171
+ type: 'output',
2172
+ dataType: 'json',
2173
+ description: 'Vector store metadata'
2174
+ }
2175
+ ],
2176
+ configSchema: {
2177
+ type: 'object',
2178
+ properties: {
2179
+ collectionName: {
2180
+ type: 'string',
2181
+ title: 'Collection Name',
2182
+ description: 'Chroma collection name',
2183
+ default: 'default'
2184
+ },
2185
+ persistDirectory: {
2186
+ type: 'string',
2187
+ title: 'Persist Directory',
2188
+ description: 'Directory to persist data',
2189
+ default: './chroma_db'
2190
+ },
2191
+ distanceFunction: {
2192
+ type: 'string',
2193
+ title: 'Distance Function',
2194
+ description: 'Distance function for similarity',
2195
+ default: 'cosine',
2196
+ enum: ['cosine', 'euclidean', 'manhattan']
2197
+ }
2198
+ }
2199
+ },
2200
+ tags: ['integration', 'vector-store', 'chroma', 'embeddings']
2201
+ },
2202
+ {
2203
+ id: 'sample-pinecone-vector-store',
2204
+ name: 'Pinecone Vector Store',
2205
+ version: '1.0.0',
2206
+ description: 'Store and retrieve vectors using Pinecone',
2207
+ category: 'vector stores',
2208
+ icon: 'mdi:database-search',
2209
+ color: '#f59e0b',
2210
+ inputs: [
2211
+ {
2212
+ id: 'embeddings',
2213
+ name: 'Embeddings',
2214
+ type: 'input',
2215
+ dataType: 'number[]',
2216
+ required: true,
2217
+ description: 'Embeddings to store'
2218
+ },
2219
+ {
2220
+ id: 'query',
2221
+ name: 'Query',
2222
+ type: 'input',
2223
+ dataType: 'string',
2224
+ required: false,
2225
+ description: 'Query for similarity search'
2226
+ }
2227
+ ],
2228
+ outputs: [
2229
+ {
2230
+ id: 'results',
2231
+ name: 'Results',
2232
+ type: 'output',
2233
+ dataType: 'json[]',
2234
+ description: 'Search results'
2235
+ }
2236
+ ],
2237
+ configSchema: {
2238
+ type: 'object',
2239
+ properties: {
2240
+ indexName: {
2241
+ type: 'string',
2242
+ title: 'Index Name',
2243
+ description: 'Pinecone index name',
2244
+ default: 'default'
2245
+ },
2246
+ apiKey: {
2247
+ type: 'string',
2248
+ title: 'API Key',
2249
+ description: 'Pinecone API key',
2250
+ default: ''
2251
+ },
2252
+ environment: {
2253
+ type: 'string',
2254
+ title: 'Environment',
2255
+ description: 'Pinecone environment',
2256
+ default: 'us-west1-gcp'
2257
+ }
2258
+ }
2259
+ },
2260
+ tags: ['integration', 'vector-store', 'pinecone', 'embeddings']
2261
+ },
2262
+ // ===== DEMO: AI-POWERED CONTENT MANAGEMENT NODES =====
2263
+ {
2264
+ id: 'demo-chat-input',
2265
+ name: 'Chat Input',
2266
+ type: 'simple',
2267
+ supportedTypes: ['simple', 'default'],
2268
+ version: '1.0.0',
2269
+ description: 'Accept chat instructions from content managers about what content changes to make',
2270
+ category: 'inputs',
2271
+ icon: 'mdi:message-text-outline',
2272
+ color: '#10b981',
2273
+ inputs: [],
2274
+ outputs: [
2275
+ {
2276
+ id: 'user_message',
2277
+ name: 'User Message',
2278
+ type: 'output',
2279
+ dataType: 'string',
2280
+ description: "Content manager's instructions for content review"
2281
+ }
2282
+ ],
2283
+ configSchema: {
2284
+ type: 'object',
2285
+ properties: {
2286
+ nodeType: {
2287
+ type: 'string',
2288
+ title: 'Node Type',
2289
+ description: 'Choose the visual representation for this node',
2290
+ default: 'simple',
2291
+ enum: ['simple', 'default'],
2292
+ enumNames: ['Simple (compact layout)', 'Default (standard workflow node)']
2293
+ },
2294
+ placeholder: {
2295
+ type: 'string',
2296
+ title: 'Placeholder Text',
2297
+ description: 'Placeholder text shown in the chat input',
2298
+ default: 'Enter your content management instructions...'
2299
+ },
2300
+ welcomeMessage: {
2301
+ type: 'string',
2302
+ title: 'Welcome Message',
2303
+ description: 'Initial message shown to content managers',
2304
+ default: 'Hi! I can help you review and update your Drupal content. What would you like me to do?'
2305
+ },
2306
+ maxLength: {
2307
+ type: 'number',
2308
+ title: 'Maximum Message Length',
2309
+ description: 'Maximum characters allowed in a single message',
2310
+ default: 1000,
2311
+ minimum: 100,
2312
+ maximum: 5000
2313
+ }
2314
+ }
2315
+ },
2316
+ tags: ['demo', 'content-management', 'input', 'chat', 'drupal']
2317
+ },
2318
+ {
2319
+ id: 'demo-drupal-search-rag',
2320
+ name: 'Drupal Search API RAG',
2321
+ type: 'tool',
2322
+ supportedTypes: ['tool', 'default'],
2323
+ version: '1.0.0',
2324
+ description: 'Search and retrieve content from Drupal using Search API with AI-powered relevance',
2325
+ category: 'tools',
2326
+ icon: 'mdi:database-search-outline',
2327
+ color: '#0678be',
2328
+ inputs: [
2329
+ {
2330
+ id: 'search_query',
2331
+ name: 'Search Query',
2332
+ type: 'input',
2333
+ dataType: 'string',
2334
+ required: true,
2335
+ description: 'Search terms to find relevant content'
2336
+ },
2337
+ {
2338
+ id: 'content_types',
2339
+ name: 'Content Types',
2340
+ type: 'input',
2341
+ dataType: 'json',
2342
+ required: false,
2343
+ description: "Array of content types to search (e.g., ['article', 'page', 'blog'])"
2344
+ }
2345
+ ],
2346
+ outputs: [
2347
+ {
2348
+ id: 'content_results',
2349
+ name: 'Content Results',
2350
+ type: 'output',
2351
+ dataType: 'json',
2352
+ description: 'Array of matching content items with metadata'
2353
+ },
2354
+ {
2355
+ id: 'search_metadata',
2356
+ name: 'Search Metadata',
2357
+ type: 'output',
2358
+ dataType: 'json',
2359
+ description: 'Search statistics and relevance information'
2360
+ },
2361
+ {
2362
+ id: 'tool',
2363
+ name: 'Tool Interface',
2364
+ type: 'output',
2365
+ dataType: 'tool',
2366
+ description: 'Tool interface for agent connections - provides tool metadata and callable interface'
2367
+ }
2368
+ ],
2369
+ configSchema: {
2370
+ type: 'object',
2371
+ properties: {
2372
+ nodeType: {
2373
+ type: 'string',
2374
+ title: 'Node Type',
2375
+ description: 'Choose the visual representation for this node',
2376
+ default: 'tool',
2377
+ enum: ['tool', 'default'],
2378
+ enumNames: ['Tool Node (with metadata port)', 'Default Node (standard ports)']
2379
+ },
2380
+ searchIndex: {
2381
+ type: 'string',
2382
+ title: 'Search API Index',
2383
+ description: 'Name of the Drupal Search API index to query',
2384
+ default: 'content_index'
2385
+ },
2386
+ maxResults: {
2387
+ type: 'number',
2388
+ title: 'Maximum Results',
2389
+ description: 'Maximum number of content items to return',
2390
+ default: 10,
2391
+ minimum: 1,
2392
+ maximum: 100
2393
+ },
2394
+ includeFields: {
2395
+ type: 'array',
2396
+ title: 'Include Fields',
2397
+ description: 'Content fields to include in results',
2398
+ default: ['title', 'body', 'field_tags', 'created', 'changed']
2399
+ },
2400
+ useAiRanking: {
2401
+ type: 'boolean',
2402
+ title: 'Use AI-Powered Ranking',
2403
+ description: 'Use AI to improve search result relevance',
2404
+ default: true
2405
+ },
2406
+ contentStatus: {
2407
+ type: 'string',
2408
+ title: 'Content Status',
2409
+ description: 'Filter by publication status',
2410
+ default: 'published',
2411
+ enum: ['published', 'unpublished', 'all']
2412
+ }
2413
+ }
2414
+ },
2415
+ tags: ['demo', 'content-management', 'drupal', 'search', 'rag', 'ai']
2416
+ },
2417
+ {
2418
+ id: 'ai_content_analyzer',
2419
+ name: 'AI Content Analyzer',
2420
+ type: 'default',
2421
+ supportedTypes: ['default', 'tool'],
2422
+ version: '1.0.0',
2423
+ description: 'AI-powered content analysis for smart text processing and context understanding',
2424
+ category: 'ai',
2425
+ icon: 'mdi:text-search',
2426
+ color: '#7c3aed',
1012
2427
  inputs: [
1013
2428
  {
1014
- id: "embeddings",
1015
- name: "Embeddings",
1016
- type: "input",
1017
- dataType: "array",
2429
+ id: 'content_to_analyze',
2430
+ name: 'Content to Analyze',
2431
+ type: 'input',
2432
+ dataType: 'string',
1018
2433
  required: true,
1019
- description: "Embeddings to store"
2434
+ description: 'Text content or array of content items for AI analysis'
2435
+ }
2436
+ ],
2437
+ outputs: [
2438
+ {
2439
+ id: 'analyzed_content',
2440
+ name: 'Analyzed Content',
2441
+ type: 'output',
2442
+ dataType: 'array',
2443
+ description: 'Content items with AI analysis results'
2444
+ },
2445
+ {
2446
+ id: 'total_analyzed',
2447
+ name: 'Total Analyzed',
2448
+ type: 'output',
2449
+ dataType: 'number',
2450
+ description: 'Total number of items analyzed'
2451
+ },
2452
+ {
2453
+ id: 'total_replacements',
2454
+ name: 'Total Replacements',
2455
+ type: 'output',
2456
+ dataType: 'number',
2457
+ description: 'Total number of replacements made'
2458
+ },
2459
+ {
2460
+ id: 'analysis_mode',
2461
+ name: 'Analysis Mode',
2462
+ type: 'output',
2463
+ dataType: 'string',
2464
+ description: 'The analysis mode used'
1020
2465
  },
1021
2466
  {
1022
- id: "query",
1023
- name: "Query",
1024
- type: "input",
1025
- dataType: "text",
2467
+ id: 'confidence_threshold',
2468
+ name: 'Confidence Threshold',
2469
+ type: 'output',
2470
+ dataType: 'number',
2471
+ description: 'Confidence threshold used for replacements'
2472
+ },
2473
+ {
2474
+ id: 'analyzed_at',
2475
+ name: 'Analyzed At',
2476
+ type: 'output',
2477
+ dataType: 'string',
2478
+ description: 'Timestamp when analysis was completed'
2479
+ }
2480
+ ],
2481
+ configSchema: {
2482
+ type: 'object',
2483
+ properties: {
2484
+ nodeType: {
2485
+ type: 'string',
2486
+ title: 'Node Type',
2487
+ description: 'Choose the visual representation for this node',
2488
+ default: 'default',
2489
+ enum: ['tool', 'default'],
2490
+ enumNames: ['Tool Node (with metadata port)', 'Default Node (standard ports)']
2491
+ },
2492
+ targetText: {
2493
+ type: 'string',
2494
+ title: 'Target Text',
2495
+ description: 'Text to analyze and potentially replace',
2496
+ default: 'XB'
2497
+ },
2498
+ replacementText: {
2499
+ type: 'string',
2500
+ title: 'Replacement Text',
2501
+ description: 'Text to replace with when appropriate',
2502
+ default: 'Canvas'
2503
+ },
2504
+ analysisMode: {
2505
+ type: 'string',
2506
+ title: 'Analysis Mode',
2507
+ description: 'Type of AI analysis to perform',
2508
+ default: 'context_aware'
2509
+ },
2510
+ confidenceThreshold: {
2511
+ type: 'number',
2512
+ title: 'Confidence Threshold',
2513
+ description: 'Minimum confidence level for making replacements (0-1)',
2514
+ default: 0.8,
2515
+ minimum: 0,
2516
+ maximum: 1
2517
+ }
2518
+ }
2519
+ },
2520
+ tags: ['ai', 'analysis', 'content', 'context', 'smart-processing']
2521
+ },
2522
+ {
2523
+ id: 'demo-ai-content-analyzer',
2524
+ name: 'AI Content Analyzer',
2525
+ type: 'default',
2526
+ supportedTypes: ['default', 'tool'],
2527
+ version: '1.0.0',
2528
+ description: 'Analyze content for issues like acronym misuse, formatting problems, or content quality',
2529
+ category: 'agents',
2530
+ icon: 'mdi:text-search',
2531
+ color: '#7c3aed',
2532
+ inputs: [
2533
+ {
2534
+ id: 'content',
2535
+ name: 'Content',
2536
+ type: 'input',
2537
+ dataType: 'json',
2538
+ required: true,
2539
+ description: 'Content to analyze'
2540
+ },
2541
+ {
2542
+ id: 'analysis_prompt',
2543
+ name: 'Analysis Instructions',
2544
+ type: 'input',
2545
+ dataType: 'string',
2546
+ required: true,
2547
+ description: 'Instructions for what to analyze in the content'
2548
+ },
2549
+ {
2550
+ id: 'tools',
2551
+ name: 'Tools',
2552
+ type: 'input',
2553
+ dataType: 'tool',
1026
2554
  required: false,
1027
- description: "Query for similarity search"
2555
+ description: 'Tools available to agent'
1028
2556
  }
1029
2557
  ],
1030
2558
  outputs: [
1031
2559
  {
1032
- id: "results",
1033
- name: "Results",
1034
- type: "output",
1035
- dataType: "array",
1036
- description: "Search results"
2560
+ id: 'analysis_results',
2561
+ name: 'Analysis Results',
2562
+ type: 'output',
2563
+ dataType: 'json',
2564
+ description: 'Detailed analysis findings with recommendations'
2565
+ },
2566
+ {
2567
+ id: 'issues_found',
2568
+ name: 'Issues Found',
2569
+ type: 'output',
2570
+ dataType: 'json',
2571
+ description: 'Array of specific issues identified'
1037
2572
  },
1038
2573
  {
1039
- id: "metadata",
1040
- name: "Metadata",
1041
- type: "output",
1042
- dataType: "json",
1043
- description: "Vector store metadata"
2574
+ id: 'confidence_score',
2575
+ name: 'Confidence Score',
2576
+ type: 'output',
2577
+ dataType: 'number',
2578
+ description: 'AI confidence in the analysis (0-1)'
2579
+ },
2580
+ {
2581
+ id: 'tools',
2582
+ name: 'Tools',
2583
+ type: 'input',
2584
+ dataType: 'tool',
2585
+ required: false,
2586
+ description: 'Tools available to agent'
1044
2587
  }
1045
2588
  ],
1046
2589
  configSchema: {
1047
- collectionName: "default",
1048
- persistDirectory: "./chroma_db",
1049
- distanceFunction: "cosine"
2590
+ type: 'object',
2591
+ properties: {
2592
+ nodeType: {
2593
+ type: 'string',
2594
+ title: 'Node Type',
2595
+ description: 'Choose the visual representation for this node',
2596
+ default: 'default',
2597
+ enum: ['tool', 'default'],
2598
+ enumNames: ['Tool Node (with metadata port)', 'Default Node (standard ports)']
2599
+ },
2600
+ model: {
2601
+ type: 'string',
2602
+ title: 'AI Model',
2603
+ description: 'AI model to use for content analysis',
2604
+ default: 'gpt-4',
2605
+ enum: ['gpt-3.5-turbo', 'gpt-4', 'claude-3-sonnet', 'claude-3-haiku']
2606
+ },
2607
+ analysisType: {
2608
+ type: 'string',
2609
+ title: 'Analysis Type',
2610
+ description: 'Type of content analysis to perform',
2611
+ default: 'comprehensive',
2612
+ enum: ['acronym_detection', 'grammar_check', 'style_review', 'comprehensive']
2613
+ },
2614
+ strictness: {
2615
+ type: 'string',
2616
+ title: 'Analysis Strictness',
2617
+ description: 'How strict should the analysis be',
2618
+ default: 'balanced',
2619
+ enum: ['lenient', 'balanced', 'strict']
2620
+ },
2621
+ includeExamples: {
2622
+ type: 'boolean',
2623
+ title: 'Include Examples',
2624
+ description: 'Include specific examples in analysis results',
2625
+ default: true
2626
+ },
2627
+ customRules: {
2628
+ type: 'string',
2629
+ title: 'Custom Analysis Rules',
2630
+ description: 'Custom rules or guidelines for content analysis',
2631
+ default: '',
2632
+ format: 'multiline'
2633
+ }
2634
+ }
1050
2635
  },
1051
- tags: ["integration", "vector-store", "chroma", "embeddings"]
2636
+ tags: ['demo', 'content-management', 'ai', 'analysis', 'quality-control']
1052
2637
  },
1053
2638
  {
1054
- id: uuidv4(),
1055
- name: "Pinecone Vector Store",
1056
- version: "1.0.0",
1057
- description: "Store and retrieve vectors using Pinecone",
1058
- category: "vector stores",
1059
- icon: "mdi:database-search",
1060
- color: "#f59e0b",
2639
+ id: 'demo-ai-content-editor',
2640
+ name: 'AI Content Editor',
2641
+ type: 'default',
2642
+ supportedTypes: ['default', 'tool'],
2643
+ version: '1.0.0',
2644
+ description: 'Make AI-powered edits to content based on analysis results and user instructions',
2645
+ category: 'agents',
2646
+ icon: 'mdi:file-edit-outline',
2647
+ color: '#f59e0b',
1061
2648
  inputs: [
1062
2649
  {
1063
- id: "embeddings",
1064
- name: "Embeddings",
1065
- type: "input",
1066
- dataType: "array",
2650
+ id: 'original_content',
2651
+ name: 'Original Content',
2652
+ type: 'input',
2653
+ dataType: 'json',
2654
+ required: true,
2655
+ description: 'Original content to be edited'
2656
+ },
2657
+ {
2658
+ id: 'analysis_results',
2659
+ name: 'Analysis Results',
2660
+ type: 'input',
2661
+ dataType: 'json',
2662
+ required: true,
2663
+ description: 'Issues and recommendations from content analysis'
2664
+ },
2665
+ {
2666
+ id: 'edit_instructions',
2667
+ name: 'Edit Instructions',
2668
+ type: 'input',
2669
+ dataType: 'string',
1067
2670
  required: true,
1068
- description: "Embeddings to store"
2671
+ description: 'Specific instructions for how to edit the content'
1069
2672
  },
1070
2673
  {
1071
- id: "query",
1072
- name: "Query",
1073
- type: "input",
1074
- dataType: "text",
2674
+ id: 'tools',
2675
+ name: 'Tools',
2676
+ type: 'input',
2677
+ dataType: 'tool',
1075
2678
  required: false,
1076
- description: "Query for similarity search"
2679
+ description: 'Tools available to agent'
2680
+ }
2681
+ ],
2682
+ outputs: [
2683
+ {
2684
+ id: 'edited_content',
2685
+ name: 'Edited Content',
2686
+ type: 'output',
2687
+ dataType: 'json',
2688
+ description: 'Content with AI-suggested edits applied'
2689
+ },
2690
+ {
2691
+ id: 'edit_summary',
2692
+ name: 'Edit Summary',
2693
+ type: 'output',
2694
+ dataType: 'json',
2695
+ description: 'Summary of changes made with explanations'
2696
+ },
2697
+ {
2698
+ id: 'change_log',
2699
+ name: 'Change Log',
2700
+ type: 'output',
2701
+ dataType: 'json',
2702
+ description: 'Detailed log of all changes made'
2703
+ },
2704
+ {
2705
+ id: 'tools',
2706
+ name: 'Tools',
2707
+ type: 'input',
2708
+ dataType: 'tool',
2709
+ required: false,
2710
+ description: 'Tools available to agent'
2711
+ }
2712
+ ],
2713
+ configSchema: {
2714
+ type: 'object',
2715
+ properties: {
2716
+ nodeType: {
2717
+ type: 'string',
2718
+ title: 'Node Type',
2719
+ description: 'Choose the visual representation for this node',
2720
+ default: 'default',
2721
+ enum: ['tool', 'default'],
2722
+ enumNames: ['Tool Node (with metadata port)', 'Default Node (standard ports)']
2723
+ },
2724
+ model: {
2725
+ type: 'string',
2726
+ title: 'AI Model',
2727
+ description: 'AI model to use for content editing',
2728
+ default: 'gpt-4',
2729
+ enum: ['gpt-3.5-turbo', 'gpt-4', 'claude-3-sonnet', 'claude-3-haiku']
2730
+ },
2731
+ editingStyle: {
2732
+ type: 'string',
2733
+ title: 'Editing Style',
2734
+ description: 'Style of editing to apply',
2735
+ default: 'conservative',
2736
+ enum: ['minimal', 'conservative', 'moderate', 'comprehensive']
2737
+ },
2738
+ preserveFormatting: {
2739
+ type: 'boolean',
2740
+ title: 'Preserve HTML Formatting',
2741
+ description: 'Maintain existing HTML tags and formatting',
2742
+ default: true
2743
+ },
2744
+ requireApproval: {
2745
+ type: 'boolean',
2746
+ title: 'Require Human Approval',
2747
+ description: 'Flag all changes for human review before applying',
2748
+ default: true
2749
+ },
2750
+ trackChanges: {
2751
+ type: 'boolean',
2752
+ title: 'Track Changes',
2753
+ description: 'Create detailed tracking of all modifications',
2754
+ default: true
2755
+ }
2756
+ }
2757
+ },
2758
+ tags: ['demo', 'content-management', 'ai', 'editing', 'automation']
2759
+ },
2760
+ {
2761
+ id: 'demo-draft-creator',
2762
+ name: 'Draft Creator',
2763
+ type: 'tool',
2764
+ supportedTypes: ['tool', 'default'],
2765
+ version: '1.0.0',
2766
+ description: 'Create draft versions of edited content in Drupal for human review and approval',
2767
+ category: 'tools',
2768
+ icon: 'mdi:file-document-edit-outline',
2769
+ color: '#10b981',
2770
+ inputs: [
2771
+ {
2772
+ id: 'edited_content',
2773
+ name: 'Edited Content',
2774
+ type: 'input',
2775
+ dataType: 'json',
2776
+ required: true,
2777
+ description: 'Content with AI edits to save as draft'
2778
+ },
2779
+ {
2780
+ id: 'edit_summary',
2781
+ name: 'Edit Summary',
2782
+ type: 'input',
2783
+ dataType: 'json',
2784
+ required: true,
2785
+ description: 'Summary of changes made'
2786
+ },
2787
+ {
2788
+ id: 'original_node_id',
2789
+ name: 'Original Node ID',
2790
+ type: 'input',
2791
+ dataType: 'number',
2792
+ required: true,
2793
+ description: 'Drupal node ID of the original content'
2794
+ }
2795
+ ],
2796
+ outputs: [
2797
+ {
2798
+ id: 'draft_node_id',
2799
+ name: 'Draft Node ID',
2800
+ type: 'output',
2801
+ dataType: 'number',
2802
+ description: 'Node ID of the created draft'
2803
+ },
2804
+ {
2805
+ id: 'draft_url',
2806
+ name: 'Draft URL',
2807
+ type: 'output',
2808
+ dataType: 'string',
2809
+ description: 'URL to view the draft content'
2810
+ },
2811
+ {
2812
+ id: 'review_url',
2813
+ name: 'Review URL',
2814
+ type: 'output',
2815
+ dataType: 'string',
2816
+ description: 'URL for content reviewers to approve/reject changes'
2817
+ },
2818
+ {
2819
+ id: 'tool',
2820
+ name: 'Tool Interface',
2821
+ type: 'output',
2822
+ dataType: 'tool',
2823
+ description: 'Tool interface for agent connections - provides tool metadata and callable interface'
2824
+ }
2825
+ ],
2826
+ configSchema: {
2827
+ type: 'object',
2828
+ properties: {
2829
+ nodeType: {
2830
+ type: 'string',
2831
+ title: 'Node Type',
2832
+ description: 'Choose the visual representation for this node',
2833
+ default: 'tool',
2834
+ enum: ['tool', 'default'],
2835
+ enumNames: ['Tool Node (with metadata port)', 'Default Node (standard ports)']
2836
+ },
2837
+ draftWorkflow: {
2838
+ type: 'string',
2839
+ title: 'Draft Workflow',
2840
+ description: 'Drupal workflow to use for draft content',
2841
+ default: 'editorial',
2842
+ enum: ['editorial', 'simple', 'custom']
2843
+ },
2844
+ assignReviewer: {
2845
+ type: 'boolean',
2846
+ title: 'Auto-assign Reviewer',
2847
+ description: 'Automatically assign a content reviewer',
2848
+ default: true
2849
+ },
2850
+ reviewerRole: {
2851
+ type: 'string',
2852
+ title: 'Reviewer Role',
2853
+ description: 'User role to assign for content review',
2854
+ default: 'editor',
2855
+ enum: ['editor', 'content_manager', 'administrator']
2856
+ },
2857
+ notifyReviewer: {
2858
+ type: 'boolean',
2859
+ title: 'Notify Reviewer',
2860
+ description: 'Send email notification to assigned reviewer',
2861
+ default: true
2862
+ },
2863
+ retainOriginal: {
2864
+ type: 'boolean',
2865
+ title: 'Retain Original',
2866
+ description: 'Keep original content unchanged until draft is approved',
2867
+ default: true
2868
+ },
2869
+ addRevisionLog: {
2870
+ type: 'boolean',
2871
+ title: 'Add Revision Log',
2872
+ description: 'Add detailed revision log entry',
2873
+ default: true
2874
+ }
2875
+ }
2876
+ },
2877
+ tags: ['demo', 'content-management', 'drupal', 'draft', 'workflow', 'review']
2878
+ },
2879
+ {
2880
+ id: 'demo-date-format-converter',
2881
+ name: 'Date Format Converter',
2882
+ type: 'tool',
2883
+ supportedTypes: ['tool', 'default'],
2884
+ version: '1.0.0',
2885
+ description: 'Extract and convert dates in content to new formats (demo review step)',
2886
+ category: 'tools',
2887
+ icon: 'mdi:calendar-edit',
2888
+ color: '#84cc16',
2889
+ inputs: [
2890
+ {
2891
+ id: 'content',
2892
+ name: 'Content',
2893
+ type: 'input',
2894
+ dataType: 'json',
2895
+ required: true,
2896
+ description: 'Content containing dates to convert'
1077
2897
  }
1078
2898
  ],
1079
2899
  outputs: [
1080
2900
  {
1081
- id: "results",
1082
- name: "Results",
1083
- type: "output",
1084
- dataType: "array",
1085
- description: "Search results"
2901
+ id: 'converted_content',
2902
+ name: 'Converted Content',
2903
+ type: 'output',
2904
+ dataType: 'json',
2905
+ description: 'Content with dates converted to new format'
2906
+ },
2907
+ {
2908
+ id: 'dates_found',
2909
+ name: 'Dates Found',
2910
+ type: 'output',
2911
+ dataType: 'json',
2912
+ description: 'Array of dates found and their conversions'
2913
+ },
2914
+ {
2915
+ id: 'conversion_log',
2916
+ name: 'Conversion Log',
2917
+ type: 'output',
2918
+ dataType: 'json',
2919
+ description: 'Log of all date conversions performed'
2920
+ },
2921
+ {
2922
+ id: 'tool',
2923
+ name: 'Tool Interface',
2924
+ type: 'output',
2925
+ dataType: 'tool',
2926
+ description: 'Tool interface for agent connections - provides tool metadata and callable interface'
1086
2927
  }
1087
2928
  ],
1088
2929
  configSchema: {
1089
- indexName: "default",
1090
- apiKey: "",
1091
- environment: "us-west1-gcp"
2930
+ type: 'object',
2931
+ properties: {
2932
+ nodeType: {
2933
+ type: 'string',
2934
+ title: 'Node Type',
2935
+ description: 'Choose the visual representation for this node',
2936
+ default: 'tool',
2937
+ enum: ['tool', 'default'],
2938
+ enumNames: ['Tool Node (with metadata port)', 'Default Node (standard ports)']
2939
+ },
2940
+ inputFormat: {
2941
+ type: 'string',
2942
+ title: 'Input Date Format',
2943
+ description: 'Expected format of dates in content',
2944
+ default: 'MM/dd/yyyy',
2945
+ enum: ['MM/dd/yyyy', 'dd/MM/yyyy', 'yyyy-MM-dd', 'auto-detect']
2946
+ },
2947
+ outputFormat: {
2948
+ type: 'string',
2949
+ title: 'Output Date Format',
2950
+ description: 'Desired format for converted dates',
2951
+ default: 'MMMM d, yyyy',
2952
+ enum: ['MMMM d, yyyy', 'dd/MM/yyyy', 'yyyy-MM-dd', 'MMM d, yyyy', 'd MMMM yyyy']
2953
+ },
2954
+ includeTime: {
2955
+ type: 'boolean',
2956
+ title: 'Include Time',
2957
+ description: 'Include time information in conversions',
2958
+ default: false
2959
+ },
2960
+ timezone: {
2961
+ type: 'string',
2962
+ title: 'Timezone',
2963
+ description: 'Timezone for date conversions',
2964
+ default: 'UTC',
2965
+ enum: [
2966
+ 'UTC',
2967
+ 'America/New_York',
2968
+ 'America/Chicago',
2969
+ 'America/Denver',
2970
+ 'America/Los_Angeles',
2971
+ 'Europe/London'
2972
+ ]
2973
+ },
2974
+ onlyFutureDates: {
2975
+ type: 'boolean',
2976
+ title: 'Only Future Dates',
2977
+ description: 'Only convert dates that are in the future',
2978
+ default: false
2979
+ }
2980
+ }
1092
2981
  },
1093
- tags: ["integration", "vector-store", "pinecone", "embeddings"]
2982
+ tags: ['demo', 'content-management', 'dates', 'formatting', 'conversion', 'review-tool']
2983
+ },
2984
+ {
2985
+ id: 'demo-chat-response',
2986
+ name: 'Chat Response',
2987
+ type: 'simple',
2988
+ supportedTypes: ['simple', 'default'],
2989
+ version: '1.0.0',
2990
+ description: 'Display chat-style responses with workflow results and next steps for content managers',
2991
+ category: 'outputs',
2992
+ icon: 'mdi:message-reply-text',
2993
+ color: '#8b5cf6',
2994
+ inputs: [
2995
+ {
2996
+ id: 'workflow_results',
2997
+ name: 'Workflow Results',
2998
+ type: 'input',
2999
+ dataType: 'json',
3000
+ required: true,
3001
+ description: 'Results from the content management workflow'
3002
+ },
3003
+ {
3004
+ id: 'summary_message',
3005
+ name: 'Summary Message',
3006
+ type: 'input',
3007
+ dataType: 'string',
3008
+ required: true,
3009
+ description: 'Human-readable summary of what was accomplished'
3010
+ }
3011
+ ],
3012
+ outputs: [],
3013
+ configSchema: {
3014
+ type: 'object',
3015
+ properties: {
3016
+ nodeType: {
3017
+ type: 'string',
3018
+ title: 'Node Type',
3019
+ description: 'Choose the visual representation for this node',
3020
+ default: 'simple',
3021
+ enum: ['simple', 'default'],
3022
+ enumNames: ['Simple (compact layout)', 'Default (standard workflow node)']
3023
+ },
3024
+ showTimestamp: {
3025
+ type: 'boolean',
3026
+ title: 'Show Timestamp',
3027
+ description: 'Display timestamp with responses',
3028
+ default: true
3029
+ },
3030
+ includeActionButtons: {
3031
+ type: 'boolean',
3032
+ title: 'Include Action Buttons',
3033
+ description: 'Show action buttons for next steps',
3034
+ default: true
3035
+ },
3036
+ responseStyle: {
3037
+ type: 'string',
3038
+ title: 'Response Style',
3039
+ description: 'Style of the chat response',
3040
+ default: 'professional',
3041
+ enum: ['casual', 'professional', 'technical', 'friendly']
3042
+ },
3043
+ showWorkflowSummary: {
3044
+ type: 'boolean',
3045
+ title: 'Show Workflow Summary',
3046
+ description: 'Include a summary of workflow steps completed',
3047
+ default: true
3048
+ },
3049
+ enableMarkdown: {
3050
+ type: 'boolean',
3051
+ title: 'Enable Markdown',
3052
+ description: 'Allow markdown formatting in responses',
3053
+ default: true
3054
+ }
3055
+ }
3056
+ },
3057
+ tags: ['demo', 'content-management', 'output', 'chat', 'response', 'summary']
1094
3058
  }
1095
3059
  ];
1096
3060
  // Export category icons for use in other components
1097
3061
  export { CATEGORY_ICONS as categoryIcons };
3062
+ /**
3063
+ * Demo node whitelist - Multi-agent content management scenario
3064
+ * Main Agent + Specialized Sub-Agents + Tools
3065
+ */
3066
+ const DEMO_ALLOWED_NODE_IDS = [
3067
+ // === MAIN CONVERSATIONAL AGENT ===
3068
+ 'demo-chat-input', // User input interface
3069
+ 'sample-simple-agent', // Main conversational agent (orchestrator)
3070
+ 'demo-chat-response', // Response back to user
3071
+ // === SPECIALIZED SUB-AGENTS ===
3072
+ 'demo-ai-content-analyzer', // Content analysis agent
3073
+ 'demo-ai-content-editor', // Content editing agent
3074
+ // === TOOLS (for sub-agents to use) ===
3075
+ 'demo-drupal-search-rag', // RAG tool for content search
3076
+ 'demo-draft-creator', // Draft creation tool
3077
+ 'demo-date-format-converter', // Date formatting tool
3078
+ // === SUPPORTING NODES ===
3079
+ 'sample-openai', // AI model for agents
3080
+ 'sample-anthropic', // Alternative AI model
3081
+ 'sample-notes', // Documentation
3082
+ 'sample-prompt', // Prompt templates
3083
+ 'sample-text-input', // Alternative input method
3084
+ 'sample-chat-output', // Alternative output method
3085
+ // === TOOL INTERFACE NODES ===
3086
+ 'sample-http-request', // For external API calls
3087
+ 'sample-json', // JSON processing tool
3088
+ 'sample-set' // Data manipulation tool
3089
+ ];
3090
+ /**
3091
+ * Filter nodes based on demo configuration
3092
+ * @param nodes - All available nodes
3093
+ * @param config - Demo configuration
3094
+ * @returns Filtered array of nodes
3095
+ */
3096
+ export function filterNodesForDemo(nodes, config) {
3097
+ if (!config.enabled) {
3098
+ return nodes;
3099
+ }
3100
+ switch (config.mode) {
3101
+ case 'content-management':
3102
+ // Show only specifically whitelisted nodes for the demo
3103
+ return nodes.filter((node) => DEMO_ALLOWED_NODE_IDS.includes(node.id));
3104
+ case 'all':
3105
+ default:
3106
+ return nodes;
3107
+ }
3108
+ }
3109
+ /**
3110
+ * Get the list of allowed demo node IDs
3111
+ */
3112
+ export function getDemoAllowedNodeIds() {
3113
+ return [...DEMO_ALLOWED_NODE_IDS];
3114
+ }
3115
+ /**
3116
+ * Check if a node is allowed in demo mode
3117
+ */
3118
+ export function isNodeAllowedInDemo(nodeId) {
3119
+ return DEMO_ALLOWED_NODE_IDS.includes(nodeId);
3120
+ }
3121
+ /**
3122
+ * Get demo-specific nodes only
3123
+ */
3124
+ export function getDemoNodes() {
3125
+ return sampleNodes.filter((node) => node.tags?.includes('demo'));
3126
+ }
3127
+ /**
3128
+ * Get nodes by category with demo filtering
3129
+ */
3130
+ export function getNodesByCategory(category, demoConfig) {
3131
+ const nodes = demoConfig ? filterNodesForDemo(sampleNodes, demoConfig) : sampleNodes;
3132
+ return nodes.filter((node) => node.category === category);
3133
+ }
3134
+ /**
3135
+ * Search nodes with demo filtering
3136
+ */
3137
+ export function searchNodes(query, demoConfig) {
3138
+ const nodes = demoConfig ? filterNodesForDemo(sampleNodes, demoConfig) : sampleNodes;
3139
+ const searchTerm = query.toLowerCase();
3140
+ return nodes.filter((node) => node.name.toLowerCase().includes(searchTerm) ||
3141
+ node.description.toLowerCase().includes(searchTerm) ||
3142
+ node.tags?.some((tag) => tag.toLowerCase().includes(searchTerm)));
3143
+ }
1098
3144
  /**
1099
3145
  * Sample workflow for development
1100
3146
  * Updated to use the new node types
1101
3147
  */
1102
3148
  export const sampleWorkflow = {
1103
- id: uuidv4(),
1104
- name: "Simple Chat Workflow",
1105
- description: "A basic workflow demonstrating text input, processing, and model response",
3149
+ id: 'sample-simple-chat-workflow',
3150
+ name: 'Simple Chat Workflow',
3151
+ description: 'A basic workflow demonstrating direct text input to AI model response',
1106
3152
  nodes: [
1107
3153
  {
1108
- id: uuidv4(),
1109
- type: "text-input",
3154
+ id: 'sample-workflow-text-input',
3155
+ type: 'text-input',
1110
3156
  position: { x: 100, y: 100 },
1111
3157
  data: {
1112
- label: "Text Input",
3158
+ label: 'Text Input',
1113
3159
  config: {
1114
- placeholder: "Enter your question...",
1115
- defaultValue: "Hello, how are you?"
3160
+ placeholder: 'Enter your question...',
3161
+ defaultValue: 'Hello, how are you?'
1116
3162
  },
1117
- metadata: sampleNodes.find(n => n.name === "Text Input")
3163
+ metadata: sampleNodes.find((n) => n.name === 'Text Input')
1118
3164
  }
1119
3165
  },
1120
3166
  {
1121
- id: uuidv4(),
1122
- type: "split-text",
3167
+ id: 'sample-workflow-split-text',
3168
+ type: 'split-text',
1123
3169
  position: { x: 300, y: 100 },
1124
3170
  data: {
1125
- label: "Split Text",
3171
+ label: 'Split Text',
1126
3172
  config: {
1127
3173
  chunkSize: 500,
1128
3174
  chunkOverlap: 100,
1129
- separator: "\n"
3175
+ separator: '\n'
1130
3176
  },
1131
- metadata: sampleNodes.find(n => n.name === "Split Text")
3177
+ metadata: sampleNodes.find((n) => n.name === 'Split Text')
1132
3178
  }
1133
3179
  },
1134
3180
  {
1135
- id: uuidv4(),
1136
- type: "openai",
3181
+ id: 'sample-workflow-openai',
3182
+ type: 'openai',
1137
3183
  position: { x: 500, y: 100 },
1138
3184
  data: {
1139
- label: "OpenAI",
3185
+ label: 'OpenAI',
1140
3186
  config: {
1141
- model: "gpt-3.5-turbo",
3187
+ model: 'gpt-3.5-turbo',
1142
3188
  temperature: 0.7,
1143
3189
  maxTokens: 1000
1144
3190
  },
1145
- metadata: sampleNodes.find(n => n.name === "OpenAI")
3191
+ metadata: sampleNodes.find((n) => n.name === 'OpenAI')
1146
3192
  }
1147
3193
  },
1148
3194
  {
1149
- id: uuidv4(),
1150
- type: "chat-output",
3195
+ id: 'sample-workflow-note',
3196
+ type: 'note',
3197
+ position: { x: 500, y: 300 },
3198
+ data: {
3199
+ label: 'Workflow Notes',
3200
+ config: {
3201
+ content: '# Simple Chat Workflow\n\nThis workflow demonstrates a basic chat interaction:\n\n1. **Text Input** - User enters a question\n2. **OpenAI** - Processes the input and generates a response\n3. **Chat Output** - Displays the final response\n\n## Port Types Used\n- **string** - Text data flows between all nodes\n- Only compatible types can connect (string → string)\n\n## Usage\n- Drag a Notes node to add documentation\n- Double-click to edit in Markdown\n- Choose from 5 different note types',
3202
+ noteType: 'info'
3203
+ },
3204
+ metadata: sampleNodes.find((n) => n.name === 'Notes')
3205
+ }
3206
+ },
3207
+ {
3208
+ id: 'sample-workflow-chat-output',
3209
+ type: 'chat-output',
1151
3210
  position: { x: 700, y: 100 },
1152
3211
  data: {
1153
- label: "Chat Output",
3212
+ label: 'Chat Output',
1154
3213
  config: {
1155
3214
  showTimestamp: true,
1156
3215
  maxLength: 2000,
1157
3216
  markdown: true
1158
3217
  },
1159
- metadata: sampleNodes.find(n => n.name === "Chat Output")
3218
+ metadata: sampleNodes.find((n) => n.name === 'Chat Output')
1160
3219
  }
1161
3220
  }
1162
3221
  ],
1163
3222
  edges: [
1164
3223
  {
1165
- id: uuidv4(),
1166
- source: "text-input-1",
1167
- target: "split-text-1",
1168
- sourceHandle: "text",
1169
- targetHandle: "text"
1170
- },
1171
- {
1172
- id: uuidv4(),
1173
- source: "split-text-1",
1174
- target: "openai-1",
1175
- sourceHandle: "chunks",
1176
- targetHandle: "prompt"
3224
+ id: 'sample-workflow-edge-1',
3225
+ source: 'sample-workflow-text-input',
3226
+ target: 'sample-workflow-openai',
3227
+ sourceHandle: 'text',
3228
+ targetHandle: 'prompt'
1177
3229
  },
1178
3230
  {
1179
- id: uuidv4(),
1180
- source: "openai-1",
1181
- target: "chat-output-1",
1182
- sourceHandle: "response",
1183
- targetHandle: "message"
3231
+ id: 'sample-workflow-edge-2',
3232
+ source: 'sample-workflow-openai',
3233
+ target: 'sample-workflow-chat-output',
3234
+ sourceHandle: 'response',
3235
+ targetHandle: 'message'
1184
3236
  }
1185
3237
  ],
1186
3238
  metadata: {
1187
- version: "1.0.0",
3239
+ version: '1.0.0',
1188
3240
  createdAt: new Date().toISOString(),
1189
3241
  updatedAt: new Date().toISOString(),
1190
- author: "FlowDrop",
1191
- tags: ["sample", "chat", "demo", "langflow-style"]
3242
+ author: 'FlowDrop',
3243
+ tags: ['sample', 'chat', 'demo', 'langflow-style']
1192
3244
  }
1193
3245
  };