@aigne/cli 1.51.0-beta.4 → 1.51.0-beta.5
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 +7 -0
- package/dist/commands/app.js +5 -2
- package/dist/utils/load-aigne.d.ts +2 -1
- package/dist/utils/load-aigne.js +19 -11
- package/dist/utils/workers/run-aigne-in-child-process-worker.d.ts +3 -2
- package/dist/utils/workers/run-aigne-in-child-process-worker.js +2 -3
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.51.0-beta.5](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.51.0-beta.4...cli-v1.51.0-beta.5) (2025-10-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* correct loading aigne with AFS config for `upgrade` command ([#613](https://github.com/AIGNE-io/aigne-framework/issues/613)) ([db1db97](https://github.com/AIGNE-io/aigne-framework/commit/db1db97b6305009d302a782dbc7fa3147900af47))
|
|
9
|
+
|
|
3
10
|
## [1.51.0-beta.4](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.51.0-beta.3...cli-v1.51.0-beta.4) (2025-10-12)
|
|
4
11
|
|
|
5
12
|
|
package/dist/commands/app.js
CHANGED
|
@@ -193,7 +193,10 @@ export async function loadApplication(options) {
|
|
|
193
193
|
const { dir, packageName } = options;
|
|
194
194
|
const check = await checkInstallation(dir);
|
|
195
195
|
if (check && !check.expired) {
|
|
196
|
-
const aigne = await runAIGNEInChildProcess("loadAIGNE",
|
|
196
|
+
const aigne = await runAIGNEInChildProcess("loadAIGNE", {
|
|
197
|
+
path: dir,
|
|
198
|
+
skipModelLoading: true,
|
|
199
|
+
}).catch(async (error) => {
|
|
197
200
|
logger.error(`⚠️ Failed to load ${packageName}, trying to reinstall:`, error.message);
|
|
198
201
|
await withSpinner("", async () => {
|
|
199
202
|
await rm(options.dir, { recursive: true, force: true });
|
|
@@ -208,7 +211,7 @@ export async function loadApplication(options) {
|
|
|
208
211
|
return null;
|
|
209
212
|
const result = await installApp({ dir, packageName, beta: check?.version?.includes("beta") });
|
|
210
213
|
return {
|
|
211
|
-
aigne: await runAIGNEInChildProcess("loadAIGNE", dir),
|
|
214
|
+
aigne: await runAIGNEInChildProcess("loadAIGNE", { path: dir, skipModelLoading: true }),
|
|
212
215
|
version: result.version,
|
|
213
216
|
};
|
|
214
217
|
}
|
|
@@ -7,9 +7,10 @@ export interface RunOptions extends AgentRunCommonOptions {
|
|
|
7
7
|
cacheDir?: string;
|
|
8
8
|
aigneHubUrl?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare function loadAIGNE({ path, modelOptions, imageModelOptions, printTips, }: {
|
|
10
|
+
export declare function loadAIGNE({ path, modelOptions, imageModelOptions, printTips, skipModelLoading, }: {
|
|
11
11
|
path?: string;
|
|
12
12
|
modelOptions?: ChatModelInputOptions & LoadCredentialOptions;
|
|
13
13
|
imageModelOptions?: ImageModelInputOptions & LoadCredentialOptions;
|
|
14
14
|
printTips?: boolean;
|
|
15
|
+
skipModelLoading?: boolean;
|
|
15
16
|
}): Promise<AIGNE<import("@aigne/core").UserContext>>;
|
package/dist/utils/load-aigne.js
CHANGED
|
@@ -21,21 +21,29 @@ async function printChatModelInfoBox(model) {
|
|
|
21
21
|
console.log(boxen(lines.join("\n"), { padding: 1, borderStyle: "classic", borderColor: "cyan" }));
|
|
22
22
|
console.log("");
|
|
23
23
|
}
|
|
24
|
-
export async function loadAIGNE({ path, modelOptions, imageModelOptions, printTips = true, }) {
|
|
24
|
+
export async function loadAIGNE({ path, modelOptions, imageModelOptions, printTips = true, skipModelLoading = false, }) {
|
|
25
25
|
let aigne;
|
|
26
26
|
if (path) {
|
|
27
27
|
aigne = await AIGNE.load(path, {
|
|
28
28
|
memories: availableMemories,
|
|
29
|
-
model: (options) =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
29
|
+
model: (options) => {
|
|
30
|
+
if (skipModelLoading)
|
|
31
|
+
return undefined;
|
|
32
|
+
return loadChatModel({
|
|
33
|
+
...options,
|
|
34
|
+
...omitBy(modelOptions ?? {}, (v) => isNil(v)),
|
|
35
|
+
model: modelOptions?.model || process.env.MODEL || options?.model,
|
|
36
|
+
});
|
|
37
|
+
},
|
|
38
|
+
imageModel: (options) => {
|
|
39
|
+
if (skipModelLoading)
|
|
40
|
+
return undefined;
|
|
41
|
+
return loadImageModel({
|
|
42
|
+
...options,
|
|
43
|
+
...omitBy(imageModelOptions ?? {}, (v) => isNil(v)),
|
|
44
|
+
model: imageModelOptions?.model || process.env.IMAGE_MODEL || options?.model,
|
|
45
|
+
});
|
|
46
|
+
},
|
|
39
47
|
afs: {
|
|
40
48
|
availableModules: [
|
|
41
49
|
{
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Message } from "@aigne/core";
|
|
2
|
+
import { loadAIGNE } from "../load-aigne.js";
|
|
2
3
|
import { type AgentRunCommonOptions } from "../yargs.js";
|
|
3
4
|
import { type AgentInChildProcess, type CLIAgentInChildProcess } from "./run-aigne-in-child-process.js";
|
|
4
|
-
export declare function loadAIGNEInChildProcess(
|
|
5
|
+
export declare function loadAIGNEInChildProcess(options: Parameters<typeof loadAIGNE>[0]): Promise<{
|
|
5
6
|
agents?: AgentInChildProcess[];
|
|
6
7
|
cli?: {
|
|
7
8
|
chat?: AgentInChildProcess;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import assert from "node:assert";
|
|
2
|
-
import { AIGNE } from "@aigne/core";
|
|
3
2
|
import { findCliAgent, mapCliAgent } from "@aigne/core/utils/agent-utils.js";
|
|
4
3
|
import { logger } from "@aigne/core/utils/logger.js";
|
|
5
4
|
import { loadAIGNE } from "../load-aigne.js";
|
|
@@ -36,8 +35,8 @@ process.on("message", async ({ method, args, ...options }) => {
|
|
|
36
35
|
process.exit(0);
|
|
37
36
|
}
|
|
38
37
|
});
|
|
39
|
-
export async function loadAIGNEInChildProcess(
|
|
40
|
-
const aigne = await
|
|
38
|
+
export async function loadAIGNEInChildProcess(options) {
|
|
39
|
+
const aigne = await loadAIGNE(options);
|
|
41
40
|
return {
|
|
42
41
|
agents: aigne.agents.map(serializeAgent),
|
|
43
42
|
cli: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/cli",
|
|
3
|
-
"version": "1.51.0-beta.
|
|
3
|
+
"version": "1.51.0-beta.5",
|
|
4
4
|
"description": "Your command center for agent development",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -92,11 +92,11 @@
|
|
|
92
92
|
"@aigne/afs-system-fs": "^1.0.1-beta",
|
|
93
93
|
"@aigne/agent-library": "^1.21.48-beta.4",
|
|
94
94
|
"@aigne/agentic-memory": "^1.0.48-beta.4",
|
|
95
|
-
"@aigne/aigne-hub": "^0.10.2-beta.4",
|
|
96
95
|
"@aigne/core": "^1.63.0-beta.4",
|
|
97
|
-
"@aigne/
|
|
96
|
+
"@aigne/aigne-hub": "^0.10.2-beta.4",
|
|
97
|
+
"@aigne/openai": "^0.16.2-beta.4",
|
|
98
98
|
"@aigne/default-memory": "^1.2.11-beta.4",
|
|
99
|
-
"@aigne/
|
|
99
|
+
"@aigne/observability-api": "^0.11.2-beta.1"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@inquirer/testing": "^2.1.50",
|