@waterwx/dsh-novel-forge 2.1.1-alpha → 2.1.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 (253) hide show
  1. package/README.md +368 -472
  2. package/lib/client.js +19578 -21391
  3. package/lib/index.js +4640 -3932
  4. package/lib/types/action-guard.d.ts +61 -0
  5. package/lib/types/ai-scan.d.ts +0 -6
  6. package/lib/types/assets.d.ts +7 -9
  7. package/lib/types/assistant.d.ts +25 -0
  8. package/lib/types/author-assets.d.ts +1 -3
  9. package/lib/types/bookshelf.d.ts +13 -3
  10. package/lib/types/client/api.d.ts +49 -29
  11. package/lib/types/client/chip-prefs.d.ts +36 -0
  12. package/lib/types/client/docx.d.ts +2 -2
  13. package/lib/types/client/llmLive.d.ts +12 -14
  14. package/lib/types/client/locales.d.ts +12 -67
  15. package/lib/types/client/mount.d.ts +0 -2
  16. package/lib/types/client/panel/AdaptModeView.d.ts +1 -1
  17. package/lib/types/client/panel/AiTag.d.ts +1 -0
  18. package/lib/types/client/panel/AssetsTab.d.ts +1 -1
  19. package/lib/types/client/panel/AssistantTab.d.ts +4 -1
  20. package/lib/types/client/panel/AuthorAssetsView.d.ts +1 -1
  21. package/lib/types/client/panel/AuthorHome.d.ts +12 -12
  22. package/lib/types/client/panel/CmdPalette.d.ts +12 -0
  23. package/lib/types/client/panel/CreateBookView.d.ts +1 -1
  24. package/lib/types/client/panel/GlobalAssetLibraryView.d.ts +1 -1
  25. package/lib/types/client/panel/ImportModal.d.ts +1 -1
  26. package/lib/types/client/panel/LiveFeedLog.d.ts +8 -0
  27. package/lib/types/client/panel/ModelManager.d.ts +2 -2
  28. package/lib/types/client/panel/NovelPanel.d.ts +7 -2
  29. package/lib/types/client/panel/PageHeader.d.ts +18 -0
  30. package/lib/types/client/panel/ProgressConsole.d.ts +1 -1
  31. package/lib/types/client/panel/PromptSlotsView.d.ts +11 -0
  32. package/lib/types/client/panel/ReaderView.d.ts +1 -1
  33. package/lib/types/client/panel/RunPanel.d.ts +1 -1
  34. package/lib/types/client/panel/SettingsView.d.ts +13 -10
  35. package/lib/types/client/panel/ShelfView.d.ts +11 -2
  36. package/lib/types/client/panel/SubPage.d.ts +27 -0
  37. package/lib/types/client/panel/TensionView.d.ts +18 -0
  38. package/lib/types/client/panel/TimelineView.d.ts +18 -0
  39. package/lib/types/client/panel/WorldTab.d.ts +1 -1
  40. package/lib/types/client/panel/helpers.d.ts +5 -3
  41. package/lib/types/client/panel/market-radar-state.d.ts +56 -0
  42. package/lib/types/client/panel/outline-markdown.d.ts +112 -0
  43. package/lib/types/client/panel/status-badge.d.ts +13 -0
  44. package/lib/types/client/panel/storage-parse.d.ts +46 -0
  45. package/lib/types/client/panel/toast.d.ts +2 -0
  46. package/lib/types/client/panel/usePersistentState.d.ts +17 -0
  47. package/lib/types/client/panel/views.d.ts +21 -35
  48. package/lib/types/client/run-status.d.ts +21 -0
  49. package/lib/types/client/sidebar-entry.d.ts +0 -2
  50. package/lib/types/digest-parse.d.ts +29 -0
  51. package/lib/types/docx-core.d.ts +16 -0
  52. package/lib/types/docx.d.ts +2 -3
  53. package/lib/types/engine.d.ts +122 -103
  54. package/lib/types/home.d.ts +11 -0
  55. package/lib/types/index.d.ts +21 -13
  56. package/lib/types/llm-live.d.ts +62 -36
  57. package/lib/types/llm-retry.d.ts +38 -0
  58. package/lib/types/market-radar-scan.d.ts +0 -1
  59. package/lib/types/market-radar-sources.d.ts +1 -1
  60. package/lib/types/migrate-output.d.ts +25 -0
  61. package/lib/types/model-capability.d.ts +119 -0
  62. package/lib/types/model-request.d.ts +36 -0
  63. package/lib/types/output-budget.d.ts +86 -0
  64. package/lib/types/plotline-align.d.ts +35 -0
  65. package/lib/types/prompt-slots.d.ts +57 -0
  66. package/lib/types/prompting.d.ts +2 -27
  67. package/lib/types/protocol.d.ts +479 -595
  68. package/lib/types/revision.d.ts +76 -0
  69. package/lib/types/routes.d.ts +9 -3
  70. package/lib/types/run-selection.d.ts +51 -0
  71. package/lib/types/run.d.ts +31 -0
  72. package/lib/types/settings-persist.d.ts +59 -0
  73. package/lib/types/snapshots.d.ts +46 -0
  74. package/lib/types/stage-contract.d.ts +58 -0
  75. package/lib/types/stream-fallback.d.ts +60 -0
  76. package/lib/types/strip-headings.d.ts +33 -0
  77. package/lib/types/tension.d.ts +53 -0
  78. package/lib/types/timeline.d.ts +37 -0
  79. package/package.json +41 -28
  80. package/assets/styles/arcane-thick-3d.webp +0 -0
  81. package/assets/styles/chinese-ink.webp +0 -0
  82. package/assets/styles/clay-stopmotion-3d.webp +0 -0
  83. package/assets/styles/dark-ghibli.webp +0 -0
  84. package/assets/styles/dark-gothic-3d.webp +0 -0
  85. package/assets/styles/film-photo.webp +0 -0
  86. package/assets/styles/guofeng-heavy.webp +0 -0
  87. package/assets/styles/guoman-2d-gufeng.webp +0 -0
  88. package/assets/styles/guoman-3d-tianyuan.webp +0 -0
  89. package/assets/styles/guoman-3d-xuanhuan.webp +0 -0
  90. package/assets/styles/horror-game-3d.webp +0 -0
  91. package/assets/styles/hyperreal-3d.webp +0 -0
  92. package/assets/styles/japan-cel-dark.webp +0 -0
  93. package/assets/styles/korean-webtoon.webp +0 -0
  94. package/assets/styles/low-cyberpunk-3d.webp +0 -0
  95. package/assets/styles/nextgen-cg.webp +0 -0
  96. package/assets/styles/noir-film.webp +0 -0
  97. package/assets/styles/openworld-survival.webp +0 -0
  98. package/assets/styles/paper-cut-3d.webp +0 -0
  99. package/assets/styles/pixar-adult-3d.webp +0 -0
  100. package/assets/styles/pop-marvel-2d.webp +0 -0
  101. package/assets/styles/sandiao-qban.webp +0 -0
  102. package/assets/styles/shinkai-anime.webp +0 -0
  103. package/assets/styles/tactical-stealth.webp +0 -0
  104. package/assets/styles/urban-lightreal-3d.webp +0 -0
  105. package/assets/styles/vaporwave-3d.webp +0 -0
  106. package/assets/styles/vhs90.webp +0 -0
  107. package/lib/types/client/panel/BookshelfBar.d.ts +0 -11
  108. package/lib/types/client/panel/FlowGuide.d.ts +0 -22
  109. package/lib/types/client/panel/MangaRoleLibrary.d.ts +0 -20
  110. package/lib/types/client/panel/MangaWorkspace.d.ts +0 -12
  111. package/lib/types/client/panel/ModelPicker.d.ts +0 -11
  112. package/lib/types/client/panel/ProgressHomeView.d.ts +0 -5
  113. package/lib/types/client/panel/PropLibrary.d.ts +0 -8
  114. package/lib/types/client/panel/SceneLibrary.d.ts +0 -16
  115. package/lib/types/client/panel/StoryboardTab.d.ts +0 -19
  116. package/lib/types/client/panel/StyleCard.d.ts +0 -8
  117. package/lib/types/client/panel/StyleGallery.d.ts +0 -1
  118. package/lib/types/comic-presets.d.ts +0 -12
  119. package/lib/types/manga-genre-rules.d.ts +0 -22
  120. package/lib/types/prompt-utils.d.ts +0 -35
  121. package/lib/types/review-policy.d.ts +0 -97
  122. package/lib/types/shot-language.d.ts +0 -46
  123. package/lib/types/src/ai-scan.d.ts +0 -36
  124. package/lib/types/src/assets.d.ts +0 -37
  125. package/lib/types/src/assistant.d.ts +0 -45
  126. package/lib/types/src/author-assets.d.ts +0 -25
  127. package/lib/types/src/bookshelf.d.ts +0 -42
  128. package/lib/types/src/client/api.d.ts +0 -234
  129. package/lib/types/src/client/docx.d.ts +0 -15
  130. package/lib/types/src/client/index.d.ts +0 -14
  131. package/lib/types/src/client/locales.d.ts +0 -212
  132. package/lib/types/src/client/mount.d.ts +0 -9
  133. package/lib/types/src/client/panel/AdaptModeView.d.ts +0 -5
  134. package/lib/types/src/client/panel/AssetsTab.d.ts +0 -12
  135. package/lib/types/src/client/panel/AssistantTab.d.ts +0 -7
  136. package/lib/types/src/client/panel/AuthorAssetsView.d.ts +0 -4
  137. package/lib/types/src/client/panel/AuthorHome.d.ts +0 -32
  138. package/lib/types/src/client/panel/BookshelfBar.d.ts +0 -11
  139. package/lib/types/src/client/panel/CreateBookView.d.ts +0 -9
  140. package/lib/types/src/client/panel/FlowGuide.d.ts +0 -22
  141. package/lib/types/src/client/panel/GlobalAssetLibraryView.d.ts +0 -4
  142. package/lib/types/src/client/panel/ImportModal.d.ts +0 -7
  143. package/lib/types/src/client/panel/MangaRoleLibrary.d.ts +0 -20
  144. package/lib/types/src/client/panel/MangaWorkspace.d.ts +0 -12
  145. package/lib/types/src/client/panel/ModelManager.d.ts +0 -14
  146. package/lib/types/src/client/panel/NovelPanel.d.ts +0 -13
  147. package/lib/types/src/client/panel/ProgressConsole.d.ts +0 -17
  148. package/lib/types/src/client/panel/ProgressHomeView.d.ts +0 -5
  149. package/lib/types/src/client/panel/PropLibrary.d.ts +0 -8
  150. package/lib/types/src/client/panel/ReaderView.d.ts +0 -8
  151. package/lib/types/src/client/panel/ReasoningSection.d.ts +0 -10
  152. package/lib/types/src/client/panel/RunPanel.d.ts +0 -5
  153. package/lib/types/src/client/panel/SceneLibrary.d.ts +0 -16
  154. package/lib/types/src/client/panel/SettingsView.d.ts +0 -16
  155. package/lib/types/src/client/panel/ShelfView.d.ts +0 -15
  156. package/lib/types/src/client/panel/StoryboardTab.d.ts +0 -19
  157. package/lib/types/src/client/panel/StyleCard.d.ts +0 -8
  158. package/lib/types/src/client/panel/StyleGallery.d.ts +0 -1
  159. package/lib/types/src/client/panel/WorldTab.d.ts +0 -10
  160. package/lib/types/src/client/panel/controller.d.ts +0 -19
  161. package/lib/types/src/client/panel/helpers.d.ts +0 -18
  162. package/lib/types/src/client/panel/views.d.ts +0 -77
  163. package/lib/types/src/client/sidebar-entry.d.ts +0 -13
  164. package/lib/types/src/client/text.d.ts +0 -9
  165. package/lib/types/src/comic-presets.d.ts +0 -12
  166. package/lib/types/src/docx.d.ts +0 -19
  167. package/lib/types/src/engine.d.ts +0 -402
  168. package/lib/types/src/index.d.ts +0 -79
  169. package/lib/types/src/manga-genre-rules.d.ts +0 -22
  170. package/lib/types/src/novel-context.d.ts +0 -80
  171. package/lib/types/src/prompt-utils.d.ts +0 -35
  172. package/lib/types/src/protocol.d.ts +0 -2176
  173. package/lib/types/src/review-policy.d.ts +0 -97
  174. package/lib/types/src/routes.d.ts +0 -29
  175. package/lib/types/src/run.d.ts +0 -32
  176. package/lib/types/src/shot-language.d.ts +0 -46
  177. package/lib/types/src/story-beat-language.d.ts +0 -35
  178. package/lib/types/src/style-library.d.ts +0 -33
  179. package/lib/types/story-beat-language.d.ts +0 -35
  180. package/lib/types/style-library.d.ts +0 -33
  181. package/src/ai-scan.ts +0 -179
  182. package/src/assets.ts +0 -1774
  183. package/src/assistant.ts +0 -915
  184. package/src/author-assets.ts +0 -147
  185. package/src/bookshelf.ts +0 -167
  186. package/src/client/api.ts +0 -716
  187. package/src/client/css-modules.d.ts +0 -8
  188. package/src/client/docx.ts +0 -69
  189. package/src/client/index.ts +0 -34
  190. package/src/client/llmLive.ts +0 -101
  191. package/src/client/locales.ts +0 -418
  192. package/src/client/mount.tsx +0 -97
  193. package/src/client/mount.tsx._new +0 -97
  194. package/src/client/mount.tsx._nf +0 -97
  195. package/src/client/mount.tsx._tmp +0 -97
  196. package/src/client/panel/AdaptModeView.tsx +0 -535
  197. package/src/client/panel/AssetsTab.tsx +0 -458
  198. package/src/client/panel/AssistantTab.tsx +0 -339
  199. package/src/client/panel/AuthorAssetsView.tsx +0 -208
  200. package/src/client/panel/AuthorHome.tsx +0 -234
  201. package/src/client/panel/BookAnalysisView.tsx +0 -60
  202. package/src/client/panel/BookshelfBar.tsx +0 -170
  203. package/src/client/panel/CreateBookView.tsx +0 -371
  204. package/src/client/panel/DirectorView.tsx +0 -200
  205. package/src/client/panel/FlowGuide.tsx +0 -84
  206. package/src/client/panel/GlobalAssetLibraryView.tsx +0 -172
  207. package/src/client/panel/IdeaInspirationView.tsx +0 -71
  208. package/src/client/panel/ImportModal.tsx +0 -303
  209. package/src/client/panel/KnowledgeBaseView.tsx +0 -73
  210. package/src/client/panel/LiveFeedLog.tsx +0 -76
  211. package/src/client/panel/MangaRoleLibrary.tsx +0 -1002
  212. package/src/client/panel/MangaWorkspace.tsx +0 -715
  213. package/src/client/panel/MarketRadarView.tsx +0 -374
  214. package/src/client/panel/ModelManager.tsx +0 -205
  215. package/src/client/panel/NovelPanel.tsx +0 -4721
  216. package/src/client/panel/ProgressConsole.tsx +0 -63
  217. package/src/client/panel/ProgressHomeView.tsx +0 -87
  218. package/src/client/panel/PropLibrary.tsx +0 -175
  219. package/src/client/panel/ReaderView.tsx +0 -306
  220. package/src/client/panel/ReasoningSection.tsx +0 -31
  221. package/src/client/panel/RunPanel.tsx +0 -204
  222. package/src/client/panel/SceneLibrary.tsx +0 -453
  223. package/src/client/panel/SettingsView.tsx +0 -289
  224. package/src/client/panel/ShelfView.tsx +0 -242
  225. package/src/client/panel/StoryboardTab.tsx +0 -472
  226. package/src/client/panel/StyleCard.tsx +0 -90
  227. package/src/client/panel/StyleGallery.tsx +0 -58
  228. package/src/client/panel/WorldTab.tsx +0 -202
  229. package/src/client/panel/controller.ts +0 -45
  230. package/src/client/panel/helpers.ts +0 -67
  231. package/src/client/panel/panel.module.css +0 -4359
  232. package/src/client/panel/views.tsx +0 -314
  233. package/src/client/sidebar-entry.ts +0 -122
  234. package/src/client/text.ts +0 -28
  235. package/src/comic-presets.ts +0 -67
  236. package/src/docx.ts +0 -83
  237. package/src/engine.ts +0 -5636
  238. package/src/global-assets.ts +0 -59
  239. package/src/index.ts +0 -346
  240. package/src/llm-live.ts +0 -68
  241. package/src/manga-genre-rules.ts +0 -87
  242. package/src/market-radar-scan.ts +0 -41
  243. package/src/market-radar-sources.ts +0 -173
  244. package/src/novel-context.ts +0 -287
  245. package/src/prompt-utils.ts +0 -73
  246. package/src/prompting.ts +0 -159
  247. package/src/protocol.ts +0 -2565
  248. package/src/review-policy.ts +0 -161
  249. package/src/routes.ts +0 -3939
  250. package/src/run.ts +0 -338
  251. package/src/shot-language.ts +0 -181
  252. package/src/story-beat-language.ts +0 -130
  253. package/src/style-library.ts +0 -84
package/package.json CHANGED
@@ -1,18 +1,31 @@
1
1
  {
2
2
  "name": "@waterwx/dsh-novel-forge",
3
- "description": "AI 编译小说工作台 for the dsh web GUI: import a novel outline (docx/text), plan chapters with LLM, generate chapter by chapter (3000-4000 chars each), and save every chapter as Markdown into your chosen output folder.",
4
- "version": "2.1.1-alpha",
3
+ "description": "AI 编译纯文本小说工作台 for the dsh web GUI: import a novel outline (docx/text), plan volumes & chapters with LLM, generate chapter by chapter (3000-4000 chars each), auto AI review & book audit, and export the full book as Markdown/TXT into your chosen output folder.",
4
+ "version": "2.1.1",
5
5
  "type": "module",
6
6
  "author": "waterwx",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/watersxya/dsh-novel-forge.git"
10
+ },
11
+ "homepage": "https://github.com/watersxya/dsh-novel-forge",
12
+ "bugs": {
13
+ "url": "https://github.com/watersxya/dsh-novel-forge/issues"
14
+ },
7
15
  "keywords": [
8
16
  "dsh",
9
17
  "dsh-plugin",
10
18
  "deepseek-harness",
11
19
  "小说工坊",
12
20
  "novel-forge",
13
- "ai-novel-writing",
21
+ "novel-writing-workbench",
14
22
  "novel-writing",
15
- "写作助手"
23
+ "写作助手",
24
+ "小说创作",
25
+ "网文写作",
26
+ "章节生成",
27
+ "AI审稿",
28
+ "story-writing"
16
29
  ],
17
30
  "engines": {
18
31
  "node": "^22.19.0 || >=24.0.0"
@@ -28,7 +41,6 @@
28
41
  "types": "./lib/types/client/index.d.ts",
29
42
  "default": "./lib/client.js"
30
43
  },
31
- "./src/*": "./src/*",
32
44
  "./package.json": "./package.json"
33
45
  },
34
46
  "dsh": {
@@ -49,31 +61,31 @@
49
61
  "schemastery": "^3.18.0"
50
62
  },
51
63
  "peerDependencies": {
52
- "@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.3",
53
- "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.3",
54
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.3",
55
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.3",
56
- "@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.3",
57
- "@deepseek-ai/dsh-llm": "^0.1.2-alpha.3",
58
- "@deepseek-ai/dsh-settings": "^0.1.2-alpha.3",
59
- "@deepseek-ai/dsh-skill": "^0.1.2-alpha.3",
60
- "@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.3",
61
- "@deepseek-ai/dsh-tools": "^0.1.2-alpha.3",
64
+ "@deepseek-ai/dsh-client-connection": "^0.2.0-rc.2",
65
+ "@deepseek-ai/dsh-client-locale": "^0.2.0-rc.2",
66
+ "@deepseek-ai/dsh-client-ui-settings": "^0.2.0-rc.2",
67
+ "@deepseek-ai/dsh-client-ui-slots": "^0.2.0-rc.2",
68
+ "@deepseek-ai/dsh-host-webserver": "^0.2.0-rc.2",
69
+ "@deepseek-ai/dsh-llm": "^0.2.0-rc.2",
70
+ "@deepseek-ai/dsh-settings": "^0.2.0-rc.2",
71
+ "@deepseek-ai/dsh-skill": "^0.2.0-rc.2",
72
+ "@deepseek-ai/dsh-system-prompt": "^0.2.0-rc.2",
73
+ "@deepseek-ai/dsh-tools": "^0.2.0-rc.2",
62
74
  "react": "^18.2.0",
63
75
  "react-dom": "^18.2.0"
64
76
  },
65
77
  "devDependencies": {
66
78
  "@deepseek-ai/cordis": "^4.0.1",
67
- "@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.3",
68
- "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.3",
69
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.3",
70
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.3",
71
- "@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.3",
72
- "@deepseek-ai/dsh-llm": "^0.1.2-alpha.3",
73
- "@deepseek-ai/dsh-settings": "^0.1.2-alpha.3",
74
- "@deepseek-ai/dsh-skill": "^0.1.2-alpha.3",
75
- "@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.3",
76
- "@deepseek-ai/dsh-tools": "^0.1.2-alpha.3",
79
+ "@deepseek-ai/dsh-client-connection": "0.1.2-alpha.3",
80
+ "@deepseek-ai/dsh-client-locale": "0.1.2-alpha.3",
81
+ "@deepseek-ai/dsh-client-ui-settings": "0.1.2-alpha.3",
82
+ "@deepseek-ai/dsh-client-ui-slots": "0.1.2-alpha.3",
83
+ "@deepseek-ai/dsh-host-webserver": "0.1.2-alpha.3",
84
+ "@deepseek-ai/dsh-llm": "0.1.2-alpha.3",
85
+ "@deepseek-ai/dsh-settings": "0.1.2-alpha.3",
86
+ "@deepseek-ai/dsh-skill": "0.1.2-alpha.3",
87
+ "@deepseek-ai/dsh-system-prompt": "0.1.2-alpha.3",
88
+ "@deepseek-ai/dsh-tools": "0.1.2-alpha.3",
77
89
  "@types/node": "^22.20.0",
78
90
  "@types/react": "~18.3.1",
79
91
  "@types/react-dom": "^18.3.5",
@@ -87,8 +99,6 @@
87
99
  "files": [
88
100
  "lib/**/*.js",
89
101
  "lib/**/*.d.ts",
90
- "src",
91
- "assets/styles",
92
102
  "scripts/patch-schemastery.mjs",
93
103
  "cordis.patch.yml",
94
104
  "README.md"
@@ -96,11 +106,14 @@
96
106
  "license": "Apache-2.0",
97
107
  "scripts": {
98
108
  "postinstall": "node scripts/patch-schemastery.mjs",
99
- "build": "tsc -p tsconfig.build.json && tsdown",
109
+ "build": "node scripts/clean-types.mjs && tsc -p tsconfig.build.json && tsdown",
100
110
  "bundle": "tsdown",
101
111
  "watch": "tsdown --watch",
102
112
  "typecheck": "tsc --noEmit",
103
113
  "check:styles": "node scripts/check-theme-sizes.mjs",
114
+ "check:third-party": "node scripts/check-third-party.mjs",
115
+ "check:contrast": "node scripts/audit-contrast.mjs",
116
+ "check:third-party:list": "node scripts/check-third-party.mjs --list",
104
117
  "release": "node scripts/release.mjs",
105
118
  "release:dry": "node scripts/release.mjs --dry-run",
106
119
  "test": "vitest run"
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,11 +0,0 @@
1
- import type { NovelApi } from '../api.ts';
2
- import type { BookshelfSnapshot } from '../../protocol.ts';
3
- /** Props. */
4
- export interface BookshelfBarProps {
5
- api: NovelApi;
6
- shelf: BookshelfSnapshot;
7
- /** 刷新整个面板(切换书后重新拉状态)。 */
8
- onSwitch: () => void;
9
- }
10
- /** 书架条。 */
11
- export declare function BookshelfBar({ api, shelf, onSwitch }: BookshelfBarProps): any;
@@ -1,22 +0,0 @@
1
- /**
2
- * 漫剧工作台·全流程步骤条(唯一导航,方案X):
3
- * ①创建方案 → ②一键生成 → ③分镜 → ④角色定妆 → ⑤场景底图 → ⑥导出使用。
4
- * 每个步骤对应一个独立页面主体;完成度自动判定(读 project 现有字段)。
5
- */
6
- import type { ProjectState } from '../../protocol.ts';
7
- /** 步骤 → 页面主体的一一对应目标。 */
8
- export type FlowTarget = 'plan' | 'rules' | 'skeleton' | 'table' | 'import' | 'makeup' | 'prompts' | 'scenes' | 'props' | 'export';
9
- export interface FlowStep {
10
- no: number;
11
- label: string;
12
- hint: string;
13
- done: boolean;
14
- target: FlowTarget;
15
- }
16
- /** 依据 project 数据计算 6 步完成度(与存储顺序无关,按生产顺序排列)。 */
17
- export declare function computeFlowSteps(project: ProjectState | null, exported?: boolean): FlowStep[];
18
- export declare function FlowGuide({ project, onNavigate, exported, }: {
19
- project: ProjectState | null;
20
- onNavigate: (target: FlowTarget) => void;
21
- exported?: boolean;
22
- }): any;
@@ -1,20 +0,0 @@
1
- import type { NovelApi } from '../api.ts';
2
- import type { ImageModelConfig, ProjectState } from '../../protocol.ts';
3
- export declare function MangaRoleLibrary({ api, project, refresh, styleId, filterId, focus, showCards, chapterNo: externalChapter, onProgress, }: {
4
- api: NovelApi;
5
- project: ProjectState | null;
6
- refresh: () => void | Promise<void>;
7
- styleId?: string;
8
- filterId?: string;
9
- /** 是否启用生图(豆包等出定妆图)。 */
10
- imageApiEnabled?: boolean;
11
- /** 生图模型库(出定妆图时可选择用哪条)。 */
12
- imageModels?: ImageModelConfig[];
13
- /** 步骤页聚焦:import=展开并滚动到导入区;cards=滚动到已建漫剧卡列表。 */
14
- focus?: 'import' | 'cards';
15
- /** 是否显示「已建漫剧卡」列表(第⑤步导入页可隐藏,只留导入区)。 */
16
- showCards?: boolean;
17
- /** 全局当前章节(从工作台顶部导航条传入)。 */
18
- chapterNo?: number | null;
19
- onProgress?: (text: string, kind?: 'info' | 'done' | 'error') => void;
20
- }): any;
@@ -1,12 +0,0 @@
1
- import type { NovelApi } from '../api.ts';
2
- import type { ChapterPlan, ProjectState } from '../../protocol.ts';
3
- export declare function MangaWorkspace({ api, project, chapters, onProjectChanged, onProgress, }: {
4
- api: NovelApi;
5
- project: ProjectState | null;
6
- chapters: ChapterPlan[];
7
- /** 方案/资产变更已持久化后触发(刷新项目)。 */
8
- onProjectChanged?: () => void | Promise<void>;
9
- /** 是否启用生图(漫剧卡出定妆图)。 */
10
- /** 上报到「AI进度」控制台(漫剧工作台内所有 LLM/方案操作)。 */
11
- onProgress?: (text: string, kind?: 'info' | 'done' | 'error') => void;
12
- }): any;
@@ -1,11 +0,0 @@
1
- import type { NovelApi } from '../api.ts';
2
- /** 目录不可用时回退的内置预设(历史行为)。 */
3
- export declare const FALLBACK_MODEL_PRESETS: readonly ["deepseek-v4-flash", "deepseek-v4-pro", "deepseek-chat", "deepseek-reasoner"];
4
- export interface ModelPickerProps {
5
- api: NovelApi;
6
- provider: string;
7
- model: string;
8
- onProvider: (provider: string) => void;
9
- onModel: (model: string) => void;
10
- }
11
- export declare function ModelPicker({ api, provider, model, onProvider, onModel }: ModelPickerProps): JSX.Element;
@@ -1,5 +0,0 @@
1
- import type { BookshelfSnapshot } from '../../protocol.ts';
2
- export declare function ProgressHomeView({ shelf, onOpenBook }: {
3
- shelf: BookshelfSnapshot;
4
- onOpenBook: (id: string) => void;
5
- }): any;
@@ -1,8 +0,0 @@
1
- import type { NovelApi } from '../api.ts';
2
- import type { ProjectState } from '../../protocol.ts';
3
- export declare function PropLibrary({ api, project, refresh, onProgress, }: {
4
- api: NovelApi;
5
- project: ProjectState | null;
6
- refresh: () => void | Promise<void>;
7
- onProgress?: (text: string, kind?: 'info' | 'done' | 'error') => void;
8
- }): any;
@@ -1,16 +0,0 @@
1
- import type { NovelApi } from '../api.ts';
2
- import type { ProjectState } from '../../protocol.ts';
3
- export declare function SceneLibrary({ api, project, refresh, styleId, filterId, chapterNo: externalChapter, onProgress, }: {
4
- api: NovelApi;
5
- project: ProjectState | null;
6
- /** 场景库变更已持久化后触发(刷新项目)。 */
7
- refresh: () => void | Promise<void>;
8
- /** 提炼场景时的漫剧基底风格 id(提示词按方案风格措辞)。 */
9
- styleId?: string;
10
- /** 可选滤镜风格 id。 */
11
- filterId?: string;
12
- /** 全局当前章节(从工作台顶部导航条传入)。 */
13
- chapterNo?: number | null;
14
- /** 上报到「AI进度」控制台。 */
15
- onProgress?: (text: string, kind?: 'info' | 'done' | 'error') => void;
16
- }): any;
@@ -1,19 +0,0 @@
1
- import type { NovelApi } from '../api.ts';
2
- import type { ChapterPlan, ProjectState } from '../../protocol.ts';
3
- export declare function StoryboardTab({ api, project, chapters, onProjectChanged, styleId, filterId, mode, onGoStep, onProgress, }: {
4
- api: NovelApi;
5
- project: ProjectState | null;
6
- chapters: ChapterPlan[];
7
- /** 生成成功且已持久化后触发(刷新项目,切章/重进可恢复)。 */
8
- onProjectChanged?: () => void | Promise<void>;
9
- /** 漫剧基底风格 id(画面措辞随风格)。 */
10
- styleId?: string;
11
- /** 可选滤镜风格 id。 */
12
- filterId?: string;
13
- /** 页面模式:auto=按本章实际进度显示;skeleton/table/prompts=固定显示该步骤(前置不足显示提示,不降级)。 */
14
- mode?: 'auto' | 'skeleton' | 'table' | 'prompts';
15
- /** 「下一步」按钮回调(1=骨架→2=分镜表→3=提示词),供外层切步骤页。 */
16
- onGoStep?: (n: 1 | 2 | 3) => void;
17
- /** 上报到「AI进度」控制台(分镜三步生成)。 */
18
- onProgress?: (text: string, kind?: 'info' | 'done' | 'error') => void;
19
- }): any;
@@ -1,8 +0,0 @@
1
- import type { ArtStyle } from '../../style-library.ts';
2
- export declare function StyleCard({ style, selected, onClick, }: {
3
- style: ArtStyle;
4
- /** 选中态(高亮边框)。 */
5
- selected?: boolean;
6
- /** 点击卡片(选风格)。 */
7
- onClick?: () => void;
8
- }): any;
@@ -1 +0,0 @@
1
- export declare function StyleGallery(): any;
@@ -1,12 +0,0 @@
1
- /** 漫画风格预设:每个预设对应一组出图提示词与排版偏好。 */
2
- export interface ComicStylePreset {
3
- id: string;
4
- label: string;
5
- /** 注入 imagePrompt 的风格描述词。 */
6
- prompt: string;
7
- /** 可选:排版偏好说明。 */
8
- layoutHint?: string;
9
- }
10
- export declare const COMIC_STYLE_PRESETS: ComicStylePreset[];
11
- export declare function getComicStylePrompt(styleId?: string): string;
12
- export declare function getComicStyleLabel(styleId?: string): string;
@@ -1,22 +0,0 @@
1
- /**
2
- * 题材规则库(可插拔)—— 漫剧分镜/提示词生成的「题材专用规则」。
3
- * 参考短剧工业导演规范:不同题材用不同的视觉语言 / 打斗 / 特效规则,
4
- * 按漫剧方案的 genre 注入 generateStoryboardPrompts,避免「一套模板跑所有题材」。
5
- * 每个题材给一组「生成提示词时必须遵守的题材规则」;未选题材则不注入(走通用规则)。
6
- */
7
- export interface GenreRule {
8
- /** 题材 id。 */
9
- id: string;
10
- /** 题材名(展示)。 */
11
- label: string;
12
- /** 该题材的生成提示词核心规则(每行一条,注入生成时)。 */
13
- rules: string[];
14
- }
15
- /** 内置题材(通用题材 default 为空规则)。 */
16
- export declare const GENRES: GenreRule[];
17
- /** 通用题材(空规则,走通用生成)。 */
18
- export declare const DEFAULT_GENRE: GenreRule;
19
- /** 按题材 id 取规则(未找到返回通用)。 */
20
- export declare function getGenreRules(id?: string): string[];
21
- /** 取题材 label(展示用)。 */
22
- export declare function getGenreLabel(id?: string): string;
@@ -1,35 +0,0 @@
1
- /**
2
- * 提示词共享常量与工具
3
- *
4
- * 所有 JSON 输出规则、通用约束集中在此,避免各阶段重复定义、互相打架。
5
- */
6
- /** JSON 输出规则(所有要求模型输出 JSON 的地方共用) */
7
- export declare const JSON_OUTPUT_RULES: string[];
8
- /** JSON 输出规则的紧凑版(适合放在提示词末尾) */
9
- export declare const JSON_OUTPUT_RULES_COMPACT: string;
10
- /**
11
- * 估算 prompt 的 token 数(粗略估算,用于上下文预算控制)
12
- * 中文约 1.7 字/token,英文约 4 字符/token
13
- */
14
- export declare function estimateTokens(text: string): number;
15
- /**
16
- * 按 token 预算截断文本(保留开头,末尾加省略标记)
17
- * 用于控制单块上下文不超预算。
18
- */
19
- export declare function truncateByTokens(text: string, maxTokens: number, marker?: string): string;
20
- /** 通用「只改表达不改情节」约束(润色/局部修订共用) */
21
- export declare const EXPRESSION_ONLY_RULE: string[];
22
- /** 章节上下文各阶段的 token 预算(粗略,用于控制注入量) */
23
- export declare const CONTEXT_BUDGET: {
24
- /** 章节生成:道藏+角色+大纲+事实+伏笔 */
25
- readonly writing: 12000;
26
- /** AI 审稿:道藏+角色+事实+正文 */
27
- readonly review: 10000;
28
- /** 修订:原意见+相关事实+目标正文 */
29
- readonly revise: 8000;
30
- /** 润色:风格资产+原正文 */
31
- readonly polish: 6000;
32
- /** 分章规划:大纲+道藏+角色+近期事实 */
33
- readonly plan: 15000;
34
- };
35
- export type ContextStage = keyof typeof CONTEXT_BUDGET;
@@ -1,97 +0,0 @@
1
- /**
2
- * 审稿规则注册表
3
- *
4
- * 生成用 compact 模式(核心规则),审稿用 full 模式(全部规则),
5
- * 消除 reviewSystemPrompt 内嵌规则与 renderAllAssets() 两套打架的问题。
6
- */
7
- /** 通用写作资产规则(兼容 ProjectAssets 中的各类规则) */
8
- export interface WritingRule {
9
- name: string;
10
- description: string;
11
- type?: string;
12
- enabled?: boolean;
13
- }
14
- export interface ReviewRule {
15
- id: string;
16
- /** 规则维度 */
17
- dimension: 'character' | 'setting' | 'redline' | 'writing' | 'pacing' | 'logic' | 'anti-ai' | 'presentation' | 'compliance';
18
- /** 严重度 */
19
- severity: 'high' | 'medium' | 'low';
20
- /** 规则类型:forbidden=禁止类(命中即问题),encourage=鼓励类(不命中不算错) */
21
- type: 'forbidden' | 'encourage';
22
- /** 规则描述 */
23
- description: string;
24
- /** 是否启用 */
25
- enabled: boolean;
26
- /** 作用域 */
27
- scope: Array<'writing' | 'review' | 'polish' | 'all'>;
28
- }
29
- /** 内置审稿维度(结构化评分用) */
30
- export declare const REVIEW_DIMENSIONS: readonly [{
31
- readonly id: "character";
32
- readonly name: "人设一致性";
33
- readonly weight: 0.2;
34
- }, {
35
- readonly id: "setting";
36
- readonly name: "设定一致性";
37
- readonly weight: 0.15;
38
- }, {
39
- readonly id: "redline";
40
- readonly name: "红线检查";
41
- readonly weight: 0.15;
42
- }, {
43
- readonly id: "writing";
44
- readonly name: "文笔质量";
45
- readonly weight: 0.15;
46
- }, {
47
- readonly id: "pacing";
48
- readonly name: "节奏与爽点";
49
- readonly weight: 0.1;
50
- }, {
51
- readonly id: "logic";
52
- readonly name: "逻辑漏洞";
53
- readonly weight: 0.1;
54
- }, {
55
- readonly id: "anti-ai";
56
- readonly name: "反 AI 规则";
57
- readonly weight: 0.05;
58
- }, {
59
- readonly id: "presentation";
60
- readonly name: "呈现方式";
61
- readonly weight: 0.05;
62
- }, {
63
- readonly id: "compliance";
64
- readonly name: "内容合规";
65
- readonly weight: 0.05;
66
- }];
67
- export type ReviewDimensionId = typeof REVIEW_DIMENSIONS[number]['id'];
68
- /** 维度结构化评分 */
69
- export interface DimensionScore {
70
- dimension: ReviewDimensionId;
71
- score: number;
72
- note: string;
73
- }
74
- /**
75
- * 渲染审稿规则(compact 或 full 模式)
76
- *
77
- * compact: 只渲染禁止类 + high 严重度(用于生成时的约束)
78
- * full: 渲染全部启用规则(用于审稿时的检查清单)
79
- */
80
- export declare function renderReviewRules(assets: WritingRule[] | undefined, mode?: 'compact' | 'full'): string;
81
- /**
82
- * 从审稿 issues 中按维度统计
83
- * 用于结构化评分和 UI 展示。
84
- */
85
- export declare function groupIssuesByDimension(issues: Array<{
86
- severity: string;
87
- item: string;
88
- dimension?: string;
89
- }>): Record<string, Array<{
90
- severity: string;
91
- item: string;
92
- }>>;
93
- /**
94
- * 计算维度加权总分
95
- * 用于审稿报告的结构化评分。
96
- */
97
- export declare function calculateWeightedScore(dimensions: DimensionScore[]): number;
@@ -1,46 +0,0 @@
1
- /**
2
- * 镜头语言词库(分镜规范化基准)。
3
- * 分镜表的 shot/camera/composition/light 字段统一从这里取值(英文 id),
4
- * 生成提示词时用 zh 中文词块;适配英文平台时用 en。
5
- * 目的:让"景别/运镜/构图/光效"有标准词表,避免 LLM 自由发挥导致漂移。
6
- */
7
- /** 景别。 */
8
- export type ShotSizeId = 'extreme_wide' | 'wide' | 'full' | 'medium' | 'medium_close' | 'close' | 'extreme_close' | 'big_extreme_close';
9
- /** 运镜/机位。 */
10
- export type CameraMoveId = 'static' | 'dolly_in' | 'dolly_out' | 'pan_left' | 'pan_right' | 'track_left' | 'track_right' | 'follow' | 'pedestal_up' | 'pedestal_down' | 'orbit' | 'handheld' | 'low_angle' | 'high_angle' | 'over_shoulder';
11
- /** 构图。 */
12
- export type CompositionId = 'rule_of_thirds' | 'center' | 'leading_line' | 'foreground' | 'low' | 'overhead' | 'symmetry';
13
- /** 光效。 */
14
- export type LightingId = 'front' | 'side' | 'back' | 'top' | 'rembrandt' | 'neon' | 'hard' | 'soft' | 'mood' | 'contrast';
15
- export interface ShotLangEntry<T extends string> {
16
- id: T;
17
- /** 中文(提示词/展示用)。 */
18
- zh: string;
19
- /** 英文(英文平台适配用)。 */
20
- en: string;
21
- /** 一句话说明(下拉/卡片)。 */
22
- hint: string;
23
- }
24
- export declare const SHOT_SIZES: readonly ShotLangEntry<ShotSizeId>[];
25
- export declare const CAMERA_MOVES: readonly ShotLangEntry<CameraMoveId>[];
26
- export declare const COMPOSITIONS: readonly ShotLangEntry<CompositionId>[];
27
- export declare const LIGHTINGS: readonly ShotLangEntry<LightingId>[];
28
- export interface ShotLanguage {
29
- shot?: ShotSizeId;
30
- camera: CameraMoveId[];
31
- composition?: CompositionId;
32
- light: LightingId[];
33
- }
34
- /** 从中文文本归一化到景别(处理旧数据/LLM 口语)。未知回退 medium。 */
35
- export declare function normalizeShotSize(text: string | undefined): ShotSizeId;
36
- /** 从中文文本归一化到运镜列表。 */
37
- export declare function normalizeCameras(text: string | undefined): CameraMoveId[];
38
- /** 从中文文本归一化到构图(可选)。 */
39
- export declare function normalizeComposition(text: string | undefined): CompositionId | undefined;
40
- /** 从中文文本归一化到光效列表。 */
41
- export declare function normalizeLightings(text: string | undefined): LightingId[];
42
- /** 取词条中文(ZHs 合并句子)。 */
43
- export declare function sizeZh(id: ShotSizeId | undefined): string;
44
- export declare function cameraZh(ids: CameraMoveId[] | undefined): string;
45
- export declare function compoZh(id: CompositionId | undefined): string;
46
- export declare function lightZh(ids: LightingId[] | undefined): string;
@@ -1,36 +0,0 @@
1
- /**
2
- * 本地 AI 味扫描器(不调 LLM,确定性检测)
3
- *
4
- * 用途:生成/润色后自动扫描,结果作为「事实锚点」注入审稿提示词,
5
- * 让 LLM 做判断而非机械统计。也可用于 UI 展示 AI 味指标。
6
- */
7
- export interface AiScanResult {
8
- /** 总评分 0-100,越高越像 AI 写的 */
9
- aiScore: number;
10
- /** 命中的套话及次数 */
11
- clicheHits: Array<{
12
- word: string;
13
- count: number;
14
- }>;
15
- /** 段落长度方差(过高=段落过于整齐) */
16
- paragraphLengthVariance: number;
17
- /** 连续解释性叙事段数(≥3 视为问题) */
18
- consecutiveExpositoryParagraphs: number;
19
- /** 句式重复率(相同开头句式占比) */
20
- sentenceRepetitionRate: number;
21
- /** 过长段落数(>300字) */
22
- longParagraphCount: number;
23
- /** 过短段落数(<20字) */
24
- shortParagraphCount: number;
25
- /** 对话占比(0-1) */
26
- dialogueRatio: number;
27
- /** 问题摘要,可直接注入审稿提示词 */
28
- summary: string;
29
- }
30
- export declare function scanAiFlavor(text: string): AiScanResult;
31
- /** 扫描前后对比(润色时用) */
32
- export declare function compareAiScan(before: AiScanResult, after: AiScanResult): {
33
- improved: boolean;
34
- deltaScore: number;
35
- details: string[];
36
- };
@@ -1,37 +0,0 @@
1
- /**
2
- * Writing assets — 题材基底库 / 推进模式库 / 反 AI 规则 / 写法引擎.
3
- *
4
- * Ported from AI-Novel-Writing-Assistant (Apache-2.0) built-in seed data:
5
- * - 8 preset style templates (DEFAULT_STYLE_TEMPLATES)
6
- * - 12 anti-AI rules with concrete detect patterns (DEFAULT_ANTI_AI_RULES)
7
- * - genre tree + progression mode seeds
8
- * Assets persist with the project (novel-project.json) and are injected into
9
- * generation / planning / review prompts, and available to the AI assistant.
10
- */
11
- import type { AntiAiRule, GenreNode, PlotBeatTemplate, ProgressionMode, ProjectAssets, StyleAsset, StyleTemplate } from './protocol.ts';
12
- /** 预置写法模板(来自 AI-Novel-Writing-Assistant 内置 DEFAULT_STYLE_TEMPLATES)。 */
13
- export declare const BUILTIN_STYLE_TEMPLATES: StyleTemplate[];
14
- /** 内置全局反 AI 规则(来自 AI-Novel-Writing-Assistant 内置 DEFAULT_ANTI_AI_RULES)。 */
15
- export declare const BUILTIN_ANTI_AI_RULES: AntiAiRule[];
16
- /** 内置题材基底库(常用网文题材树,跨书复用)。 */
17
- export declare const BUILTIN_GENRE_LIBRARY: GenreNode[];
18
- /** 内置常用推进模式。 */
19
- export declare const BUILTIN_PROGRESSION_MODES: ProgressionMode[];
20
- /** 剧情桥段库:可复用情节套路(作者阅读经验沉淀,非某本书的剧情线)。 */
21
- export declare const BUILTIN_PLOT_BEATS: PlotBeatTemplate[];
22
- /** 默认(空)项目写作资产。 */
23
- export declare function emptyProjectAssets(): ProjectAssets;
24
- /** 合并项目资产与内置库:返回「生效的反 AI 规则」(内置全局 + 项目自定义)。 */
25
- export declare function effectiveAntiAiRules(assets: ProjectAssets | undefined): AntiAiRule[];
26
- /** 把生效规则渲染成提示词块(禁止/鼓励分列,压缩省 token)。 */
27
- export declare function renderAntiAiRules(assets: ProjectAssets | undefined): string;
28
- /** 渲染题材与推进模式提示词块。 */
29
- export declare function renderGenreAndProgression(assets: ProjectAssets | undefined): string;
30
- /** 渲染写法资产提示词块(规则去重,省 token)。 */
31
- export declare function renderStyleAssets(assets: ProjectAssets | undefined): string;
32
- /** 渲染全部写作资产提示词(供生成/规划/审稿注入)。 */
33
- export declare function renderAllAssets(assets: ProjectAssets | undefined): string;
34
- /** 预置写法模板 → 可直接绑定的 StyleAsset。 */
35
- export declare function styleTemplateToAsset(template: StyleTemplate): StyleAsset;
36
- /** 写法引擎:从样本文本提取风格资产的系统提示词。 */
37
- export declare function styleEngineSystemPrompt(): string;