@waterwx/dsh-novel-forge 2.0.1-alpha → 2.1.0-alpha
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 +97 -2
- package/lib/client.js +3291 -752
- package/lib/index.js +3557 -237
- package/lib/types/assets.d.ts +16 -3
- package/lib/types/assistant.d.ts +4 -0
- package/lib/types/client/api.d.ts +89 -0
- package/lib/types/client/llmLive.d.ts +33 -0
- package/lib/types/client/locales.d.ts +3 -3
- package/lib/types/client/panel/AdaptModeView.d.ts +1 -1
- package/lib/types/client/panel/AssetsTab.d.ts +1 -1
- package/lib/types/client/panel/AssistantTab.d.ts +1 -1
- package/lib/types/client/panel/AuthorAssetsView.d.ts +1 -1
- package/lib/types/client/panel/AuthorHome.d.ts +4 -2
- package/lib/types/client/panel/BookAnalysisView.d.ts +4 -0
- package/lib/types/client/panel/BookshelfBar.d.ts +1 -1
- package/lib/types/client/panel/CreateBookView.d.ts +6 -2
- package/lib/types/client/panel/DirectorView.d.ts +7 -0
- package/lib/types/client/panel/FlowGuide.d.ts +1 -1
- package/lib/types/client/panel/GlobalAssetLibraryView.d.ts +1 -1
- package/lib/types/client/panel/IdeaInspirationView.d.ts +6 -0
- package/lib/types/client/panel/ImportModal.d.ts +1 -1
- package/lib/types/client/panel/KnowledgeBaseView.d.ts +4 -0
- package/lib/types/client/panel/LiveFeedLog.d.ts +5 -0
- package/lib/types/client/panel/MangaRoleLibrary.d.ts +1 -1
- package/lib/types/client/panel/MangaWorkspace.d.ts +1 -1
- package/lib/types/client/panel/MarketRadarView.d.ts +5 -0
- package/lib/types/client/panel/NovelPanel.d.ts +2 -2
- package/lib/types/client/panel/ProgressConsole.d.ts +1 -1
- package/lib/types/client/panel/ProgressHomeView.d.ts +1 -1
- package/lib/types/client/panel/PropLibrary.d.ts +1 -1
- package/lib/types/client/panel/ReaderView.d.ts +1 -1
- package/lib/types/client/panel/RunPanel.d.ts +1 -1
- package/lib/types/client/panel/SceneLibrary.d.ts +1 -1
- package/lib/types/client/panel/SettingsView.d.ts +1 -1
- package/lib/types/client/panel/ShelfView.d.ts +1 -1
- package/lib/types/client/panel/StoryboardTab.d.ts +1 -1
- package/lib/types/client/panel/StyleCard.d.ts +1 -1
- package/lib/types/client/panel/StyleGallery.d.ts +1 -1
- package/lib/types/client/panel/WorldTab.d.ts +1 -1
- package/lib/types/engine.d.ts +29 -1
- package/lib/types/global-assets.d.ts +6 -0
- package/lib/types/index.d.ts +6 -0
- package/lib/types/llm-live.d.ts +44 -0
- package/lib/types/market-radar-scan.d.ts +19 -0
- package/lib/types/market-radar-sources.d.ts +31 -0
- package/lib/types/prompting.d.ts +35 -0
- package/lib/types/protocol.d.ts +364 -8
- package/lib/types/run.d.ts +1 -1
- package/lib/types/src/ai-scan.d.ts +36 -0
- package/lib/types/src/assets.d.ts +37 -0
- package/lib/types/src/assistant.d.ts +45 -0
- package/lib/types/src/author-assets.d.ts +25 -0
- package/lib/types/src/bookshelf.d.ts +42 -0
- package/lib/types/src/client/api.d.ts +234 -0
- package/lib/types/src/client/docx.d.ts +15 -0
- package/lib/types/src/client/index.d.ts +14 -0
- package/lib/types/src/client/locales.d.ts +212 -0
- package/lib/types/src/client/mount.d.ts +9 -0
- package/lib/types/src/client/panel/AdaptModeView.d.ts +5 -0
- package/lib/types/src/client/panel/AssetsTab.d.ts +12 -0
- package/lib/types/src/client/panel/AssistantTab.d.ts +7 -0
- package/lib/types/src/client/panel/AuthorAssetsView.d.ts +4 -0
- package/lib/types/src/client/panel/AuthorHome.d.ts +32 -0
- package/lib/types/src/client/panel/BookshelfBar.d.ts +11 -0
- package/lib/types/src/client/panel/CreateBookView.d.ts +9 -0
- package/lib/types/src/client/panel/FlowGuide.d.ts +22 -0
- package/lib/types/src/client/panel/GlobalAssetLibraryView.d.ts +4 -0
- package/lib/types/src/client/panel/ImportModal.d.ts +7 -0
- package/lib/types/src/client/panel/MangaRoleLibrary.d.ts +20 -0
- package/lib/types/src/client/panel/MangaWorkspace.d.ts +12 -0
- package/lib/types/src/client/panel/ModelManager.d.ts +14 -0
- package/lib/types/src/client/panel/NovelPanel.d.ts +13 -0
- package/lib/types/src/client/panel/ProgressConsole.d.ts +17 -0
- package/lib/types/src/client/panel/ProgressHomeView.d.ts +5 -0
- package/lib/types/src/client/panel/PropLibrary.d.ts +8 -0
- package/lib/types/src/client/panel/ReaderView.d.ts +8 -0
- package/lib/types/src/client/panel/ReasoningSection.d.ts +10 -0
- package/lib/types/src/client/panel/RunPanel.d.ts +5 -0
- package/lib/types/src/client/panel/SceneLibrary.d.ts +16 -0
- package/lib/types/src/client/panel/SettingsView.d.ts +16 -0
- package/lib/types/src/client/panel/ShelfView.d.ts +15 -0
- package/lib/types/src/client/panel/StoryboardTab.d.ts +19 -0
- package/lib/types/src/client/panel/StyleCard.d.ts +8 -0
- package/lib/types/src/client/panel/StyleGallery.d.ts +1 -0
- package/lib/types/src/client/panel/WorldTab.d.ts +10 -0
- package/lib/types/src/client/panel/controller.d.ts +19 -0
- package/lib/types/src/client/panel/helpers.d.ts +18 -0
- package/lib/types/src/client/panel/views.d.ts +77 -0
- package/lib/types/src/client/sidebar-entry.d.ts +13 -0
- package/lib/types/src/client/text.d.ts +9 -0
- package/lib/types/src/comic-presets.d.ts +12 -0
- package/lib/types/src/docx.d.ts +19 -0
- package/lib/types/src/engine.d.ts +402 -0
- package/lib/types/src/index.d.ts +79 -0
- package/lib/types/src/manga-genre-rules.d.ts +22 -0
- package/lib/types/src/novel-context.d.ts +80 -0
- package/lib/types/src/prompt-utils.d.ts +35 -0
- package/lib/types/src/protocol.d.ts +2176 -0
- package/lib/types/src/review-policy.d.ts +97 -0
- package/lib/types/src/routes.d.ts +29 -0
- package/lib/types/src/run.d.ts +32 -0
- package/lib/types/src/shot-language.d.ts +46 -0
- package/lib/types/src/story-beat-language.d.ts +35 -0
- package/lib/types/src/style-library.d.ts +33 -0
- package/package.json +1 -1
- package/src/assets.ts +1774 -879
- package/src/assistant.ts +154 -9
- package/src/client/api.ts +105 -6
- package/src/client/llmLive.ts +101 -0
- package/src/client/locales.ts +4 -4
- package/src/client/panel/AdaptModeView.tsx +18 -3
- package/src/client/panel/AssistantTab.tsx +41 -3
- package/src/client/panel/AuthorHome.tsx +51 -20
- package/src/client/panel/BookAnalysisView.tsx +60 -0
- package/src/client/panel/CreateBookView.tsx +22 -3
- package/src/client/panel/DirectorView.tsx +200 -0
- package/src/client/panel/IdeaInspirationView.tsx +71 -0
- package/src/client/panel/KnowledgeBaseView.tsx +73 -0
- package/src/client/panel/LiveFeedLog.tsx +76 -0
- package/src/client/panel/MarketRadarView.tsx +374 -0
- package/src/client/panel/NovelPanel.tsx +117 -16
- package/src/client/panel/ProgressConsole.tsx +5 -6
- package/src/client/panel/SettingsView.tsx +3 -0
- package/src/client/panel/panel.module.css +2 -3
- package/src/engine.ts +459 -23
- package/src/global-assets.ts +59 -0
- package/src/index.ts +17 -1
- package/src/llm-live.ts +68 -0
- package/src/market-radar-scan.ts +41 -0
- package/src/market-radar-sources.ts +173 -0
- package/src/prompting.ts +159 -0
- package/src/protocol.ts +340 -8
- package/src/routes.ts +579 -59
- package/src/run.ts +15 -8
- package/skills/chapter-batch/SKILL.md +0 -81
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 「热门题材雷达」真实榜单抓取源(移植自 AI-Novel-Writing-Assistant marketRadarSources)。
|
|
3
|
+
* 用全局 fetch 抓取公开榜单移动版页面,正则抽取元数据;无第三方依赖。
|
|
4
|
+
*/
|
|
5
|
+
export type MarketRadarPlatform = 'fanqie' | 'qidian' | 'jinjiang';
|
|
6
|
+
export interface MarketRadarListSource {
|
|
7
|
+
platform: MarketRadarPlatform;
|
|
8
|
+
platformLabel: string;
|
|
9
|
+
listKey: string;
|
|
10
|
+
listLabel: string;
|
|
11
|
+
channel: string;
|
|
12
|
+
sourceUrl: string;
|
|
13
|
+
}
|
|
14
|
+
export interface CollectedRankingItem {
|
|
15
|
+
rank: number;
|
|
16
|
+
title: string;
|
|
17
|
+
author?: string;
|
|
18
|
+
category?: string;
|
|
19
|
+
tags: string[];
|
|
20
|
+
synopsis?: string;
|
|
21
|
+
heatLabel?: string;
|
|
22
|
+
serialStatus?: string;
|
|
23
|
+
sourceUrl: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const MARKET_RADAR_SOURCES: MarketRadarListSource[];
|
|
26
|
+
export declare function hasPrivateUseCharacters(value: string | null | undefined): boolean;
|
|
27
|
+
export declare function parseFanqieRanking(html: string, source: MarketRadarListSource): CollectedRankingItem[];
|
|
28
|
+
export declare function parseFanqieDetail(html: string, item: CollectedRankingItem): CollectedRankingItem;
|
|
29
|
+
export declare function parseQidianRanking(html: string, source: MarketRadarListSource): CollectedRankingItem[];
|
|
30
|
+
export declare function parseJinjiangRanking(html: string, source: MarketRadarListSource): CollectedRankingItem[];
|
|
31
|
+
export declare function collectMarketSource(source: MarketRadarListSource): Promise<CollectedRankingItem[]>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 官方提示模板注册表(对齐上游 officialTemplates.ts 的轻量版)。
|
|
3
|
+
*
|
|
4
|
+
* 目标:把高频提示词从内联字符串升级为「可定位、可版本化、可诊断缺组」的资产,
|
|
5
|
+
* 同时保留 writeSystemPrompt 的现有大段上下文注入(道藏/世界观/大纲/资产/伏笔/剧情线),
|
|
6
|
+
* 只在其基础上补充「官方渲染骨架」的必达/禁止/自查块。
|
|
7
|
+
*/
|
|
8
|
+
export interface OfficialTemplate {
|
|
9
|
+
id: string;
|
|
10
|
+
version: string;
|
|
11
|
+
/** 需要的 slot 变量(跨层注入点)。 */
|
|
12
|
+
slots: string[];
|
|
13
|
+
/** 需要的上下文分组(缺组时可诊断)。 */
|
|
14
|
+
contextGroups: string[];
|
|
15
|
+
/** system 提示模板(可用 {{slot.*}} 占位,运行时替换)。 */
|
|
16
|
+
system: string[];
|
|
17
|
+
/** human 提示模板(可用 {{context.*}} / {{input.*}} 占位)。 */
|
|
18
|
+
human: string[];
|
|
19
|
+
}
|
|
20
|
+
export declare const OFFICIAL_TEMPLATES: Record<string, OfficialTemplate>;
|
|
21
|
+
export declare function getOfficialPromptTemplate(id: string): OfficialTemplate | null;
|
|
22
|
+
export declare function getOfficialPromptTemplateVersion(id: string): string | null;
|
|
23
|
+
/** 轻量稳定哈希(与上游 sha1 对齐精神:内容变化→版本变化)。 */
|
|
24
|
+
export declare function hashPromptTemplate(id: string): string;
|
|
25
|
+
export declare function getRequiredTemplateContextGroups(id: string): string[];
|
|
26
|
+
/** 把官方 writer 骨架渲染成可附加到现有系统提示词末尾的约束/自查块。 */
|
|
27
|
+
export declare function renderOfficialChapterWriterSkeleton(meta: {
|
|
28
|
+
targetChars: number;
|
|
29
|
+
minChars: number;
|
|
30
|
+
maxChars: number;
|
|
31
|
+
pov?: string;
|
|
32
|
+
tonePreference?: string;
|
|
33
|
+
endingHookPreference?: string;
|
|
34
|
+
antiAiRules?: string;
|
|
35
|
+
}): string;
|
package/lib/types/protocol.d.ts
CHANGED
|
@@ -16,6 +16,20 @@ export declare const NOVEL_API: {
|
|
|
16
16
|
readonly bible: "/api/dsh-novel-forge/bible";
|
|
17
17
|
readonly assets: "/api/dsh-novel-forge/assets";
|
|
18
18
|
readonly styleEngine: "/api/dsh-novel-forge/style-engine";
|
|
19
|
+
readonly styleFormula: "/api/dsh-novel-forge/style-formula";
|
|
20
|
+
readonly styleDetect: "/api/dsh-novel-forge/style-detect";
|
|
21
|
+
readonly knowledge: "/api/dsh-novel-forge/knowledge";
|
|
22
|
+
readonly bookAnalysis: "/api/dsh-novel-forge/book-analysis";
|
|
23
|
+
readonly ideaInspiration: "/api/dsh-novel-forge/idea-inspiration";
|
|
24
|
+
readonly ideaInspirationMarket: "/api/dsh-novel-forge/idea-inspiration/market";
|
|
25
|
+
readonly director: "/api/dsh-novel-forge/director";
|
|
26
|
+
readonly directorTodos: "/api/dsh-novel-forge/director/todos";
|
|
27
|
+
readonly llmLive: "/api/dsh-novel-forge/llm-live/stream";
|
|
28
|
+
readonly marketRadar: "/api/dsh-novel-forge/market-radar";
|
|
29
|
+
readonly marketRadarScan: "/api/dsh-novel-forge/market-radar/scan";
|
|
30
|
+
readonly marketRadarApply: "/api/dsh-novel-forge/market-radar/apply";
|
|
31
|
+
readonly marketRadarSync: "/api/dsh-novel-forge/market-radar/foundation-sync";
|
|
32
|
+
readonly marketRadarBrief: "/api/dsh-novel-forge/market-radar/brief";
|
|
19
33
|
readonly generate: "/api/dsh-novel-forge/generate";
|
|
20
34
|
readonly review: "/api/dsh-novel-forge/review";
|
|
21
35
|
readonly rewrite: "/api/dsh-novel-forge/rewrite";
|
|
@@ -561,6 +575,22 @@ export interface ChapterPlan {
|
|
|
561
575
|
beats: string;
|
|
562
576
|
/** Target character count (defaults to the configured chapter size). */
|
|
563
577
|
targetChars: number;
|
|
578
|
+
/** 本章必达项(必须推进的局面/关系/信息/风险/决策变化)。 */
|
|
579
|
+
mustAdvance?: string[];
|
|
580
|
+
/** 本章必须保持/不得破坏的项(如人物状态、已有伏笔不提前揭)。 */
|
|
581
|
+
mustPreserve?: string[];
|
|
582
|
+
/** 本章不可违背的人物硬事实(身份/阵营/境界/当前位置/知情度)。 */
|
|
583
|
+
characterHardFacts?: string[];
|
|
584
|
+
/** 伏笔操作指令(seed/touch/pressure/partial_reveal/payoff/forbid)。 */
|
|
585
|
+
payoffDirectives?: Array<{
|
|
586
|
+
no?: number;
|
|
587
|
+
operation?: 'seed' | 'touch' | 'pressure' | 'partial_reveal' | 'payoff' | 'forbid';
|
|
588
|
+
text?: string;
|
|
589
|
+
}>;
|
|
590
|
+
/** 章末钩子要求(悬念/反转/新线索/未闭合选择)。 */
|
|
591
|
+
endingHook?: string;
|
|
592
|
+
/** 本章义务合约(人类可读摘要,供生成与审稿共同锚定)。 */
|
|
593
|
+
obligation?: string;
|
|
564
594
|
/** Generation/review state. */
|
|
565
595
|
status: ChapterStatus;
|
|
566
596
|
/** 进入 generating 的时间(用于超时自动复位;未在生成时无此字段)。 */
|
|
@@ -599,6 +629,14 @@ export interface AuthorReview {
|
|
|
599
629
|
continuity: string;
|
|
600
630
|
/** 近期节奏趋势提示(拖沓/爽点密度等)。 */
|
|
601
631
|
trend: string;
|
|
632
|
+
/** 本章发生的关键状态变化(人物状态/世界局面/关系/资源),用于回灌整本与事实库。 */
|
|
633
|
+
stateChanges?: string[];
|
|
634
|
+
/** 本章新引入或升级的冲突(供整本控制层与后续卷节奏参考)。 */
|
|
635
|
+
newConflicts?: string[];
|
|
636
|
+
/** 本章埋下/推进的新线索(供知识与伏笔系统回灌)。 */
|
|
637
|
+
clues?: string[];
|
|
638
|
+
/** 本章缺席但值得注意的角色及风险(卷级职责/缺席风险)。 */
|
|
639
|
+
absentRisks?: string[];
|
|
602
640
|
/** 复盘时间。 */
|
|
603
641
|
reviewedAt: string;
|
|
604
642
|
}
|
|
@@ -614,6 +652,18 @@ export interface ReviewIssue {
|
|
|
614
652
|
item: string;
|
|
615
653
|
/** Concrete suggestion for fixing it. */
|
|
616
654
|
suggestion: string;
|
|
655
|
+
/** 命中的反 AI 规则名(结构化,便于统计)。 */
|
|
656
|
+
ruleName?: string;
|
|
657
|
+
/** 规则类别:forbidden / risk / encourage。 */
|
|
658
|
+
ruleType?: 'forbidden' | 'risk' | 'encourage';
|
|
659
|
+
/** 问题细分类(如 套话 句式 段落 心理 设定)。 */
|
|
660
|
+
category?: string;
|
|
661
|
+
/** 命中的原文摘录。 */
|
|
662
|
+
excerpt?: string;
|
|
663
|
+
/** 判定理由。 */
|
|
664
|
+
reason?: string;
|
|
665
|
+
/** 是否可自动改写。 */
|
|
666
|
+
canAutoRewrite?: boolean;
|
|
617
667
|
}
|
|
618
668
|
/** AI review report for one chapter. */
|
|
619
669
|
export interface ReviewReport {
|
|
@@ -625,6 +675,15 @@ export interface ReviewReport {
|
|
|
625
675
|
verdict: string;
|
|
626
676
|
/** Individual findings. */
|
|
627
677
|
issues: ReviewIssue[];
|
|
678
|
+
/** 风险分 0-100(越高越需人工处理;源自 LLM 复核与本地扫描)。 */
|
|
679
|
+
riskScore?: number;
|
|
680
|
+
/** 本地 AI 味指数 0-100(越高越像 AI;LLM 复核锚点,供 UI 展示)。 */
|
|
681
|
+
aiFlavor?: number;
|
|
682
|
+
/** 本地扫描命中的高频套话(按次数降序,取前若干)。 */
|
|
683
|
+
aiPhrases?: Array<{
|
|
684
|
+
word: string;
|
|
685
|
+
count: number;
|
|
686
|
+
}>;
|
|
628
687
|
/** When the review ran. */
|
|
629
688
|
reviewedAt: string;
|
|
630
689
|
}
|
|
@@ -640,6 +699,155 @@ export interface Volume {
|
|
|
640
699
|
chapterStart: number;
|
|
641
700
|
/** Last chapter number (inclusive). */
|
|
642
701
|
chapterEnd: number;
|
|
702
|
+
/** 卷级战略(这一卷的定位/承转,如「立威卷」「冲突升级卷」)。 */
|
|
703
|
+
strategy?: string;
|
|
704
|
+
/** 卷节奏板(这一卷的节奏安排:起-承-转-合/爽点密度/关键节点)。 */
|
|
705
|
+
pacing?: string;
|
|
706
|
+
}
|
|
707
|
+
/** 开书定盘:面向读者的承诺与流派定位(生成/规划均可引用)。 */
|
|
708
|
+
export interface BookContract {
|
|
709
|
+
/** 一句话卖点/题材承诺。 */
|
|
710
|
+
promise?: string;
|
|
711
|
+
/** 主推进模式名(从推进模式库选)。 */
|
|
712
|
+
primaryModeName?: string;
|
|
713
|
+
/** 辅助推进模式名。 */
|
|
714
|
+
secondaryModeNames?: string[];
|
|
715
|
+
/** 整体文风基调(一句话)。 */
|
|
716
|
+
tone?: string;
|
|
717
|
+
/** 目标平台(如「番茄」)。 */
|
|
718
|
+
targetPlatform?: string;
|
|
719
|
+
}
|
|
720
|
+
/** 书内知识库文档(供生成/规划时检索注入的参考资料)。 */
|
|
721
|
+
export interface KnowledgeDoc {
|
|
722
|
+
id: string;
|
|
723
|
+
title: string;
|
|
724
|
+
content: string;
|
|
725
|
+
updatedAt: string;
|
|
726
|
+
}
|
|
727
|
+
/** POST /knowledge request:增删改知识库文档。 */
|
|
728
|
+
export interface KnowledgeRequest {
|
|
729
|
+
action: 'add' | 'remove' | 'replace';
|
|
730
|
+
doc?: {
|
|
731
|
+
id?: string;
|
|
732
|
+
title: string;
|
|
733
|
+
content: string;
|
|
734
|
+
};
|
|
735
|
+
id?: string;
|
|
736
|
+
}
|
|
737
|
+
/** POST /book-analysis request。 */
|
|
738
|
+
export interface BookAnalysisRequest {
|
|
739
|
+
text: string;
|
|
740
|
+
}
|
|
741
|
+
/** 书分析/拆书结果。 */
|
|
742
|
+
export interface BookAnalysisResult {
|
|
743
|
+
sellingPoints: string[];
|
|
744
|
+
structure: string[];
|
|
745
|
+
lessons: string[];
|
|
746
|
+
risks: string[];
|
|
747
|
+
}
|
|
748
|
+
/** POST /idea-inspiration request。 */
|
|
749
|
+
export interface IdeaInspirationRequest {
|
|
750
|
+
idea: string;
|
|
751
|
+
count?: number;
|
|
752
|
+
}
|
|
753
|
+
/** 创意灵感结果:多方向开书灵感。 */
|
|
754
|
+
export interface IdeaInspirationResult {
|
|
755
|
+
ideas: Array<{
|
|
756
|
+
title: string;
|
|
757
|
+
hook: string;
|
|
758
|
+
genre: string;
|
|
759
|
+
pov: string;
|
|
760
|
+
payoff: string;
|
|
761
|
+
}>;
|
|
762
|
+
}
|
|
763
|
+
/** POST /director request。 */
|
|
764
|
+
export interface DirectorRequest {
|
|
765
|
+
focus?: string;
|
|
766
|
+
}
|
|
767
|
+
/** 自动导演编排建议(下一卷/阶段编排 + 修复再平衡)。 */
|
|
768
|
+
export interface DirectorAdvice {
|
|
769
|
+
summary: string;
|
|
770
|
+
nextArc: string[];
|
|
771
|
+
pacing: string;
|
|
772
|
+
risks: string[];
|
|
773
|
+
fixes: string[];
|
|
774
|
+
}
|
|
775
|
+
/** 自动导演「采纳」后生成的书内待办项。 */
|
|
776
|
+
export interface DirectorTodo {
|
|
777
|
+
id: string;
|
|
778
|
+
text: string;
|
|
779
|
+
/** 来源:风险 或 修复。 */
|
|
780
|
+
source: 'risk' | 'fix';
|
|
781
|
+
done: boolean;
|
|
782
|
+
createdAt: string;
|
|
783
|
+
}
|
|
784
|
+
/** 题材雷达:单条市场信号。 */
|
|
785
|
+
export interface MarketRadarSignal {
|
|
786
|
+
id: string;
|
|
787
|
+
kind: 'genre' | 'protagonist' | 'advantage' | 'opening' | 'relationship' | 'title_pattern' | 'opportunity' | 'crowding';
|
|
788
|
+
title: string;
|
|
789
|
+
detail: string;
|
|
790
|
+
/** 趋势:current / rising / stable / falling。 */
|
|
791
|
+
direction?: 'current' | 'rising' | 'stable' | 'falling';
|
|
792
|
+
/** 是否建议优先考虑。 */
|
|
793
|
+
recommended?: boolean;
|
|
794
|
+
}
|
|
795
|
+
/** 题材雷达:生产底座(引用内置题材/推进模式库,或给出新资产)。 */
|
|
796
|
+
export interface ProductionFoundation {
|
|
797
|
+
genre: {
|
|
798
|
+
existingId?: string;
|
|
799
|
+
name: string;
|
|
800
|
+
description: string;
|
|
801
|
+
template?: string;
|
|
802
|
+
};
|
|
803
|
+
primaryStoryMode: {
|
|
804
|
+
existingId?: string;
|
|
805
|
+
name: string;
|
|
806
|
+
driver: string;
|
|
807
|
+
readerExpectation: string;
|
|
808
|
+
};
|
|
809
|
+
secondaryStoryMode?: {
|
|
810
|
+
existingId?: string;
|
|
811
|
+
name: string;
|
|
812
|
+
driver: string;
|
|
813
|
+
readerExpectation: string;
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
/** 题材雷达:开书创意简报(可执行,严禁照搬具体作品/命名)。 */
|
|
817
|
+
export interface MarketCreativeBrief {
|
|
818
|
+
promptBlock: string;
|
|
819
|
+
openingIdea: string;
|
|
820
|
+
coreAdvantage: string;
|
|
821
|
+
bookSellingPoint: string;
|
|
822
|
+
first30ChapterPromise: string;
|
|
823
|
+
}
|
|
824
|
+
/** 题材雷达结果。 */
|
|
825
|
+
export interface MarketRadarResult {
|
|
826
|
+
signals: MarketRadarSignal[];
|
|
827
|
+
productionFoundation: ProductionFoundation;
|
|
828
|
+
/** 开书创意简报(可选;用「用信号创作」接口单独生成)。 */
|
|
829
|
+
creativeBrief?: MarketCreativeBrief;
|
|
830
|
+
}
|
|
831
|
+
/** POST /market-radar request。 */
|
|
832
|
+
export interface MarketRadarRequest {
|
|
833
|
+
platform?: string;
|
|
834
|
+
genre?: string;
|
|
835
|
+
keywords?: string;
|
|
836
|
+
feedText?: string;
|
|
837
|
+
/** 已扫描的上榜记录(来自真实榜单抓取),用于让分析基于真实榜单证据。 */
|
|
838
|
+
candidates?: Array<{
|
|
839
|
+
title: string;
|
|
840
|
+
author?: string;
|
|
841
|
+
tags?: string[];
|
|
842
|
+
synopsis?: string;
|
|
843
|
+
category?: string;
|
|
844
|
+
heatLabel?: string;
|
|
845
|
+
}>;
|
|
846
|
+
}
|
|
847
|
+
/** POST /market-radar/brief request:用选中的信号 + 影响模式生成开书创意。 */
|
|
848
|
+
export interface MarketRadarBriefRequest {
|
|
849
|
+
influenceMode: 'follow_hot' | 'differentiate' | 'light';
|
|
850
|
+
signals: MarketRadarSignal[];
|
|
643
851
|
}
|
|
644
852
|
/** A character card from the story bible. */
|
|
645
853
|
export interface CharacterCard {
|
|
@@ -708,6 +916,8 @@ export interface AuditResponse {
|
|
|
708
916
|
auditedChapters: number;
|
|
709
917
|
/** 质检时间。 */
|
|
710
918
|
auditedAt: string;
|
|
919
|
+
/** 本次质检使用的模型(auditModel 或全局 model)。 */
|
|
920
|
+
model?: string;
|
|
711
921
|
}
|
|
712
922
|
/** 全书质检的实时状态(通过 /status 暴露给面板/外部读取)。 */
|
|
713
923
|
export interface AuditStatus {
|
|
@@ -1231,8 +1441,14 @@ export interface ProjectState {
|
|
|
1231
1441
|
assets?: ProjectAssets;
|
|
1232
1442
|
/** 事实库/时间线:每章生成后抽取,注入后续章节保持一致性。 */
|
|
1233
1443
|
facts?: ChapterFact[];
|
|
1444
|
+
/** 书内知识库文档(可检索资料/设定/参考)。 */
|
|
1445
|
+
knowledgeDocs?: KnowledgeDoc[];
|
|
1446
|
+
/** 自动导演待办:风险/修复「采纳」后生成的随手清单。 */
|
|
1447
|
+
todos?: DirectorTodo[];
|
|
1234
1448
|
/** 小说简介(面向读者的作品门面,AI 生成或手动保存)。 */
|
|
1235
1449
|
blurb?: string;
|
|
1450
|
+
/** 开书定盘:书籍级承诺与流派定位(前30章承诺/主副模式/文风/平台)。 */
|
|
1451
|
+
bookContract?: BookContract;
|
|
1236
1452
|
/** 封面文件名(相对输出目录,如 cover.png)。 */
|
|
1237
1453
|
coverPath?: string;
|
|
1238
1454
|
/** 大世界结构化数据(境界体系/区域/势力)。 */
|
|
@@ -1405,6 +1621,12 @@ export interface NovelConfig {
|
|
|
1405
1621
|
provider: string;
|
|
1406
1622
|
/** LLM model id (e.g. deepseek-v4-flash). */
|
|
1407
1623
|
model: string;
|
|
1624
|
+
/** 生成正文用模型(缺省用 model)。 */
|
|
1625
|
+
generateModel?: string;
|
|
1626
|
+
/** 审稿用模型(缺省用 model;建议用更强的 reasoner/pro)。 */
|
|
1627
|
+
reviewModel?: string;
|
|
1628
|
+
/** 全书质检(审计)用模型(缺省用 model)。 */
|
|
1629
|
+
auditModel?: string;
|
|
1408
1630
|
/** LLM reasoning effort: off = no thinking; low/high/max = thinking intensity. */
|
|
1409
1631
|
reasoningEffort: 'off' | 'low' | 'high' | 'max';
|
|
1410
1632
|
/** 分析类任务(提炼/拆书/反推大纲等)的推理档位;默认 low,不受上面写作档位影响。 */
|
|
@@ -1668,6 +1890,9 @@ export interface ConfigPatch {
|
|
|
1668
1890
|
outputDir?: string;
|
|
1669
1891
|
provider?: string;
|
|
1670
1892
|
model?: string;
|
|
1893
|
+
generateModel?: string;
|
|
1894
|
+
reviewModel?: string;
|
|
1895
|
+
auditModel?: string;
|
|
1671
1896
|
reasoningEffort?: 'off' | 'low' | 'high' | 'max';
|
|
1672
1897
|
analysisReasoning?: 'off' | 'low' | 'high' | 'max';
|
|
1673
1898
|
chapterChars?: number;
|
|
@@ -1720,6 +1945,12 @@ export type AssistantFrame = {
|
|
|
1720
1945
|
type: 'toolDelta';
|
|
1721
1946
|
name: string;
|
|
1722
1947
|
text: string;
|
|
1948
|
+
}
|
|
1949
|
+
/** 工具完整结果(供前端渲染成结构化卡片,如拆书/导演)。 */
|
|
1950
|
+
| {
|
|
1951
|
+
type: 'toolResult';
|
|
1952
|
+
name: string;
|
|
1953
|
+
text: string;
|
|
1723
1954
|
} | {
|
|
1724
1955
|
type: 'done';
|
|
1725
1956
|
} | {
|
|
@@ -1732,15 +1963,21 @@ export interface AssistantHistoryResponse {
|
|
|
1732
1963
|
}
|
|
1733
1964
|
/** 题材基底库:一本书属于哪个阅读市场。树形(题材→子题材→下级)。 */
|
|
1734
1965
|
export interface GenreNode {
|
|
1966
|
+
/** 稳定标识(内置库交叉引用)。 */
|
|
1967
|
+
id?: string;
|
|
1735
1968
|
/** 题材名称(标签,如「仙侠修真」「都市异能」)。 */
|
|
1736
1969
|
name: string;
|
|
1737
1970
|
/** 题材特征、常见爽点、叙事重心或读者期待。 */
|
|
1738
1971
|
description: string;
|
|
1972
|
+
/** 该题材的写法指引(开书定盘/卷计划用,区别于「读者期待」)。 */
|
|
1973
|
+
template?: string;
|
|
1739
1974
|
/** 子题材。 */
|
|
1740
1975
|
children: GenreNode[];
|
|
1741
1976
|
}
|
|
1742
1977
|
/** 推进模式库:读者为什么继续看下一章。 */
|
|
1743
1978
|
export interface ProgressionMode {
|
|
1979
|
+
/** 稳定标识(与内置库交叉引用)。 */
|
|
1980
|
+
key?: string;
|
|
1744
1981
|
/** 模式名称(如「升级变强」「经营扩张」「解谜揭露」)。 */
|
|
1745
1982
|
name: string;
|
|
1746
1983
|
/** 核心驱动力:靠什么制造追读动力。 */
|
|
@@ -1753,11 +1990,33 @@ export interface ProgressionMode {
|
|
|
1753
1990
|
risks: string[];
|
|
1754
1991
|
/** 主模式或辅助模式。 */
|
|
1755
1992
|
primary: boolean;
|
|
1993
|
+
/** 该模式的写法指引(开书定盘/卷计划用)。 */
|
|
1994
|
+
template?: string;
|
|
1995
|
+
/** 推进单位序列(每章如何推进,如「立威→打破质疑→扩大影响→碾压」)。 */
|
|
1996
|
+
progressionUnits?: string[];
|
|
1997
|
+
/** 允许出现的冲突形态。 */
|
|
1998
|
+
allowedConflictForms?: string[];
|
|
1999
|
+
/** 应避免的冲突形态(跑偏信号)。 */
|
|
2000
|
+
forbiddenConflictForms?: string[];
|
|
2001
|
+
/** 冲突烈度上限(low/medium/high),用于卷/章计划和审稿对齐。 */
|
|
2002
|
+
conflictCeiling?: 'low' | 'medium' | 'high';
|
|
2003
|
+
/** 单章推进单位说明。 */
|
|
2004
|
+
chapterUnit?: string;
|
|
2005
|
+
/** 卷末应兑现的回报。 */
|
|
2006
|
+
volumeReward?: string;
|
|
2007
|
+
/** 主驱动必须持续出现的信号(读者期待确认)。 */
|
|
2008
|
+
mandatorySignals?: string[];
|
|
2009
|
+
/** 反信号:出现即跑偏。 */
|
|
2010
|
+
antiSignals?: string[];
|
|
2011
|
+
/** 优先用的问题解决方式。 */
|
|
2012
|
+
resolutionStyle?: string;
|
|
1756
2013
|
}
|
|
1757
2014
|
/** 反 AI 规则:一条「要避免的问题 + 修正方向」。 */
|
|
1758
2015
|
export interface AntiAiRule {
|
|
1759
2016
|
/** 规则名(如「禁止解释型心理描写」「AI 高频套话」)。 */
|
|
1760
2017
|
name: string;
|
|
2018
|
+
/** 稳定标识(与 defaultAntiAiRuleKeys 交叉引用;缺省用 name)。 */
|
|
2019
|
+
key?: string;
|
|
1761
2020
|
/** 要避免的表达问题,具体可检查。 */
|
|
1762
2021
|
avoid: string;
|
|
1763
2022
|
/** 推荐修正方向。 */
|
|
@@ -1766,14 +2025,55 @@ export interface AntiAiRule {
|
|
|
1766
2025
|
detectPatterns?: string[];
|
|
1767
2026
|
/** 是否内置全局规则(内置规则随插件发布,项目规则为用户自定义)。 */
|
|
1768
2027
|
builtin?: boolean;
|
|
1769
|
-
/**
|
|
1770
|
-
severity?: 'forbidden' | 'encourage';
|
|
2028
|
+
/** 规则类别:forbidden=禁止类(命中即问题)/ risk=风险类(需注意但不硬伤)/ encourage=鼓励类(不命中不算错,只作建议)。 */
|
|
2029
|
+
severity?: 'forbidden' | 'risk' | 'encourage';
|
|
2030
|
+
/** 问题严重度(用于审稿优先级;缺省按类别推断)。 */
|
|
2031
|
+
riskLevel?: 'low' | 'medium' | 'high';
|
|
2032
|
+
/** 生成时直接注入的约束指令(缺失时回退到 avoid)。 */
|
|
2033
|
+
promptInstruction?: string;
|
|
2034
|
+
/** 是否允许自动改写(risk 类通常 false)。 */
|
|
2035
|
+
autoRewrite?: boolean;
|
|
2036
|
+
/** 是否为全局基线规则(新书默认启用,防止规则丢失后降级)。 */
|
|
2037
|
+
globalBaselineEnabled?: boolean;
|
|
1771
2038
|
/** 是否启用(缺省 true)。 */
|
|
1772
2039
|
enabled?: boolean;
|
|
1773
2040
|
/** 作用域(缺省 all)。 */
|
|
1774
2041
|
scope?: Array<'writing' | 'review' | 'polish' | 'all'>;
|
|
1775
2042
|
}
|
|
1776
2043
|
/** 预置写法模板(来自 AI-Novel-Writing-Assistant 内置数据,一键绑定无需样本文本)。 */
|
|
2044
|
+
export interface StyleTemplateNarrativeRules {
|
|
2045
|
+
progressionMode?: string;
|
|
2046
|
+
sceneUnitPattern?: string[];
|
|
2047
|
+
multiPov?: boolean;
|
|
2048
|
+
looping?: boolean;
|
|
2049
|
+
endingStyle?: string;
|
|
2050
|
+
povSwitchStyle?: string;
|
|
2051
|
+
summary?: string;
|
|
2052
|
+
}
|
|
2053
|
+
export interface StyleTemplateCharacterRules {
|
|
2054
|
+
allowSelfReflection?: boolean;
|
|
2055
|
+
emotionExpression?: string;
|
|
2056
|
+
defenseMechanisms?: string[];
|
|
2057
|
+
facePriority?: boolean;
|
|
2058
|
+
dialogueStyle?: string;
|
|
2059
|
+
summary?: string;
|
|
2060
|
+
}
|
|
2061
|
+
export interface StyleTemplateLanguageRules {
|
|
2062
|
+
register?: string;
|
|
2063
|
+
roughness?: number;
|
|
2064
|
+
allowIncompleteSentences?: boolean;
|
|
2065
|
+
allowSwearing?: boolean;
|
|
2066
|
+
sentenceVariation?: string;
|
|
2067
|
+
allowUselessDetails?: boolean;
|
|
2068
|
+
summary?: string;
|
|
2069
|
+
}
|
|
2070
|
+
export interface StyleTemplateRhythmRules {
|
|
2071
|
+
pace?: string;
|
|
2072
|
+
paragraphDensity?: string;
|
|
2073
|
+
allowFragmentedFlow?: boolean;
|
|
2074
|
+
actionOverExplanation?: boolean;
|
|
2075
|
+
summary?: string;
|
|
2076
|
+
}
|
|
1777
2077
|
export interface StyleTemplate {
|
|
1778
2078
|
/** 模板 key(如 power-up-escalation)。 */
|
|
1779
2079
|
key: string;
|
|
@@ -1785,17 +2085,40 @@ export interface StyleTemplate {
|
|
|
1785
2085
|
category: string;
|
|
1786
2086
|
/** 适用题材。 */
|
|
1787
2087
|
applicableGenres: string[];
|
|
1788
|
-
/**
|
|
2088
|
+
/** 标签(便于筛选)。 */
|
|
2089
|
+
tags?: string[];
|
|
2090
|
+
/** 一句话分析(模板定位说明)。 */
|
|
2091
|
+
analysisMarkdown?: string;
|
|
2092
|
+
/** 叙述规则(结构化)。 */
|
|
2093
|
+
narrative?: StyleTemplateNarrativeRules;
|
|
2094
|
+
/** 角色规则(结构化)。 */
|
|
2095
|
+
character?: StyleTemplateCharacterRules;
|
|
2096
|
+
/** 语言规则(结构化)。 */
|
|
2097
|
+
language?: StyleTemplateLanguageRules;
|
|
2098
|
+
/** 节奏规则(结构化)。 */
|
|
2099
|
+
rhythm?: StyleTemplateRhythmRules;
|
|
2100
|
+
/** 叙述规则(扁平,兼容旧数据)。 */
|
|
1789
2101
|
proseRules: string[];
|
|
1790
|
-
/**
|
|
2102
|
+
/** 角色/台词规则(扁平,兼容旧数据)。 */
|
|
1791
2103
|
dialogueRules: string[];
|
|
1792
|
-
/**
|
|
2104
|
+
/** 语言规则(扁平,兼容旧数据)。 */
|
|
1793
2105
|
languageRules: string[];
|
|
1794
|
-
/**
|
|
2106
|
+
/** 节奏规则(扁平,兼容旧数据)。 */
|
|
1795
2107
|
rhythmRules: string[];
|
|
1796
2108
|
/** 该模板默认绑定的反 AI 规则 key(内置规则名)。 */
|
|
1797
2109
|
defaultAntiAiRuleKeys: string[];
|
|
1798
2110
|
}
|
|
2111
|
+
/** 起始风格画像:无样本文本也能快速绑定一套写法(对齐上游 DEFAULT_STARTER_STYLE_PROFILES)。 */
|
|
2112
|
+
export interface StarterStyleProfile {
|
|
2113
|
+
/** stable key(如 starter-power-up)。 */
|
|
2114
|
+
key: string;
|
|
2115
|
+
/** 绑定到的写法模板 key。 */
|
|
2116
|
+
templateKey: string;
|
|
2117
|
+
/** 画像名。 */
|
|
2118
|
+
name: string;
|
|
2119
|
+
/** 画像说明。 */
|
|
2120
|
+
description: string;
|
|
2121
|
+
}
|
|
1799
2122
|
/** 剧情桥段库:可复用的情节套路/桥段(作者阅读经验沉淀,与书内 Plotline 不同层)。 */
|
|
1800
2123
|
export interface PlotBeatTemplate {
|
|
1801
2124
|
/** 模板 key(如 face-slap / exit-wedding)。 */
|
|
@@ -1833,6 +2156,31 @@ export interface StyleAsset {
|
|
|
1833
2156
|
boundaries: string[];
|
|
1834
2157
|
/** 来源样本文本(可空)。 */
|
|
1835
2158
|
sourceText?: string;
|
|
2159
|
+
/** 仿写预设:imitate=高保真仿写 / balanced=平衡 / transfer=迁移(去指纹)。 */
|
|
2160
|
+
preset?: 'imitate' | 'balanced' | 'transfer';
|
|
2161
|
+
/** 指纹风险:仿写时照搬原作独特表达的风险。 */
|
|
2162
|
+
fingerprintRisk?: 'low' | 'medium' | 'high';
|
|
2163
|
+
/** 净化后的写作指引(可安全用于生成,去掉了会暴露来源的具体细节)。 */
|
|
2164
|
+
writingGuidance?: string[];
|
|
2165
|
+
/** 禁止照搬的原作特有实体(人名/地名/核心设定句式),生成时需避开。 */
|
|
2166
|
+
forbiddenEntities?: string[];
|
|
2167
|
+
/** 创建时间。 */
|
|
2168
|
+
createdAt: string;
|
|
2169
|
+
}
|
|
2170
|
+
/** 写作公式(从样本文本分层提取的"这套文怎么写"浓缩,供生成/改写复用)。 */
|
|
2171
|
+
export interface StyleFormula {
|
|
2172
|
+
/** 稳定 key。 */
|
|
2173
|
+
key: string;
|
|
2174
|
+
/** 公式名。 */
|
|
2175
|
+
name: string;
|
|
2176
|
+
/** 提取深度:basic=骨架 / standard=完整 / deep=逐句细化。 */
|
|
2177
|
+
depth: 'basic' | 'standard' | 'deep';
|
|
2178
|
+
/** 重点聚焦域(如 开场/对话/节奏/爽点密度)。 */
|
|
2179
|
+
focusAreas: string[];
|
|
2180
|
+
/** 公式正文(Markdown)。 */
|
|
2181
|
+
formula: string;
|
|
2182
|
+
/** 应用指引(生成/改写时如何套用)。 */
|
|
2183
|
+
applyGuidance: string;
|
|
1836
2184
|
/** 创建时间。 */
|
|
1837
2185
|
createdAt: string;
|
|
1838
2186
|
}
|
|
@@ -1848,6 +2196,8 @@ export interface ProjectAssets {
|
|
|
1848
2196
|
antiAiRules: AntiAiRule[];
|
|
1849
2197
|
/** 绑定的写法资产。 */
|
|
1850
2198
|
styleAssets: StyleAsset[];
|
|
2199
|
+
/** 写作公式(分层提取:basic/standard/deep)。 */
|
|
2200
|
+
styleFormulas?: StyleFormula[];
|
|
1851
2201
|
/** 资产更新时间。 */
|
|
1852
2202
|
updatedAt?: string;
|
|
1853
2203
|
}
|
|
@@ -1862,6 +2212,8 @@ export interface AssetsResponse {
|
|
|
1862
2212
|
styleTemplates: StyleTemplate[];
|
|
1863
2213
|
/** 内置推进模式候选。 */
|
|
1864
2214
|
progressionLibrary: ProgressionMode[];
|
|
2215
|
+
/** 起始风格画像(无样本文本快速绑定写法)。 */
|
|
2216
|
+
starterStyleProfiles: StarterStyleProfile[];
|
|
1865
2217
|
/** 内置剧情桥段库(可复用套路)。 */
|
|
1866
2218
|
plotBeatLibrary: PlotBeatTemplate[];
|
|
1867
2219
|
}
|
|
@@ -1872,6 +2224,7 @@ export interface AssetsPatch {
|
|
|
1872
2224
|
auxiliaryProgressions?: ProgressionMode[];
|
|
1873
2225
|
antiAiRules?: AntiAiRule[];
|
|
1874
2226
|
styleAssets?: StyleAsset[];
|
|
2227
|
+
styleFormulas?: StyleFormula[];
|
|
1875
2228
|
}
|
|
1876
2229
|
/** POST /style-engine request:从样本文本提取写法资产。 */
|
|
1877
2230
|
export interface StyleEngineRequest {
|
|
@@ -1935,8 +2288,11 @@ export interface AdaptationDimension {
|
|
|
1935
2288
|
current: string;
|
|
1936
2289
|
/** 该值在正文中的出现证据(章节/频次,可空)。 */
|
|
1937
2290
|
evidence?: string;
|
|
1938
|
-
/** AI
|
|
1939
|
-
candidates?:
|
|
2291
|
+
/** AI 建议的候选新值(可空,每套含名称与一句话说明)。 */
|
|
2292
|
+
candidates?: Array<{
|
|
2293
|
+
name: string;
|
|
2294
|
+
desc?: string;
|
|
2295
|
+
}>;
|
|
1940
2296
|
/** 联动影响说明(改了会影响哪些章节/角色/伏笔/术语)。 */
|
|
1941
2297
|
impact: string;
|
|
1942
2298
|
/** 风险评级。 */
|
package/lib/types/run.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare class ProductionRunner {
|
|
|
17
17
|
private persist;
|
|
18
18
|
private log;
|
|
19
19
|
/** 启动/续跑生产单:startNo..endNo 区间,endNo 超出计划时先自动补计划。 */
|
|
20
|
-
start(startNo: number, endNo: number): Promise<RunState>;
|
|
20
|
+
start(startNo: number, endNo: number, runDir?: string): Promise<RunState>;
|
|
21
21
|
pause(): void;
|
|
22
22
|
resume(): void;
|
|
23
23
|
stop(): void;
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
};
|