@aigne/cli 1.53.1-beta.4 → 1.54.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 +40 -0
- package/dist/commands/app/app.js +3 -1
- package/dist/commands/run.js +13 -4
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +12 -0
- package/dist/utils/aigne-hub/model.d.ts +3 -3
- package/dist/utils/aigne-hub/model.js +4 -2
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,45 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.54.0-beta.5](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.54.0-beta.4...cli-v1.54.0-beta.5) (2025-11-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* The following workspace dependencies were updated
|
|
9
|
+
* dependencies
|
|
10
|
+
* @aigne/afs-system-fs bumped to 1.0.4-beta.6
|
|
11
|
+
* @aigne/agent-library bumped to 1.21.51-beta.5
|
|
12
|
+
* @aigne/agentic-memory bumped to 1.0.51-beta.5
|
|
13
|
+
* @aigne/aigne-hub bumped to 0.10.5-beta.5
|
|
14
|
+
* @aigne/core bumped to 1.66.0-beta.4
|
|
15
|
+
* @aigne/default-memory bumped to 1.2.14-beta.5
|
|
16
|
+
* @aigne/observability-api bumped to 0.11.5-beta.3
|
|
17
|
+
* @aigne/openai bumped to 0.16.5-beta.5
|
|
18
|
+
* devDependencies
|
|
19
|
+
* @aigne/test-utils bumped to 0.5.58-beta.5
|
|
20
|
+
|
|
21
|
+
## [1.54.0-beta.4](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.53.1-beta.4...cli-v1.54.0-beta.4) (2025-11-06)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Features
|
|
25
|
+
|
|
26
|
+
* add dynamic model options resolution with getter pattern ([#708](https://github.com/AIGNE-io/aigne-framework/issues/708)) ([5ed5085](https://github.com/AIGNE-io/aigne-framework/commit/5ed5085203763c70194853c56edc13acf56d81c6))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Dependencies
|
|
30
|
+
|
|
31
|
+
* The following workspace dependencies were updated
|
|
32
|
+
* dependencies
|
|
33
|
+
* @aigne/afs-system-fs bumped to 1.0.4-beta.5
|
|
34
|
+
* @aigne/agent-library bumped to 1.21.51-beta.4
|
|
35
|
+
* @aigne/agentic-memory bumped to 1.0.51-beta.4
|
|
36
|
+
* @aigne/aigne-hub bumped to 0.10.5-beta.4
|
|
37
|
+
* @aigne/core bumped to 1.66.0-beta.3
|
|
38
|
+
* @aigne/default-memory bumped to 1.2.14-beta.4
|
|
39
|
+
* @aigne/openai bumped to 0.16.5-beta.4
|
|
40
|
+
* devDependencies
|
|
41
|
+
* @aigne/test-utils bumped to 0.5.58-beta.4
|
|
42
|
+
|
|
3
43
|
## [1.53.1-beta.4](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.53.1-beta.3...cli-v1.53.1-beta.4) (2025-11-05)
|
|
4
44
|
|
|
5
45
|
|
package/dist/commands/app/app.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { homedir } from "node:os";
|
|
2
2
|
import { join } from "node:path";
|
|
3
|
+
import { CHAT_MODEL_OPTIONS } from "@aigne/cli/constants.js";
|
|
3
4
|
import { LogLevel, logger } from "@aigne/core/utils/logger.js";
|
|
5
|
+
import { pick } from "@aigne/core/utils/type-utils.js";
|
|
4
6
|
import chalk from "chalk";
|
|
5
7
|
import yargs from "yargs";
|
|
6
8
|
import { hideBin } from "yargs/helpers";
|
|
@@ -27,7 +29,7 @@ export async function runAppCLI({ appName = process.env.AIGNE_APP_NAME, appPacka
|
|
|
27
29
|
beta: appUseBetaVersion,
|
|
28
30
|
dir,
|
|
29
31
|
install: true,
|
|
30
|
-
modelOptions: options,
|
|
32
|
+
modelOptions: pick(options, CHAT_MODEL_OPTIONS),
|
|
31
33
|
imageModelOptions: { model: options.imageModel },
|
|
32
34
|
skipModelLoading: (options.help || options.h || options.version || options.v) === true,
|
|
33
35
|
});
|
package/dist/commands/run.js
CHANGED
|
@@ -2,14 +2,17 @@ import { cp, mkdir, rm } from "node:fs/promises";
|
|
|
2
2
|
import { homedir } from "node:os";
|
|
3
3
|
import { isAbsolute, join, resolve } from "node:path";
|
|
4
4
|
import { exists } from "@aigne/agent-library/utils/fs.js";
|
|
5
|
-
import {
|
|
5
|
+
import { logger } from "@aigne/core/utils/logger.js";
|
|
6
|
+
import { flat, isNonNullable, pick } from "@aigne/core/utils/type-utils.js";
|
|
6
7
|
import { Listr, PRESET_TIMER } from "@aigne/listr2";
|
|
7
8
|
import { config } from "dotenv-flow";
|
|
8
9
|
import yargs from "yargs";
|
|
10
|
+
import { CHAT_MODEL_OPTIONS } from "../constants.js";
|
|
9
11
|
import { isV1Package, toAIGNEPackage } from "../utils/agent-v1.js";
|
|
10
12
|
import { downloadAndExtract } from "../utils/download.js";
|
|
11
13
|
import { loadAIGNE } from "../utils/load-aigne.js";
|
|
12
14
|
import { isUrl } from "../utils/url.js";
|
|
15
|
+
import { withRunAgentCommonOptions } from "../utils/yargs.js";
|
|
13
16
|
import { agentCommandModule, cliAgentCommandModule } from "./app/agent.js";
|
|
14
17
|
export function createRunCommand({ aigneFilePath, } = {}) {
|
|
15
18
|
return {
|
|
@@ -37,7 +40,13 @@ export function createRunCommand({ aigneFilePath, } = {}) {
|
|
|
37
40
|
options.path = undefined;
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
|
-
|
|
43
|
+
// Parse model options for loading application
|
|
44
|
+
const opts = withRunAgentCommonOptions(yargs(process.argv).help(false).version(false).strict(false)).parseSync();
|
|
45
|
+
logger.level = opts.logLevel;
|
|
46
|
+
const { aigne } = await loadApplication(aigneFilePath || options.path || ".", {
|
|
47
|
+
modelOptions: pick(opts, CHAT_MODEL_OPTIONS),
|
|
48
|
+
imageModelOptions: { model: opts.imageModel },
|
|
49
|
+
});
|
|
41
50
|
const subYargs = yargs().scriptName("").usage("aigne run <path> <agent> [...options]");
|
|
42
51
|
if (aigne.cli.chat) {
|
|
43
52
|
subYargs.command({
|
|
@@ -87,7 +96,7 @@ export function createRunCommand({ aigneFilePath, } = {}) {
|
|
|
87
96
|
},
|
|
88
97
|
};
|
|
89
98
|
}
|
|
90
|
-
async function loadApplication(path) {
|
|
99
|
+
async function loadApplication(path, options = {}) {
|
|
91
100
|
const { cacheDir, dir } = prepareDirs(path);
|
|
92
101
|
if (cacheDir) {
|
|
93
102
|
await new Listr([
|
|
@@ -109,7 +118,7 @@ async function loadApplication(path) {
|
|
|
109
118
|
}
|
|
110
119
|
// Load env files in the aigne directory
|
|
111
120
|
config({ path: dir, silent: true });
|
|
112
|
-
const aigne = await loadAIGNE({ path: dir });
|
|
121
|
+
const aigne = await loadAIGNE({ ...options, path: dir });
|
|
113
122
|
return { aigne, path: dir };
|
|
114
123
|
}
|
|
115
124
|
async function downloadPackage(url, cacheDir) {
|
package/dist/constants.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ import { DefaultMemory } from "@aigne/default-memory";
|
|
|
2
2
|
export declare const AIGNE_CLI_VERSION: any;
|
|
3
3
|
export declare const availableMemories: (typeof DefaultMemory)[];
|
|
4
4
|
export declare const AIGNE_HUB_CREDITS_NOT_ENOUGH_ERROR_TYPE = "NOT_ENOUGH";
|
|
5
|
+
export declare const CHAT_MODEL_OPTIONS: string[];
|
package/dist/constants.js
CHANGED
|
@@ -5,3 +5,15 @@ const require = createRequire(import.meta.url);
|
|
|
5
5
|
export const AIGNE_CLI_VERSION = require("../package.json").version;
|
|
6
6
|
export const availableMemories = [DefaultMemory, AgenticMemory];
|
|
7
7
|
export const AIGNE_HUB_CREDITS_NOT_ENOUGH_ERROR_TYPE = "NOT_ENOUGH";
|
|
8
|
+
export const CHAT_MODEL_OPTIONS = [
|
|
9
|
+
"aigneHubUrl",
|
|
10
|
+
"model",
|
|
11
|
+
"temperature",
|
|
12
|
+
"topP",
|
|
13
|
+
"frequencyPenalty",
|
|
14
|
+
"presencePenalty",
|
|
15
|
+
"parallelToolCalls",
|
|
16
|
+
"modalities",
|
|
17
|
+
"preferInputFileType",
|
|
18
|
+
"reasoningEffort",
|
|
19
|
+
];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { ChatModel,
|
|
1
|
+
import type { ChatModel, ChatModelInputOptionsWithGetter, ImageModel, ImageModelInputOptionsWithGetter } from "@aigne/core";
|
|
2
2
|
import type { LoadCredentialOptions } from "./type.js";
|
|
3
3
|
export declare function maskApiKey(apiKey?: string): string | undefined;
|
|
4
4
|
export declare const formatModelName: (model: string, inquirerPrompt: NonNullable<LoadCredentialOptions["inquirerPromptFn"]>) => Promise<{
|
|
5
5
|
provider: string;
|
|
6
6
|
model?: string;
|
|
7
7
|
}>;
|
|
8
|
-
export declare function loadChatModel(options?:
|
|
9
|
-
export declare function loadImageModel(options?:
|
|
8
|
+
export declare function loadChatModel(options?: ChatModelInputOptionsWithGetter & LoadCredentialOptions): Promise<ChatModel>;
|
|
9
|
+
export declare function loadImageModel(options?: ImageModelInputOptionsWithGetter & LoadCredentialOptions): Promise<ImageModel>;
|
|
@@ -61,7 +61,7 @@ export const formatModelName = async (model, inquirerPrompt) => {
|
|
|
61
61
|
return { provider: AIGNE_HUB_PROVIDER, model: `${provider}/${name}` };
|
|
62
62
|
};
|
|
63
63
|
export async function loadChatModel(options) {
|
|
64
|
-
const { provider, model } = await formatModelName(options?.model || process.env.MODEL || "", options?.inquirerPromptFn ??
|
|
64
|
+
const { provider, model } = await formatModelName((typeof options?.model === "string" ? options.model : undefined) || process.env.MODEL || "", options?.inquirerPromptFn ??
|
|
65
65
|
inquirer.prompt);
|
|
66
66
|
const { match, all } = findModel(provider);
|
|
67
67
|
if (!match) {
|
|
@@ -78,7 +78,9 @@ export async function loadChatModel(options) {
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
export async function loadImageModel(options) {
|
|
81
|
-
const { provider, model } = await formatModelName(options?.model
|
|
81
|
+
const { provider, model } = await formatModelName((typeof options?.model === "string" ? options.model : undefined) ||
|
|
82
|
+
process.env.IMAGE_MODEL ||
|
|
83
|
+
"", options?.inquirerPromptFn ??
|
|
82
84
|
inquirer.prompt);
|
|
83
85
|
const { match, all } = findImageModel(provider);
|
|
84
86
|
if (!match) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.54.0-beta.5",
|
|
4
4
|
"description": "Your command center for agent development",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -89,14 +89,14 @@
|
|
|
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-system-fs": "^1.0.4-beta.
|
|
93
|
-
"@aigne/
|
|
94
|
-
"@aigne/agentic-memory": "^1.0.51-beta.
|
|
95
|
-
"@aigne/aigne-hub": "^0.10.5-beta.
|
|
96
|
-
"@aigne/
|
|
97
|
-
"@aigne/
|
|
98
|
-
"@aigne/observability-api": "^0.11.5-beta.
|
|
99
|
-
"@aigne/
|
|
92
|
+
"@aigne/afs-system-fs": "^1.0.4-beta.6",
|
|
93
|
+
"@aigne/core": "^1.66.0-beta.4",
|
|
94
|
+
"@aigne/agentic-memory": "^1.0.51-beta.5",
|
|
95
|
+
"@aigne/aigne-hub": "^0.10.5-beta.5",
|
|
96
|
+
"@aigne/default-memory": "^1.2.14-beta.5",
|
|
97
|
+
"@aigne/openai": "^0.16.5-beta.5",
|
|
98
|
+
"@aigne/observability-api": "^0.11.5-beta.3",
|
|
99
|
+
"@aigne/agent-library": "^1.21.51-beta.5"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@inquirer/testing": "^2.1.50",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"rimraf": "^6.0.1",
|
|
115
115
|
"typescript": "^5.9.2",
|
|
116
116
|
"ufo": "^1.6.1",
|
|
117
|
-
"@aigne/test-utils": "^0.5.58-beta.
|
|
117
|
+
"@aigne/test-utils": "^0.5.58-beta.5"
|
|
118
118
|
},
|
|
119
119
|
"scripts": {
|
|
120
120
|
"lint": "tsc --noEmit",
|