@aigne/doc-smith 0.1.2 → 0.1.3
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
|
+
## [0.1.3](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.1.2...v0.1.3) (2025-08-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* access agents from options.context instead of load a new aigne instance ([#6](https://github.com/AIGNE-io/aigne-doc-smith/issues/6)) ([0e7ce1d](https://github.com/AIGNE-io/aigne-doc-smith/commit/0e7ce1d3889aab435b029a511cb7ebdbb213ab8a))
|
|
9
|
+
|
|
3
10
|
## [0.1.2](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.1.1...v0.1.2) (2025-08-01)
|
|
4
11
|
|
|
5
12
|
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { access, readFile } from "node:fs/promises";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
-
import {
|
|
5
|
-
import { AIGNE, TeamAgent } from "@aigne/core";
|
|
6
|
-
import { GeminiChatModel } from "@aigne/gemini";
|
|
7
|
-
import { OpenAIChatModel } from "@aigne/openai";
|
|
4
|
+
import { TeamAgent } from "@aigne/core";
|
|
8
5
|
import checkDetailResult from "./check-detail-result.mjs";
|
|
9
6
|
|
|
10
7
|
// Get current script directory
|
|
@@ -87,27 +84,9 @@ export default async function checkDetailGenerated(
|
|
|
87
84
|
};
|
|
88
85
|
}
|
|
89
86
|
|
|
90
|
-
// If sourceIds have changed, regenerate even if file exists
|
|
91
|
-
const aigne = await AIGNE.load(join(__dirname, "../"), {
|
|
92
|
-
models: [
|
|
93
|
-
{
|
|
94
|
-
name: OpenAIChatModel.name,
|
|
95
|
-
create: (params) => new OpenAIChatModel({ ...params }),
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
name: AnthropicChatModel.name,
|
|
99
|
-
create: (params) => new AnthropicChatModel({ ...params }),
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: GeminiChatModel.name,
|
|
103
|
-
create: (params) => new GeminiChatModel({ ...params }),
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
});
|
|
107
|
-
|
|
108
87
|
const teamAgent = TeamAgent.from({
|
|
109
88
|
name: "generate-detail",
|
|
110
|
-
skills: [
|
|
89
|
+
skills: [options.context.agents["detail-generator-and-translate"]],
|
|
111
90
|
});
|
|
112
91
|
|
|
113
92
|
const result = await options.context.invoke(teamAgent, {
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { dirname
|
|
1
|
+
import { dirname } from "node:path";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
-
import { AnthropicChatModel } from "@aigne/anthropic";
|
|
4
|
-
import { AIGNE } from "@aigne/core";
|
|
5
|
-
import { GeminiChatModel } from "@aigne/gemini";
|
|
6
|
-
import { OpenAIChatModel } from "@aigne/openai";
|
|
7
3
|
|
|
8
4
|
// Get current script directory
|
|
9
5
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
@@ -19,24 +15,7 @@ export default async function checkStructurePlanning(
|
|
|
19
15
|
};
|
|
20
16
|
}
|
|
21
17
|
|
|
22
|
-
const
|
|
23
|
-
models: [
|
|
24
|
-
{
|
|
25
|
-
name: OpenAIChatModel.name,
|
|
26
|
-
create: (params) => new OpenAIChatModel({ ...params }),
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
name: AnthropicChatModel.name,
|
|
30
|
-
create: (params) => new AnthropicChatModel({ ...params }),
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: GeminiChatModel.name,
|
|
34
|
-
create: (params) => new GeminiChatModel({ ...params }),
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
const panningAgent = aigne.agents["reflective-structure-planner"];
|
|
18
|
+
const panningAgent = options.context.agents["reflective-structure-planner"];
|
|
40
19
|
|
|
41
20
|
const result = await options.context.invoke(panningAgent, {
|
|
42
21
|
feedback: feedback || "",
|