@aigne/doc-smith 0.1.2 → 0.1.4
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 +14 -0
- package/README.md +3 -3
- package/agents/check-detail-generated.mjs +2 -23
- package/agents/check-structure-planning.mjs +2 -23
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.1.4](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.1.3...v0.1.4) (2025-08-04)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* release 0.1.4 ([4122cf5](https://github.com/AIGNE-io/aigne-doc-smith/commit/4122cf5cc0285bef2b96803f393e744121d22acf))
|
|
9
|
+
|
|
10
|
+
## [0.1.3](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.1.2...v0.1.3) (2025-08-04)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* 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))
|
|
16
|
+
|
|
3
17
|
## [0.1.2](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.1.1...v0.1.2) (2025-08-01)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -61,13 +61,13 @@ Contributions are welcome! Please feel free to submit a pull request or open an
|
|
|
61
61
|
npx --no doc-smith run --entry-agent init
|
|
62
62
|
|
|
63
63
|
# 生成命令
|
|
64
|
-
npx --no doc-smith run --entry-agent
|
|
64
|
+
npx --no doc-smith run --entry-agent generate --model gemini:gemini-2.5-flash
|
|
65
65
|
|
|
66
66
|
# 重新生成单篇
|
|
67
|
-
npx --no doc-smith run --entry-agent
|
|
67
|
+
npx --no doc-smith run --entry-agent update --input-path bitnet-getting-started
|
|
68
68
|
|
|
69
69
|
# 结构规划优化
|
|
70
|
-
npx --no doc-smith run --entry-agent
|
|
70
|
+
npx --no doc-smith run --entry-agent generate --input-feedback "补充节点的 sourceIds,确保所有节点 sourceIds 都有值" --model gemini:gemini-2.5-pro
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
# 发布文档
|
|
@@ -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 || "",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/doc-smith",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"author": "Arcblock <blocklet@arcblock.io> https://github.com/blocklet",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@aigne/anthropic": "^0.10.
|
|
16
|
-
"@aigne/cli": "^1.
|
|
17
|
-
"@aigne/core": "^1.
|
|
18
|
-
"@aigne/gemini": "^0.8.
|
|
19
|
-
"@aigne/openai": "^0.10.
|
|
20
|
-
"@aigne/publish-docs": "^0.5.
|
|
15
|
+
"@aigne/anthropic": "^0.10.6",
|
|
16
|
+
"@aigne/cli": "^1.30.1",
|
|
17
|
+
"@aigne/core": "^1.43.0",
|
|
18
|
+
"@aigne/gemini": "^0.8.10",
|
|
19
|
+
"@aigne/openai": "^0.10.10",
|
|
20
|
+
"@aigne/publish-docs": "^0.5.2",
|
|
21
21
|
"glob": "^11.0.3",
|
|
22
22
|
"open": "^10.2.0",
|
|
23
23
|
"ufo": "^1.6.1",
|