dsh-novel-write-engine 0.2.6 → 0.2.8

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.
@@ -11,6 +11,23 @@ export interface BlockingDto {
11
11
  detail: string;
12
12
  hint?: string;
13
13
  }
14
+ /** Chapter-boundary projection; absent on older payloads. */
15
+ export interface ProgressDto {
16
+ active_chapter: number;
17
+ stage: string;
18
+ current: {
19
+ chapter: number;
20
+ stage: string;
21
+ } | null;
22
+ last_archived: number | null;
23
+ next: {
24
+ chapter: number;
25
+ stage: 'P1';
26
+ } | null;
27
+ finished: boolean;
28
+ label: string;
29
+ resume: string;
30
+ }
14
31
  export interface SummaryDto {
15
32
  schemaVersion: number;
16
33
  panelId: string;
@@ -21,8 +38,11 @@ export interface SummaryDto {
21
38
  platform: string;
22
39
  chapter: number;
23
40
  stage: string;
41
+ progress?: ProgressDto;
24
42
  revision: number;
25
43
  totalWords: number;
44
+ archivedWords?: number;
45
+ draftWords?: number;
26
46
  totalChapters: number;
27
47
  /** Book-wide archived average; absent on older payloads. */
28
48
  averageScore?: number;
@@ -82,6 +82,8 @@ export interface PanelView {
82
82
  stats: {
83
83
  chapters: number;
84
84
  words: number;
85
+ archivedWords?: number;
86
+ draftWords?: number;
85
87
  averageScore: number;
86
88
  blocking: number;
87
89
  };
@@ -301,8 +301,8 @@ export interface CharacterDelta {
301
301
  role?: string;
302
302
  profile?: Record<string, unknown>;
303
303
  current_state?: Record<string, unknown>;
304
+ /** Chapter is engine-assigned from the archive transaction, not caller-supplied. */
304
305
  growth?: {
305
- chapter: number;
306
306
  change: string;
307
307
  status_change: string;
308
308
  };
@@ -972,6 +972,8 @@ export interface GateInput {
972
972
  briefStage: BriefStage | null;
973
973
  draftTitle: string | null;
974
974
  sceneType: SceneType | null;
975
+ /** The submitted/active plan narrator; PG-05 uses it before a draft exists. */
976
+ narrator?: string | null;
975
977
  summary: ChapterSummary | null;
976
978
  /** P5 may omit `summary`; when omitted, the previous plan summary is reused. */
977
979
  summaryProvided?: boolean;
@@ -1034,6 +1036,36 @@ export interface Selection {
1034
1036
  title?: string;
1035
1037
  created_at?: string;
1036
1038
  }
1039
+ /**
1040
+ * One human-readable projection of the pipeline's chapter boundary.
1041
+ *
1042
+ * `pipeline.chapter`/`stage` are protocol values: after archiving chapter N the
1043
+ * pipeline points at N+1 and still says `done` because `done` describes the
1044
+ * chapter that was just archived. This projection is the only place that turns
1045
+ * those values into "chapter N archived; chapter N+1 starts at P1".
1046
+ */
1047
+ export interface ChapterProgress {
1048
+ active_chapter: number;
1049
+ stage: Stage;
1050
+ /** The chapter currently being written; null while `stage === 'done'`. */
1051
+ current: {
1052
+ chapter: number;
1053
+ stage: Stage;
1054
+ } | null;
1055
+ /** Highest archived chapter, or null before the first archive. */
1056
+ last_archived: number | null;
1057
+ /** Next chapter to start at P1; null while writing or after the book is finished. */
1058
+ next: {
1059
+ chapter: number;
1060
+ stage: 'P1';
1061
+ } | null;
1062
+ /** True only when the configured target has been reached at `stage === 'done'`. */
1063
+ finished: boolean;
1064
+ /** One line for status cards, commands and the panel. */
1065
+ label: string;
1066
+ /** Sentence used by the resume prompt instead of "当前第 N 章,阶段 done". */
1067
+ resume: string;
1068
+ }
1037
1069
  /** The `getStatus` payload. */
1038
1070
  export interface StatusReport {
1039
1071
  project: {
@@ -1054,6 +1086,8 @@ export interface StatusReport {
1054
1086
  /** SHA-256 of the active manuscript, or null when the stage has no draft. */
1055
1087
  manuscript_hash: string | null;
1056
1088
  stage: Stage;
1089
+ /** Chapter-boundary projection shared by every human-readable surface. */
1090
+ progress?: ChapterProgress;
1057
1091
  rounds: RoundCounters;
1058
1092
  blocking: BlockingItem[];
1059
1093
  /** Non-blocking recovery notes, e.g. a recoverable pending transaction. */
@@ -1106,6 +1140,8 @@ export interface StatusReport {
1106
1140
  export interface AdviceReport {
1107
1141
  stage: Stage;
1108
1142
  chapter: number;
1143
+ /** Same chapter-boundary projection as getStatus. */
1144
+ progress?: ChapterProgress;
1109
1145
  tool: string;
1110
1146
  args: Record<string, unknown>;
1111
1147
  reason: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-novel-write-engine",
3
- "version": "0.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "Novel writing engine for DeepSeek Harness: state machine, gates, rulepacks and ledgers moved from prompts into code.",
5
5
  "keywords": [
6
6
  "dsh-plugin",