@fractal-solutions/qflow 1.0.62 → 1.0.63

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 (109) hide show
  1. package/package.json +1 -1
  2. package/dist/agent/agent.d.ts +0 -23
  3. package/dist/agent/agent.js +0 -365
  4. package/dist/agent/base_agent.d.ts +0 -21
  5. package/dist/agent/base_agent.js +0 -206
  6. package/dist/agent/logger.d.ts +0 -9
  7. package/dist/agent/logger.js +0 -45
  8. package/dist/agent/lpavrl_agent.d.ts +0 -5
  9. package/dist/agent/lpavrl_agent.js +0 -178
  10. package/dist/agent/ooda_agent.d.ts +0 -5
  11. package/dist/agent/ooda_agent.js +0 -167
  12. package/dist/agent/pema_agent.d.ts +0 -5
  13. package/dist/agent/pema_agent.js +0 -171
  14. package/dist/agent/raor_agent.d.ts +0 -5
  15. package/dist/agent/raor_agent.js +0 -164
  16. package/dist/agent/tools.d.ts +0 -5378
  17. package/dist/agent/tools.js +0 -1174
  18. package/dist/logger.d.ts +0 -9
  19. package/dist/logger.js +0 -107
  20. package/dist/nodes/agent_llm.d.ts +0 -31
  21. package/dist/nodes/agent_llm.js +0 -302
  22. package/dist/nodes/browser_control.d.ts +0 -4
  23. package/dist/nodes/browser_control.js +0 -73
  24. package/dist/nodes/code_interpreter.d.ts +0 -9
  25. package/dist/nodes/code_interpreter.js +0 -121
  26. package/dist/nodes/data_extractor.d.ts +0 -5
  27. package/dist/nodes/data_extractor.js +0 -81
  28. package/dist/nodes/data_validation.d.ts +0 -9
  29. package/dist/nodes/data_validation.js +0 -48
  30. package/dist/nodes/database.d.ts +0 -6
  31. package/dist/nodes/database.js +0 -89
  32. package/dist/nodes/display_image.d.ts +0 -4
  33. package/dist/nodes/display_image.js +0 -47
  34. package/dist/nodes/embedding.d.ts +0 -7
  35. package/dist/nodes/embedding.js +0 -45
  36. package/dist/nodes/filesystem.d.ts +0 -41
  37. package/dist/nodes/filesystem.js +0 -88
  38. package/dist/nodes/gis.d.ts +0 -37
  39. package/dist/nodes/gis.js +0 -106
  40. package/dist/nodes/git.d.ts +0 -4
  41. package/dist/nodes/git.js +0 -55
  42. package/dist/nodes/github.d.ts +0 -27
  43. package/dist/nodes/github.js +0 -75
  44. package/dist/nodes/hackernews.d.ts +0 -19
  45. package/dist/nodes/hackernews.js +0 -47
  46. package/dist/nodes/hardware_interaction.d.ts +0 -8
  47. package/dist/nodes/hardware_interaction.js +0 -98
  48. package/dist/nodes/http.d.ts +0 -26
  49. package/dist/nodes/http.js +0 -67
  50. package/dist/nodes/http_server.d.ts +0 -17
  51. package/dist/nodes/http_server.js +0 -190
  52. package/dist/nodes/image_gallery.d.ts +0 -8
  53. package/dist/nodes/image_gallery.js +0 -100
  54. package/dist/nodes/index.d.ts +0 -48
  55. package/dist/nodes/index.js +0 -48
  56. package/dist/nodes/interactive_input.d.ts +0 -4
  57. package/dist/nodes/interactive_input.js +0 -71
  58. package/dist/nodes/interactive_webview.d.ts +0 -19
  59. package/dist/nodes/interactive_webview.js +0 -310
  60. package/dist/nodes/iterator.d.ts +0 -5
  61. package/dist/nodes/iterator.js +0 -23
  62. package/dist/nodes/llm.d.ts +0 -18
  63. package/dist/nodes/llm.js +0 -215
  64. package/dist/nodes/memory.d.ts +0 -12
  65. package/dist/nodes/memory.js +0 -48
  66. package/dist/nodes/multimedia_processing.d.ts +0 -10
  67. package/dist/nodes/multimedia_processing.js +0 -80
  68. package/dist/nodes/openrouter_llm.d.ts +0 -8
  69. package/dist/nodes/openrouter_llm.js +0 -124
  70. package/dist/nodes/pdf_processor.d.ts +0 -4
  71. package/dist/nodes/pdf_processor.js +0 -75
  72. package/dist/nodes/remote_execution.d.ts +0 -4
  73. package/dist/nodes/remote_execution.js +0 -83
  74. package/dist/nodes/s3.d.ts +0 -6
  75. package/dist/nodes/s3.js +0 -38
  76. package/dist/nodes/scheduler.d.ts +0 -20
  77. package/dist/nodes/scheduler.js +0 -98
  78. package/dist/nodes/search.d.ts +0 -25
  79. package/dist/nodes/search.js +0 -78
  80. package/dist/nodes/semantic_memory.d.ts +0 -17
  81. package/dist/nodes/semantic_memory.js +0 -111
  82. package/dist/nodes/shell.d.ts +0 -11
  83. package/dist/nodes/shell.js +0 -29
  84. package/dist/nodes/speech_synthesis.d.ts +0 -45
  85. package/dist/nodes/speech_synthesis.js +0 -142
  86. package/dist/nodes/spreadsheet.d.ts +0 -10
  87. package/dist/nodes/spreadsheet.js +0 -241
  88. package/dist/nodes/stripe.d.ts +0 -23
  89. package/dist/nodes/stripe.js +0 -69
  90. package/dist/nodes/subflow.d.ts +0 -5
  91. package/dist/nodes/subflow.js +0 -16
  92. package/dist/nodes/summarize.d.ts +0 -12
  93. package/dist/nodes/summarize.js +0 -31
  94. package/dist/nodes/system_notification.d.ts +0 -4
  95. package/dist/nodes/system_notification.js +0 -50
  96. package/dist/nodes/transform.d.ts +0 -5
  97. package/dist/nodes/transform.js +0 -32
  98. package/dist/nodes/user.d.ts +0 -11
  99. package/dist/nodes/user.js +0 -32
  100. package/dist/nodes/webhook.d.ts +0 -15
  101. package/dist/nodes/webhook.js +0 -125
  102. package/dist/nodes/webscraper.d.ts +0 -11
  103. package/dist/nodes/webscraper.js +0 -33
  104. package/dist/nodes/websockets.d.ts +0 -4
  105. package/dist/nodes/websockets.js +0 -73
  106. package/dist/nodes/webview.d.ts +0 -12
  107. package/dist/nodes/webview.js +0 -27
  108. package/dist/qflow.d.ts +0 -69
  109. package/dist/qflow.js +0 -320
@@ -1,1174 +0,0 @@
1
- export function getToolDefinitions() {
2
- return [
3
- {
4
- name: "huggingface_llm_reasoning",
5
- description: "Generates human-like text, reasons, and plans. Not for external actions.",
6
- parameters: {
7
- type: "object",
8
- properties: {
9
- prompt: {
10
- type: "string",
11
- description: "The prompt or question to send to the language model."
12
- },
13
- model: {
14
- type: "string",
15
- description: "The Hugging Face model ID (e.g., 'HuggingFaceH4/zephyr-7b-beta', 'openai/gpt-oss-20b:novita')."
16
- },
17
- hfToken: {
18
- type: "string",
19
- description: "Your Hugging Face API token."
20
- },
21
- temperature: {
22
- type: "number",
23
- description: "Optional. Controls randomness. Defaults to 0.7."
24
- },
25
- max_new_tokens: {
26
- type: "number",
27
- description: "Optional. Maximum number of tokens to generate. Defaults to 500."
28
- },
29
- baseUrl: {
30
- type: "string",
31
- description: "Optional. The base URL of the Hugging Face router API. Defaults to 'https://router.huggingface.co/v1'."
32
- }
33
- },
34
- required: ["prompt", "model", "hfToken"]
35
- }
36
- },
37
- {
38
- name: "semantic_memory_node",
39
- description: "Stores and retrieves text memories via semantic search (requires Ollama).",
40
- parameters: {
41
- type: "object",
42
- properties: {
43
- action: {
44
- type: "string",
45
- enum: ["store", "retrieve"],
46
- description: "The action to perform: 'store' a new memory or 'retrieve' existing ones."
47
- },
48
- content: {
49
- type: "string",
50
- description: "Required for 'store' action. The text content of the memory to store."
51
- },
52
- query: {
53
- type: "string",
54
- description: "Required for 'retrieve' action. The text query for semantic search."
55
- },
56
- id: {
57
- type: "string",
58
- description: "Optional for 'store' action. A unique identifier for the memory. If not provided, one will be generated."
59
- },
60
- metadata: {
61
- type: "object",
62
- description: "Optional for 'store' action. Key-value pairs to store alongside the memory."
63
- },
64
- memoryPath: {
65
- type: "string",
66
- description: "Optional. The directory path where memories and the index are stored. Defaults to './semantic_memories'."
67
- },
68
- embeddingModel: {
69
- type: "string",
70
- description: "Optional. The Ollama embedding model name to use (e.g., 'nomic-embed-text'). Defaults to 'nomic-embed-text'."
71
- },
72
- embeddingBaseUrl: {
73
- type: "string",
74
- description: "Optional. The base URL of the Ollama API for embeddings. Defaults to 'http://localhost:11434'."
75
- },
76
- topK: {
77
- type: "number",
78
- description: "Optional for 'retrieve' action. The number of top similar results to retrieve. Defaults to 5."
79
- }
80
- },
81
- required: ["action"]
82
- }
83
- },
84
- {
85
- name: "generate_embedding",
86
- description: "Generates vector embeddings for text (requires Ollama).",
87
- parameters: {
88
- type: "object",
89
- properties: {
90
- text: {
91
- type: "string",
92
- description: "The text string to generate an embedding for."
93
- },
94
- model: {
95
- type: "string",
96
- description: "Optional. The Ollama embedding model name to use (e.g., 'nomic-embed-text'). Defaults to 'nomic-embed-text'."
97
- },
98
- baseUrl: {
99
- type: "string",
100
- description: "Optional. The base URL of the Ollama API (e.g., 'http://localhost:11434'). Defaults to 'http://localhost:11434'."
101
- }
102
- },
103
- required: ["text"]
104
- }
105
- },
106
- {
107
- name: "transform_node",
108
- description: "Transforms data using a JavaScript function.",
109
- parameters: {
110
- type: "object",
111
- properties: {
112
- input: {
113
- type: "object", // Can be any type of data
114
- description: "The data to be transformed."
115
- },
116
- transformFunction: {
117
- type: "string",
118
- description: "A JavaScript function string (e.g., '(data) => data.map(item => item.name)') that takes 'data' as an argument and returns the transformed result."
119
- }
120
- },
121
- required: ["input", "transformFunction"]
122
- }
123
- },
124
- {
125
- name: "memory_node",
126
- description: "Stores and retrieves text memories (keyword-based).",
127
- parameters: {
128
- type: "object",
129
- properties: {
130
- action: {
131
- type: "string",
132
- enum: ["store", "retrieve"],
133
- description: "The action to perform: 'store' a new memory or 'retrieve' existing ones."
134
- },
135
- content: {
136
- type: "string",
137
- description: "Required for 'store' action. The text content of the memory to store."
138
- },
139
- query: {
140
- type: "string",
141
- description: "Required for 'retrieve' action. Keywords to search for within stored memories."
142
- },
143
- id: {
144
- type: "string",
145
- description: "Optional for 'store' action. A unique identifier for the memory. If not provided, one will be generated."
146
- },
147
- memoryPath: {
148
- type: "string",
149
- description: "Optional. The directory path where memories are stored. Defaults to './agent_memories'."
150
- }
151
- },
152
- required: ["action"]
153
- }
154
- },
155
- {
156
- name: "llm_reasoning",
157
- description: "Generates human-like text, reasons, and plans. Not for external actions.",
158
- parameters: {
159
- type: "object",
160
- properties: {
161
- prompt: {
162
- type: "string",
163
- description: "The prompt or question to send to the language model."
164
- }
165
- },
166
- required: ["prompt"]
167
- }
168
- },
169
- {
170
- name: "openrouter_llm_reasoning",
171
- description: "Generates human-like text, reasons, and plans via OpenRouter. Not for external actions.",
172
- parameters: {
173
- type: "object",
174
- properties: {
175
- prompt: {
176
- type: "string",
177
- description: "The prompt or question to send to the language model."
178
- },
179
- model: {
180
- type: "string",
181
- description: "The OpenRouter model ID (e.g., 'openai/gpt-4o', 'mistralai/mistral-7b-instruct')."
182
- },
183
- apiKey: {
184
- type: "string",
185
- description: "Your OpenRouter API key."
186
- },
187
- siteUrl: {
188
- type: "string",
189
- description: "Optional. Site URL for rankings on openrouter.ai."
190
- },
191
- siteTitle: {
192
- type: "string",
193
- description: "Optional. Site title for rankings on openrouter.ai."
194
- }
195
- },
196
- required: ["prompt", "model", "apiKey"]
197
- }
198
- },
199
- {
200
- name: "ollama_llm_reasoning",
201
- description: "Generates human-like text, reasons, and plans locally via Ollama. Not for external actions.",
202
- parameters: {
203
- type: "object",
204
- properties: {
205
- prompt: {
206
- type: "string",
207
- description: "The prompt or question to send to the local Ollama language model."
208
- },
209
- model: {
210
- type: "string",
211
- description: "The Ollama model name to use (e.g., 'llama2', 'gemma:2b'). Defaults to 'llama2'."
212
- },
213
- baseUrl: {
214
- type: "string",
215
- description: "The base URL of the Ollama API (e.g., 'http://localhost:11434'). Defaults to 'http://localhost:11434'."
216
- }
217
- },
218
- required: ["prompt"]
219
- }
220
- },
221
- {
222
- name: "data_extractor",
223
- description: "Extracts structured data from HTML, JSON, or text.",
224
- parameters: {
225
- type: "object",
226
- properties: {
227
- input: {
228
- type: "string",
229
- description: "The content string from which to extract data."
230
- },
231
- type: {
232
- type: "string",
233
- enum: ["html", "json", "text"],
234
- description: "The type of content to extract from (html, json, or text)."
235
- },
236
- selector: {
237
- type: "string",
238
- description: "Required for 'html' type. A CSS selector to target elements."
239
- },
240
- jsonPath: {
241
- type: "string",
242
- description: "Required for 'json' type. A dot-notation path to extract data (e.g., 'data.items[0].name')."
243
- },
244
- regex: {
245
- type: "string",
246
- description: "Required for 'text' type. A regular expression to match and extract data."
247
- },
248
- group: {
249
- type: "number",
250
- description: "Optional for 'text' type. The capturing group index to return from the regex match."
251
- }
252
- },
253
- required: ["input", "type"]
254
- }
255
- },
256
- {
257
- name: "pdf_processor",
258
- description: "Extracts text or images from PDF documents.",
259
- parameters: {
260
- type: "object",
261
- properties: {
262
- filePath: {
263
- type: "string",
264
- description: "The absolute path to the PDF file."
265
- },
266
- action: {
267
- type: "string",
268
- enum: ["extract_text", "extract_images"],
269
- description: "The action to perform: 'extract_text' or 'extract_images'."
270
- },
271
- outputDir: {
272
- type: "string",
273
- description: "Optional. Directory to save extracted files. If not provided, a temporary directory will be used."
274
- },
275
- pageRange: {
276
- type: "object",
277
- properties: {
278
- start: { type: "number" },
279
- end: { type: "number" }
280
- },
281
- description: "Optional. Page range to process (e.g., {start: 1, end: 5})."
282
- },
283
- password: {
284
- type: "string",
285
- description: "Optional. Password for encrypted PDFs."
286
- }
287
- },
288
- required: ["filePath", "action"]
289
- }
290
- },
291
- {
292
- name: "gis",
293
- description: "Performs Geographic Information System (GIS) operations like geocoding and reverse geocoding.",
294
- parameters: {
295
- type: "object",
296
- properties: {
297
- operation: {
298
- type: "string",
299
- enum: ["geocode", "reverseGeocode"],
300
- description: "The GIS operation to perform: 'geocode' (address to coordinates) or 'reverseGeocode' (coordinates to address)."
301
- },
302
- provider: {
303
- type: "string",
304
- enum: ["google", "openstreetmap"],
305
- default: "openstreetmap",
306
- description: "The GIS service provider to use. Defaults to 'openstreetmap' (free, open-source)."
307
- },
308
- params: {
309
- type: "object",
310
- description: "Parameters specific to the operation. For 'geocode', requires { address: string }. For 'reverseGeocode', requires { lat: number, lng: number }."
311
- }
312
- },
313
- required: ["operation", "params"]
314
- }
315
- },
316
- {
317
- name: "display_image",
318
- description: "Displays an image file using the system's default image viewer.",
319
- parameters: {
320
- type: "object",
321
- properties: {
322
- imagePath: {
323
- type: "string",
324
- description: "The absolute path to the image file to display."
325
- }
326
- },
327
- required: ["imagePath"]
328
- }
329
- },
330
- {
331
- name: "hardware_interaction",
332
- description: "Communicates with local hardware via serial port (UART).",
333
- parameters: {
334
- type: "object",
335
- properties: {
336
- action: {
337
- type: "string",
338
- enum: ["write", "read_line", "list_ports"],
339
- description: "The action to perform: 'write' data, 'read_line' from port, or 'list_ports' available."
340
- },
341
- portPath: {
342
- type: "string",
343
- description: "Required for 'write'/'read_line'. The path to the serial port (e.g., '/dev/ttyUSB0', 'COM1')."
344
- },
345
- baudRate: {
346
- type: "number",
347
- description: "Optional. The baud rate for serial communication. Defaults to 9600."
348
- },
349
- dataToWrite: {
350
- type: "string",
351
- description: "Required for 'write'. The data string to send to the serial port."
352
- },
353
- timeout: {
354
- type: "number",
355
- description: "Optional. Timeout in milliseconds for 'read_line' action. Defaults to 5000."
356
- }
357
- },
358
- required: ["action"]
359
- }
360
- },
361
- {
362
- name: "webhook",
363
- description: "Exposes an HTTP endpoint to receive webhooks, triggering a specified qflow flow.",
364
- parameters: {
365
- type: "object",
366
- properties: {
367
- port: {
368
- type: "number",
369
- description: "Optional. The port number to listen on. Defaults to 3000."
370
- },
371
- path: {
372
- type: "string",
373
- description: "Optional. The URL path for the webhook endpoint. Defaults to '/webhook'."
374
- },
375
- flow: {
376
- type: "string", // This will be the name of a flow in the flowRegistry
377
- description: "The name of the qflow AsyncFlow instance to trigger when a webhook is received."
378
- },
379
- sharedSecret: {
380
- type: "string",
381
- description: "Optional. A shared secret for HMAC verification of incoming webhooks."
382
- },
383
- responseStatus: {
384
- type: "number",
385
- description: "Optional. The HTTP status code to send back to the webhook sender. Defaults to 200."
386
- },
387
- responseBody: {
388
- type: "object",
389
- description: "Optional. The JSON body to send back to the webhook sender. Defaults to { status: 'received' }."
390
- }
391
- },
392
- required: ["flow"]
393
- }
394
- },
395
- {
396
- name: "scheduler",
397
- description: "Schedules qflow flows for future or recurring execution using cron syntax or a delay.",
398
- parameters: {
399
- type: "object",
400
- properties: {
401
- action: {
402
- type: "string",
403
- enum: ["start", "stop"],
404
- description: "The action to perform: 'start' a new schedule or 'stop' an existing one."
405
- },
406
- schedule: {
407
- type: ["string", "number"],
408
- description: "Required for 'start'. A cron string (e.g., '0 3 * * *') or a number in milliseconds for a one-time delay."
409
- },
410
- flow: {
411
- type: "string", // This will be the name of a flow in the flowRegistry
412
- description: "Required for 'start'. The name of the qflow AsyncFlow instance to trigger."
413
- },
414
- flowParams: {
415
- type: "object",
416
- description: "Optional. Parameters (shared object) to pass to the triggered flow's runAsync."
417
- },
418
- id: {
419
- type: "string",
420
- description: "Optional. A unique ID for the scheduled task (required for 'stop' action). If not provided for 'start', a random one will be generated."
421
- }
422
- },
423
- required: ["action"]
424
- }
425
- },
426
- {
427
- name: "image_gallery",
428
- description: "Generates an HTML gallery from multiple image files and opens it in a web browser.",
429
- parameters: {
430
- type: "object",
431
- properties: {
432
- imagePaths: {
433
- type: "array",
434
- items: { type: "string" },
435
- description: "An array of absolute paths to the image files to display in the gallery."
436
- },
437
- title: {
438
- type: "string",
439
- description: "Optional. The title of the HTML gallery page. Defaults to 'Image Gallery'."
440
- },
441
- description: {
442
- type: "string",
443
- description: "Optional. A short description to display on the gallery page. Defaults to 'Generated by QFlow Agent'."
444
- },
445
- outputDir: {
446
- type: "string",
447
- description: "Optional. Directory to save the generated HTML file and copied images. Defaults to a temporary directory."
448
- }
449
- },
450
- required: ["imagePaths"]
451
- }
452
- },
453
- {
454
- name: "speech_synthesis",
455
- description: "Converts text to spoken audio using OS capabilities or cloud APIs.",
456
- parameters: {
457
- type: "object",
458
- properties: {
459
- text: {
460
- type: "string",
461
- description: "The text to convert to speech."
462
- },
463
- provider: {
464
- type: "string",
465
- enum: ["macos", "linux", "windows", "google"],
466
- description: "Optional. The speech synthesis provider to use. Defaults to OS-specific. 'google' requires GOOGLE_TTS_API_KEY."
467
- },
468
- voice: {
469
- type: "string",
470
- description: "Optional. The specific voice to use (e.g., 'Alex' for macOS, 'en-us' for espeak, 'en-US-Wavenet-D' for Google)."
471
- },
472
- outputFilePath: {
473
- type: "string",
474
- description: "Optional. If provided, saves the audio to this file path instead of playing it directly."
475
- }
476
- },
477
- required: ["text"]
478
- }
479
- },
480
- {
481
- name: "multimedia_processing",
482
- description: "Performs various multimedia operations on audio and video files using ffmpeg.",
483
- parameters: {
484
- type: "object",
485
- properties: {
486
- action: {
487
- type: "string",
488
- enum: ["convert", "trim", "extract_audio", "extract_frame", "custom"],
489
- description: "The multimedia operation to perform."
490
- },
491
- inputPath: {
492
- type: "string",
493
- description: "Path to the input multimedia file."
494
- },
495
- outputPath: {
496
- type: "string",
497
- description: "Path for the output file."
498
- },
499
- format: {
500
- type: "string",
501
- description: "Required for 'convert' and 'extract_audio'. The output format (e.g., 'mp4', 'mp3', 'gif', 'wav')."
502
- },
503
- startTime: {
504
- type: "string",
505
- description: "Required for 'trim'. Start time in HH:MM:SS or seconds (e.g., '00:00:10', '10')."
506
- },
507
- duration: {
508
- type: "string",
509
- description: "Required for 'trim'. Duration in HH:MM:SS or seconds (e.g., '00:00:05', '5')."
510
- },
511
- resolution: {
512
- type: "string",
513
- description: "Optional for video 'convert'. Resolution (e.g., '1280x720')."
514
- },
515
- frameTime: {
516
- type: "string",
517
- description: "Required for 'extract_frame'. Time to extract frame from in HH:MM:SS or seconds (e.g., '00:00:05')."
518
- },
519
- ffmpegArgs: {
520
- type: "string",
521
- description: "Required for 'custom'. Raw ffmpeg arguments to execute directly."
522
- }
523
- },
524
- required: ["action", "inputPath", "outputPath"]
525
- }
526
- },
527
- {
528
- name: "remote_execution",
529
- description: "Executes commands on remote machines via SSH.",
530
- parameters: {
531
- type: "object",
532
- properties: {
533
- host: {
534
- type: "string",
535
- description: "The hostname or IP address of the remote machine."
536
- },
537
- port: {
538
- type: "number",
539
- description: "Optional. The SSH port. Defaults to 22."
540
- },
541
- username: {
542
- type: "string",
543
- description: "The username for SSH authentication."
544
- },
545
- password: {
546
- type: "string",
547
- description: "Optional. The password for SSH authentication (use with caution, prefer privateKey)."
548
- },
549
- privateKey: {
550
- type: "string",
551
- description: "Optional. The content of the private SSH key or its absolute path."
552
- },
553
- passphrase: {
554
- type: "string",
555
- description: "Optional. The passphrase for an encrypted private key."
556
- },
557
- action: {
558
- type: "string",
559
- enum: ["execute_command"],
560
- description: "The action to perform. Currently only 'execute_command' is supported."
561
- },
562
- command: {
563
- type: "string",
564
- description: "The command string to execute on the remote machine."
565
- },
566
- timeout: {
567
- type: "number",
568
- description: "Optional. Timeout in milliseconds for the command execution. Defaults to 30000 (30 seconds)."
569
- }
570
- },
571
- required: ["host", "username", "action", "command"]
572
- }
573
- },
574
- {
575
- name: "data_validation",
576
- description: "Validates structured data against a JSON Schema.",
577
- parameters: {
578
- type: "object",
579
- properties: {
580
- data: {
581
- type: "object", // Can be any JSON-compatible type
582
- description: "The data to be validated."
583
- },
584
- schema: {
585
- type: "object",
586
- description: "The JSON Schema object directly."
587
- },
588
- schemaPath: {
589
- type: "string",
590
- description: "Optional. Path to a JSON Schema file. If provided, 'schema' parameter is ignored."
591
- },
592
- action: {
593
- type: "string",
594
- enum: ["validate"],
595
- description: "The action to perform. Currently only 'validate' is supported."
596
- }
597
- },
598
- required: ["data"]
599
- }
600
- },
601
- {
602
- name: "spreadsheet",
603
- description: "Reads from and writes to spreadsheet files (.xlsx, .xls, .csv) with advanced manipulation.",
604
- parameters: {
605
- type: "object",
606
- properties: {
607
- action: {
608
- type: "string",
609
- enum: ["read", "write", "list_sheets", "read_range", "write_range", "append_rows", "delete_rows", "insert_rows", "add_sheet", "delete_sheet", "rename_sheet", "format_cells"],
610
- description: "The action to perform."
611
- },
612
- filePath: {
613
- type: "string",
614
- description: "The absolute path to the spreadsheet file."
615
- },
616
- sheetName: {
617
- type: "string",
618
- description: "Required for .xlsx/.xls files and sheet-specific actions. The name of the sheet."
619
- },
620
- data: {
621
- type: "array",
622
- description: "Required for 'write', 'write_range', 'append_rows'. The data to write (array of arrays or array of objects)."
623
- },
624
- headerRow: {
625
- type: "boolean",
626
- description: "Optional. True if the first row is a header. Defaults to true."
627
- },
628
- range: {
629
- type: "string",
630
- description: "Required for 'read_range', 'write_range', 'format_cells'. A1 notation (e.g., 'Sheet1!A1:C10')."
631
- },
632
- startRow: {
633
- type: "number",
634
- description: "Required for 'delete_rows', 'insert_rows'. The 1-indexed starting row."
635
- },
636
- numRows: {
637
- type: "number",
638
- description: "Required for 'delete_rows', 'insert_rows'. The number of rows to delete/insert."
639
- },
640
- newSheetName: {
641
- type: "string",
642
- description: "Required for 'add_sheet', 'rename_sheet'. The name of the new sheet."
643
- },
644
- formats: {
645
- type: "object",
646
- description: "Required for 'format_cells'. Formatting options (conceptual, basic XLSX.js has limited styling)."
647
- }
648
- },
649
- required: ["action", "filePath"]
650
- }
651
- },
652
- {
653
- name: "code_interpreter",
654
- description: "Executes Python code (requires user confirmation).",
655
- parameters: {
656
- type: "object",
657
- properties: {
658
- code: {
659
- type: "string",
660
- description: "The Python code snippet to execute."
661
- },
662
- timeout: {
663
- type: "number",
664
- description: "Optional. Maximum execution time in milliseconds. Defaults to 30000 (30 seconds)."
665
- },
666
- args: {
667
- type: "array",
668
- items: { type: "string" },
669
- description: "Optional. Command-line arguments to pass to the script."
670
- },
671
- requireConfirmation: {
672
- type: "boolean",
673
- description: "Optional. If true, the user will be prompted for confirmation before executing the code. Defaults to true."
674
- }
675
- },
676
- required: ["code"]
677
- }
678
- },
679
- {
680
- name: "duckduckgo_search",
681
- description: "Performs web searches via DuckDuckGo.",
682
- parameters: {
683
- type: "object",
684
- properties: {
685
- query: {
686
- type: "string",
687
- description: "The search query."
688
- }
689
- },
690
- required: ["query"]
691
- }
692
- },
693
- {
694
- name: "google_search",
695
- description: "Performs web searches via Google Custom Search (requires API key).",
696
- parameters: {
697
- type: "object",
698
- properties: {
699
- query: {
700
- type: "string",
701
- description: "The search query."
702
- },
703
- apiKey: {
704
- type: "string",
705
- description: "Your Google API Key."
706
- },
707
- cseId: {
708
- type: "string",
709
- description: "Your Custom Search Engine ID."
710
- }
711
- },
712
- required: ["query", "apiKey", "cseId"]
713
- }
714
- },
715
- {
716
- name: "shell_command",
717
- description: "Executes shell commands. When running long running processes like npm run dev or bun run dev, add an ampersand (&) to the end to run in the background eg. 'npm run dev &'",
718
- parameters: {
719
- type: "object",
720
- properties: {
721
- command: {
722
- type: "string",
723
- description: "The full shell command to execute (e.g., 'ls -l', 'npm install cheerio')."
724
- }
725
- },
726
- required: ["command"]
727
- }
728
- },
729
- {
730
- name: "read_file",
731
- description: "Reads file content.",
732
- parameters: {
733
- type: "object",
734
- properties: {
735
- filePath: {
736
- type: "string",
737
- description: "The absolute path to the file to read."
738
- }
739
- },
740
- required: ["filePath"]
741
- }
742
- },
743
- {
744
- name: "write_file",
745
- description: "Writes content to a file.",
746
- parameters: {
747
- type: "object",
748
- properties: {
749
- filePath: {
750
- type: "string",
751
- description: "The absolute path to the file to write to."
752
- },
753
- content: {
754
- type: "string",
755
- description: "The content to write to the file."
756
- }
757
- },
758
- required: ["filePath", "content"]
759
- }
760
- },
761
- {
762
- name: "append_file",
763
- description: "Appends content to a file.",
764
- parameters: {
765
- type: "object",
766
- properties: {
767
- filePath: {
768
- type: "string",
769
- description: "The absolute path to the file to append to."
770
- },
771
- content: {
772
- type: "string",
773
- description: "The content to append to the file."
774
- }
775
- },
776
- required: ["filePath", "content"]
777
- }
778
- },
779
- {
780
- name: "list_directory",
781
- description: "Lists directory contents.",
782
- parameters: {
783
- type: "object",
784
- properties: {
785
- directoryPath: {
786
- type: "string",
787
- description: "The absolute path to the directory to list."
788
- }
789
- },
790
- required: ["directoryPath"]
791
- }
792
- },
793
- {
794
- name: "http_request",
795
- description: "Makes HTTP requests.",
796
- parameters: {
797
- type: "object",
798
- properties: {
799
- url: {
800
- type: "string",
801
- description: "The full URL of the API endpoint."
802
- },
803
- method: {
804
- type: "string",
805
- enum: ["GET", "POST", "PUT", "DELETE", "PATCH"],
806
- default: "GET",
807
- description: "The HTTP method to use."
808
- },
809
- headers: {
810
- type: "object",
811
- description: "Custom headers for the request (key-value pairs)."
812
- },
813
- body: {
814
- type: "object", // Can be any type, but object is common for JSON
815
- description: "The request payload. If an object, it will be stringified as JSON."
816
- },
817
- auth: {
818
- type: "object",
819
- properties: {
820
- type: {
821
- type: "string",
822
- enum: ["bearer", "basic"],
823
- description: "The type of authentication."
824
- },
825
- token: {
826
- type: "string",
827
- description: "The bearer token."
828
- },
829
- username: {
830
- type: "string",
831
- description: "The username for basic auth."
832
- },
833
- password: {
834
- type: "string",
835
- description: "The password for basic auth."
836
- }
837
- },
838
- description: "Authentication configuration."
839
- }
840
- },
841
- required: ["url"]
842
- }
843
- },
844
- {
845
- name: "web_scraper",
846
- description: "Fetches HTML content from a URL. Use with 'data_extractor' for specifics.",
847
- parameters: {
848
- type: "object",
849
- properties: {
850
- url: {
851
- type: "string",
852
- description: "The URL to scrape."
853
- }
854
- },
855
- required: ["url"]
856
- }
857
- },
858
- {
859
- name: "user_input",
860
- description: "Prompts user for input.",
861
- parameters: {
862
- type: "object",
863
- properties: {
864
- prompt: {
865
- type: "string",
866
- description: "The message to display to the user."
867
- }
868
- },
869
- required: ["prompt"]
870
- }
871
- },
872
- {
873
- name: "interactive_input",
874
- description: "Prompts the user for input via a GUI popup (cross-platform).",
875
- parameters: {
876
- type: "object",
877
- properties: {
878
- prompt: {
879
- type: "string",
880
- description: "The message to display in the input dialog."
881
- },
882
- title: {
883
- type: "string",
884
- description: "Optional. The title of the input dialog. Defaults to 'QFlow Input'."
885
- },
886
- defaultValue: {
887
- type: "string",
888
- description: "Optional. The default value to pre-fill in the input field."
889
- }
890
- },
891
- required: ["prompt"]
892
- }
893
- },
894
- {
895
- name: "system_notification",
896
- description: "Displays a system-level notification across OSs.",
897
- parameters: {
898
- type: "object",
899
- properties: {
900
- message: {
901
- type: "string",
902
- description: "The main message content of the notification."
903
- },
904
- title: {
905
- type: "string",
906
- description: "Optional. The title of the notification. Defaults to 'QFlow Notification'."
907
- },
908
- icon: {
909
- type: "string",
910
- description: "Optional. Path to an icon file or a system icon name (Linux specific). Ignored on macOS/Windows."
911
- }
912
- },
913
- required: ["message"]
914
- }
915
- },
916
- {
917
- name: "sub_flow",
918
- description: "Executes a sub-flow.",
919
- parameters: {
920
- type: "object",
921
- properties: {
922
- flow: {
923
- type: "string",
924
- description: "The name of the flow to execute, as registered in the flow registry."
925
- },
926
- shared: {
927
- type: "object",
928
- description: "The shared object to pass to the sub-flow."
929
- }
930
- },
931
- required: ["flow"]
932
- }
933
- },
934
- {
935
- name: "iterator",
936
- description: "Iterates items, executes sub-flow for each.",
937
- parameters: {
938
- type: "object",
939
- properties: {
940
- items: {
941
- type: "array",
942
- description: "The list of items to iterate over."
943
- },
944
- flow: {
945
- type: "string",
946
- description: "The name of the flow to execute for each item, as registered in the flow registry."
947
- }
948
- },
949
- required: ["items", "flow"]
950
- }
951
- },
952
- {
953
- name: "browser_control",
954
- description: "Controls a web browser to navigate pages, interact with elements, and take screenshots.",
955
- parameters: {
956
- type: "object",
957
- properties: {
958
- action: {
959
- type: "string",
960
- enum: ["goto", "click", "type", "screenshot", "close"],
961
- description: "The browser action to perform."
962
- },
963
- url: {
964
- type: "string",
965
- description: "The URL to navigate to (for 'goto' action)."
966
- },
967
- selector: {
968
- type: "string",
969
- description: "A CSS selector to target an element (for 'click' and 'type' actions)."
970
- },
971
- text: {
972
- type: "string",
973
- description: "The text to type into an input field (for 'type' action)."
974
- },
975
- path: {
976
- type: "string",
977
- description: "The file path to save a screenshot (for 'screenshot' action)."
978
- }
979
- },
980
- required: ["action"]
981
- }
982
- },
983
- {
984
- name: "git",
985
- description: "Performs Git operations like clone, add, commit, and push.",
986
- parameters: {
987
- type: "object",
988
- properties: {
989
- action: {
990
- type: "string",
991
- enum: ["clone", "init", "add", "commit", "push", "pull", "status"],
992
- description: "The Git action to perform."
993
- },
994
- repoPath: {
995
- type: "string",
996
- description: "The local path to the repository."
997
- },
998
- remoteUrl: {
999
- type: "string",
1000
- description: "The URL of the remote repository (for 'clone' action)."
1001
- },
1002
- files: {
1003
- type: "array",
1004
- items: {
1005
- type: "string"
1006
- },
1007
- description: "An array of file paths to add to the staging area (for 'add' action)."
1008
- },
1009
- message: {
1010
- type: "string",
1011
- description: "The commit message (for 'commit' action)."
1012
- },
1013
- branch: {
1014
- type: "string",
1015
- description: "The branch to push to or pull from."
1016
- },
1017
- remote: {
1018
- type: "string",
1019
- description: "The name of the remote (e.g., 'origin')."
1020
- }
1021
- },
1022
- required: ["action"]
1023
- }
1024
- },
1025
- {
1026
- name: "websockets",
1027
- description: "Establishes and manages WebSocket connections.",
1028
- parameters: {
1029
- type: "object",
1030
- properties: {
1031
- action: {
1032
- type: "string",
1033
- enum: ["connect", "send", "receive", "close"],
1034
- description: "The WebSocket action to perform."
1035
- },
1036
- url: {
1037
- type: "string",
1038
- description: "The URL of the WebSocket server (for 'connect' action)."
1039
- },
1040
- message: {
1041
- type: "string",
1042
- description: "The message to send to the server (for 'send' action)."
1043
- }
1044
- },
1045
- required: ["action"]
1046
- }
1047
- },
1048
- {
1049
- name: "finish",
1050
- description: "Ends agent execution, returns final output.",
1051
- parameters: {
1052
- type: "object",
1053
- properties: {
1054
- output: {
1055
- type: "string",
1056
- description: "A summary of the final result or the reason for stopping."
1057
- }
1058
- },
1059
- required: ["output"]
1060
- }
1061
- },
1062
- {
1063
- name: "database",
1064
- description: "Interacts with a database.",
1065
- parameters: {
1066
- type: "object",
1067
- properties: {
1068
- adapter: {
1069
- type: "string",
1070
- enum: ["sqlite", "postgres", "mysql"],
1071
- description: "The database adapter to use."
1072
- },
1073
- connection: {
1074
- type: "string",
1075
- description: "The connection string for the database."
1076
- },
1077
- action: {
1078
- type: "string",
1079
- enum: ["query", "insert", "bulk_insert", "update", "delete", "transaction"],
1080
- description: "The action to perform."
1081
- },
1082
- query: {
1083
- type: "string",
1084
- description: "The SQL query to execute (for the 'query' action)."
1085
- },
1086
- table: {
1087
- type: "string",
1088
- description: "The name of the table to operate on."
1089
- },
1090
- data: {
1091
- type: "object",
1092
- description: "The data to insert or update."
1093
- },
1094
- where: {
1095
- type: "string",
1096
- description: "The WHERE clause for 'update' and 'delete' actions."
1097
- },
1098
- operations: {
1099
- type: "array",
1100
- description: "An array of operations to execute within a transaction."
1101
- }
1102
- },
1103
- required: ["adapter", "connection", "action"]
1104
- }
1105
- },
1106
- {
1107
- name: "s3",
1108
- description: "Interacts with an S3-compatible object storage service.",
1109
- parameters: {
1110
- type: "object",
1111
- properties: {
1112
- accessKeyId: {
1113
- type: "string",
1114
- description: "Your S3 access key ID."
1115
- },
1116
- secretAccessKey: {
1117
- type: "string",
1118
- description: "Your S3 secret access key."
1119
- },
1120
- bucket: {
1121
- type: "string",
1122
- description: "The name of your S3 bucket."
1123
- },
1124
- endpoint: {
1125
- type: "string",
1126
- description: "The S3 endpoint URL."
1127
- },
1128
- region: {
1129
- type: "string",
1130
- description: "The S3 region."
1131
- },
1132
- action: {
1133
- type: "string",
1134
- enum: ["upload", "download", "delete", "presign", "list"],
1135
- description: "The action to perform."
1136
- },
1137
- key: {
1138
- type: "string",
1139
- description: "The key of the object to operate on."
1140
- },
1141
- content: {
1142
- type: "string",
1143
- description: "The content to upload."
1144
- },
1145
- acl: {
1146
- type: "string",
1147
- description: "The access control list for presigned URLs."
1148
- },
1149
- expiresIn: {
1150
- type: "number",
1151
- description: "The expiration time for presigned URLs."
1152
- },
1153
- method: {
1154
- type: "string",
1155
- description: "The HTTP method for presigned URLs."
1156
- },
1157
- prefix: {
1158
- type: "string",
1159
- description: "The prefix for listing files."
1160
- },
1161
- maxKeys: {
1162
- type: "number",
1163
- description: "The maximum number of keys to return when listing files."
1164
- },
1165
- startAfter: {
1166
- type: "string",
1167
- description: "The key to start after when listing files."
1168
- }
1169
- },
1170
- required: ["accessKeyId", "secretAccessKey", "bucket", "endpoint", "action", "key"]
1171
- }
1172
- }
1173
- ];
1174
- }