@fractal-solutions/qflow 1.0.62 → 1.0.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/tools.d.ts +1 -5378
- package/dist/agent/tools.js +145 -1171
- package/dist/nodes/browser_control.d.ts +31 -0
- package/dist/nodes/browser_control.js +33 -0
- package/dist/nodes/code_interpreter.d.ts +29 -0
- package/dist/nodes/code_interpreter.js +29 -0
- package/dist/nodes/data_extractor.d.ts +35 -0
- package/dist/nodes/data_extractor.js +37 -0
- package/dist/nodes/data_validation.d.ts +27 -0
- package/dist/nodes/data_validation.js +29 -0
- package/dist/nodes/database.d.ts +44 -0
- package/dist/nodes/database.js +46 -0
- package/dist/nodes/display_image.d.ts +14 -0
- package/dist/nodes/display_image.js +16 -0
- package/dist/nodes/embedding.d.ts +22 -0
- package/dist/nodes/embedding.js +24 -0
- package/dist/nodes/filesystem.d.ts +64 -0
- package/dist/nodes/filesystem.js +72 -0
- package/dist/nodes/gis.d.ts +25 -0
- package/dist/nodes/gis.js +27 -0
- package/dist/nodes/git.d.ts +42 -0
- package/dist/nodes/git.js +44 -0
- package/dist/nodes/github.d.ts +56 -0
- package/dist/nodes/github.js +60 -0
- package/dist/nodes/hackernews.d.ts +28 -0
- package/dist/nodes/hackernews.js +32 -0
- package/dist/nodes/hardware_interaction.d.ts +31 -0
- package/dist/nodes/hardware_interaction.js +33 -0
- package/dist/nodes/http.d.ts +51 -0
- package/dist/nodes/http.js +53 -0
- package/dist/nodes/http_server.d.ts +37 -0
- package/dist/nodes/http_server.js +33 -0
- package/dist/nodes/image_gallery.d.ts +29 -0
- package/dist/nodes/image_gallery.js +29 -0
- package/dist/nodes/interactive_input.d.ts +22 -0
- package/dist/nodes/interactive_input.js +24 -0
- package/dist/nodes/interactive_webview.d.ts +59 -0
- package/dist/nodes/interactive_webview.js +59 -0
- package/dist/nodes/iterator.d.ts +18 -0
- package/dist/nodes/iterator.js +20 -0
- package/dist/nodes/llm.d.ts +142 -0
- package/dist/nodes/llm.js +152 -0
- package/dist/nodes/memory.d.ts +31 -0
- package/dist/nodes/memory.js +80 -38
- package/dist/nodes/multimedia_processing.d.ts +47 -0
- package/dist/nodes/multimedia_processing.js +49 -0
- package/dist/nodes/openrouter_llm.d.ts +30 -0
- package/dist/nodes/openrouter_llm.js +32 -0
- package/dist/nodes/pdf_processor.d.ts +39 -0
- package/dist/nodes/pdf_processor.js +37 -0
- package/dist/nodes/remote_execution.d.ts +47 -0
- package/dist/nodes/remote_execution.js +49 -0
- package/dist/nodes/s3.d.ts +67 -0
- package/dist/nodes/s3.js +69 -0
- package/dist/nodes/scheduler.d.ts +31 -0
- package/dist/nodes/scheduler.js +33 -0
- package/dist/nodes/search.d.ts +36 -0
- package/dist/nodes/search.js +40 -0
- package/dist/nodes/semantic_memory.d.ts +47 -0
- package/dist/nodes/semantic_memory.js +49 -0
- package/dist/nodes/shell.d.ts +14 -0
- package/dist/nodes/shell.js +16 -0
- package/dist/nodes/speech_synthesis.d.ts +27 -0
- package/dist/nodes/speech_synthesis.js +29 -0
- package/dist/nodes/spreadsheet.d.ts +51 -0
- package/dist/nodes/spreadsheet.js +53 -0
- package/dist/nodes/stripe.d.ts +44 -0
- package/dist/nodes/stripe.js +48 -0
- package/dist/nodes/subflow.d.ts +18 -0
- package/dist/nodes/subflow.js +20 -0
- package/dist/nodes/summarize.d.ts +14 -0
- package/dist/nodes/summarize.js +20 -0
- package/dist/nodes/system_notification.d.ts +22 -0
- package/dist/nodes/system_notification.js +24 -0
- package/dist/nodes/transform.d.ts +18 -0
- package/dist/nodes/transform.js +20 -0
- package/dist/nodes/user.d.ts +14 -0
- package/dist/nodes/user.js +16 -0
- package/dist/nodes/webhook.d.ts +34 -0
- package/dist/nodes/webhook.js +36 -0
- package/dist/nodes/webscraper.d.ts +14 -0
- package/dist/nodes/webscraper.js +16 -0
- package/dist/nodes/websockets.d.ts +23 -0
- package/dist/nodes/websockets.js +25 -0
- package/dist/nodes/webview.d.ts +26 -0
- package/dist/nodes/webview.js +28 -0
- package/package.json +3 -2
- package/dist/qflow.config.d.ts +0 -5
- package/dist/qflow.config.js +0 -16
- package/dist/src/agent/agent.d.ts +0 -23
- package/dist/src/agent/agent.js +0 -365
- package/dist/src/agent/base_agent.d.ts +0 -21
- package/dist/src/agent/base_agent.js +0 -206
- package/dist/src/agent/logger.d.ts +0 -9
- package/dist/src/agent/logger.js +0 -45
- package/dist/src/agent/lpavrl_agent.d.ts +0 -5
- package/dist/src/agent/lpavrl_agent.js +0 -178
- package/dist/src/agent/ooda_agent.d.ts +0 -5
- package/dist/src/agent/ooda_agent.js +0 -167
- package/dist/src/agent/pema_agent.d.ts +0 -5
- package/dist/src/agent/pema_agent.js +0 -171
- package/dist/src/agent/raor_agent.d.ts +0 -5
- package/dist/src/agent/raor_agent.js +0 -164
- package/dist/src/agent/tools.d.ts +0 -1
- package/dist/src/agent/tools.js +0 -148
- package/dist/src/logger.d.ts +0 -9
- package/dist/src/logger.js +0 -107
- package/dist/src/nodes/agent_llm.d.ts +0 -31
- package/dist/src/nodes/agent_llm.js +0 -302
- package/dist/src/nodes/browser_control.d.ts +0 -35
- package/dist/src/nodes/browser_control.js +0 -106
- package/dist/src/nodes/code_interpreter.d.ts +0 -38
- package/dist/src/nodes/code_interpreter.js +0 -150
- package/dist/src/nodes/data_extractor.d.ts +0 -40
- package/dist/src/nodes/data_extractor.js +0 -118
- package/dist/src/nodes/data_validation.d.ts +0 -36
- package/dist/src/nodes/data_validation.js +0 -77
- package/dist/src/nodes/database.d.ts +0 -50
- package/dist/src/nodes/database.js +0 -135
- package/dist/src/nodes/display_image.d.ts +0 -18
- package/dist/src/nodes/display_image.js +0 -63
- package/dist/src/nodes/embedding.d.ts +0 -29
- package/dist/src/nodes/embedding.js +0 -69
- package/dist/src/nodes/filesystem.d.ts +0 -105
- package/dist/src/nodes/filesystem.js +0 -160
- package/dist/src/nodes/gis.d.ts +0 -62
- package/dist/src/nodes/gis.js +0 -133
- package/dist/src/nodes/git.d.ts +0 -46
- package/dist/src/nodes/git.js +0 -99
- package/dist/src/nodes/github.d.ts +0 -83
- package/dist/src/nodes/github.js +0 -135
- package/dist/src/nodes/hackernews.d.ts +0 -47
- package/dist/src/nodes/hackernews.js +0 -79
- package/dist/src/nodes/hardware_interaction.d.ts +0 -39
- package/dist/src/nodes/hardware_interaction.js +0 -131
- package/dist/src/nodes/http.d.ts +0 -77
- package/dist/src/nodes/http.js +0 -120
- package/dist/src/nodes/http_server.d.ts +0 -54
- package/dist/src/nodes/http_server.js +0 -223
- package/dist/src/nodes/image_gallery.d.ts +0 -37
- package/dist/src/nodes/image_gallery.js +0 -129
- package/dist/src/nodes/index.d.ts +0 -48
- package/dist/src/nodes/index.js +0 -48
- package/dist/src/nodes/interactive_input.d.ts +0 -26
- package/dist/src/nodes/interactive_input.js +0 -95
- package/dist/src/nodes/interactive_webview.d.ts +0 -78
- package/dist/src/nodes/interactive_webview.js +0 -369
- package/dist/src/nodes/iterator.d.ts +0 -23
- package/dist/src/nodes/iterator.js +0 -43
- package/dist/src/nodes/llm.d.ts +0 -160
- package/dist/src/nodes/llm.js +0 -367
- package/dist/src/nodes/memory.d.ts +0 -43
- package/dist/src/nodes/memory.js +0 -90
- package/dist/src/nodes/multimedia_processing.d.ts +0 -57
- package/dist/src/nodes/multimedia_processing.js +0 -129
- package/dist/src/nodes/openrouter_llm.d.ts +0 -38
- package/dist/src/nodes/openrouter_llm.js +0 -156
- package/dist/src/nodes/pdf_processor.d.ts +0 -43
- package/dist/src/nodes/pdf_processor.js +0 -112
- package/dist/src/nodes/remote_execution.d.ts +0 -51
- package/dist/src/nodes/remote_execution.js +0 -132
- package/dist/src/nodes/s3.d.ts +0 -73
- package/dist/src/nodes/s3.js +0 -107
- package/dist/src/nodes/scheduler.d.ts +0 -51
- package/dist/src/nodes/scheduler.js +0 -131
- package/dist/src/nodes/search.d.ts +0 -61
- package/dist/src/nodes/search.js +0 -118
- package/dist/src/nodes/semantic_memory.d.ts +0 -64
- package/dist/src/nodes/semantic_memory.js +0 -160
- package/dist/src/nodes/shell.d.ts +0 -25
- package/dist/src/nodes/shell.js +0 -45
- package/dist/src/nodes/speech_synthesis.d.ts +0 -72
- package/dist/src/nodes/speech_synthesis.js +0 -171
- package/dist/src/nodes/spreadsheet.d.ts +0 -61
- package/dist/src/nodes/spreadsheet.js +0 -294
- package/dist/src/nodes/stripe.d.ts +0 -67
- package/dist/src/nodes/stripe.js +0 -117
- package/dist/src/nodes/subflow.d.ts +0 -23
- package/dist/src/nodes/subflow.js +0 -36
- package/dist/src/nodes/summarize.d.ts +0 -26
- package/dist/src/nodes/summarize.js +0 -51
- package/dist/src/nodes/system_notification.d.ts +0 -26
- package/dist/src/nodes/system_notification.js +0 -74
- package/dist/src/nodes/transform.d.ts +0 -23
- package/dist/src/nodes/transform.js +0 -52
- package/dist/src/nodes/user.d.ts +0 -25
- package/dist/src/nodes/user.js +0 -48
- package/dist/src/nodes/webhook.d.ts +0 -49
- package/dist/src/nodes/webhook.js +0 -161
- package/dist/src/nodes/webscraper.d.ts +0 -25
- package/dist/src/nodes/webscraper.js +0 -49
- package/dist/src/nodes/websockets.d.ts +0 -27
- package/dist/src/nodes/websockets.js +0 -98
- package/dist/src/nodes/webview.d.ts +0 -38
- package/dist/src/nodes/webview.js +0 -55
- package/dist/src/qflow.d.ts +0 -69
- package/dist/src/qflow.js +0 -320
- /package/dist/{src/types.d.ts → types.d.ts} +0 -0
- /package/dist/{src/types.js → types.js} +0 -0
|
@@ -1,4 +1,41 @@
|
|
|
1
1
|
export class HttpServerNode extends AsyncNode {
|
|
2
|
+
static getToolDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
port: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
routes: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
staticDir: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
cors: {
|
|
21
|
+
type: string;
|
|
22
|
+
properties: {
|
|
23
|
+
origin: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
methods: {
|
|
27
|
+
type: string;
|
|
28
|
+
};
|
|
29
|
+
headers: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
required: never[];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
2
39
|
constructor();
|
|
3
40
|
server: http.Server<typeof http.IncomingMessage, typeof http.ServerResponse> | null;
|
|
4
41
|
findMatchingRoute(routes: any, method: any, path: any): {
|
|
@@ -23,6 +23,39 @@ function getMimeType(filePath) {
|
|
|
23
23
|
return types[ext] || 'application/octet-stream';
|
|
24
24
|
}
|
|
25
25
|
export class HttpServerNode extends AsyncNode {
|
|
26
|
+
static getToolDefinition() {
|
|
27
|
+
return {
|
|
28
|
+
name: "http_server",
|
|
29
|
+
description: "Creates a web server and handles HTTP requests by triggering qflow flows.",
|
|
30
|
+
parameters: {
|
|
31
|
+
type: "object",
|
|
32
|
+
properties: {
|
|
33
|
+
port: {
|
|
34
|
+
type: "number",
|
|
35
|
+
description: "Optional. The port number to listen on. Defaults to 3000."
|
|
36
|
+
},
|
|
37
|
+
routes: {
|
|
38
|
+
type: "object",
|
|
39
|
+
description: "An object defining API routes. Keys are route paths (e.g., '/api/data', '/users/:id'), values are objects mapping HTTP methods (GET, POST, etc.) to the name of a qflow AsyncFlow instance to trigger. Example: { '/api/data': { 'GET': 'myGetDataFlow' } }."
|
|
40
|
+
},
|
|
41
|
+
staticDir: {
|
|
42
|
+
type: "string",
|
|
43
|
+
description: "Optional. The absolute path to a directory to serve static files from."
|
|
44
|
+
},
|
|
45
|
+
cors: {
|
|
46
|
+
type: "object",
|
|
47
|
+
properties: {
|
|
48
|
+
origin: { type: "string" },
|
|
49
|
+
methods: { type: "string" },
|
|
50
|
+
headers: { type: "string" }
|
|
51
|
+
},
|
|
52
|
+
description: "Optional. CORS configuration for the server."
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
required: [] // Port has a default, routes/staticDir are optional for a basic server
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
}
|
|
26
59
|
constructor() {
|
|
27
60
|
super();
|
|
28
61
|
this.server = null;
|
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
export class ImageGalleryNode extends AsyncNode {
|
|
2
|
+
static getToolDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
imagePaths: {
|
|
9
|
+
type: string;
|
|
10
|
+
items: {
|
|
11
|
+
type: string;
|
|
12
|
+
};
|
|
13
|
+
description: string;
|
|
14
|
+
};
|
|
15
|
+
title: {
|
|
16
|
+
type: string;
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
description: {
|
|
20
|
+
type: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
outputDir: {
|
|
24
|
+
type: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
required: string[];
|
|
29
|
+
};
|
|
30
|
+
};
|
|
2
31
|
execAsync(): Promise<{
|
|
3
32
|
status: string;
|
|
4
33
|
htmlFilePath: string;
|
|
@@ -5,6 +5,35 @@ import os from 'os';
|
|
|
5
5
|
import { promises as fs } from 'fs';
|
|
6
6
|
import { log } from '../logger.js';
|
|
7
7
|
export class ImageGalleryNode extends AsyncNode {
|
|
8
|
+
static getToolDefinition() {
|
|
9
|
+
return {
|
|
10
|
+
name: "image_gallery",
|
|
11
|
+
description: "Generates an HTML gallery from multiple image files and opens it in a web browser.",
|
|
12
|
+
parameters: {
|
|
13
|
+
type: "object",
|
|
14
|
+
properties: {
|
|
15
|
+
imagePaths: {
|
|
16
|
+
type: "array",
|
|
17
|
+
items: { type: "string" },
|
|
18
|
+
description: "An array of absolute paths to the image files to display in the gallery."
|
|
19
|
+
},
|
|
20
|
+
title: {
|
|
21
|
+
type: "string",
|
|
22
|
+
description: "Optional. The title of the HTML gallery page. Defaults to 'Image Gallery'."
|
|
23
|
+
},
|
|
24
|
+
description: {
|
|
25
|
+
type: "string",
|
|
26
|
+
description: "Optional. A short description to display on the gallery page. Defaults to 'Generated by QFlow Agent'."
|
|
27
|
+
},
|
|
28
|
+
outputDir: {
|
|
29
|
+
type: "string",
|
|
30
|
+
description: "Optional. Directory to save the generated HTML file and copied images. Defaults to a temporary directory."
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
required: ["imagePaths"]
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
8
37
|
constructor(maxRetries = 1, wait = 0) {
|
|
9
38
|
super(maxRetries, wait);
|
|
10
39
|
}
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
export class InteractiveInputNode extends AsyncNode {
|
|
2
|
+
static getToolDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
prompt: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
title: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
defaultValue: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
required: string[];
|
|
22
|
+
};
|
|
23
|
+
};
|
|
2
24
|
execAsync(): Promise<any>;
|
|
3
25
|
}
|
|
4
26
|
import { AsyncNode } from '../qflow.js';
|
|
@@ -3,6 +3,30 @@ import { exec } from 'child_process';
|
|
|
3
3
|
import os from 'os';
|
|
4
4
|
import { log } from '../logger.js';
|
|
5
5
|
export class InteractiveInputNode extends AsyncNode {
|
|
6
|
+
static getToolDefinition() {
|
|
7
|
+
return {
|
|
8
|
+
name: "interactive_input",
|
|
9
|
+
description: "Prompts the user for input via a GUI popup (cross-platform).",
|
|
10
|
+
parameters: {
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: {
|
|
13
|
+
prompt: {
|
|
14
|
+
type: "string",
|
|
15
|
+
description: "The message to display in the input dialog."
|
|
16
|
+
},
|
|
17
|
+
title: {
|
|
18
|
+
type: "string",
|
|
19
|
+
description: "Optional. The title of the input dialog. Defaults to 'QFlow Input'."
|
|
20
|
+
},
|
|
21
|
+
defaultValue: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "Optional. The default value to pre-fill in the input field."
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
required: ["prompt"]
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
6
30
|
constructor(maxRetries = 1, wait = 0) {
|
|
7
31
|
super(maxRetries, wait);
|
|
8
32
|
}
|
|
@@ -4,6 +4,65 @@
|
|
|
4
4
|
* The result from the user interaction is passed to the next node.
|
|
5
5
|
*/
|
|
6
6
|
export class InteractiveWebviewNode extends AsyncNode {
|
|
7
|
+
static getToolDefinition(): {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
parameters: {
|
|
11
|
+
type: string;
|
|
12
|
+
properties: {
|
|
13
|
+
mode: {
|
|
14
|
+
type: string;
|
|
15
|
+
enum: string[];
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
message: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
options: {
|
|
23
|
+
type: string;
|
|
24
|
+
items: {
|
|
25
|
+
type: string;
|
|
26
|
+
};
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
prompt: {
|
|
30
|
+
type: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
title: {
|
|
34
|
+
type: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
width: {
|
|
38
|
+
type: string;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
height: {
|
|
42
|
+
type: string;
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
theme: {
|
|
46
|
+
type: string;
|
|
47
|
+
enum: string[];
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
persistent: {
|
|
51
|
+
type: string;
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
html: {
|
|
55
|
+
type: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
multilineInput: {
|
|
59
|
+
type: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
required: string[];
|
|
64
|
+
};
|
|
65
|
+
};
|
|
7
66
|
constructor();
|
|
8
67
|
_webviewInstance: Webview | null;
|
|
9
68
|
execAsync(): Promise<any>;
|
|
@@ -7,6 +7,65 @@ import { log } from '../logger.js';
|
|
|
7
7
|
* The result from the user interaction is passed to the next node.
|
|
8
8
|
*/
|
|
9
9
|
export class InteractiveWebviewNode extends AsyncNode {
|
|
10
|
+
static getToolDefinition() {
|
|
11
|
+
return {
|
|
12
|
+
name: "interactive_webview",
|
|
13
|
+
description: "Displays an interactive webview window for notifications, dialogs, or user input.",
|
|
14
|
+
parameters: {
|
|
15
|
+
type: "object",
|
|
16
|
+
properties: {
|
|
17
|
+
mode: {
|
|
18
|
+
type: "string",
|
|
19
|
+
enum: ["notification", "dialog", "input", "custom"],
|
|
20
|
+
description: "The mode of the webview: 'notification' (message with close button), 'dialog' (message with options), 'input' (message with text input), or 'custom' (full HTML control)."
|
|
21
|
+
},
|
|
22
|
+
message: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "Required for 'notification' and 'dialog' modes. The message to display."
|
|
25
|
+
},
|
|
26
|
+
options: {
|
|
27
|
+
type: "array",
|
|
28
|
+
items: { type: "string" },
|
|
29
|
+
description: "Required for 'dialog' mode. An array of strings for the buttons."
|
|
30
|
+
},
|
|
31
|
+
prompt: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "Required for 'input' mode. The prompt message for the user."
|
|
34
|
+
},
|
|
35
|
+
title: {
|
|
36
|
+
type: "string",
|
|
37
|
+
description: "Optional. The title of the webview window. Defaults to 'Qflow'."
|
|
38
|
+
},
|
|
39
|
+
width: {
|
|
40
|
+
type: "number",
|
|
41
|
+
description: "Optional. The width of the webview window. Defaults to 400."
|
|
42
|
+
},
|
|
43
|
+
height: {
|
|
44
|
+
type: "number",
|
|
45
|
+
description: "Optional. The height of the webview window. Defaults to 220."
|
|
46
|
+
},
|
|
47
|
+
theme: {
|
|
48
|
+
type: "string",
|
|
49
|
+
enum: ["light", "dark"],
|
|
50
|
+
description: "Optional. The theme for the webview. Defaults to 'light'."
|
|
51
|
+
},
|
|
52
|
+
persistent: {
|
|
53
|
+
type: "boolean",
|
|
54
|
+
description: "Optional. If true, the webview remains open after interaction. Defaults to false."
|
|
55
|
+
},
|
|
56
|
+
html: {
|
|
57
|
+
type: "string",
|
|
58
|
+
description: "Required for 'custom' mode. The full HTML content to display in the webview."
|
|
59
|
+
},
|
|
60
|
+
multilineInput: {
|
|
61
|
+
type: "boolean",
|
|
62
|
+
description: "Optional. If true, the input field in 'input' mode will be a multiline textarea. Defaults to false."
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
required: ["mode"]
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
10
69
|
constructor() {
|
|
11
70
|
super();
|
|
12
71
|
this._webviewInstance = null; // Store webview instance for sendToWebview
|
package/dist/nodes/iterator.d.ts
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
export class IteratorNode extends AsyncNode {
|
|
2
|
+
static getToolDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
items: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
flow: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
required: string[];
|
|
18
|
+
};
|
|
19
|
+
};
|
|
2
20
|
execAsync(): Promise<any[]>;
|
|
3
21
|
postAsync(shared: any, prepRes: any, execRes: any): Promise<string>;
|
|
4
22
|
}
|
package/dist/nodes/iterator.js
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
import { AsyncNode, AsyncFlow } from '../qflow.js';
|
|
2
2
|
export class IteratorNode extends AsyncNode {
|
|
3
|
+
static getToolDefinition() {
|
|
4
|
+
return {
|
|
5
|
+
name: "iterator",
|
|
6
|
+
description: "Iterates items, executes sub-flow for each.",
|
|
7
|
+
parameters: {
|
|
8
|
+
type: "object",
|
|
9
|
+
properties: {
|
|
10
|
+
items: {
|
|
11
|
+
type: "array",
|
|
12
|
+
description: "The list of items to iterate over."
|
|
13
|
+
},
|
|
14
|
+
flow: {
|
|
15
|
+
type: "string",
|
|
16
|
+
description: "The name of the flow to execute for each item, as registered in the flow registry."
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
required: ["items", "flow"]
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}
|
|
3
23
|
async execAsync() {
|
|
4
24
|
const { items, flow } = this.params;
|
|
5
25
|
if (!items || !Array.isArray(items)) {
|
package/dist/nodes/llm.d.ts
CHANGED
|
@@ -1,18 +1,160 @@
|
|
|
1
1
|
export class DeepSeekLLMNode extends AsyncNode {
|
|
2
|
+
static getToolDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
prompt: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
apiKey: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
model: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
max_tokens: {
|
|
21
|
+
type: string;
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
temperature: {
|
|
25
|
+
type: string;
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
required: string[];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
2
32
|
preparePrompt(shared: any): void;
|
|
3
33
|
execAsync(prepRes: any, shared: any): Promise<any>;
|
|
4
34
|
}
|
|
5
35
|
export class OpenAILLMNode extends AsyncNode {
|
|
36
|
+
static getToolDefinition(): {
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
parameters: {
|
|
40
|
+
type: string;
|
|
41
|
+
properties: {
|
|
42
|
+
prompt: {
|
|
43
|
+
type: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
apiKey: {
|
|
47
|
+
type: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
model: {
|
|
51
|
+
type: string;
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
max_tokens: {
|
|
55
|
+
type: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
temperature: {
|
|
59
|
+
type: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
required: string[];
|
|
64
|
+
};
|
|
65
|
+
};
|
|
6
66
|
execAsync(): Promise<any>;
|
|
7
67
|
}
|
|
8
68
|
export class GeminiLLMNode extends AsyncNode {
|
|
69
|
+
static getToolDefinition(): {
|
|
70
|
+
name: string;
|
|
71
|
+
description: string;
|
|
72
|
+
parameters: {
|
|
73
|
+
type: string;
|
|
74
|
+
properties: {
|
|
75
|
+
prompt: {
|
|
76
|
+
type: string;
|
|
77
|
+
description: string;
|
|
78
|
+
};
|
|
79
|
+
apiKey: {
|
|
80
|
+
type: string;
|
|
81
|
+
description: string;
|
|
82
|
+
};
|
|
83
|
+
model: {
|
|
84
|
+
type: string;
|
|
85
|
+
description: string;
|
|
86
|
+
};
|
|
87
|
+
temperature: {
|
|
88
|
+
type: string;
|
|
89
|
+
description: string;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
required: string[];
|
|
93
|
+
};
|
|
94
|
+
};
|
|
9
95
|
execAsync(): Promise<any>;
|
|
10
96
|
}
|
|
11
97
|
export class OllamaLLMNode extends AsyncNode {
|
|
98
|
+
static getToolDefinition(): {
|
|
99
|
+
name: string;
|
|
100
|
+
description: string;
|
|
101
|
+
parameters: {
|
|
102
|
+
type: string;
|
|
103
|
+
properties: {
|
|
104
|
+
prompt: {
|
|
105
|
+
type: string;
|
|
106
|
+
description: string;
|
|
107
|
+
};
|
|
108
|
+
model: {
|
|
109
|
+
type: string;
|
|
110
|
+
description: string;
|
|
111
|
+
};
|
|
112
|
+
baseUrl: {
|
|
113
|
+
type: string;
|
|
114
|
+
description: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
required: string[];
|
|
118
|
+
};
|
|
119
|
+
};
|
|
12
120
|
preparePrompt(shared: any): void;
|
|
13
121
|
execAsync(prepRes: any, shared: any): Promise<any>;
|
|
14
122
|
}
|
|
15
123
|
export class HuggingFaceLLMNode extends AsyncNode {
|
|
124
|
+
static getToolDefinition(): {
|
|
125
|
+
name: string;
|
|
126
|
+
description: string;
|
|
127
|
+
parameters: {
|
|
128
|
+
type: string;
|
|
129
|
+
properties: {
|
|
130
|
+
prompt: {
|
|
131
|
+
type: string;
|
|
132
|
+
description: string;
|
|
133
|
+
};
|
|
134
|
+
model: {
|
|
135
|
+
type: string;
|
|
136
|
+
description: string;
|
|
137
|
+
};
|
|
138
|
+
hfToken: {
|
|
139
|
+
type: string;
|
|
140
|
+
description: string;
|
|
141
|
+
};
|
|
142
|
+
temperature: {
|
|
143
|
+
type: string;
|
|
144
|
+
description: string;
|
|
145
|
+
};
|
|
146
|
+
max_new_tokens: {
|
|
147
|
+
type: string;
|
|
148
|
+
description: string;
|
|
149
|
+
};
|
|
150
|
+
baseUrl: {
|
|
151
|
+
type: string;
|
|
152
|
+
description: string;
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
required: string[];
|
|
156
|
+
};
|
|
157
|
+
};
|
|
16
158
|
execAsync(): Promise<any>;
|
|
17
159
|
}
|
|
18
160
|
import { AsyncNode } from '../qflow.js';
|