@aigne/agent-library 1.24.0-beta.8 → 1.24.0-beta.9
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 +7 -0
- package/lib/cjs/agent-skill-manager/index.d.ts +5 -1
- package/lib/cjs/agent-skill-manager/index.js +11 -1
- package/lib/dts/agent-skill-manager/index.d.ts +5 -1
- package/lib/esm/agent-skill-manager/index.d.ts +5 -1
- package/lib/esm/agent-skill-manager/index.js +12 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@
|
|
|
7
7
|
* @aigne/core bumped to 1.22.0
|
|
8
8
|
* @aigne/openai bumped to 0.3.4
|
|
9
9
|
|
|
10
|
+
## [1.24.0-beta.9](https://github.com/AIGNE-io/aigne-framework/compare/agent-library-v1.24.0-beta.8...agent-library-v1.24.0-beta.9) (2025-12-26)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* **agent-library:** set default instructions for agent skill manager ([#861](https://github.com/AIGNE-io/aigne-framework/issues/861)) ([ca01a05](https://github.com/AIGNE-io/aigne-framework/commit/ca01a056ff73ebed7094e1e07964bc06cd3d26d0))
|
|
16
|
+
|
|
10
17
|
## [1.24.0-beta.8](https://github.com/AIGNE-io/aigne-framework/compare/agent-library-v1.24.0-beta.7...agent-library-v1.24.0-beta.8) (2025-12-26)
|
|
11
18
|
|
|
12
19
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { AIAgent, type AIAgentOptions, type Message } from "@aigne/core";
|
|
1
|
+
import { type Agent, AIAgent, type AIAgentOptions, type Message } from "@aigne/core";
|
|
2
2
|
export interface AgentSkillManagerOptions<I extends Message = Message, O extends Message = Message> extends AIAgentOptions<I, O> {
|
|
3
3
|
}
|
|
4
4
|
export default class AgentSkillManagerAgent<I extends Message = Message, O extends Message = Message> extends AIAgent<I, O> {
|
|
5
|
+
static load<I extends Message = any, O extends Message = any>(options: {
|
|
6
|
+
filepath: string;
|
|
7
|
+
parsed: object;
|
|
8
|
+
}): Promise<Agent<I, O>>;
|
|
5
9
|
constructor(options: AgentSkillManagerOptions<I, O>);
|
|
6
10
|
}
|
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const core_1 = require("@aigne/core");
|
|
4
|
+
const schema_js_1 = require("@aigne/core/loader/schema.js");
|
|
4
5
|
const prompt_js_1 = require("./prompt.js");
|
|
5
6
|
class AgentSkillManagerAgent extends core_1.AIAgent {
|
|
7
|
+
static async load(options) {
|
|
8
|
+
const schema = core_1.AIAgent.schema(options);
|
|
9
|
+
const valid = await schema.parseAsync(options.parsed);
|
|
10
|
+
return new AgentSkillManagerAgent({
|
|
11
|
+
...options.parsed,
|
|
12
|
+
...valid,
|
|
13
|
+
instructions: valid.instructions && (0, schema_js_1.instructionsToPromptBuilder)(valid.instructions),
|
|
14
|
+
});
|
|
15
|
+
}
|
|
6
16
|
constructor(options) {
|
|
7
17
|
super({
|
|
8
|
-
instructions: prompt_js_1.AgentSkillManagerSystemPrompt,
|
|
9
18
|
...options,
|
|
19
|
+
instructions: options.instructions || prompt_js_1.AgentSkillManagerSystemPrompt,
|
|
10
20
|
});
|
|
11
21
|
}
|
|
12
22
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { AIAgent, type AIAgentOptions, type Message } from "@aigne/core";
|
|
1
|
+
import { type Agent, AIAgent, type AIAgentOptions, type Message } from "@aigne/core";
|
|
2
2
|
export interface AgentSkillManagerOptions<I extends Message = Message, O extends Message = Message> extends AIAgentOptions<I, O> {
|
|
3
3
|
}
|
|
4
4
|
export default class AgentSkillManagerAgent<I extends Message = Message, O extends Message = Message> extends AIAgent<I, O> {
|
|
5
|
+
static load<I extends Message = any, O extends Message = any>(options: {
|
|
6
|
+
filepath: string;
|
|
7
|
+
parsed: object;
|
|
8
|
+
}): Promise<Agent<I, O>>;
|
|
5
9
|
constructor(options: AgentSkillManagerOptions<I, O>);
|
|
6
10
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { AIAgent, type AIAgentOptions, type Message } from "@aigne/core";
|
|
1
|
+
import { type Agent, AIAgent, type AIAgentOptions, type Message } from "@aigne/core";
|
|
2
2
|
export interface AgentSkillManagerOptions<I extends Message = Message, O extends Message = Message> extends AIAgentOptions<I, O> {
|
|
3
3
|
}
|
|
4
4
|
export default class AgentSkillManagerAgent<I extends Message = Message, O extends Message = Message> extends AIAgent<I, O> {
|
|
5
|
+
static load<I extends Message = any, O extends Message = any>(options: {
|
|
6
|
+
filepath: string;
|
|
7
|
+
parsed: object;
|
|
8
|
+
}): Promise<Agent<I, O>>;
|
|
5
9
|
constructor(options: AgentSkillManagerOptions<I, O>);
|
|
6
10
|
}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
import { AIAgent } from "@aigne/core";
|
|
1
|
+
import { AIAgent, } from "@aigne/core";
|
|
2
|
+
import { instructionsToPromptBuilder } from "@aigne/core/loader/schema.js";
|
|
2
3
|
import { AgentSkillManagerSystemPrompt } from "./prompt.js";
|
|
3
4
|
export default class AgentSkillManagerAgent extends AIAgent {
|
|
5
|
+
static async load(options) {
|
|
6
|
+
const schema = AIAgent.schema(options);
|
|
7
|
+
const valid = await schema.parseAsync(options.parsed);
|
|
8
|
+
return new AgentSkillManagerAgent({
|
|
9
|
+
...options.parsed,
|
|
10
|
+
...valid,
|
|
11
|
+
instructions: valid.instructions && instructionsToPromptBuilder(valid.instructions),
|
|
12
|
+
});
|
|
13
|
+
}
|
|
4
14
|
constructor(options) {
|
|
5
15
|
super({
|
|
6
|
-
instructions: AgentSkillManagerSystemPrompt,
|
|
7
16
|
...options,
|
|
17
|
+
instructions: options.instructions || AgentSkillManagerSystemPrompt,
|
|
8
18
|
});
|
|
9
19
|
}
|
|
10
20
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/agent-library",
|
|
3
|
-
"version": "1.24.0-beta.
|
|
3
|
+
"version": "1.24.0-beta.9",
|
|
4
4
|
"description": "Collection of agent libraries for AIGNE framework",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"zod": "^3.25.67",
|
|
59
59
|
"zod-to-json-schema": "^3.24.6",
|
|
60
60
|
"@aigne/core": "^1.72.0-beta.7",
|
|
61
|
-
"@aigne/
|
|
62
|
-
"@aigne/
|
|
61
|
+
"@aigne/openai": "^0.16.16-beta.7",
|
|
62
|
+
"@aigne/sqlite": "^0.4.9-beta"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@types/bun": "^1.2.22",
|