dsh-novel-write-engine 0.1.2 → 0.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/CHANGELOG.md +44 -0
- package/README.md +283 -184
- package/briefs/P1.md +1 -0
- package/briefs/P2.md +8 -1
- package/briefs/P3.md +4 -0
- package/briefs/P4.md +1 -1
- package/briefs/P6.md +7 -5
- package/lib/client.js +497 -19
- package/lib/index.d.ts +654 -11
- package/lib/index.js +5527 -429
- package/lib/types/client/dto.d.ts +51 -0
- package/lib/types/client/viewmodel.d.ts +41 -1
- package/lib/types/constants.d.ts +21 -3
- package/lib/types/next-reasons.d.ts +6 -0
- package/lib/types/types.d.ts +314 -6
- package/package.json +19 -17
- package/presets/novel-write-engine.patch.yml +1 -1
- package/skills/entry.md +17 -4
package/lib/index.d.ts
CHANGED
|
@@ -22,8 +22,8 @@ declare const SCENE_TYPES: readonly ["战斗/动作章", "日常过渡章", "情
|
|
|
22
22
|
type SceneType = (typeof SCENE_TYPES)[number];
|
|
23
23
|
/** A violation is blocking unless the rule pack declares it advisory. */
|
|
24
24
|
type Severity = 'blocker' | 'advisory';
|
|
25
|
-
/** All
|
|
26
|
-
declare const OPERATIONS: readonly ["initProject", "archiveChapter", "amend", "rollback", "submitWorldPlan", "submitChapterPlan", "submitDraft", "submitReview", "submitRevision", "runCheck", "getStatus", "getBrief", "countWords", "queryState", "diff", "auditHistory", "advise", "export", "panelSummary", "panelChapters", "panelGates", "stats"];
|
|
25
|
+
/** All thirty-one service operations (22 inherited from 0.1.x, 9 book-level). */
|
|
26
|
+
declare const OPERATIONS: readonly ["initProject", "archiveChapter", "amend", "rollback", "reopenChapter", "submitWorldPlan", "submitChapterPlan", "submitDraft", "submitReview", "submitRevision", "runCheck", "submitBookPlan", "submitOutline", "importOutline", "submitWorldbook", "getStatus", "getBrief", "countWords", "queryState", "diff", "auditHistory", "advise", "search", "doctor", "report", "guide", "export", "panelSummary", "panelChapters", "panelGates", "stats"];
|
|
27
27
|
type Operation = (typeof OPERATIONS)[number];
|
|
28
28
|
/** Structured, non-fatal note attached to a successful result. */
|
|
29
29
|
interface Warning {
|
|
@@ -72,6 +72,8 @@ declare const ERROR_CODES: {
|
|
|
72
72
|
readonly PATH_ESCAPE: "ENGINE_PATH_ESCAPE";
|
|
73
73
|
readonly LOCK_TIMEOUT: "ENGINE_LOCK_TIMEOUT";
|
|
74
74
|
readonly TXN_ABORTED: "ENGINE_TXN_ABORTED";
|
|
75
|
+
readonly JOURNAL_MISSING: "ENGINE_JOURNAL_MISSING";
|
|
76
|
+
readonly TXN_IN_PROGRESS: "ENGINE_TXN_IN_PROGRESS";
|
|
75
77
|
readonly RULEPACK_INVALID: "ENGINE_RULEPACK_INVALID";
|
|
76
78
|
readonly ID_EXHAUSTED: "ENGINE_ID_EXHAUSTED";
|
|
77
79
|
readonly CONFIG_INVALID: "ENGINE_CONFIG_INVALID";
|
|
@@ -171,10 +173,12 @@ interface CheckDocument {
|
|
|
171
173
|
};
|
|
172
174
|
verdict: 'pass' | 'fail';
|
|
173
175
|
}
|
|
176
|
+
/** Every persisted document whose damage status/panel can report. */
|
|
177
|
+
type StateErrorCode = 'PROJECT_UNREADABLE' | 'PLAN_UNREADABLE' | 'WORLD_PLAN_UNREADABLE' | 'REVIEW_UNREADABLE' | 'CHECK_UNREADABLE' | 'CHAPTERS_UNREADABLE' | 'CHARACTERS_UNREADABLE' | 'WORLD_UNREADABLE' | 'LOCKS_UNREADABLE' | 'TIMELINE_UNREADABLE' | 'FORESHADOWS_UNREADABLE' | 'RELATIONSHIPS_UNREADABLE' | 'HANDOFF_UNREADABLE' | 'OUTLINE_UNREADABLE' | 'WORLDBOOK_UNREADABLE';
|
|
174
178
|
/** A state document that exists but cannot be read safely. */
|
|
175
179
|
interface StateError {
|
|
176
180
|
path: string;
|
|
177
|
-
code:
|
|
181
|
+
code: StateErrorCode;
|
|
178
182
|
message: string;
|
|
179
183
|
}
|
|
180
184
|
/** Word statistics with the single engine-wide counting rule. */
|
|
@@ -503,6 +507,14 @@ interface WorldPlanInput {
|
|
|
503
507
|
}>;
|
|
504
508
|
continuity_notes: string[];
|
|
505
509
|
}
|
|
510
|
+
/** A character the chapter plan puts on stage; no new persisted schema. */
|
|
511
|
+
interface ChapterCastMember {
|
|
512
|
+
name: string;
|
|
513
|
+
entry_state?: string;
|
|
514
|
+
goal?: string;
|
|
515
|
+
knowledge?: string[];
|
|
516
|
+
exit_change?: string;
|
|
517
|
+
}
|
|
506
518
|
/** Chapter plan (`plans/chNNN.chapter.yaml`). */
|
|
507
519
|
interface ChapterPlanInput {
|
|
508
520
|
chapter: number;
|
|
@@ -513,6 +525,267 @@ interface ChapterPlanInput {
|
|
|
513
525
|
opening: string;
|
|
514
526
|
ending: string;
|
|
515
527
|
target_words: [number, number];
|
|
528
|
+
/** Optional in 0.1.3: older plans remain readable; new plans may name 1–8 actors. */
|
|
529
|
+
cast?: ChapterCastMember[];
|
|
530
|
+
}
|
|
531
|
+
/** Book-level pitch and structure, persisted in `outline/outline.yaml`. */
|
|
532
|
+
interface BookPlan {
|
|
533
|
+
premise: string;
|
|
534
|
+
logline: string;
|
|
535
|
+
themes: string[];
|
|
536
|
+
tone: string;
|
|
537
|
+
pov: string;
|
|
538
|
+
audience: string;
|
|
539
|
+
selling_points: string[];
|
|
540
|
+
ending: string;
|
|
541
|
+
/** Strict mode requires a chapter card before P2/P3 for every chapter. */
|
|
542
|
+
strict: boolean;
|
|
543
|
+
/** True once the author explicitly chose strict on/off; used for the first-outline default. */
|
|
544
|
+
strict_explicit?: boolean;
|
|
545
|
+
}
|
|
546
|
+
/** One volume of the planned book. `end_chapter` is inclusive. */
|
|
547
|
+
interface OutlineVolume {
|
|
548
|
+
id: string;
|
|
549
|
+
title: string;
|
|
550
|
+
start_chapter: number;
|
|
551
|
+
end_chapter: number;
|
|
552
|
+
goal: string;
|
|
553
|
+
arc: string;
|
|
554
|
+
climax: string;
|
|
555
|
+
status: 'planned' | 'writing' | 'done';
|
|
556
|
+
}
|
|
557
|
+
/** One planned chapter card. Only the archive transaction may write the archived fields. */
|
|
558
|
+
interface OutlineChapter {
|
|
559
|
+
num: number;
|
|
560
|
+
volume: number | null;
|
|
561
|
+
title: string;
|
|
562
|
+
scene_type: SceneType;
|
|
563
|
+
goal: string;
|
|
564
|
+
conflict: string;
|
|
565
|
+
hook: string;
|
|
566
|
+
cast: string[];
|
|
567
|
+
target_words: [number, number];
|
|
568
|
+
notes: string;
|
|
569
|
+
status: 'planned' | 'archived';
|
|
570
|
+
archived_at: string | null;
|
|
571
|
+
word_count: number | null;
|
|
572
|
+
score: number | null;
|
|
573
|
+
}
|
|
574
|
+
/** The planning SSOT read by P1–P8, PG-13, report, doctor and export. */
|
|
575
|
+
interface OutlineDocument {
|
|
576
|
+
schema_version: 1;
|
|
577
|
+
updated_at: string;
|
|
578
|
+
book: BookPlan;
|
|
579
|
+
volumes: OutlineVolume[];
|
|
580
|
+
chapters: OutlineChapter[];
|
|
581
|
+
}
|
|
582
|
+
/** One worldbuilding rule/constraint. */
|
|
583
|
+
interface WorldbookRule {
|
|
584
|
+
name: string;
|
|
585
|
+
description: string;
|
|
586
|
+
}
|
|
587
|
+
/** One faction in the world bible. */
|
|
588
|
+
interface WorldbookFaction {
|
|
589
|
+
name: string;
|
|
590
|
+
description: string;
|
|
591
|
+
goal: string;
|
|
592
|
+
}
|
|
593
|
+
/** One location in the world bible. */
|
|
594
|
+
interface WorldbookLocation {
|
|
595
|
+
name: string;
|
|
596
|
+
description: string;
|
|
597
|
+
layout: string;
|
|
598
|
+
capacity: number;
|
|
599
|
+
}
|
|
600
|
+
/** One planned character (not the post-prose ledger entry). */
|
|
601
|
+
interface WorldbookCharacter {
|
|
602
|
+
name: string;
|
|
603
|
+
role: string;
|
|
604
|
+
description: string;
|
|
605
|
+
arc: string;
|
|
606
|
+
}
|
|
607
|
+
/** One glossary entry. */
|
|
608
|
+
interface WorldbookGlossary {
|
|
609
|
+
term: string;
|
|
610
|
+
definition: string;
|
|
611
|
+
}
|
|
612
|
+
/** One backstory event. */
|
|
613
|
+
interface WorldbookBackstory {
|
|
614
|
+
time: string;
|
|
615
|
+
event: string;
|
|
616
|
+
}
|
|
617
|
+
/** Worldbuilding plan, persisted in `outline/worldbook.yaml`. */
|
|
618
|
+
interface WorldbookDocument {
|
|
619
|
+
schema_version: 1;
|
|
620
|
+
updated_at: string;
|
|
621
|
+
premise: string;
|
|
622
|
+
setting: string;
|
|
623
|
+
rules: WorldbookRule[];
|
|
624
|
+
factions: WorldbookFaction[];
|
|
625
|
+
locations: WorldbookLocation[];
|
|
626
|
+
characters: WorldbookCharacter[];
|
|
627
|
+
glossary: WorldbookGlossary[];
|
|
628
|
+
backstory: WorldbookBackstory[];
|
|
629
|
+
themes: string[];
|
|
630
|
+
}
|
|
631
|
+
/** One hit from `novel_search`; the scope names the source family. */
|
|
632
|
+
interface SearchResultItem {
|
|
633
|
+
kind: 'chapters' | 'summaries' | 'outline' | 'worldbook' | 'ledgers';
|
|
634
|
+
chapter?: number;
|
|
635
|
+
title?: string;
|
|
636
|
+
paragraph?: number;
|
|
637
|
+
snippet: string;
|
|
638
|
+
}
|
|
639
|
+
/** Search response; `total` counts every matching segment, `results` is capped by `limit`. */
|
|
640
|
+
interface SearchReport {
|
|
641
|
+
query: string;
|
|
642
|
+
scope: 'all' | 'chapters' | 'summaries' | 'outline' | 'worldbook' | 'ledgers';
|
|
643
|
+
total: number;
|
|
644
|
+
truncated: boolean;
|
|
645
|
+
results: SearchResultItem[];
|
|
646
|
+
}
|
|
647
|
+
/** One structured health check. */
|
|
648
|
+
interface DoctorCheck {
|
|
649
|
+
id: string;
|
|
650
|
+
severity: 'ok' | 'info' | 'warning' | 'error';
|
|
651
|
+
title: string;
|
|
652
|
+
detail: string;
|
|
653
|
+
hint?: string;
|
|
654
|
+
}
|
|
655
|
+
/** `novel_doctor` payload; a missing project is reported, never thrown. */
|
|
656
|
+
interface DoctorReport {
|
|
657
|
+
ok: boolean;
|
|
658
|
+
root: string;
|
|
659
|
+
checks: DoctorCheck[];
|
|
660
|
+
summary: {
|
|
661
|
+
errors: number;
|
|
662
|
+
warnings: number;
|
|
663
|
+
infos: number;
|
|
664
|
+
};
|
|
665
|
+
}
|
|
666
|
+
/** Book-wide quality, outline, cast and pacing aggregates. */
|
|
667
|
+
interface BookReport {
|
|
668
|
+
progress: {
|
|
669
|
+
archived: number;
|
|
670
|
+
target: number | null;
|
|
671
|
+
words: number;
|
|
672
|
+
average_words: number;
|
|
673
|
+
percent: number;
|
|
674
|
+
remaining_words: number | null;
|
|
675
|
+
};
|
|
676
|
+
outline: {
|
|
677
|
+
present: boolean;
|
|
678
|
+
strict: boolean;
|
|
679
|
+
planned: number;
|
|
680
|
+
archived: number;
|
|
681
|
+
coverage: number;
|
|
682
|
+
volumes: Array<{
|
|
683
|
+
title: string;
|
|
684
|
+
start: number;
|
|
685
|
+
end: number;
|
|
686
|
+
planned: number;
|
|
687
|
+
archived: number;
|
|
688
|
+
}>;
|
|
689
|
+
drift: Array<{
|
|
690
|
+
chapter: number;
|
|
691
|
+
field: string;
|
|
692
|
+
planned: string;
|
|
693
|
+
actual: string;
|
|
694
|
+
}>;
|
|
695
|
+
};
|
|
696
|
+
worldbook: {
|
|
697
|
+
present: boolean;
|
|
698
|
+
characters: number;
|
|
699
|
+
locations: number;
|
|
700
|
+
factions: number;
|
|
701
|
+
rules: number;
|
|
702
|
+
glossary: number;
|
|
703
|
+
backstory: number;
|
|
704
|
+
};
|
|
705
|
+
quality: {
|
|
706
|
+
average: number;
|
|
707
|
+
median: number;
|
|
708
|
+
min: number;
|
|
709
|
+
max: number;
|
|
710
|
+
last_five: number[];
|
|
711
|
+
trend: number;
|
|
712
|
+
dimensions: Array<{
|
|
713
|
+
id: string;
|
|
714
|
+
average: number;
|
|
715
|
+
samples: number;
|
|
716
|
+
}>;
|
|
717
|
+
};
|
|
718
|
+
pacing: {
|
|
719
|
+
scene_types: Record<string, number>;
|
|
720
|
+
hook_strength: Record<string, number>;
|
|
721
|
+
plot_advancement: Record<string, number>;
|
|
722
|
+
longest: {
|
|
723
|
+
chapter: number;
|
|
724
|
+
words: number;
|
|
725
|
+
} | null;
|
|
726
|
+
shortest: {
|
|
727
|
+
chapter: number;
|
|
728
|
+
words: number;
|
|
729
|
+
} | null;
|
|
730
|
+
};
|
|
731
|
+
cast: {
|
|
732
|
+
total: number;
|
|
733
|
+
top: Array<{
|
|
734
|
+
name: string;
|
|
735
|
+
appearances: number;
|
|
736
|
+
last_seen: number;
|
|
737
|
+
role: string;
|
|
738
|
+
}>;
|
|
739
|
+
};
|
|
740
|
+
foreshadows: {
|
|
741
|
+
open: number;
|
|
742
|
+
dormant: number;
|
|
743
|
+
overdue: number;
|
|
744
|
+
resolved: number;
|
|
745
|
+
oldest: Array<{
|
|
746
|
+
id: string;
|
|
747
|
+
title: string;
|
|
748
|
+
last_touched: number;
|
|
749
|
+
age: number;
|
|
750
|
+
}>;
|
|
751
|
+
};
|
|
752
|
+
timeline: {
|
|
753
|
+
events: number;
|
|
754
|
+
first_chapter: number | null;
|
|
755
|
+
last_chapter: number | null;
|
|
756
|
+
};
|
|
757
|
+
relationships: {
|
|
758
|
+
total: number;
|
|
759
|
+
types: Record<string, number>;
|
|
760
|
+
};
|
|
761
|
+
activity: Array<{
|
|
762
|
+
at: string;
|
|
763
|
+
op: string;
|
|
764
|
+
chapter: number;
|
|
765
|
+
status: string;
|
|
766
|
+
}>;
|
|
767
|
+
warnings: string[];
|
|
768
|
+
}
|
|
769
|
+
/** One onboarding step. */
|
|
770
|
+
interface GuideStep {
|
|
771
|
+
id: string;
|
|
772
|
+
title: string;
|
|
773
|
+
detail: string;
|
|
774
|
+
done: boolean;
|
|
775
|
+
tool?: string;
|
|
776
|
+
}
|
|
777
|
+
/** `novel_guide` payload. */
|
|
778
|
+
interface GuideReport {
|
|
779
|
+
state: 'no-project' | 'new' | 'planning' | 'writing' | 'blocked' | 'finished';
|
|
780
|
+
title: string;
|
|
781
|
+
steps: GuideStep[];
|
|
782
|
+
next: {
|
|
783
|
+
tool: string;
|
|
784
|
+
args: Record<string, unknown>;
|
|
785
|
+
reason: string;
|
|
786
|
+
};
|
|
787
|
+
commands: string[];
|
|
788
|
+
tips: string[];
|
|
516
789
|
}
|
|
517
790
|
/** Draft submission payload. */
|
|
518
791
|
interface DraftInput {
|
|
@@ -586,6 +859,12 @@ interface GateInput {
|
|
|
586
859
|
/** The three preceding chapters, newest first, for the duplicate rule. */
|
|
587
860
|
previousTexts: string[];
|
|
588
861
|
priorSceneTypes: SceneType[];
|
|
862
|
+
/** 0.2.0 planning input; undefined means "no outline" for older fixtures. */
|
|
863
|
+
outline?: OutlineDocument | null;
|
|
864
|
+
/** The chapter plan's target range, used by PG-13. */
|
|
865
|
+
planTargetWords?: [number, number] | null;
|
|
866
|
+
/** The chapter plan's declared cast names, used by PG-13. */
|
|
867
|
+
planCast?: string[] | null;
|
|
589
868
|
}
|
|
590
869
|
/** Gate evaluation outcome. */
|
|
591
870
|
interface GateResult {
|
|
@@ -616,9 +895,38 @@ interface StatusReport {
|
|
|
616
895
|
stage: Stage;
|
|
617
896
|
rounds: RoundCounters;
|
|
618
897
|
blocking: BlockingItem[];
|
|
619
|
-
/** plan/review/check files that exist but cannot be read safely. */
|
|
898
|
+
/** plan/review/check/ledger files that exist but cannot be read safely. */
|
|
620
899
|
state_errors: StateError[];
|
|
621
900
|
metrics: WordMetrics | null;
|
|
901
|
+
/** Inherited handoff labels; absent before the first archive. */
|
|
902
|
+
volume?: number;
|
|
903
|
+
volume_name?: string;
|
|
904
|
+
act?: string;
|
|
905
|
+
act_progress?: string;
|
|
906
|
+
/** 0.2.0 book-level visibility; absent on older synthetic payloads. */
|
|
907
|
+
book?: {
|
|
908
|
+
premise: string;
|
|
909
|
+
logline: string;
|
|
910
|
+
strict: boolean;
|
|
911
|
+
outline: {
|
|
912
|
+
present: boolean;
|
|
913
|
+
total: number;
|
|
914
|
+
planned: number;
|
|
915
|
+
archived: number;
|
|
916
|
+
coverage: number;
|
|
917
|
+
volumes: number;
|
|
918
|
+
current: OutlineChapter | null;
|
|
919
|
+
};
|
|
920
|
+
worldbook: {
|
|
921
|
+
present: boolean;
|
|
922
|
+
characters: number;
|
|
923
|
+
locations: number;
|
|
924
|
+
factions: number;
|
|
925
|
+
rules: number;
|
|
926
|
+
glossary: number;
|
|
927
|
+
backstory: number;
|
|
928
|
+
};
|
|
929
|
+
};
|
|
622
930
|
next: {
|
|
623
931
|
tool: string;
|
|
624
932
|
args: Record<string, unknown>;
|
|
@@ -657,8 +965,8 @@ interface DiffReport {
|
|
|
657
965
|
line: string;
|
|
658
966
|
}>;
|
|
659
967
|
}
|
|
660
|
-
/** Export capabilities. */
|
|
661
|
-
type ExportKind = 'md' | 'txt' | 'epub';
|
|
968
|
+
/** Export capabilities; the last three are book-planning deliverables. */
|
|
969
|
+
type ExportKind = 'md' | 'txt' | 'epub' | 'outline' | 'worldbook' | 'proposal';
|
|
662
970
|
/** One blacklisted word. */
|
|
663
971
|
interface TermEntry {
|
|
664
972
|
term: string;
|
|
@@ -786,13 +1094,65 @@ interface Rulepack {
|
|
|
786
1094
|
exemptions: string[];
|
|
787
1095
|
}
|
|
788
1096
|
/** Every persisted document the engine knows how to load. */
|
|
789
|
-
type DocKind = 'project' | 'pipeline' | 'chapters' | 'characters' | 'world' | 'locks' | 'foreshadows' | 'timeline' | 'relationships' | 'handoff' | 'review' | 'check' | 'worldPlan' | 'chapterPlan';
|
|
1097
|
+
type DocKind = 'project' | 'pipeline' | 'chapters' | 'characters' | 'world' | 'locks' | 'foreshadows' | 'timeline' | 'relationships' | 'handoff' | 'review' | 'check' | 'worldPlan' | 'chapterPlan' | 'outline' | 'worldbook';
|
|
790
1098
|
/** One project row in the cross-project registry. */
|
|
791
1099
|
interface RegistryEntry {
|
|
792
1100
|
root: string;
|
|
793
1101
|
title: string;
|
|
794
1102
|
updated_at: string;
|
|
795
1103
|
}
|
|
1104
|
+
interface BookPatch {
|
|
1105
|
+
premise?: string;
|
|
1106
|
+
logline?: string;
|
|
1107
|
+
themes?: string[];
|
|
1108
|
+
tone?: string;
|
|
1109
|
+
pov?: string;
|
|
1110
|
+
audience?: string;
|
|
1111
|
+
selling_points?: string[];
|
|
1112
|
+
ending?: string;
|
|
1113
|
+
strict?: boolean;
|
|
1114
|
+
/** Internal provenance for an explicit strict choice. */
|
|
1115
|
+
strict_explicit?: boolean;
|
|
1116
|
+
}
|
|
1117
|
+
interface VolumeInput {
|
|
1118
|
+
id?: string;
|
|
1119
|
+
title: string;
|
|
1120
|
+
start_chapter: number;
|
|
1121
|
+
end_chapter: number;
|
|
1122
|
+
goal?: string;
|
|
1123
|
+
arc?: string;
|
|
1124
|
+
climax?: string;
|
|
1125
|
+
status?: OutlineVolume['status'];
|
|
1126
|
+
}
|
|
1127
|
+
interface OutlineChapterInput {
|
|
1128
|
+
num: number;
|
|
1129
|
+
volume?: number | null;
|
|
1130
|
+
title: string;
|
|
1131
|
+
scene_type: SceneType;
|
|
1132
|
+
goal: string;
|
|
1133
|
+
conflict: string;
|
|
1134
|
+
hook: string;
|
|
1135
|
+
cast?: string[];
|
|
1136
|
+
target_words: [number, number];
|
|
1137
|
+
notes?: string;
|
|
1138
|
+
}
|
|
1139
|
+
interface OutlineInput {
|
|
1140
|
+
book?: BookPatch;
|
|
1141
|
+
volumes?: VolumeInput[];
|
|
1142
|
+
chapters: OutlineChapterInput[];
|
|
1143
|
+
strict?: boolean;
|
|
1144
|
+
}
|
|
1145
|
+
interface WorldbookPatch {
|
|
1146
|
+
premise?: string;
|
|
1147
|
+
setting?: string;
|
|
1148
|
+
rules?: WorldbookRule[];
|
|
1149
|
+
factions?: WorldbookFaction[];
|
|
1150
|
+
locations?: WorldbookLocation[];
|
|
1151
|
+
characters?: WorldbookCharacter[];
|
|
1152
|
+
glossary?: WorldbookGlossary[];
|
|
1153
|
+
backstory?: WorldbookBackstory[];
|
|
1154
|
+
themes?: string[];
|
|
1155
|
+
}
|
|
796
1156
|
/** One rendered task book. */
|
|
797
1157
|
interface BriefDocument {
|
|
798
1158
|
stage: BriefStage;
|
|
@@ -829,6 +1189,7 @@ declare const GATES: {
|
|
|
829
1189
|
readonly 'PG-10': "CONSISTENCY";
|
|
830
1190
|
readonly 'PG-11': "ROUNDS";
|
|
831
1191
|
readonly 'PG-12': "ARCHIVE_ATOMIC";
|
|
1192
|
+
readonly 'PG-13': "OUTLINE_ALIGNMENT";
|
|
832
1193
|
};
|
|
833
1194
|
type GateId = keyof typeof GATES;
|
|
834
1195
|
/** Everything gate evaluation needs beyond the input: taste comes from the pack. */
|
|
@@ -840,7 +1201,7 @@ interface GateOptions {
|
|
|
840
1201
|
declare function parseParagraphLocation(location: string): number | null;
|
|
841
1202
|
/** Verify one reading-proof reference against the manuscript. */
|
|
842
1203
|
declare function verifyReference(text: string, reference: ReadingProofReference): string | null;
|
|
843
|
-
/** Evaluate all
|
|
1204
|
+
/** Evaluate all thirteen gates and return every blocking item, in canonical order. */
|
|
844
1205
|
declare function evaluateGates(input: GateInput, options: GateOptions): GateResult;
|
|
845
1206
|
/**
|
|
846
1207
|
* Which gates apply to an operation. A gate that does not apply must not run:
|
|
@@ -874,6 +1235,10 @@ interface PanelSnapshot {
|
|
|
874
1235
|
check: number;
|
|
875
1236
|
};
|
|
876
1237
|
blocking: BlockingItem[];
|
|
1238
|
+
volume?: number;
|
|
1239
|
+
volume_name?: string;
|
|
1240
|
+
act?: string;
|
|
1241
|
+
act_progress?: string;
|
|
877
1242
|
/** Recommended next action; lets the panel explain a stage with no blockers. */
|
|
878
1243
|
next?: StatusReport['next'];
|
|
879
1244
|
/** True only when the configured total chapter target has been reached. */
|
|
@@ -883,12 +1248,61 @@ interface PanelSnapshot {
|
|
|
883
1248
|
draft?: PanelDraft | null;
|
|
884
1249
|
/** Total words across the index, for the header. */
|
|
885
1250
|
totalWords: number;
|
|
1251
|
+
/** Book-wide archived average, not just the panel's capped rows. */
|
|
1252
|
+
averageScore?: number;
|
|
886
1253
|
/** The nine-phase strip state, derived from the pipeline stage. */
|
|
887
1254
|
phases: Array<{
|
|
888
1255
|
id: string;
|
|
889
1256
|
done: boolean;
|
|
890
1257
|
active: boolean;
|
|
891
1258
|
}>;
|
|
1259
|
+
/** 0.2.0 book-level planning and health blocks. */
|
|
1260
|
+
book?: PanelBook;
|
|
1261
|
+
quality?: {
|
|
1262
|
+
averageScore: number;
|
|
1263
|
+
scores: number[];
|
|
1264
|
+
trend: number;
|
|
1265
|
+
};
|
|
1266
|
+
health?: {
|
|
1267
|
+
ok: boolean;
|
|
1268
|
+
blocking: number;
|
|
1269
|
+
stateErrors: number;
|
|
1270
|
+
};
|
|
1271
|
+
activity?: Array<{
|
|
1272
|
+
at: string;
|
|
1273
|
+
op: string;
|
|
1274
|
+
chapter: number;
|
|
1275
|
+
status: string;
|
|
1276
|
+
}>;
|
|
1277
|
+
}
|
|
1278
|
+
interface PanelBook {
|
|
1279
|
+
premise: string;
|
|
1280
|
+
logline: string;
|
|
1281
|
+
strict: boolean;
|
|
1282
|
+
target: number | null;
|
|
1283
|
+
outline: {
|
|
1284
|
+
present: boolean;
|
|
1285
|
+
total: number;
|
|
1286
|
+
planned: number;
|
|
1287
|
+
archived: number;
|
|
1288
|
+
coverage: number;
|
|
1289
|
+
volumes: Array<{
|
|
1290
|
+
title: string;
|
|
1291
|
+
start: number;
|
|
1292
|
+
end: number;
|
|
1293
|
+
planned: number;
|
|
1294
|
+
archived: number;
|
|
1295
|
+
}>;
|
|
1296
|
+
};
|
|
1297
|
+
worldbook: {
|
|
1298
|
+
present: boolean;
|
|
1299
|
+
characters: number;
|
|
1300
|
+
locations: number;
|
|
1301
|
+
factions: number;
|
|
1302
|
+
rules: number;
|
|
1303
|
+
glossary: number;
|
|
1304
|
+
backstory: number;
|
|
1305
|
+
};
|
|
892
1306
|
}
|
|
893
1307
|
interface PanelSummaryDto {
|
|
894
1308
|
schemaVersion: number;
|
|
@@ -901,6 +1315,12 @@ interface PanelSummaryDto {
|
|
|
901
1315
|
revision: number;
|
|
902
1316
|
totalWords: number;
|
|
903
1317
|
totalChapters: number;
|
|
1318
|
+
/** Book-wide archived average; absent on older payloads. */
|
|
1319
|
+
averageScore?: number;
|
|
1320
|
+
volume?: number;
|
|
1321
|
+
volume_name?: string;
|
|
1322
|
+
act?: string;
|
|
1323
|
+
act_progress?: string;
|
|
904
1324
|
phases: Array<{
|
|
905
1325
|
id: string;
|
|
906
1326
|
done: boolean;
|
|
@@ -913,6 +1333,24 @@ interface PanelSummaryDto {
|
|
|
913
1333
|
};
|
|
914
1334
|
/** Absent for older payloads; false means the current chapter cycle is done. */
|
|
915
1335
|
finished?: boolean;
|
|
1336
|
+
/** 0.2.0 planning, quality, health and activity blocks. */
|
|
1337
|
+
book?: PanelBook;
|
|
1338
|
+
quality?: {
|
|
1339
|
+
averageScore: number;
|
|
1340
|
+
scores: number[];
|
|
1341
|
+
trend: number;
|
|
1342
|
+
};
|
|
1343
|
+
health?: {
|
|
1344
|
+
ok: boolean;
|
|
1345
|
+
blocking: number;
|
|
1346
|
+
stateErrors: number;
|
|
1347
|
+
};
|
|
1348
|
+
activity?: Array<{
|
|
1349
|
+
at: string;
|
|
1350
|
+
op: string;
|
|
1351
|
+
chapter: number;
|
|
1352
|
+
status: string;
|
|
1353
|
+
}>;
|
|
916
1354
|
}
|
|
917
1355
|
interface PanelChapterRow {
|
|
918
1356
|
num: number;
|
|
@@ -992,6 +1430,31 @@ type EngineEvent = {
|
|
|
992
1430
|
path: string;
|
|
993
1431
|
reason: string;
|
|
994
1432
|
};
|
|
1433
|
+
} | {
|
|
1434
|
+
name: 'novel/planned';
|
|
1435
|
+
payload: {
|
|
1436
|
+
schemaVersion: 1;
|
|
1437
|
+
projectRoot: string;
|
|
1438
|
+
kind: 'blueprint' | 'outline' | 'worldbook';
|
|
1439
|
+
chapters: number;
|
|
1440
|
+
volumes: number;
|
|
1441
|
+
};
|
|
1442
|
+
} | {
|
|
1443
|
+
name: 'novel/reopened';
|
|
1444
|
+
payload: {
|
|
1445
|
+
schemaVersion: 1;
|
|
1446
|
+
projectRoot: string;
|
|
1447
|
+
chapter: number;
|
|
1448
|
+
restore_txid: string;
|
|
1449
|
+
};
|
|
1450
|
+
} | {
|
|
1451
|
+
name: 'novel/exported';
|
|
1452
|
+
payload: {
|
|
1453
|
+
schemaVersion: 1;
|
|
1454
|
+
projectRoot: string;
|
|
1455
|
+
kind: string;
|
|
1456
|
+
files: number;
|
|
1457
|
+
};
|
|
995
1458
|
};
|
|
996
1459
|
interface InitProjectInput {
|
|
997
1460
|
title: string;
|
|
@@ -1002,6 +1465,17 @@ interface InitProjectInput {
|
|
|
1002
1465
|
words_per_chapter?: [number, number];
|
|
1003
1466
|
total_chapters?: number | null;
|
|
1004
1467
|
dialogue_ratio?: [number, number];
|
|
1468
|
+
/** 0.2.0 book-planning seed; every field is optional. */
|
|
1469
|
+
premise?: string;
|
|
1470
|
+
logline?: string;
|
|
1471
|
+
themes?: string[];
|
|
1472
|
+
tone?: string;
|
|
1473
|
+
pov?: string;
|
|
1474
|
+
audience?: string;
|
|
1475
|
+
selling_points?: string[];
|
|
1476
|
+
ending?: string;
|
|
1477
|
+
/** Strict outline is opt-in; a new project defaults to false. */
|
|
1478
|
+
strict_outline?: boolean;
|
|
1005
1479
|
root?: string;
|
|
1006
1480
|
}
|
|
1007
1481
|
interface StatusInput {
|
|
@@ -1041,7 +1515,7 @@ interface RevisionSubmission extends Omit<RevisionInput, 'summary'> {
|
|
|
1041
1515
|
}
|
|
1042
1516
|
interface CheckSubmission {
|
|
1043
1517
|
chapter: number;
|
|
1044
|
-
/** The
|
|
1518
|
+
/** The five P6 semantic items; omission is a failed check, never a pass. */
|
|
1045
1519
|
semantic: SemanticItem[];
|
|
1046
1520
|
scope?: string[];
|
|
1047
1521
|
root?: string;
|
|
@@ -1067,7 +1541,7 @@ interface RollbackSubmission {
|
|
|
1067
1541
|
root?: string;
|
|
1068
1542
|
}
|
|
1069
1543
|
interface DiffInput {
|
|
1070
|
-
chapter
|
|
1544
|
+
chapter?: number;
|
|
1071
1545
|
before?: string;
|
|
1072
1546
|
after?: string;
|
|
1073
1547
|
root?: string;
|
|
@@ -1084,6 +1558,10 @@ interface ExportInput {
|
|
|
1084
1558
|
interface StateQueryInput {
|
|
1085
1559
|
kind: DocKind | 'novel' | 'planWorld' | 'planChapter';
|
|
1086
1560
|
chapter?: number;
|
|
1561
|
+
/** Chapter index defaults to a compact read; opt in to the full summaries. */
|
|
1562
|
+
include_summary?: boolean;
|
|
1563
|
+
/** Inclusive chapter range for the `chapters` index. */
|
|
1564
|
+
chapter_range?: [number, number];
|
|
1087
1565
|
root?: string;
|
|
1088
1566
|
}
|
|
1089
1567
|
interface WordCountInput {
|
|
@@ -1091,6 +1569,43 @@ interface WordCountInput {
|
|
|
1091
1569
|
chapter?: number;
|
|
1092
1570
|
root?: string;
|
|
1093
1571
|
}
|
|
1572
|
+
interface BookPlanSubmission extends BookPatch {
|
|
1573
|
+
volumes?: VolumeInput[];
|
|
1574
|
+
root?: string;
|
|
1575
|
+
}
|
|
1576
|
+
interface OutlineSubmission extends OutlineInput {
|
|
1577
|
+
root?: string;
|
|
1578
|
+
}
|
|
1579
|
+
interface OutlineImportSubmission {
|
|
1580
|
+
format: 'markdown' | 'yaml' | 'json';
|
|
1581
|
+
content: string;
|
|
1582
|
+
dry_run?: boolean;
|
|
1583
|
+
root?: string;
|
|
1584
|
+
}
|
|
1585
|
+
interface WorldbookSubmission extends WorldbookPatch {
|
|
1586
|
+
root?: string;
|
|
1587
|
+
}
|
|
1588
|
+
interface ReopenSubmission {
|
|
1589
|
+
chapter: number;
|
|
1590
|
+
/** A reopen is a history-changing maintenance action; the reason is mandatory. */
|
|
1591
|
+
reason: string;
|
|
1592
|
+
root?: string;
|
|
1593
|
+
}
|
|
1594
|
+
interface SearchInput {
|
|
1595
|
+
query: string;
|
|
1596
|
+
scope?: 'all' | 'chapters' | 'summaries' | 'outline' | 'worldbook' | 'ledgers';
|
|
1597
|
+
limit?: number;
|
|
1598
|
+
root?: string;
|
|
1599
|
+
}
|
|
1600
|
+
interface DoctorInput {
|
|
1601
|
+
root?: string;
|
|
1602
|
+
}
|
|
1603
|
+
interface ReportSubmission {
|
|
1604
|
+
root?: string;
|
|
1605
|
+
}
|
|
1606
|
+
interface GuideInput {
|
|
1607
|
+
root?: string;
|
|
1608
|
+
}
|
|
1094
1609
|
/**
|
|
1095
1610
|
* The single write authority. Tools, commands, the panel and task books never
|
|
1096
1611
|
* touch a file; every mutation is one of these operations.
|
|
@@ -1100,6 +1615,8 @@ declare class EngineService {
|
|
|
1100
1615
|
private readonly stores;
|
|
1101
1616
|
private readonly mutex;
|
|
1102
1617
|
private readonly replay;
|
|
1618
|
+
/** Status, panel and gates ask for the same stage context repeatedly. */
|
|
1619
|
+
private readonly briefContextCache;
|
|
1103
1620
|
private readonly briefs;
|
|
1104
1621
|
private readonly now;
|
|
1105
1622
|
/** The project this process last touched; the panel follows it without a workspace hint. */
|
|
@@ -1139,6 +1656,45 @@ declare class EngineService {
|
|
|
1139
1656
|
chapter: number;
|
|
1140
1657
|
stage: Stage;
|
|
1141
1658
|
}>>;
|
|
1659
|
+
submitBookPlan(input: BookPlanSubmission): Promise<OpResult<{
|
|
1660
|
+
premise: string;
|
|
1661
|
+
logline: string;
|
|
1662
|
+
strict: boolean;
|
|
1663
|
+
volumes: number;
|
|
1664
|
+
chapters: number;
|
|
1665
|
+
}>>;
|
|
1666
|
+
submitOutline(input: OutlineSubmission): Promise<OpResult<{
|
|
1667
|
+
planned: number;
|
|
1668
|
+
archived: number;
|
|
1669
|
+
total: number;
|
|
1670
|
+
strict: boolean;
|
|
1671
|
+
volumes: number;
|
|
1672
|
+
}>>;
|
|
1673
|
+
importOutline(input: OutlineImportSubmission): Promise<OpResult<{
|
|
1674
|
+
format: string;
|
|
1675
|
+
planned: number;
|
|
1676
|
+
archived: number;
|
|
1677
|
+
total: number;
|
|
1678
|
+
warnings: string[];
|
|
1679
|
+
preview: string;
|
|
1680
|
+
applied: boolean;
|
|
1681
|
+
}>>;
|
|
1682
|
+
submitWorldbook(input: WorldbookSubmission): Promise<OpResult<{
|
|
1683
|
+
sections: string[];
|
|
1684
|
+
entries: number;
|
|
1685
|
+
counts: Record<string, number>;
|
|
1686
|
+
}>>;
|
|
1687
|
+
reopenChapter(input: ReopenSubmission): Promise<OpResult<{
|
|
1688
|
+
chapter: number;
|
|
1689
|
+
stage: Stage;
|
|
1690
|
+
restore_txid: string;
|
|
1691
|
+
}>>;
|
|
1692
|
+
/**
|
|
1693
|
+
* Read-only paths must surface a committed-journal mismatch. The write path
|
|
1694
|
+
* already fails closed; without this, status recommends the next write and
|
|
1695
|
+
* the model only learns about the mismatch when that write aborts.
|
|
1696
|
+
*/
|
|
1697
|
+
private journalBlocking;
|
|
1142
1698
|
getStatus(input?: StatusInput): Promise<OpResult<StatusReport>>;
|
|
1143
1699
|
countWords(input?: WordCountInput): Promise<OpResult<WordMetrics>>;
|
|
1144
1700
|
queryState(input: StateQueryInput): Promise<OpResult<unknown>>;
|
|
@@ -1153,6 +1709,11 @@ declare class EngineService {
|
|
|
1153
1709
|
blocking: BlockingItem[];
|
|
1154
1710
|
state_errors: StateError[];
|
|
1155
1711
|
}>>;
|
|
1712
|
+
search(input: SearchInput): Promise<OpResult<SearchReport>>;
|
|
1713
|
+
doctor(input?: DoctorInput): Promise<OpResult<DoctorReport>>;
|
|
1714
|
+
private recoveryForSafe;
|
|
1715
|
+
report(input?: ReportSubmission): Promise<OpResult<BookReport>>;
|
|
1716
|
+
guide(input?: GuideInput): Promise<OpResult<GuideReport>>;
|
|
1156
1717
|
getBrief(input: BriefInput): Promise<OpResult<{
|
|
1157
1718
|
stage: string;
|
|
1158
1719
|
chapter: number;
|
|
@@ -1245,6 +1806,12 @@ declare class EngineService {
|
|
|
1245
1806
|
averageScore: number;
|
|
1246
1807
|
lastScore: number;
|
|
1247
1808
|
openForeshadows: number;
|
|
1809
|
+
plannedChapters: number;
|
|
1810
|
+
outlineCoverage: number;
|
|
1811
|
+
blueprintReady: boolean;
|
|
1812
|
+
worldbookEntries: number;
|
|
1813
|
+
strictOutline: boolean;
|
|
1814
|
+
targetChapters: number | null;
|
|
1248
1815
|
}>;
|
|
1249
1816
|
private registry;
|
|
1250
1817
|
/** List known projects (convenience only; a project opens without a row). */
|
|
@@ -1286,12 +1853,62 @@ declare class EngineService {
|
|
|
1286
1853
|
preview: string;
|
|
1287
1854
|
applied: boolean;
|
|
1288
1855
|
}>>;
|
|
1856
|
+
/**
|
|
1857
|
+
* Planning writes use project targets as invariants. The fallback project is
|
|
1858
|
+
* only for reads; writing against its null target (or default word range)
|
|
1859
|
+
* would create a document the real novel.yaml rejects after repair.
|
|
1860
|
+
*/
|
|
1861
|
+
private assertProjectReadable;
|
|
1862
|
+
/**
|
|
1863
|
+
* Planning documents are read-only inputs to the write tools. A corrupt file
|
|
1864
|
+
* must be repaired explicitly with novel_amend; allowing a normal write to
|
|
1865
|
+
* proceed would silently replace every planned card or worldbook section it
|
|
1866
|
+
* could not read.
|
|
1867
|
+
*/
|
|
1868
|
+
private assertPlanningDocumentReadable;
|
|
1869
|
+
/**
|
|
1870
|
+
* A strict outline cannot silently lose the active chapter's card while the
|
|
1871
|
+
* chapter is still being written. Otherwise a late replacement turns a
|
|
1872
|
+
* strict project non-strict in effect and archive would auto-create the card
|
|
1873
|
+
* the author was required to provide.
|
|
1874
|
+
*/
|
|
1875
|
+
private assertActiveCardPreserved;
|
|
1876
|
+
/**
|
|
1877
|
+
* The outline is a derived progress view and the PG-13 input. Every write
|
|
1878
|
+
* path must stage a document the loader will accept; otherwise a successful
|
|
1879
|
+
* archive/planning call can leave the project with an unreadable outline and
|
|
1880
|
+
* an unreachable repair path. Auto-created cards are normalized by book.ts;
|
|
1881
|
+
* this is the final fail-closed boundary for all callers.
|
|
1882
|
+
*/
|
|
1883
|
+
private assertOutlineWritable;
|
|
1884
|
+
/**
|
|
1885
|
+
* total_chapters is a hard ceiling everywhere: outline cards already enforce
|
|
1886
|
+
* it, and writing/archiving a chapter past it would make the auto-created
|
|
1887
|
+
* archived card invalid. Fail at the first stage instead of after the draft.
|
|
1888
|
+
*/
|
|
1889
|
+
private assertChapterWithinTarget;
|
|
1890
|
+
/**
|
|
1891
|
+
* Without the chapter index, normalizeOutlineChapters cannot re-add archived
|
|
1892
|
+
* cards and cannot prove that a replacement did not delete them. Planning
|
|
1893
|
+
* writes must wait for a chapters repair; only novel_amend may repair it.
|
|
1894
|
+
*/
|
|
1895
|
+
private assertArchiveIndexReadable;
|
|
1896
|
+
private bookStatus;
|
|
1289
1897
|
private panelSnapshot;
|
|
1898
|
+
/**
|
|
1899
|
+
* The archive stage has only one legal operation, so a status/panel that
|
|
1900
|
+
* recommends it without checking the same gates as the archive creates a
|
|
1901
|
+
* loop. Evaluate the real archive gates through `gateInput`, then add the
|
|
1902
|
+
* machine pass and semantic evidence that archive re-checks separately.
|
|
1903
|
+
*/
|
|
1904
|
+
private archivePreflight;
|
|
1290
1905
|
private nextStep;
|
|
1291
1906
|
/** A computed blocker for the retry budget the next operation would consume. */
|
|
1292
1907
|
private roundsLimitBlock;
|
|
1293
1908
|
/** Pipeline blockers plus budget exhaustion, so status/panel cannot say "all clear". */
|
|
1294
1909
|
private effectiveBlocking;
|
|
1910
|
+
/** The PG-13 block that status must show before P2/P3 even tries to write. */
|
|
1911
|
+
private outlineGateBlock;
|
|
1295
1912
|
/**
|
|
1296
1913
|
* A review that exists but cannot be tied to the pipeline digest would let a
|
|
1297
1914
|
* hand-edited review pass archive. Archive already fails closed; status and
|
|
@@ -1312,16 +1929,40 @@ declare class EngineService {
|
|
|
1312
1929
|
private nextArgs;
|
|
1313
1930
|
private metricsFor;
|
|
1314
1931
|
private readChapter;
|
|
1932
|
+
/**
|
|
1933
|
+
* archive-digests.json is a derived mirror, not a source of truth. A damaged
|
|
1934
|
+
* mirror must never make every write unreachable; rebuild the missing rows
|
|
1935
|
+
* from the chapter index and let the next archive rewrite a valid file.
|
|
1936
|
+
*/
|
|
1937
|
+
private readArchiveDigests;
|
|
1315
1938
|
private latestBackup;
|
|
1939
|
+
/**
|
|
1940
|
+
* A manuscript export with an unreadable chapter index cannot prove which
|
|
1941
|
+
* chapters exist. Refusing is preferable to writing a short book that looks
|
|
1942
|
+
* complete; the repair path is novel_amend, not a silent partial export.
|
|
1943
|
+
*/
|
|
1944
|
+
private assertExportIndexReadable;
|
|
1316
1945
|
private chaptersForExport;
|
|
1317
1946
|
private machine;
|
|
1318
1947
|
private briefContextFor;
|
|
1319
1948
|
private briefDigest;
|
|
1320
1949
|
private briefVariables;
|
|
1950
|
+
/**
|
|
1951
|
+
* The one place a gate input is assembled. Archive preflight evaluates the
|
|
1952
|
+
* same object as the real archive, so a gate cannot pass preflight and then
|
|
1953
|
+
* fail the write (the old PG-06/scope holes did exactly that).
|
|
1954
|
+
*/
|
|
1955
|
+
private gateInput;
|
|
1321
1956
|
private assertGates;
|
|
1322
1957
|
private assertChapterParameter;
|
|
1323
1958
|
private assertChapter;
|
|
1959
|
+
/** True when anything survives in the project directory besides novel.yaml. */
|
|
1960
|
+
private projectStateExists;
|
|
1961
|
+
/** A live writer lock makes a read-only snapshot potentially torn. */
|
|
1962
|
+
private lockIsLive;
|
|
1324
1963
|
private load;
|
|
1964
|
+
/** A repair may bypass the journal hash only when the document is unreadable. */
|
|
1965
|
+
private stateDocIsUnreadable;
|
|
1325
1966
|
/** Read a review/check without letting one corrupt file wedge every read. */
|
|
1326
1967
|
private recoverableDoc;
|
|
1327
1968
|
private mutate;
|
|
@@ -1346,6 +1987,8 @@ declare function renderPlainText(project: NovelProject, chapters: readonly Expor
|
|
|
1346
1987
|
declare function renderBlurb(project: NovelProject): string;
|
|
1347
1988
|
/** Cover as a standalone SVG string; text is escaped, palette is theme-neutral. */
|
|
1348
1989
|
declare function renderCover(project: NovelProject): string;
|
|
1990
|
+
/** A book-level proposal for editors, platforms and the author's own pitch. */
|
|
1991
|
+
declare function renderProposal(project: NovelProject, outline: OutlineDocument, worldbook: WorldbookDocument, chapters: readonly ChapterRecord[]): string;
|
|
1349
1992
|
/** XHTML chapter document for the EPUB package. */
|
|
1350
1993
|
declare function renderEpubChapter(chapter: ExportChapter): string;
|
|
1351
1994
|
declare const name = "dsh-novel-write-engine";
|
|
@@ -1370,4 +2013,4 @@ declare const Config: Schema<Config>;
|
|
|
1370
2013
|
* created lazily per project root.
|
|
1371
2014
|
*/
|
|
1372
2015
|
declare function apply(ctx: Context, config: Config): void;
|
|
1373
|
-
export { AdviceReport, ArchiveHandoff, AuditRow, BlockingItem, BriefDocument, BriefLibrary, BriefStage, ChapterPlanInput, ChapterRecord, ChapterStatusRow, ChapterSummary, ChaptersDocument, CharacterDelta, CharactersDocument, CheckDocument, Config, Deduction, DeltaAction, DiffReport, DraftInput, ERROR_CODES, EngineBlockedError, EngineError, EngineFaultError, EngineInputError, EngineService, ErrorCode, ExportChapter, ExportKind, ForeshadowDelta, ForeshadowsDocument, GENRES, GateInput, GateOptions, GateResult, Genre, HandoffDocument, LocksDocument, MachineMetrics, NovelProject, OPERATIONS, OpResult, Operation, PLATFORMS, PanelChapterRow, PanelChaptersDto, PanelDraft, PanelGatesDto, PanelSnapshot, PanelSummaryDto, PipelineState, Platform, ReadingProof, ReadingProofReference, RelationshipDelta, RelationshipsDocument, ReviewDocument, ReviewInput, ReviewIssue, RevisionInput, RoundCounters, SCENE_TYPES, SCHEMA_VERSION, SceneType, ScoreDimension, SemanticItem, Severity, Stage, StateDelta, StateError, StatusReport, TimelineDelta, TimelineDocument, Violation, Warning, WordMetrics, WorldDelta, WorldDocument, WorldPlanInput, applicableGates, apply, blockedError, briefStageFor, chapterHeading, evaluateGates, faultError, gateName, inject, inputError, loadRulepack, name, parseParagraphLocation, phaseStrip, projectChapter, projectChapters, projectGates, projectSummary, renderBlurb, renderCover, renderEpubChapter, renderMarkdown, renderPlainText, verifyReference };
|
|
2016
|
+
export { AdviceReport, ArchiveHandoff, AuditRow, BlockingItem, BookPlan, BookReport, BriefDocument, BriefLibrary, BriefStage, ChapterCastMember, ChapterPlanInput, ChapterRecord, ChapterStatusRow, ChapterSummary, ChaptersDocument, CharacterDelta, CharactersDocument, CheckDocument, Config, Deduction, DeltaAction, DiffReport, DoctorCheck, DoctorReport, DraftInput, ERROR_CODES, EngineBlockedError, EngineError, EngineFaultError, EngineInputError, EngineService, ErrorCode, ExportChapter, ExportKind, ForeshadowDelta, ForeshadowsDocument, GENRES, GateInput, GateOptions, GateResult, Genre, GuideReport, GuideStep, HandoffDocument, LocksDocument, MachineMetrics, NovelProject, OPERATIONS, OpResult, Operation, OutlineChapter, OutlineDocument, OutlineVolume, PLATFORMS, PanelBook, PanelChapterRow, PanelChaptersDto, PanelDraft, PanelGatesDto, PanelSnapshot, PanelSummaryDto, PipelineState, Platform, ReadingProof, ReadingProofReference, RelationshipDelta, RelationshipsDocument, ReviewDocument, ReviewInput, ReviewIssue, RevisionInput, RoundCounters, SCENE_TYPES, SCHEMA_VERSION, SceneType, ScoreDimension, SearchReport, SearchResultItem, SemanticItem, Severity, Stage, StateDelta, StateError, StateErrorCode, StatusReport, TimelineDelta, TimelineDocument, Violation, Warning, WordMetrics, WorldDelta, WorldDocument, WorldPlanInput, WorldbookBackstory, WorldbookCharacter, WorldbookDocument, WorldbookFaction, WorldbookGlossary, WorldbookLocation, WorldbookRule, applicableGates, apply, blockedError, briefStageFor, chapterHeading, evaluateGates, faultError, gateName, inject, inputError, loadRulepack, name, parseParagraphLocation, phaseStrip, projectChapter, projectChapters, projectGates, projectSummary, renderBlurb, renderCover, renderEpubChapter, renderMarkdown, renderPlainText, renderProposal, verifyReference };
|