@aigne/cli 1.38.0 → 1.39.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 CHANGED
@@ -1,5 +1,36 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.39.0](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.38.1...cli-v1.39.0) (2025-08-21)
4
+
5
+
6
+ ### Features
7
+
8
+ * **cli:** add chat mode support for cli ([#389](https://github.com/AIGNE-io/aigne-framework/issues/389)) ([d7dc138](https://github.com/AIGNE-io/aigne-framework/commit/d7dc138719dd638ddb12c4625abdf42746baf35d))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **cli:** force reimport of agent modules with cache busting ([#392](https://github.com/AIGNE-io/aigne-framework/issues/392)) ([c372cb9](https://github.com/AIGNE-io/aigne-framework/commit/c372cb9600a9d78ad1808a045bcddfc285e9c6f0))
14
+
15
+
16
+ ### Dependencies
17
+
18
+ * The following workspace dependencies were updated
19
+ * dependencies
20
+ * @aigne/agent-library bumped to 1.21.25
21
+ * @aigne/agentic-memory bumped to 1.0.25
22
+ * @aigne/aigne-hub bumped to 0.6.7
23
+ * @aigne/core bumped to 1.54.0
24
+ * @aigne/default-memory bumped to 1.1.7
25
+ * @aigne/openai bumped to 0.12.1
26
+
27
+ ## [1.38.1](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.38.0...cli-v1.38.1) (2025-08-21)
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * **cli:** force upgrade app while load app error ([#390](https://github.com/AIGNE-io/aigne-framework/issues/390)) ([fa5e427](https://github.com/AIGNE-io/aigne-framework/commit/fa5e427eb29157c3ebcd9c9bf8c5c6b31efad4ae))
33
+
3
34
  ## [1.38.0](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.37.1...cli-v1.38.0) (2025-08-20)
4
35
 
5
36
 
@@ -33,6 +33,9 @@ export function createAppCommands() {
33
33
  })
34
34
  .command(serveMcpCommandModule({ name: app.name, dir }))
35
35
  .command(upgradeCommandModule({ name: app.name, dir, isLatest: !isCache, version }));
36
+ if (aigne.cli.chat) {
37
+ yargs.command({ ...agentCommandModule({ dir, agent: aigne.cli.chat }), command: "$0" });
38
+ }
36
39
  for (const agent of aigne.cli?.agents ?? []) {
37
40
  yargs.command(agentCommandModule({ dir, agent }));
38
41
  }
@@ -97,10 +100,11 @@ export async function invokeCLIAgentFromDir(options) {
97
100
  modelOptions: { model: options.input.model },
98
101
  });
99
102
  try {
100
- const agent = aigne.cli.agents[options.agent];
103
+ const { chat, agents } = aigne.cli;
104
+ const agent = chat && chat.name === options.agent ? chat : agents[options.agent];
101
105
  assert(agent, `Agent ${options.agent} not found in ${options.dir}`);
102
106
  const input = await parseAgentInput(options.input, agent);
103
- await runAgentWithAIGNE(aigne, agent, { input });
107
+ await runAgentWithAIGNE(aigne, agent, { input, chat: agent === chat });
104
108
  }
105
109
  finally {
106
110
  await aigne.shutdown();
@@ -109,14 +113,20 @@ export async function invokeCLIAgentFromDir(options) {
109
113
  export async function loadApplication({ name, dir, forceUpgrade = false, }) {
110
114
  name = `@aigne/${name}`;
111
115
  dir ??= join(homedir(), ".aigne", "registry.npmjs.org", name);
112
- const check = forceUpgrade ? undefined : await isInstallationAvailable(dir);
116
+ let check = forceUpgrade ? undefined : await isInstallationAvailable(dir);
113
117
  if (check?.available) {
114
- return {
115
- aigne: await AIGNE.load(dir),
116
- dir,
117
- version: check.version,
118
- isCache: true,
119
- };
118
+ const aigne = await AIGNE.load(dir).catch((error) => {
119
+ console.warn(`⚠️ Failed to load ${name}, trying to reinstall:`, error.message);
120
+ });
121
+ if (aigne) {
122
+ return {
123
+ aigne,
124
+ dir,
125
+ version: check.version,
126
+ isCache: true,
127
+ };
128
+ }
129
+ check = undefined;
120
130
  }
121
131
  const result = await new Listr([
122
132
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/cli",
3
- "version": "1.38.0",
3
+ "version": "1.39.0",
4
4
  "description": "Your command center for agent development",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -75,13 +75,13 @@
75
75
  "yaml": "^2.8.0",
76
76
  "yargs": "^18.0.0",
77
77
  "zod": "^3.25.67",
78
- "@aigne/agent-library": "^1.21.24",
79
- "@aigne/agentic-memory": "^1.0.24",
80
- "@aigne/aigne-hub": "^0.6.6",
81
- "@aigne/core": "^1.53.0",
82
- "@aigne/observability-api": "^0.9.1",
83
- "@aigne/default-memory": "^1.1.6",
84
- "@aigne/openai": "^0.12.0"
78
+ "@aigne/agent-library": "^1.21.25",
79
+ "@aigne/aigne-hub": "^0.6.7",
80
+ "@aigne/agentic-memory": "^1.0.25",
81
+ "@aigne/core": "^1.54.0",
82
+ "@aigne/default-memory": "^1.1.7",
83
+ "@aigne/openai": "^0.12.1",
84
+ "@aigne/observability-api": "^0.9.1"
85
85
  },
86
86
  "devDependencies": {
87
87
  "@types/archiver": "^6.0.3",