@aigne/core 1.63.0-beta.1 → 1.63.0-beta.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
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.63.0-beta.2](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.63.0-beta.1...core-v1.63.0-beta.2) (2025-10-09)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* 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))
|
|
9
|
+
|
|
3
10
|
## [1.63.0-beta.1](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.63.0-beta...core-v1.63.0-beta.1) (2025-10-09)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -3,7 +3,7 @@ import { PromptBuilder } from "../prompt/prompt-builder.js";
|
|
|
3
3
|
import { Agent, type AgentInvokeOptions, type AgentOptions, type AgentProcessAsyncGenerator, type AgentProcessResult, type Message } from "./agent.js";
|
|
4
4
|
import type { ChatModel, ChatModelInput } from "./chat-model.js";
|
|
5
5
|
import type { GuideRailAgentOutput } from "./guide-rail-agent.js";
|
|
6
|
-
import type
|
|
6
|
+
import { type FileType } from "./model.js";
|
|
7
7
|
export declare const DEFAULT_OUTPUT_KEY = "message";
|
|
8
8
|
export declare const DEFAULT_OUTPUT_FILE_KEY = "files";
|
|
9
9
|
/**
|
|
@@ -311,6 +311,7 @@ export declare class AIAgent<I extends Message = any, O extends Message = any> e
|
|
|
311
311
|
metadataEnd: string;
|
|
312
312
|
parse: (raw: string) => object;
|
|
313
313
|
};
|
|
314
|
+
get inputSchema(): ZodType<I>;
|
|
314
315
|
/**
|
|
315
316
|
* Process an input message and generate a response
|
|
316
317
|
*
|
|
@@ -12,6 +12,7 @@ const template_js_1 = require("../prompt/template.js");
|
|
|
12
12
|
const structured_stream_extractor_js_1 = require("../utils/structured-stream-extractor.js");
|
|
13
13
|
const type_utils_js_1 = require("../utils/type-utils.js");
|
|
14
14
|
const agent_js_1 = require("./agent.js");
|
|
15
|
+
const model_js_1 = require("./model.js");
|
|
15
16
|
const types_js_1 = require("./types.js");
|
|
16
17
|
exports.DEFAULT_OUTPUT_KEY = "message";
|
|
17
18
|
exports.DEFAULT_OUTPUT_FILE_KEY = "files";
|
|
@@ -242,6 +243,20 @@ class AIAgent extends agent_js_1.Agent {
|
|
|
242
243
|
* which outputs structured data in YAML format within <metadata> tags.
|
|
243
244
|
*/
|
|
244
245
|
customStructuredStreamInstructions;
|
|
246
|
+
get inputSchema() {
|
|
247
|
+
let schema = super.inputSchema;
|
|
248
|
+
if (this.inputKey) {
|
|
249
|
+
schema = schema.extend({
|
|
250
|
+
[this.inputKey]: zod_1.z.string().nullish(),
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
if (this.inputFileKey) {
|
|
254
|
+
schema = schema.extend({
|
|
255
|
+
[this.inputFileKey]: model_js_1.fileUnionContentsSchema.nullish(),
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
return schema;
|
|
259
|
+
}
|
|
245
260
|
/**
|
|
246
261
|
* Process an input message and generate a response
|
|
247
262
|
*
|
|
@@ -3,7 +3,7 @@ import { PromptBuilder } from "../prompt/prompt-builder.js";
|
|
|
3
3
|
import { Agent, type AgentInvokeOptions, type AgentOptions, type AgentProcessAsyncGenerator, type AgentProcessResult, type Message } from "./agent.js";
|
|
4
4
|
import type { ChatModel, ChatModelInput } from "./chat-model.js";
|
|
5
5
|
import type { GuideRailAgentOutput } from "./guide-rail-agent.js";
|
|
6
|
-
import type
|
|
6
|
+
import { type FileType } from "./model.js";
|
|
7
7
|
export declare const DEFAULT_OUTPUT_KEY = "message";
|
|
8
8
|
export declare const DEFAULT_OUTPUT_FILE_KEY = "files";
|
|
9
9
|
/**
|
|
@@ -311,6 +311,7 @@ export declare class AIAgent<I extends Message = any, O extends Message = any> e
|
|
|
311
311
|
metadataEnd: string;
|
|
312
312
|
parse: (raw: string) => object;
|
|
313
313
|
};
|
|
314
|
+
get inputSchema(): ZodType<I>;
|
|
314
315
|
/**
|
|
315
316
|
* Process an input message and generate a response
|
|
316
317
|
*
|
|
@@ -3,7 +3,7 @@ import { PromptBuilder } from "../prompt/prompt-builder.js";
|
|
|
3
3
|
import { Agent, type AgentInvokeOptions, type AgentOptions, type AgentProcessAsyncGenerator, type AgentProcessResult, type Message } from "./agent.js";
|
|
4
4
|
import type { ChatModel, ChatModelInput } from "./chat-model.js";
|
|
5
5
|
import type { GuideRailAgentOutput } from "./guide-rail-agent.js";
|
|
6
|
-
import type
|
|
6
|
+
import { type FileType } from "./model.js";
|
|
7
7
|
export declare const DEFAULT_OUTPUT_KEY = "message";
|
|
8
8
|
export declare const DEFAULT_OUTPUT_FILE_KEY = "files";
|
|
9
9
|
/**
|
|
@@ -311,6 +311,7 @@ export declare class AIAgent<I extends Message = any, O extends Message = any> e
|
|
|
311
311
|
metadataEnd: string;
|
|
312
312
|
parse: (raw: string) => object;
|
|
313
313
|
};
|
|
314
|
+
get inputSchema(): ZodType<I>;
|
|
314
315
|
/**
|
|
315
316
|
* Process an input message and generate a response
|
|
316
317
|
*
|
|
@@ -6,6 +6,7 @@ import { AgentMessageTemplate, ToolMessageTemplate } from "../prompt/template.js
|
|
|
6
6
|
import { ExtractMetadataTransform } from "../utils/structured-stream-extractor.js";
|
|
7
7
|
import { checkArguments, isEmpty } from "../utils/type-utils.js";
|
|
8
8
|
import { Agent, agentOptionsSchema, isAgentResponseDelta, } from "./agent.js";
|
|
9
|
+
import { fileUnionContentsSchema } from "./model.js";
|
|
9
10
|
import { isTransferAgentOutput } from "./types.js";
|
|
10
11
|
export const DEFAULT_OUTPUT_KEY = "message";
|
|
11
12
|
export const DEFAULT_OUTPUT_FILE_KEY = "files";
|
|
@@ -236,6 +237,20 @@ export class AIAgent extends Agent {
|
|
|
236
237
|
* which outputs structured data in YAML format within <metadata> tags.
|
|
237
238
|
*/
|
|
238
239
|
customStructuredStreamInstructions;
|
|
240
|
+
get inputSchema() {
|
|
241
|
+
let schema = super.inputSchema;
|
|
242
|
+
if (this.inputKey) {
|
|
243
|
+
schema = schema.extend({
|
|
244
|
+
[this.inputKey]: z.string().nullish(),
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
if (this.inputFileKey) {
|
|
248
|
+
schema = schema.extend({
|
|
249
|
+
[this.inputFileKey]: fileUnionContentsSchema.nullish(),
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
return schema;
|
|
253
|
+
}
|
|
239
254
|
/**
|
|
240
255
|
* Process an input message and generate a response
|
|
241
256
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/core",
|
|
3
|
-
"version": "1.63.0-beta.
|
|
3
|
+
"version": "1.63.0-beta.2",
|
|
4
4
|
"description": "The functional core of agentic AI",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
"zod-from-json-schema": "^0.0.5",
|
|
94
94
|
"zod-to-json-schema": "^3.24.6",
|
|
95
95
|
"@aigne/afs": "^1.0.0",
|
|
96
|
-
"@aigne/
|
|
97
|
-
"@aigne/
|
|
96
|
+
"@aigne/platform-helpers": "^0.6.3",
|
|
97
|
+
"@aigne/observability-api": "^0.11.2-beta"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@types/bun": "^1.2.22",
|