@aigne/doc-smith 0.8.11-beta.6 → 0.8.11-beta.7
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/.aigne/doc-smith/config.yaml +2 -0
- package/.aigne/doc-smith/output/structure-plan.json +2 -2
- package/.aigne/doc-smith/preferences.yml +28 -20
- package/.aigne/doc-smith/upload-cache.yaml +702 -0
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +13 -0
- package/README.md +1 -1
- package/agents/generate/document-structure-tools/add-document.mjs +35 -10
- package/agents/generate/document-structure-tools/delete-document.mjs +35 -12
- package/agents/generate/document-structure-tools/move-document.mjs +43 -17
- package/agents/generate/document-structure-tools/update-document.mjs +37 -10
- package/agents/generate/update-document-structure.yaml +1 -7
- package/agents/generate/user-review-document-structure.mjs +5 -4
- package/agents/translate/translate-document.yaml +1 -9
- package/agents/update/check-update-is-single.mjs +2 -1
- package/agents/update/document-tools/update-document-content.mjs +24 -14
- package/agents/update/fs-tools/glob.mjs +184 -0
- package/agents/update/fs-tools/grep.mjs +317 -0
- package/agents/update/fs-tools/read-file.mjs +307 -0
- package/agents/update/generate-document.yaml +4 -7
- package/agents/update/update-document-detail.yaml +6 -10
- package/agents/update/user-review-document.mjs +13 -13
- package/assets/screenshots/doc-complete-setup.png +0 -0
- package/assets/screenshots/doc-generate-docs.png +0 -0
- package/assets/screenshots/doc-generate.png +0 -0
- package/assets/screenshots/doc-generated-successfully.png +0 -0
- package/assets/screenshots/doc-publish.png +0 -0
- package/assets/screenshots/doc-regenerate.png +0 -0
- package/assets/screenshots/doc-translate-langs.png +0 -0
- package/assets/screenshots/doc-translate.png +0 -0
- package/assets/screenshots/doc-update.png +0 -0
- package/docs/advanced-how-it-works.ja.md +31 -31
- package/docs/advanced-how-it-works.md +9 -9
- package/docs/advanced-how-it-works.zh-TW.md +24 -24
- package/docs/advanced-how-it-works.zh.md +20 -20
- package/docs/advanced-quality-assurance.ja.md +57 -61
- package/docs/advanced-quality-assurance.md +57 -61
- package/docs/advanced-quality-assurance.zh-TW.md +57 -61
- package/docs/advanced-quality-assurance.zh.md +57 -61
- package/docs/advanced.ja.md +8 -4
- package/docs/advanced.md +7 -3
- package/docs/advanced.zh-TW.md +9 -5
- package/docs/advanced.zh.md +9 -5
- package/docs/changelog.ja.md +206 -29
- package/docs/changelog.md +177 -0
- package/docs/changelog.zh-TW.md +229 -52
- package/docs/changelog.zh.md +204 -27
- package/docs/cli-reference.ja.md +82 -52
- package/docs/cli-reference.md +56 -26
- package/docs/cli-reference.zh-TW.md +82 -52
- package/docs/cli-reference.zh.md +70 -40
- package/docs/configuration-interactive-setup.ja.md +45 -42
- package/docs/configuration-interactive-setup.md +8 -5
- package/docs/configuration-interactive-setup.zh-TW.md +26 -23
- package/docs/configuration-interactive-setup.zh.md +25 -22
- package/docs/configuration-language-support.ja.md +33 -63
- package/docs/configuration-language-support.md +32 -62
- package/docs/configuration-language-support.zh-TW.md +35 -65
- package/docs/configuration-language-support.zh.md +32 -62
- package/docs/configuration-llm-setup.ja.md +25 -23
- package/docs/configuration-llm-setup.md +20 -18
- package/docs/configuration-llm-setup.zh-TW.md +21 -19
- package/docs/configuration-llm-setup.zh.md +20 -18
- package/docs/configuration-preferences.ja.md +67 -52
- package/docs/configuration-preferences.md +56 -41
- package/docs/configuration-preferences.zh-TW.md +69 -54
- package/docs/configuration-preferences.zh.md +68 -53
- package/docs/configuration.ja.md +65 -81
- package/docs/configuration.md +19 -35
- package/docs/configuration.zh-TW.md +62 -79
- package/docs/configuration.zh.md +50 -67
- package/docs/features-generate-documentation.ja.md +44 -69
- package/docs/features-generate-documentation.md +36 -61
- package/docs/features-generate-documentation.zh-TW.md +42 -67
- package/docs/features-generate-documentation.zh.md +41 -67
- package/docs/features-publish-your-docs.ja.md +36 -36
- package/docs/features-publish-your-docs.md +2 -2
- package/docs/features-publish-your-docs.zh-TW.md +21 -21
- package/docs/features-publish-your-docs.zh.md +23 -23
- package/docs/features-translate-documentation.ja.md +40 -31
- package/docs/features-translate-documentation.md +15 -6
- package/docs/features-translate-documentation.zh-TW.md +37 -28
- package/docs/features-translate-documentation.zh.md +23 -14
- package/docs/features-update-and-refine.ja.md +68 -118
- package/docs/features-update-and-refine.md +58 -108
- package/docs/features-update-and-refine.zh-TW.md +67 -116
- package/docs/features-update-and-refine.zh.md +64 -114
- package/docs/features.ja.md +29 -19
- package/docs/features.md +25 -15
- package/docs/features.zh-TW.md +28 -18
- package/docs/features.zh.md +31 -21
- package/docs/getting-started.ja.md +40 -43
- package/docs/getting-started.md +36 -39
- package/docs/getting-started.zh-TW.md +38 -41
- package/docs/getting-started.zh.md +45 -48
- package/docs/overview.ja.md +63 -11
- package/docs/overview.md +60 -8
- package/docs/overview.zh-TW.md +67 -15
- package/docs/overview.zh.md +62 -10
- package/media.md +9 -9
- package/package.json +1 -1
- package/prompts/detail/custom/custom-components.md +304 -188
- package/prompts/detail/document-rules.md +4 -4
- package/prompts/detail/generate-document.md +21 -8
- package/prompts/detail/update-document.md +8 -12
- package/prompts/structure/update-document-structure.md +12 -8
- package/prompts/utils/feedback-refiner.md +3 -3
- package/tests/agents/generate/document-structure-tools/move-document.test.mjs +9 -9
- package/tests/agents/generate/user-review-document-structure.test.mjs +29 -8
- package/tests/agents/update/document-tools/update-document-content.test.mjs +115 -112
- package/tests/agents/update/fs-tools/glob.test.mjs +438 -0
- package/tests/agents/update/fs-tools/grep.test.mjs +279 -0
- package/tests/agents/update/fs-tools/read-file.test.mjs +553 -0
- package/tests/agents/update/user-review-document.test.mjs +48 -27
- package/types/document-schema.mjs +5 -6
- package/types/document-structure-schema.mjs +20 -8
|
@@ -3,22 +3,20 @@ import { zodToJsonSchema } from "zod-to-json-schema";
|
|
|
3
3
|
|
|
4
4
|
// Update document content schemas
|
|
5
5
|
export const updateDocumentContentInputSchema = z.object({
|
|
6
|
-
originalContent: z.string().min(1, "Original content is required"),
|
|
7
6
|
diffPatch: z.string().min(1, "Diff patch is required"),
|
|
8
7
|
});
|
|
9
8
|
|
|
10
9
|
export const updateDocumentContentOutputSchema = z.object({
|
|
11
10
|
success: z.boolean(),
|
|
12
11
|
updatedContent: z.string().optional(),
|
|
13
|
-
error: z.string().optional(),
|
|
14
|
-
message: z.string(),
|
|
12
|
+
error: z.object({ message: z.string() }).optional(),
|
|
13
|
+
message: z.string().optional(),
|
|
15
14
|
});
|
|
16
15
|
|
|
17
16
|
// JSON Schema conversions for update document content
|
|
18
17
|
export const getUpdateDocumentContentInputJsonSchema = () => {
|
|
19
18
|
const schema = zodToJsonSchema(updateDocumentContentInputSchema);
|
|
20
19
|
if (schema.properties) {
|
|
21
|
-
schema.properties.originalContent.description = "Original markdown content to be updated";
|
|
22
20
|
schema.properties.diffPatch.description = "Diff patch string to apply to the original content";
|
|
23
21
|
}
|
|
24
22
|
return schema;
|
|
@@ -30,8 +28,9 @@ export const getUpdateDocumentContentOutputJsonSchema = () => {
|
|
|
30
28
|
schema.properties.success.description = "Whether the update was successful";
|
|
31
29
|
schema.properties.updatedContent.description =
|
|
32
30
|
"Updated markdown content (only present if success is true)";
|
|
33
|
-
schema.properties.error.description =
|
|
34
|
-
|
|
31
|
+
schema.properties.error.description =
|
|
32
|
+
"Error object containing error message (only present if success is false)";
|
|
33
|
+
schema.properties.message.description = "Success message (only present if success is true)";
|
|
35
34
|
}
|
|
36
35
|
return schema;
|
|
37
36
|
};
|
|
@@ -15,7 +15,6 @@ export const documentStructureSchema = z.array(documentItemSchema);
|
|
|
15
15
|
|
|
16
16
|
// Add document schemas
|
|
17
17
|
export const addDocumentInputSchema = z.object({
|
|
18
|
-
documentStructure: documentStructureSchema,
|
|
19
18
|
title: z.string().min(1, "Title is required"),
|
|
20
19
|
description: z.string().min(1, "Description is required"),
|
|
21
20
|
path: z.string().startsWith("/", 'Path must start with "/"'),
|
|
@@ -25,37 +24,40 @@ export const addDocumentInputSchema = z.object({
|
|
|
25
24
|
|
|
26
25
|
export const addDocumentOutputSchema = z.object({
|
|
27
26
|
documentStructure: documentStructureSchema,
|
|
27
|
+
message: z.string().optional(),
|
|
28
28
|
addedDocument: documentItemSchema.optional(),
|
|
29
|
+
error: z.object({ message: z.string() }).optional(),
|
|
29
30
|
});
|
|
30
31
|
|
|
31
32
|
// Delete document schemas
|
|
32
33
|
export const deleteDocumentInputSchema = z.object({
|
|
33
|
-
documentStructure: documentStructureSchema,
|
|
34
34
|
path: z.string().min(1, "Path is required"),
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
export const deleteDocumentOutputSchema = z.object({
|
|
38
38
|
documentStructure: documentStructureSchema,
|
|
39
|
+
message: z.string().optional(),
|
|
39
40
|
deletedDocument: documentItemSchema.optional(),
|
|
41
|
+
error: z.object({ message: z.string() }).optional(),
|
|
40
42
|
});
|
|
41
43
|
|
|
42
44
|
// Move document schemas
|
|
43
45
|
export const moveDocumentInputSchema = z.object({
|
|
44
|
-
documentStructure: documentStructureSchema,
|
|
45
46
|
path: z.string().min(1, "Path is required"),
|
|
46
47
|
newParentId: z.string().nullable().optional(),
|
|
47
48
|
});
|
|
48
49
|
|
|
49
50
|
export const moveDocumentOutputSchema = z.object({
|
|
50
51
|
documentStructure: documentStructureSchema,
|
|
52
|
+
message: z.string().optional(),
|
|
51
53
|
originalDocument: documentItemSchema.optional(),
|
|
52
54
|
updatedDocument: documentItemSchema.optional(),
|
|
55
|
+
error: z.object({ message: z.string() }).optional(),
|
|
53
56
|
});
|
|
54
57
|
|
|
55
58
|
// Update document schemas
|
|
56
59
|
export const updateDocumentInputSchema = z
|
|
57
60
|
.object({
|
|
58
|
-
documentStructure: documentStructureSchema,
|
|
59
61
|
path: z.string().min(1, "Path is required"),
|
|
60
62
|
title: z.string().min(1).optional(),
|
|
61
63
|
description: z.string().min(1).optional(),
|
|
@@ -71,8 +73,10 @@ export const updateDocumentInputSchema = z
|
|
|
71
73
|
|
|
72
74
|
export const updateDocumentOutputSchema = z.object({
|
|
73
75
|
documentStructure: documentStructureSchema,
|
|
76
|
+
message: z.string().optional(),
|
|
74
77
|
originalDocument: documentItemSchema.optional(),
|
|
75
78
|
updatedDocument: documentItemSchema.optional(),
|
|
79
|
+
error: z.object({ message: z.string() }).optional(),
|
|
76
80
|
});
|
|
77
81
|
|
|
78
82
|
// JSON Schema conversion functions using zodToJsonSchema
|
|
@@ -80,7 +84,6 @@ export const getAddDocumentInputJsonSchema = () => {
|
|
|
80
84
|
const schema = zodToJsonSchema(addDocumentInputSchema);
|
|
81
85
|
// Add custom descriptions
|
|
82
86
|
if (schema.properties) {
|
|
83
|
-
schema.properties.documentStructure.description = "Current documentation structure array";
|
|
84
87
|
schema.properties.title.description = "Title of the new document";
|
|
85
88
|
schema.properties.description.description = "Description of the new document";
|
|
86
89
|
schema.properties.path.description = "URL path for the new document (must start with '/')";
|
|
@@ -97,7 +100,10 @@ export const getAddDocumentOutputJsonSchema = () => {
|
|
|
97
100
|
if (schema.properties) {
|
|
98
101
|
schema.properties.documentStructure.description =
|
|
99
102
|
"Updated documentation structure array with the new document added";
|
|
103
|
+
schema.properties.message.description = "Success message describing the operation result";
|
|
100
104
|
schema.properties.addedDocument.description = "The newly added document object";
|
|
105
|
+
schema.properties.error.description =
|
|
106
|
+
"Error object containing error message if operation failed";
|
|
101
107
|
}
|
|
102
108
|
return schema;
|
|
103
109
|
};
|
|
@@ -105,7 +111,6 @@ export const getAddDocumentOutputJsonSchema = () => {
|
|
|
105
111
|
export const getDeleteDocumentInputJsonSchema = () => {
|
|
106
112
|
const schema = zodToJsonSchema(deleteDocumentInputSchema);
|
|
107
113
|
if (schema.properties) {
|
|
108
|
-
schema.properties.documentStructure.description = "Current documentation structure array";
|
|
109
114
|
schema.properties.path.description = "URL path of the document to delete";
|
|
110
115
|
}
|
|
111
116
|
return schema;
|
|
@@ -116,7 +121,10 @@ export const getDeleteDocumentOutputJsonSchema = () => {
|
|
|
116
121
|
if (schema.properties) {
|
|
117
122
|
schema.properties.documentStructure.description =
|
|
118
123
|
"Updated documentation structure array with the document removed";
|
|
124
|
+
schema.properties.message.description = "Success message describing the operation result";
|
|
119
125
|
schema.properties.deletedDocument.description = "The deleted document object";
|
|
126
|
+
schema.properties.error.description =
|
|
127
|
+
"Error object containing error message if operation failed";
|
|
120
128
|
}
|
|
121
129
|
return schema;
|
|
122
130
|
};
|
|
@@ -124,7 +132,6 @@ export const getDeleteDocumentOutputJsonSchema = () => {
|
|
|
124
132
|
export const getMoveDocumentInputJsonSchema = () => {
|
|
125
133
|
const schema = zodToJsonSchema(moveDocumentInputSchema);
|
|
126
134
|
if (schema.properties) {
|
|
127
|
-
schema.properties.documentStructure.description = "Current documentation structure array";
|
|
128
135
|
schema.properties.path.description = "URL path of the document to move";
|
|
129
136
|
schema.properties.newParentId.description =
|
|
130
137
|
"Path of the new parent document (leave empty for top-level)";
|
|
@@ -137,8 +144,11 @@ export const getMoveDocumentOutputJsonSchema = () => {
|
|
|
137
144
|
if (schema.properties) {
|
|
138
145
|
schema.properties.documentStructure.description =
|
|
139
146
|
"Updated documentation structure array with the document moved";
|
|
147
|
+
schema.properties.message.description = "Success message describing the operation result";
|
|
140
148
|
schema.properties.originalDocument.description = "The original document object before moving";
|
|
141
149
|
schema.properties.updatedDocument.description = "The updated document object after moving";
|
|
150
|
+
schema.properties.error.description =
|
|
151
|
+
"Error object containing error message if operation failed";
|
|
142
152
|
}
|
|
143
153
|
return schema;
|
|
144
154
|
};
|
|
@@ -146,7 +156,6 @@ export const getMoveDocumentOutputJsonSchema = () => {
|
|
|
146
156
|
export const getUpdateDocumentInputJsonSchema = () => {
|
|
147
157
|
const schema = zodToJsonSchema(updateDocumentInputSchema);
|
|
148
158
|
if (schema.properties) {
|
|
149
|
-
schema.properties.documentStructure.description = "Current documentation structure array";
|
|
150
159
|
schema.properties.path.description = "URL path of the document to update";
|
|
151
160
|
schema.properties.title.description = "New title for the document (optional)";
|
|
152
161
|
schema.properties.description.description = "New description for the document (optional)";
|
|
@@ -167,9 +176,12 @@ export const getUpdateDocumentOutputJsonSchema = () => {
|
|
|
167
176
|
if (schema.properties) {
|
|
168
177
|
schema.properties.documentStructure.description =
|
|
169
178
|
"Updated documentation structure array with the document modified";
|
|
179
|
+
schema.properties.message.description = "Success message describing the operation result";
|
|
170
180
|
schema.properties.originalDocument.description = "The original document object before update";
|
|
171
181
|
schema.properties.updatedDocument.description =
|
|
172
182
|
"The updated document object after modification";
|
|
183
|
+
schema.properties.error.description =
|
|
184
|
+
"Error object containing error message if operation failed";
|
|
173
185
|
}
|
|
174
186
|
return schema;
|
|
175
187
|
};
|