dsh-novel-write-engine 0.1.2 → 0.1.3

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.
@@ -21,6 +21,12 @@ export interface SummaryDto {
21
21
  revision: number;
22
22
  totalWords: number;
23
23
  totalChapters: number;
24
+ /** Book-wide archived average; absent on older payloads. */
25
+ averageScore?: number;
26
+ volume?: number;
27
+ volume_name?: string;
28
+ act?: string;
29
+ act_progress?: string;
24
30
  phases: PhaseDto[];
25
31
  blocking: BlockingDto[];
26
32
  next?: {
@@ -5,6 +5,8 @@ export declare const PANEL_ID = "novel-workshop";
5
5
  export declare const PANEL_ROUTE = "/api/novel-write-engine/panel";
6
6
  export declare const SKILL_NAME = "novel-write-engine";
7
7
  export declare const REMOTE_VERSION = 1;
8
+ /** The panel is a recent-history view; the wire payload and UI use one cap. */
9
+ export declare const PANEL_CHAPTER_LIMIT = 30;
8
10
  /** Project-relative locations. Every write goes through these constants. */
9
11
  export declare const PROJECT_FILE = "novel.yaml";
10
12
  export declare const STATE_DIR = "state";
@@ -49,6 +51,12 @@ export declare const LIMITS: {
49
51
  lockWaitMs: number;
50
52
  /** Reading proofs shorter than this cannot be verified. */
51
53
  minQuoteChars: number;
54
+ /** World-plan text fields are protected context, so they need a hard bound. */
55
+ maxWorldPlanItems: number;
56
+ maxWorldPlanTextChars: number;
57
+ maxWorldPlanObjectiveChars: number;
58
+ /** Cast plus summary may exceed eight, but not without a bound. */
59
+ maxActiveCast: number;
52
60
  };
53
61
  /** Re-exported enums make adapter code readable without importing types twice. */
54
62
  export declare const SCENE_TYPE_DEFAULT: SceneType;
@@ -171,10 +171,12 @@ export interface CheckDocument {
171
171
  };
172
172
  verdict: 'pass' | 'fail';
173
173
  }
174
+ /** Every persisted document whose damage status/panel can report. */
175
+ export 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';
174
176
  /** A state document that exists but cannot be read safely. */
175
177
  export interface StateError {
176
178
  path: string;
177
- code: 'PLAN_UNREADABLE' | 'REVIEW_UNREADABLE' | 'CHECK_UNREADABLE';
179
+ code: StateErrorCode;
178
180
  message: string;
179
181
  }
180
182
  /** Word statistics with the single engine-wide counting rule. */
@@ -503,6 +505,14 @@ export interface WorldPlanInput {
503
505
  }>;
504
506
  continuity_notes: string[];
505
507
  }
508
+ /** A character the chapter plan puts on stage; no new persisted schema. */
509
+ export interface ChapterCastMember {
510
+ name: string;
511
+ entry_state?: string;
512
+ goal?: string;
513
+ knowledge?: string[];
514
+ exit_change?: string;
515
+ }
506
516
  /** Chapter plan (`plans/chNNN.chapter.yaml`). */
507
517
  export interface ChapterPlanInput {
508
518
  chapter: number;
@@ -513,6 +523,8 @@ export interface ChapterPlanInput {
513
523
  opening: string;
514
524
  ending: string;
515
525
  target_words: [number, number];
526
+ /** Optional in 0.1.3: older plans remain readable; new plans may name 1–8 actors. */
527
+ cast?: ChapterCastMember[];
516
528
  }
517
529
  /** Draft submission payload. */
518
530
  export interface DraftInput {
@@ -616,9 +628,14 @@ export interface StatusReport {
616
628
  stage: Stage;
617
629
  rounds: RoundCounters;
618
630
  blocking: BlockingItem[];
619
- /** plan/review/check files that exist but cannot be read safely. */
631
+ /** plan/review/check/ledger files that exist but cannot be read safely. */
620
632
  state_errors: StateError[];
621
633
  metrics: WordMetrics | null;
634
+ /** Inherited handoff labels; absent before the first archive. */
635
+ volume?: number;
636
+ volume_name?: string;
637
+ act?: string;
638
+ act_progress?: string;
622
639
  next: {
623
640
  tool: string;
624
641
  args: Record<string, unknown>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-novel-write-engine",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
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",
@@ -18,6 +18,7 @@
18
18
  },
19
19
  "type": "module",
20
20
  "license": "MIT",
21
+ "packageManager": "pnpm@11.28.9",
21
22
  "main": "./lib/index.js",
22
23
  "types": "./lib/index.d.ts",
23
24
  "exports": {
@@ -70,6 +71,22 @@
70
71
  "node": ">=24.9.0",
71
72
  "dsh": ">=0.2.1-rc.2 <0.3.0-0"
72
73
  },
74
+ "scripts": {
75
+ "build": "tsdown && tsdown -c tsdown.client.config.ts && tsc -p tsconfig.client.json",
76
+ "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit",
77
+ "lint": "eslint . && prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.mjs\"",
78
+ "test": "vitest run",
79
+ "test:coverage": "vitest run --coverage && node scripts/check-coverage.mjs",
80
+ "test:isolated": "node scripts/check-isolated.mjs",
81
+ "validate:rulepack": "node scripts/validate-rulepack.mjs",
82
+ "check:preset": "node scripts/check-preset.mjs",
83
+ "check:pack": "node scripts/check-pack.mjs",
84
+ "check:artifacts": "node scripts/check-artifacts.mjs",
85
+ "check:install": "node scripts/check-install.mjs",
86
+ "check:host": "node scripts/check-host.mjs",
87
+ "check:crash": "node scripts/check-crash.mjs",
88
+ "check:hygiene": "node scripts/check-hygiene.mjs"
89
+ },
73
90
  "dependencies": {
74
91
  "yaml": "^2.6.0"
75
92
  },
@@ -117,20 +134,5 @@
117
134
  "typescript": "^5.6.0",
118
135
  "typescript-eslint": "^8.15.0",
119
136
  "vitest": "^3.0.0"
120
- },
121
- "scripts": {
122
- "build": "tsdown && tsdown -c tsdown.client.config.ts && tsc -p tsconfig.client.json",
123
- "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.client.json --noEmit",
124
- "lint": "eslint . && prettier --check \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.mjs\"",
125
- "test": "vitest run",
126
- "test:coverage": "vitest run --coverage && node scripts/check-coverage.mjs",
127
- "test:isolated": "node scripts/check-isolated.mjs",
128
- "validate:rulepack": "node scripts/validate-rulepack.mjs",
129
- "check:preset": "node scripts/check-preset.mjs",
130
- "check:pack": "node scripts/check-pack.mjs",
131
- "check:artifacts": "node scripts/check-artifacts.mjs",
132
- "check:install": "node scripts/check-install.mjs",
133
- "check:host": "node scripts/check-host.mjs",
134
- "check:hygiene": "node scripts/check-hygiene.mjs"
135
137
  }
136
- }
138
+ }