@aigne/cli 1.22.6 → 1.22.8
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/CHANGELOG.md +43 -0
- package/dist/cli.js +3 -2
- package/dist/commands/run.js +8 -7
- package/dist/commands/test.js +9 -1
- package/dist/utils/run-with-aigne.js +2 -2
- package/package.json +17 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,48 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.22.8](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.22.7...cli-v1.22.8) (2025-07-14)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* The following workspace dependencies were updated
|
|
9
|
+
* dependencies
|
|
10
|
+
* @aigne/agent-library bumped to 1.20.5
|
|
11
|
+
* @aigne/anthropic bumped to 0.8.2
|
|
12
|
+
* @aigne/bedrock bumped to 0.7.5
|
|
13
|
+
* @aigne/core bumped to 1.33.2
|
|
14
|
+
* @aigne/deepseek bumped to 0.6.5
|
|
15
|
+
* @aigne/gemini bumped to 0.7.2
|
|
16
|
+
* @aigne/ollama bumped to 0.6.5
|
|
17
|
+
* @aigne/open-router bumped to 0.6.5
|
|
18
|
+
* @aigne/openai bumped to 0.9.2
|
|
19
|
+
* @aigne/xai bumped to 0.6.6
|
|
20
|
+
|
|
21
|
+
## [1.22.7](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.22.6...cli-v1.22.7) (2025-07-14)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* **cli:** print pretty error message for cli ([#249](https://github.com/AIGNE-io/aigne-framework/issues/249)) ([d68e0f7](https://github.com/AIGNE-io/aigne-framework/commit/d68e0f7151259a05696de77d9f00793b6f5b36b2))
|
|
27
|
+
* **deps:** update deps to latest version ([#247](https://github.com/AIGNE-io/aigne-framework/issues/247)) ([3972f88](https://github.com/AIGNE-io/aigne-framework/commit/3972f887a9abff20c26da6b51c1071cbd54c0bf1))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Dependencies
|
|
31
|
+
|
|
32
|
+
* The following workspace dependencies were updated
|
|
33
|
+
* dependencies
|
|
34
|
+
* @aigne/agent-library bumped to 1.20.4
|
|
35
|
+
* @aigne/anthropic bumped to 0.8.1
|
|
36
|
+
* @aigne/bedrock bumped to 0.7.4
|
|
37
|
+
* @aigne/core bumped to 1.33.1
|
|
38
|
+
* @aigne/deepseek bumped to 0.6.4
|
|
39
|
+
* @aigne/gemini bumped to 0.7.1
|
|
40
|
+
* @aigne/observability-api bumped to 0.7.2
|
|
41
|
+
* @aigne/ollama bumped to 0.6.4
|
|
42
|
+
* @aigne/open-router bumped to 0.6.4
|
|
43
|
+
* @aigne/openai bumped to 0.9.1
|
|
44
|
+
* @aigne/xai bumped to 0.6.5
|
|
45
|
+
|
|
3
46
|
## [1.22.6](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.22.5...cli-v1.22.6) (2025-07-10)
|
|
4
47
|
|
|
5
48
|
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { existsSync, realpathSync, statSync } from "node:fs";
|
|
3
|
+
import chalk from "chalk";
|
|
3
4
|
import { config } from "dotenv-flow";
|
|
4
|
-
import PrettyError from "pretty-error";
|
|
5
5
|
import { createAIGNECommand } from "./commands/aigne.js";
|
|
6
6
|
config({ silent: true });
|
|
7
7
|
function getAIGNEFilePath() {
|
|
@@ -18,6 +18,7 @@ const aigneFilePath = getAIGNEFilePath();
|
|
|
18
18
|
createAIGNECommand({ aigneFilePath })
|
|
19
19
|
.parseAsync(["", "", ...process.argv.slice(aigneFilePath ? 3 : 2)])
|
|
20
20
|
.catch((error) => {
|
|
21
|
-
console.
|
|
21
|
+
console.log(""); // Add an empty line for better readability
|
|
22
|
+
console.error(`${chalk.red("Error:")} ${error.message}`);
|
|
22
23
|
process.exit(1);
|
|
23
24
|
});
|
package/dist/commands/run.js
CHANGED
|
@@ -61,18 +61,18 @@ export function createRunCommand({ aigneFilePath } = {}) {
|
|
|
61
61
|
if (options.entryAgent) {
|
|
62
62
|
entryAgent = aigne.agents[options.entryAgent];
|
|
63
63
|
if (!entryAgent) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
64
|
+
throw new Error(`\
|
|
65
|
+
Agent "${options.entryAgent}" not found in ${aigne.rootDir}
|
|
66
|
+
|
|
67
|
+
Available agents:
|
|
68
|
+
${aigne.agents.map((agent) => ` - ${agent.name}`).join("\n")}
|
|
69
|
+
`);
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
else {
|
|
73
73
|
entryAgent = aigne.agents[0];
|
|
74
74
|
if (!entryAgent)
|
|
75
|
-
throw new Error(`No
|
|
75
|
+
throw new Error(`No any agent found in ${aigne.rootDir}`);
|
|
76
76
|
}
|
|
77
77
|
ctx.agent = entryAgent;
|
|
78
78
|
},
|
|
@@ -80,6 +80,7 @@ export function createRunCommand({ aigneFilePath } = {}) {
|
|
|
80
80
|
], {
|
|
81
81
|
rendererOptions: {
|
|
82
82
|
collapseSubtasks: false,
|
|
83
|
+
showErrorMessage: false,
|
|
83
84
|
timer: PRESET_TIMER,
|
|
84
85
|
},
|
|
85
86
|
}).run();
|
package/dist/commands/test.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import assert from "node:assert";
|
|
1
2
|
import { spawnSync } from "node:child_process";
|
|
2
3
|
import { isAbsolute, resolve } from "node:path";
|
|
4
|
+
import { AIGNE } from "@aigne/core";
|
|
3
5
|
import { Command } from "commander";
|
|
6
|
+
import { availableMemories, availableModels } from "../constants.js";
|
|
4
7
|
export function createTestCommand({ aigneFilePath } = {}) {
|
|
5
8
|
return new Command("test")
|
|
6
9
|
.description("Run tests in the specified agents directory")
|
|
@@ -8,7 +11,12 @@ export function createTestCommand({ aigneFilePath } = {}) {
|
|
|
8
11
|
.action(async (options) => {
|
|
9
12
|
const path = aigneFilePath || options.path;
|
|
10
13
|
const absolutePath = isAbsolute(path) ? path : resolve(process.cwd(), path);
|
|
11
|
-
|
|
14
|
+
const aigne = await AIGNE.load(absolutePath, {
|
|
15
|
+
models: availableModels(),
|
|
16
|
+
memories: availableMemories,
|
|
17
|
+
});
|
|
18
|
+
assert(aigne.rootDir);
|
|
19
|
+
spawnSync("node", ["--test"], { cwd: aigne.rootDir, stdio: "inherit" });
|
|
12
20
|
})
|
|
13
21
|
.showHelpAfterError(true)
|
|
14
22
|
.showSuggestionAfterError(true);
|
|
@@ -9,8 +9,8 @@ import { AIGNE, DEFAULT_OUTPUT_KEY, readAllString, UserAgent, } from "@aigne/cor
|
|
|
9
9
|
import { loadModel } from "@aigne/core/loader/index.js";
|
|
10
10
|
import { getLevelFromEnv, LogLevel, logger } from "@aigne/core/utils/logger.js";
|
|
11
11
|
import { isEmpty, isNonNullable, tryOrThrow, } from "@aigne/core/utils/type-utils.js";
|
|
12
|
+
import chalk from "chalk";
|
|
12
13
|
import { Command } from "commander";
|
|
13
|
-
import PrettyError from "pretty-error";
|
|
14
14
|
import { parse } from "yaml";
|
|
15
15
|
import { ZodError, ZodObject, z } from "zod";
|
|
16
16
|
import { availableModels } from "../constants.js";
|
|
@@ -137,7 +137,7 @@ export async function runWithAIGNE(agentCreator, { argv = process.argv, chatLoop
|
|
|
137
137
|
})
|
|
138
138
|
.parseAsync(argv)
|
|
139
139
|
.catch((error) => {
|
|
140
|
-
console.error(
|
|
140
|
+
console.error(`${chalk.red("Error:")} ${error.message}`);
|
|
141
141
|
process.exit(1);
|
|
142
142
|
});
|
|
143
143
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/cli",
|
|
3
|
-
"version": "1.22.
|
|
3
|
+
"version": "1.22.8",
|
|
4
4
|
"description": "cli for AIGNE framework",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@aigne/listr2": "^1.0.10",
|
|
39
|
-
"@aigne/marked-terminal": "^7.3.
|
|
40
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
41
|
-
"@smithy/node-http-handler": "^4.0
|
|
39
|
+
"@aigne/marked-terminal": "^7.3.2",
|
|
40
|
+
"@modelcontextprotocol/sdk": "^1.15.0",
|
|
41
|
+
"@smithy/node-http-handler": "^4.1.0",
|
|
42
42
|
"chalk": "^5.4.1",
|
|
43
43
|
"commander": "^14.0.0",
|
|
44
44
|
"detect-port": "^2.1.0",
|
|
@@ -50,30 +50,29 @@
|
|
|
50
50
|
"inquirer": "^12.7.0",
|
|
51
51
|
"marked": "^16.0.0",
|
|
52
52
|
"prettier": "^3.6.2",
|
|
53
|
-
"pretty-error": "^4.0.0",
|
|
54
53
|
"tar": "^7.4.3",
|
|
55
54
|
"wrap-ansi": "^9.0.0",
|
|
56
55
|
"yaml": "^2.8.0",
|
|
57
56
|
"zod": "^3.25.67",
|
|
58
|
-
"@aigne/anthropic": "^0.8.
|
|
59
|
-
"@aigne/
|
|
60
|
-
"@aigne/
|
|
61
|
-
"@aigne/
|
|
62
|
-
"@aigne/
|
|
63
|
-
"@aigne/
|
|
64
|
-
"@aigne/
|
|
65
|
-
"@aigne/open-router": "^0.6.
|
|
66
|
-
"@aigne/openai": "^0.9.
|
|
67
|
-
"@aigne/xai": "^0.6.
|
|
68
|
-
"@aigne/
|
|
57
|
+
"@aigne/anthropic": "^0.8.2",
|
|
58
|
+
"@aigne/agent-library": "^1.20.5",
|
|
59
|
+
"@aigne/bedrock": "^0.7.5",
|
|
60
|
+
"@aigne/deepseek": "^0.6.5",
|
|
61
|
+
"@aigne/core": "^1.33.2",
|
|
62
|
+
"@aigne/gemini": "^0.7.2",
|
|
63
|
+
"@aigne/observability-api": "^0.7.2",
|
|
64
|
+
"@aigne/open-router": "^0.6.5",
|
|
65
|
+
"@aigne/openai": "^0.9.2",
|
|
66
|
+
"@aigne/xai": "^0.6.6",
|
|
67
|
+
"@aigne/ollama": "^0.6.5"
|
|
69
68
|
},
|
|
70
69
|
"devDependencies": {
|
|
71
70
|
"@types/archiver": "^6.0.3",
|
|
72
|
-
"@types/bun": "^1.2.
|
|
71
|
+
"@types/bun": "^1.2.18",
|
|
73
72
|
"@types/express": "^5.0.3",
|
|
74
73
|
"@types/glob": "^9.0.0",
|
|
75
74
|
"@types/gradient-string": "^1.1.6",
|
|
76
|
-
"@types/node": "^24.0.
|
|
75
|
+
"@types/node": "^24.0.12",
|
|
77
76
|
"archiver": "^7.0.1",
|
|
78
77
|
"npm-run-all": "^4.1.5",
|
|
79
78
|
"rimraf": "^6.0.1",
|