@aigne/cli 1.53.1-beta → 1.53.1-beta.2
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 +31 -0
- package/dist/cli.js +7 -1
- package/dist/commands/app.js +1 -2
- package/dist/utils/aigne-hub/credential.js +1 -2
- package/dist/utils/aigne-hub-user.js +1 -2
- package/dist/utils/download.js +2 -6
- package/dist/utils/workers/run-aigne-in-child-process-worker.js +4 -1
- package/dist/utils/workers/run-aigne-in-child-process.js +1 -0
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.53.1-beta.2](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.53.1-beta.1...cli-v1.53.1-beta.2) (2025-11-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* add fetch utility with timeout and enhanced error handling ([#694](https://github.com/AIGNE-io/aigne-framework/issues/694)) ([c2d4076](https://github.com/AIGNE-io/aigne-framework/commit/c2d4076ec590150d2751591a4f723721f78381e9))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @aigne/afs-system-fs bumped to 1.0.4-beta.2
|
|
16
|
+
* @aigne/agent-library bumped to 1.21.51-beta.1
|
|
17
|
+
* @aigne/agentic-memory bumped to 1.0.51-beta.1
|
|
18
|
+
* @aigne/aigne-hub bumped to 0.10.5-beta.1
|
|
19
|
+
* @aigne/core bumped to 1.65.1-beta.1
|
|
20
|
+
* @aigne/default-memory bumped to 1.2.14-beta.1
|
|
21
|
+
* @aigne/openai bumped to 0.16.5-beta.1
|
|
22
|
+
* devDependencies
|
|
23
|
+
* @aigne/test-utils bumped to 0.5.58-beta.1
|
|
24
|
+
|
|
25
|
+
## [1.53.1-beta.1](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.53.1-beta...cli-v1.53.1-beta.1) (2025-11-03)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
### Dependencies
|
|
29
|
+
|
|
30
|
+
* The following workspace dependencies were updated
|
|
31
|
+
* dependencies
|
|
32
|
+
* @aigne/afs-system-fs bumped to 1.0.4-beta.1
|
|
33
|
+
|
|
3
34
|
## [1.53.1-beta](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.53.0...cli-v1.53.1-beta) (2025-11-03)
|
|
4
35
|
|
|
5
36
|
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { existsSync, realpathSync, statSync } from "node:fs";
|
|
3
|
+
import { LogLevel, logger } from "@aigne/core/utils/logger.js";
|
|
3
4
|
import chalk from "chalk";
|
|
4
5
|
import { config } from "dotenv-flow";
|
|
5
6
|
import { createAIGNECommand } from "./commands/aigne.js";
|
|
@@ -30,7 +31,12 @@ export default createAIGNECommand({ argv, aigneFilePath })
|
|
|
30
31
|
.catch((error) => {
|
|
31
32
|
if (error.name !== "ExitPromptError") {
|
|
32
33
|
console.log(""); // Add an empty line for better readability
|
|
33
|
-
|
|
34
|
+
if (logger.enabled(LogLevel.ERROR)) {
|
|
35
|
+
console.error(chalk.red(error.stack));
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
console.error(`${chalk.red("Error:")} ${highlightUrl(error.message)}`);
|
|
39
|
+
}
|
|
34
40
|
}
|
|
35
41
|
process.exit(1);
|
|
36
42
|
});
|
package/dist/commands/app.js
CHANGED
|
@@ -3,6 +3,7 @@ import { spawn } from "node:child_process";
|
|
|
3
3
|
import { mkdir, readFile, rm, stat, writeFile } from "node:fs/promises";
|
|
4
4
|
import { homedir } from "node:os";
|
|
5
5
|
import { join } from "node:path";
|
|
6
|
+
import { fetch } from "@aigne/core/utils/fetch.js";
|
|
6
7
|
import { logger } from "@aigne/core/utils/logger.js";
|
|
7
8
|
import { jsonSchemaToZod } from "@aigne/json-schema-to-zod";
|
|
8
9
|
import { Listr, PRESET_TIMER } from "@aigne/listr2";
|
|
@@ -346,8 +347,6 @@ async function installDependencies(dir, { log } = {}) {
|
|
|
346
347
|
}
|
|
347
348
|
export async function getNpmTgzInfo(name, { version, beta } = {}) {
|
|
348
349
|
const res = await fetch(joinURL("https://registry.npmjs.org", name));
|
|
349
|
-
if (!res.ok)
|
|
350
|
-
throw new Error(`Failed to fetch package info for ${name}: ${res.statusText}`);
|
|
351
350
|
const data = await res.json();
|
|
352
351
|
let targetVersion;
|
|
353
352
|
if (version) {
|
|
@@ -3,6 +3,7 @@ import { readFile, writeFile } from "node:fs/promises";
|
|
|
3
3
|
import { homedir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
import { AIGNE_HUB_BLOCKLET_DID, AIGNE_HUB_URL, getAIGNEHubMountPoint } from "@aigne/aigne-hub";
|
|
6
|
+
import { fetch } from "@aigne/core/utils/fetch.js";
|
|
6
7
|
import { logger } from "@aigne/core/utils/logger.js";
|
|
7
8
|
import inquirer from "inquirer";
|
|
8
9
|
import open from "open";
|
|
@@ -17,8 +18,6 @@ const request = async (config) => {
|
|
|
17
18
|
headers["X-Request-Count"] = config.requestCount.toString();
|
|
18
19
|
}
|
|
19
20
|
const response = await fetch(config.url, { method: config.method || "GET", headers });
|
|
20
|
-
if (!response.ok)
|
|
21
|
-
throw new Error(`HTTP error! status: ${response.status}`);
|
|
22
21
|
const data = await response.json();
|
|
23
22
|
return { data };
|
|
24
23
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { fetch } from "@aigne/core/utils/fetch.js";
|
|
1
2
|
import { joinURL } from "ufo";
|
|
2
3
|
export async function getUserInfo({ baseUrl, apiKey, }) {
|
|
3
4
|
const response = await fetch(joinURL(baseUrl, "/api/user/info"), {
|
|
4
5
|
headers: { Authorization: `Bearer ${apiKey}` },
|
|
5
6
|
});
|
|
6
|
-
if (!response.ok)
|
|
7
|
-
throw new Error(`Failed to fetch user info: ${response.statusText}`);
|
|
8
7
|
const data = await response.json();
|
|
9
8
|
return data;
|
|
10
9
|
}
|
package/dist/utils/download.js
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { mkdir } from "node:fs/promises";
|
|
2
2
|
import { Readable } from "node:stream";
|
|
3
3
|
import { finished } from "node:stream/promises";
|
|
4
|
+
import { fetch } from "@aigne/core/utils/fetch.js";
|
|
4
5
|
import { x } from "tar";
|
|
5
6
|
export async function downloadAndExtract(url, dir, options = {}) {
|
|
6
|
-
const response = await fetch(url)
|
|
7
|
-
throw new Error(`Failed to download package from ${url}: ${error.message}`);
|
|
8
|
-
});
|
|
9
|
-
if (!response.ok) {
|
|
10
|
-
throw new Error(`Failed to download package from ${url}: ${response.statusText}`);
|
|
11
|
-
}
|
|
7
|
+
const response = await fetch(url);
|
|
12
8
|
if (!response.body) {
|
|
13
9
|
throw new Error(`Failed to download package from ${url}: Unexpected to get empty response`);
|
|
14
10
|
}
|
|
@@ -29,7 +29,10 @@ process.on("message", async ({ method, args, ...options }) => {
|
|
|
29
29
|
await send({ method, result });
|
|
30
30
|
}
|
|
31
31
|
catch (error) {
|
|
32
|
-
await send({
|
|
32
|
+
await send({
|
|
33
|
+
method,
|
|
34
|
+
error: { name: error.name, message: error.message, stack: error.stack },
|
|
35
|
+
});
|
|
33
36
|
}
|
|
34
37
|
finally {
|
|
35
38
|
process.exit(0);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/cli",
|
|
3
|
-
"version": "1.53.1-beta",
|
|
3
|
+
"version": "1.53.1-beta.2",
|
|
4
4
|
"description": "Your command center for agent development",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -89,14 +89,14 @@
|
|
|
89
89
|
"yoctocolors-cjs": "^2.1.3",
|
|
90
90
|
"zod": "^3.25.67",
|
|
91
91
|
"zod-to-json-schema": "^3.24.6",
|
|
92
|
-
"@aigne/
|
|
93
|
-
"@aigne/
|
|
94
|
-
"@aigne/agentic-memory": "^1.0.51-beta",
|
|
95
|
-
"@aigne/core": "^1.65.1-beta",
|
|
96
|
-
"@aigne/aigne-hub": "^0.10.5-beta",
|
|
97
|
-
"@aigne/default-memory": "^1.2.14-beta",
|
|
92
|
+
"@aigne/afs-system-fs": "^1.0.4-beta.2",
|
|
93
|
+
"@aigne/agent-library": "^1.21.51-beta.1",
|
|
94
|
+
"@aigne/agentic-memory": "^1.0.51-beta.1",
|
|
95
|
+
"@aigne/core": "^1.65.1-beta.1",
|
|
96
|
+
"@aigne/aigne-hub": "^0.10.5-beta.1",
|
|
97
|
+
"@aigne/default-memory": "^1.2.14-beta.1",
|
|
98
98
|
"@aigne/observability-api": "^0.11.5-beta",
|
|
99
|
-
"@aigne/openai": "^0.16.5-beta"
|
|
99
|
+
"@aigne/openai": "^0.16.5-beta.1"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@inquirer/testing": "^2.1.50",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"rimraf": "^6.0.1",
|
|
115
115
|
"typescript": "^5.9.2",
|
|
116
116
|
"ufo": "^1.6.1",
|
|
117
|
-
"@aigne/test-utils": "^0.5.58-beta"
|
|
117
|
+
"@aigne/test-utils": "^0.5.58-beta.1"
|
|
118
118
|
},
|
|
119
119
|
"scripts": {
|
|
120
120
|
"lint": "tsc --noEmit",
|