@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
package/dist/nodes/filesystem.js
CHANGED
|
@@ -9,6 +9,22 @@ import { log } from '../logger.js';
|
|
|
9
9
|
* @returns {Promise<string>} A promise that resolves to the content of the file.
|
|
10
10
|
*/
|
|
11
11
|
export class ReadFileNode extends AsyncNode {
|
|
12
|
+
static getToolDefinition() {
|
|
13
|
+
return {
|
|
14
|
+
name: "read_file",
|
|
15
|
+
description: "Reads file content.",
|
|
16
|
+
parameters: {
|
|
17
|
+
type: "object",
|
|
18
|
+
properties: {
|
|
19
|
+
filePath: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "The absolute path to the file to read."
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
required: ["filePath"]
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
12
28
|
async execAsync() {
|
|
13
29
|
const { filePath } = this.params;
|
|
14
30
|
if (!filePath) {
|
|
@@ -32,6 +48,26 @@ export class ReadFileNode extends AsyncNode {
|
|
|
32
48
|
* @returns {Promise<void>} A promise that resolves when the file has been written.
|
|
33
49
|
*/
|
|
34
50
|
export class WriteFileNode extends AsyncNode {
|
|
51
|
+
static getToolDefinition() {
|
|
52
|
+
return {
|
|
53
|
+
name: "write_file",
|
|
54
|
+
description: "Writes content to a file.",
|
|
55
|
+
parameters: {
|
|
56
|
+
type: "object",
|
|
57
|
+
properties: {
|
|
58
|
+
filePath: {
|
|
59
|
+
type: "string",
|
|
60
|
+
description: "The absolute path to the file to write to."
|
|
61
|
+
},
|
|
62
|
+
content: {
|
|
63
|
+
type: "string",
|
|
64
|
+
description: "The content to write to the file."
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
required: ["filePath", "content"]
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
35
71
|
async execAsync() {
|
|
36
72
|
const { filePath, content } = this.params;
|
|
37
73
|
if (!filePath || content === undefined) {
|
|
@@ -52,6 +88,26 @@ export class WriteFileNode extends AsyncNode {
|
|
|
52
88
|
* @returns {Promise<void>} A promise that resolves when the content has been appended.
|
|
53
89
|
*/
|
|
54
90
|
export class AppendFileNode extends AsyncNode {
|
|
91
|
+
static getToolDefinition() {
|
|
92
|
+
return {
|
|
93
|
+
name: "append_file",
|
|
94
|
+
description: "Appends content to a file.",
|
|
95
|
+
parameters: {
|
|
96
|
+
type: "object",
|
|
97
|
+
properties: {
|
|
98
|
+
filePath: {
|
|
99
|
+
type: "string",
|
|
100
|
+
description: "The absolute path to the file to append to."
|
|
101
|
+
},
|
|
102
|
+
content: {
|
|
103
|
+
type: "string",
|
|
104
|
+
description: "The content to append to the file."
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
required: ["filePath", "content"]
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
55
111
|
async execAsync() {
|
|
56
112
|
const { filePath, content } = this.params;
|
|
57
113
|
if (!filePath || content === undefined) {
|
|
@@ -71,6 +127,22 @@ export class AppendFileNode extends AsyncNode {
|
|
|
71
127
|
* @returns {Promise<string[]>} A promise that resolves to an array of file names.
|
|
72
128
|
*/
|
|
73
129
|
export class ListDirectoryNode extends AsyncNode {
|
|
130
|
+
static getToolDefinition() {
|
|
131
|
+
return {
|
|
132
|
+
name: "list_directory",
|
|
133
|
+
description: "Lists directory contents.",
|
|
134
|
+
parameters: {
|
|
135
|
+
type: "object",
|
|
136
|
+
properties: {
|
|
137
|
+
directoryPath: {
|
|
138
|
+
type: "string",
|
|
139
|
+
description: "The absolute path to the directory to list."
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
required: ["directoryPath"]
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
}
|
|
74
146
|
async execAsync() {
|
|
75
147
|
const { directoryPath } = this.params;
|
|
76
148
|
if (!directoryPath) {
|
package/dist/nodes/gis.d.ts
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
export class GISNode extends AsyncNode {
|
|
2
|
+
static getToolDefinition(): {
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
parameters: {
|
|
6
|
+
type: string;
|
|
7
|
+
properties: {
|
|
8
|
+
operation: {
|
|
9
|
+
type: string;
|
|
10
|
+
enum: string[];
|
|
11
|
+
description: string;
|
|
12
|
+
};
|
|
13
|
+
provider: {
|
|
14
|
+
type: string;
|
|
15
|
+
enum: string[];
|
|
16
|
+
default: string;
|
|
17
|
+
description: string;
|
|
18
|
+
};
|
|
19
|
+
params: {
|
|
20
|
+
type: string;
|
|
21
|
+
description: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
required: string[];
|
|
25
|
+
};
|
|
26
|
+
};
|
|
2
27
|
providers: {
|
|
3
28
|
google: GoogleMapsProvider;
|
|
4
29
|
openstreetmap: OpenStreetMapProvider;
|
package/dist/nodes/gis.js
CHANGED
|
@@ -67,6 +67,33 @@ class OpenStreetMapProvider {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
export class GISNode extends AsyncNode {
|
|
70
|
+
static getToolDefinition() {
|
|
71
|
+
return {
|
|
72
|
+
name: "gis",
|
|
73
|
+
description: "Performs Geographic Information System (GIS) operations like geocoding and reverse geocoding.",
|
|
74
|
+
parameters: {
|
|
75
|
+
type: "object",
|
|
76
|
+
properties: {
|
|
77
|
+
operation: {
|
|
78
|
+
type: "string",
|
|
79
|
+
enum: ["geocode", "reverseGeocode"],
|
|
80
|
+
description: "The GIS operation to perform: 'geocode' (address to coordinates) or 'reverseGeocode' (coordinates to address)."
|
|
81
|
+
},
|
|
82
|
+
provider: {
|
|
83
|
+
type: "string",
|
|
84
|
+
enum: ["google", "openstreetmap"],
|
|
85
|
+
default: "openstreetmap",
|
|
86
|
+
description: "The GIS service provider to use. Defaults to 'openstreetmap' (free, open-source)."
|
|
87
|
+
},
|
|
88
|
+
params: {
|
|
89
|
+
type: "object",
|
|
90
|
+
description: "Parameters specific to the operation. For 'geocode', requires { address: string }. For 'reverseGeocode', requires { lat: number, lng: number }."
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
required: ["operation", "params"]
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
70
97
|
constructor(maxRetries = 3, wait = 1) {
|
|
71
98
|
super(maxRetries, wait);
|
|
72
99
|
this.providers = {
|
package/dist/nodes/git.d.ts
CHANGED
|
@@ -1,4 +1,46 @@
|
|
|
1
1
|
export class GitNode 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
|
+
repoPath: {
|
|
14
|
+
type: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
remoteUrl: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
files: {
|
|
22
|
+
type: string;
|
|
23
|
+
items: {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
message: {
|
|
29
|
+
type: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
branch: {
|
|
33
|
+
type: string;
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
remote: {
|
|
37
|
+
type: string;
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
required: string[];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
2
44
|
execAsync(): Promise<{}>;
|
|
3
45
|
}
|
|
4
46
|
import { AsyncNode } from '../qflow.js';
|
package/dist/nodes/git.js
CHANGED
|
@@ -1,6 +1,50 @@
|
|
|
1
1
|
import { AsyncNode } from '../qflow.js';
|
|
2
2
|
import simpleGit from 'simple-git';
|
|
3
3
|
export class GitNode extends AsyncNode {
|
|
4
|
+
static getToolDefinition() {
|
|
5
|
+
return {
|
|
6
|
+
name: "git",
|
|
7
|
+
description: "Performs Git operations like clone, add, commit, and push.",
|
|
8
|
+
parameters: {
|
|
9
|
+
type: "object",
|
|
10
|
+
properties: {
|
|
11
|
+
action: {
|
|
12
|
+
type: "string",
|
|
13
|
+
enum: ["clone", "init", "add", "commit", "push", "pull", "status"],
|
|
14
|
+
description: "The Git action to perform."
|
|
15
|
+
},
|
|
16
|
+
repoPath: {
|
|
17
|
+
type: "string",
|
|
18
|
+
description: "The local path to the repository."
|
|
19
|
+
},
|
|
20
|
+
remoteUrl: {
|
|
21
|
+
type: "string",
|
|
22
|
+
description: "The URL of the remote repository (for 'clone' action)."
|
|
23
|
+
},
|
|
24
|
+
files: {
|
|
25
|
+
type: "array",
|
|
26
|
+
items: {
|
|
27
|
+
type: "string"
|
|
28
|
+
},
|
|
29
|
+
description: "An array of file paths to add to the staging area (for 'add' action)."
|
|
30
|
+
},
|
|
31
|
+
message: {
|
|
32
|
+
type: "string",
|
|
33
|
+
description: "The commit message (for 'commit' action)."
|
|
34
|
+
},
|
|
35
|
+
branch: {
|
|
36
|
+
type: "string",
|
|
37
|
+
description: "The branch to push to or pull from."
|
|
38
|
+
},
|
|
39
|
+
remote: {
|
|
40
|
+
type: "string",
|
|
41
|
+
description: "The name of the remote (e.g., 'origin')."
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
required: ["action"]
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
}
|
|
4
48
|
async execAsync() {
|
|
5
49
|
const { action, repoPath, remoteUrl, files, message, branch, remote = 'origin', } = this.params;
|
|
6
50
|
if (!repoPath && action !== 'clone') {
|
package/dist/nodes/github.d.ts
CHANGED
|
@@ -9,6 +9,36 @@
|
|
|
9
9
|
* @returns {Promise<object>} A promise that resolves to the created issue object.
|
|
10
10
|
*/
|
|
11
11
|
export class CreateIssueNode extends AsyncNode {
|
|
12
|
+
static getToolDefinition(): {
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
parameters: {
|
|
16
|
+
type: string;
|
|
17
|
+
properties: {
|
|
18
|
+
token: {
|
|
19
|
+
type: string;
|
|
20
|
+
description: string;
|
|
21
|
+
};
|
|
22
|
+
owner: {
|
|
23
|
+
type: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
repo: {
|
|
27
|
+
type: string;
|
|
28
|
+
description: string;
|
|
29
|
+
};
|
|
30
|
+
title: {
|
|
31
|
+
type: string;
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
body: {
|
|
35
|
+
type: string;
|
|
36
|
+
description: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
required: string[];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
12
42
|
execAsync(): Promise<unknown>;
|
|
13
43
|
postAsync(shared: any, prepRes: any, execRes: any): Promise<string>;
|
|
14
44
|
}
|
|
@@ -22,6 +52,32 @@ export class CreateIssueNode extends AsyncNode {
|
|
|
22
52
|
* @returns {Promise<object>} A promise that resolves to the issue object.
|
|
23
53
|
*/
|
|
24
54
|
export class GetIssueNode extends AsyncNode {
|
|
55
|
+
static getToolDefinition(): {
|
|
56
|
+
name: string;
|
|
57
|
+
description: string;
|
|
58
|
+
parameters: {
|
|
59
|
+
type: string;
|
|
60
|
+
properties: {
|
|
61
|
+
token: {
|
|
62
|
+
type: string;
|
|
63
|
+
description: string;
|
|
64
|
+
};
|
|
65
|
+
owner: {
|
|
66
|
+
type: string;
|
|
67
|
+
description: string;
|
|
68
|
+
};
|
|
69
|
+
repo: {
|
|
70
|
+
type: string;
|
|
71
|
+
description: string;
|
|
72
|
+
};
|
|
73
|
+
issue_number: {
|
|
74
|
+
type: string;
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
required: string[];
|
|
79
|
+
};
|
|
80
|
+
};
|
|
25
81
|
execAsync(): Promise<unknown>;
|
|
26
82
|
}
|
|
27
83
|
import { AsyncNode } from '../qflow.js';
|
package/dist/nodes/github.js
CHANGED
|
@@ -12,6 +12,38 @@ const API_BASE = 'https://api.github.com';
|
|
|
12
12
|
* @returns {Promise<object>} A promise that resolves to the created issue object.
|
|
13
13
|
*/
|
|
14
14
|
export class CreateIssueNode extends AsyncNode {
|
|
15
|
+
static getToolDefinition() {
|
|
16
|
+
return {
|
|
17
|
+
name: "github_create_issue",
|
|
18
|
+
description: "Creates a new issue in a GitHub repository.",
|
|
19
|
+
parameters: {
|
|
20
|
+
type: "object",
|
|
21
|
+
properties: {
|
|
22
|
+
token: {
|
|
23
|
+
type: "string",
|
|
24
|
+
description: "The GitHub personal access token."
|
|
25
|
+
},
|
|
26
|
+
owner: {
|
|
27
|
+
type: "string",
|
|
28
|
+
description: "The owner of the repository."
|
|
29
|
+
},
|
|
30
|
+
repo: {
|
|
31
|
+
type: "string",
|
|
32
|
+
description: "The name of the repository."
|
|
33
|
+
},
|
|
34
|
+
title: {
|
|
35
|
+
type: "string",
|
|
36
|
+
description: "The title of the issue."
|
|
37
|
+
},
|
|
38
|
+
body: {
|
|
39
|
+
type: "string",
|
|
40
|
+
description: "Optional. The body of the issue."
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
required: ["token", "owner", "repo", "title"]
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
15
47
|
async execAsync() {
|
|
16
48
|
const { token, owner, repo, title, body } = this.params;
|
|
17
49
|
if (!token || !owner || !repo || !title) {
|
|
@@ -49,6 +81,34 @@ export class CreateIssueNode extends AsyncNode {
|
|
|
49
81
|
* @returns {Promise<object>} A promise that resolves to the issue object.
|
|
50
82
|
*/
|
|
51
83
|
export class GetIssueNode extends AsyncNode {
|
|
84
|
+
static getToolDefinition() {
|
|
85
|
+
return {
|
|
86
|
+
name: "github_get_issue",
|
|
87
|
+
description: "Retrieves an issue from a GitHub repository.",
|
|
88
|
+
parameters: {
|
|
89
|
+
type: "object",
|
|
90
|
+
properties: {
|
|
91
|
+
token: {
|
|
92
|
+
type: "string",
|
|
93
|
+
description: "The GitHub personal access token."
|
|
94
|
+
},
|
|
95
|
+
owner: {
|
|
96
|
+
type: "string",
|
|
97
|
+
description: "The owner of the repository."
|
|
98
|
+
},
|
|
99
|
+
repo: {
|
|
100
|
+
type: "string",
|
|
101
|
+
description: "The name of the repository."
|
|
102
|
+
},
|
|
103
|
+
issue_number: {
|
|
104
|
+
type: "number",
|
|
105
|
+
description: "The number of the issue to retrieve."
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
required: ["token", "owner", "repo", "issue_number"]
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
}
|
|
52
112
|
async prepAsync(shared) {
|
|
53
113
|
// Retrieve the issue number from the shared object
|
|
54
114
|
this.params.issue_number = shared.createdIssue?.number;
|
|
@@ -5,6 +5,20 @@
|
|
|
5
5
|
* @returns {Promise<number[]>} A promise that resolves to an array of story IDs.
|
|
6
6
|
*/
|
|
7
7
|
export class GetTopStoriesNode extends AsyncNode {
|
|
8
|
+
static getToolDefinition(): {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
parameters: {
|
|
12
|
+
type: string;
|
|
13
|
+
properties: {
|
|
14
|
+
limit: {
|
|
15
|
+
type: string;
|
|
16
|
+
description: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
required: never[];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
8
22
|
execAsync(prepRes: any, shared: any): Promise<string>;
|
|
9
23
|
}
|
|
10
24
|
/**
|
|
@@ -14,6 +28,20 @@ export class GetTopStoriesNode extends AsyncNode {
|
|
|
14
28
|
* @returns {Promise<object>} A promise that resolves to the item details.
|
|
15
29
|
*/
|
|
16
30
|
export class GetItemNode extends AsyncNode {
|
|
31
|
+
static getToolDefinition(): {
|
|
32
|
+
name: string;
|
|
33
|
+
description: string;
|
|
34
|
+
parameters: {
|
|
35
|
+
type: string;
|
|
36
|
+
properties: {
|
|
37
|
+
id: {
|
|
38
|
+
type: string;
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
required: string[];
|
|
43
|
+
};
|
|
44
|
+
};
|
|
17
45
|
execAsync(): Promise<unknown>;
|
|
18
46
|
}
|
|
19
47
|
import { AsyncNode } from '../qflow.js';
|
package/dist/nodes/hackernews.js
CHANGED
|
@@ -8,6 +8,22 @@ const API_BASE = 'https://hacker-news.firebaseio.com/v0';
|
|
|
8
8
|
* @returns {Promise<number[]>} A promise that resolves to an array of story IDs.
|
|
9
9
|
*/
|
|
10
10
|
export class GetTopStoriesNode extends AsyncNode {
|
|
11
|
+
static getToolDefinition() {
|
|
12
|
+
return {
|
|
13
|
+
name: "hackernews_get_top_stories",
|
|
14
|
+
description: "Fetches the top story IDs from the Hacker News API.",
|
|
15
|
+
parameters: {
|
|
16
|
+
type: "object",
|
|
17
|
+
properties: {
|
|
18
|
+
limit: {
|
|
19
|
+
type: "number",
|
|
20
|
+
description: "Optional. The maximum number of story IDs to return. Defaults to 10."
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
required: []
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
11
27
|
async execAsync(prepRes, shared) {
|
|
12
28
|
const { limit = 10 } = this.params;
|
|
13
29
|
log(`[HackerNews] Fetching top ${limit} stories...`, this.params.logging);
|
|
@@ -29,6 +45,22 @@ export class GetTopStoriesNode extends AsyncNode {
|
|
|
29
45
|
* @returns {Promise<object>} A promise that resolves to the item details.
|
|
30
46
|
*/
|
|
31
47
|
export class GetItemNode extends AsyncNode {
|
|
48
|
+
static getToolDefinition() {
|
|
49
|
+
return {
|
|
50
|
+
name: "hackernews_get_item",
|
|
51
|
+
description: "Fetches the details of a specific item from the Hacker News API.",
|
|
52
|
+
parameters: {
|
|
53
|
+
type: "object",
|
|
54
|
+
properties: {
|
|
55
|
+
id: {
|
|
56
|
+
type: "number",
|
|
57
|
+
description: "The ID of the item to fetch."
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
required: ["id"]
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
32
64
|
async execAsync() {
|
|
33
65
|
const { id } = this.params;
|
|
34
66
|
if (!id) {
|
|
@@ -1,4 +1,35 @@
|
|
|
1
1
|
export class HardwareInteractionNode 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
|
+
portPath: {
|
|
14
|
+
type: string;
|
|
15
|
+
description: string;
|
|
16
|
+
};
|
|
17
|
+
baudRate: {
|
|
18
|
+
type: string;
|
|
19
|
+
description: string;
|
|
20
|
+
};
|
|
21
|
+
dataToWrite: {
|
|
22
|
+
type: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
25
|
+
timeout: {
|
|
26
|
+
type: string;
|
|
27
|
+
description: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
required: string[];
|
|
31
|
+
};
|
|
32
|
+
};
|
|
2
33
|
port: SerialPort<any> | null;
|
|
3
34
|
parser: ReadlineParser | null;
|
|
4
35
|
execAsync(): Promise<any>;
|
|
@@ -4,6 +4,39 @@ import { SerialPort } from 'serialport';
|
|
|
4
4
|
import { ReadlineParser } from '@serialport/parser-readline'; // For reading line-by-line
|
|
5
5
|
import { log } from '../logger.js';
|
|
6
6
|
export class HardwareInteractionNode extends AsyncNode {
|
|
7
|
+
static getToolDefinition() {
|
|
8
|
+
return {
|
|
9
|
+
name: "hardware_interaction",
|
|
10
|
+
description: "Communicates with local hardware via serial port (UART).",
|
|
11
|
+
parameters: {
|
|
12
|
+
type: "object",
|
|
13
|
+
properties: {
|
|
14
|
+
action: {
|
|
15
|
+
type: "string",
|
|
16
|
+
enum: ["write", "read_line", "list_ports"],
|
|
17
|
+
description: "The action to perform: 'write' data, 'read_line' from port, or 'list_ports' available."
|
|
18
|
+
},
|
|
19
|
+
portPath: {
|
|
20
|
+
type: "string",
|
|
21
|
+
description: "Required for 'write'/'read_line'. The path to the serial port (e.g., '/dev/ttyUSB0', 'COM1')."
|
|
22
|
+
},
|
|
23
|
+
baudRate: {
|
|
24
|
+
type: "number",
|
|
25
|
+
description: "Optional. The baud rate for serial communication. Defaults to 9600."
|
|
26
|
+
},
|
|
27
|
+
dataToWrite: {
|
|
28
|
+
type: "string",
|
|
29
|
+
description: "Required for 'write'. The data string to send to the serial port."
|
|
30
|
+
},
|
|
31
|
+
timeout: {
|
|
32
|
+
type: "number",
|
|
33
|
+
description: "Optional. Timeout in milliseconds for 'read_line' action. Defaults to 5000."
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
required: ["action"]
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
7
40
|
constructor(maxRetries = 1, wait = 0) {
|
|
8
41
|
super(maxRetries, wait);
|
|
9
42
|
this.port = null;
|
package/dist/nodes/http.d.ts
CHANGED
|
@@ -13,6 +13,57 @@
|
|
|
13
13
|
* @returns {Promise<object>} A promise that resolves to a structured object containing the status, headers, and body of the response.
|
|
14
14
|
*/
|
|
15
15
|
export class HttpRequestNode extends AsyncNode {
|
|
16
|
+
static getToolDefinition(): {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
parameters: {
|
|
20
|
+
type: string;
|
|
21
|
+
properties: {
|
|
22
|
+
url: {
|
|
23
|
+
type: string;
|
|
24
|
+
description: string;
|
|
25
|
+
};
|
|
26
|
+
method: {
|
|
27
|
+
type: string;
|
|
28
|
+
enum: string[];
|
|
29
|
+
default: string;
|
|
30
|
+
description: string;
|
|
31
|
+
};
|
|
32
|
+
headers: {
|
|
33
|
+
type: string;
|
|
34
|
+
description: string;
|
|
35
|
+
};
|
|
36
|
+
body: {
|
|
37
|
+
type: string;
|
|
38
|
+
description: string;
|
|
39
|
+
};
|
|
40
|
+
auth: {
|
|
41
|
+
type: string;
|
|
42
|
+
properties: {
|
|
43
|
+
type: {
|
|
44
|
+
type: string;
|
|
45
|
+
enum: string[];
|
|
46
|
+
description: string;
|
|
47
|
+
};
|
|
48
|
+
token: {
|
|
49
|
+
type: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
52
|
+
username: {
|
|
53
|
+
type: string;
|
|
54
|
+
description: string;
|
|
55
|
+
};
|
|
56
|
+
password: {
|
|
57
|
+
type: string;
|
|
58
|
+
description: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
description: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
required: string[];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
16
67
|
execAsync(): Promise<{
|
|
17
68
|
status: number;
|
|
18
69
|
headers: {
|
package/dist/nodes/http.js
CHANGED
|
@@ -15,6 +15,59 @@ import { log } from '../logger.js';
|
|
|
15
15
|
* @returns {Promise<object>} A promise that resolves to a structured object containing the status, headers, and body of the response.
|
|
16
16
|
*/
|
|
17
17
|
export class HttpRequestNode extends AsyncNode {
|
|
18
|
+
static getToolDefinition() {
|
|
19
|
+
return {
|
|
20
|
+
name: "http_request",
|
|
21
|
+
description: "Makes HTTP requests.",
|
|
22
|
+
parameters: {
|
|
23
|
+
type: "object",
|
|
24
|
+
properties: {
|
|
25
|
+
url: {
|
|
26
|
+
type: "string",
|
|
27
|
+
description: "The full URL of the API endpoint."
|
|
28
|
+
},
|
|
29
|
+
method: {
|
|
30
|
+
type: "string",
|
|
31
|
+
enum: ["GET", "POST", "PUT", "DELETE", "PATCH"],
|
|
32
|
+
default: "GET",
|
|
33
|
+
description: "The HTTP method to use."
|
|
34
|
+
},
|
|
35
|
+
headers: {
|
|
36
|
+
type: "object",
|
|
37
|
+
description: "Custom headers for the request (key-value pairs)."
|
|
38
|
+
},
|
|
39
|
+
body: {
|
|
40
|
+
type: "object", // Can be any type, but object is common for JSON
|
|
41
|
+
description: "The request payload. If an object, it will be stringified as JSON."
|
|
42
|
+
},
|
|
43
|
+
auth: {
|
|
44
|
+
type: "object",
|
|
45
|
+
properties: {
|
|
46
|
+
type: {
|
|
47
|
+
type: "string",
|
|
48
|
+
enum: ["bearer", "basic"],
|
|
49
|
+
description: "The type of authentication."
|
|
50
|
+
},
|
|
51
|
+
token: {
|
|
52
|
+
type: "string",
|
|
53
|
+
description: "The bearer token."
|
|
54
|
+
},
|
|
55
|
+
username: {
|
|
56
|
+
type: "string",
|
|
57
|
+
description: "The username for basic auth."
|
|
58
|
+
},
|
|
59
|
+
password: {
|
|
60
|
+
type: "string",
|
|
61
|
+
description: "The password for basic auth."
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
description: "Authentication configuration."
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
required: ["url"]
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
18
71
|
async execAsync() {
|
|
19
72
|
const { url, method = 'GET', headers = {}, body, auth } = this.params;
|
|
20
73
|
if (!url) {
|