@receptron/graphai_cli 0.3.1 → 0.4.0
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/README.md +1 -1
- package/lib/args.js +1 -0
- package/lib/graphai_cli.js +2 -7
- package/lib/options.js +1 -1
- package/package.json +7 -9
package/README.md
CHANGED
package/lib/args.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.args = exports.hasOption = void 0;
|
|
|
7
7
|
const yargs_1 = __importDefault(require("yargs"));
|
|
8
8
|
exports.hasOption = ["-l", "--list", "-d", "--detail", "-s", "--sample"].some((o) => process.argv.includes(o));
|
|
9
9
|
exports.args = yargs_1.default
|
|
10
|
+
.scriptName("graphai")
|
|
10
11
|
.option("list", {
|
|
11
12
|
alias: "l",
|
|
12
13
|
description: "agents list",
|
package/lib/graphai_cli.js
CHANGED
|
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
};
|
|
29
29
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
30
|
const graphai_1 = require("graphai");
|
|
31
|
-
const packages = __importStar(require("graphai/lib/experimental_agents
|
|
31
|
+
const packages = __importStar(require("graphai/lib/experimental_agents"));
|
|
32
32
|
require("dotenv/config");
|
|
33
33
|
const fs_1 = __importDefault(require("fs"));
|
|
34
34
|
const path_1 = __importDefault(require("path"));
|
|
@@ -69,12 +69,7 @@ const main = async () => {
|
|
|
69
69
|
console.log(yaml_1.default.stringify(graph_data, null, 2));
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
|
-
const
|
|
73
|
-
const [k, v] = current;
|
|
74
|
-
tmp[v.name] = v.agent;
|
|
75
|
-
return tmp;
|
|
76
|
-
}, {});
|
|
77
|
-
const graph = new graphai_1.GraphAI(graph_data, agents);
|
|
72
|
+
const graph = new graphai_1.GraphAI(graph_data, packages);
|
|
78
73
|
if (args_1.args.verbose) {
|
|
79
74
|
graph.onLogCallback = utils_1.callbackLog;
|
|
80
75
|
}
|
package/lib/options.js
CHANGED
|
@@ -10,7 +10,7 @@ const option = (args, packages) => {
|
|
|
10
10
|
.join("\n"));
|
|
11
11
|
};
|
|
12
12
|
const getAgent = (agentId) => {
|
|
13
|
-
return Object.entries(packages).find(([k,
|
|
13
|
+
return Object.entries(packages).find(([k, __v]) => k === agentId);
|
|
14
14
|
};
|
|
15
15
|
const detail = () => {
|
|
16
16
|
const agent = getAgent(args.detail);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@receptron/graphai_cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "GraphAI command line tools.",
|
|
5
5
|
"main": "lib/graphai_cli.js",
|
|
6
6
|
"bin": {
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
13
|
"build": "tsc && tsc-alias",
|
|
14
|
-
"eslint": "eslint --fix
|
|
15
|
-
"format": "prettier --write '{src,test_yaml,samples}/**/*.{yaml,ts,json}'
|
|
14
|
+
"eslint": "eslint --fix",
|
|
15
|
+
"format": "prettier --write '{src,test_yaml,samples}/**/*.{yaml,ts,json}'",
|
|
16
16
|
"test": "node --test -r tsconfig-paths/register --require ts-node/register ./test_yaml/test_*.ts",
|
|
17
17
|
"cli": "npx ts-node -r tsconfig-paths/register ./src/graphai_cli.ts",
|
|
18
18
|
"b": "yarn run format && yarn run eslint && yarn run build"
|
|
@@ -31,15 +31,13 @@
|
|
|
31
31
|
"@types/express": "^4.17.21",
|
|
32
32
|
"@types/node": "^20.8.7",
|
|
33
33
|
"@types/yargs": "^17.0.32",
|
|
34
|
-
"
|
|
35
|
-
"@typescript-eslint/parser": "^6.8.0",
|
|
36
|
-
"eslint": "^7.32.0 || ^8.2.0",
|
|
37
|
-
"eslint-plugin-import": "^2.25.2",
|
|
34
|
+
"eslint": "^9.2.0",
|
|
38
35
|
"prettier": "^3.0.3",
|
|
39
36
|
"ts-node": "^10.9.1",
|
|
40
37
|
"tsc-alias": "^1.8.8",
|
|
41
38
|
"tsconfig-paths": "^4.2.0",
|
|
42
|
-
"typescript": "^5.
|
|
39
|
+
"typescript": "^5.4.3",
|
|
40
|
+
"typescript-eslint": "^7.8.0"
|
|
43
41
|
},
|
|
44
42
|
"dependencies": {
|
|
45
43
|
"@inquirer/prompts": "^5.0.0",
|
|
@@ -47,7 +45,7 @@
|
|
|
47
45
|
"deepmerge": "^4.3.1",
|
|
48
46
|
"dotenv": "^16.4.5",
|
|
49
47
|
"express": "^4.19.2",
|
|
50
|
-
"graphai": "
|
|
48
|
+
"graphai": "0.4.0",
|
|
51
49
|
"groq-sdk": "^0.3.3",
|
|
52
50
|
"openai": "^4.12.4",
|
|
53
51
|
"slashgpt": "^0.0.8",
|