@waterwx/dsh-novel-forge 2.0.1-alpha → 2.1.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 (183) hide show
  1. package/README.md +368 -362
  2. package/lib/client.js +20340 -19622
  3. package/lib/index.js +11313 -7285
  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 +20 -9
  7. package/lib/types/assistant.d.ts +29 -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 +136 -27
  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 +31 -0
  14. package/lib/types/client/locales.d.ts +15 -70
  15. package/lib/types/client/mount.d.ts +0 -2
  16. package/lib/types/client/panel/AiTag.d.ts +1 -0
  17. package/lib/types/client/panel/AssistantTab.d.ts +4 -1
  18. package/lib/types/client/panel/AuthorHome.d.ts +13 -11
  19. package/lib/types/client/panel/BookAnalysisView.d.ts +4 -0
  20. package/lib/types/client/panel/CmdPalette.d.ts +12 -0
  21. package/lib/types/client/panel/CreateBookView.d.ts +5 -1
  22. package/lib/types/client/panel/DirectorView.d.ts +7 -0
  23. package/lib/types/client/panel/IdeaInspirationView.d.ts +6 -0
  24. package/lib/types/client/panel/KnowledgeBaseView.d.ts +4 -0
  25. package/lib/types/client/panel/LiveFeedLog.d.ts +13 -0
  26. package/lib/types/client/panel/MarketRadarView.d.ts +5 -0
  27. package/lib/types/client/panel/ModelManager.d.ts +2 -2
  28. package/lib/types/client/panel/NovelPanel.d.ts +6 -1
  29. package/lib/types/client/panel/PageHeader.d.ts +18 -0
  30. package/lib/types/client/panel/PromptSlotsView.d.ts +11 -0
  31. package/lib/types/client/panel/SettingsView.d.ts +12 -9
  32. package/lib/types/client/panel/ShelfView.d.ts +10 -1
  33. package/lib/types/client/panel/SubPage.d.ts +27 -0
  34. package/lib/types/client/panel/TensionView.d.ts +18 -0
  35. package/lib/types/client/panel/TimelineView.d.ts +18 -0
  36. package/lib/types/client/panel/helpers.d.ts +5 -3
  37. package/lib/types/client/panel/market-radar-state.d.ts +56 -0
  38. package/lib/types/client/panel/outline-markdown.d.ts +112 -0
  39. package/lib/types/client/panel/status-badge.d.ts +13 -0
  40. package/lib/types/client/panel/storage-parse.d.ts +46 -0
  41. package/lib/types/client/panel/toast.d.ts +2 -0
  42. package/lib/types/client/panel/usePersistentState.d.ts +17 -0
  43. package/lib/types/client/panel/views.d.ts +21 -35
  44. package/lib/types/client/run-status.d.ts +21 -0
  45. package/lib/types/client/sidebar-entry.d.ts +0 -2
  46. package/lib/types/digest-parse.d.ts +29 -0
  47. package/lib/types/docx-core.d.ts +16 -0
  48. package/lib/types/docx.d.ts +2 -3
  49. package/lib/types/engine.d.ts +150 -103
  50. package/lib/types/global-assets.d.ts +6 -0
  51. package/lib/types/home.d.ts +11 -0
  52. package/lib/types/index.d.ts +26 -12
  53. package/lib/types/llm-live.d.ts +70 -0
  54. package/lib/types/llm-retry.d.ts +38 -0
  55. package/lib/types/market-radar-scan.d.ts +18 -0
  56. package/lib/types/market-radar-sources.d.ts +31 -0
  57. package/lib/types/migrate-output.d.ts +25 -0
  58. package/lib/types/model-capability.d.ts +119 -0
  59. package/lib/types/model-request.d.ts +36 -0
  60. package/lib/types/output-budget.d.ts +86 -0
  61. package/lib/types/plotline-align.d.ts +35 -0
  62. package/lib/types/prompt-slots.d.ts +57 -0
  63. package/lib/types/prompting.d.ts +10 -0
  64. package/lib/types/protocol.d.ts +841 -601
  65. package/lib/types/revision.d.ts +76 -0
  66. package/lib/types/routes.d.ts +9 -3
  67. package/lib/types/run-selection.d.ts +51 -0
  68. package/lib/types/run.d.ts +32 -1
  69. package/lib/types/settings-persist.d.ts +59 -0
  70. package/lib/types/snapshots.d.ts +46 -0
  71. package/lib/types/stage-contract.d.ts +58 -0
  72. package/lib/types/stream-fallback.d.ts +60 -0
  73. package/lib/types/strip-headings.d.ts +33 -0
  74. package/lib/types/tension.d.ts +53 -0
  75. package/lib/types/timeline.d.ts +37 -0
  76. package/package.json +50 -27
  77. package/assets/styles/arcane-thick-3d.webp +0 -0
  78. package/assets/styles/chinese-ink.webp +0 -0
  79. package/assets/styles/clay-stopmotion-3d.webp +0 -0
  80. package/assets/styles/dark-ghibli.webp +0 -0
  81. package/assets/styles/dark-gothic-3d.webp +0 -0
  82. package/assets/styles/film-photo.webp +0 -0
  83. package/assets/styles/guofeng-heavy.webp +0 -0
  84. package/assets/styles/guoman-2d-gufeng.webp +0 -0
  85. package/assets/styles/guoman-3d-tianyuan.webp +0 -0
  86. package/assets/styles/guoman-3d-xuanhuan.webp +0 -0
  87. package/assets/styles/horror-game-3d.webp +0 -0
  88. package/assets/styles/hyperreal-3d.webp +0 -0
  89. package/assets/styles/japan-cel-dark.webp +0 -0
  90. package/assets/styles/korean-webtoon.webp +0 -0
  91. package/assets/styles/low-cyberpunk-3d.webp +0 -0
  92. package/assets/styles/nextgen-cg.webp +0 -0
  93. package/assets/styles/noir-film.webp +0 -0
  94. package/assets/styles/openworld-survival.webp +0 -0
  95. package/assets/styles/paper-cut-3d.webp +0 -0
  96. package/assets/styles/pixar-adult-3d.webp +0 -0
  97. package/assets/styles/pop-marvel-2d.webp +0 -0
  98. package/assets/styles/sandiao-qban.webp +0 -0
  99. package/assets/styles/shinkai-anime.webp +0 -0
  100. package/assets/styles/tactical-stealth.webp +0 -0
  101. package/assets/styles/urban-lightreal-3d.webp +0 -0
  102. package/assets/styles/vaporwave-3d.webp +0 -0
  103. package/assets/styles/vhs90.webp +0 -0
  104. package/lib/types/client/panel/BookshelfBar.d.ts +0 -11
  105. package/lib/types/client/panel/FlowGuide.d.ts +0 -22
  106. package/lib/types/client/panel/MangaRoleLibrary.d.ts +0 -20
  107. package/lib/types/client/panel/MangaWorkspace.d.ts +0 -12
  108. package/lib/types/client/panel/ModelPicker.d.ts +0 -11
  109. package/lib/types/client/panel/ProgressHomeView.d.ts +0 -5
  110. package/lib/types/client/panel/PropLibrary.d.ts +0 -8
  111. package/lib/types/client/panel/SceneLibrary.d.ts +0 -16
  112. package/lib/types/client/panel/StoryboardTab.d.ts +0 -19
  113. package/lib/types/client/panel/StyleCard.d.ts +0 -8
  114. package/lib/types/client/panel/StyleGallery.d.ts +0 -1
  115. package/lib/types/comic-presets.d.ts +0 -12
  116. package/lib/types/manga-genre-rules.d.ts +0 -22
  117. package/lib/types/prompt-utils.d.ts +0 -35
  118. package/lib/types/review-policy.d.ts +0 -97
  119. package/lib/types/shot-language.d.ts +0 -46
  120. package/lib/types/story-beat-language.d.ts +0 -35
  121. package/lib/types/style-library.d.ts +0 -33
  122. package/skills/chapter-batch/SKILL.md +0 -81
  123. package/src/ai-scan.ts +0 -179
  124. package/src/assets.ts +0 -879
  125. package/src/assistant.ts +0 -770
  126. package/src/author-assets.ts +0 -147
  127. package/src/bookshelf.ts +0 -167
  128. package/src/client/api.ts +0 -617
  129. package/src/client/css-modules.d.ts +0 -8
  130. package/src/client/docx.ts +0 -69
  131. package/src/client/index.ts +0 -34
  132. package/src/client/locales.ts +0 -418
  133. package/src/client/mount.tsx +0 -97
  134. package/src/client/mount.tsx._new +0 -97
  135. package/src/client/mount.tsx._nf +0 -97
  136. package/src/client/mount.tsx._tmp +0 -97
  137. package/src/client/panel/AdaptModeView.tsx +0 -520
  138. package/src/client/panel/AssetsTab.tsx +0 -458
  139. package/src/client/panel/AssistantTab.tsx +0 -301
  140. package/src/client/panel/AuthorAssetsView.tsx +0 -208
  141. package/src/client/panel/AuthorHome.tsx +0 -204
  142. package/src/client/panel/BookshelfBar.tsx +0 -170
  143. package/src/client/panel/CreateBookView.tsx +0 -352
  144. package/src/client/panel/FlowGuide.tsx +0 -84
  145. package/src/client/panel/GlobalAssetLibraryView.tsx +0 -172
  146. package/src/client/panel/ImportModal.tsx +0 -303
  147. package/src/client/panel/MangaRoleLibrary.tsx +0 -1002
  148. package/src/client/panel/MangaWorkspace.tsx +0 -715
  149. package/src/client/panel/ModelManager.tsx +0 -205
  150. package/src/client/panel/NovelPanel.tsx +0 -4620
  151. package/src/client/panel/ProgressConsole.tsx +0 -64
  152. package/src/client/panel/ProgressHomeView.tsx +0 -87
  153. package/src/client/panel/PropLibrary.tsx +0 -175
  154. package/src/client/panel/ReaderView.tsx +0 -306
  155. package/src/client/panel/ReasoningSection.tsx +0 -31
  156. package/src/client/panel/RunPanel.tsx +0 -204
  157. package/src/client/panel/SceneLibrary.tsx +0 -453
  158. package/src/client/panel/SettingsView.tsx +0 -286
  159. package/src/client/panel/ShelfView.tsx +0 -242
  160. package/src/client/panel/StoryboardTab.tsx +0 -472
  161. package/src/client/panel/StyleCard.tsx +0 -90
  162. package/src/client/panel/StyleGallery.tsx +0 -58
  163. package/src/client/panel/WorldTab.tsx +0 -202
  164. package/src/client/panel/controller.ts +0 -45
  165. package/src/client/panel/helpers.ts +0 -67
  166. package/src/client/panel/panel.module.css +0 -4360
  167. package/src/client/panel/views.tsx +0 -314
  168. package/src/client/sidebar-entry.ts +0 -122
  169. package/src/client/text.ts +0 -28
  170. package/src/comic-presets.ts +0 -67
  171. package/src/docx.ts +0 -83
  172. package/src/engine.ts +0 -5200
  173. package/src/index.ts +0 -329
  174. package/src/manga-genre-rules.ts +0 -87
  175. package/src/novel-context.ts +0 -287
  176. package/src/prompt-utils.ts +0 -73
  177. package/src/protocol.ts +0 -2233
  178. package/src/review-policy.ts +0 -161
  179. package/src/routes.ts +0 -3419
  180. package/src/run.ts +0 -331
  181. package/src/shot-language.ts +0 -181
  182. package/src/story-beat-language.ts +0 -130
  183. package/src/style-library.ts +0 -84
package/package.json CHANGED
@@ -1,8 +1,32 @@
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.0.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.0",
5
5
  "type": "module",
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
+ },
15
+ "keywords": [
16
+ "dsh",
17
+ "dsh-plugin",
18
+ "deepseek-harness",
19
+ "小说工坊",
20
+ "novel-forge",
21
+ "novel-writing-workbench",
22
+ "novel-writing",
23
+ "写作助手",
24
+ "小说创作",
25
+ "网文写作",
26
+ "章节生成",
27
+ "AI审稿",
28
+ "story-writing"
29
+ ],
6
30
  "engines": {
7
31
  "node": "^22.19.0 || >=24.0.0"
8
32
  },
@@ -17,7 +41,6 @@
17
41
  "types": "./lib/types/client/index.d.ts",
18
42
  "default": "./lib/client.js"
19
43
  },
20
- "./src/*": "./src/*",
21
44
  "./package.json": "./package.json"
22
45
  },
23
46
  "dsh": {
@@ -38,31 +61,31 @@
38
61
  "schemastery": "^3.18.0"
39
62
  },
40
63
  "peerDependencies": {
41
- "@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.3",
42
- "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.3",
43
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.3",
44
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.3",
45
- "@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.3",
46
- "@deepseek-ai/dsh-llm": "^0.1.2-alpha.3",
47
- "@deepseek-ai/dsh-settings": "^0.1.2-alpha.3",
48
- "@deepseek-ai/dsh-skill": "^0.1.2-alpha.3",
49
- "@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.3",
50
- "@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",
51
74
  "react": "^18.2.0",
52
75
  "react-dom": "^18.2.0"
53
76
  },
54
77
  "devDependencies": {
55
78
  "@deepseek-ai/cordis": "^4.0.1",
56
- "@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.3",
57
- "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.3",
58
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.3",
59
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.3",
60
- "@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.3",
61
- "@deepseek-ai/dsh-llm": "^0.1.2-alpha.3",
62
- "@deepseek-ai/dsh-settings": "^0.1.2-alpha.3",
63
- "@deepseek-ai/dsh-skill": "^0.1.2-alpha.3",
64
- "@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.3",
65
- "@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",
66
89
  "@types/node": "^22.20.0",
67
90
  "@types/react": "~18.3.1",
68
91
  "@types/react-dom": "^18.3.5",
@@ -76,9 +99,6 @@
76
99
  "files": [
77
100
  "lib/**/*.js",
78
101
  "lib/**/*.d.ts",
79
- "src",
80
- "assets/styles",
81
- "skills",
82
102
  "scripts/patch-schemastery.mjs",
83
103
  "cordis.patch.yml",
84
104
  "README.md"
@@ -86,11 +106,14 @@
86
106
  "license": "Apache-2.0",
87
107
  "scripts": {
88
108
  "postinstall": "node scripts/patch-schemastery.mjs",
89
- "build": "tsc -p tsconfig.build.json && tsdown",
109
+ "build": "node scripts/clean-types.mjs && tsc -p tsconfig.build.json && tsdown",
90
110
  "bundle": "tsdown",
91
111
  "watch": "tsdown --watch",
92
112
  "typecheck": "tsc --noEmit",
93
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",
94
117
  "release": "node scripts/release.mjs",
95
118
  "release:dry": "node scripts/release.mjs --dry-run",
96
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): import("react").JSX.Element;
@@ -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
- }): import("react").JSX.Element;
@@ -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
- }): import("react").JSX.Element;
@@ -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
- }): import("react").JSX.Element;
@@ -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
- }): import("react").JSX.Element;
@@ -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
- }): import("react").JSX.Element;
@@ -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
- }): import("react").JSX.Element;
@@ -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
- }): import("react").JSX.Element;
@@ -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
- }): import("react").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function StyleGallery(): import("react").JSX.Element;
@@ -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,35 +0,0 @@
1
- /**
2
- * 编剧词库(剧情骨架规范化基准)。
3
- * 骨架的 function(叙事功能)与 emotion(情绪走向)统一从这里取值(英文 id),
4
- * 生成提示词/展示时用 zh 中文。
5
- * 目的:让"叙事功能/情绪"有标准词表,避免 LLM 自由发挥导致情绪链漂移。
6
- */
7
- /** 叙事功能(对应节拍在剧情中的作用)。 */
8
- export type StoryFunctionId = 'exposition' | 'conflict' | 'turn' | 'climax' | 'resolve' | 'foreshadow' | 'character';
9
- /** 情绪词(低→高能量的情绪阶,角色在节拍中的主要情绪点)。 */
10
- export type EmotionId = 'calm' | 'indifferent' | 'expectant' | 'curious' | 'alert' | 'suppressed' | 'enduring' | 'worried' | 'irritable' | 'uneasy' | 'terrified' | 'angry' | 'collapsing' | 'resolute' | 'grieved' | 'relieved' | 'bittersweet' | 'triumphant' | 'reborn' | 'numb';
11
- export interface BeatLangEntry<T extends string> {
12
- id: T;
13
- /** 中文(展示用)。 */
14
- zh: string;
15
- /** 英文(英文平台适配用)。 */
16
- en: string;
17
- /** 一句话说明。 */
18
- hint: string;
19
- }
20
- /** 叙事功能词表。 */
21
- export declare const STORY_FUNCTIONS: readonly BeatLangEntry<StoryFunctionId>[];
22
- /** 情绪词表(按能量/阶段排序)。 */
23
- export declare const EMOTIONS: readonly BeatLangEntry<EmotionId>[];
24
- export interface StoryBeatLanguage {
25
- function: StoryFunctionId;
26
- emotion: EmotionId[];
27
- }
28
- /** 从中文归一化叙事功能(未知回退 exposition)。 */
29
- export declare function normalizeStoryFunction(text: string | undefined): StoryFunctionId;
30
- /** 从中文文本归一化情绪词列表(可含→箭头链)。 */
31
- export declare function normalizeEmotions(text: string | undefined): EmotionId[];
32
- /** 叙事功能中文。 */
33
- export declare function functionZh(id: StoryFunctionId | undefined): string;
34
- /** 情绪中文(箭头连接)。 */
35
- export declare function emotionZh(ids: EmotionId[] | undefined): string;
@@ -1,33 +0,0 @@
1
- /**
2
- * 风格库(内置模板):漫剧方案的视觉基底 + 可叠加滤镜。
3
- * 关键词针对即梦 Seedream 优化:画风定义 + 质感描述 + 光影色彩 + 即梦质量词(8K/五官清晰/真实材质)。
4
- */
5
- export type StyleCategory = '3d' | 'game' | '2d' | 'craft' | 'film';
6
- export interface ArtStyle {
7
- id: string;
8
- /** 风格名(用户可见)。 */
9
- name: string;
10
- category: StyleCategory;
11
- /** 特点一句话(卡片展示)。 */
12
- traits: string;
13
- /** 风格关键词/前缀(生成角色图/视频提示词时套用)。 */
14
- keywords: string;
15
- /** 是否可作为滤镜叠加在基底风格之上(影视实验类;缺省 false)。 */
16
- stackable?: boolean;
17
- /** 默认推荐排序权重(0-1,推荐池排序参考)。 */
18
- weight?: number;
19
- }
20
- export declare const STYLE_CATEGORIES: ReadonlyArray<{
21
- id: StyleCategory;
22
- label: string;
23
- icon: string;
24
- desc: string;
25
- }>;
26
- /** 内置风格模板(基底 21 个 + 滤镜 3 个)。 */
27
- export declare const STYLE_LIBRARY: ArtStyle[];
28
- /** 按分类取风格。 */
29
- export declare function stylesByCategory(category: StyleCategory): ArtStyle[];
30
- /** 取单个风格(未找到返回 undefined)。 */
31
- export declare function findStyle(id: string): ArtStyle | undefined;
32
- /** 按基底 + 滤镜拼接风格关键词(角色图/分镜/视频提示词共用;缺省回退 3D 动漫)。 */
33
- export declare function styleKeywords(styleId?: string, filterId?: string): string;