novelws 1.2.0

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 (320) hide show
  1. package/CHANGELOG.md +161 -0
  2. package/LICENSE +22 -0
  3. package/README.md +372 -0
  4. package/dist/cli.d.ts +3 -0
  5. package/dist/cli.d.ts.map +1 -0
  6. package/dist/cli.js +50 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/commands/check.d.ts +6 -0
  9. package/dist/commands/check.d.ts.map +1 -0
  10. package/dist/commands/check.js +32 -0
  11. package/dist/commands/check.js.map +1 -0
  12. package/dist/commands/init.d.ts +6 -0
  13. package/dist/commands/init.d.ts.map +1 -0
  14. package/dist/commands/init.js +160 -0
  15. package/dist/commands/init.js.map +1 -0
  16. package/dist/commands/plugin.d.ts +6 -0
  17. package/dist/commands/plugin.d.ts.map +1 -0
  18. package/dist/commands/plugin.js +135 -0
  19. package/dist/commands/plugin.js.map +1 -0
  20. package/dist/commands/upgrade.d.ts +6 -0
  21. package/dist/commands/upgrade.d.ts.map +1 -0
  22. package/dist/commands/upgrade.js +92 -0
  23. package/dist/commands/upgrade.js.map +1 -0
  24. package/dist/core/config.d.ts +72 -0
  25. package/dist/core/config.d.ts.map +1 -0
  26. package/dist/core/config.js +136 -0
  27. package/dist/core/config.js.map +1 -0
  28. package/dist/core/errors.d.ts +59 -0
  29. package/dist/core/errors.d.ts.map +1 -0
  30. package/dist/core/errors.js +125 -0
  31. package/dist/core/errors.js.map +1 -0
  32. package/dist/core/platform.d.ts +27 -0
  33. package/dist/core/platform.d.ts.map +1 -0
  34. package/dist/core/platform.js +75 -0
  35. package/dist/core/platform.js.map +1 -0
  36. package/dist/core/template.d.ts +35 -0
  37. package/dist/core/template.d.ts.map +1 -0
  38. package/dist/core/template.js +94 -0
  39. package/dist/core/template.js.map +1 -0
  40. package/dist/plugins/identifier.d.ts +13 -0
  41. package/dist/plugins/identifier.d.ts.map +1 -0
  42. package/dist/plugins/identifier.js +72 -0
  43. package/dist/plugins/identifier.js.map +1 -0
  44. package/dist/plugins/installers/base.d.ts +27 -0
  45. package/dist/plugins/installers/base.d.ts.map +1 -0
  46. package/dist/plugins/installers/base.js +30 -0
  47. package/dist/plugins/installers/base.js.map +1 -0
  48. package/dist/plugins/installers/github.d.ts +22 -0
  49. package/dist/plugins/installers/github.d.ts.map +1 -0
  50. package/dist/plugins/installers/github.js +133 -0
  51. package/dist/plugins/installers/github.js.map +1 -0
  52. package/dist/plugins/installers/local.d.ts +16 -0
  53. package/dist/plugins/installers/local.d.ts.map +1 -0
  54. package/dist/plugins/installers/local.js +69 -0
  55. package/dist/plugins/installers/local.js.map +1 -0
  56. package/dist/plugins/installers/npm.d.ts +20 -0
  57. package/dist/plugins/installers/npm.d.ts.map +1 -0
  58. package/dist/plugins/installers/npm.js +99 -0
  59. package/dist/plugins/installers/npm.js.map +1 -0
  60. package/dist/plugins/manager.d.ts +77 -0
  61. package/dist/plugins/manager.d.ts.map +1 -0
  62. package/dist/plugins/manager.js +349 -0
  63. package/dist/plugins/manager.js.map +1 -0
  64. package/dist/plugins/registry.d.ts +48 -0
  65. package/dist/plugins/registry.d.ts.map +1 -0
  66. package/dist/plugins/registry.js +111 -0
  67. package/dist/plugins/registry.js.map +1 -0
  68. package/dist/plugins/types.d.ts +66 -0
  69. package/dist/plugins/types.d.ts.map +1 -0
  70. package/dist/plugins/types.js +2 -0
  71. package/dist/plugins/types.js.map +1 -0
  72. package/dist/plugins/validator.d.ts +19 -0
  73. package/dist/plugins/validator.d.ts.map +1 -0
  74. package/dist/plugins/validator.js +164 -0
  75. package/dist/plugins/validator.js.map +1 -0
  76. package/dist/utils/logger.d.ts +13 -0
  77. package/dist/utils/logger.d.ts.map +1 -0
  78. package/dist/utils/logger.js +48 -0
  79. package/dist/utils/logger.js.map +1 -0
  80. package/dist/utils/project.d.ts +24 -0
  81. package/dist/utils/project.d.ts.map +1 -0
  82. package/dist/utils/project.js +61 -0
  83. package/dist/utils/project.js.map +1 -0
  84. package/dist/version.d.ts +3 -0
  85. package/dist/version.d.ts.map +1 -0
  86. package/dist/version.js +21 -0
  87. package/dist/version.js.map +1 -0
  88. package/package.json +76 -0
  89. package/plugins/authentic-voice/README.md +31 -0
  90. package/plugins/authentic-voice/commands/authentic-voice.md +73 -0
  91. package/plugins/authentic-voice/commands/authenticity-audit.md +37 -0
  92. package/plugins/authentic-voice/config.yaml +30 -0
  93. package/plugins/authentic-voice/experts/authentic-editor.md +27 -0
  94. package/plugins/export/README.md +319 -0
  95. package/plugins/export/commands/export.md +460 -0
  96. package/plugins/export/commands/generate-cover.md +256 -0
  97. package/plugins/export/commands/metadata.md +309 -0
  98. package/plugins/export/config.yaml +47 -0
  99. package/plugins/export/experts/publishing-expert.md +171 -0
  100. package/plugins/export/templates/epub/chapter-template.html +13 -0
  101. package/plugins/export/templates/epub/cover-template.html +14 -0
  102. package/plugins/export/templates/epub/stylesheet.css +200 -0
  103. package/plugins/export/templates/pdf/ebook-style.css +137 -0
  104. package/plugins/export/templates/pdf/print-style.css +179 -0
  105. package/plugins/export/templates/platforms/jinjiang-format.md +101 -0
  106. package/plugins/export/templates/platforms/qidian-format.md +108 -0
  107. package/plugins/export/templates/platforms/tomato-format.md +95 -0
  108. package/plugins/translate/README.md +265 -0
  109. package/plugins/translate/commands/glossary.md +731 -0
  110. package/plugins/translate/commands/translate-preview.md +543 -0
  111. package/plugins/translate/commands/translate.md +649 -0
  112. package/plugins/translate/config.yaml +43 -0
  113. package/plugins/translate/experts/literary-translator.md +605 -0
  114. package/templates/commands/analyze.md +1485 -0
  115. package/templates/commands/checklist.md +434 -0
  116. package/templates/commands/clarify.md +257 -0
  117. package/templates/commands/constitution.md +257 -0
  118. package/templates/commands/expert.md +136 -0
  119. package/templates/commands/plan.md +749 -0
  120. package/templates/commands/recap.md +613 -0
  121. package/templates/commands/relations.md +96 -0
  122. package/templates/commands/revise.md +341 -0
  123. package/templates/commands/specify.md +682 -0
  124. package/templates/commands/tasks.md +142 -0
  125. package/templates/commands/timeline.md +73 -0
  126. package/templates/commands/track-init.md +137 -0
  127. package/templates/commands/track.md +463 -0
  128. package/templates/commands/write.md +1264 -0
  129. package/templates/config/keyword-mappings.json +106 -0
  130. package/templates/knowledge/audit-config.json +26 -0
  131. package/templates/knowledge/character-profiles.md +152 -0
  132. package/templates/knowledge/character-voices.md +137 -0
  133. package/templates/knowledge/locations.md +184 -0
  134. package/templates/knowledge/world-setting.md +121 -0
  135. package/templates/knowledge-base/README.md +285 -0
  136. package/templates/knowledge-base/character-archetypes/01-hero.md +233 -0
  137. package/templates/knowledge-base/character-archetypes/02-mentor.md +177 -0
  138. package/templates/knowledge-base/character-archetypes/03-shadow.md +221 -0
  139. package/templates/knowledge-base/character-archetypes/04-ally.md +178 -0
  140. package/templates/knowledge-base/character-archetypes/05-shapeshifter.md +177 -0
  141. package/templates/knowledge-base/character-archetypes/06-trickster.md +181 -0
  142. package/templates/knowledge-base/character-archetypes/07-threshold-guardian.md +177 -0
  143. package/templates/knowledge-base/character-archetypes/08-herald.md +180 -0
  144. package/templates/knowledge-base/character-archetypes/09-father.md +249 -0
  145. package/templates/knowledge-base/character-archetypes/10-mother.md +202 -0
  146. package/templates/knowledge-base/character-archetypes/11-child.md +183 -0
  147. package/templates/knowledge-base/character-archetypes/12-sage.md +202 -0
  148. package/templates/knowledge-base/character-archetypes/README.md +60 -0
  149. package/templates/knowledge-base/character-archetypes/application-guide.md +222 -0
  150. package/templates/knowledge-base/character-archetypes/archetype-combinations.md +242 -0
  151. package/templates/knowledge-base/character-archetypes/config.yaml +28 -0
  152. package/templates/knowledge-base/character-archetypes/examples-analysis.md +223 -0
  153. package/templates/knowledge-base/craft/character-arc.md +1153 -0
  154. package/templates/knowledge-base/craft/dialogue.md +1170 -0
  155. package/templates/knowledge-base/craft/pacing.md +1200 -0
  156. package/templates/knowledge-base/craft/scene-structure.md +1136 -0
  157. package/templates/knowledge-base/craft/show-not-tell.md +1012 -0
  158. package/templates/knowledge-base/emotional-beats/01-first-meeting.md +145 -0
  159. package/templates/knowledge-base/emotional-beats/02-bonding-moment.md +226 -0
  160. package/templates/knowledge-base/emotional-beats/03-declaration.md +284 -0
  161. package/templates/knowledge-base/emotional-beats/04-triumph.md +240 -0
  162. package/templates/knowledge-base/emotional-beats/05-reunion.md +396 -0
  163. package/templates/knowledge-base/emotional-beats/06-forgiveness.md +204 -0
  164. package/templates/knowledge-base/emotional-beats/07-betrayal.md +204 -0
  165. package/templates/knowledge-base/emotional-beats/08-loss.md +214 -0
  166. package/templates/knowledge-base/emotional-beats/09-rejection.md +254 -0
  167. package/templates/knowledge-base/emotional-beats/10-failure.md +244 -0
  168. package/templates/knowledge-base/emotional-beats/11-misunderstanding.md +205 -0
  169. package/templates/knowledge-base/emotional-beats/12-farewell.md +283 -0
  170. package/templates/knowledge-base/emotional-beats/13-revelation.md +242 -0
  171. package/templates/knowledge-base/emotional-beats/14-point-of-no-return.md +215 -0
  172. package/templates/knowledge-base/emotional-beats/15-dark-night.md +244 -0
  173. package/templates/knowledge-base/emotional-beats/16-sacrifice.md +246 -0
  174. package/templates/knowledge-base/emotional-beats/17-awakening.md +246 -0
  175. package/templates/knowledge-base/emotional-beats/18-confrontation.md +217 -0
  176. package/templates/knowledge-base/emotional-beats/19-bittersweet-goodbye.md +368 -0
  177. package/templates/knowledge-base/emotional-beats/20-moral-dilemma.md +248 -0
  178. package/templates/knowledge-base/emotional-beats/21-temptation.md +240 -0
  179. package/templates/knowledge-base/emotional-beats/22-redemption.md +210 -0
  180. package/templates/knowledge-base/emotional-beats/README.md +104 -0
  181. package/templates/knowledge-base/emotional-beats/beat-sequences.md +276 -0
  182. package/templates/knowledge-base/emotional-beats/config.yaml +30 -0
  183. package/templates/knowledge-base/emotional-beats/pacing-guide.md +390 -0
  184. package/templates/knowledge-base/genres/historical.md +1127 -0
  185. package/templates/knowledge-base/genres/mystery.md +1123 -0
  186. package/templates/knowledge-base/genres/revenge.md +846 -0
  187. package/templates/knowledge-base/genres/romance.md +948 -0
  188. package/templates/knowledge-base/genres/sci-fi.md +156 -0
  189. package/templates/knowledge-base/genres/thriller.md +166 -0
  190. package/templates/knowledge-base/genres/wuxia.md +143 -0
  191. package/templates/knowledge-base/references/README.md +96 -0
  192. package/templates/knowledge-base/references/china-1920s/culture.md +423 -0
  193. package/templates/knowledge-base/references/china-1920s/daily-life.md +616 -0
  194. package/templates/knowledge-base/references/china-1920s/overview.md +298 -0
  195. package/templates/knowledge-base/references/china-1920s/society.md +703 -0
  196. package/templates/knowledge-base/references/china-1920s/warlords.md +427 -0
  197. package/templates/knowledge-base/references/cultivation-world/daily-life.md +108 -0
  198. package/templates/knowledge-base/references/cultivation-world/overview.md +64 -0
  199. package/templates/knowledge-base/references/cultivation-world/power-system.md +108 -0
  200. package/templates/knowledge-base/references/cultivation-world/sects.md +104 -0
  201. package/templates/knowledge-base/references/cultivation-world/world-setting.md +108 -0
  202. package/templates/knowledge-base/references/modern-workplace/corporate.md +115 -0
  203. package/templates/knowledge-base/references/modern-workplace/daily-life.md +129 -0
  204. package/templates/knowledge-base/references/modern-workplace/overview.md +73 -0
  205. package/templates/knowledge-base/references/modern-workplace/relationships.md +107 -0
  206. package/templates/knowledge-base/references/modern-workplace/tech-industry.md +131 -0
  207. package/templates/knowledge-base/references/tang-dynasty/culture.md +135 -0
  208. package/templates/knowledge-base/references/tang-dynasty/daily-life.md +139 -0
  209. package/templates/knowledge-base/references/tang-dynasty/overview.md +76 -0
  210. package/templates/knowledge-base/references/tang-dynasty/politics.md +121 -0
  211. package/templates/knowledge-base/references/tang-dynasty/society.md +126 -0
  212. package/templates/knowledge-base/requirements/README.md +240 -0
  213. package/templates/knowledge-base/requirements/anti-ai-v3.md +46 -0
  214. package/templates/knowledge-base/requirements/anti-ai-v4.md +430 -0
  215. package/templates/knowledge-base/requirements/fast-paced.md +552 -0
  216. package/templates/knowledge-base/requirements/no-poison.md +60 -0
  217. package/templates/knowledge-base/requirements/romance-angst.md +102 -0
  218. package/templates/knowledge-base/requirements/romance-sweet.md +63 -0
  219. package/templates/knowledge-base/requirements/serious-literature.md +45 -0
  220. package/templates/knowledge-base/requirements/strong-emotion.md +60 -0
  221. package/templates/knowledge-base/styles/README.md +302 -0
  222. package/templates/knowledge-base/styles/ancient-style.md +579 -0
  223. package/templates/knowledge-base/styles/literary.md +439 -0
  224. package/templates/knowledge-base/styles/minimal.md +472 -0
  225. package/templates/knowledge-base/styles/natural-voice.md +930 -0
  226. package/templates/knowledge-base/styles/web-novel.md +525 -0
  227. package/templates/memory/constitution.md +140 -0
  228. package/templates/memory/personal-voice.md +113 -0
  229. package/templates/scripts/README.md +187 -0
  230. package/templates/scripts/bash/analyze-story.sh +170 -0
  231. package/templates/scripts/bash/check-consistency.sh +463 -0
  232. package/templates/scripts/bash/check-plot.sh +374 -0
  233. package/templates/scripts/bash/check-timeline.sh +346 -0
  234. package/templates/scripts/bash/check-world.sh +395 -0
  235. package/templates/scripts/bash/check-writing-state.sh +854 -0
  236. package/templates/scripts/bash/clarify-story.sh +117 -0
  237. package/templates/scripts/bash/common.sh +151 -0
  238. package/templates/scripts/bash/constitution.sh +114 -0
  239. package/templates/scripts/bash/generate-tasks.sh +65 -0
  240. package/templates/scripts/bash/init-tracking.sh +183 -0
  241. package/templates/scripts/bash/manage-relations.sh +174 -0
  242. package/templates/scripts/bash/plan-story.sh +100 -0
  243. package/templates/scripts/bash/specify-story.sh +93 -0
  244. package/templates/scripts/bash/tasks-story.sh +96 -0
  245. package/templates/scripts/bash/test-word-count.sh +182 -0
  246. package/templates/scripts/bash/tests/bench-preload-cache.sh +100 -0
  247. package/templates/scripts/bash/tests/run-all-benchmarks.sh +16 -0
  248. package/templates/scripts/bash/tests/test-cache-semantics.sh +199 -0
  249. package/templates/scripts/bash/tests/test-cross-platform.sh +35 -0
  250. package/templates/scripts/bash/tests/test-edge-cases-bash.sh +60 -0
  251. package/templates/scripts/bash/tests/test-phase1-bash.sh +28 -0
  252. package/templates/scripts/bash/tests/test-preload-cache.sh +123 -0
  253. package/templates/scripts/bash/tests/test-regex-precompile.sh +89 -0
  254. package/templates/scripts/bash/tests/test-regression-bash.sh +42 -0
  255. package/templates/scripts/bash/tests/test-task6-verification.sh +200 -0
  256. package/templates/scripts/bash/text-audit.sh +144 -0
  257. package/templates/scripts/bash/track-progress.sh +194 -0
  258. package/templates/scripts/powershell/analyze-story.ps1 +171 -0
  259. package/templates/scripts/powershell/check-analyze-stage.ps1 +110 -0
  260. package/templates/scripts/powershell/check-consistency.ps1 +138 -0
  261. package/templates/scripts/powershell/check-plot.ps1 +139 -0
  262. package/templates/scripts/powershell/check-timeline.ps1 +112 -0
  263. package/templates/scripts/powershell/check-writing-state.ps1 +490 -0
  264. package/templates/scripts/powershell/check-writing-state.ps1.backup +135 -0
  265. package/templates/scripts/powershell/clarify-story.ps1 +107 -0
  266. package/templates/scripts/powershell/common.ps1 +36 -0
  267. package/templates/scripts/powershell/constitution.ps1 +142 -0
  268. package/templates/scripts/powershell/generate-tasks.ps1 +75 -0
  269. package/templates/scripts/powershell/init-tracking.ps1 +98 -0
  270. package/templates/scripts/powershell/manage-relations.ps1 +134 -0
  271. package/templates/scripts/powershell/plan-story.ps1 +96 -0
  272. package/templates/scripts/powershell/specify-story.ps1 +82 -0
  273. package/templates/scripts/powershell/tests/bench-ps-cache.ps1 +80 -0
  274. package/templates/scripts/powershell/tests/test-cross-platform.ps1 +27 -0
  275. package/templates/scripts/powershell/tests/test-edge-cases-ps.ps1 +29 -0
  276. package/templates/scripts/powershell/tests/test-phase1-ps.ps1 +28 -0
  277. package/templates/scripts/powershell/tests/test-ps-cache.ps1 +73 -0
  278. package/templates/scripts/powershell/tests/test-regression-ps.ps1 +40 -0
  279. package/templates/scripts/powershell/text-audit.ps1 +100 -0
  280. package/templates/scripts/powershell/track-progress.ps1 +105 -0
  281. package/templates/skills/genre-knowledge/fantasy/SKILL.md +355 -0
  282. package/templates/skills/genre-knowledge/mystery/SKILL.md +337 -0
  283. package/templates/skills/genre-knowledge/romance/SKILL.md +228 -0
  284. package/templates/skills/genre-knowledge/sci-fi/SKILL.md +65 -0
  285. package/templates/skills/genre-knowledge/thriller/SKILL.md +95 -0
  286. package/templates/skills/quality-assurance/consistency-checker/SKILL.md +341 -0
  287. package/templates/skills/quality-assurance/continuity-tracker/SKILL.md +157 -0
  288. package/templates/skills/quality-assurance/forgotten-elements/SKILL.md +147 -0
  289. package/templates/skills/quality-assurance/getting-started/SKILL.md +224 -0
  290. package/templates/skills/quality-assurance/pacing-monitor/SKILL.md +143 -0
  291. package/templates/skills/quality-assurance/pov-validator/SKILL.md +135 -0
  292. package/templates/skills/quality-assurance/pre-write-checklist/SKILL.md +583 -0
  293. package/templates/skills/quality-assurance/requirement-detector/CONFLICT_RESOLUTION.md +119 -0
  294. package/templates/skills/quality-assurance/requirement-detector/EXAMPLES.md +146 -0
  295. package/templates/skills/quality-assurance/requirement-detector/KEYWORDS.md +160 -0
  296. package/templates/skills/quality-assurance/requirement-detector/SKILL.md +149 -0
  297. package/templates/skills/quality-assurance/setting-detector/SKILL.md +611 -0
  298. package/templates/skills/quality-assurance/style-detector/CONFLICT_RESOLUTION.md +126 -0
  299. package/templates/skills/quality-assurance/style-detector/EXAMPLES.md +206 -0
  300. package/templates/skills/quality-assurance/style-detector/KEYWORDS.md +207 -0
  301. package/templates/skills/quality-assurance/style-detector/SKILL.md +126 -0
  302. package/templates/skills/quality-assurance/workflow-guide/SKILL.md +381 -0
  303. package/templates/skills/writing-techniques/character-arc/SKILL.md +267 -0
  304. package/templates/skills/writing-techniques/dialogue-techniques/SKILL.md +366 -0
  305. package/templates/skills/writing-techniques/multi-thread-narrative/SKILL.md +553 -0
  306. package/templates/skills/writing-techniques/multi-thread-narrative/experts/thread-analyst.md +226 -0
  307. package/templates/skills/writing-techniques/pacing-control/SKILL.md +377 -0
  308. package/templates/skills/writing-techniques/reader-expectation/SKILL.md +578 -0
  309. package/templates/skills/writing-techniques/reader-expectation/experts/expectation-analyst.md +209 -0
  310. package/templates/skills/writing-techniques/revision-polish/SKILL.md +496 -0
  311. package/templates/skills/writing-techniques/revision-polish/experts/revision-editor.md +221 -0
  312. package/templates/skills/writing-techniques/scene-structure/SKILL.md +361 -0
  313. package/templates/skills/writing-techniques/style-learning/SKILL.md +436 -0
  314. package/templates/specification-example.md +146 -0
  315. package/templates/tracking/character-state.json +78 -0
  316. package/templates/tracking/plot-tracker.json +62 -0
  317. package/templates/tracking/relationships.json +70 -0
  318. package/templates/tracking/timeline.json +49 -0
  319. package/templates/tracking/tracking-log.md +110 -0
  320. package/templates/tracking/validation-rules.json +128 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,161 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.2.0] - 2026-02-10
9
+
10
+ ### Added
11
+
12
+ #### 核心架构重构
13
+ - 🛠️ 新增 `src/core/` 核心层
14
+ - `config.ts` - 统一配置管理,集中路径常量和默认值
15
+ - `errors.ts` - 自定义错误类型层级(NovelWriterError 及子类)
16
+ - `platform.ts` - 跨平台工具(tar 解压、临时目录)
17
+
18
+ #### 插件系统重构
19
+ - 🔌 新增抽象安装器架构
20
+ - `installers/base.ts` - 安装器基类
21
+ - `installers/npm.ts` - npm/scoped npm 包安装器
22
+ - `installers/github.ts` - GitHub 仓库安装器
23
+ - `installers/local.ts` - 本地 tarball 安装器
24
+ - 🔌 新增 `plugins/registry.ts` - 独立的插件注册表管理
25
+ - 🔌 新增 `plugins/identifier.ts` - 插件标识符解析器
26
+
27
+ #### CLI 命令模块化
28
+ - 📦 CLI 拆分为独立命令模块
29
+ - `commands/init.ts` - 项目初始化命令
30
+ - `commands/check.ts` - 环境检查命令
31
+ - `commands/upgrade.ts` - 项目升级命令
32
+ - `commands/plugin.ts` - 插件管理命令组
33
+
34
+ #### 工具层增强
35
+ - 🛠️ `logger.ts` - 新增日志级别过滤(debug/info/warn/error/silent)
36
+ - 🛠️ `version.ts` - 版本号缓存,移除 `import.meta.url` 依赖
37
+ - 🛠️ `project.ts` - 使用配置常量替代硬编码路径,抛出类型化错误
38
+
39
+ ### Changed
40
+
41
+ - `cli.ts` 从 ~520 行精简为 ~58 行入口文件
42
+ - 插件系统从单文件重构为多模块架构
43
+ - 所有硬编码路径替换为 `core/config.ts` 常量
44
+ - `ensureProjectRoot()` 抛出 `ProjectNotFoundError` 替代通用 Error
45
+ - `postbuild` 脚本改为跨平台兼容
46
+ - `package.json` files 字段清理,移除不必要的源码和文档
47
+
48
+ ### Technical
49
+
50
+ - 🛠️ 92 个测试全部通过(新增 6 个日志级别测试)
51
+ - 🛠️ ESM(生产)+ CJS(Jest)双模式兼容
52
+ - 🛠️ 消除所有 `import.meta.url` 在 CJS 环境下的兼容问题
53
+
54
+ ---
55
+
56
+ ## [1.1.1] - 2026-02-09
57
+
58
+ ### Added
59
+
60
+ - 🤖 新增科幻和惊悚类型知识库及 Skills
61
+ - 🤖 新增 POV Validator、Continuity Tracker、Pacing Monitor Skills
62
+ - 📚 扩展参考资料库(唐朝、现代职场、修仙世界)
63
+
64
+ ---
65
+
66
+ ## [1.0.0] - 2025-10-18
67
+
68
+ ### Added
69
+
70
+ #### 核心功能
71
+ - 🎯 完整的七步方法论 Slash Commands
72
+ - `/constitution` - 创建创作宪法
73
+ - `/specify` - 定义故事规格
74
+ - `/clarify` - 澄清关键决策
75
+ - `/plan` - 制定创作计划
76
+ - `/tasks` - 分解任务清单
77
+ - `/write` - AI 辅助写作
78
+ - `/analyze` - 质量验证分析
79
+
80
+ - 📊 追踪与验证命令
81
+ - `/track-init` - 初始化追踪系统
82
+ - `/track` - 综合追踪更新
83
+ - `/plot-check` - 情节一致性检查
84
+ - `/timeline` - 时间线管理
85
+ - `/relations` - 角色关系追踪
86
+ - `/world-check` - 世界观验证
87
+
88
+ #### Agent Skills 系统
89
+ - 🤖 Genre Knowledge Skills
90
+ - Romance - 言情小说惯例和情感节奏
91
+ - Mystery - 推理悬疑技巧和线索管理
92
+ - Fantasy - 奇幻设定规范和世界构建
93
+
94
+ - ✍️ Writing Techniques Skills
95
+ - Dialogue Techniques - 对话自然度和角色声音
96
+ - Scene Structure - 场景构建和节奏控制
97
+ - Character Arc - 角色弧线和成长逻辑
98
+
99
+ - 🔍 Quality Assurance Skills
100
+ - Consistency Checker - 一致性自动监控
101
+ - Workflow Guide - 七步方法论引导
102
+
103
+ #### CLI 工具
104
+ - 📦 项目管理
105
+ - `novelws init` - 初始化项目
106
+ - `novelws check` - 检查环境
107
+ - `novelws upgrade` - 升级项目
108
+
109
+ - 🔌 插件系统
110
+ - `novelws plugin:list` - 列出已安装插件
111
+ - `novelws plugin:add` - 安装插件
112
+ - `novelws plugin:remove` - 移除插件
113
+
114
+ #### 文档
115
+ - 📚 完整文档体系
116
+ - README.md - 项目概览
117
+ - Getting Started - 入门指南
118
+ - Commands Guide - 命令详解
119
+ - Skills Guide - Skills 指南
120
+ - Plugin Development - 插件开发
121
+
122
+ ### Features
123
+
124
+ - ✨ Claude Code 深度集成
125
+ - ✨ Agent Skills 自动激活机制
126
+ - ✨ 智能质量检查系统
127
+ - ✨ 可扩展插件架构
128
+ - ✨ 完整的项目模板
129
+
130
+ ### Technical
131
+
132
+ - 🛠️ TypeScript 实现
133
+ - 🛠️ ES Module 支持
134
+ - 🛠️ Node.js >= 18.0.0
135
+ - 🛠️ 基于 Commander.js 的 CLI
136
+ - 🛠️ 完整的类型定义
137
+
138
+ ---
139
+
140
+ ## [Unreleased]
141
+
142
+ ### Planned
143
+
144
+ - 📝 更多类型 Skills(科幻、惊悚、历史等)
145
+ - 📝 更多写作技巧 Skills
146
+ - 📝 高级质量检查功能
147
+ - 📝 更多官方插件
148
+ - 📝 示例项目和教程
149
+
150
+ ---
151
+
152
+ **注释**:
153
+ - 🎯 核心功能
154
+ - 🤖 Agent Skills
155
+ - 📦 CLI 工具
156
+ - 📚 文档
157
+ - ✨ 新特性
158
+ - 🛠️ 技术改进
159
+ - 🐛 Bug 修复
160
+ - 🔒 安全更新
161
+
package/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Novel Writer Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
22
+
package/README.md ADDED
@@ -0,0 +1,372 @@
1
+ # Novel Writer Skills - Claude Code 专用小说创作工具
2
+
3
+ [![npm version](https://badge.fury.io/js/novelws.svg)](https://www.npmjs.com/package/novelws)
4
+ [![Tests](https://github.com/binlee1990/novel-writer-skills/actions/workflows/test.yml/badge.svg)](https://github.com/binlee1990/novel-writer-skills/actions/workflows/test.yml)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ > 🚀 专为 Claude Code 设计的 AI 智能小说创作助手
8
+ >
9
+ > 深度集成 Slash Commands 和 Agent Skills,提供最佳创作体验
10
+
11
+ ## ✨ 核心特性
12
+
13
+ - 📚 **Slash Commands** - Claude Code 斜杠命令,七步方法论完整支持
14
+ - 🤖 **Agent Skills** - AI 自动激活的知识库和智能检查系统
15
+ - 🎯 **类型知识库** - 自动提供言情、悬疑、奇幻等类型创作惯例
16
+ - 🔍 **智能质量检查** - 自动监控一致性、节奏、视角等问题
17
+ - 📝 **写作技巧增强** - 对话、场景、角色等专业技巧自动应用
18
+ - 🔌 **插件系统** - 可扩展功能,如真实人声、翻译等
19
+
20
+ ## 🚀 快速开始
21
+
22
+ ### 1. 安装
23
+
24
+ ```bash
25
+ npm install -g novelws
26
+ ```
27
+
28
+ ### 2. 初始化项目
29
+
30
+ ```bash
31
+ # 基本用法
32
+ novelws init my-novel
33
+
34
+ # 在当前目录初始化
35
+ novelws init --here
36
+
37
+ # 预装插件
38
+ novelws init my-novel --plugins authentic-voice
39
+ ```
40
+
41
+ ### 3. 在 Claude Code 中开始创作
42
+
43
+ 在 Claude Code 中打开项目,使用斜杠命令:
44
+
45
+ ```text
46
+ /constitution # 1. 创建创作宪法
47
+ /specify # 2. 定义故事规格
48
+ /clarify # 3. 澄清关键决策
49
+ /plan # 4. 制定创作计划
50
+ /tasks # 5. 分解任务清单
51
+ /write # 6. AI 辅助写作
52
+ /analyze # 7. 质量验证分析
53
+ ```
54
+
55
+ ## 🎨 Agent Skills 自动激活
56
+
57
+ ### 类型知识库(Genre Knowledge)
58
+
59
+ 当你提到特定类型时,相应的知识库会自动激活:
60
+
61
+ - 💕 **Romance** - 言情小说惯例和情感节奏
62
+ - 🔍 **Mystery** - 推理悬疑技巧和线索管理
63
+ - 🐉 **Fantasy** - 奇幻设定规范和世界构建
64
+
65
+ ### 写作技巧(Writing Techniques)
66
+
67
+ 写作过程中自动应用最佳实践:
68
+
69
+ - 💬 **Dialogue** - 对话自然度和角色声音
70
+ - 🎬 **Scene Structure** - 场景构建和节奏控制
71
+ - 👤 **Character Arc** - 角色弧线和成长逻辑
72
+
73
+ ### 智能检查(Quality Assurance)
74
+
75
+ 后台自动监控,主动提醒问题:
76
+
77
+ - ✅ **Consistency Checker** - 一致性检查(角色、世界观、时间线)
78
+ - 🧭 **Workflow Guide** - 引导使用七步方法论
79
+
80
+ ## 🎯 智能资源加载
81
+
82
+ ### 三层加载架构
83
+
84
+ 系统采用三层智能资源加载机制,自动为你的创作提供所需知识:
85
+
86
+ **Layer 1: 智能推断**(自动加载)
87
+ - 根据 `specification.md` 中的 `genre`、`tone`、`target-audience` 等字段
88
+ - 自动加载对应的类型知识库和写作技巧
89
+ - 无需配置,开箱即用
90
+
91
+ **Layer 2: 配置覆盖**(可选)
92
+ - 在 `specification.md` 中添加 `resource-loading` 配置
93
+ - 精确控制每个命令加载哪些资源
94
+ - 适合有明确需求的场景
95
+
96
+ **Layer 3: 关键词触发**(运行时)
97
+ - AI 扫描你的输入、任务描述,识别关键词
98
+ - 实时提示:"检测到'对话'关键词,是否加载对话技巧?[Y/N/S]"
99
+ - 你决定是否加载,灵活可控
100
+
101
+ ### 配置示例
102
+
103
+ 在 `stories/your-story/specification.md` 中添加:
104
+
105
+ ```yaml
106
+ resource-loading:
107
+ # 全局配置(所有命令)
108
+ auto-load:
109
+ knowledge-base:
110
+ craft: [dialogue, scene-structure, show-not-tell]
111
+ genres: [romance]
112
+ skills:
113
+ writing-techniques: [dialogue-techniques]
114
+
115
+ # 命令级配置(覆盖全局)
116
+ write:
117
+ knowledge-base:
118
+ craft: [pacing, character-arc]
119
+ ```
120
+
121
+ ### 关键词触发示例
122
+
123
+ 当你在 `/write` 或 `/plan` 时提到关键词,系统会提示:
124
+
125
+ ```text
126
+ 你: /write chapter-3 --focus 对话和情感节奏
127
+
128
+ AI: 🔍 检测到关键词触发:
129
+ - "对话" → templates/knowledge-base/craft/dialogue.md
130
+ - "节奏" → templates/knowledge-base/craft/pacing.md
131
+
132
+ 是否加载这些资源?
133
+ [Y] 全部加载 [N] 跳过 [S] 选择性加载
134
+ ```
135
+
136
+ ### 完整文档
137
+
138
+ 详细配置指南、四种场景示例(言情/悬疑/网文/严肃文学)、性能优化等:
139
+
140
+ 📖 [资源加载完整指南](docs/guides/resource-loading-guide.md)
141
+
142
+ ## 📚 Slash Commands
143
+
144
+ ### 七步方法论
145
+
146
+ | 命令 | 功能 | 输出 |
147
+ |------|------|------|
148
+ | `/constitution` | 创建创作宪法 | `.specify/memory/constitution.md` |
149
+ | `/specify` | 定义故事规格 | `stories/[name]/specification.md` |
150
+ | `/clarify` | 澄清模糊点(5个问题) | 更新 specification.md |
151
+ | `/plan` | 制定创作计划 | `stories/[name]/creative-plan.md` |
152
+ | `/tasks` | 分解任务清单 | `stories/[name]/tasks.md` |
153
+ | `/write` | 执行章节写作 | `stories/[name]/content/chapter-XX.md` |
154
+ | `/analyze` | 质量验证分析 | 分析报告(双模式:框架/内容) |
155
+
156
+ ### 追踪与验证
157
+
158
+ | 命令 | 功能 |
159
+ |------|------|
160
+ | `/track-init` | 初始化追踪系统 |
161
+ | `/track` | 综合追踪更新 |
162
+ | `/plot-check` | 情节一致性检查 |
163
+ | `/timeline` | 时间线管理 |
164
+ | `/relations` | 角色关系追踪 |
165
+ | `/world-check` | 世界观验证 |
166
+
167
+ ## 🔌 插件系统
168
+
169
+ ### 安装插件
170
+
171
+ ```bash
172
+ # 列出可用插件
173
+ novelws plugin:list
174
+
175
+ # 安装插件
176
+ novelws plugin:add authentic-voice
177
+
178
+ # 移除插件
179
+ novelws plugin:remove authentic-voice
180
+ ```
181
+
182
+ ### 官方插件
183
+
184
+ - **authentic-voice** - 真实人声写作插件,提升原创度和生活质感
185
+ - 更多插件开发中...
186
+
187
+ ## 📖 项目结构
188
+
189
+ ```text
190
+ my-novel/
191
+ ├── .claude/
192
+ │ ├── commands/ # Slash Commands
193
+ │ └── skills/ # Agent Skills
194
+
195
+ ├── .specify/ # Spec Kit 配置
196
+ │ ├── memory/
197
+ │ │ └── constitution.md
198
+ │ └── templates/
199
+ │ ├── scripts/ # 命令行脚本工具
200
+ │ │ ├── bash/
201
+ │ │ └── powershell/
202
+ │ ├── commands/
203
+ │ ├── knowledge/
204
+ │ └── ...
205
+
206
+ ├── stories/
207
+ │ └── 001-my-story/
208
+ │ ├── specification.md
209
+ │ ├── creative-plan.md
210
+ │ ├── tasks.md
211
+ │ └── content/
212
+ │ ├── chapter-01.md
213
+ │ └── ...
214
+
215
+ ├── spec/
216
+ │ ├── tracking/ # 追踪数据
217
+ │ │ ├── plot-tracker.json
218
+ │ │ ├── timeline.json
219
+ │ │ ├── character-state.json
220
+ │ │ └── relationships.json
221
+ │ │
222
+ │ └── knowledge/ # 知识库
223
+ │ ├── characters/
224
+ │ ├── worldbuilding/
225
+ │ └── references/
226
+
227
+ └── README.md
228
+ ```
229
+
230
+ ## 🆚 与 novel-writer 的关系
231
+
232
+ | 特性 | novel-writer | novel-writer-skills |
233
+ |------|-------------|-------------------|
234
+ | **支持平台** | 13个AI工具(Claude、Cursor、Gemini等) | Claude Code 专用 |
235
+ | **核心方法论** | ✅ 七步方法论 | ✅ 七步方法论 |
236
+ | **Slash Commands** | ✅ 跨平台命令 | ✅ Claude 优化命令 |
237
+ | **Agent Skills** | ❌ 不支持 | ✅ 深度集成 |
238
+ | **智能检查** | ⚠️ 手动执行 | ✅ 自动监控 |
239
+ | **类型知识库** | ⚠️ 需手动查阅 | ✅ 自动激活 |
240
+ | **适用场景** | 需要跨平台支持 | 追求最佳体验(Claude Code) |
241
+
242
+ **选择建议**:
243
+
244
+ - 如果你使用多个AI工具 → 选择 **novel-writer**
245
+ - 如果你专注 Claude Code → 选择 **novel-writer-skills**
246
+
247
+ ## 🛠️ CLI 命令
248
+
249
+ ### 项目管理
250
+
251
+ ```bash
252
+ # 初始化项目
253
+ novelws init <project-name>
254
+
255
+ # 检查环境
256
+ novelws check
257
+
258
+ # 升级项目
259
+ novelws upgrade
260
+ ```
261
+
262
+ ### 插件管理
263
+
264
+ ```bash
265
+ # 列出已安装插件
266
+ novelws plugin:list
267
+
268
+ # 安装插件
269
+ novelws plugin:add <plugin-name>
270
+
271
+ # 移除插件
272
+ novelws plugin:remove <plugin-name>
273
+ ```
274
+
275
+ ## 🔧 命令行脚本(可选)
276
+
277
+ 除了 Claude Code 中的 Slash Commands,项目还包含命令行脚本工具:
278
+
279
+ ### 脚本位置
280
+
281
+ 初始化项目后,脚本位于:`.specify/templates/scripts/`
282
+
283
+ ```text
284
+ .specify/templates/scripts/
285
+ ├── bash/ # macOS/Linux 脚本
286
+ └── powershell/ # Windows 脚本
287
+ ```
288
+
289
+ ### 使用场景
290
+
291
+ - ✅ **命令行替代** - 在终端中直接执行七步方法论
292
+ - ✅ **自动化工作流** - 集成到 CI/CD 或批处理脚本
293
+ - ✅ **批量操作** - 处理多个故事或批量检查
294
+ - ✅ **独立使用** - 不依赖 Claude Code 的场景
295
+
296
+ ### 快速示例
297
+
298
+ **macOS/Linux:**
299
+
300
+ ```bash
301
+ # 创建宪法
302
+ bash .specify/templates/scripts/bash/constitution.sh
303
+
304
+ # 定义规格
305
+ bash .specify/templates/scripts/bash/specify-story.sh
306
+
307
+ # 追踪进度
308
+ bash .specify/templates/scripts/bash/track-progress.sh
309
+ ```
310
+
311
+ **Windows:**
312
+
313
+ ```powershell
314
+ # 创建宪法
315
+ .\.specify\templates\scripts\powershell\constitution.ps1
316
+
317
+ # 定义规格
318
+ .\.specify\templates\scripts\powershell\specify-story.ps1
319
+
320
+ # 追踪进度
321
+ .\.specify\templates\scripts\powershell\track-progress.ps1
322
+ ```
323
+
324
+ ### 可用脚本
325
+
326
+ 所有 Slash Commands 都有对应的脚本版本:
327
+
328
+ | 脚本 | 功能 | 对应命令 |
329
+ |-----|------|---------|
330
+ | `constitution` | 创建创作宪法 | `/constitution` |
331
+ | `specify-story` | 定义故事规格 | `/specify` |
332
+ | `plan-story` | 制定创作计划 | `/plan` |
333
+ | `track-progress` | 追踪进度 | `/track` |
334
+ | `check-consistency` | 一致性检查 | - |
335
+ | 以及更多... | 查看 `.specify/templates/scripts/README.md` | - |
336
+
337
+ 📖 **详细文档**:[scripts/README.md](templates/scripts/README.md)
338
+
339
+ ### 何时使用脚本 vs Slash Commands
340
+
341
+ | 场景 | 推荐方式 |
342
+ |-----|---------|
343
+ | 日常创作、需要 AI 协助 | ✅ Slash Commands (优先) |
344
+ | 批量处理、自动化 | ✅ 命令行脚本 |
345
+ | CI/CD 集成 | ✅ 命令行脚本 |
346
+ | 快速检查验证 | ✅ 命令行脚本 |
347
+
348
+ ## 📚 文档
349
+
350
+ - [入门指南](docs/guides/getting-started.md) - 详细安装和使用教程
351
+ - [命令详解](docs/guides/commands.md) - 所有命令的完整说明
352
+ - [Skills 指南](docs/guides/skills-guide.md) - Agent Skills 工作原理
353
+ - [脚本工具集](templates/scripts/README.md) - 命令行脚本使用指南
354
+ - [插件开发](docs/plugin-development.md) - 如何开发自己的插件
355
+
356
+ ## 🤝 贡献
357
+
358
+ 欢迎提交 Issue 和 Pull Request!
359
+
360
+ 项目地址:[https://github.com/binlee1990/novel-writer-skills](https://github.com/binlee1990/novel-writer-skills)
361
+
362
+ ## 📄 许可证
363
+
364
+ MIT License
365
+
366
+ ## 🙏 致谢
367
+
368
+ 本项目基于 [novel-writer](https://github.com/wordflowlab/novel-writer) 的方法论,专为 Claude Code 深度优化。
369
+
370
+ ---
371
+
372
+ **Novel Writer Skills** - 让 Claude Code 成为你的最佳创作伙伴! ✨📚
package/dist/cli.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""}
package/dist/cli.js ADDED
@@ -0,0 +1,50 @@
1
+ #!/usr/bin/env node
2
+ import { Command } from '@commander-js/extra-typings';
3
+ import chalk from 'chalk';
4
+ import { getVersion, getVersionInfo } from './version.js';
5
+ import { registerInitCommand } from './commands/init.js';
6
+ import { registerCheckCommand } from './commands/check.js';
7
+ import { registerUpgradeCommand } from './commands/upgrade.js';
8
+ import { registerPluginCommands } from './commands/plugin.js';
9
+ // 显示欢迎横幅
10
+ function displayBanner() {
11
+ const banner = `
12
+ ╔═══════════════════════════════════════╗
13
+ ║ 📚 Novel Writer Skills 📝 ║
14
+ ║ Claude Code 专用小说创作工具 ║
15
+ ╚═══════════════════════════════════════╝
16
+ `;
17
+ console.log(chalk.cyan(banner));
18
+ console.log(chalk.gray(` ${getVersionInfo()}\n`));
19
+ }
20
+ displayBanner();
21
+ const program = new Command();
22
+ program
23
+ .name('novelws')
24
+ .description(chalk.cyan('Novel Writer Skills - Claude Code 专用小说创作工具'))
25
+ .version(getVersion(), '-v, --version', '显示版本号')
26
+ .helpOption('-h, --help', '显示帮助信息');
27
+ // 注册子命令
28
+ registerInitCommand(program);
29
+ registerCheckCommand(program);
30
+ registerUpgradeCommand(program);
31
+ registerPluginCommands(program);
32
+ // 自定义帮助信息
33
+ program.on('--help', () => {
34
+ console.log('');
35
+ console.log(chalk.yellow('使用示例:'));
36
+ console.log('');
37
+ console.log(' $ novelws init my-story # 创建新项目');
38
+ console.log(' $ novelws init --here # 在当前目录初始化');
39
+ console.log(' $ novelws check # 检查环境');
40
+ console.log(' $ novelws plugin:list # 列出插件');
41
+ console.log('');
42
+ console.log(chalk.gray('更多信息: https://github.com/binlee1990/novel-writer-skills'));
43
+ });
44
+ // 解析命令行参数
45
+ program.parse(process.argv);
46
+ // 如果没有提供任何命令,显示帮助信息
47
+ if (!process.argv.slice(2).length) {
48
+ program.outputHelp();
49
+ }
50
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AACtD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,SAAS;AACT,SAAS,aAAa;IACpB,MAAM,MAAM,GAAG;;;;;CAKhB,CAAC;IACA,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAChC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC;AACrD,CAAC;AAED,aAAa,EAAE,CAAC;AAEhB,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,SAAS,CAAC;KACf,WAAW,CAAC,KAAK,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAC;KACrE,OAAO,CAAC,UAAU,EAAE,EAAE,eAAe,EAAE,OAAO,CAAC;KAC/C,UAAU,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAC;AAEtC,QAAQ;AACR,mBAAmB,CAAC,OAAO,CAAC,CAAC;AAC7B,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC9B,sBAAsB,CAAC,OAAO,CAAC,CAAC;AAChC,sBAAsB,CAAC,OAAO,CAAC,CAAC;AAEhC,UAAU;AACV,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE;IACxB,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACnC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;IACtD,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,CAAC;IACzD,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;IACrD,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;IACrD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAChB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,yDAAyD,CAAC,CAAC,CAAC;AACrF,CAAC,CAAC,CAAC;AAEH,UAAU;AACV,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAE5B,oBAAoB;AACpB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IAClC,OAAO,CAAC,UAAU,EAAE,CAAC;AACvB,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * check 命令 - 检查系统环境
3
+ */
4
+ import { Command } from '@commander-js/extra-typings';
5
+ export declare function registerCheckCommand(program: Command): void;
6
+ //# sourceMappingURL=check.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAItD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA4B3D"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * check 命令 - 检查系统环境
3
+ */
4
+ import chalk from 'chalk';
5
+ import { execSync } from 'child_process';
6
+ export function registerCheckCommand(program) {
7
+ program
8
+ .command('check')
9
+ .description('检查系统环境和 Claude Code')
10
+ .action(() => {
11
+ console.log(chalk.cyan('检查系统环境...\n'));
12
+ const checks = [
13
+ { name: 'Node.js', command: 'node --version', installed: false },
14
+ { name: 'Git', command: 'git --version', installed: false },
15
+ ];
16
+ checks.forEach(check => {
17
+ try {
18
+ const version = execSync(check.command, { encoding: 'utf-8' }).trim();
19
+ check.installed = true;
20
+ console.log(chalk.green('✓') + ` ${check.name} 已安装 (${version})`);
21
+ }
22
+ catch {
23
+ console.log(chalk.yellow('⚠') + ` ${check.name} 未安装`);
24
+ }
25
+ });
26
+ console.log('\n' + chalk.cyan('Claude Code 检测:'));
27
+ console.log(chalk.gray('请确保已安装 Claude Code 并可以正常使用'));
28
+ console.log(chalk.gray('下载地址: https://claude.ai/download'));
29
+ console.log('\n' + chalk.green('环境检查完成!'));
30
+ });
31
+ }
32
+ //# sourceMappingURL=check.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check.js","sourceRoot":"","sources":["../../src/commands/check.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,UAAU,oBAAoB,CAAC,OAAgB;IACnD,OAAO;SACJ,OAAO,CAAC,OAAO,CAAC;SAChB,WAAW,CAAC,qBAAqB,CAAC;SAClC,MAAM,CAAC,GAAG,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;QAEvC,MAAM,MAAM,GAAG;YACb,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,KAAK,EAAE;YAChE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,KAAK,EAAE;SAC5D,CAAC;QAEF,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACrB,IAAI,CAAC;gBACH,MAAM,OAAO,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;gBACtE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;gBACvB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,KAAK,CAAC,IAAI,SAAS,OAAO,GAAG,CAAC,CAAC;YACpE,CAAC;YAAC,MAAM,CAAC;gBACP,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,KAAK,CAAC,IAAI,MAAM,CAAC,CAAC;YACxD,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC,CAAC;QACtD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,kCAAkC,CAAC,CAAC,CAAC;QAE5D,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * init 命令 - 初始化小说项目
3
+ */
4
+ import { Command } from '@commander-js/extra-typings';
5
+ export declare function registerInitCommand(program: Command): void;
6
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,6BAA6B,CAAC;AAetD,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAsK1D"}