dsh-novel-write-engine 0.1.0 → 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 +39 -0
- package/README.md +60 -40
- package/briefs/P1.md +6 -4
- package/briefs/P4.md +4 -1
- package/briefs/P5.md +5 -4
- package/briefs/P6.md +8 -2
- package/lib/index.d.ts +50 -3
- package/lib/index.js +968 -214
- package/lib/types/types.d.ts +16 -0
- package/package.json +18 -18
- package/skills/entry.md +1 -1
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;
|
|
@@ -333,6 +339,8 @@ export interface PipelineState {
|
|
|
333
339
|
digest: string;
|
|
334
340
|
}>;
|
|
335
341
|
blocking: BlockingItem[];
|
|
342
|
+
/** Hash of the review document last written by submitReview/submitRevision. */
|
|
343
|
+
review_digest?: string;
|
|
336
344
|
last_action: {
|
|
337
345
|
op: string;
|
|
338
346
|
at: string;
|
|
@@ -555,6 +563,8 @@ export interface GateInput {
|
|
|
555
563
|
summaryProvided?: boolean;
|
|
556
564
|
review: ReviewDocument | null;
|
|
557
565
|
check: CheckDocument | null;
|
|
566
|
+
/** When set, result-bearing gates run only the named check scopes. */
|
|
567
|
+
scope?: string[];
|
|
558
568
|
semantic: SemanticItem[];
|
|
559
569
|
proof: ReadingProof | null;
|
|
560
570
|
rounds: RoundCounters;
|
|
@@ -599,10 +609,15 @@ export interface StatusReport {
|
|
|
599
609
|
platform: Platform;
|
|
600
610
|
root: string;
|
|
601
611
|
};
|
|
612
|
+
/** The chapter requested for metrics; may be historical. */
|
|
602
613
|
chapter: number;
|
|
614
|
+
/** The chapter the pipeline is currently working on. */
|
|
615
|
+
active_chapter: number;
|
|
603
616
|
stage: Stage;
|
|
604
617
|
rounds: RoundCounters;
|
|
605
618
|
blocking: BlockingItem[];
|
|
619
|
+
/** plan/review/check files that exist but cannot be read safely. */
|
|
620
|
+
state_errors: StateError[];
|
|
606
621
|
metrics: WordMetrics | null;
|
|
607
622
|
next: {
|
|
608
623
|
tool: string;
|
|
@@ -618,6 +633,7 @@ export interface AdviceReport {
|
|
|
618
633
|
args: Record<string, unknown>;
|
|
619
634
|
reason: string;
|
|
620
635
|
blocking: BlockingItem[];
|
|
636
|
+
state_errors: StateError[];
|
|
621
637
|
}
|
|
622
638
|
/** One history row derived from the journal. */
|
|
623
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": {
|
|
@@ -69,21 +68,7 @@
|
|
|
69
68
|
},
|
|
70
69
|
"engines": {
|
|
71
70
|
"node": ">=24.9.0",
|
|
72
|
-
"dsh": ">=0.2.1-rc.2 <0.3.0"
|
|
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:hygiene": "node scripts/check-hygiene.mjs"
|
|
71
|
+
"dsh": ">=0.2.1-rc.2 <0.3.0-0"
|
|
87
72
|
},
|
|
88
73
|
"dependencies": {
|
|
89
74
|
"yaml": "^2.6.0"
|
|
@@ -132,5 +117,20 @@
|
|
|
132
117
|
"typescript": "^5.6.0",
|
|
133
118
|
"typescript-eslint": "^8.15.0",
|
|
134
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"
|
|
135
135
|
}
|
|
136
|
-
}
|
|
136
|
+
}
|
package/skills/entry.md
CHANGED
|
@@ -29,7 +29,7 @@ description: 引擎版小说创作流程——状态、门控、字数与写盘
|
|
|
29
29
|
| ready_to_archive | `novel_brief P8` | `novel_archive` |
|
|
30
30
|
| done | — | 下一章从 P1 开始 |
|
|
31
31
|
|
|
32
|
-
拿不准就走 `novel_pipeline
|
|
32
|
+
拿不准就走 `novel_pipeline`,它直接告诉你调什么、传什么。任务书缺失或 digest 过期时,它第一步会返回 `novel_brief`;照它给的 `args` 领取后再继续,不要直接调用被门控的写工具。
|
|
33
33
|
|
|
34
34
|
## 工具速查
|
|
35
35
|
|