@aigne/cli 1.26.1-1 → 1.27.1-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/CHANGELOG.md +20 -0
- package/dist/commands/connect.js +1 -1
- package/dist/commands/run.d.ts +0 -3
- package/dist/commands/run.js +2 -2
- package/dist/utils/aigne-hub-user.d.ts +16 -0
- package/dist/utils/aigne-hub-user.js +12 -0
- package/package.json +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.27.0](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.26.0...cli-v1.27.0) (2025-07-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* support aigne connect command and add test ([#283](https://github.com/AIGNE-io/aigne-framework/issues/283)) ([387d22d](https://github.com/AIGNE-io/aigne-framework/commit/387d22d5cacf20abe02a13deaca1f36987d48ba5))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **cli:** replace external dependency with built-in user subscription API ([#292](https://github.com/AIGNE-io/aigne-framework/issues/292)) ([67de7fa](https://github.com/AIGNE-io/aigne-framework/commit/67de7fa521626ee7266c6c527e4eafc227bafa48))
|
|
14
|
+
* support aigne connect status more info ([#290](https://github.com/AIGNE-io/aigne-framework/issues/290)) ([04c5a06](https://github.com/AIGNE-io/aigne-framework/commit/04c5a0625938a7c1ca1d6fd997f6e9047d425ea0))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Dependencies
|
|
18
|
+
|
|
19
|
+
* The following workspace dependencies were updated
|
|
20
|
+
* dependencies
|
|
21
|
+
* @aigne/aigne-hub bumped to 0.3.0
|
|
22
|
+
|
|
3
23
|
## [1.26.0](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.25.1...cli-v1.26.0) (2025-07-28)
|
|
4
24
|
|
|
5
25
|
|
package/dist/commands/connect.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { existsSync } from "node:fs";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
|
-
import { getUserInfo } from "@blocklet/aigne-hub/api/user";
|
|
4
3
|
import chalk from "chalk";
|
|
5
4
|
import { parse } from "yaml";
|
|
5
|
+
import { getUserInfo } from "../utils/aigne-hub-user.js";
|
|
6
6
|
import { AIGNE_ENV_FILE, connectToAIGNEHub } from "../utils/load-aigne.js";
|
|
7
7
|
async function getConnectionStatus() {
|
|
8
8
|
if (!existsSync(AIGNE_ENV_FILE)) {
|
package/dist/commands/run.d.ts
CHANGED
package/dist/commands/run.js
CHANGED
|
@@ -136,7 +136,7 @@ function prepareDirs(path, options) {
|
|
|
136
136
|
if (!path.startsWith("http")) {
|
|
137
137
|
dir = isAbsolute(path) ? path : resolve(process.cwd(), path);
|
|
138
138
|
}
|
|
139
|
-
else if (options
|
|
139
|
+
else if (options.cacheDir) {
|
|
140
140
|
dir = isAbsolute(options.cacheDir)
|
|
141
141
|
? options.cacheDir
|
|
142
142
|
: resolve(process.cwd(), options.cacheDir);
|
|
@@ -148,7 +148,7 @@ function prepareDirs(path, options) {
|
|
|
148
148
|
}
|
|
149
149
|
return { cacheDir, dir };
|
|
150
150
|
}
|
|
151
|
-
|
|
151
|
+
function getLocalPackagePathFromUrl(url, { subdir } = {}) {
|
|
152
152
|
const root = [homedir(), ".aigne", subdir].filter(isNonNullable);
|
|
153
153
|
const u = new URL(url);
|
|
154
154
|
return join(...root, u.hostname, u.pathname);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export interface UserInfoResult {
|
|
2
|
+
user: Record<string, any>;
|
|
3
|
+
enableCredit: boolean;
|
|
4
|
+
creditBalance: {
|
|
5
|
+
balance: string;
|
|
6
|
+
total: string;
|
|
7
|
+
grantCount: number;
|
|
8
|
+
pendingCredit: string;
|
|
9
|
+
} | null;
|
|
10
|
+
paymentLink: string | null;
|
|
11
|
+
profileLink: string;
|
|
12
|
+
}
|
|
13
|
+
export declare function getUserInfo({ baseUrl, accessKey, }: {
|
|
14
|
+
baseUrl: string;
|
|
15
|
+
accessKey: string;
|
|
16
|
+
}): Promise<UserInfoResult>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { joinURL } from "ufo";
|
|
2
|
+
export async function getUserInfo({ baseUrl, accessKey, }) {
|
|
3
|
+
const response = await fetch(joinURL(baseUrl, "/api/user/info"), {
|
|
4
|
+
headers: {
|
|
5
|
+
Authorization: `Bearer ${accessKey}`,
|
|
6
|
+
},
|
|
7
|
+
});
|
|
8
|
+
if (!response.ok)
|
|
9
|
+
throw new Error(`Failed to fetch user info: ${response.statusText}`);
|
|
10
|
+
const data = await response.json();
|
|
11
|
+
return data;
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.1-0",
|
|
4
4
|
"description": "cli for AIGNE framework",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -44,7 +44,6 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@aigne/listr2": "^1.0.10",
|
|
46
46
|
"@aigne/marked-terminal": "^7.3.2",
|
|
47
|
-
"@blocklet/aigne-hub": "^0.2.17",
|
|
48
47
|
"@inquirer/prompts": "^7.6.0",
|
|
49
48
|
"@inquirer/type": "^3.0.8",
|
|
50
49
|
"@listr2/prompt-adapter-inquirer": "^3.0.1",
|
|
@@ -71,20 +70,20 @@
|
|
|
71
70
|
"yaml": "^2.8.0",
|
|
72
71
|
"yargs": "^18.0.0",
|
|
73
72
|
"zod": "^3.25.67",
|
|
73
|
+
"@aigne/agent-library": "^1.21.6",
|
|
74
74
|
"@aigne/agentic-memory": "^1.0.6",
|
|
75
|
-
"@aigne/aigne-hub": "^0.
|
|
75
|
+
"@aigne/aigne-hub": "^0.3.0",
|
|
76
76
|
"@aigne/anthropic": "^0.10.2",
|
|
77
|
-
"@aigne/agent-library": "^1.21.6",
|
|
78
77
|
"@aigne/bedrock": "^0.8.6",
|
|
79
78
|
"@aigne/core": "^1.39.0",
|
|
80
79
|
"@aigne/deepseek": "^0.7.6",
|
|
81
80
|
"@aigne/default-memory": "^1.0.6",
|
|
82
|
-
"@aigne/
|
|
81
|
+
"@aigne/gemini": "^0.8.6",
|
|
83
82
|
"@aigne/ollama": "^0.7.6",
|
|
84
83
|
"@aigne/open-router": "^0.7.6",
|
|
84
|
+
"@aigne/openai": "^0.10.6",
|
|
85
85
|
"@aigne/xai": "^0.7.6",
|
|
86
|
-
"@aigne/
|
|
87
|
-
"@aigne/openai": "^0.10.6"
|
|
86
|
+
"@aigne/observability-api": "^0.8.2"
|
|
88
87
|
},
|
|
89
88
|
"devDependencies": {
|
|
90
89
|
"@types/archiver": "^6.0.3",
|