@aigne/cli 1.51.0-beta.3 → 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 CHANGED
@@ -1,5 +1,29 @@
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
+
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)
11
+
12
+
13
+ ### Dependencies
14
+
15
+ * The following workspace dependencies were updated
16
+ * dependencies
17
+ * @aigne/afs-system-fs bumped to 1.0.1-beta
18
+ * @aigne/agent-library bumped to 1.21.48-beta.4
19
+ * @aigne/agentic-memory bumped to 1.0.48-beta.4
20
+ * @aigne/aigne-hub bumped to 0.10.2-beta.4
21
+ * @aigne/core bumped to 1.63.0-beta.4
22
+ * @aigne/default-memory bumped to 1.2.11-beta.4
23
+ * @aigne/openai bumped to 0.16.2-beta.4
24
+ * devDependencies
25
+ * @aigne/test-utils bumped to 0.5.55-beta.4
26
+
3
27
  ## [1.51.0-beta.3](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.50.1-beta.3...cli-v1.51.0-beta.3) (2025-10-11)
4
28
 
5
29
 
@@ -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", dir).catch(async (error) => {
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>>;
@@ -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) => loadChatModel({
30
- ...options,
31
- ...omitBy(modelOptions ?? {}, (v) => isNil(v)),
32
- model: modelOptions?.model || process.env.MODEL || options?.model,
33
- }),
34
- imageModel: (options) => loadImageModel({
35
- ...options,
36
- ...omitBy(imageModelOptions ?? {}, (v) => isNil(v)),
37
- model: imageModelOptions?.model || process.env.IMAGE_MODEL || options?.model,
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 { AIGNE, type Message } from "@aigne/core";
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(...args: Parameters<typeof AIGNE.load>): Promise<{
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(...args) {
40
- const aigne = await AIGNE.load(...args);
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",
3
+ "version": "1.51.0-beta.5",
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/afs-system-fs": "^1.0.0",
93
- "@aigne/agentic-memory": "^1.0.48-beta.3",
94
- "@aigne/aigne-hub": "^0.10.2-beta.3",
95
- "@aigne/core": "^1.63.0-beta.3",
96
- "@aigne/agent-library": "^1.21.48-beta.3",
97
- "@aigne/default-memory": "^1.2.11-beta.3",
98
- "@aigne/observability-api": "^0.11.2-beta.1",
99
- "@aigne/openai": "^0.16.2-beta.3"
92
+ "@aigne/afs-system-fs": "^1.0.1-beta",
93
+ "@aigne/agent-library": "^1.21.48-beta.4",
94
+ "@aigne/agentic-memory": "^1.0.48-beta.4",
95
+ "@aigne/core": "^1.63.0-beta.4",
96
+ "@aigne/aigne-hub": "^0.10.2-beta.4",
97
+ "@aigne/openai": "^0.16.2-beta.4",
98
+ "@aigne/default-memory": "^1.2.11-beta.4",
99
+ "@aigne/observability-api": "^0.11.2-beta.1"
100
100
  },
101
101
  "devDependencies": {
102
102
  "@inquirer/testing": "^2.1.50",
@@ -113,7 +113,7 @@
113
113
  "rimraf": "^6.0.1",
114
114
  "typescript": "^5.9.2",
115
115
  "ufo": "^1.6.1",
116
- "@aigne/test-utils": "^0.5.55-beta.3"
116
+ "@aigne/test-utils": "^0.5.55-beta.4"
117
117
  },
118
118
  "scripts": {
119
119
  "lint": "tsc --noEmit",