dsh-novel-write-engine 0.1.1 → 0.1.2
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 +17 -0
- package/README.md +42 -29
- package/briefs/P1.md +6 -4
- package/briefs/P4.md +3 -0
- package/briefs/P5.md +4 -3
- package/briefs/P6.md +6 -0
- package/lib/index.d.ts +29 -1
- package/lib/index.js +563 -34
- package/lib/types/types.d.ts +11 -0
- package/package.json +17 -18
package/lib/types/types.d.ts
CHANGED
|
@@ -171,6 +171,12 @@ export interface CheckDocument {
|
|
|
171
171
|
};
|
|
172
172
|
verdict: 'pass' | 'fail';
|
|
173
173
|
}
|
|
174
|
+
/** A state document that exists but cannot be read safely. */
|
|
175
|
+
export interface StateError {
|
|
176
|
+
path: string;
|
|
177
|
+
code: 'PLAN_UNREADABLE' | 'REVIEW_UNREADABLE' | 'CHECK_UNREADABLE';
|
|
178
|
+
message: string;
|
|
179
|
+
}
|
|
174
180
|
/** Word statistics with the single engine-wide counting rule. */
|
|
175
181
|
export interface WordMetrics {
|
|
176
182
|
total_word_count: number;
|
|
@@ -557,6 +563,8 @@ export interface GateInput {
|
|
|
557
563
|
summaryProvided?: boolean;
|
|
558
564
|
review: ReviewDocument | null;
|
|
559
565
|
check: CheckDocument | null;
|
|
566
|
+
/** When set, result-bearing gates run only the named check scopes. */
|
|
567
|
+
scope?: string[];
|
|
560
568
|
semantic: SemanticItem[];
|
|
561
569
|
proof: ReadingProof | null;
|
|
562
570
|
rounds: RoundCounters;
|
|
@@ -608,6 +616,8 @@ export interface StatusReport {
|
|
|
608
616
|
stage: Stage;
|
|
609
617
|
rounds: RoundCounters;
|
|
610
618
|
blocking: BlockingItem[];
|
|
619
|
+
/** plan/review/check files that exist but cannot be read safely. */
|
|
620
|
+
state_errors: StateError[];
|
|
611
621
|
metrics: WordMetrics | null;
|
|
612
622
|
next: {
|
|
613
623
|
tool: string;
|
|
@@ -623,6 +633,7 @@ export interface AdviceReport {
|
|
|
623
633
|
args: Record<string, unknown>;
|
|
624
634
|
reason: string;
|
|
625
635
|
blocking: BlockingItem[];
|
|
636
|
+
state_errors: StateError[];
|
|
626
637
|
}
|
|
627
638
|
/** One history row derived from the journal. */
|
|
628
639
|
export interface AuditRow {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-novel-write-engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
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,7 +18,6 @@
|
|
|
18
18
|
},
|
|
19
19
|
"type": "module",
|
|
20
20
|
"license": "MIT",
|
|
21
|
-
"packageManager": "pnpm@11.28.9",
|
|
22
21
|
"main": "./lib/index.js",
|
|
23
22
|
"types": "./lib/index.d.ts",
|
|
24
23
|
"exports": {
|
|
@@ -71,21 +70,6 @@
|
|
|
71
70
|
"node": ">=24.9.0",
|
|
72
71
|
"dsh": ">=0.2.1-rc.2 <0.3.0-0"
|
|
73
72
|
},
|
|
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:hygiene": "node scripts/check-hygiene.mjs"
|
|
88
|
-
},
|
|
89
73
|
"dependencies": {
|
|
90
74
|
"yaml": "^2.6.0"
|
|
91
75
|
},
|
|
@@ -133,5 +117,20 @@
|
|
|
133
117
|
"typescript": "^5.6.0",
|
|
134
118
|
"typescript-eslint": "^8.15.0",
|
|
135
119
|
"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"
|
|
136
135
|
}
|
|
137
|
-
}
|
|
136
|
+
}
|