@aigne/cli 1.11.2 → 1.11.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,46 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.11.4](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.11.3...cli-v1.11.4) (2025-06-05)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* The following workspace dependencies were updated
|
|
9
|
+
* dependencies
|
|
10
|
+
* @aigne/agent-library bumped to 1.12.4
|
|
11
|
+
* @aigne/anthropic bumped to 0.2.5
|
|
12
|
+
* @aigne/bedrock bumped to 0.2.5
|
|
13
|
+
* @aigne/core bumped to 1.18.4
|
|
14
|
+
* @aigne/deepseek bumped to 0.2.5
|
|
15
|
+
* @aigne/gemini bumped to 0.2.5
|
|
16
|
+
* @aigne/ollama bumped to 0.2.5
|
|
17
|
+
* @aigne/open-router bumped to 0.2.5
|
|
18
|
+
* @aigne/openai bumped to 0.2.5
|
|
19
|
+
* @aigne/xai bumped to 0.2.5
|
|
20
|
+
|
|
21
|
+
## [1.11.3](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.11.2...cli-v1.11.3) (2025-06-05)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* compatible nodejs version >=20 ([#149](https://github.com/AIGNE-io/aigne-framework/issues/149)) ([d5ae9f2](https://github.com/AIGNE-io/aigne-framework/commit/d5ae9f245972e87e70fd87cdd960ade9940f288c))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Dependencies
|
|
30
|
+
|
|
31
|
+
* The following workspace dependencies were updated
|
|
32
|
+
* dependencies
|
|
33
|
+
* @aigne/agent-library bumped to 1.12.3
|
|
34
|
+
* @aigne/anthropic bumped to 0.2.4
|
|
35
|
+
* @aigne/bedrock bumped to 0.2.4
|
|
36
|
+
* @aigne/core bumped to 1.18.3
|
|
37
|
+
* @aigne/deepseek bumped to 0.2.4
|
|
38
|
+
* @aigne/gemini bumped to 0.2.4
|
|
39
|
+
* @aigne/ollama bumped to 0.2.4
|
|
40
|
+
* @aigne/open-router bumped to 0.2.4
|
|
41
|
+
* @aigne/openai bumped to 0.2.4
|
|
42
|
+
* @aigne/xai bumped to 0.2.4
|
|
43
|
+
|
|
3
44
|
## [1.11.2](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.11.1...cli-v1.11.2) (2025-05-30)
|
|
4
45
|
|
|
5
46
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type Agent, type Context, type ContextUsage,
|
|
1
|
+
import { type Agent, type Context, type ContextUsage, type Message } from "@aigne/core";
|
|
2
|
+
import { promiseWithResolvers } from "@aigne/core/utils/promise.js";
|
|
2
3
|
import { type Listr } from "@aigne/listr2";
|
|
3
4
|
import { type AIGNEListrTaskWrapper } from "../utils/listr.js";
|
|
4
|
-
import { promiseWithResolvers } from "../utils/promise-with-resolvers.js";
|
|
5
5
|
export interface TerminalTracerOptions {
|
|
6
6
|
printRequest?: boolean;
|
|
7
7
|
}
|
|
@@ -24,8 +24,8 @@ export declare class TerminalTracer {
|
|
|
24
24
|
time?: boolean;
|
|
25
25
|
}): string;
|
|
26
26
|
private marked;
|
|
27
|
-
formatRequest(_context: Context,
|
|
28
|
-
formatResult(context: Context,
|
|
27
|
+
formatRequest(_context: Context, m?: Message): string | undefined;
|
|
28
|
+
formatResult(context: Context, m?: Message): string;
|
|
29
29
|
}
|
|
30
30
|
type Task = ReturnType<typeof promiseWithResolvers<void>> & {
|
|
31
31
|
listr: ReturnType<typeof promiseWithResolvers<{
|
package/dist/tracer/terminal.js
CHANGED
|
@@ -2,12 +2,13 @@ import { EOL } from "node:os";
|
|
|
2
2
|
import { inspect } from "node:util";
|
|
3
3
|
import { ChatModel, MESSAGE_KEY, } from "@aigne/core";
|
|
4
4
|
import { LogLevel, logger } from "@aigne/core/utils/logger.js";
|
|
5
|
+
import { promiseWithResolvers } from "@aigne/core/utils/promise.js";
|
|
6
|
+
import { omitBy } from "@aigne/core/utils/type-utils.js";
|
|
5
7
|
import { figures } from "@aigne/listr2";
|
|
6
8
|
import { markedTerminal } from "@aigne/marked-terminal";
|
|
7
9
|
import chalk from "chalk";
|
|
8
10
|
import { Marked } from "marked";
|
|
9
11
|
import { AIGNEListr } from "../utils/listr.js";
|
|
10
|
-
import { promiseWithResolvers } from "../utils/promise-with-resolvers.js";
|
|
11
12
|
import { parseDuration } from "../utils/time.js";
|
|
12
13
|
export class TerminalTracer {
|
|
13
14
|
context;
|
|
@@ -121,18 +122,22 @@ export class TerminalTracer {
|
|
|
121
122
|
return title;
|
|
122
123
|
}
|
|
123
124
|
marked = new Marked().use(markedTerminal({ forceHyperLink: false }));
|
|
124
|
-
formatRequest(_context,
|
|
125
|
+
formatRequest(_context, m = {}) {
|
|
125
126
|
if (!logger.enabled(LogLevel.INFO))
|
|
126
127
|
return;
|
|
127
128
|
const prefix = `${chalk.grey(figures.pointer)} 💬 `;
|
|
129
|
+
const msg = m[MESSAGE_KEY];
|
|
130
|
+
const message = omitBy(m, (_, k) => k === MESSAGE_KEY);
|
|
128
131
|
const text = msg && typeof msg === "string" ? this.marked.parse(msg, { async: false }).trim() : undefined;
|
|
129
132
|
const json = Object.keys(message).length > 0 ? inspect(message, { colors: true }) : undefined;
|
|
130
133
|
return [prefix, [text, json].filter(Boolean).join(EOL)].join(" ");
|
|
131
134
|
}
|
|
132
|
-
formatResult(context,
|
|
135
|
+
formatResult(context, m = {}) {
|
|
133
136
|
const prefix = logger.enabled(LogLevel.INFO)
|
|
134
137
|
? `${chalk.grey(figures.tick)} 🤖 ${this.formatTokenUsage(context.usage)}`
|
|
135
138
|
: null;
|
|
139
|
+
const msg = m[MESSAGE_KEY];
|
|
140
|
+
const message = omitBy(m, (_, k) => k === MESSAGE_KEY);
|
|
136
141
|
const text = msg && typeof msg === "string" ? this.marked.parse(msg, { async: false }).trim() : undefined;
|
|
137
142
|
const json = Object.keys(message).length > 0
|
|
138
143
|
? inspect(message, { colors: process.stdout.isTTY })
|
package/dist/utils/serve-mcp.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { getMessage } from "@aigne/core";
|
|
2
|
+
import { promiseWithResolvers } from "@aigne/core/utils/promise.js";
|
|
2
3
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
4
|
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
|
|
4
5
|
import express, { Router, json } from "express";
|
|
5
6
|
import { ZodObject } from "zod";
|
|
6
7
|
import { AIGNE_CLI_VERSION } from "../constants.js";
|
|
7
|
-
import { promiseWithResolvers } from "./promise-with-resolvers.js";
|
|
8
8
|
export async function serveMCPServer({ pathname = "/mcp", aigne, host = "localhost", port, }) {
|
|
9
9
|
const app = express();
|
|
10
10
|
app.use(json());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/cli",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.4",
|
|
4
4
|
"description": "cli for AIGNE framework",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -50,16 +50,16 @@
|
|
|
50
50
|
"tar": "^7.4.3",
|
|
51
51
|
"wrap-ansi": "^9.0.0",
|
|
52
52
|
"zod": "^3.24.4",
|
|
53
|
-
"@aigne/agent-library": "^1.12.
|
|
54
|
-
"@aigne/
|
|
55
|
-
"@aigne/
|
|
56
|
-
"@aigne/
|
|
57
|
-
"@aigne/
|
|
58
|
-
"@aigne/
|
|
59
|
-
"@aigne/
|
|
60
|
-
"@aigne/
|
|
61
|
-
"@aigne/
|
|
62
|
-
"@aigne/xai": "^0.2.
|
|
53
|
+
"@aigne/agent-library": "^1.12.4",
|
|
54
|
+
"@aigne/anthropic": "^0.2.5",
|
|
55
|
+
"@aigne/deepseek": "^0.2.5",
|
|
56
|
+
"@aigne/core": "^1.18.4",
|
|
57
|
+
"@aigne/bedrock": "^0.2.5",
|
|
58
|
+
"@aigne/ollama": "^0.2.5",
|
|
59
|
+
"@aigne/gemini": "^0.2.5",
|
|
60
|
+
"@aigne/openai": "^0.2.5",
|
|
61
|
+
"@aigne/open-router": "^0.2.5",
|
|
62
|
+
"@aigne/xai": "^0.2.5"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@types/archiver": "^6.0.3",
|