@aigne/cli 1.30.0 → 1.30.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 CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.30.2](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.30.1...cli-v1.30.2) (2025-08-05)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * The following workspace dependencies were updated
9
+ * dependencies
10
+ * @aigne/agent-library bumped to 1.21.11
11
+ * @aigne/agentic-memory bumped to 1.0.11
12
+ * @aigne/aigne-hub bumped to 0.4.2
13
+ * @aigne/openai bumped to 0.10.11
14
+ * @aigne/core bumped to 1.43.1
15
+ * @aigne/default-memory bumped to 1.0.11
16
+
17
+ ## [1.30.1](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.30.0...cli-v1.30.1) (2025-08-04)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **cli:** persist prompts log and improve terminal output ([#307](https://github.com/AIGNE-io/aigne-framework/issues/307)) ([ac8116f](https://github.com/AIGNE-io/aigne-framework/commit/ac8116fc46f26169e7619860c392fb9f66bc3fee))
23
+
24
+
25
+ ### Dependencies
26
+
27
+ * The following workspace dependencies were updated
28
+ * dependencies
29
+ * @aigne/agent-library bumped to 1.21.10
30
+ * @aigne/agentic-memory bumped to 1.0.10
31
+ * @aigne/aigne-hub bumped to 0.4.1
32
+ * @aigne/openai bumped to 0.10.10
33
+ * @aigne/core bumped to 1.43.0
34
+ * @aigne/default-memory bumped to 1.0.10
35
+
3
36
  ## [1.30.0](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.29.0...cli-v1.30.0) (2025-08-01)
4
37
 
5
38
 
package/README.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @aigne/cli
2
2
 
3
+ <p align="center">
4
+ <picture>
5
+ <source srcset="https://raw.githubusercontent.com/AIGNE-io/aigne-framework/main/packages/cli/logo-dark.svg" media="(prefers-color-scheme: dark)">
6
+ <source srcset="https://raw.githubusercontent.com/AIGNE-io/aigne-framework/main/packages/cli/logo.svg" media="(prefers-color-scheme: light)">
7
+ <img src="https://raw.githubusercontent.com/AIGNE-io/aigne-framework/main/packages/cli/logo.svg" alt="AIGNE Logo" width="400" />
8
+ </picture>
9
+ </p>
10
+
3
11
  [![GitHub star chart](https://img.shields.io/github/stars/AIGNE-io/aigne-framework?style=flat-square)](https://star-history.com/#AIGNE-io/aigne-framework)
4
12
  [![Open Issues](https://img.shields.io/github/issues-raw/AIGNE-io/aigne-framework?style=flat-square)](https://github.com/AIGNE-io/aigne-framework/issues)
5
13
  [![codecov](https://codecov.io/gh/AIGNE-io/aigne-framework/graph/badge.svg?token=DO07834RQL)](https://codecov.io/gh/AIGNE-io/aigne-framework)
@@ -207,7 +207,6 @@ export async function loadApplication({ name, dir, forceUpgrade = false, }) {
207
207
  },
208
208
  {
209
209
  title: "Installing dependencies",
210
- skip: (ctx) => ctx.version === check?.version,
211
210
  task: async () => {
212
211
  await installDependencies(dir);
213
212
  },
@@ -70,9 +70,11 @@ export class TerminalTracer {
70
70
  return undefined;
71
71
  return async (config) => {
72
72
  const { taskWrapper } = await task.listr.promise;
73
- return taskWrapper
73
+ const result = await taskWrapper
74
74
  .prompt(ListrInquirerPromptAdapter)
75
75
  .run(method, config);
76
+ console.log(`${chalk.blue("✔")} ${chalk.bold(config.message)} ${result}`);
77
+ return result;
76
78
  };
77
79
  },
78
80
  }),
@@ -37,6 +37,7 @@ export declare class AIGNEListrRenderer extends DefaultRenderer {
37
37
  get _options(): AIGNEListrRendererOptions;
38
38
  get _spinner(): Spinner;
39
39
  update(): void;
40
+ private isPreviousPrompt;
40
41
  create({ running, ...options }: Parameters<DefaultRenderer["create"]>[0] & {
41
42
  running?: boolean;
42
43
  }): string;
@@ -47,21 +47,26 @@ export class AIGNEListr extends Listr {
47
47
  }
48
48
  async run(stream) {
49
49
  const originalLog = logger.logMessage;
50
+ const originalConsole = { ...console };
50
51
  try {
51
52
  this.ctx = {};
52
53
  this.spinner.start();
53
- logger.logMessage = (...args) => this.logs.push(format(...args));
54
54
  if (logger.enabled(LogLevel.INFO)) {
55
55
  const request = this.myOptions.formatRequest();
56
56
  if (request)
57
57
  console.log(request);
58
58
  }
59
+ logger.logMessage = (...args) => this.logs.push(format(...args));
60
+ for (const method of ["debug", "log", "info", "warn", "error"]) {
61
+ console[method] = (...args) => this.logs.push(format(...args));
62
+ }
59
63
  const _stream = await stream();
60
64
  this.add({ task: () => this.extractStream(_stream) });
61
65
  return await super.run().then(() => ({ ...this.result }));
62
66
  }
63
67
  finally {
64
68
  logger.logMessage = originalLog;
69
+ Object.assign(console, originalConsole);
65
70
  this.spinner.stop();
66
71
  }
67
72
  }
@@ -92,35 +97,44 @@ export class AIGNEListrRenderer extends DefaultRenderer {
92
97
  update() {
93
98
  this._updater(this.create({ running: true }));
94
99
  }
100
+ isPreviousPrompt = false;
95
101
  create({ running = false, ...options }) {
96
102
  const logs = this._options.aigne?.getStdoutLogs?.();
97
103
  if (logs?.length) {
98
104
  this._updater.clear();
99
105
  this._logger.toStdout(logs.join(EOL));
100
106
  }
101
- let tasks = super.create({ ...options, prompt: false });
102
- const bottomBar = this._options.aigne?.getBottomBarLogs?.({ running });
103
- if (bottomBar?.length) {
104
- tasks += EOL.repeat(2);
105
- const output = [...bottomBar, running ? this._spinner.fetch() : ""]
106
- .map((i) => this._wrap(i))
107
- .join(EOL);
108
- // If the task is not running, we show all lines
109
- if (!running) {
110
- tasks += output;
111
- }
112
- // For running tasks, we only show the last few lines
113
- else {
114
- const { rows } = process.stdout;
115
- const lines = rows - tasks.split(EOL).length - 2;
116
- tasks += output.split(EOL).slice(-Math.max(4, lines)).join(EOL);
117
- }
118
- }
107
+ let buffer = "";
119
108
  const prompt = super["renderPrompt"]();
120
109
  if (prompt.length) {
121
- tasks += `${EOL.repeat(2)}${prompt.join(EOL)}`;
110
+ buffer += prompt.join(EOL);
111
+ this.isPreviousPrompt = true;
112
+ }
113
+ // Skip a frame if previous render was a prompt, and reset the flag
114
+ else if (this.isPreviousPrompt) {
115
+ this.isPreviousPrompt = false;
116
+ }
117
+ else {
118
+ buffer += super.create({ ...options, prompt: false });
119
+ const bottomBar = this._options.aigne?.getBottomBarLogs?.({ running });
120
+ if (bottomBar?.length) {
121
+ buffer += EOL.repeat(2);
122
+ const output = [...bottomBar, running ? this._spinner.fetch() : ""]
123
+ .map((i) => this._wrap(i))
124
+ .join(EOL);
125
+ // If the task is not running, we show all lines
126
+ if (!running) {
127
+ buffer += output;
128
+ }
129
+ // For running tasks, we only show the last few lines
130
+ else {
131
+ const { rows } = process.stdout;
132
+ const lines = rows - buffer.split(EOL).length - 2;
133
+ buffer += output.split(EOL).slice(-Math.max(4, lines)).join(EOL);
134
+ }
135
+ }
122
136
  }
123
- return tasks;
137
+ return buffer;
124
138
  }
125
139
  _wrap(str) {
126
140
  return wrap(str, process.stdout.columns ?? 80, {
package/package.json CHANGED
@@ -1,17 +1,20 @@
1
1
  {
2
2
  "name": "@aigne/cli",
3
- "version": "1.30.0",
4
- "description": "cli for AIGNE framework",
3
+ "version": "1.30.2",
4
+ "description": "Command-line interface for AIGNE Framework - A functional AI application development framework for building scalable AI-powered applications with workflow patterns, MCP protocol integration, and multi-model support",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
8
8
  "author": "Arcblock <blocklet@arcblock.io> https://github.com/blocklet",
9
- "homepage": "https://github.com/AIGNE-io/aigne-framework",
9
+ "homepage": "https://www.aigne.io/cli",
10
10
  "license": "Elastic-2.0",
11
11
  "repository": {
12
12
  "type": "git",
13
13
  "url": "git+https://github.com/AIGNE-io/aigne-framework"
14
14
  },
15
+ "bugs": {
16
+ "url": "https://github.com/AIGNE-io/aigne-framework/issues"
17
+ },
15
18
  "files": [
16
19
  "dist",
17
20
  "LICENSE",
@@ -70,12 +73,12 @@
70
73
  "yaml": "^2.8.0",
71
74
  "yargs": "^18.0.0",
72
75
  "zod": "^3.25.67",
73
- "@aigne/agent-library": "^1.21.9",
74
- "@aigne/agentic-memory": "^1.0.9",
75
- "@aigne/aigne-hub": "^0.4.0",
76
- "@aigne/openai": "^0.10.9",
77
- "@aigne/default-memory": "^1.0.9",
78
- "@aigne/core": "^1.42.0",
76
+ "@aigne/agent-library": "^1.21.11",
77
+ "@aigne/agentic-memory": "^1.0.11",
78
+ "@aigne/aigne-hub": "^0.4.2",
79
+ "@aigne/openai": "^0.10.11",
80
+ "@aigne/default-memory": "^1.0.11",
81
+ "@aigne/core": "^1.43.1",
79
82
  "@aigne/observability-api": "^0.9.0"
80
83
  },
81
84
  "devDependencies": {