@aigne/cli 1.49.0-beta.9 → 1.49.0

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,29 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.49.0](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.49.0-beta.10...cli-v1.49.0) (2025-09-27)
4
+
5
+
6
+ ### Dependencies
7
+
8
+ * The following workspace dependencies were updated
9
+ * dependencies
10
+ * @aigne/agent-library bumped to 1.21.46
11
+ * @aigne/agentic-memory bumped to 1.0.46
12
+ * @aigne/aigne-hub bumped to 0.10.0
13
+ * @aigne/core bumped to 1.61.0
14
+ * @aigne/default-memory bumped to 1.2.9
15
+ * @aigne/observability-api bumped to 0.11.0
16
+ * @aigne/openai bumped to 0.16.0
17
+ * devDependencies
18
+ * @aigne/test-utils bumped to 0.5.53
19
+
20
+ ## [1.49.0-beta.10](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.49.0-beta.9...cli-v1.49.0-beta.10) (2025-09-27)
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * **cli:** resolve input schema not working for run command ([#557](https://github.com/AIGNE-io/aigne-framework/issues/557)) ([6fa12b3](https://github.com/AIGNE-io/aigne-framework/commit/6fa12b3e068aaec28cf204c3a3f7c471bd2827ae))
26
+
3
27
  ## [1.49.0-beta.9](https://github.com/AIGNE-io/aigne-framework/compare/cli-v1.49.0-beta.8...cli-v1.49.0-beta.9) (2025-09-26)
4
28
 
5
29
 
@@ -1,6 +1,5 @@
1
1
  import type { CommandModule } from "yargs";
2
- import { type LoadAIGNEInChildProcessResult } from "../utils/workers/run-aigne-in-child-process.js";
3
- import type { AgentInChildProcess } from "../utils/workers/run-aigne-in-child-process-worker.js";
2
+ import { type AgentInChildProcess, type LoadAIGNEInChildProcessResult } from "../utils/workers/run-aigne-in-child-process.js";
4
3
  import { type AgentRunCommonOptions } from "../utils/yargs.js";
5
4
  export declare function createAppCommands(): CommandModule[];
6
5
  export declare const agentCommandModule: ({ dir, agent, }: {
@@ -10,6 +10,7 @@ import { isV1Package, toAIGNEPackage } from "../utils/agent-v1.js";
10
10
  import { downloadAndExtract } from "../utils/download.js";
11
11
  import { loadAIGNE } from "../utils/load-aigne.js";
12
12
  import { isUrl } from "../utils/url.js";
13
+ import { serializeAgent } from "../utils/workers/run-aigne-in-child-process.js";
13
14
  import { agentCommandModule } from "./app.js";
14
15
  export function createRunCommand({ aigneFilePath, } = {}) {
15
16
  return {
@@ -41,14 +42,14 @@ export function createRunCommand({ aigneFilePath, } = {}) {
41
42
  const subYargs = yargs().scriptName("").usage("aigne run <path> <agent> [...options]");
42
43
  if (aigne.cli.chat) {
43
44
  subYargs.command({
44
- ...agentCommandModule({ dir: path, agent: aigne.cli.chat }),
45
+ ...agentCommandModule({ dir: path, agent: serializeAgent(aigne.cli.chat) }),
45
46
  command: "$0",
46
47
  });
47
48
  }
48
49
  // Allow user to run all of agents in the AIGNE instances
49
50
  const allAgents = flat(aigne.cli.agents, aigne.agents, aigne.skills, aigne.cli.chat, aigne.mcpServer.agents);
50
51
  for (const agent of allAgents) {
51
- subYargs.command(agentCommandModule({ dir: path, agent }));
52
+ subYargs.command(agentCommandModule({ dir: path, agent: serializeAgent(agent) }));
52
53
  }
53
54
  const argv = process.argv.slice(aigneFilePath ? 3 : 2);
54
55
  if (argv[0] === "run")
@@ -102,7 +103,7 @@ async function loadApplication(path) {
102
103
  }
103
104
  // Load env files in the aigne directory
104
105
  config({ path: dir, silent: true });
105
- const aigne = await loadAIGNE({ path: dir });
106
+ const aigne = await loadAIGNE({ path: dir, printTips: false });
106
107
  return { aigne, path: dir };
107
108
  }
108
109
  async function downloadPackage(url, cacheDir) {
@@ -7,7 +7,8 @@ export interface RunOptions extends AgentRunCommonOptions {
7
7
  cacheDir?: string;
8
8
  aigneHubUrl?: string;
9
9
  }
10
- export declare function loadAIGNE({ path, modelOptions, }: {
10
+ export declare function loadAIGNE({ path, modelOptions, printTips, }: {
11
11
  path?: string;
12
12
  modelOptions?: ChatModelInputOptions & LoadCredentialOptions;
13
+ printTips?: boolean;
13
14
  }): Promise<AIGNE<import("@aigne/core").UserContext>>;
@@ -8,9 +8,6 @@ import { loadChatModel, maskApiKey } from "./aigne-hub/model.js";
8
8
  import { getUrlOrigin } from "./get-url-origin.js";
9
9
  let printed = false;
10
10
  async function printChatModelInfoBox(model) {
11
- if (printed)
12
- return;
13
- printed = true;
14
11
  const credential = await model.credential;
15
12
  const lines = [`${chalk.cyan("Provider")}: ${chalk.green(model.name.replace("ChatModel", ""))}`];
16
13
  if (credential?.model) {
@@ -25,7 +22,7 @@ async function printChatModelInfoBox(model) {
25
22
  console.log(boxen(lines.join("\n"), { padding: 1, borderStyle: "classic", borderColor: "cyan" }));
26
23
  console.log("");
27
24
  }
28
- export async function loadAIGNE({ path, modelOptions, }) {
25
+ export async function loadAIGNE({ path, modelOptions, printTips = true, }) {
29
26
  let aigne;
30
27
  if (path) {
31
28
  aigne = await AIGNE.load(path, {
@@ -42,9 +39,12 @@ export async function loadAIGNE({ path, modelOptions, }) {
42
39
  const chatModel = await loadChatModel({ ...modelOptions });
43
40
  aigne = new AIGNE({ model: chatModel });
44
41
  }
45
- console.log(`${chalk.grey("TIPS:")} run ${chalk.cyan("aigne observe")} to start the observability server.\n`);
46
- if (aigne.model) {
47
- await printChatModelInfoBox(aigne.model);
42
+ if (printTips && !printed) {
43
+ printed = true;
44
+ console.log(`${chalk.grey("TIPS:")} run ${chalk.cyan("aigne observe")} to start the observability server.\n`);
45
+ if (aigne.model) {
46
+ await printChatModelInfoBox(aigne.model);
47
+ }
48
48
  }
49
49
  return aigne;
50
50
  }
@@ -1,9 +1,6 @@
1
- import { type Agent, AIGNE, type Message } from "@aigne/core";
1
+ import { AIGNE, type Message } from "@aigne/core";
2
2
  import { type AgentRunCommonOptions } from "../yargs.js";
3
- export interface AgentInChildProcess extends Pick<Agent, "name" | "description" | "alias"> {
4
- inputSchema: object;
5
- outputSchema: object;
6
- }
3
+ import { type AgentInChildProcess } from "./run-aigne-in-child-process.js";
7
4
  export declare function loadAIGNEInChildProcess(...args: Parameters<typeof AIGNE.load>): Promise<{
8
5
  agents?: AgentInChildProcess[];
9
6
  cli?: {
@@ -1,9 +1,9 @@
1
1
  import assert from "node:assert";
2
2
  import { AIGNE } from "@aigne/core";
3
- import { zodToJsonSchema } from "zod-to-json-schema";
4
3
  import { loadAIGNE } from "../load-aigne.js";
5
4
  import { runAgentWithAIGNE } from "../run-with-aigne.js";
6
5
  import { parseAgentInput } from "../yargs.js";
6
+ import { serializeAgent } from "./run-aigne-in-child-process.js";
7
7
  const METHODS = {
8
8
  loadAIGNE: loadAIGNEInChildProcess,
9
9
  invokeCLIAgentFromDir: invokeCLIAgentFromDirInChildProcess,
@@ -32,15 +32,6 @@ process.on("message", async ({ method, args }) => {
32
32
  process.exit(0);
33
33
  }
34
34
  });
35
- function serializeAgent(agent) {
36
- return {
37
- name: agent.name,
38
- description: agent.description,
39
- alias: agent.alias,
40
- inputSchema: zodToJsonSchema(agent.inputSchema),
41
- outputSchema: zodToJsonSchema(agent.outputSchema),
42
- };
43
- }
44
35
  export async function loadAIGNEInChildProcess(...args) {
45
36
  const aigne = await AIGNE.load(...args);
46
37
  return {
@@ -1,5 +1,12 @@
1
+ import type { Agent } from "@aigne/core";
2
+ import type { JsonSchema } from "@aigne/json-schema-to-zod";
1
3
  import type { invokeCLIAgentFromDirInChildProcess, loadAIGNEInChildProcess } from "./run-aigne-in-child-process-worker.js";
2
4
  export type LoadAIGNEInChildProcessResult = Awaited<ReturnType<typeof loadAIGNEInChildProcess>>;
5
+ export interface AgentInChildProcess extends Pick<Agent, "name" | "description" | "alias"> {
6
+ inputSchema: JsonSchema;
7
+ outputSchema: JsonSchema;
8
+ }
9
+ export declare function serializeAgent(agent: Agent): AgentInChildProcess;
3
10
  export interface ChildProcessAIGNEMethods {
4
11
  loadAIGNE: typeof loadAIGNEInChildProcess;
5
12
  invokeCLIAgentFromDir: typeof invokeCLIAgentFromDirInChildProcess;
@@ -1,6 +1,16 @@
1
1
  import { fork } from "node:child_process";
2
2
  import { dirname, join } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
+ import { zodToJsonSchema } from "zod-to-json-schema";
5
+ export function serializeAgent(agent) {
6
+ return {
7
+ name: agent.name,
8
+ description: agent.description,
9
+ alias: agent.alias,
10
+ inputSchema: zodToJsonSchema(agent.inputSchema),
11
+ outputSchema: zodToJsonSchema(agent.outputSchema),
12
+ };
13
+ }
4
14
  export async function runAIGNEInChildProcess(method, ...args) {
5
15
  return await new Promise((resolve, reject) => {
6
16
  const child = fork(join(dirname(fileURLToPath(import.meta.url)), "./run-aigne-in-child-process-worker.js"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/cli",
3
- "version": "1.49.0-beta.9",
3
+ "version": "1.49.0",
4
4
  "description": "Your command center for agent development",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -84,13 +84,13 @@
84
84
  "yoctocolors-cjs": "^2.1.3",
85
85
  "zod": "^3.25.67",
86
86
  "zod-to-json-schema": "^3.24.6",
87
- "@aigne/agent-library": "^1.21.46-beta.9",
88
- "@aigne/core": "^1.61.0-beta.8",
89
- "@aigne/aigne-hub": "^0.10.0-beta.9",
90
- "@aigne/agentic-memory": "^1.0.46-beta.9",
91
- "@aigne/default-memory": "^1.2.9-beta.9",
92
- "@aigne/observability-api": "^0.11.0-beta.1",
93
- "@aigne/openai": "^0.16.0-beta.9"
87
+ "@aigne/agent-library": "^1.21.46",
88
+ "@aigne/agentic-memory": "^1.0.46",
89
+ "@aigne/aigne-hub": "^0.10.0",
90
+ "@aigne/core": "^1.61.0",
91
+ "@aigne/default-memory": "^1.2.9",
92
+ "@aigne/openai": "^0.16.0",
93
+ "@aigne/observability-api": "^0.11.0"
94
94
  },
95
95
  "devDependencies": {
96
96
  "@inquirer/testing": "^2.1.50",
@@ -107,7 +107,7 @@
107
107
  "rimraf": "^6.0.1",
108
108
  "typescript": "^5.9.2",
109
109
  "ufo": "^1.6.1",
110
- "@aigne/test-utils": "^0.5.53-beta.8"
110
+ "@aigne/test-utils": "^0.5.53"
111
111
  },
112
112
  "scripts": {
113
113
  "lint": "tsc --noEmit",