@aigne/cli 1.11.0 → 1.11.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 +45 -0
- package/dist/commands/run.js +2 -2
- package/dist/commands/serve.js +5 -2
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +2 -0
- package/dist/utils/run-with-aigne.js +2 -2
- package/package.json +11 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.11.2](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.11.1...cli-v1.11.2) (2025-05-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* provide available memories for AIGNE ([#145](https://github.com/AIGNE-io/aigne-framework/issues/145)) ([c5dc960](https://github.com/AIGNE-io/aigne-framework/commit/c5dc9605e0fb7ca60e1f5fa2f0da67ffec00c601))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @aigne/agent-library bumped to 1.12.2
|
|
16
|
+
* @aigne/anthropic bumped to 0.2.3
|
|
17
|
+
* @aigne/bedrock bumped to 0.2.3
|
|
18
|
+
* @aigne/core bumped to 1.18.2
|
|
19
|
+
* @aigne/deepseek bumped to 0.2.3
|
|
20
|
+
* @aigne/gemini bumped to 0.2.3
|
|
21
|
+
* @aigne/ollama bumped to 0.2.3
|
|
22
|
+
* @aigne/open-router bumped to 0.2.3
|
|
23
|
+
* @aigne/openai bumped to 0.2.3
|
|
24
|
+
* @aigne/xai bumped to 0.2.3
|
|
25
|
+
|
|
26
|
+
## [1.11.1](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.11.0...cli-v1.11.1) (2025-05-30)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
|
|
31
|
+
* respect DEBUG env for logger ([#142](https://github.com/AIGNE-io/aigne-framework/issues/142)) ([f84738a](https://github.com/AIGNE-io/aigne-framework/commit/f84738acb382d9fb4f47253fcf91c92c02200053))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Dependencies
|
|
35
|
+
|
|
36
|
+
* The following workspace dependencies were updated
|
|
37
|
+
* dependencies
|
|
38
|
+
* @aigne/anthropic bumped to 0.2.2
|
|
39
|
+
* @aigne/bedrock bumped to 0.2.2
|
|
40
|
+
* @aigne/core bumped to 1.18.1
|
|
41
|
+
* @aigne/deepseek bumped to 0.2.2
|
|
42
|
+
* @aigne/gemini bumped to 0.2.2
|
|
43
|
+
* @aigne/ollama bumped to 0.2.2
|
|
44
|
+
* @aigne/open-router bumped to 0.2.2
|
|
45
|
+
* @aigne/openai bumped to 0.2.2
|
|
46
|
+
* @aigne/xai bumped to 0.2.2
|
|
47
|
+
|
|
3
48
|
## [1.11.0](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.10.1...cli-v1.11.0) (2025-05-29)
|
|
4
49
|
|
|
5
50
|
|
package/dist/commands/run.js
CHANGED
|
@@ -7,7 +7,7 @@ import { loadModel } from "@aigne/core/loader/index.js";
|
|
|
7
7
|
import { logger } from "@aigne/core/utils/logger.js";
|
|
8
8
|
import { isNonNullable } from "@aigne/core/utils/type-utils.js";
|
|
9
9
|
import { Listr, PRESET_TIMER } from "@aigne/listr2";
|
|
10
|
-
import { availableModels } from "../constants.js";
|
|
10
|
+
import { availableMemories, availableModels } from "../constants.js";
|
|
11
11
|
import { isV1Package, toAIGNEPackage } from "../utils/agent-v1.js";
|
|
12
12
|
import { downloadAndExtract } from "../utils/download.js";
|
|
13
13
|
import { createRunAIGNECommand, parseModelOption, runAgentWithAIGNE, } from "../utils/run-with-aigne.js";
|
|
@@ -92,7 +92,7 @@ async function loadAIGNE(path, options) {
|
|
|
92
92
|
const model = options.model
|
|
93
93
|
? await loadModel(availableModels, parseModelOption(options.model))
|
|
94
94
|
: undefined;
|
|
95
|
-
return await AIGNE.load(path, { models: availableModels, model });
|
|
95
|
+
return await AIGNE.load(path, { models: availableModels, memories: availableMemories, model });
|
|
96
96
|
}
|
|
97
97
|
async function downloadPackage(url, cacheDir) {
|
|
98
98
|
await rm(cacheDir, { recursive: true, force: true });
|
package/dist/commands/serve.js
CHANGED
|
@@ -2,7 +2,7 @@ import { isAbsolute, resolve } from "node:path";
|
|
|
2
2
|
import { AIGNE } from "@aigne/core";
|
|
3
3
|
import { tryOrThrow } from "@aigne/core/utils/type-utils.js";
|
|
4
4
|
import { Command } from "commander";
|
|
5
|
-
import { availableModels } from "../constants.js";
|
|
5
|
+
import { availableMemories, availableModels } from "../constants.js";
|
|
6
6
|
import { serveMCPServer } from "../utils/serve-mcp.js";
|
|
7
7
|
const DEFAULT_PORT = () => tryOrThrow(() => {
|
|
8
8
|
const { PORT } = process.env;
|
|
@@ -24,7 +24,10 @@ export function createServeCommand() {
|
|
|
24
24
|
.action(async (path, options) => {
|
|
25
25
|
const absolutePath = isAbsolute(path) ? path : resolve(process.cwd(), path);
|
|
26
26
|
const port = options.port || DEFAULT_PORT();
|
|
27
|
-
const aigne = await AIGNE.load(absolutePath, {
|
|
27
|
+
const aigne = await AIGNE.load(absolutePath, {
|
|
28
|
+
models: availableModels,
|
|
29
|
+
memories: availableMemories,
|
|
30
|
+
});
|
|
28
31
|
if (options.mcp)
|
|
29
32
|
await serveMCPServer({
|
|
30
33
|
aigne,
|
package/dist/constants.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { DefaultMemory } from "@aigne/agent-library/default-memory/index.js";
|
|
1
2
|
import { AnthropicChatModel } from "@aigne/anthropic";
|
|
2
3
|
import { BedrockChatModel } from "@aigne/bedrock";
|
|
3
4
|
import { OpenAIChatModel } from "@aigne/openai";
|
|
4
5
|
export declare const AIGNE_CLI_VERSION: string;
|
|
5
6
|
export declare const availableModels: (typeof OpenAIChatModel | typeof AnthropicChatModel | typeof BedrockChatModel)[];
|
|
7
|
+
export declare const availableMemories: (typeof DefaultMemory)[];
|
package/dist/constants.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DefaultMemory } from "@aigne/agent-library/default-memory/index.js";
|
|
1
2
|
import { AnthropicChatModel } from "@aigne/anthropic";
|
|
2
3
|
import { BedrockChatModel } from "@aigne/bedrock";
|
|
3
4
|
import { DeepSeekChatModel } from "@aigne/deepseek";
|
|
@@ -18,3 +19,4 @@ export const availableModels = [
|
|
|
18
19
|
OpenRouterChatModel,
|
|
19
20
|
XAIChatModel,
|
|
20
21
|
];
|
|
22
|
+
export const availableMemories = [DefaultMemory];
|
|
@@ -3,7 +3,7 @@ import { isatty } from "node:tty";
|
|
|
3
3
|
import { promisify } from "node:util";
|
|
4
4
|
import { AIGNE, UserAgent, createMessage } from "@aigne/core";
|
|
5
5
|
import { loadModel } from "@aigne/core/loader/index.js";
|
|
6
|
-
import { LogLevel, logger } from "@aigne/core/utils/logger.js";
|
|
6
|
+
import { LogLevel, getLevelFromEnv, logger } from "@aigne/core/utils/logger.js";
|
|
7
7
|
import { readAllString } from "@aigne/core/utils/stream-utils.js";
|
|
8
8
|
import { tryOrThrow } from "@aigne/core/utils/type-utils.js";
|
|
9
9
|
import { Command } from "commander";
|
|
@@ -21,7 +21,7 @@ export const createRunAIGNECommand = (name = "run") => new Command(name)
|
|
|
21
21
|
.option("--presence-penalty <presence-penalty>", "Presence penalty for the model (penalizes repeating the same tokens). Range: -2.0 to 2.0", customZodError("--presence-penalty", (s) => z.coerce.number().min(-2).max(2).parse(s)))
|
|
22
22
|
.option("--frequency-penalty <frequency-penalty>", "Frequency penalty for the model (penalizes frequency of token usage). Range: -2.0 to 2.0", customZodError("--frequency-penalty", (s) => z.coerce.number().min(-2).max(2).parse(s)))
|
|
23
23
|
.option("--input -i <input>", "Input to the agent")
|
|
24
|
-
.option("--log-level <level>", `Log level for detailed debugging information. Values: ${Object.values(LogLevel).join(", ")}`, customZodError("--log-level", (s) => z.nativeEnum(LogLevel).parse(s)), LogLevel.INFO);
|
|
24
|
+
.option("--log-level <level>", `Log level for detailed debugging information. Values: ${Object.values(LogLevel).join(", ")}`, customZodError("--log-level", (s) => z.nativeEnum(LogLevel).parse(s)), getLevelFromEnv(logger.options.ns) || LogLevel.INFO);
|
|
25
25
|
export const parseModelOption = (model) => {
|
|
26
26
|
const { provider, name } = model?.match(/(?<provider>[^:]+)(:(?<name>(\S+)))?/)?.groups ?? {};
|
|
27
27
|
return { provider, name };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/cli",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.2",
|
|
4
4
|
"description": "cli for AIGNE framework",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -50,15 +50,16 @@
|
|
|
50
50
|
"tar": "^7.4.3",
|
|
51
51
|
"wrap-ansi": "^9.0.0",
|
|
52
52
|
"zod": "^3.24.4",
|
|
53
|
-
"@aigne/
|
|
54
|
-
"@aigne/
|
|
55
|
-
"@aigne/
|
|
56
|
-
"@aigne/
|
|
57
|
-
"@aigne/
|
|
58
|
-
"@aigne/gemini": "^0.2.
|
|
59
|
-
"@aigne/
|
|
60
|
-
"@aigne/
|
|
61
|
-
"@aigne/
|
|
53
|
+
"@aigne/agent-library": "^1.12.2",
|
|
54
|
+
"@aigne/core": "^1.18.2",
|
|
55
|
+
"@aigne/anthropic": "^0.2.3",
|
|
56
|
+
"@aigne/bedrock": "^0.2.3",
|
|
57
|
+
"@aigne/deepseek": "^0.2.3",
|
|
58
|
+
"@aigne/gemini": "^0.2.3",
|
|
59
|
+
"@aigne/ollama": "^0.2.3",
|
|
60
|
+
"@aigne/open-router": "^0.2.3",
|
|
61
|
+
"@aigne/openai": "^0.2.3",
|
|
62
|
+
"@aigne/xai": "^0.2.3"
|
|
62
63
|
},
|
|
63
64
|
"devDependencies": {
|
|
64
65
|
"@types/archiver": "^6.0.3",
|