@aigne/cli 1.59.0-beta.2 → 1.59.0-beta.4

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,44 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.59.0-beta.4](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.59.0-beta.3...cli-v1.59.0-beta.4) (2025-12-24)
4
+
5
+
6
+ ### Features
7
+
8
+ * add Agent Skill support ([#787](https://github.com/AIGNE-io/aigne-framework/issues/787)) ([f04fbe7](https://github.com/AIGNE-io/aigne-framework/commit/f04fbe76ec24cf3c59c74adf92d87b0c3784a8f7))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **cli:** improve terminal outputs ([#847](https://github.com/AIGNE-io/aigne-framework/issues/847)) ([329e91b](https://github.com/AIGNE-io/aigne-framework/commit/329e91bc3323f72fc8a2d278ff5e6bba9adbd6e0))
14
+
15
+
16
+ ### Dependencies
17
+
18
+ * The following workspace dependencies were updated
19
+ * dependencies
20
+ * @aigne/afs bumped to 1.4.0-beta.3
21
+ * @aigne/afs-history bumped to 1.2.0-beta.3
22
+ * @aigne/afs-local-fs bumped to 1.4.0-beta.4
23
+ * @aigne/agent-library bumped to 1.24.0-beta.4
24
+ * @aigne/agentic-memory bumped to 1.1.6-beta.4
25
+ * @aigne/aigne-hub bumped to 0.10.16-beta.5
26
+ * @aigne/core bumped to 1.72.0-beta.4
27
+ * @aigne/default-memory bumped to 1.3.6-beta.4
28
+ * @aigne/openai bumped to 0.16.16-beta.4
29
+ * @aigne/secrets bumped to 0.1.6-beta.4
30
+ * devDependencies
31
+ * @aigne/test-utils bumped to 0.5.69-beta.4
32
+
33
+ ## [1.59.0-beta.3](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.59.0-beta.2...cli-v1.59.0-beta.3) (2025-12-22)
34
+
35
+
36
+ ### Dependencies
37
+
38
+ * The following workspace dependencies were updated
39
+ * dependencies
40
+ * @aigne/aigne-hub bumped to 0.10.16-beta.4
41
+
3
42
  ## [1.59.0-beta.2](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.58.1-beta.2...cli-v1.59.0-beta.2) (2025-12-19)
4
43
 
5
44
 
@@ -1,4 +1,4 @@
1
- import type { AgentResponseStream, Message } from "@aigne/core";
1
+ import { type AgentResponseStream, type Message } from "@aigne/core";
2
2
  import type { PromiseOrValue } from "@aigne/core/utils/type-utils.js";
3
3
  import { DefaultRenderer, Listr, type ListrDefaultRendererOptions, ListrLogger, type ListrSimpleRendererOptions, type ListrTaskWrapper, SimpleRenderer, Spinner } from "@aigne/listr2";
4
4
  import type { createLogUpdate } from "log-update";
@@ -22,7 +22,9 @@ export declare class AIGNEListr extends Listr<object, typeof AIGNEListrRenderer,
22
22
  renderImage?: boolean;
23
23
  }) => string | Promise<string>;
24
24
  }, ...[task, options, parentTask]: ConstructorParameters<typeof Listr<object, typeof AIGNEListrRenderer, typeof AIGNEListrFallbackRenderer>>);
25
+ private needLogResult;
25
26
  run(stream: () => PromiseOrValue<AgentResponseStream<Message>>): Promise<Message>;
27
+ private marked;
26
28
  private extractStream;
27
29
  }
28
30
  export interface AIGNEListrRendererOptions extends ListrDefaultRendererOptions {
@@ -1,8 +1,12 @@
1
1
  import { EOL } from "node:os";
2
2
  import { format } from "node:util";
3
+ import { isAgentResponseProgress } from "@aigne/core";
3
4
  import { LogLevel, logger } from "@aigne/core/utils/logger.js";
4
5
  import { mergeAgentResponseChunk } from "@aigne/core/utils/stream-utils.js";
5
6
  import { color, DefaultRenderer, figures, Listr, ListrDefaultRendererLogLevels, ListrLogger, SimpleRenderer, Spinner, } from "@aigne/listr2";
7
+ import { markedTerminal } from "@aigne/marked-terminal";
8
+ import chalk from "chalk";
9
+ import { Marked } from "marked";
6
10
  import wrap from "wrap-ansi";
7
11
  export class AIGNEListr extends Listr {
8
12
  myOptions;
@@ -15,13 +19,12 @@ export class AIGNEListr extends Listr {
15
19
  getStdoutLogs: () => {
16
20
  return this.logs.splice(0);
17
21
  },
18
- getBottomBarLogs: (options) => {
19
- if (!options?.running)
20
- return [];
21
- const r = this.myOptions.formatResult(this.result);
22
- if (typeof r !== "string")
23
- throw new Error("Must return a string result for running task");
24
- return [r];
22
+ getBottomBarLogs: (_options) => {
23
+ // if (!options?.running) return [];
24
+ // const r = this.myOptions.formatResult(this.result);
25
+ // if (typeof r !== "string") throw new Error("Must return a string result for running task");
26
+ // return [r];
27
+ return [];
25
28
  },
26
29
  };
27
30
  super(task, {
@@ -55,6 +58,7 @@ export class AIGNEListr extends Listr {
55
58
  this.myOptions = myOptions;
56
59
  this.spinner = new Spinner();
57
60
  }
61
+ needLogResult = true;
58
62
  async run(stream) {
59
63
  const originalLog = logger.logMessage;
60
64
  const originalConsole = { ...console };
@@ -81,7 +85,9 @@ export class AIGNEListr extends Listr {
81
85
  throw this.error;
82
86
  return { ...this.result };
83
87
  });
84
- console.log(await this.myOptions.formatResult(this.result, { running: false, renderImage: true }));
88
+ if (this.needLogResult) {
89
+ console.log(await this.myOptions.formatResult(this.result, { running: false, renderImage: true }));
90
+ }
85
91
  return result;
86
92
  }
87
93
  finally {
@@ -90,11 +96,45 @@ export class AIGNEListr extends Listr {
90
96
  this.spinner.stop();
91
97
  }
92
98
  }
99
+ marked = new Marked().use({
100
+ // marked-terminal does not support code block meta, so we need to strip it
101
+ walkTokens: (token) => {
102
+ if (token.type === "code") {
103
+ if (typeof token.lang === "string") {
104
+ token.lang = token.lang.trim().split(/\s+/)[0];
105
+ }
106
+ }
107
+ },
108
+ }, markedTerminal({ forceHyperLink: false }, {
109
+ theme: {
110
+ string: chalk.green,
111
+ },
112
+ }));
93
113
  async extractStream(stream) {
94
114
  try {
95
115
  this.result = {};
96
116
  for await (const value of stream) {
97
117
  mergeAgentResponseChunk(this.result, value);
118
+ if (isAgentResponseProgress(value) && value.progress.event === "message") {
119
+ const { role, message } = value.progress;
120
+ const rendered = [];
121
+ for (const msg of message) {
122
+ if (msg.type === "text") {
123
+ rendered.push(this.marked.parse(msg.content, { async: false }).trim());
124
+ }
125
+ else if (msg.type === "thinking") {
126
+ rendered.push(chalk.dim(chalk.grey(chalk.italic(`[Thinking] ${msg.thoughts}`))));
127
+ }
128
+ else if (msg.type === "tool_use") {
129
+ rendered.push(`${chalk.bold.gray(`[${msg.name}]`)} ${chalk.gray(`${JSON.stringify(msg.input).slice(0, 200)}...`)}`);
130
+ }
131
+ }
132
+ if (rendered.length) {
133
+ const prefix = role === "user" ? chalk.blue.bold(">") : chalk.green.bold("•");
134
+ console.log(`${prefix} ${rendered.join("\n")}\n`);
135
+ this.needLogResult = false;
136
+ }
137
+ }
98
138
  }
99
139
  return this.result;
100
140
  }
@@ -55,12 +55,12 @@ export async function loadAIGNE({ path, modelOptions, imageModelOptions, skipMod
55
55
  availableModules: [
56
56
  {
57
57
  module: "history",
58
- create: (options) => import("@aigne/afs-history").then((m) => new m.AFSHistory(options)),
58
+ load: (options) => import("@aigne/afs-history").then((m) => new m.AFSHistory(options.parsed)),
59
59
  },
60
60
  {
61
61
  module: "local-fs",
62
62
  alias: ["system-fs"],
63
- create: (options) => import("@aigne/afs-local-fs").then((m) => new m.LocalFS(options)),
63
+ load: (options) => import("@aigne/afs-local-fs").then((m) => m.LocalFS.load(options)),
64
64
  },
65
65
  ],
66
66
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/cli",
3
- "version": "1.59.0-beta.2",
3
+ "version": "1.59.0-beta.4",
4
4
  "description": "Your command center for agent development",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -89,17 +89,17 @@
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": "^1.4.0-beta.2",
93
- "@aigne/afs-local-fs": "^1.4.0-beta.3",
94
- "@aigne/afs-history": "^1.2.0-beta.2",
95
- "@aigne/agent-library": "^1.24.0-beta.3",
96
- "@aigne/agentic-memory": "^1.1.6-beta.3",
97
- "@aigne/core": "^1.72.0-beta.3",
98
- "@aigne/default-memory": "^1.3.6-beta.3",
99
- "@aigne/aigne-hub": "^0.10.16-beta.3",
92
+ "@aigne/afs": "^1.4.0-beta.3",
93
+ "@aigne/afs-local-fs": "^1.4.0-beta.4",
94
+ "@aigne/afs-history": "^1.2.0-beta.3",
95
+ "@aigne/agent-library": "^1.24.0-beta.4",
96
+ "@aigne/agentic-memory": "^1.1.6-beta.4",
97
+ "@aigne/aigne-hub": "^0.10.16-beta.5",
98
+ "@aigne/core": "^1.72.0-beta.4",
99
+ "@aigne/default-memory": "^1.3.6-beta.4",
100
+ "@aigne/openai": "^0.16.16-beta.4",
100
101
  "@aigne/observability-api": "^0.11.14-beta.1",
101
- "@aigne/openai": "^0.16.16-beta.3",
102
- "@aigne/secrets": "^0.1.6-beta.3"
102
+ "@aigne/secrets": "^0.1.6-beta.4"
103
103
  },
104
104
  "devDependencies": {
105
105
  "@inquirer/testing": "^2.1.50",
@@ -116,7 +116,7 @@
116
116
  "rimraf": "^6.0.1",
117
117
  "typescript": "^5.9.2",
118
118
  "ufo": "^1.6.1",
119
- "@aigne/test-utils": "^0.5.69-beta.3"
119
+ "@aigne/test-utils": "^0.5.69-beta.4"
120
120
  },
121
121
  "scripts": {
122
122
  "lint": "tsc --noEmit",