@waterwx/dsh-novel-forge 2.1.4 → 2.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.
- package/README.md +8 -6
- package/lib/client.js +4939 -2919
- package/lib/index.js +466 -128
- package/lib/types/assistant.d.ts +1 -1
- package/lib/types/client/api.d.ts +3 -1
- package/lib/types/client/llmLive.d.ts +7 -2
- package/lib/types/client/locales.d.ts +1 -0
- package/lib/types/client/panel/AuthorInbox.d.ts +23 -0
- package/lib/types/client/panel/CabinetSnapshot.d.ts +16 -0
- package/lib/types/client/panel/CardHead.d.ts +42 -0
- package/lib/types/client/panel/ChapterPlanPanel.d.ts +24 -0
- package/lib/types/client/panel/ConfirmDialog.d.ts +38 -0
- package/lib/types/client/panel/HomeHero.d.ts +60 -0
- package/lib/types/client/panel/NoticeBar.d.ts +26 -0
- package/lib/types/client/panel/ReviewIssueCard.d.ts +24 -0
- package/lib/types/client/panel/RunPanel.d.ts +3 -1
- package/lib/types/client/panel/Skeleton.d.ts +6 -0
- package/lib/types/client/panel/Sparkline.d.ts +34 -0
- package/lib/types/client/panel/helpers.d.ts +12 -0
- package/lib/types/engine.d.ts +28 -6
- package/lib/types/llm-live.d.ts +2 -2
- package/lib/types/llm-retry.d.ts +11 -0
- package/lib/types/protocol.d.ts +49 -2
- package/lib/types/routes.d.ts +6 -0
- package/lib/types/run-selection.d.ts +5 -2
- package/lib/types/stream-fallback.d.ts +8 -0
- package/package.json +5 -1
|
@@ -41,11 +41,14 @@ export interface PickNextResult {
|
|
|
41
41
|
/**
|
|
42
42
|
* 选出生产单下一章要处理的章。
|
|
43
43
|
*
|
|
44
|
-
*
|
|
44
|
+
* 四种章:已 `approved` 快进;已列入 `pendingManual` 的快进(人工已接管);
|
|
45
|
+
* 连败达上限的熔断跳过;其余为下一章。
|
|
45
46
|
*
|
|
46
47
|
* @param chapters - 全书章节计划。
|
|
47
48
|
* @param currentNo - 当前章号(含)。
|
|
48
49
|
* @param endNo - 区间终点(含)。
|
|
49
50
|
* @param failedAttempts - 章号 → 已失败次数(来自 `RunState.failedAttempts`)。
|
|
51
|
+
* @param pendingManual - 已列入待人工的章号(来自 `RunState.pendingManual`)。
|
|
52
|
+
* 必须传入,否则重写 N 轮仍不过的章会被反复选中,每轮烧两次 rewrite + 两次 verify。
|
|
50
53
|
*/
|
|
51
|
-
export declare function pickNextChapter(chapters: ChapterPlan[], currentNo: number, endNo: number, failedAttempts: Record<string, number
|
|
54
|
+
export declare function pickNextChapter(chapters: ChapterPlan[], currentNo: number, endNo: number, failedAttempts: Record<string, number>, pendingManual?: readonly number[]): PickNextResult;
|
|
@@ -46,6 +46,14 @@ export interface StreamWithFallbackOptions {
|
|
|
46
46
|
maxTokensError: string;
|
|
47
47
|
/** 产出文本的最小长度;不足则视为失败。 */
|
|
48
48
|
minChars: number;
|
|
49
|
+
/**
|
|
50
|
+
* 取消信号。客户端断开时应abort —— 宿主 SDK 约定「implementations must honor
|
|
51
|
+
* `options.signal`」,不发信号等于让 LLM 调用在后台跑完整章(maxTokens 常20000),
|
|
52
|
+
* 用户关掉页面也停不下来。
|
|
53
|
+
*
|
|
54
|
+
* 中止时本函数抛出 `AbortError`,由调用方决定是静默收尾还是回错误帧。
|
|
55
|
+
*/
|
|
56
|
+
signal?: AbortSignal;
|
|
49
57
|
}
|
|
50
58
|
/**
|
|
51
59
|
* 执行流式生成,主模型失败且「一个字都没产出」时换备用模型重试一次。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waterwx/dsh-novel-forge",
|
|
3
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.
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "waterwx",
|
|
7
7
|
"repository": {
|
|
@@ -111,8 +111,12 @@
|
|
|
111
111
|
"watch": "tsdown --watch",
|
|
112
112
|
"typecheck": "tsc --noEmit",
|
|
113
113
|
"check:styles": "node scripts/check-theme-sizes.mjs",
|
|
114
|
+
"check:vars": "node scripts/check-css-vars.mjs",
|
|
115
|
+
"check:dead-classes": "node scripts/check-dead-classes.mjs",
|
|
116
|
+
"check:fallback": "node scripts/check-fallback-tiers.mjs",
|
|
114
117
|
"check:third-party": "node scripts/check-third-party.mjs",
|
|
115
118
|
"check:contrast": "node scripts/audit-contrast.mjs",
|
|
119
|
+
"check:classes": "node scripts/check-css-classes.mjs",
|
|
116
120
|
"check:third-party:list": "node scripts/check-third-party.mjs --list",
|
|
117
121
|
"release": "node scripts/release.mjs",
|
|
118
122
|
"release:dry": "node scripts/release.mjs --dry-run",
|