@aigne/doc-smith 0.9.0 → 0.9.1-beta
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 +8 -0
- package/README.md +10 -11
- package/agents/chat/chat-system.md +7 -1
- package/agents/chat/index.mjs +53 -0
- package/agents/chat/skills/generate-document.yaml +1 -1
- package/agents/{utils/list-docs.mjs → chat/skills/list-documents.mjs} +4 -4
- package/agents/chat/skills/update-document.yaml +1 -1
- package/agents/{generate → create}/check-need-generate-structure.mjs +1 -1
- package/agents/{generate → create}/index.yaml +3 -3
- package/agents/init/check.mjs +1 -1
- package/agents/init/index.mjs +1 -4
- package/agents/{translate → localize}/index.yaml +5 -3
- package/agents/{translate → localize}/translate-multilingual.yaml +1 -1
- package/agents/update/generate-diagram.yaml +3 -3
- package/agents/utils/choose-docs.mjs +1 -1
- package/agents/utils/find-item-by-path.mjs +1 -1
- package/agents/utils/post-generate.mjs +1 -1
- package/aigne.yaml +20 -21
- package/package.json +1 -1
- package/utils/history-utils.mjs +1 -1
- package/utils/openapi/index.mjs +10 -6
- package/agents/chat/index.yaml +0 -22
- /package/agents/{generate → create}/check-diagram.mjs +0 -0
- /package/agents/{generate → create}/check-document-structure.yaml +0 -0
- /package/agents/{generate → create}/document-structure-tools/add-document.mjs +0 -0
- /package/agents/{generate → create}/document-structure-tools/delete-document.mjs +0 -0
- /package/agents/{generate → create}/document-structure-tools/move-document.mjs +0 -0
- /package/agents/{generate → create}/document-structure-tools/update-document.mjs +0 -0
- /package/agents/{generate → create}/draw-diagram.yaml +0 -0
- /package/agents/{generate → create}/generate-structure.yaml +0 -0
- /package/agents/{generate → create}/merge-diagram.yaml +0 -0
- /package/agents/{generate → create}/refine-document-structure.yaml +0 -0
- /package/agents/{generate → create}/update-document-structure.yaml +0 -0
- /package/agents/{generate → create}/user-review-document-structure.mjs +0 -0
- /package/agents/{generate → create}/utils/merge-document-structures.mjs +0 -0
- /package/agents/{generate → create}/wrap-diagram-code.mjs +0 -0
- /package/agents/{translate → localize}/choose-language.mjs +0 -0
- /package/agents/{translate → localize}/record-translation-history.mjs +0 -0
- /package/agents/{translate → localize}/translate-document.yaml +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.1-beta](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.9.0...v0.9.1-beta) (2025-11-12)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* polish openapi spec check condition ([#293](https://github.com/AIGNE-io/aigne-doc-smith/issues/293)) ([39632f5](https://github.com/AIGNE-io/aigne-doc-smith/commit/39632f5193fafbb658efe15c6f8e3eaf9a881b0d))
|
|
9
|
+
* setup AFS storage for chat agent & improve chatbot prompt ([#292](https://github.com/AIGNE-io/aigne-doc-smith/issues/292)) ([5541e52](https://github.com/AIGNE-io/aigne-doc-smith/commit/5541e52333ad0b0b7a3280ee7c75cb745f49f535))
|
|
10
|
+
|
|
3
11
|
## [0.9.0](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.9.0-beta.1...v0.9.0) (2025-11-11)
|
|
4
12
|
|
|
5
13
|
## [0.9.0-beta.1](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.9.0-beta...v0.9.0-beta.1) (2025-11-11)
|
package/README.md
CHANGED
|
@@ -80,7 +80,7 @@ Navigate to your project directory and run:
|
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
82
|
# One command to generate your documentation
|
|
83
|
-
aigne doc
|
|
83
|
+
aigne doc create
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
DocSmith will:
|
|
@@ -105,9 +105,9 @@ DocSmith supports multiple AI providers:
|
|
|
105
105
|
|
|
106
106
|
```bash
|
|
107
107
|
# Switch models effortlessly
|
|
108
|
-
aigne doc
|
|
109
|
-
aigne doc
|
|
110
|
-
aigne doc
|
|
108
|
+
aigne doc create --model google:gemini-2.5-pro
|
|
109
|
+
aigne doc create --model anthropic:claude-sonnet-4-5
|
|
110
|
+
aigne doc create --model openai:gpt-4o
|
|
111
111
|
```
|
|
112
112
|
|
|
113
113
|
**🔑 Custom API Keys**
|
|
@@ -126,13 +126,13 @@ Configure your own API keys for direct provider access:
|
|
|
126
126
|
|
|
127
127
|
```bash
|
|
128
128
|
# Smart generation with auto-configuration
|
|
129
|
-
aigne doc
|
|
129
|
+
aigne doc create
|
|
130
130
|
|
|
131
131
|
# Force a complete regeneration of the documentation
|
|
132
|
-
aigne doc
|
|
132
|
+
aigne doc create --forceRegenerate
|
|
133
133
|
|
|
134
134
|
# Generate with custom feedback
|
|
135
|
-
aigne doc
|
|
135
|
+
aigne doc create --feedback "Add more API examples and troubleshooting sections"
|
|
136
136
|
```
|
|
137
137
|
|
|
138
138
|
#### 🔄 Update Existing Documents
|
|
@@ -149,13 +149,13 @@ aigne doc update --docs overview.md --feedback "Add comprehensive FAQ section"
|
|
|
149
149
|
|
|
150
150
|
```bash
|
|
151
151
|
# Interactive translation with smart language selection
|
|
152
|
-
aigne doc
|
|
152
|
+
aigne doc localize
|
|
153
153
|
|
|
154
154
|
# Translate specific documents into multiple languages
|
|
155
|
-
aigne doc
|
|
155
|
+
aigne doc localize --langs zh --langs ja --docs examples.md --docs overview.md
|
|
156
156
|
|
|
157
157
|
# Translate with a custom glossary for consistent terminology
|
|
158
|
-
aigne doc
|
|
158
|
+
aigne doc localize --glossary @path/to/glossary.md --feedback "Use technical terminology consistently"
|
|
159
159
|
```
|
|
160
160
|
|
|
161
161
|
#### 🚀 Publishing & Deployment
|
|
@@ -300,4 +300,3 @@ This project is licensed under the **Elastic License 2.0**. See the [LICENSE](LI
|
|
|
300
300
|
- ❌ **Restrictions**: You cannot offer DocSmith as a competing hosted service.
|
|
301
301
|
|
|
302
302
|
[Learn more about the Elastic License 2.0](https://www.elastic.co/licensing/elastic-license)
|
|
303
|
-
|
|
@@ -18,7 +18,7 @@ Interaction Guidelines:
|
|
|
18
18
|
<skill_usage>
|
|
19
19
|
- afs_xxx skills: AFS(AIGNE File System) skills provide capabilities to explore, read, write and manage files and virtual modules within the AIGNE environment.
|
|
20
20
|
You can use these skills to access source files and other resources needed for documentation tasks.
|
|
21
|
-
-
|
|
21
|
+
- listDocuments: This skill lists all available documentation files in the system.
|
|
22
22
|
You can use this skill to get an overview of existing documents before creating or modifying documentation. for documentation tasks,
|
|
23
23
|
you should use this skill rather than afs_read to list documentation files.
|
|
24
24
|
- generateDocument: This skill generates new documentation or updates existing documents structure based on user inputs and specifications,
|
|
@@ -30,3 +30,9 @@ Interaction Guidelines:
|
|
|
30
30
|
- translate: This skill translates documentation content into different languages for localization purposes.
|
|
31
31
|
You can use this skill to adapt documents for diverse audiences by providing translations in the required languages.
|
|
32
32
|
</skill_usage>
|
|
33
|
+
|
|
34
|
+
<output_requirements>
|
|
35
|
+
- respect tools results and do not fabricate information, use tools results to answer user questions whenever possible
|
|
36
|
+
- Use markdown format for all responses
|
|
37
|
+
- Respond in the same language as the user
|
|
38
|
+
</output_requirements>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { mkdir, readFile } from "node:fs/promises";
|
|
2
|
+
import { parse } from "yaml";
|
|
3
|
+
|
|
4
|
+
await mkdir(".aigne/doc-smith", { recursive: true });
|
|
5
|
+
const config = await readFile(".aigne/doc-smith/config.yaml", "utf-8")
|
|
6
|
+
.then((raw) => parse(raw))
|
|
7
|
+
.catch(() => null);
|
|
8
|
+
|
|
9
|
+
const docsDir = config.docsDir || ".aigne/doc-smith/docs";
|
|
10
|
+
|
|
11
|
+
export default {
|
|
12
|
+
type: "ai",
|
|
13
|
+
name: "chat",
|
|
14
|
+
description: "Start interactive document generation assistant",
|
|
15
|
+
instructions: {
|
|
16
|
+
url: "./chat-system.md",
|
|
17
|
+
},
|
|
18
|
+
input_key: "message",
|
|
19
|
+
afs: {
|
|
20
|
+
storage: {
|
|
21
|
+
url: "file:.aigne/doc-smith/.local/afs-storage.sqlite3",
|
|
22
|
+
},
|
|
23
|
+
modules: [
|
|
24
|
+
{
|
|
25
|
+
module: "system-fs",
|
|
26
|
+
options: {
|
|
27
|
+
path: ".",
|
|
28
|
+
mount: "/source",
|
|
29
|
+
description: "Project root directory for document generation",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
module: "system-fs",
|
|
34
|
+
options: {
|
|
35
|
+
path: docsDir,
|
|
36
|
+
mount: "/docs",
|
|
37
|
+
description: "Generated documentation files directory",
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
},
|
|
42
|
+
afs_config: {
|
|
43
|
+
inject_history: true,
|
|
44
|
+
},
|
|
45
|
+
skills: [
|
|
46
|
+
"./skills/list-documents.mjs",
|
|
47
|
+
"./skills/generate-document.yaml",
|
|
48
|
+
"./skills/update-document.yaml",
|
|
49
|
+
"../publish/index.yaml",
|
|
50
|
+
"../localize/index.yaml",
|
|
51
|
+
"../utils/exit.mjs",
|
|
52
|
+
],
|
|
53
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { getMainLanguageFiles } from "
|
|
2
|
-
import init from "
|
|
1
|
+
import { getMainLanguageFiles } from "../../../utils/docs-finder-utils.mjs";
|
|
2
|
+
import init from "../../init/index.mjs";
|
|
3
3
|
|
|
4
|
-
export default async function
|
|
4
|
+
export default async function listDocuments(_, options) {
|
|
5
5
|
const config = await init({ checkOnly: true }, options);
|
|
6
6
|
|
|
7
7
|
// Get all main language .md files in docsDir
|
|
@@ -12,4 +12,4 @@ export default async function listDocs(_, options) {
|
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
listDocuments.description = "List all available documentation files";
|
|
@@ -8,7 +8,7 @@ input_schema:
|
|
|
8
8
|
type: array
|
|
9
9
|
items:
|
|
10
10
|
type: string
|
|
11
|
-
description: Documents to update, must from
|
|
11
|
+
description: Documents to update, must from listDocuments output
|
|
12
12
|
feedback:
|
|
13
13
|
type: string
|
|
14
14
|
description: Tell us what to change in this content
|
|
@@ -25,7 +25,7 @@ export default async function checkNeedGenerateStructure(
|
|
|
25
25
|
|
|
26
26
|
if (choice === "later") {
|
|
27
27
|
console.log(`\nConfiguration file: ${chalk.cyan("./.aigne/doc-smith/config.yaml")}`);
|
|
28
|
-
console.log("Review and edit your configuration, then run `aigne doc
|
|
28
|
+
console.log("Review and edit your configuration, then run `aigne doc create` to continue.");
|
|
29
29
|
|
|
30
30
|
// In test environment, return a special result instead of exiting
|
|
31
31
|
if (process.env.NODE_ENV === "test") {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
type: team
|
|
2
|
-
name:
|
|
2
|
+
name: create
|
|
3
3
|
alias:
|
|
4
|
+
- generate
|
|
4
5
|
- gen
|
|
5
|
-
|
|
6
|
-
description: Generate complete documentation for your project
|
|
6
|
+
description: Create complete documentation for your project
|
|
7
7
|
skills:
|
|
8
8
|
- url: ../init/index.mjs
|
|
9
9
|
default_input:
|
package/agents/init/check.mjs
CHANGED
|
@@ -6,7 +6,7 @@ export default async function checkNeedGenerate({ docsDir, locale, documentExecu
|
|
|
6
6
|
|
|
7
7
|
if (mainLanguageFiles.length === 0) {
|
|
8
8
|
console.log(
|
|
9
|
-
`No documents found in the docs directory. You can generate them with ${chalk.yellow("`aigne doc
|
|
9
|
+
`No documents found in the docs directory. You can generate them with ${chalk.yellow("`aigne doc create`")}`,
|
|
10
10
|
);
|
|
11
11
|
process.exit(0);
|
|
12
12
|
}
|
package/agents/init/index.mjs
CHANGED
|
@@ -423,11 +423,8 @@ async function _init(
|
|
|
423
423
|
console.log(
|
|
424
424
|
`\n✅ Setup complete! Your configuration has been saved to: ${chalk.cyan(filePath)}`,
|
|
425
425
|
);
|
|
426
|
-
console.log(chalk.cyan("---"));
|
|
427
|
-
console.log(chalk.cyan(yamlContent));
|
|
428
|
-
console.log(chalk.cyan("---"));
|
|
429
426
|
console.log("💡 You can edit this file at any time to change your settings.\n");
|
|
430
|
-
console.log(`🚀 To generate your documentation, run: ${chalk.cyan("aigne doc
|
|
427
|
+
console.log(`🚀 To generate your documentation, run: ${chalk.cyan("aigne doc create")}\n`);
|
|
431
428
|
|
|
432
429
|
if (skipIfExists) {
|
|
433
430
|
return loadConfig({ config: filePath, appUrl });
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
type: team
|
|
2
|
-
name:
|
|
2
|
+
name: localize
|
|
3
|
+
alias:
|
|
4
|
+
- translate
|
|
3
5
|
description: Translate documents into other languages
|
|
4
6
|
skills:
|
|
5
7
|
- url: ../init/index.mjs
|
|
@@ -28,11 +30,11 @@ skills:
|
|
|
28
30
|
- url: ../utils/choose-docs.mjs
|
|
29
31
|
default_input:
|
|
30
32
|
isTranslate: true
|
|
31
|
-
- ../
|
|
33
|
+
- ../localize/choose-language.mjs
|
|
32
34
|
- type: team
|
|
33
35
|
name: batchTranslateDocument
|
|
34
36
|
skills:
|
|
35
|
-
- ../
|
|
37
|
+
- ../localize/translate-multilingual.yaml
|
|
36
38
|
iterate_on: selectedDocs
|
|
37
39
|
concurrency: 10
|
|
38
40
|
- url: ../utils/check-feedback-refiner.mjs
|
|
@@ -2,10 +2,10 @@ type: team
|
|
|
2
2
|
task_render_mode: collapse
|
|
3
3
|
name: generateDiagram
|
|
4
4
|
skills:
|
|
5
|
-
- ../
|
|
6
|
-
- ../
|
|
5
|
+
- ../create/draw-diagram.yaml
|
|
6
|
+
- ../create/wrap-diagram-code.mjs
|
|
7
7
|
reflection:
|
|
8
|
-
reviewer: ../
|
|
8
|
+
reviewer: ../create/check-diagram.mjs
|
|
9
9
|
is_approved: isValid
|
|
10
10
|
max_iterations: 5
|
|
11
11
|
return_last_on_max_iterations: false
|
|
@@ -47,7 +47,7 @@ export default async function chooseDocs(
|
|
|
47
47
|
if (mainLanguageFiles.length === 0) {
|
|
48
48
|
throw new Error(
|
|
49
49
|
`No documents found in the docs directory. You can generate them with ${chalk.yellow(
|
|
50
|
-
"`aigne doc
|
|
50
|
+
"`aigne doc create`",
|
|
51
51
|
)}`,
|
|
52
52
|
);
|
|
53
53
|
}
|
|
@@ -76,7 +76,7 @@ export default async function findItemByPath(
|
|
|
76
76
|
console.debug(error?.message);
|
|
77
77
|
throw new Error(
|
|
78
78
|
getActionText(
|
|
79
|
-
"Please run 'aigne doc
|
|
79
|
+
"Please run 'aigne doc create' first to create documents, then select which document to {action}",
|
|
80
80
|
docAction,
|
|
81
81
|
),
|
|
82
82
|
);
|
|
@@ -37,7 +37,7 @@ export default async function postGenerate({
|
|
|
37
37
|
✅ Documentation generated successfully! (\`${documentStructure.length}\` documents → \`${docsDir}\`)
|
|
38
38
|
${projectInfoMessage || ""}
|
|
39
39
|
🚀 Next: Make your documentation live and generate a shareable link, run: \`aigne doc publish\`
|
|
40
|
-
💡 Optional: Update specific document (\`aigne doc update\`) or refine documentation structure (\`aigne doc
|
|
40
|
+
💡 Optional: Update specific document (\`aigne doc update\`) or refine documentation structure (\`aigne doc create\`)
|
|
41
41
|
`;
|
|
42
42
|
|
|
43
43
|
// Shutdown mermaid worker pool to ensure clean exit
|
package/aigne.yaml
CHANGED
|
@@ -13,19 +13,19 @@ agents:
|
|
|
13
13
|
- ./agents/init/index.mjs
|
|
14
14
|
|
|
15
15
|
# Documentation Structure Generation
|
|
16
|
-
- ./agents/
|
|
17
|
-
- ./agents/
|
|
18
|
-
- ./agents/
|
|
19
|
-
- ./agents/
|
|
20
|
-
- ./agents/
|
|
21
|
-
- ./agents/
|
|
22
|
-
- ./agents/
|
|
16
|
+
- ./agents/create/generate-structure.yaml
|
|
17
|
+
- ./agents/create/update-document-structure.yaml
|
|
18
|
+
- ./agents/create/check-need-generate-structure.mjs
|
|
19
|
+
- ./agents/create/refine-document-structure.yaml
|
|
20
|
+
- ./agents/create/check-document-structure.yaml
|
|
21
|
+
- ./agents/create/user-review-document-structure.mjs
|
|
22
|
+
- ./agents/create/index.yaml
|
|
23
23
|
|
|
24
24
|
# Documentation Structure Tools
|
|
25
|
-
- ./agents/
|
|
26
|
-
- ./agents/
|
|
27
|
-
- ./agents/
|
|
28
|
-
- ./agents/
|
|
25
|
+
- ./agents/create/document-structure-tools/add-document.mjs
|
|
26
|
+
- ./agents/create/document-structure-tools/delete-document.mjs
|
|
27
|
+
- ./agents/create/document-structure-tools/update-document.mjs
|
|
28
|
+
- ./agents/create/document-structure-tools/move-document.mjs
|
|
29
29
|
|
|
30
30
|
# Document Content Generation & Updates
|
|
31
31
|
- ./agents/update/batch-generate-document.yaml
|
|
@@ -42,10 +42,10 @@ agents:
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
# Translation
|
|
45
|
-
- ./agents/
|
|
46
|
-
- ./agents/
|
|
47
|
-
- ./agents/
|
|
48
|
-
- ./agents/
|
|
45
|
+
- ./agents/localize/translate-document.yaml
|
|
46
|
+
- ./agents/localize/translate-multilingual.yaml
|
|
47
|
+
- ./agents/localize/choose-language.mjs
|
|
48
|
+
- ./agents/localize/index.yaml
|
|
49
49
|
|
|
50
50
|
# Publishing
|
|
51
51
|
- ./agents/publish/publish-docs.mjs
|
|
@@ -79,7 +79,6 @@ agents:
|
|
|
79
79
|
- ./agents/utils/check-feedback-refiner.mjs
|
|
80
80
|
- ./agents/utils/feedback-refiner.yaml
|
|
81
81
|
- ./agents/utils/analyze-feedback-intent.yaml
|
|
82
|
-
- ./agents/utils/list-docs.mjs
|
|
83
82
|
|
|
84
83
|
- ./agents/utils/document-title-streamline.yaml
|
|
85
84
|
- ./agents/utils/streamline-document-titles-if-needed.mjs
|
|
@@ -88,7 +87,7 @@ agents:
|
|
|
88
87
|
|
|
89
88
|
# User Preferences & Chat
|
|
90
89
|
- ./agents/prefs/index.mjs
|
|
91
|
-
- ./agents/chat/index.
|
|
90
|
+
- ./agents/chat/index.mjs
|
|
92
91
|
|
|
93
92
|
# Documentation MCP Server
|
|
94
93
|
- ./docs-mcp/get-docs-structure.mjs
|
|
@@ -106,18 +105,18 @@ agents:
|
|
|
106
105
|
- ./agents/evaluate/code-snippet.mjs
|
|
107
106
|
|
|
108
107
|
# Diagram
|
|
109
|
-
- ./agents/
|
|
108
|
+
- ./agents/create/merge-diagram.yaml
|
|
110
109
|
- ./agents/update/generate-diagram.yaml
|
|
111
110
|
- ./agents/update/check-generate-diagram.mjs
|
|
112
111
|
- ./agents/update/pre-check-generate-diagram.yaml
|
|
113
112
|
cli:
|
|
114
|
-
chat: ./agents/chat/index.
|
|
113
|
+
chat: ./agents/chat/index.mjs
|
|
115
114
|
agents:
|
|
116
115
|
- ./agents/init/index.mjs
|
|
117
|
-
- ./agents/
|
|
116
|
+
- ./agents/create/index.yaml
|
|
118
117
|
- ./agents/update/index.yaml
|
|
119
118
|
- ./agents/publish/index.yaml
|
|
120
|
-
- ./agents/
|
|
119
|
+
- ./agents/localize/index.yaml
|
|
121
120
|
- ./agents/clear/index.yaml
|
|
122
121
|
- ./agents/prefs/index.mjs
|
|
123
122
|
- ./agents/evaluate/index.yaml
|
package/package.json
CHANGED
package/utils/history-utils.mjs
CHANGED
|
@@ -34,7 +34,7 @@ export function ensureGitRepo() {
|
|
|
34
34
|
execSync("git init", { cwd, stdio: "ignore" });
|
|
35
35
|
|
|
36
36
|
// Create .gitignore to exclude temporary files
|
|
37
|
-
const gitignore = "*.tmp\n";
|
|
37
|
+
const gitignore = "*.tmp\n.local/\n";
|
|
38
38
|
writeFileSync(join(cwd, ".gitignore"), gitignore);
|
|
39
39
|
|
|
40
40
|
// Initial commit
|
package/utils/openapi/index.mjs
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import { parse } from "yaml";
|
|
2
2
|
|
|
3
|
+
function isMatchOpenAPISpec(content) {
|
|
4
|
+
if (!content) return false;
|
|
5
|
+
if (!(content.openapi || content.swagger)) return false;
|
|
6
|
+
if (!content.paths) return false;
|
|
7
|
+
if (!(content.info?.title && content.info?.version)) return false;
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
|
|
3
11
|
export function isOpenAPISpecFile(content) {
|
|
4
12
|
const trimmedContent = content.trim();
|
|
5
13
|
try {
|
|
6
14
|
const parsed = parse(trimmedContent, {
|
|
7
15
|
logLevel: "silent",
|
|
8
16
|
});
|
|
9
|
-
|
|
10
|
-
return true;
|
|
11
|
-
}
|
|
17
|
+
return isMatchOpenAPISpec(parsed);
|
|
12
18
|
} catch {
|
|
13
19
|
//
|
|
14
20
|
}
|
|
15
21
|
try {
|
|
16
22
|
const parsed = JSON.parse(trimmedContent);
|
|
17
|
-
|
|
18
|
-
return true;
|
|
19
|
-
}
|
|
23
|
+
return isMatchOpenAPISpec(parsed);
|
|
20
24
|
} catch {
|
|
21
25
|
//
|
|
22
26
|
}
|
package/agents/chat/index.yaml
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
type: ai
|
|
2
|
-
name: chat
|
|
3
|
-
description: Start interactive document generation assistant
|
|
4
|
-
instructions:
|
|
5
|
-
url: ./chat-system.md
|
|
6
|
-
input_key: message
|
|
7
|
-
afs:
|
|
8
|
-
modules:
|
|
9
|
-
- module: system-fs
|
|
10
|
-
options:
|
|
11
|
-
path: .
|
|
12
|
-
mount: /source
|
|
13
|
-
description: Project root directory for document generation
|
|
14
|
-
afs_config:
|
|
15
|
-
inject_History: true
|
|
16
|
-
skills:
|
|
17
|
-
- ./skills/generate-document.yaml
|
|
18
|
-
- ./skills/update-document.yaml
|
|
19
|
-
- ../publish/index.yaml
|
|
20
|
-
- ../translate/index.yaml
|
|
21
|
-
- ../utils/exit.mjs
|
|
22
|
-
- ../utils/list-docs.mjs
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|