@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
|
@@ -3,6 +3,55 @@ import { AsyncNode } from '../qflow.js';
|
|
|
3
3
|
import { Client } from 'ssh2';
|
|
4
4
|
import { log } from '../logger.js';
|
|
5
5
|
export class RemoteExecutionNode extends AsyncNode {
|
|
6
|
+
static getToolDefinition() {
|
|
7
|
+
return {
|
|
8
|
+
name: "remote_execution",
|
|
9
|
+
description: "Executes commands on remote machines via SSH.",
|
|
10
|
+
parameters: {
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: {
|
|
13
|
+
host: {
|
|
14
|
+
type: "string",
|
|
15
|
+
description: "The hostname or IP address of the remote machine."
|
|
16
|
+
},
|
|
17
|
+
port: {
|
|
18
|
+
type: "number",
|
|
19
|
+
description: "Optional. The SSH port. Defaults to 22."
|
|
20
|
+
},
|
|
21
|
+
username: {
|
|
22
|
+
type: "string",
|
|
23
|
+
description: "The username for SSH authentication."
|
|
24
|
+
},
|
|
25
|
+
password: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "Optional. The password for SSH authentication (use with caution, prefer privateKey)."
|
|
28
|
+
},
|
|
29
|
+
privateKey: {
|
|
30
|
+
type: "string",
|
|
31
|
+
description: "Optional. The content of the private SSH key or its absolute path."
|
|
32
|
+
},
|
|
33
|
+
passphrase: {
|
|
34
|
+
type: "string",
|
|
35
|
+
description: "Optional. The passphrase for an encrypted private key."
|
|
36
|
+
},
|
|
37
|
+
action: {
|
|
38
|
+
type: "string",
|
|
39
|
+
enum: ["execute_command"],
|
|
40
|
+
description: "The action to perform. Currently only 'execute_command' is supported."
|
|
41
|
+
},
|
|
42
|
+
command: {
|
|
43
|
+
type: "string",
|
|
44
|
+
description: "The command string to execute on the remote machine."
|
|
45
|
+
},
|
|
46
|
+
timeout: {
|
|
47
|
+
type: "number",
|
|
48
|
+
description: "Optional. Timeout in milliseconds for the command execution. Defaults to 30000 (30 seconds)."
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
required: ["host", "username", "action", "command"]
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}
|
|
6
55
|
constructor(maxRetries = 1, wait = 0) {
|
|
7
56
|
super(maxRetries, wait);
|
|
8
57
|
}
|
package/dist/nodes/s3.d.ts
CHANGED
|
@@ -1,4 +1,71 @@
|
|
|
1
1
|
export class S3CloudStorageNode extends AsyncNode {
|
|
2
|
+
static getToolDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
accessKeyId: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
secretAccessKey: {
|
|
13
|
+
type: string;
|
|
14
|
+
description: string;
|
|
15
|
+
};
|
|
16
|
+
bucket: {
|
|
17
|
+
type: string;
|
|
18
|
+
description: string;
|
|
19
|
+
};
|
|
20
|
+
endpoint: {
|
|
21
|
+
type: string;
|
|
22
|
+
description: string;
|
|
23
|
+
};
|
|
24
|
+
region: {
|
|
25
|
+
type: string;
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
action: {
|
|
29
|
+
type: string;
|
|
30
|
+
enum: string[];
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
key: {
|
|
34
|
+
type: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
content: {
|
|
38
|
+
type: string;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
acl: {
|
|
42
|
+
type: string;
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
expiresIn: {
|
|
46
|
+
type: string;
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
method: {
|
|
50
|
+
type: string;
|
|
51
|
+
description: string;
|
|
52
|
+
};
|
|
53
|
+
prefix: {
|
|
54
|
+
type: string;
|
|
55
|
+
description: string;
|
|
56
|
+
};
|
|
57
|
+
maxKeys: {
|
|
58
|
+
type: string;
|
|
59
|
+
description: string;
|
|
60
|
+
};
|
|
61
|
+
startAfter: {
|
|
62
|
+
type: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
required: string[];
|
|
67
|
+
};
|
|
68
|
+
};
|
|
2
69
|
execAsync(prepRes: any, shared: any): Promise<any>;
|
|
3
70
|
postAsync(shared: any, prepRes: any, execRes: any): Promise<string>;
|
|
4
71
|
#private;
|
package/dist/nodes/s3.js
CHANGED
|
@@ -1,6 +1,75 @@
|
|
|
1
1
|
import { AsyncNode } from '../qflow.js';
|
|
2
2
|
import { S3Client } from 'bun';
|
|
3
3
|
export class S3CloudStorageNode extends AsyncNode {
|
|
4
|
+
static getToolDefinition() {
|
|
5
|
+
return {
|
|
6
|
+
name: "s3",
|
|
7
|
+
description: "Interacts with an S3-compatible object storage service.",
|
|
8
|
+
parameters: {
|
|
9
|
+
type: "object",
|
|
10
|
+
properties: {
|
|
11
|
+
accessKeyId: {
|
|
12
|
+
type: "string",
|
|
13
|
+
description: "Your S3 access key ID."
|
|
14
|
+
},
|
|
15
|
+
secretAccessKey: {
|
|
16
|
+
type: "string",
|
|
17
|
+
description: "Your S3 secret access key."
|
|
18
|
+
},
|
|
19
|
+
bucket: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "The name of your S3 bucket."
|
|
22
|
+
},
|
|
23
|
+
endpoint: {
|
|
24
|
+
type: "string",
|
|
25
|
+
description: "The S3 endpoint URL."
|
|
26
|
+
},
|
|
27
|
+
region: {
|
|
28
|
+
type: "string",
|
|
29
|
+
description: "The S3 region."
|
|
30
|
+
},
|
|
31
|
+
action: {
|
|
32
|
+
type: "string",
|
|
33
|
+
enum: ["upload", "download", "delete", "presign", "list"],
|
|
34
|
+
description: "The action to perform."
|
|
35
|
+
},
|
|
36
|
+
key: {
|
|
37
|
+
type: "string",
|
|
38
|
+
description: "The key of the object to operate on."
|
|
39
|
+
},
|
|
40
|
+
content: {
|
|
41
|
+
type: "string",
|
|
42
|
+
description: "The content to upload."
|
|
43
|
+
},
|
|
44
|
+
acl: {
|
|
45
|
+
type: "string",
|
|
46
|
+
description: "The access control list for presigned URLs."
|
|
47
|
+
},
|
|
48
|
+
expiresIn: {
|
|
49
|
+
type: "number",
|
|
50
|
+
description: "The expiration time for presigned URLs."
|
|
51
|
+
},
|
|
52
|
+
method: {
|
|
53
|
+
type: "string",
|
|
54
|
+
description: "The HTTP method for presigned URLs."
|
|
55
|
+
},
|
|
56
|
+
prefix: {
|
|
57
|
+
type: "string",
|
|
58
|
+
description: "The prefix for listing files."
|
|
59
|
+
},
|
|
60
|
+
maxKeys: {
|
|
61
|
+
type: "number",
|
|
62
|
+
description: "The maximum number of keys to return when listing files."
|
|
63
|
+
},
|
|
64
|
+
startAfter: {
|
|
65
|
+
type: "string",
|
|
66
|
+
description: "The key to start after when listing files."
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
required: ["accessKeyId", "secretAccessKey", "bucket", "endpoint", "action", "key"]
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
4
73
|
#s3 = null;
|
|
5
74
|
async prepAsync(shared) {
|
|
6
75
|
const { accessKeyId, secretAccessKey, bucket, endpoint, region } = this.params;
|
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
export class SchedulerNode extends AsyncNode {
|
|
2
|
+
static getToolDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
action: {
|
|
9
|
+
type: string;
|
|
10
|
+
enum: string[];
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
schedule: {
|
|
14
|
+
type: string[];
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
flow: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
flowParams: {
|
|
22
|
+
type: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
id: {
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
required: string[];
|
|
31
|
+
};
|
|
32
|
+
};
|
|
2
33
|
static activeTasks: Map<any, any>;
|
|
3
34
|
execAsync(): Promise<{
|
|
4
35
|
status: string;
|
package/dist/nodes/scheduler.js
CHANGED
|
@@ -3,6 +3,39 @@ import { AsyncNode, AsyncFlow } from '../qflow.js';
|
|
|
3
3
|
import * as cron from 'node-cron';
|
|
4
4
|
import { log } from '../logger.js';
|
|
5
5
|
export class SchedulerNode extends AsyncNode {
|
|
6
|
+
static getToolDefinition() {
|
|
7
|
+
return {
|
|
8
|
+
name: "scheduler",
|
|
9
|
+
description: "Schedules qflow flows for future or recurring execution using cron syntax or a delay.",
|
|
10
|
+
parameters: {
|
|
11
|
+
type: "object",
|
|
12
|
+
properties: {
|
|
13
|
+
action: {
|
|
14
|
+
type: "string",
|
|
15
|
+
enum: ["start", "stop"],
|
|
16
|
+
description: "The action to perform: 'start' a new schedule or 'stop' an existing one."
|
|
17
|
+
},
|
|
18
|
+
schedule: {
|
|
19
|
+
type: ["string", "number"],
|
|
20
|
+
description: "Required for 'start'. A cron string (e.g., '0 3 * * *') or a number in milliseconds for a one-time delay."
|
|
21
|
+
},
|
|
22
|
+
flow: {
|
|
23
|
+
type: "string", // This will be the name of a flow in the flowRegistry
|
|
24
|
+
description: "Required for 'start'. The name of the qflow AsyncFlow instance to trigger."
|
|
25
|
+
},
|
|
26
|
+
flowParams: {
|
|
27
|
+
type: "object",
|
|
28
|
+
description: "Optional. Parameters (shared object) to pass to the triggered flow's runAsync."
|
|
29
|
+
},
|
|
30
|
+
id: {
|
|
31
|
+
type: "string",
|
|
32
|
+
description: "Optional. A unique ID for the scheduled task (required for 'stop' action). If not provided for 'start', a random one will be generated."
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
required: ["action"]
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
6
39
|
// Static map to hold all active scheduled tasks
|
|
7
40
|
static activeTasks = new Map();
|
|
8
41
|
constructor(maxRetries = 1, wait = 0) {
|
package/dist/nodes/search.d.ts
CHANGED
|
@@ -6,6 +6,20 @@
|
|
|
6
6
|
* @returns {Promise<object[]>} A promise that resolves to an array of search result objects.
|
|
7
7
|
*/
|
|
8
8
|
export class DuckDuckGoSearchNode extends AsyncNode {
|
|
9
|
+
static getToolDefinition(): {
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
parameters: {
|
|
13
|
+
type: string;
|
|
14
|
+
properties: {
|
|
15
|
+
query: {
|
|
16
|
+
type: string;
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
required: string[];
|
|
21
|
+
};
|
|
22
|
+
};
|
|
9
23
|
execAsync(): Promise<any[]>;
|
|
10
24
|
postAsync(shared: any, prepRes: any, execRes: any): Promise<string>;
|
|
11
25
|
}
|
|
@@ -19,6 +33,28 @@ export class DuckDuckGoSearchNode extends AsyncNode {
|
|
|
19
33
|
* @returns {Promise<object[]>} A promise that resolves to an array of search result objects.
|
|
20
34
|
*/
|
|
21
35
|
export class GoogleSearchNode extends AsyncNode {
|
|
36
|
+
static getToolDefinition(): {
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
parameters: {
|
|
40
|
+
type: string;
|
|
41
|
+
properties: {
|
|
42
|
+
query: {
|
|
43
|
+
type: string;
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
apiKey: {
|
|
47
|
+
type: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
cseId: {
|
|
51
|
+
type: string;
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
required: string[];
|
|
56
|
+
};
|
|
57
|
+
};
|
|
22
58
|
execAsync(): Promise<any>;
|
|
23
59
|
postAsync(shared: any, prepRes: any, execRes: any): Promise<string>;
|
|
24
60
|
}
|
package/dist/nodes/search.js
CHANGED
|
@@ -9,6 +9,22 @@ import { log } from '../logger.js';
|
|
|
9
9
|
* @returns {Promise<object[]>} A promise that resolves to an array of search result objects.
|
|
10
10
|
*/
|
|
11
11
|
export class DuckDuckGoSearchNode extends AsyncNode {
|
|
12
|
+
static getToolDefinition() {
|
|
13
|
+
return {
|
|
14
|
+
name: "duckduckgo_search",
|
|
15
|
+
description: "Performs web searches via DuckDuckGo.",
|
|
16
|
+
parameters: {
|
|
17
|
+
type: "object",
|
|
18
|
+
properties: {
|
|
19
|
+
query: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "The search query."
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
required: ["query"]
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
12
28
|
async execAsync() {
|
|
13
29
|
const { query } = this.params;
|
|
14
30
|
if (!query) {
|
|
@@ -52,6 +68,30 @@ export class DuckDuckGoSearchNode extends AsyncNode {
|
|
|
52
68
|
* @returns {Promise<object[]>} A promise that resolves to an array of search result objects.
|
|
53
69
|
*/
|
|
54
70
|
export class GoogleSearchNode extends AsyncNode {
|
|
71
|
+
static getToolDefinition() {
|
|
72
|
+
return {
|
|
73
|
+
name: "google_search",
|
|
74
|
+
description: "Performs web searches via Google Custom Search (requires API key).",
|
|
75
|
+
parameters: {
|
|
76
|
+
type: "object",
|
|
77
|
+
properties: {
|
|
78
|
+
query: {
|
|
79
|
+
type: "string",
|
|
80
|
+
description: "The search query."
|
|
81
|
+
},
|
|
82
|
+
apiKey: {
|
|
83
|
+
type: "string",
|
|
84
|
+
description: "Your Google API Key."
|
|
85
|
+
},
|
|
86
|
+
cseId: {
|
|
87
|
+
type: "string",
|
|
88
|
+
description: "Your Custom Search Engine ID."
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
required: ["query", "apiKey", "cseId"]
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
55
95
|
async execAsync() {
|
|
56
96
|
const { query, apiKey, cseId } = this.params;
|
|
57
97
|
if (!query || !apiKey || !cseId) {
|
|
@@ -1,4 +1,51 @@
|
|
|
1
1
|
export class SemanticMemoryNode extends AsyncNode {
|
|
2
|
+
static getToolDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
action: {
|
|
9
|
+
type: string;
|
|
10
|
+
enum: string[];
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
content: {
|
|
14
|
+
type: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
query: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
id: {
|
|
22
|
+
type: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
metadata: {
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
memoryPath: {
|
|
30
|
+
type: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
embeddingModel: {
|
|
34
|
+
type: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
embeddingBaseUrl: {
|
|
38
|
+
type: string;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
topK: {
|
|
42
|
+
type: string;
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
required: string[];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
2
49
|
constructor();
|
|
3
50
|
memoryIndex: {};
|
|
4
51
|
indexFilePath: string;
|
|
@@ -20,6 +20,55 @@ function cosineSimilarity(vecA, vecB) {
|
|
|
20
20
|
return dotProduct / (magnitudeA * magnitudeB);
|
|
21
21
|
}
|
|
22
22
|
export class SemanticMemoryNode extends AsyncNode {
|
|
23
|
+
static getToolDefinition() {
|
|
24
|
+
return {
|
|
25
|
+
name: "semantic_memory_node",
|
|
26
|
+
description: "Stores and retrieves text memories via semantic search (requires Ollama).",
|
|
27
|
+
parameters: {
|
|
28
|
+
type: "object",
|
|
29
|
+
properties: {
|
|
30
|
+
action: {
|
|
31
|
+
type: "string",
|
|
32
|
+
enum: ["store", "retrieve"],
|
|
33
|
+
description: "The action to perform: 'store' a new memory or 'retrieve' existing ones."
|
|
34
|
+
},
|
|
35
|
+
content: {
|
|
36
|
+
type: "string",
|
|
37
|
+
description: "Required for 'store' action. The text content of the memory to store."
|
|
38
|
+
},
|
|
39
|
+
query: {
|
|
40
|
+
type: "string",
|
|
41
|
+
description: "Required for 'retrieve' action. The text query for semantic search."
|
|
42
|
+
},
|
|
43
|
+
id: {
|
|
44
|
+
type: "string",
|
|
45
|
+
description: "Optional for 'store' action. A unique identifier for the memory. If not provided, one will be generated."
|
|
46
|
+
},
|
|
47
|
+
metadata: {
|
|
48
|
+
type: "object",
|
|
49
|
+
description: "Optional for 'store' action. Key-value pairs to store alongside the memory."
|
|
50
|
+
},
|
|
51
|
+
memoryPath: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "Optional. The directory path where memories and the index are stored. Defaults to './semantic_memories'."
|
|
54
|
+
},
|
|
55
|
+
embeddingModel: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "Optional. The Ollama embedding model name to use (e.g., 'nomic-embed-text'). Defaults to 'nomic-embed-text'."
|
|
58
|
+
},
|
|
59
|
+
embeddingBaseUrl: {
|
|
60
|
+
type: "string",
|
|
61
|
+
description: "Optional. The base URL of the Ollama API for embeddings. Defaults to 'http://localhost:11434'."
|
|
62
|
+
},
|
|
63
|
+
topK: {
|
|
64
|
+
type: "number",
|
|
65
|
+
description: "Optional for 'retrieve' action. The number of top similar results to retrieve. Defaults to 5."
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
required: ["action"]
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
23
72
|
constructor() {
|
|
24
73
|
super();
|
|
25
74
|
this.memoryIndex = {}; // In-memory index: { id: { content: string, embedding: number[], metadata: object } }
|
package/dist/nodes/shell.d.ts
CHANGED
|
@@ -5,6 +5,20 @@
|
|
|
5
5
|
* @returns {Promise<object>} A promise that resolves to an object containing the stdout and stderr of the command.
|
|
6
6
|
*/
|
|
7
7
|
export class ShellCommandNode extends AsyncNode {
|
|
8
|
+
static getToolDefinition(): {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
parameters: {
|
|
12
|
+
type: string;
|
|
13
|
+
properties: {
|
|
14
|
+
command: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
required: string[];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
8
22
|
execAsync(): Promise<any>;
|
|
9
23
|
postAsync(shared: any, prepRes: any, execRes: any): Promise<string>;
|
|
10
24
|
}
|
package/dist/nodes/shell.js
CHANGED
|
@@ -7,6 +7,22 @@ import { exec } from 'child_process';
|
|
|
7
7
|
* @returns {Promise<object>} A promise that resolves to an object containing the stdout and stderr of the command.
|
|
8
8
|
*/
|
|
9
9
|
export class ShellCommandNode extends AsyncNode {
|
|
10
|
+
static getToolDefinition() {
|
|
11
|
+
return {
|
|
12
|
+
name: "shell_command",
|
|
13
|
+
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 &'",
|
|
14
|
+
parameters: {
|
|
15
|
+
type: "object",
|
|
16
|
+
properties: {
|
|
17
|
+
command: {
|
|
18
|
+
type: "string",
|
|
19
|
+
description: "The full shell command to execute (e.g., 'ls -l', 'npm install cheerio')."
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
required: ["command"]
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
10
26
|
async execAsync() {
|
|
11
27
|
const { command } = this.params;
|
|
12
28
|
if (!command) {
|
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
export class SpeechSynthesisNode extends AsyncNode {
|
|
2
|
+
static getToolDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
text: {
|
|
9
|
+
type: string;
|
|
10
|
+
description: string;
|
|
11
|
+
};
|
|
12
|
+
provider: {
|
|
13
|
+
type: string;
|
|
14
|
+
enum: string[];
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
voice: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
outputFilePath: {
|
|
22
|
+
type: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
required: string[];
|
|
27
|
+
};
|
|
28
|
+
};
|
|
2
29
|
providers: {
|
|
3
30
|
macos: MacOSSayProvider;
|
|
4
31
|
linux: LinuxEspeakProvider;
|
|
@@ -68,6 +68,35 @@ class GoogleCloudTTSProvider {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
export class SpeechSynthesisNode extends AsyncNode {
|
|
71
|
+
static getToolDefinition() {
|
|
72
|
+
return {
|
|
73
|
+
name: "speech_synthesis",
|
|
74
|
+
description: "Converts text to spoken audio using OS capabilities or cloud APIs.",
|
|
75
|
+
parameters: {
|
|
76
|
+
type: "object",
|
|
77
|
+
properties: {
|
|
78
|
+
text: {
|
|
79
|
+
type: "string",
|
|
80
|
+
description: "The text to convert to speech."
|
|
81
|
+
},
|
|
82
|
+
provider: {
|
|
83
|
+
type: "string",
|
|
84
|
+
enum: ["macos", "linux", "windows", "google"],
|
|
85
|
+
description: "Optional. The speech synthesis provider to use. Defaults to OS-specific. 'google' requires GOOGLE_TTS_API_KEY."
|
|
86
|
+
},
|
|
87
|
+
voice: {
|
|
88
|
+
type: "string",
|
|
89
|
+
description: "Optional. The specific voice to use (e.g., 'Alex' for macOS, 'en-us' for espeak, 'en-US-Wavenet-D' for Google)."
|
|
90
|
+
},
|
|
91
|
+
outputFilePath: {
|
|
92
|
+
type: "string",
|
|
93
|
+
description: "Optional. If provided, saves the audio to this file path instead of playing it directly."
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
required: ["text"]
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
}
|
|
71
100
|
constructor(maxRetries = 1, wait = 0) {
|
|
72
101
|
super(maxRetries, wait);
|
|
73
102
|
this.providers = {
|
|
@@ -1,4 +1,55 @@
|
|
|
1
1
|
export class SpreadsheetNode extends AsyncNode {
|
|
2
|
+
static getToolDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
action: {
|
|
9
|
+
type: string;
|
|
10
|
+
enum: string[];
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
filePath: {
|
|
14
|
+
type: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
sheetName: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
data: {
|
|
22
|
+
type: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
headerRow: {
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
range: {
|
|
30
|
+
type: string;
|
|
31
|
+
description: string;
|
|
32
|
+
};
|
|
33
|
+
startRow: {
|
|
34
|
+
type: string;
|
|
35
|
+
description: string;
|
|
36
|
+
};
|
|
37
|
+
numRows: {
|
|
38
|
+
type: string;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
newSheetName: {
|
|
42
|
+
type: string;
|
|
43
|
+
description: string;
|
|
44
|
+
};
|
|
45
|
+
formats: {
|
|
46
|
+
type: string;
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
required: string[];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
2
53
|
execAsync(): Promise<any[] | {
|
|
3
54
|
sheets: string[];
|
|
4
55
|
message?: undefined;
|