@aigne/cli 1.50.1-beta.2 → 1.51.0-beta.3
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 +49 -0
- package/dist/commands/app.d.ts +2 -1
- package/dist/commands/app.js +3 -3
- package/dist/commands/run.js +1 -1
- package/dist/utils/load-aigne.js +8 -0
- package/dist/utils/workers/run-aigne-in-child-process-worker.js +1 -1
- package/dist/utils/workers/run-aigne-in-child-process.js +4 -0
- package/dist/utils/yargs.js +2 -2
- package/package.json +10 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,54 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.51.0-beta.3](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.50.1-beta.3...cli-v1.51.0-beta.3) (2025-10-11)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **afs:** add module system fs for afs ([#594](https://github.com/AIGNE-io/aigne-framework/issues/594)) ([83c7b65](https://github.com/AIGNE-io/aigne-framework/commit/83c7b6555d21c606a5005eb05f6686882fb8ffa3))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* improve exit event handling for cli ([#609](https://github.com/AIGNE-io/aigne-framework/issues/609)) ([00211f8](https://github.com/AIGNE-io/aigne-framework/commit/00211f8ad4686ea673ea8e2eac5b850bcbd8c1f6))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Dependencies
|
|
17
|
+
|
|
18
|
+
* The following workspace dependencies were updated
|
|
19
|
+
* dependencies
|
|
20
|
+
* @aigne/afs-system-fs bumped to 1.0.0
|
|
21
|
+
* @aigne/agent-library bumped to 1.21.48-beta.3
|
|
22
|
+
* @aigne/agentic-memory bumped to 1.0.48-beta.3
|
|
23
|
+
* @aigne/aigne-hub bumped to 0.10.2-beta.3
|
|
24
|
+
* @aigne/core bumped to 1.63.0-beta.3
|
|
25
|
+
* @aigne/default-memory bumped to 1.2.11-beta.3
|
|
26
|
+
* @aigne/observability-api bumped to 0.11.2-beta.1
|
|
27
|
+
* @aigne/openai bumped to 0.16.2-beta.3
|
|
28
|
+
* devDependencies
|
|
29
|
+
* @aigne/test-utils bumped to 0.5.55-beta.3
|
|
30
|
+
|
|
31
|
+
## [1.50.1-beta.3](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.50.1-beta.2...cli-v1.50.1-beta.3) (2025-10-09)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* input schema of AI agent should includes input key and input file key ([#600](https://github.com/AIGNE-io/aigne-framework/issues/600)) ([b4ca076](https://github.com/AIGNE-io/aigne-framework/commit/b4ca076d6b4a1a1ecb8d4ebb008abd0d7561aadd))
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Dependencies
|
|
40
|
+
|
|
41
|
+
* The following workspace dependencies were updated
|
|
42
|
+
* dependencies
|
|
43
|
+
* @aigne/agent-library bumped to 1.21.48-beta.2
|
|
44
|
+
* @aigne/agentic-memory bumped to 1.0.48-beta.2
|
|
45
|
+
* @aigne/aigne-hub bumped to 0.10.2-beta.2
|
|
46
|
+
* @aigne/core bumped to 1.63.0-beta.2
|
|
47
|
+
* @aigne/default-memory bumped to 1.2.11-beta.2
|
|
48
|
+
* @aigne/openai bumped to 0.16.2-beta.2
|
|
49
|
+
* devDependencies
|
|
50
|
+
* @aigne/test-utils bumped to 0.5.55-beta.2
|
|
51
|
+
|
|
3
52
|
## [1.50.1-beta.2](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.50.1-beta.1...cli-v1.50.1-beta.2) (2025-10-09)
|
|
4
53
|
|
|
5
54
|
|
package/dist/commands/app.d.ts
CHANGED
|
@@ -4,9 +4,10 @@ import { type AgentRunCommonOptions } from "../utils/yargs.js";
|
|
|
4
4
|
export declare function createAppCommands({ argv }?: {
|
|
5
5
|
argv?: string[];
|
|
6
6
|
}): CommandModule[];
|
|
7
|
-
export declare const agentCommandModule: ({ dir, agent, }: {
|
|
7
|
+
export declare const agentCommandModule: ({ dir, agent, chat, }: {
|
|
8
8
|
dir: string;
|
|
9
9
|
agent: AgentInChildProcess;
|
|
10
|
+
chat?: boolean;
|
|
10
11
|
}) => CommandModule<unknown, AgentRunCommonOptions>;
|
|
11
12
|
export declare const cliAgentCommandModule: ({ dir, parent, cliAgent, }: {
|
|
12
13
|
dir: string;
|
package/dist/commands/app.js
CHANGED
|
@@ -50,7 +50,7 @@ export function createAppCommands({ argv } = {}) {
|
|
|
50
50
|
});
|
|
51
51
|
if (aigne.cli?.chat) {
|
|
52
52
|
y.command({
|
|
53
|
-
...agentCommandModule({ dir, agent: aigne.cli.chat }),
|
|
53
|
+
...agentCommandModule({ dir, agent: aigne.cli.chat, chat: true }),
|
|
54
54
|
command: "$0",
|
|
55
55
|
});
|
|
56
56
|
}
|
|
@@ -133,7 +133,7 @@ const upgradeCommandModule = ({ packageName, dir, }) => ({
|
|
|
133
133
|
console.log(`\n✅ ${packageName} is already at the latest version (${app.version})`);
|
|
134
134
|
},
|
|
135
135
|
});
|
|
136
|
-
export const agentCommandModule = ({ dir, agent, }) => {
|
|
136
|
+
export const agentCommandModule = ({ dir, agent, chat, }) => {
|
|
137
137
|
return {
|
|
138
138
|
command: agent.name,
|
|
139
139
|
aliases: agent.alias || [],
|
|
@@ -147,7 +147,7 @@ export const agentCommandModule = ({ dir, agent, }) => {
|
|
|
147
147
|
await runAIGNEInChildProcess("invokeCLIAgentFromDir", {
|
|
148
148
|
dir,
|
|
149
149
|
agent: agent.name,
|
|
150
|
-
input: options,
|
|
150
|
+
input: { ...options, chat: chat ?? options.chat },
|
|
151
151
|
});
|
|
152
152
|
process.exit(0);
|
|
153
153
|
},
|
package/dist/commands/run.js
CHANGED
|
@@ -43,7 +43,7 @@ export function createRunCommand({ aigneFilePath, } = {}) {
|
|
|
43
43
|
const subYargs = yargs().scriptName("").usage("aigne run <path> <agent> [...options]");
|
|
44
44
|
if (aigne.cli.chat) {
|
|
45
45
|
subYargs.command({
|
|
46
|
-
...agentCommandModule({ dir: path, agent: serializeAgent(aigne.cli.chat) }),
|
|
46
|
+
...agentCommandModule({ dir: path, agent: serializeAgent(aigne.cli.chat), chat: true }),
|
|
47
47
|
command: "$0",
|
|
48
48
|
});
|
|
49
49
|
}
|
package/dist/utils/load-aigne.js
CHANGED
|
@@ -36,6 +36,14 @@ export async function loadAIGNE({ path, modelOptions, imageModelOptions, printTi
|
|
|
36
36
|
...omitBy(imageModelOptions ?? {}, (v) => isNil(v)),
|
|
37
37
|
model: imageModelOptions?.model || process.env.IMAGE_MODEL || options?.model,
|
|
38
38
|
}),
|
|
39
|
+
afs: {
|
|
40
|
+
availableModules: [
|
|
41
|
+
{
|
|
42
|
+
module: "system-fs",
|
|
43
|
+
create: (options) => import("@aigne/afs-system-fs").then((m) => new m.SystemFS(options)),
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
},
|
|
39
47
|
});
|
|
40
48
|
}
|
|
41
49
|
else {
|
|
@@ -14,6 +14,7 @@ export function serializeAgent(agent) {
|
|
|
14
14
|
}
|
|
15
15
|
export async function runAIGNEInChildProcess(method, ...args) {
|
|
16
16
|
return await new Promise((resolve, reject) => {
|
|
17
|
+
let completed = false;
|
|
17
18
|
const child = fork(join(dirname(fileURLToPath(import.meta.url)), "./run-aigne-in-child-process-worker.js"));
|
|
18
19
|
child.on("message", (event) => {
|
|
19
20
|
if (event.method !== method)
|
|
@@ -22,8 +23,11 @@ export async function runAIGNEInChildProcess(method, ...args) {
|
|
|
22
23
|
reject(new Error(event.error.message));
|
|
23
24
|
else
|
|
24
25
|
resolve(event.result);
|
|
26
|
+
completed = true;
|
|
25
27
|
});
|
|
26
28
|
child.on("exit", (code) => {
|
|
29
|
+
if (!completed)
|
|
30
|
+
process.exit(code);
|
|
27
31
|
reject(new Error(`Child process exited with code ${code}`));
|
|
28
32
|
});
|
|
29
33
|
child.send({ method, args, logLevel: logger.level });
|
package/dist/utils/yargs.js
CHANGED
|
@@ -6,7 +6,7 @@ import { promisify } from "node:util";
|
|
|
6
6
|
import { availableImageModels, availableModels, } from "@aigne/aigne-hub";
|
|
7
7
|
import { AIAgent, ChatModel, DEFAULT_OUTPUT_KEY, readAllString, } from "@aigne/core";
|
|
8
8
|
import { getLevelFromEnv, LogLevel, logger } from "@aigne/core/utils/logger.js";
|
|
9
|
-
import { pick, tryOrThrow } from "@aigne/core/utils/type-utils.js";
|
|
9
|
+
import { flat, pick, tryOrThrow } from "@aigne/core/utils/type-utils.js";
|
|
10
10
|
import { parse } from "yaml";
|
|
11
11
|
import z, { ZodAny, ZodArray, ZodBoolean, ZodError, ZodNumber, ZodObject, ZodString, ZodType, ZodUnknown, } from "zod";
|
|
12
12
|
const MODEL_OPTIONS_GROUP_NAME = "Model Options";
|
|
@@ -149,7 +149,7 @@ export async function parseAgentInput(i, agent) {
|
|
|
149
149
|
})));
|
|
150
150
|
if (agent instanceof AIAgent && agent.inputFileKey) {
|
|
151
151
|
const files = [];
|
|
152
|
-
for (const file of i.inputFile ?? []) {
|
|
152
|
+
for (const file of flat(i.inputFile, i[agent.inputFileKey]) ?? []) {
|
|
153
153
|
const raw = await readFile(file.replace(/^@/, ""), "base64");
|
|
154
154
|
const filename = basename(file);
|
|
155
155
|
const mimeType = (await ChatModel.getMimeType(filename)) || "application/octet-stream";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.51.0-beta.3",
|
|
4
4
|
"description": "Your command center for agent development",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -89,13 +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/
|
|
93
|
-
"@aigne/
|
|
94
|
-
"@aigne/aigne-hub": "^0.10.2-beta.
|
|
95
|
-
"@aigne/
|
|
96
|
-
"@aigne/
|
|
97
|
-
"@aigne/
|
|
98
|
-
"@aigne/
|
|
92
|
+
"@aigne/afs-system-fs": "^1.0.0",
|
|
93
|
+
"@aigne/agentic-memory": "^1.0.48-beta.3",
|
|
94
|
+
"@aigne/aigne-hub": "^0.10.2-beta.3",
|
|
95
|
+
"@aigne/core": "^1.63.0-beta.3",
|
|
96
|
+
"@aigne/agent-library": "^1.21.48-beta.3",
|
|
97
|
+
"@aigne/default-memory": "^1.2.11-beta.3",
|
|
98
|
+
"@aigne/observability-api": "^0.11.2-beta.1",
|
|
99
|
+
"@aigne/openai": "^0.16.2-beta.3"
|
|
99
100
|
},
|
|
100
101
|
"devDependencies": {
|
|
101
102
|
"@inquirer/testing": "^2.1.50",
|
|
@@ -112,7 +113,7 @@
|
|
|
112
113
|
"rimraf": "^6.0.1",
|
|
113
114
|
"typescript": "^5.9.2",
|
|
114
115
|
"ufo": "^1.6.1",
|
|
115
|
-
"@aigne/test-utils": "^0.5.55-beta.
|
|
116
|
+
"@aigne/test-utils": "^0.5.55-beta.3"
|
|
116
117
|
},
|
|
117
118
|
"scripts": {
|
|
118
119
|
"lint": "tsc --noEmit",
|