@aigne/doc-smith 0.9.0 → 0.9.1

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/README.md +10 -11
  3. package/agents/chat/chat-system.md +7 -1
  4. package/agents/chat/index.mjs +53 -0
  5. package/agents/chat/skills/generate-document.yaml +1 -1
  6. package/agents/{utils/list-docs.mjs → chat/skills/list-documents.mjs} +4 -4
  7. package/agents/chat/skills/update-document.yaml +1 -1
  8. package/agents/{generate → create}/check-need-generate-structure.mjs +1 -1
  9. package/agents/{generate → create}/index.yaml +3 -3
  10. package/agents/init/check.mjs +1 -1
  11. package/agents/init/index.mjs +1 -4
  12. package/agents/{translate → localize}/index.yaml +5 -3
  13. package/agents/{translate → localize}/translate-multilingual.yaml +1 -1
  14. package/agents/publish/publish-docs.mjs +10 -2
  15. package/agents/update/generate-diagram.yaml +3 -3
  16. package/agents/utils/choose-docs.mjs +1 -1
  17. package/agents/utils/find-item-by-path.mjs +1 -1
  18. package/agents/utils/post-generate.mjs +1 -1
  19. package/aigne.yaml +20 -21
  20. package/package.json +1 -1
  21. package/utils/auth-utils.mjs +3 -2
  22. package/utils/history-utils.mjs +1 -1
  23. package/utils/openapi/index.mjs +10 -6
  24. package/agents/chat/index.yaml +0 -22
  25. /package/agents/{generate → create}/check-diagram.mjs +0 -0
  26. /package/agents/{generate → create}/check-document-structure.yaml +0 -0
  27. /package/agents/{generate → create}/document-structure-tools/add-document.mjs +0 -0
  28. /package/agents/{generate → create}/document-structure-tools/delete-document.mjs +0 -0
  29. /package/agents/{generate → create}/document-structure-tools/move-document.mjs +0 -0
  30. /package/agents/{generate → create}/document-structure-tools/update-document.mjs +0 -0
  31. /package/agents/{generate → create}/draw-diagram.yaml +0 -0
  32. /package/agents/{generate → create}/generate-structure.yaml +0 -0
  33. /package/agents/{generate → create}/merge-diagram.yaml +0 -0
  34. /package/agents/{generate → create}/refine-document-structure.yaml +0 -0
  35. /package/agents/{generate → create}/update-document-structure.yaml +0 -0
  36. /package/agents/{generate → create}/user-review-document-structure.mjs +0 -0
  37. /package/agents/{generate → create}/utils/merge-document-structures.mjs +0 -0
  38. /package/agents/{generate → create}/wrap-diagram-code.mjs +0 -0
  39. /package/agents/{translate → localize}/choose-language.mjs +0 -0
  40. /package/agents/{translate → localize}/record-translation-history.mjs +0 -0
  41. /package/agents/{translate → localize}/translate-document.yaml +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.9.1](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.9.1-beta...v0.9.1) (2025-11-12)
4
+
5
+ ## [0.9.1-beta](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.9.0...v0.9.1-beta) (2025-11-12)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * 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))
11
+ * 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))
12
+
3
13
  ## [0.9.0](https://github.com/AIGNE-io/aigne-doc-smith/compare/v0.9.0-beta.1...v0.9.0) (2025-11-11)
4
14
 
5
15
  ## [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 generate
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 generate --model google:gemini-2.5-pro
109
- aigne doc generate --model anthropic:claude-sonnet-4-5
110
- aigne doc generate --model openai:gpt-4o
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 generate
129
+ aigne doc create
130
130
 
131
131
  # Force a complete regeneration of the documentation
132
- aigne doc generate --forceRegenerate
132
+ aigne doc create --forceRegenerate
133
133
 
134
134
  # Generate with custom feedback
135
- aigne doc generate --feedback "Add more API examples and troubleshooting sections"
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 translate
152
+ aigne doc localize
153
153
 
154
154
  # Translate specific documents into multiple languages
155
- aigne doc translate --langs zh --langs ja --docs examples.md --docs overview.md
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 translate --glossary @path/to/glossary.md --feedback "Use technical terminology consistently"
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
- - listDocs: This skill lists all available documentation files in the system.
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
+ };
@@ -10,6 +10,6 @@ input_schema:
10
10
  required:
11
11
  - feedback
12
12
  skills:
13
- - url: ../../generate/index.yaml
13
+ - url: ../../create/index.yaml
14
14
  default_input:
15
15
  isChat: true
@@ -1,7 +1,7 @@
1
- import { getMainLanguageFiles } from "../../utils/docs-finder-utils.mjs";
2
- import init from "../init/index.mjs";
1
+ import { getMainLanguageFiles } from "../../../utils/docs-finder-utils.mjs";
2
+ import init from "../../init/index.mjs";
3
3
 
4
- export default async function listDocs(_, options) {
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
- listDocs.description = "List all available documentation files";
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 listDocs output
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 generate` to continue.");
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: generate
2
+ name: create
3
3
  alias:
4
+ - generate
4
5
  - gen
5
- - g
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:
@@ -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 generate`")}`,
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
  }
@@ -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 generate")}\n`);
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: translate
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
- - ../translate/choose-language.mjs
33
+ - ../localize/choose-language.mjs
32
34
  - type: team
33
35
  name: batchTranslateDocument
34
36
  skills:
35
- - ../translate/translate-multilingual.yaml
37
+ - ../localize/translate-multilingual.yaml
36
38
  iterate_on: selectedDocs
37
39
  concurrency: 10
38
40
  - url: ../utils/check-feedback-refiner.mjs
@@ -9,7 +9,7 @@ skills:
9
9
  - url: ../utils/find-user-preferences-by-path.mjs
10
10
  default_input:
11
11
  scope: translation
12
- - ../translate/translate-document.yaml
12
+ - ../localize/translate-document.yaml
13
13
  - type: transform
14
14
  jsonata: |
15
15
  $merge([
@@ -52,11 +52,19 @@ export default async function publishDocs(
52
52
 
53
53
  // ----------------- main publish process flow -----------------------------
54
54
  // Check if DOC_DISCUSS_KIT_URL is set in environment variables
55
- const useEnvAppUrl = !!(process.env.DOC_DISCUSS_KIT_URL || appUrl);
55
+ const useEnvAppUrl = !!(
56
+ process.env.DOC_SMITH_PUBLISH_URL ||
57
+ process.env.DOC_DISCUSS_KIT_URL ||
58
+ appUrl
59
+ );
56
60
 
57
61
  // Check if appUrl is default and not saved in config (only when not using env variable)
58
62
  const config = await loadConfigFromFile();
59
- appUrl = process.env.DOC_DISCUSS_KIT_URL || appUrl || config?.appUrl;
63
+ appUrl =
64
+ process.env.DOC_SMITH_PUBLISH_URL ||
65
+ process.env.DOC_DISCUSS_KIT_URL ||
66
+ appUrl ||
67
+ config?.appUrl;
60
68
  const hasInputAppUrl = !!appUrl;
61
69
 
62
70
  let shouldSyncBranding = void 0;
@@ -2,10 +2,10 @@ type: team
2
2
  task_render_mode: collapse
3
3
  name: generateDiagram
4
4
  skills:
5
- - ../generate/draw-diagram.yaml
6
- - ../generate/wrap-diagram-code.mjs
5
+ - ../create/draw-diagram.yaml
6
+ - ../create/wrap-diagram-code.mjs
7
7
  reflection:
8
- reviewer: ../generate/check-diagram.mjs
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 generate`",
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 generate' first to generate documents, then select which document to {action}",
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 generate\`)
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/generate/generate-structure.yaml
17
- - ./agents/generate/update-document-structure.yaml
18
- - ./agents/generate/check-need-generate-structure.mjs
19
- - ./agents/generate/refine-document-structure.yaml
20
- - ./agents/generate/check-document-structure.yaml
21
- - ./agents/generate/user-review-document-structure.mjs
22
- - ./agents/generate/index.yaml
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/generate/document-structure-tools/add-document.mjs
26
- - ./agents/generate/document-structure-tools/delete-document.mjs
27
- - ./agents/generate/document-structure-tools/update-document.mjs
28
- - ./agents/generate/document-structure-tools/move-document.mjs
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/translate/translate-document.yaml
46
- - ./agents/translate/translate-multilingual.yaml
47
- - ./agents/translate/choose-language.mjs
48
- - ./agents/translate/index.yaml
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.yaml
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/generate/merge-diagram.yaml
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.yaml
113
+ chat: ./agents/chat/index.mjs
115
114
  agents:
116
115
  - ./agents/init/index.mjs
117
- - ./agents/generate/index.yaml
116
+ - ./agents/create/index.yaml
118
117
  - ./agents/update/index.yaml
119
118
  - ./agents/publish/index.yaml
120
- - ./agents/translate/index.yaml
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aigne/doc-smith",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "AI-driven documentation generation tool built on the AIGNE Framework",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -37,7 +37,8 @@ export async function getAccessToken(appUrl, ltToken = "") {
37
37
  const { hostname } = new URL(appUrl);
38
38
  const DOC_SMITH_ENV_FILE = getDocSmithEnvFilePath();
39
39
 
40
- let accessToken = process.env.DOC_DISCUSS_KIT_ACCESS_TOKEN;
40
+ let accessToken =
41
+ process.env.DOC_SMITH_PUBLISH_ACCESS_TOKEN || process.env.DOC_DISCUSS_KIT_ACCESS_TOKEN;
41
42
 
42
43
  // Check if access token exists in environment or config file
43
44
  if (!accessToken) {
@@ -117,7 +118,7 @@ export async function getAccessToken(appUrl, ltToken = "") {
117
118
  });
118
119
 
119
120
  accessToken = result.accessKeySecret;
120
- process.env.DOC_DISCUSS_KIT_ACCESS_TOKEN = accessToken;
121
+ process.env.DOC_SMITH_PUBLISH_ACCESS_TOKEN = accessToken;
121
122
 
122
123
  // Save the access token to config file
123
124
  const aigneDir = join(homedir(), ".aigne");
@@ -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
@@ -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
- if (parsed.openapi || parsed.swagger) {
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
- if (parsed.openapi || parsed.swagger) {
18
- return true;
19
- }
23
+ return isMatchOpenAPISpec(parsed);
20
24
  } catch {
21
25
  //
22
26
  }
@@ -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