@aigne/cli 1.59.0-beta.3 → 1.59.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 +48 -0
- package/dist/utils/listr.d.ts +3 -1
- package/dist/utils/listr.js +48 -8
- package/dist/utils/load-aigne.js +2 -2
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.59.0-beta.5](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.59.0-beta.4...cli-v1.59.0-beta.5) (2025-12-25)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* The following workspace dependencies were updated
|
|
9
|
+
* dependencies
|
|
10
|
+
* @aigne/afs-local-fs bumped to 1.4.0-beta.5
|
|
11
|
+
* @aigne/agent-library bumped to 1.24.0-beta.5
|
|
12
|
+
* @aigne/agentic-memory bumped to 1.1.6-beta.5
|
|
13
|
+
* @aigne/aigne-hub bumped to 0.10.16-beta.6
|
|
14
|
+
* @aigne/core bumped to 1.72.0-beta.5
|
|
15
|
+
* @aigne/default-memory bumped to 1.3.6-beta.5
|
|
16
|
+
* @aigne/openai bumped to 0.16.16-beta.5
|
|
17
|
+
* @aigne/secrets bumped to 0.1.6-beta.5
|
|
18
|
+
* devDependencies
|
|
19
|
+
* @aigne/test-utils bumped to 0.5.69-beta.5
|
|
20
|
+
|
|
21
|
+
## [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)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* add Agent Skill support ([#787](https://github.com/AIGNE-io/aigne-framework/issues/787)) ([f04fbe7](https://github.com/AIGNE-io/aigne-framework/commit/f04fbe76ec24cf3c59c74adf92d87b0c3784a8f7))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* **cli:** improve terminal outputs ([#847](https://github.com/AIGNE-io/aigne-framework/issues/847)) ([329e91b](https://github.com/AIGNE-io/aigne-framework/commit/329e91bc3323f72fc8a2d278ff5e6bba9adbd6e0))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Dependencies
|
|
35
|
+
|
|
36
|
+
* The following workspace dependencies were updated
|
|
37
|
+
* dependencies
|
|
38
|
+
* @aigne/afs bumped to 1.4.0-beta.3
|
|
39
|
+
* @aigne/afs-history bumped to 1.2.0-beta.3
|
|
40
|
+
* @aigne/afs-local-fs bumped to 1.4.0-beta.4
|
|
41
|
+
* @aigne/agent-library bumped to 1.24.0-beta.4
|
|
42
|
+
* @aigne/agentic-memory bumped to 1.1.6-beta.4
|
|
43
|
+
* @aigne/aigne-hub bumped to 0.10.16-beta.5
|
|
44
|
+
* @aigne/core bumped to 1.72.0-beta.4
|
|
45
|
+
* @aigne/default-memory bumped to 1.3.6-beta.4
|
|
46
|
+
* @aigne/openai bumped to 0.16.16-beta.4
|
|
47
|
+
* @aigne/secrets bumped to 0.1.6-beta.4
|
|
48
|
+
* devDependencies
|
|
49
|
+
* @aigne/test-utils bumped to 0.5.69-beta.4
|
|
50
|
+
|
|
3
51
|
## [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)
|
|
4
52
|
|
|
5
53
|
|
package/dist/utils/listr.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
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 {
|
package/dist/utils/listr.js
CHANGED
|
@@ -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: (
|
|
19
|
-
if (!options?.running)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
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
|
}
|
package/dist/utils/load-aigne.js
CHANGED
|
@@ -55,12 +55,12 @@ export async function loadAIGNE({ path, modelOptions, imageModelOptions, skipMod
|
|
|
55
55
|
availableModules: [
|
|
56
56
|
{
|
|
57
57
|
module: "history",
|
|
58
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "1.59.0-beta.5",
|
|
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
|
|
93
|
-
"@aigne/afs-
|
|
94
|
-
"@aigne/
|
|
95
|
-
"@aigne/
|
|
96
|
-
"@aigne/
|
|
97
|
-
"@aigne/aigne-hub": "^0.10.16-beta.
|
|
98
|
-
"@aigne/
|
|
92
|
+
"@aigne/afs": "^1.4.0-beta.3",
|
|
93
|
+
"@aigne/afs-history": "^1.2.0-beta.3",
|
|
94
|
+
"@aigne/agent-library": "^1.24.0-beta.5",
|
|
95
|
+
"@aigne/agentic-memory": "^1.1.6-beta.5",
|
|
96
|
+
"@aigne/afs-local-fs": "^1.4.0-beta.5",
|
|
97
|
+
"@aigne/aigne-hub": "^0.10.16-beta.6",
|
|
98
|
+
"@aigne/default-memory": "^1.3.6-beta.5",
|
|
99
|
+
"@aigne/core": "^1.72.0-beta.5",
|
|
99
100
|
"@aigne/observability-api": "^0.11.14-beta.1",
|
|
100
|
-
"@aigne/openai": "^0.16.16-beta.
|
|
101
|
-
"@aigne/secrets": "^0.1.6-beta.
|
|
102
|
-
"@aigne/default-memory": "^1.3.6-beta.3"
|
|
101
|
+
"@aigne/openai": "^0.16.16-beta.5",
|
|
102
|
+
"@aigne/secrets": "^0.1.6-beta.5"
|
|
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.
|
|
119
|
+
"@aigne/test-utils": "^0.5.69-beta.5"
|
|
120
120
|
},
|
|
121
121
|
"scripts": {
|
|
122
122
|
"lint": "tsc --noEmit",
|