@d34dman/flowdrop 0.0.21 → 0.0.23

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 (51) hide show
  1. package/dist/components/App.svelte +69 -260
  2. package/dist/components/ConfigForm.svelte +357 -267
  3. package/dist/components/ConfigForm.svelte.d.ts +12 -3
  4. package/dist/components/ConfigPanel.svelte +160 -0
  5. package/dist/components/ConfigPanel.svelte.d.ts +32 -0
  6. package/dist/components/ReadOnlyDetails.svelte +168 -0
  7. package/dist/components/ReadOnlyDetails.svelte.d.ts +25 -0
  8. package/dist/components/WorkflowEditor.svelte +1 -1
  9. package/dist/components/form/FormArray.svelte +1049 -0
  10. package/dist/components/form/FormArray.svelte.d.ts +22 -0
  11. package/dist/components/form/FormCheckboxGroup.svelte +152 -0
  12. package/dist/components/form/FormCheckboxGroup.svelte.d.ts +15 -0
  13. package/dist/components/form/FormField.svelte +279 -0
  14. package/dist/components/form/FormField.svelte.d.ts +18 -0
  15. package/dist/components/form/FormFieldWrapper.svelte +133 -0
  16. package/dist/components/form/FormFieldWrapper.svelte.d.ts +18 -0
  17. package/dist/components/form/FormNumberField.svelte +109 -0
  18. package/dist/components/form/FormNumberField.svelte.d.ts +23 -0
  19. package/dist/components/form/FormSelect.svelte +126 -0
  20. package/dist/components/form/FormSelect.svelte.d.ts +18 -0
  21. package/dist/components/form/FormTextField.svelte +88 -0
  22. package/dist/components/form/FormTextField.svelte.d.ts +17 -0
  23. package/dist/components/form/FormTextarea.svelte +94 -0
  24. package/dist/components/form/FormTextarea.svelte.d.ts +19 -0
  25. package/dist/components/form/FormToggle.svelte +123 -0
  26. package/dist/components/form/FormToggle.svelte.d.ts +17 -0
  27. package/dist/components/form/index.d.ts +41 -0
  28. package/dist/components/form/index.js +45 -0
  29. package/dist/components/form/types.d.ts +208 -0
  30. package/dist/components/form/types.js +29 -0
  31. package/dist/components/nodes/GatewayNode.svelte +84 -12
  32. package/dist/components/nodes/NotesNode.svelte +89 -307
  33. package/dist/components/nodes/NotesNode.svelte.d.ts +3 -22
  34. package/dist/components/nodes/SimpleNode.svelte +41 -5
  35. package/dist/components/nodes/SimpleNode.svelte.d.ts +2 -1
  36. package/dist/components/nodes/SquareNode.svelte +41 -5
  37. package/dist/components/nodes/SquareNode.svelte.d.ts +2 -1
  38. package/dist/components/nodes/WorkflowNode.svelte +88 -5
  39. package/dist/index.d.ts +4 -4
  40. package/dist/index.js +3 -4
  41. package/dist/stores/workflowStore.d.ts +15 -0
  42. package/dist/stores/workflowStore.js +28 -0
  43. package/dist/types/index.d.ts +77 -0
  44. package/dist/types/index.js +16 -0
  45. package/package.json +3 -3
  46. package/dist/components/ConfigSidebar.svelte +0 -916
  47. package/dist/components/ConfigSidebar.svelte.d.ts +0 -51
  48. package/dist/config/demo.d.ts +0 -58
  49. package/dist/config/demo.js +0 -142
  50. package/dist/data/samples.d.ts +0 -51
  51. package/dist/data/samples.js +0 -3245
@@ -1,3245 +0,0 @@
1
- /**
2
- * Sample data for FlowDrop development and testing
3
- * Includes sample nodes and workflows for demonstration and testing purposes
4
- */
5
- import { CATEGORY_ICONS } from '../utils/icons.js';
6
- /**
7
- * Sample node data for development and testing
8
- * These represent the available node types in the workflow editor
9
- */
10
- export const sampleNodes = [
11
- // ===== INPUTS CATEGORY =====
12
- {
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',
22
- inputs: [],
23
- outputs: [
24
- {
25
- id: 'text',
26
- name: 'Text',
27
- type: 'output',
28
- dataType: 'string',
29
- description: 'User entered text'
30
- }
31
- ],
32
- configSchema: {
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
- }
59
- }
60
- },
61
- tags: ['input', 'text', 'user']
62
- },
63
- {
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',
73
- inputs: [],
74
- outputs: [
75
- {
76
- id: 'file',
77
- name: 'File',
78
- type: 'output',
79
- dataType: 'file',
80
- description: 'Uploaded file data'
81
- }
82
- ],
83
- configSchema: {
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
- }
110
- }
111
- },
112
- tags: ['input', 'file', 'upload']
113
- },
114
- {
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',
124
- inputs: [],
125
- outputs: [
126
- {
127
- id: 'data',
128
- name: 'Data',
129
- type: 'output',
130
- dataType: 'json',
131
- description: 'Webhook payload data'
132
- }
133
- ],
134
- configSchema: {
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
- }
163
- },
164
- tags: ['input', 'webhook', 'external']
165
- },
166
- // ===== OUTPUTS CATEGORY =====
167
- {
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',
177
- inputs: [
178
- {
179
- id: 'message',
180
- name: 'Message',
181
- type: 'input',
182
- dataType: 'string',
183
- required: true,
184
- description: 'Message to display'
185
- }
186
- ],
187
- outputs: [],
188
- configSchema: {
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
- }
222
- },
223
- tags: ['output', 'chat', 'display']
224
- },
225
- {
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',
235
- inputs: [
236
- {
237
- id: 'text',
238
- name: 'Text',
239
- type: 'input',
240
- dataType: 'string',
241
- required: true,
242
- description: 'Text to display'
243
- }
244
- ],
245
- outputs: [],
246
- configSchema: {
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
- }
274
- },
275
- tags: ['output', 'text', 'display']
276
- },
277
- // ===== PROMPTS CATEGORY =====
278
- {
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',
288
- inputs: [
289
- {
290
- id: 'variables',
291
- name: 'Variables',
292
- type: 'input',
293
- dataType: 'json',
294
- required: false,
295
- description: 'Variables to inject into template'
296
- }
297
- ],
298
- outputs: [
299
- {
300
- id: 'prompt',
301
- name: 'Prompt',
302
- type: 'output',
303
- dataType: 'string',
304
- description: 'Formatted prompt text'
305
- }
306
- ],
307
- configSchema: {
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
- }
335
- },
336
- tags: ['prompt', 'template', 'variables']
337
- },
338
- {
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',
348
- inputs: [
349
- {
350
- id: 'model',
351
- name: 'Model',
352
- type: 'input',
353
- dataType: 'json',
354
- required: true,
355
- description: 'Model to use'
356
- },
357
- {
358
- id: 'message',
359
- name: 'Message',
360
- type: 'input',
361
- dataType: 'string',
362
- required: true,
363
- description: 'Input message'
364
- }
365
- ],
366
- outputs: [
367
- {
368
- id: 'dataframe',
369
- name: 'DataFrame',
370
- type: 'output',
371
- dataType: 'json',
372
- description: 'Structured output as DataFrame'
373
- }
374
- ],
375
- configSchema: {
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
- }
392
- },
393
- tags: ['prompt', 'structured', 'output', 'schema']
394
- },
395
- // ===== MODELS CATEGORY =====
396
- {
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',
406
- inputs: [
407
- {
408
- id: 'prompt',
409
- name: 'Prompt',
410
- type: 'input',
411
- dataType: 'string',
412
- required: true,
413
- description: 'Input prompt for the model'
414
- },
415
- {
416
- id: 'system_message',
417
- name: 'System Message',
418
- type: 'input',
419
- dataType: 'string',
420
- required: false,
421
- description: 'System message to set behavior'
422
- }
423
- ],
424
- outputs: [
425
- {
426
- id: 'response',
427
- name: 'Response',
428
- type: 'output',
429
- dataType: 'string',
430
- description: 'Model response'
431
- },
432
- {
433
- id: 'usage',
434
- name: 'Usage',
435
- type: 'output',
436
- dataType: 'json',
437
- description: 'Token usage information'
438
- }
439
- ],
440
- configSchema: {
441
- type: 'object',
442
- properties: {
443
- model: {
444
- type: 'string',
445
- title: 'Model',
446
- description: 'OpenAI model to use',
447
- default: 'gpt-4o-mini',
448
- enum: ['gpt-4o-mini', 'gpt-5-chat-latest', 'gpt-4.1']
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
- }
473
- },
474
- tags: ['model', 'openai', 'gpt', 'chat']
475
- },
476
- {
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',
486
- inputs: [
487
- {
488
- id: 'prompt',
489
- name: 'Prompt',
490
- type: 'input',
491
- dataType: 'string',
492
- required: true,
493
- description: 'Input prompt for the model'
494
- }
495
- ],
496
- outputs: [
497
- {
498
- id: 'response',
499
- name: 'Response',
500
- type: 'output',
501
- dataType: 'string',
502
- description: 'Model response'
503
- }
504
- ],
505
- configSchema: {
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
- }
538
- },
539
- tags: ['model', 'anthropic', 'claude']
540
- },
541
- {
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',
551
- inputs: [
552
- {
553
- id: 'prompt',
554
- name: 'Prompt',
555
- type: 'input',
556
- dataType: 'string',
557
- required: true,
558
- description: 'Input prompt for the model'
559
- }
560
- ],
561
- outputs: [
562
- {
563
- id: 'response',
564
- name: 'Response',
565
- type: 'output',
566
- dataType: 'string',
567
- description: 'Model response'
568
- }
569
- ],
570
- configSchema: {
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
- }
603
- },
604
- tags: ['model', 'groq', 'fast', 'inference']
605
- },
606
- // ===== PROCESSING CATEGORY =====
607
- {
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',
617
- inputs: [
618
- {
619
- id: 'text',
620
- name: 'Text',
621
- type: 'input',
622
- dataType: 'string',
623
- required: true,
624
- description: 'Text to split'
625
- }
626
- ],
627
- outputs: [
628
- {
629
- id: 'chunks',
630
- name: 'Chunks',
631
- type: 'output',
632
- dataType: 'string[]',
633
- description: 'Split text chunks'
634
- },
635
- {
636
- id: 'dataframe',
637
- name: 'DataFrame',
638
- type: 'output',
639
- dataType: 'json',
640
- description: 'Chunks as structured data'
641
- }
642
- ],
643
- configSchema: {
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
- }
669
- },
670
- tags: ['processing', 'text', 'split', 'chunking']
671
- },
672
- {
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',
680
- inputs: [
681
- {
682
- id: 'data',
683
- name: 'Data',
684
- type: 'input',
685
- dataType: 'json',
686
- required: true,
687
- description: 'Data to operate on'
688
- }
689
- ],
690
- outputs: [
691
- {
692
- id: 'result',
693
- name: 'Result',
694
- type: 'output',
695
- dataType: 'json',
696
- description: 'Processed data result'
697
- }
698
- ],
699
- configSchema: {
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
- }
728
- },
729
- tags: ['processing', 'data', 'operations']
730
- },
731
- {
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',
739
- inputs: [
740
- {
741
- id: 'dataframe',
742
- name: 'DataFrame',
743
- type: 'input',
744
- dataType: 'json',
745
- required: true,
746
- description: 'DataFrame to operate on'
747
- }
748
- ],
749
- outputs: [
750
- {
751
- id: 'result',
752
- name: 'Result',
753
- type: 'output',
754
- dataType: 'json',
755
- description: 'Processed DataFrame'
756
- }
757
- ],
758
- configSchema: {
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
- }
787
- },
788
- tags: ['processing', 'dataframe', 'table', 'operations']
789
- },
790
- {
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',
798
- inputs: [
799
- {
800
- id: 'text',
801
- name: 'Text',
802
- type: 'input',
803
- dataType: 'string',
804
- required: true,
805
- description: 'Text to extract from'
806
- }
807
- ],
808
- outputs: [
809
- {
810
- id: 'matches',
811
- name: 'Matches',
812
- type: 'output',
813
- dataType: 'string[]',
814
- description: 'Extracted matches'
815
- }
816
- ],
817
- configSchema: {
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
- }
834
- },
835
- tags: ['processing', 'regex', 'extract', 'pattern']
836
- },
837
- {
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',
845
- inputs: [
846
- {
847
- id: 'data',
848
- name: 'Data',
849
- type: 'input',
850
- dataType: 'json',
851
- required: true,
852
- description: 'Data to process'
853
- },
854
- {
855
- id: 'model',
856
- name: 'Model',
857
- type: 'input',
858
- dataType: 'json',
859
- required: true,
860
- description: 'Model for function generation'
861
- }
862
- ],
863
- outputs: [
864
- {
865
- id: 'filtered_data',
866
- name: 'Filtered Data',
867
- type: 'output',
868
- dataType: 'json',
869
- description: 'Processed data'
870
- },
871
- {
872
- id: 'dataframe',
873
- name: 'DataFrame',
874
- type: 'output',
875
- dataType: 'json',
876
- description: 'Processed data as DataFrame'
877
- }
878
- ],
879
- configSchema: {
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
- }
905
- },
906
- tags: ['processing', 'smart', 'function', 'model']
907
- },
908
- // ===== LOGIC CATEGORY =====
909
- {
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',
917
- inputs: [
918
- {
919
- id: 'input_text',
920
- name: 'Input Text',
921
- type: 'input',
922
- dataType: 'string',
923
- required: true,
924
- description: 'Text to evaluate'
925
- },
926
- {
927
- id: 'match_text',
928
- name: 'Match Text',
929
- type: 'input',
930
- dataType: 'string',
931
- required: true,
932
- description: 'Text to compare against'
933
- }
934
- ],
935
- outputs: [
936
- {
937
- id: 'true_result',
938
- name: 'True',
939
- type: 'output',
940
- dataType: 'string',
941
- description: 'Output when condition is true'
942
- },
943
- {
944
- id: 'false_result',
945
- name: 'False',
946
- type: 'output',
947
- dataType: 'string',
948
- description: 'Output when condition is false'
949
- }
950
- ],
951
- configSchema: {
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
- }
968
- },
969
- tags: ['conditional', 'logic', 'routing', 'if-else']
970
- },
971
- {
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',
979
- inputs: [
980
- {
981
- id: 'data',
982
- name: 'Data',
983
- type: 'input',
984
- dataType: 'json[]',
985
- required: true,
986
- description: 'Data to iterate over'
987
- }
988
- ],
989
- outputs: [
990
- {
991
- id: 'item',
992
- name: 'Item',
993
- type: 'output',
994
- dataType: 'json',
995
- description: 'Current item in iteration'
996
- },
997
- {
998
- id: 'done',
999
- name: 'Done',
1000
- type: 'output',
1001
- dataType: 'json',
1002
- description: 'Aggregated results when complete'
1003
- }
1004
- ],
1005
- configSchema: {
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
- }
1017
- },
1018
- tags: ['conditional', 'logic', 'loop', 'iteration']
1019
- },
1020
- // ===== DATA CATEGORY =====
1021
- {
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',
1029
- inputs: [
1030
- {
1031
- id: 'data_list',
1032
- name: 'Data List',
1033
- type: 'input',
1034
- dataType: 'json[]',
1035
- required: true,
1036
- description: 'List of Data objects to convert'
1037
- }
1038
- ],
1039
- outputs: [
1040
- {
1041
- id: 'dataframe',
1042
- name: 'DataFrame',
1043
- type: 'output',
1044
- dataType: 'json',
1045
- description: 'Converted DataFrame'
1046
- }
1047
- ],
1048
- configSchema: {
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
- }
1058
- },
1059
- tags: ['data', 'dataframe', 'convert', 'table']
1060
- },
1061
- {
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',
1069
- inputs: [
1070
- {
1071
- id: 'message',
1072
- name: 'Message',
1073
- type: 'input',
1074
- dataType: 'string',
1075
- required: true,
1076
- description: 'Message to convert'
1077
- }
1078
- ],
1079
- outputs: [
1080
- {
1081
- id: 'data',
1082
- name: 'Data',
1083
- type: 'output',
1084
- dataType: 'json',
1085
- description: 'Converted Data object'
1086
- }
1087
- ],
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']
1101
- },
1102
- {
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',
1110
- inputs: [
1111
- {
1112
- id: 'data',
1113
- name: 'Data',
1114
- type: 'input',
1115
- dataType: 'json',
1116
- required: true,
1117
- description: 'Data to save'
1118
- }
1119
- ],
1120
- outputs: [
1121
- {
1122
- id: 'confirmation',
1123
- name: 'Confirmation',
1124
- type: 'output',
1125
- dataType: 'string',
1126
- description: 'Save confirmation message'
1127
- }
1128
- ],
1129
- configSchema: {
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
- }
1146
- },
1147
- tags: ['data', 'save', 'file', 'export']
1148
- },
1149
- // ===== TOOLS CATEGORY =====
1150
- {
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',
1404
- inputs: [
1405
- {
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',
1590
- required: true,
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'
1670
- }
1671
- ],
1672
- outputs: [
1673
- {
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'
1693
- }
1694
- ],
1695
- configSchema: {
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
- }
1719
- },
1720
- tags: ['tools', 'date', 'time', 'format']
1721
- },
1722
- {
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',
1764
- inputs: [
1765
- {
1766
- id: 'input',
1767
- name: 'Input',
1768
- type: 'input',
1769
- dataType: 'mixed',
1770
- required: false,
1771
- description: 'Optional input data'
1772
- }
1773
- ],
1774
- outputs: [
1775
- {
1776
- id: 'output',
1777
- name: 'Output',
1778
- type: 'output',
1779
- dataType: 'mixed',
1780
- description: 'Optional output data'
1781
- },
1782
- {
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'
1788
- }
1789
- ],
1790
- configSchema: {
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
- }
1834
- },
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']
1905
- },
1906
- // ===== EMBEDDINGS CATEGORY =====
1907
- {
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',
1915
- inputs: [
1916
- {
1917
- id: 'text',
1918
- name: 'Text',
1919
- type: 'input',
1920
- dataType: 'string',
1921
- required: true,
1922
- description: 'Text to embed'
1923
- }
1924
- ],
1925
- outputs: [
1926
- {
1927
- id: 'embeddings',
1928
- name: 'Embeddings',
1929
- type: 'output',
1930
- dataType: 'number[]',
1931
- description: 'Generated embeddings'
1932
- }
1933
- ],
1934
- configSchema: {
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
- }
1951
- },
1952
- tags: ['embeddings', 'openai', 'vector']
1953
- },
1954
- {
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',
1962
- inputs: [
1963
- {
1964
- id: 'text',
1965
- name: 'Text',
1966
- type: 'input',
1967
- dataType: 'string',
1968
- required: true,
1969
- description: 'Text to embed'
1970
- }
1971
- ],
1972
- outputs: [
1973
- {
1974
- id: 'embeddings',
1975
- name: 'Embeddings',
1976
- type: 'output',
1977
- dataType: 'number[]',
1978
- description: 'Generated embeddings'
1979
- }
1980
- ],
1981
- configSchema: {
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
- }
1997
- },
1998
- tags: ['embeddings', 'huggingface', 'vector']
1999
- },
2000
- // ===== MEMORIES CATEGORY =====
2001
- {
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',
2009
- inputs: [
2010
- {
2011
- id: 'message',
2012
- name: 'Message',
2013
- type: 'input',
2014
- dataType: 'string',
2015
- required: true,
2016
- description: 'Message to add to buffer'
2017
- }
2018
- ],
2019
- outputs: [
2020
- {
2021
- id: 'history',
2022
- name: 'History',
2023
- type: 'output',
2024
- dataType: 'string[]',
2025
- description: 'Conversation history'
2026
- }
2027
- ],
2028
- configSchema: {
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
- }
2046
- },
2047
- tags: ['memory', 'conversation', 'history', 'buffer']
2048
- },
2049
- // ===== AGENTS CATEGORY =====
2050
- {
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'],
2060
- inputs: [
2061
- {
2062
- id: 'message',
2063
- name: 'Message',
2064
- type: 'input',
2065
- dataType: 'string',
2066
- required: true,
2067
- description: 'User message for agent'
2068
- },
2069
- {
2070
- id: 'tools',
2071
- name: 'Tools',
2072
- type: 'input',
2073
- dataType: 'tool',
2074
- required: false,
2075
- description: 'Tool interfaces available to agent - connect to tool output ports'
2076
- }
2077
- ],
2078
- outputs: [
2079
- {
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'
2093
- }
2094
- ],
2095
- configSchema: {
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-4o-mini',
2111
- enum: ['gpt-4o-mini', 'gpt-5-chat-latest', '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
- }
2130
- },
2131
- tags: ['agent', 'orchestration', 'tools']
2132
- },
2133
- // ===== VECTOR STORES CATEGORY =====
2134
- {
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',
2427
- inputs: [
2428
- {
2429
- id: 'content_to_analyze',
2430
- name: 'Content to Analyze',
2431
- type: 'input',
2432
- dataType: 'string',
2433
- required: true,
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'
2465
- },
2466
- {
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',
2554
- required: false,
2555
- description: 'Tools available to agent'
2556
- }
2557
- ],
2558
- outputs: [
2559
- {
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'
2572
- },
2573
- {
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'
2587
- }
2588
- ],
2589
- configSchema: {
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-5-chat-latest',
2605
- enum: ['gpt-4o-mini', 'gpt-5-chat-latest', '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
- }
2635
- },
2636
- tags: ['demo', 'content-management', 'ai', 'analysis', 'quality-control']
2637
- },
2638
- {
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',
2648
- inputs: [
2649
- {
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',
2670
- required: true,
2671
- description: 'Specific instructions for how to edit the content'
2672
- },
2673
- {
2674
- id: 'tools',
2675
- name: 'Tools',
2676
- type: 'input',
2677
- dataType: 'tool',
2678
- required: false,
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-5-chat-latest',
2729
- enum: ['gpt-4o-mini', 'gpt-5-chat-latest', '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'
2897
- }
2898
- ],
2899
- outputs: [
2900
- {
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'
2927
- }
2928
- ],
2929
- configSchema: {
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
- }
2981
- },
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']
3058
- }
3059
- ];
3060
- // Export category icons for use in other components
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
- }
3144
- /**
3145
- * Sample workflow for development
3146
- * Updated to use the new node types
3147
- */
3148
- export const sampleWorkflow = {
3149
- id: 'sample-simple-chat-workflow',
3150
- name: 'Simple Chat Workflow',
3151
- description: 'A basic workflow demonstrating direct text input to AI model response',
3152
- nodes: [
3153
- {
3154
- id: 'sample-workflow-text-input',
3155
- type: 'text-input',
3156
- position: { x: 100, y: 100 },
3157
- data: {
3158
- label: 'Text Input',
3159
- config: {
3160
- placeholder: 'Enter your question...',
3161
- defaultValue: 'Hello, how are you?'
3162
- },
3163
- metadata: sampleNodes.find((n) => n.name === 'Text Input')
3164
- }
3165
- },
3166
- {
3167
- id: 'sample-workflow-split-text',
3168
- type: 'split-text',
3169
- position: { x: 300, y: 100 },
3170
- data: {
3171
- label: 'Split Text',
3172
- config: {
3173
- chunkSize: 500,
3174
- chunkOverlap: 100,
3175
- separator: '\n'
3176
- },
3177
- metadata: sampleNodes.find((n) => n.name === 'Split Text')
3178
- }
3179
- },
3180
- {
3181
- id: 'sample-workflow-openai',
3182
- type: 'openai',
3183
- position: { x: 500, y: 100 },
3184
- data: {
3185
- label: 'OpenAI',
3186
- config: {
3187
- model: 'gpt-4o-mini',
3188
- temperature: 0.7,
3189
- maxTokens: 1000
3190
- },
3191
- metadata: sampleNodes.find((n) => n.name === 'OpenAI')
3192
- }
3193
- },
3194
- {
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',
3210
- position: { x: 700, y: 100 },
3211
- data: {
3212
- label: 'Chat Output',
3213
- config: {
3214
- showTimestamp: true,
3215
- maxLength: 2000,
3216
- markdown: true
3217
- },
3218
- metadata: sampleNodes.find((n) => n.name === 'Chat Output')
3219
- }
3220
- }
3221
- ],
3222
- edges: [
3223
- {
3224
- id: 'sample-workflow-edge-1',
3225
- source: 'sample-workflow-text-input',
3226
- target: 'sample-workflow-openai',
3227
- sourceHandle: 'text',
3228
- targetHandle: 'prompt'
3229
- },
3230
- {
3231
- id: 'sample-workflow-edge-2',
3232
- source: 'sample-workflow-openai',
3233
- target: 'sample-workflow-chat-output',
3234
- sourceHandle: 'response',
3235
- targetHandle: 'message'
3236
- }
3237
- ],
3238
- metadata: {
3239
- version: '1.0.0',
3240
- createdAt: new Date().toISOString(),
3241
- updatedAt: new Date().toISOString(),
3242
- author: 'FlowDrop',
3243
- tags: ['sample', 'chat', 'demo', 'langflow-style']
3244
- }
3245
- };