@aigne/doc-smith 0.8.12-beta.8 → 0.8.12

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 (264) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/agents/publish/index.yaml +4 -0
  3. package/agents/publish/publish-docs.mjs +77 -5
  4. package/agents/publish/translate-meta.mjs +103 -0
  5. package/agents/update/generate-document.yaml +30 -28
  6. package/agents/update/update-document-detail.yaml +3 -1
  7. package/agents/utils/update-branding.mjs +69 -0
  8. package/package.json +16 -2
  9. package/prompts/common/document/role-and-personality.md +3 -1
  10. package/prompts/detail/d2-diagram/guide.md +7 -1
  11. package/prompts/detail/d2-diagram/user-prompt.md +3 -0
  12. package/prompts/detail/generate/system-prompt.md +6 -7
  13. package/prompts/detail/generate/user-prompt.md +12 -3
  14. package/prompts/detail/update/user-prompt.md +0 -2
  15. package/prompts/structure/update/user-prompt.md +0 -4
  16. package/utils/file-utils.mjs +69 -24
  17. package/utils/markdown-checker.mjs +0 -20
  18. package/utils/request.mjs +7 -0
  19. package/utils/upload-files.mjs +231 -0
  20. package/utils/utils.mjs +11 -1
  21. package/.aigne/doc-smith/config.yaml +0 -77
  22. package/.aigne/doc-smith/history.yaml +0 -37
  23. package/.aigne/doc-smith/media-description.yaml +0 -91
  24. package/.aigne/doc-smith/output/structure-plan.json +0 -162
  25. package/.aigne/doc-smith/preferences.yml +0 -97
  26. package/.aigne/doc-smith/upload-cache.yaml +0 -1830
  27. package/.github/PULL_REQUEST_TEMPLATE.md +0 -28
  28. package/.github/workflows/ci.yml +0 -54
  29. package/.github/workflows/create-release-pr.yaml +0 -21
  30. package/.github/workflows/publish-docs.yml +0 -65
  31. package/.github/workflows/release.yml +0 -49
  32. package/.github/workflows/reviewer.yml +0 -54
  33. package/.release-please-manifest.json +0 -3
  34. package/RELEASE.md +0 -9
  35. package/assets/screenshots/doc-complete-setup.png +0 -0
  36. package/assets/screenshots/doc-generate-docs.png +0 -0
  37. package/assets/screenshots/doc-generate.png +0 -0
  38. package/assets/screenshots/doc-generated-successfully.png +0 -0
  39. package/assets/screenshots/doc-publish.png +0 -0
  40. package/assets/screenshots/doc-regenerate.png +0 -0
  41. package/assets/screenshots/doc-translate-langs.png +0 -0
  42. package/assets/screenshots/doc-translate.png +0 -0
  43. package/assets/screenshots/doc-update.png +0 -0
  44. package/biome.json +0 -73
  45. package/codecov.yml +0 -15
  46. package/docs/_sidebar.md +0 -15
  47. package/docs/configuration-initial-setup.ja.md +0 -179
  48. package/docs/configuration-initial-setup.md +0 -198
  49. package/docs/configuration-initial-setup.zh-TW.md +0 -179
  50. package/docs/configuration-initial-setup.zh.md +0 -179
  51. package/docs/configuration-managing-preferences.ja.md +0 -100
  52. package/docs/configuration-managing-preferences.md +0 -100
  53. package/docs/configuration-managing-preferences.zh-TW.md +0 -100
  54. package/docs/configuration-managing-preferences.zh.md +0 -100
  55. package/docs/configuration.ja.md +0 -69
  56. package/docs/configuration.md +0 -69
  57. package/docs/configuration.zh-TW.md +0 -69
  58. package/docs/configuration.zh.md +0 -69
  59. package/docs/getting-started.ja.md +0 -107
  60. package/docs/getting-started.md +0 -107
  61. package/docs/getting-started.zh-TW.md +0 -107
  62. package/docs/getting-started.zh.md +0 -107
  63. package/docs/guides-cleaning-up.ja.md +0 -51
  64. package/docs/guides-cleaning-up.md +0 -52
  65. package/docs/guides-cleaning-up.zh-TW.md +0 -51
  66. package/docs/guides-cleaning-up.zh.md +0 -51
  67. package/docs/guides-evaluating-documents.ja.md +0 -66
  68. package/docs/guides-evaluating-documents.md +0 -107
  69. package/docs/guides-evaluating-documents.zh-TW.md +0 -66
  70. package/docs/guides-evaluating-documents.zh.md +0 -66
  71. package/docs/guides-generating-documentation.ja.md +0 -151
  72. package/docs/guides-generating-documentation.md +0 -89
  73. package/docs/guides-generating-documentation.zh-TW.md +0 -151
  74. package/docs/guides-generating-documentation.zh.md +0 -151
  75. package/docs/guides-interactive-chat.ja.md +0 -85
  76. package/docs/guides-interactive-chat.md +0 -93
  77. package/docs/guides-interactive-chat.zh-TW.md +0 -85
  78. package/docs/guides-interactive-chat.zh.md +0 -85
  79. package/docs/guides-managing-history.ja.md +0 -48
  80. package/docs/guides-managing-history.md +0 -53
  81. package/docs/guides-managing-history.zh-TW.md +0 -48
  82. package/docs/guides-managing-history.zh.md +0 -48
  83. package/docs/guides-publishing-your-docs.ja.md +0 -78
  84. package/docs/guides-publishing-your-docs.md +0 -83
  85. package/docs/guides-publishing-your-docs.zh-TW.md +0 -78
  86. package/docs/guides-publishing-your-docs.zh.md +0 -78
  87. package/docs/guides-translating-documentation.ja.md +0 -95
  88. package/docs/guides-translating-documentation.md +0 -100
  89. package/docs/guides-translating-documentation.zh-TW.md +0 -95
  90. package/docs/guides-translating-documentation.zh.md +0 -95
  91. package/docs/guides-updating-documentation.ja.md +0 -77
  92. package/docs/guides-updating-documentation.md +0 -79
  93. package/docs/guides-updating-documentation.zh-TW.md +0 -77
  94. package/docs/guides-updating-documentation.zh.md +0 -77
  95. package/docs/guides.ja.md +0 -32
  96. package/docs/guides.md +0 -32
  97. package/docs/guides.zh-TW.md +0 -32
  98. package/docs/guides.zh.md +0 -32
  99. package/docs/overview.ja.md +0 -61
  100. package/docs/overview.md +0 -61
  101. package/docs/overview.zh-TW.md +0 -61
  102. package/docs/overview.zh.md +0 -61
  103. package/docs/release-notes.ja.md +0 -255
  104. package/docs/release-notes.md +0 -288
  105. package/docs/release-notes.zh-TW.md +0 -255
  106. package/docs/release-notes.zh.md +0 -255
  107. package/prompts/common/afs/afs-tools-usage.md +0 -5
  108. package/prompts/common/afs/use-afs-instruction.md +0 -1
  109. package/release-please-config.json +0 -14
  110. package/tests/agents/chat/chat.test.mjs +0 -46
  111. package/tests/agents/clear/choose-contents.test.mjs +0 -284
  112. package/tests/agents/clear/clear-auth-tokens.test.mjs +0 -268
  113. package/tests/agents/clear/clear-document-config.test.mjs +0 -167
  114. package/tests/agents/clear/clear-document-structure.test.mjs +0 -380
  115. package/tests/agents/clear/clear-generated-docs.test.mjs +0 -222
  116. package/tests/agents/evaluate/code-snippet.test.mjs +0 -163
  117. package/tests/agents/evaluate/fixtures/api-services.md +0 -87
  118. package/tests/agents/evaluate/fixtures/js-sdk.md +0 -94
  119. package/tests/agents/evaluate/generate-report.test.mjs +0 -312
  120. package/tests/agents/generate/check-document-structure.test.mjs +0 -45
  121. package/tests/agents/generate/check-need-generate-structure.test.mjs +0 -279
  122. package/tests/agents/generate/document-structure-tools/add-document.test.mjs +0 -449
  123. package/tests/agents/generate/document-structure-tools/delete-document.test.mjs +0 -410
  124. package/tests/agents/generate/document-structure-tools/generate-sub-structure.test.mjs +0 -277
  125. package/tests/agents/generate/document-structure-tools/move-document.test.mjs +0 -476
  126. package/tests/agents/generate/document-structure-tools/update-document.test.mjs +0 -548
  127. package/tests/agents/generate/generate-structure.test.mjs +0 -45
  128. package/tests/agents/generate/user-review-document-structure.test.mjs +0 -319
  129. package/tests/agents/history/view.test.mjs +0 -97
  130. package/tests/agents/init/init.test.mjs +0 -1657
  131. package/tests/agents/prefs/prefs.test.mjs +0 -431
  132. package/tests/agents/publish/publish-docs.test.mjs +0 -787
  133. package/tests/agents/translate/choose-language.test.mjs +0 -311
  134. package/tests/agents/translate/translate-document.test.mjs +0 -51
  135. package/tests/agents/update/check-document.test.mjs +0 -463
  136. package/tests/agents/update/check-update-is-single.test.mjs +0 -300
  137. package/tests/agents/update/document-tools/update-document-content.test.mjs +0 -329
  138. package/tests/agents/update/generate-document.test.mjs +0 -51
  139. package/tests/agents/update/save-and-translate-document.test.mjs +0 -369
  140. package/tests/agents/update/user-review-document.test.mjs +0 -582
  141. package/tests/agents/utils/action-success.test.mjs +0 -54
  142. package/tests/agents/utils/check-detail-result.test.mjs +0 -743
  143. package/tests/agents/utils/check-feedback-refiner.test.mjs +0 -478
  144. package/tests/agents/utils/choose-docs.test.mjs +0 -406
  145. package/tests/agents/utils/exit.test.mjs +0 -70
  146. package/tests/agents/utils/feedback-refiner.test.mjs +0 -51
  147. package/tests/agents/utils/find-item-by-path.test.mjs +0 -517
  148. package/tests/agents/utils/find-user-preferences-by-path.test.mjs +0 -382
  149. package/tests/agents/utils/format-document-structure.test.mjs +0 -364
  150. package/tests/agents/utils/fs.test.mjs +0 -267
  151. package/tests/agents/utils/load-sources.test.mjs +0 -1470
  152. package/tests/agents/utils/save-docs.test.mjs +0 -109
  153. package/tests/agents/utils/save-output.test.mjs +0 -315
  154. package/tests/agents/utils/save-single-doc.test.mjs +0 -364
  155. package/tests/agents/utils/transform-detail-datasources.test.mjs +0 -320
  156. package/tests/utils/auth-utils.test.mjs +0 -596
  157. package/tests/utils/blocklet.test.mjs +0 -336
  158. package/tests/utils/conflict-detector.test.mjs +0 -355
  159. package/tests/utils/constants.test.mjs +0 -295
  160. package/tests/utils/d2-utils.test.mjs +0 -437
  161. package/tests/utils/deploy.test.mjs +0 -399
  162. package/tests/utils/docs-finder-utils.test.mjs +0 -650
  163. package/tests/utils/file-utils.test.mjs +0 -521
  164. package/tests/utils/history-utils.test.mjs +0 -206
  165. package/tests/utils/kroki-utils.test.mjs +0 -646
  166. package/tests/utils/linter/fixtures/css/keyword-error.css +0 -1
  167. package/tests/utils/linter/fixtures/css/missing-semicolon.css +0 -1
  168. package/tests/utils/linter/fixtures/css/syntax-error.css +0 -1
  169. package/tests/utils/linter/fixtures/css/undeclare-variable.css +0 -1
  170. package/tests/utils/linter/fixtures/css/unused-variable.css +0 -2
  171. package/tests/utils/linter/fixtures/css/valid-code.css +0 -1
  172. package/tests/utils/linter/fixtures/dockerfile/keyword-error.dockerfile +0 -1
  173. package/tests/utils/linter/fixtures/dockerfile/missing-semicolon.dockerfile +0 -2
  174. package/tests/utils/linter/fixtures/dockerfile/syntax-error.dockerfile +0 -2
  175. package/tests/utils/linter/fixtures/dockerfile/undeclare-variable.dockerfile +0 -1
  176. package/tests/utils/linter/fixtures/dockerfile/unused-variable.dockerfile +0 -1
  177. package/tests/utils/linter/fixtures/dockerfile/valid-code.dockerfile +0 -2
  178. package/tests/utils/linter/fixtures/go/keyword-error.go +0 -5
  179. package/tests/utils/linter/fixtures/go/missing-semicolon.go +0 -5
  180. package/tests/utils/linter/fixtures/go/syntax-error.go +0 -6
  181. package/tests/utils/linter/fixtures/go/undeclare-variable.go +0 -5
  182. package/tests/utils/linter/fixtures/go/unused-variable.go +0 -5
  183. package/tests/utils/linter/fixtures/go/valid-code.go +0 -7
  184. package/tests/utils/linter/fixtures/js/keyword-error.js +0 -3
  185. package/tests/utils/linter/fixtures/js/missing-semicolon.js +0 -6
  186. package/tests/utils/linter/fixtures/js/syntax-error.js +0 -4
  187. package/tests/utils/linter/fixtures/js/undeclare-variable.js +0 -3
  188. package/tests/utils/linter/fixtures/js/unused-variable.js +0 -7
  189. package/tests/utils/linter/fixtures/js/valid-code.js +0 -15
  190. package/tests/utils/linter/fixtures/json/keyword-error.json +0 -1
  191. package/tests/utils/linter/fixtures/json/missing-semicolon.json +0 -1
  192. package/tests/utils/linter/fixtures/json/syntax-error.json +0 -1
  193. package/tests/utils/linter/fixtures/json/undeclare-variable.json +0 -1
  194. package/tests/utils/linter/fixtures/json/unused-variable.json +0 -1
  195. package/tests/utils/linter/fixtures/json/valid-code.json +0 -1
  196. package/tests/utils/linter/fixtures/jsx/keyword-error.jsx +0 -5
  197. package/tests/utils/linter/fixtures/jsx/missing-semicolon.jsx +0 -5
  198. package/tests/utils/linter/fixtures/jsx/syntax-error.jsx +0 -5
  199. package/tests/utils/linter/fixtures/jsx/undeclare-variable.jsx +0 -5
  200. package/tests/utils/linter/fixtures/jsx/unused-variable.jsx +0 -4
  201. package/tests/utils/linter/fixtures/jsx/valid-code.jsx +0 -5
  202. package/tests/utils/linter/fixtures/python/keyword-error.py +0 -3
  203. package/tests/utils/linter/fixtures/python/missing-semicolon.py +0 -2
  204. package/tests/utils/linter/fixtures/python/syntax-error.py +0 -3
  205. package/tests/utils/linter/fixtures/python/undeclare-variable.py +0 -3
  206. package/tests/utils/linter/fixtures/python/unused-variable.py +0 -6
  207. package/tests/utils/linter/fixtures/python/valid-code.py +0 -12
  208. package/tests/utils/linter/fixtures/ruby/keyword-error.rb +0 -2
  209. package/tests/utils/linter/fixtures/ruby/missing-semicolon.rb +0 -1
  210. package/tests/utils/linter/fixtures/ruby/syntax-error.rb +0 -2
  211. package/tests/utils/linter/fixtures/ruby/undeclare-variable.rb +0 -1
  212. package/tests/utils/linter/fixtures/ruby/unused-variable.rb +0 -2
  213. package/tests/utils/linter/fixtures/ruby/valid-code.rb +0 -1
  214. package/tests/utils/linter/fixtures/sass/keyword-error.sass +0 -2
  215. package/tests/utils/linter/fixtures/sass/missing-semicolon.sass +0 -3
  216. package/tests/utils/linter/fixtures/sass/syntax-error.sass +0 -3
  217. package/tests/utils/linter/fixtures/sass/undeclare-variable.sass +0 -2
  218. package/tests/utils/linter/fixtures/sass/unused-variable.sass +0 -4
  219. package/tests/utils/linter/fixtures/sass/valid-code.sass +0 -2
  220. package/tests/utils/linter/fixtures/scss/keyword-error.scss +0 -1
  221. package/tests/utils/linter/fixtures/scss/missing-semicolon.scss +0 -1
  222. package/tests/utils/linter/fixtures/scss/syntax-error.scss +0 -1
  223. package/tests/utils/linter/fixtures/scss/undeclare-variable.scss +0 -1
  224. package/tests/utils/linter/fixtures/scss/unused-variable.scss +0 -2
  225. package/tests/utils/linter/fixtures/scss/valid-code.scss +0 -1
  226. package/tests/utils/linter/fixtures/shell/keyword-error.sh +0 -5
  227. package/tests/utils/linter/fixtures/shell/missing-semicolon.sh +0 -3
  228. package/tests/utils/linter/fixtures/shell/syntax-error.sh +0 -4
  229. package/tests/utils/linter/fixtures/shell/undeclare-variable.sh +0 -3
  230. package/tests/utils/linter/fixtures/shell/unused-variable.sh +0 -4
  231. package/tests/utils/linter/fixtures/shell/valid-code.sh +0 -3
  232. package/tests/utils/linter/fixtures/ts/keyword-error.ts +0 -1
  233. package/tests/utils/linter/fixtures/ts/missing-semicolon.ts +0 -1
  234. package/tests/utils/linter/fixtures/ts/syntax-error.ts +0 -1
  235. package/tests/utils/linter/fixtures/ts/undeclare-variable.ts +0 -1
  236. package/tests/utils/linter/fixtures/ts/unused-variable.ts +0 -3
  237. package/tests/utils/linter/fixtures/ts/valid-code.ts +0 -3
  238. package/tests/utils/linter/fixtures/tsx/keyword-error.tsx +0 -5
  239. package/tests/utils/linter/fixtures/tsx/missing-semicolon.tsx +0 -5
  240. package/tests/utils/linter/fixtures/tsx/syntax-error.tsx +0 -5
  241. package/tests/utils/linter/fixtures/tsx/undeclare-variable.tsx +0 -6
  242. package/tests/utils/linter/fixtures/tsx/unused-variable.tsx +0 -6
  243. package/tests/utils/linter/fixtures/tsx/valid-code.tsx +0 -5
  244. package/tests/utils/linter/fixtures/vue/keyword-error.vue +0 -6
  245. package/tests/utils/linter/fixtures/vue/missing-semicolon.vue +0 -6
  246. package/tests/utils/linter/fixtures/vue/syntax-error.vue +0 -6
  247. package/tests/utils/linter/fixtures/vue/undeclare-variable.vue +0 -6
  248. package/tests/utils/linter/fixtures/vue/unused-variable.vue +0 -7
  249. package/tests/utils/linter/fixtures/vue/valid-code.vue +0 -6
  250. package/tests/utils/linter/fixtures/yaml/keyword-error.yml +0 -1
  251. package/tests/utils/linter/fixtures/yaml/missing-semicolon.yml +0 -2
  252. package/tests/utils/linter/fixtures/yaml/syntax-error.yml +0 -1
  253. package/tests/utils/linter/fixtures/yaml/undeclare-variable.yml +0 -1
  254. package/tests/utils/linter/fixtures/yaml/unused-variable.yml +0 -2
  255. package/tests/utils/linter/fixtures/yaml/valid-code.yml +0 -3
  256. package/tests/utils/linter/index.test.mjs +0 -440
  257. package/tests/utils/linter/scan-results.mjs +0 -42
  258. package/tests/utils/load-config.test.mjs +0 -141
  259. package/tests/utils/markdown/index.test.mjs +0 -478
  260. package/tests/utils/mermaid-validator.test.mjs +0 -541
  261. package/tests/utils/mock-chat-model.mjs +0 -12
  262. package/tests/utils/preferences-utils.test.mjs +0 -465
  263. package/tests/utils/save-value-to-config.test.mjs +0 -483
  264. package/tests/utils/utils.test.mjs +0 -941
@@ -1,28 +0,0 @@
1
- ## Related Issue
2
-
3
- <!-- Use keywords like fixes, closes, resolves, relates to link the issue. In principle, all PRs should be associated with an issue -->
4
-
5
- ### Major Changes
6
-
7
- <!--
8
- @example:
9
- 1. Fixed xxx
10
- 2. Improved xxx
11
- 3. Adjusted xxx
12
- -->
13
-
14
- ### Screenshots
15
-
16
- <!-- If the changes are related to the UI, whether CLI or WEB, screenshots should be included -->
17
-
18
- ### Test Plan
19
-
20
- <!-- If this change is not covered by automated tests, what is your test case collection? Please write it as a to-do list below -->
21
-
22
- ### Checklist
23
-
24
- - [ ] This change requires documentation updates, and I have updated the relevant documentation. If the documentation has not been updated, please create a documentation update issue and link it here
25
- - [ ] The changes are already covered by tests, and I have adjusted the test coverage for the changed parts
26
- - [ ] The newly added code logic is also covered by tests
27
- - [ ] This change adds dependencies, and they are placed in dependencies and devDependencies
28
- - [ ] This change includes adding or updating npm dependencies, and it does not result in multiple versions of the same dependency [check the diff of pnpm-lock.yaml]
@@ -1,54 +0,0 @@
1
- name: CI
2
-
3
- env:
4
- NODE_OPTIONS: "--max_old_space_size=6144"
5
-
6
- on:
7
- push:
8
- branches:
9
- - main
10
- pull_request:
11
- branches:
12
- - main
13
-
14
- concurrency:
15
- group: ${{ github.workflow }}-${{ github.ref }}
16
- cancel-in-progress: true
17
-
18
- jobs:
19
- lint_and_test:
20
- runs-on: ubuntu-latest
21
-
22
- if: "!contains(github.event.head_commit.message, '[skip ci]')"
23
-
24
- steps:
25
- - name: Checkout repo
26
- uses: actions/checkout@v4
27
-
28
- - uses: pnpm/action-setup@v3
29
- with:
30
- version: 10
31
-
32
- - name: Setup node
33
- uses: actions/setup-node@v4
34
- with:
35
- node-version: 23
36
- cache: pnpm
37
-
38
- - name: Setup bun
39
- uses: oven-sh/setup-bun@v2
40
-
41
- - name: Install dependencies
42
- run: |
43
- pnpm install
44
-
45
- - name: Lint
46
- run: pnpm lint
47
-
48
- - name: Test
49
- run: pnpm test:coverage
50
-
51
- - name: Upload coverage reports to Codecov
52
- uses: codecov/codecov-action@v5
53
- with:
54
- token: ${{ secrets.CODECOV_TOKEN }}
@@ -1,21 +0,0 @@
1
- name: Create Release PR
2
-
3
- env:
4
- NODE_OPTIONS: "--max_old_space_size=6144"
5
-
6
- on:
7
- workflow_dispatch:
8
-
9
- permissions:
10
- contents: write
11
- pull-requests: write
12
-
13
- jobs:
14
- release:
15
- runs-on: ubuntu-latest
16
- steps:
17
- - uses: AIGNE-io/release-please-action@v4.3.0
18
- id: release
19
- with:
20
- token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
21
- release-stable: true
@@ -1,65 +0,0 @@
1
- name: publish docs
2
-
3
- env:
4
- AIGNE_HUB_API_KEY: ${{ secrets.AIGNE_HUB_API_KEY }}
5
-
6
- permissions:
7
- contents: write
8
-
9
- on:
10
- push:
11
- branches:
12
- - main
13
-
14
- jobs:
15
- publish-docs:
16
- runs-on: ubuntu-latest
17
- if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
18
- steps:
19
- - name: Checkout repo
20
- uses: actions/checkout@v4
21
- with:
22
- token: ${{ secrets.GITHUB_TOKEN }}
23
- ref: ${{ github.head_ref || github.ref_name }}
24
- fetch-depth: 0
25
-
26
- - name: Setup Node.js
27
- uses: actions/setup-node@v4
28
- with:
29
- node-version: '22.16.0'
30
-
31
- - uses: oven-sh/setup-bun@v2
32
- with:
33
- bun-version: latest
34
-
35
- - name: Install @aigne/cli
36
- run: |
37
- bun install -g @aigne/cli@beta
38
-
39
- - name: Publish docs to arcblock.io
40
- env:
41
- DOC_DISCUSS_KIT_ACCESS_TOKEN: ${{ secrets.DOC_PUBLISH_API_KEY_ARCBLOCK }}
42
- run: |
43
- set -e
44
- aigne doc publish --appUrl https://www.arcblock.io
45
-
46
- - name: Publish docs to docsmith
47
- env:
48
- DOC_DISCUSS_KIT_ACCESS_TOKEN: ${{ secrets.DOC_PUBLISH_API_KEY_DOCSMITH }}
49
- run: |
50
- set -e
51
- aigne doc publish --appUrl https://docsmith.aigne.io
52
-
53
- - name: Commit and push changes
54
- run: |
55
- git config --local user.name "bot"
56
- git config --local user.email "bot@arcblock.io"
57
- if [ -n "$(git status --porcelain)" ]; then
58
- echo "Changes detected. Committing and pushing..."
59
- git add -A
60
- git commit -m "chore(docs): push doc publish cache [skip ci]"
61
- BRANCH="${{ github.head_ref || github.ref_name }}"
62
- git push origin HEAD:refs/heads/"${BRANCH}"
63
- else
64
- echo "No changes to commit."
65
- fi
@@ -1,49 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
-
8
- permissions:
9
- contents: write
10
- pull-requests: write
11
-
12
- jobs:
13
- release-please:
14
- runs-on: ubuntu-latest
15
- steps:
16
- - uses: AIGNE-io/release-please-action@v4.3.0
17
- id: release
18
- with:
19
- token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
20
-
21
- - name: Checkout
22
- uses: actions/checkout@v4
23
- if: ${{ steps.release.outputs.release_created }}
24
- with:
25
- fetch-depth: 2
26
-
27
- - uses: pnpm/action-setup@v3
28
- if: ${{ steps.release.outputs.release_created }}
29
- with:
30
- version: 10
31
-
32
- - name: Setup node
33
- uses: actions/setup-node@v4
34
- if: ${{ steps.release.outputs.release_created }}
35
- with:
36
- node-version: 23
37
- cache: pnpm
38
-
39
- - name: Install dependencies
40
- run: |
41
- pnpm install
42
- if: ${{ steps.release.outputs.release_created }}
43
-
44
- - name: Publish to NPM
45
- if: ${{ steps.release.outputs.release_created }}
46
- run: |
47
- npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"
48
- TAG=$(node -p "require(\"./package.json\").version.includes(\"beta\") ? \"beta\" : \"latest\"")
49
- pnpm publish --access public --no-git-checks --tag $TAG || true
@@ -1,54 +0,0 @@
1
- name: Code Review
2
-
3
- permissions:
4
- contents: read
5
- pull-requests: write
6
-
7
- on:
8
- pull_request:
9
- types: [opened]
10
- branches:
11
- - main
12
-
13
- concurrency:
14
- group:
15
- ${{ github.repository }}-${{ github.event.number || github.head_ref ||
16
- github.sha }}-${{ github.workflow }}-${{ github.event_name ==
17
- 'pull_request_review_comment' && 'pr_comment' || 'pr' }}
18
- cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }}
19
-
20
- jobs:
21
- review:
22
- runs-on: ubuntu-latest
23
- steps:
24
- - uses: aigne-io/aigne-code-smith@latest
25
- env:
26
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27
- ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
28
- DEBUG: '@aigne/*'
29
- with:
30
- debug: false
31
- language: 'en-US'
32
- disable_review: false
33
- review_simple_changes: false
34
- review_comment_lgtm: false
35
- suggest_pr_title: true
36
- path_filters: |
37
- !docs/*
38
- !**/*.md
39
- !**/package.json
40
- !**/*.yaml
41
- system_message: |
42
- You are `@codesmith`, a highly experienced software engineer who provides a thorough review of the code hunks.
43
- **CRITICAL REVIEW FOCUS**: Only post comments for CRITICAL issues that significantly impact code quality:
44
- - Security vulnerabilities or potential exploits
45
- - Logic errors that could cause bugs or incorrect behavior
46
- - Performance issues that could impact system efficiency
47
- - Error handling problems that could cause crashes or data loss
48
- - **ALL language quality issues are considered CRITICAL**:
49
- * Spelling errors in comments, strings, and documentation
50
- * Grammar mistakes and awkward phrasing
51
- * Unclear or confusing wording that may hinder understanding
52
- * Variable/function names that could be more descriptive or follow better naming conventions
53
- * Comment clarity and proper English usage
54
- **STRICT FILTERING**: Do NOT comment on minor style preferences, formatting choices, css-in-js, typescript importing, or subjective improvements unless they fall into the CRITICAL categories above.
@@ -1,3 +0,0 @@
1
- {
2
- ".": "0.8.12-beta.8"
3
- }
package/RELEASE.md DELETED
@@ -1,9 +0,0 @@
1
- ### Release a beta version
2
-
3
- Create a normal PR, and release-please will automatically create a beta version PR.
4
- Merge that PR when appropriate.
5
-
6
- ### Release a prod version
7
-
8
- When you want publish a prod version, manually execute the GitHub Action 'Create Release PR' to create a release PR for the prod version.
9
- Merge that PR when appropriate.
Binary file
Binary file
Binary file
package/biome.json DELETED
@@ -1,73 +0,0 @@
1
- {
2
- "$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
3
- "vcs": {
4
- "enabled": true,
5
- "clientKind": "git",
6
- "useIgnoreFile": true
7
- },
8
- "files": {
9
- "ignoreUnknown": true,
10
- "experimentalScannerIgnores": ["node_modules"]
11
- },
12
- "formatter": {
13
- "enabled": true,
14
- "indentStyle": "space",
15
- "lineWidth": 100
16
- },
17
- "linter": {
18
- "enabled": true,
19
- "rules": {
20
- "recommended": true,
21
- "correctness": {
22
- "useImportExtensions": "error",
23
- "noUnusedVariables": "error",
24
- "noUnusedImports": "error",
25
- "noUnusedFunctionParameters": "error",
26
- "noUnusedPrivateClassMembers": "error",
27
- "noUndeclaredVariables": "error",
28
- "noUnreachable": "error",
29
- "noSelfAssign": "error"
30
- },
31
- "suspicious": {
32
- "noConfusingVoidType": "off",
33
- "noExplicitAny": "off",
34
- "noDoubleEquals": "error",
35
- "noGlobalAssign": "error",
36
- "noAssignInExpressions": "warn"
37
- },
38
- "style": {
39
- "useNodejsImportProtocol": "error",
40
- "useTemplate": "error"
41
- },
42
- "complexity": {
43
- "noForEach": "off",
44
- "useLiteralKeys": "off"
45
- }
46
- }
47
- },
48
- "javascript": {
49
- "formatter": {
50
- "quoteStyle": "double"
51
- }
52
- },
53
- "assist": {
54
- "enabled": true,
55
- "actions": {
56
- "source": {
57
- "organizeImports": "on"
58
- }
59
- }
60
- },
61
- "overrides": [
62
- {
63
- "includes": ["**/fixtures/**", ".aigne/doc-smith/output/structure-plan.json"],
64
-
65
- "linter": {
66
- "enabled": false
67
- },
68
- "formatter": {
69
- "enabled": false
70
- }
71
- }
72
- ]
73
- }
package/codecov.yml DELETED
@@ -1,15 +0,0 @@
1
- coverage:
2
- status:
3
- project: #add everything under here, more options at https://docs.codecov.com/docs/commit-status
4
- default:
5
- # basic
6
- target: auto #default
7
- threshold: 0%
8
- base: auto
9
- comment:
10
- layout: "header, changes, diff, flags, files"
11
- behavior: default
12
- require_changes: false
13
- require_base: false
14
- require_head: true
15
- hide_project_coverage: false
package/docs/_sidebar.md DELETED
@@ -1,15 +0,0 @@
1
- * [Overview](/overview.md)
2
- * [Getting Started](/getting-started.md)
3
- * [Guides](/guides.md)
4
- * [Generating Documentation](/guides-generating-documentation.md)
5
- * [Updating Documentation](/guides-updating-documentation.md)
6
- * [Translating Documentation](/guides-translating-documentation.md)
7
- * [Publishing Your Docs](/guides-publishing-your-docs.md)
8
- * [Managing History](/guides-managing-history.md)
9
- * [Evaluating Documents](/guides-evaluating-documents.md)
10
- * [Cleaning Up](/guides-cleaning-up.md)
11
- * [Interactive Chat](/guides-interactive-chat.md)
12
- * [Configuration](/configuration.md)
13
- * [Initial Setup](/configuration-initial-setup.md)
14
- * [Managing Preferences](/configuration-managing-preferences.md)
15
- * [Release Notes](/release-notes.md)
@@ -1,179 +0,0 @@
1
- # 初期設定
2
-
3
- このガイドでは、AIGNE DocSmith の対話型セットアッププロセスをステップバイステップで説明します。このプロセスは、`generate` コマンドを初めて実行する際に開始されるか、手動で開始することもできます。その目的は、ドキュメント生成の設定を保存する `config.yaml` ファイルを作成することです。
4
-
5
- ## プロセスの開始
6
-
7
- 設定を手動で開始するには、ターミナルでプロジェクトのルートディレクトリに移動し、次のコマンドを実行します。
8
-
9
- ```bash
10
- aigne doc init
11
- ```
12
-
13
- このコマンドは対話式の質問を起動し、ドキュメント設定の構成をガイドします。
14
-
15
- ## 設定手順
16
-
17
- セットアッププロセスは、特定のニーズに合わせてドキュメントを調整するために設計された 9 つの質問で構成されています。
18
-
19
- ### ステップ 1: ドキュメントの目的を定義する
20
-
21
- 最初に、ドキュメントの主な目的を定義するよう求められます。この選択は、生成されるコンテンツのトーン、構造、および焦点に影響を与えます。
22
-
23
- **プロンプト:** `📝 [1/9]: What should your documentation help readers achieve?`
24
-
25
- 以下のリストから複数のオプションを選択できます。
26
-
27
- | オプション | 名前 | 説明 |
28
- | :--- | :--- | :--- |
29
- | `getStarted` | 迅速な利用開始 | 新規ユーザーが 30 分以内にゼロから作業を開始できるよう支援します。 |
30
- | `completeTasks` | 特定のタスクの完了 | 一般的なワークフローとユースケースをユーザーに案内します。 |
31
- | `findAnswers` | 迅速な回答の検索 | すべての機能と API の検索可能なリファレンスを提供します。 |
32
- | `understandSystem` | システムの理解 | システムの仕組みと設計決定の背後にある理由を説明します。 |
33
- | `solveProblems` | 問題の解決 | ユーザーが問題をトラブルシューティングし、修正するのを助けます。 |
34
- | `mixedPurpose` | 上記の組み合わせ | 複数のニーズを包括的にカバーします。 |
35
-
36
- ### ステップ 2: 対象読者を特定する
37
-
38
- 次に、ドキュメントの主な読者を指定します。これにより、言語と技術的な深さを適切に調整できます。
39
-
40
- **プロンプト:** `👥 [2/9]: Who will be reading your documentation?`
41
-
42
- 以下の読者から 1 つ以上を選択できます。
43
-
44
- | オプション | 名前 | 説明 |
45
- | :--- | :--- | :--- |
46
- | `endUsers` | エンドユーザー (非技術者) | 製品を使用するがコーディングはしない人々。 |
47
- | `developers` | 統合開発者 | これを自分のプロジェクトに追加するエンジニア。 |
48
- | `devops` | DevOps/インフラストラクチャ | システムをデプロイ、監視、保守するチーム。 |
49
- | `decisionMakers` | 技術的な意思決定者 | テクノロジーを評価するアーキテクトやリード。 |
50
- | `supportTeams` | サポートチーム | 他の人が製品を使用するのを助ける人々。 |
51
- | `mixedTechnical` | 混合技術読者層 | 開発者、DevOps、その他の技術ユーザーの組み合わせ。 |
52
-
53
- ### ステップ 3: カスタムルールを提供する
54
-
55
- このオプションのステップでは、コンテンツ生成中に AI が従うべき特定の指示や制約を提供できます。
56
-
57
- **プロンプト:** `📋 [3/9]: Any custom rules or requirements for your documentation? (Optional, press Enter to skip)`
58
-
59
- トーン、スタイル、除外するコンテンツなど、特定の要件を入力できます。例: 「マーケティング用語の使用を避け、技術的な正確さに焦点を当てる。」
60
-
61
- ### ステップ 4: 読者の知識レベルを指定する
62
-
63
- 読者の想定される知識レベルを示してください。これにより、コンテンツが簡単すぎず、複雑すぎず、適切なレベルで提供されることが保証されます。
64
-
65
- **プロンプト:** `🧠 [4/9]: How much do readers already know about your project?`
66
-
67
- 読者に最も合うオプションを選択してください。
68
-
69
- | オプション | 名前 | 説明 |
70
- | :--- | :--- | :--- |
71
- | `completeBeginners` | 完全な初心者 | ドメインやテクノロジーに全く慣れていない。 |
72
- | `domainFamiliar` | ドメインには詳しいが、ツールは初めて | 問題領域は知っているが、このソリューションは初めて。 |
73
- | `experiencedUsers` | 経験豊富なユーザー | リファレンスや高度なトピックを必要とする通常のユーザー。 |
74
- | `emergencyTroubleshooting` | 緊急/トラブルシューティング | 問題を迅速に解決する必要があるユーザー。 |
75
- | `exploringEvaluating` | 探索/評価中 | ツールが自分のニーズに合うかどうかを判断しようとしているユーザー。 |
76
-
77
- ### ステップ 5: ドキュメントの深さを設定する
78
-
79
- ドキュメントをどれだけ詳細にするかを選択します。これにより、生成されるコンテンツの範囲と詳細レベルが決まります。
80
-
81
- **プロンプト:** `📊 [5/9]: How detailed should your documentation be?`
82
-
83
- 以下の詳細レベルから 1 つを選択してください。
84
-
85
- | オプション | 名前 | 説明 |
86
- | :--- | :--- | :--- |
87
- | `essentialOnly` | 不可欠なもののみ | 最も一般的な 80% のユースケースを簡潔にカバーします。 |
88
- | `balancedCoverage` | バランスの取れたカバレッジ | 実用的な例とともに十分な深さを提供します。 |
89
- | `comprehensive` | 包括的 | すべての機能、エッジケース、高度なシナリオをカバーします。 |
90
- | `aiDecide` | AI に決定させる | ツールがコードの複雑さを分析し、適切な深さを提案します。 |
91
-
92
- ### ステップ 6: 主要言語を選択する
93
-
94
- ドキュメントの主要言語を選択します。システムはオペレーティングシステムの言語を検出し、デフォルトとして提案します。
95
-
96
- **プロンプト:** `🌐 [6/9]: What's your main documentation language?`
97
-
98
- 英語、中国語 (簡体字)、スペイン語を含む 12 のサポートされている言語のリストが表示されます。
99
-
100
- ### ステップ 7: 翻訳言語を選択する
101
-
102
- ドキュメントを翻訳したい追加の言語を選択します。
103
-
104
- **プロンプト:** `🔄 [7/9]: Which languages should we translate to?`
105
-
106
- 前のステップで選択した主要言語を除き、サポートされているオプションのリストから複数の言語を選択できます。
107
-
108
- ### ステップ 8: 出力ディレクトリを定義する
109
-
110
- 生成されたドキュメントファイルを保存するフォルダを指定します。
111
-
112
- **プロンプト:** `📁 [8/9]: Where should we save your documentation?`
113
-
114
- デフォルトのパスは `.aigne/doc-smith/docs` です。これを受け入れるか、別のパスを提供することができます。
115
-
116
- ### ステップ 9: コンテンツソースを指定する
117
-
118
- ドキュメントを生成するためにツールが分析すべきファイルとフォルダを指定します。複数のパスを追加したり、高度なフィルタリングのために glob パターンを使用したりできます。
119
-
120
- **プロンプト:** `🔍 [9/9]: Content Sources`
121
-
122
- ファイルパス、フォルダパス、または glob パターン (例: `src/**/*.js`) を入力するよう求められます。パスを指定しない場合、ツールはデフォルトでプロジェクトディレクトリ全体を分析します。
123
-
124
- ## 生成された設定ファイル
125
-
126
- 質問に回答し終えると、DocSmith はあなたの回答を `.aigne/doc-smith/` ディレクトリにある `config.yaml` という名前の設定ファイルに保存します。このファイルは、将来のすべてのドキュメント生成の設計図として機能し、いつでも手動で編集できます。
127
-
128
- 以下は、生成された `config.yaml` ファイルの例です。
129
-
130
- ```yaml config.yaml title="config.yaml"
131
- # ドキュメント公開用のプロジェクト情報
132
- projectName: AIGNE DocSmith
133
- projectDesc: AIGNE DocSmith is a powerful, AI-driven documentation generation tool...
134
- projectLogo: https://docsmith.aigne.io/image-bin/uploads/9645caf64b4232699982c4d940b03b90.svg
135
-
136
- # =============================================================================
137
- # ドキュメント設定
138
- # =============================================================================
139
-
140
- # 目的: 読者に達成してほしい主な成果は何か?
141
- documentPurpose:
142
- - getStarted
143
- - completeTasks
144
-
145
- # 対象読者: 誰がこれを最も頻繁に読むか?
146
- targetAudienceTypes:
147
- - endUsers
148
-
149
- # 読者の知識レベル: 読者は通常、どのような知識を持っているか?
150
- readerKnowledgeLevel: completeBeginners
151
-
152
- # ドキュメントの深さ: ドキュメントはどの程度包括的であるべきか?
153
- documentationDepth: comprehensive
154
-
155
- # カスタムルール: 特定のドキュメント生成ルールと要件を定義する
156
- rules: |
157
- Avoid using vague or empty words...
158
-
159
- # 対象読者: 特定の対象読者とその特徴を記述する
160
- targetAudience: |
161
-
162
- # 言語設定
163
- locale: en
164
- translateLanguages:
165
- - zh
166
- - ja
167
-
168
- # ディレクトリとソースパスの設定
169
- docsDir: ./docs # 生成されたドキュメントを保存するディレクトリ
170
- sourcesPath: # 分析するソースコードのパス
171
- - ./README.md
172
- - ./agents
173
- ```
174
-
175
- ## 次のステップ
176
-
177
- 初期設定が完了し、ドキュメントを作成する準備が整いました。
178
-
179
- * [ドキュメントの生成](./guides-generating-documentation.md) ガイドに進み、生成プロセスの実行方法を学びましょう。