@aigne/core 1.71.0-beta.5 → 1.71.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 +19 -0
- package/lib/cjs/agents/agent.d.ts +2 -0
- package/lib/cjs/agents/agent.js +6 -0
- package/lib/cjs/utils/json-schema.d.ts +1 -0
- package/lib/cjs/utils/json-schema.js +6 -0
- package/lib/dts/agents/agent.d.ts +2 -0
- package/lib/dts/utils/json-schema.d.ts +1 -0
- package/lib/esm/agents/agent.d.ts +2 -0
- package/lib/esm/agents/agent.js +7 -1
- package/lib/esm/utils/json-schema.d.ts +1 -0
- package/lib/esm/utils/json-schema.js +5 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.71.0](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.71.0-beta.6...core-v1.71.0) (2025-12-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* The following workspace dependencies were updated
|
|
9
|
+
* dependencies
|
|
10
|
+
* @aigne/afs bumped to 1.3.0
|
|
11
|
+
* @aigne/afs-history bumped to 1.1.3
|
|
12
|
+
* @aigne/observability-api bumped to 0.11.13
|
|
13
|
+
* @aigne/platform-helpers bumped to 0.6.6
|
|
14
|
+
|
|
15
|
+
## [1.71.0-beta.6](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.71.0-beta.5...core-v1.71.0-beta.6) (2025-12-11)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **orchestrator:** support custom input schema for planner/worker/completer ([#823](https://github.com/AIGNE-io/aigne-framework/issues/823)) ([3d26f8b](https://github.com/AIGNE-io/aigne-framework/commit/3d26f8bac8b679010f25d9e4eb59fc6e80afda4c))
|
|
21
|
+
|
|
3
22
|
## [1.71.0-beta.5](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.71.0-beta.4...core-v1.71.0-beta.5) (2025-12-11)
|
|
4
23
|
|
|
5
24
|
|
|
@@ -303,6 +303,7 @@ export declare abstract class Agent<I extends Message = any, O extends Message =
|
|
|
303
303
|
* @returns The Zod type definition for input data
|
|
304
304
|
*/
|
|
305
305
|
get inputSchema(): ZodType<I>;
|
|
306
|
+
get inputKeys(): string[];
|
|
306
307
|
/**
|
|
307
308
|
* Get the output data schema for this agent
|
|
308
309
|
*
|
|
@@ -312,6 +313,7 @@ export declare abstract class Agent<I extends Message = any, O extends Message =
|
|
|
312
313
|
* @returns The Zod type definition for output data
|
|
313
314
|
*/
|
|
314
315
|
get outputSchema(): ZodType<O>;
|
|
316
|
+
get outputKeys(): string[];
|
|
315
317
|
/**
|
|
316
318
|
* Whether to include the original input in the output
|
|
317
319
|
*
|
package/lib/cjs/agents/agent.js
CHANGED
|
@@ -278,6 +278,9 @@ class Agent {
|
|
|
278
278
|
checkAgentInputOutputSchema(schema);
|
|
279
279
|
return schema.passthrough();
|
|
280
280
|
}
|
|
281
|
+
get inputKeys() {
|
|
282
|
+
return (0, json_schema_js_1.getZodObjectKeys)(this.inputSchema);
|
|
283
|
+
}
|
|
281
284
|
/**
|
|
282
285
|
* Get the output data schema for this agent
|
|
283
286
|
*
|
|
@@ -292,6 +295,9 @@ class Agent {
|
|
|
292
295
|
checkAgentInputOutputSchema(schema);
|
|
293
296
|
return schema.passthrough();
|
|
294
297
|
}
|
|
298
|
+
get outputKeys() {
|
|
299
|
+
return (0, json_schema_js_1.getZodObjectKeys)(this.outputSchema);
|
|
300
|
+
}
|
|
295
301
|
/**
|
|
296
302
|
* Whether to include the original input in the output
|
|
297
303
|
*
|
|
@@ -12,3 +12,4 @@ export declare function parseJSON(json: string): any;
|
|
|
12
12
|
export declare function ensureZodUnionArray<T extends z.ZodType>(union: T[]): [T, T, ...T[]];
|
|
13
13
|
export declare function isZodSchema(schema: ZodType): schema is ZodType;
|
|
14
14
|
export declare const wrapAutoParseJsonSchema: <T extends ZodType>(schema: T) => T;
|
|
15
|
+
export declare function getZodObjectKeys(schema: ZodType): string[];
|
|
@@ -5,6 +5,7 @@ exports.outputSchemaToResponseFormatSchema = outputSchemaToResponseFormatSchema;
|
|
|
5
5
|
exports.parseJSON = parseJSON;
|
|
6
6
|
exports.ensureZodUnionArray = ensureZodUnionArray;
|
|
7
7
|
exports.isZodSchema = isZodSchema;
|
|
8
|
+
exports.getZodObjectKeys = getZodObjectKeys;
|
|
8
9
|
const zod_1 = require("zod");
|
|
9
10
|
const zod_to_json_schema_1 = require("zod-to-json-schema");
|
|
10
11
|
const json_utils_js_1 = require("./json-utils.js");
|
|
@@ -115,3 +116,8 @@ const wrapAutoParseJsonSchema = (schema) => {
|
|
|
115
116
|
return schema;
|
|
116
117
|
};
|
|
117
118
|
exports.wrapAutoParseJsonSchema = wrapAutoParseJsonSchema;
|
|
119
|
+
function getZodObjectKeys(schema) {
|
|
120
|
+
if ("shape" in schema && schema.shape)
|
|
121
|
+
return Object.keys(schema.shape);
|
|
122
|
+
return [];
|
|
123
|
+
}
|
|
@@ -303,6 +303,7 @@ export declare abstract class Agent<I extends Message = any, O extends Message =
|
|
|
303
303
|
* @returns The Zod type definition for input data
|
|
304
304
|
*/
|
|
305
305
|
get inputSchema(): ZodType<I>;
|
|
306
|
+
get inputKeys(): string[];
|
|
306
307
|
/**
|
|
307
308
|
* Get the output data schema for this agent
|
|
308
309
|
*
|
|
@@ -312,6 +313,7 @@ export declare abstract class Agent<I extends Message = any, O extends Message =
|
|
|
312
313
|
* @returns The Zod type definition for output data
|
|
313
314
|
*/
|
|
314
315
|
get outputSchema(): ZodType<O>;
|
|
316
|
+
get outputKeys(): string[];
|
|
315
317
|
/**
|
|
316
318
|
* Whether to include the original input in the output
|
|
317
319
|
*
|
|
@@ -12,3 +12,4 @@ export declare function parseJSON(json: string): any;
|
|
|
12
12
|
export declare function ensureZodUnionArray<T extends z.ZodType>(union: T[]): [T, T, ...T[]];
|
|
13
13
|
export declare function isZodSchema(schema: ZodType): schema is ZodType;
|
|
14
14
|
export declare const wrapAutoParseJsonSchema: <T extends ZodType>(schema: T) => T;
|
|
15
|
+
export declare function getZodObjectKeys(schema: ZodType): string[];
|
|
@@ -303,6 +303,7 @@ export declare abstract class Agent<I extends Message = any, O extends Message =
|
|
|
303
303
|
* @returns The Zod type definition for input data
|
|
304
304
|
*/
|
|
305
305
|
get inputSchema(): ZodType<I>;
|
|
306
|
+
get inputKeys(): string[];
|
|
306
307
|
/**
|
|
307
308
|
* Get the output data schema for this agent
|
|
308
309
|
*
|
|
@@ -312,6 +313,7 @@ export declare abstract class Agent<I extends Message = any, O extends Message =
|
|
|
312
313
|
* @returns The Zod type definition for output data
|
|
313
314
|
*/
|
|
314
315
|
get outputSchema(): ZodType<O>;
|
|
316
|
+
get outputKeys(): string[];
|
|
315
317
|
/**
|
|
316
318
|
* Whether to include the original input in the output
|
|
317
319
|
*
|
package/lib/esm/agents/agent.js
CHANGED
|
@@ -6,7 +6,7 @@ import { joinURL } from "ufo";
|
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
import { zodToJsonSchema } from "zod-to-json-schema";
|
|
8
8
|
import { sortHooks } from "../utils/agent-utils.js";
|
|
9
|
-
import { isZodSchema } from "../utils/json-schema.js";
|
|
9
|
+
import { getZodObjectKeys, isZodSchema } from "../utils/json-schema.js";
|
|
10
10
|
import { logger } from "../utils/logger.js";
|
|
11
11
|
import { agentResponseStreamToObject, asyncGeneratorToReadableStream, isAsyncGenerator, mergeAgentResponseChunk, objectToAgentResponseStream, onAgentResponseStreamEnd, } from "../utils/stream-utils.js";
|
|
12
12
|
import { checkArguments, createAccessorArray, flat, isEmpty, isNil, isNonNullable, isRecord, } from "../utils/type-utils.js";
|
|
@@ -230,6 +230,9 @@ export class Agent {
|
|
|
230
230
|
checkAgentInputOutputSchema(schema);
|
|
231
231
|
return schema.passthrough();
|
|
232
232
|
}
|
|
233
|
+
get inputKeys() {
|
|
234
|
+
return getZodObjectKeys(this.inputSchema);
|
|
235
|
+
}
|
|
233
236
|
/**
|
|
234
237
|
* Get the output data schema for this agent
|
|
235
238
|
*
|
|
@@ -244,6 +247,9 @@ export class Agent {
|
|
|
244
247
|
checkAgentInputOutputSchema(schema);
|
|
245
248
|
return schema.passthrough();
|
|
246
249
|
}
|
|
250
|
+
get outputKeys() {
|
|
251
|
+
return getZodObjectKeys(this.outputSchema);
|
|
252
|
+
}
|
|
247
253
|
/**
|
|
248
254
|
* Whether to include the original input in the output
|
|
249
255
|
*
|
|
@@ -12,3 +12,4 @@ export declare function parseJSON(json: string): any;
|
|
|
12
12
|
export declare function ensureZodUnionArray<T extends z.ZodType>(union: T[]): [T, T, ...T[]];
|
|
13
13
|
export declare function isZodSchema(schema: ZodType): schema is ZodType;
|
|
14
14
|
export declare const wrapAutoParseJsonSchema: <T extends ZodType>(schema: T) => T;
|
|
15
|
+
export declare function getZodObjectKeys(schema: ZodType): string[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/core",
|
|
3
|
-
"version": "1.71.0
|
|
3
|
+
"version": "1.71.0",
|
|
4
4
|
"description": "The functional core of agentic AI",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -92,10 +92,10 @@
|
|
|
92
92
|
"zod": "^3.25.67",
|
|
93
93
|
"zod-from-json-schema": "^0.0.5",
|
|
94
94
|
"zod-to-json-schema": "^3.24.6",
|
|
95
|
-
"@aigne/afs": "^1.
|
|
96
|
-
"@aigne/
|
|
97
|
-
"@aigne/
|
|
98
|
-
"@aigne/afs
|
|
95
|
+
"@aigne/afs-history": "^1.1.3",
|
|
96
|
+
"@aigne/platform-helpers": "^0.6.6",
|
|
97
|
+
"@aigne/observability-api": "^0.11.13",
|
|
98
|
+
"@aigne/afs": "^1.3.0"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@types/bun": "^1.2.22",
|