@aigne/core 1.18.1 → 1.18.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 +7 -0
- package/lib/cjs/aigne/aigne.d.ts +1 -1
- package/lib/cjs/aigne/aigne.js +1 -1
- package/lib/cjs/loader/index.js +3 -3
- package/lib/dts/aigne/aigne.d.ts +1 -1
- package/lib/esm/aigne/aigne.d.ts +1 -1
- package/lib/esm/aigne/aigne.js +1 -1
- package/lib/esm/loader/index.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
* add user context support ([#131](https://github.com/AIGNE-io/aigne-framework/issues/131)) ([4dd9d20](https://github.com/AIGNE-io/aigne-framework/commit/4dd9d20953f6ac33933723db56efd9b44bafeb02))
|
|
7
7
|
|
|
8
|
+
## [1.18.2](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.18.1...core-v1.18.2) (2025-05-30)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* provide available memories for AIGNE ([#145](https://github.com/AIGNE-io/aigne-framework/issues/145)) ([c5dc960](https://github.com/AIGNE-io/aigne-framework/commit/c5dc9605e0fb7ca60e1f5fa2f0da67ffec00c601))
|
|
14
|
+
|
|
8
15
|
## [1.18.1](https://github.com/AIGNE-io/aigne-framework/compare/core-v1.18.0...core-v1.18.1) (2025-05-30)
|
|
9
16
|
|
|
10
17
|
|
package/lib/cjs/aigne/aigne.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export declare class AIGNE<U extends UserContext = UserContext> {
|
|
|
55
55
|
* @param options - Options to override the loaded configuration.
|
|
56
56
|
* @returns A fully initialized AIGNE instance with configured agents and skills.
|
|
57
57
|
*/
|
|
58
|
-
static load(path: string, options: AIGNEOptions &
|
|
58
|
+
static load(path: string, options: AIGNEOptions & Omit<LoadOptions, "path">): Promise<AIGNE>;
|
|
59
59
|
/**
|
|
60
60
|
* Creates a new AIGNE instance with the specified options.
|
|
61
61
|
*
|
package/lib/cjs/aigne/aigne.js
CHANGED
|
@@ -30,7 +30,7 @@ class AIGNE {
|
|
|
30
30
|
* @returns A fully initialized AIGNE instance with configured agents and skills.
|
|
31
31
|
*/
|
|
32
32
|
static async load(path, options) {
|
|
33
|
-
const { model, agents, skills, ...aigne } = await (0, index_js_1.load)({
|
|
33
|
+
const { model, agents, skills, ...aigne } = await (0, index_js_1.load)({ ...options, path });
|
|
34
34
|
return new AIGNE({
|
|
35
35
|
...options,
|
|
36
36
|
model: options?.model || model,
|
package/lib/cjs/loader/index.js
CHANGED
|
@@ -18,8 +18,8 @@ async function load(options) {
|
|
|
18
18
|
const aigneFilePath = await getAIGNEFilePath(options.path);
|
|
19
19
|
const rootDir = index_js_1.nodejs.path.dirname(aigneFilePath);
|
|
20
20
|
const aigne = await loadAIGNEFile(aigneFilePath);
|
|
21
|
-
const agents = await Promise.all((aigne.agents ?? []).map((filename) => loadAgent(index_js_1.nodejs.path.join(rootDir, filename))));
|
|
22
|
-
const skills = await Promise.all((aigne.skills ?? []).map((filename) => loadAgent(index_js_1.nodejs.path.join(rootDir, filename))));
|
|
21
|
+
const agents = await Promise.all((aigne.agents ?? []).map((filename) => loadAgent(index_js_1.nodejs.path.join(rootDir, filename), options)));
|
|
22
|
+
const skills = await Promise.all((aigne.skills ?? []).map((filename) => loadAgent(index_js_1.nodejs.path.join(rootDir, filename), options)));
|
|
23
23
|
return {
|
|
24
24
|
...aigne,
|
|
25
25
|
model: await loadModel(options.models, aigne.chat_model),
|
|
@@ -41,7 +41,7 @@ async function loadAgent(path, options) {
|
|
|
41
41
|
? undefined
|
|
42
42
|
: await loadMemory(options.memories, typeof agent.memory === "object" ? agent.memory.provider : undefined, typeof agent.memory === "object" ? agent.memory : {}),
|
|
43
43
|
skills: agent.skills &&
|
|
44
|
-
(await Promise.all(agent.skills.map((filename) => loadAgent(index_js_1.nodejs.path.join(index_js_1.nodejs.path.dirname(path), filename))))),
|
|
44
|
+
(await Promise.all(agent.skills.map((filename) => loadAgent(index_js_1.nodejs.path.join(index_js_1.nodejs.path.dirname(path), filename), options)))),
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
if (agent.type === "mcp") {
|
package/lib/dts/aigne/aigne.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export declare class AIGNE<U extends UserContext = UserContext> {
|
|
|
55
55
|
* @param options - Options to override the loaded configuration.
|
|
56
56
|
* @returns A fully initialized AIGNE instance with configured agents and skills.
|
|
57
57
|
*/
|
|
58
|
-
static load(path: string, options: AIGNEOptions &
|
|
58
|
+
static load(path: string, options: AIGNEOptions & Omit<LoadOptions, "path">): Promise<AIGNE>;
|
|
59
59
|
/**
|
|
60
60
|
* Creates a new AIGNE instance with the specified options.
|
|
61
61
|
*
|
package/lib/esm/aigne/aigne.d.ts
CHANGED
|
@@ -55,7 +55,7 @@ export declare class AIGNE<U extends UserContext = UserContext> {
|
|
|
55
55
|
* @param options - Options to override the loaded configuration.
|
|
56
56
|
* @returns A fully initialized AIGNE instance with configured agents and skills.
|
|
57
57
|
*/
|
|
58
|
-
static load(path: string, options: AIGNEOptions &
|
|
58
|
+
static load(path: string, options: AIGNEOptions & Omit<LoadOptions, "path">): Promise<AIGNE>;
|
|
59
59
|
/**
|
|
60
60
|
* Creates a new AIGNE instance with the specified options.
|
|
61
61
|
*
|
package/lib/esm/aigne/aigne.js
CHANGED
|
@@ -27,7 +27,7 @@ export class AIGNE {
|
|
|
27
27
|
* @returns A fully initialized AIGNE instance with configured agents and skills.
|
|
28
28
|
*/
|
|
29
29
|
static async load(path, options) {
|
|
30
|
-
const { model, agents, skills, ...aigne } = await load({
|
|
30
|
+
const { model, agents, skills, ...aigne } = await load({ ...options, path });
|
|
31
31
|
return new AIGNE({
|
|
32
32
|
...options,
|
|
33
33
|
model: options?.model || model,
|
package/lib/esm/loader/index.js
CHANGED
|
@@ -12,8 +12,8 @@ export async function load(options) {
|
|
|
12
12
|
const aigneFilePath = await getAIGNEFilePath(options.path);
|
|
13
13
|
const rootDir = nodejs.path.dirname(aigneFilePath);
|
|
14
14
|
const aigne = await loadAIGNEFile(aigneFilePath);
|
|
15
|
-
const agents = await Promise.all((aigne.agents ?? []).map((filename) => loadAgent(nodejs.path.join(rootDir, filename))));
|
|
16
|
-
const skills = await Promise.all((aigne.skills ?? []).map((filename) => loadAgent(nodejs.path.join(rootDir, filename))));
|
|
15
|
+
const agents = await Promise.all((aigne.agents ?? []).map((filename) => loadAgent(nodejs.path.join(rootDir, filename), options)));
|
|
16
|
+
const skills = await Promise.all((aigne.skills ?? []).map((filename) => loadAgent(nodejs.path.join(rootDir, filename), options)));
|
|
17
17
|
return {
|
|
18
18
|
...aigne,
|
|
19
19
|
model: await loadModel(options.models, aigne.chat_model),
|
|
@@ -35,7 +35,7 @@ export async function loadAgent(path, options) {
|
|
|
35
35
|
? undefined
|
|
36
36
|
: await loadMemory(options.memories, typeof agent.memory === "object" ? agent.memory.provider : undefined, typeof agent.memory === "object" ? agent.memory : {}),
|
|
37
37
|
skills: agent.skills &&
|
|
38
|
-
(await Promise.all(agent.skills.map((filename) => loadAgent(nodejs.path.join(nodejs.path.dirname(path), filename))))),
|
|
38
|
+
(await Promise.all(agent.skills.map((filename) => loadAgent(nodejs.path.join(nodejs.path.dirname(path), filename), options)))),
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
if (agent.type === "mcp") {
|