dsh-novel-writer 4.3.1 → 5.0.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/README.en.md +10 -9
- package/README.md +10 -9
- package/cordis.patch.yml +1 -1
- package/lib/brief.js +611 -0
- package/lib/client.js +50 -4
- package/lib/core.js +75 -6
- package/lib/fixplan.js +1046 -0
- package/lib/graph.js +694 -0
- package/lib/index.js +469 -17
- package/lib/prompts.js +107 -2
- package/mcp/README.md +13 -10
- package/mcp/server.mjs +17 -7
- package/package.json +2 -2
- package/server.json +3 -3
- package/skills/novel-writing/SKILL.md +49 -0
package/README.en.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# 📚 dsh-novel-writer — on-device style checkup for novel writers
|
|
2
2
|
|
|
3
|
-
> 🌐 **[Project site](https://siweina.github.io/dsh-novel-writer/)** · [Technical docs — implementation details, formulas and limits for all 16 tools](https://siweina.github.io/dsh-novel-writer/tools/)
|
|
4
|
-
|
|
5
3
|
English | [中文](./README.md)
|
|
6
4
|
|
|
7
5
|
[](https://www.npmjs.com/package/dsh-novel-writer)
|
|
@@ -12,12 +10,12 @@ English | [中文](./README.md)
|
|
|
12
10
|
[](https://github.com/siweina/dsh-novel-writer/stargazers)
|
|
13
11
|
[](https://glama.ai/mcp/servers/siweina/dsh-novel-writer)
|
|
14
12
|
|
|
15
|
-
**
|
|
13
|
+
**18 tools that turn "my writing drifted" into numbers you can act on.**
|
|
16
14
|
Sentence, emotion and style-baseline analysis all run **on your machine**: a 24MB Chinese model ships with the package,
|
|
17
15
|
**zero API cost, your manuscript never leaves the device**. Built for DeepSeek Harness (DSH); the same engine is also
|
|
18
16
|
exposed as a **stdio MCP server** for Claude Desktop / Cursor.
|
|
19
17
|
|
|
20
|
-
[Install](#install) · [60-second start](#60-second-start) · [See the output](#see-the-output) · [The
|
|
18
|
+
[Install](#install) · [60-second start](#60-second-start) · [See the output](#see-the-output) · [The 18 tools](#provided-tools-18) · [MCP server](#mcp-server-usable-outside-dsh)
|
|
21
19
|
|
|
22
20
|
---
|
|
23
21
|
|
|
@@ -94,7 +92,7 @@ fixAnchors:3 条原著锚段(对话 / 心理 / 描写各一条,供逐句
|
|
|
94
92
|
| Cost | **0 (local inference)** | Billed per token | Self-hosted |
|
|
95
93
|
| Purpose-built for Chinese fiction | **Yes** | Generic | No |
|
|
96
94
|
| Style baseline (μ±σ) | **Yes** | Rare | No |
|
|
97
|
-
| DSH integration | **
|
|
95
|
+
| DSH integration | **18 tools + sidebar toggles** | None | None |
|
|
98
96
|
| Usable without DSH | **Yes (MCP)** | Yes | You wrap it yourself |
|
|
99
97
|
|
|
100
98
|
> **A note for non-Chinese users**: this plugin is designed for analysing and writing Chinese fiction — the sentence-pattern,
|
|
@@ -118,10 +116,11 @@ fixAnchors:3 条原著锚段(对话 / 心理 / 描写各一条,供逐句
|
|
|
118
116
|
10. **Writing sentinels**: `novel_continuity_check` extended — ①**bridge check** (`chapter`: time jumps / semantic distance / character continuity / hook handoff, with quoted evidence) ②**OOC check** (`ooc`: per-character emotion baseline deviation) ③**outline drift** (`outline`: direction vs body keyword overlap); **brief mode** for report tools.
|
|
119
117
|
11. **Original mode & creation files**: fill in creation settings in the sidebar (worldview/characters/forbidden/main conflict/genre/extras, blank = model decides, per-book profile library); novel_outline maintains creation files (bible/characters/outline/hooks/status), enforcing the bible → outline → hook chain with dynamic batches (10→20→30 chapters) to prevent plot jumps and OOC.
|
|
120
118
|
12. **Experience & stats**: main panel **library stats** (per-book chapters/total chars/7-day active chars, 🔥 green), **🎬 demo** (built-in sample, no files, runs the 6-dim baseline), **📊 report history** (analysis/style-reports browsing); actionable error hints; slimmer tool descriptions.
|
|
119
|
+
13. **Writing-desk trio**: `novel_chapter_brief` (**chapter brief**) — **one call** before you start writing gathers every input (previous-chapter hand-off / chapter direction / relevant characters / open plot threads / wording rules / style baseline / anchors & skeletons / avoid-list / checklist); anything unavailable lands in `degraded` with the reason; `novel_fix_plan` (**fix plan**) — turns style diagnostics into a priority-ordered to-do list (line-anchored original text + current vs. target values + reference passages + rewrite direction) with `plan` / `verify` / `mark` and a three-state re-check, **direction only, never generates prose**; `novel_plot { action: "graph" }` (**structure view**) — plot-thread spans / consecutive character absences / thread gaps / timeline order / outline-vs-body overlap. Plus **scene-scoped prompts** (general / writing / revising / auditing / setup; `general` is the old behaviour).
|
|
121
120
|
|
|
122
121
|
---
|
|
123
122
|
|
|
124
|
-
## Provided Tools (
|
|
123
|
+
## Provided Tools (18)
|
|
125
124
|
|
|
126
125
|
| Tool | Description |
|
|
127
126
|
|------|-------------|
|
|
@@ -132,21 +131,23 @@ fixAnchors:3 条原著锚段(对话 / 心理 / 描写各一条,供逐句
|
|
|
132
131
|
| `novel_new_chapter` | Create new chapter file |
|
|
133
132
|
| `novel_import` | Batch import manuscripts |
|
|
134
133
|
| `novel_sentence_analysis` | Sentence-pattern analysis |
|
|
135
|
-
| `novel_sentence_config` | View/set tool & feature toggles |
|
|
134
|
+
| `novel_sentence_config` | View/set tool & feature toggles (incl. prompt scene) |
|
|
136
135
|
| `novel_style_check` | Style check (rule + semantic) |
|
|
137
136
|
| `novel_style_report` | **Style portrait report** (6-dim measurement) |
|
|
138
|
-
| `novel_plot` | Plot/foreshadowing tracker |
|
|
137
|
+
| `novel_plot` | Plot/foreshadowing tracker; `action: "graph"` structure view (plot-thread spans / consecutive character absences / thread gaps / timeline order / outline-vs-body overlap) |
|
|
139
138
|
| `novel_settings` | Settings management (+worldview) |
|
|
140
139
|
| `novel_summary` | Chapter summaries |
|
|
141
140
|
| `novel_continuity_check` | Continuity audit + **bridge/OOC/outline sentinels** |
|
|
142
141
|
| `novel_semantic_search` | Semantic search (local embedding, 0 token) |
|
|
143
142
|
| `novel_outline` | **Creation-file management** (bible/characters/outline/hooks/status) |
|
|
143
|
+
| `novel_chapter_brief` | **Chapter brief** — one call before writing gathers everything (previous-chapter hand-off / chapter direction / characters / open threads / wording rules / style baseline / anchors & skeletons / avoid-list / checklist) |
|
|
144
|
+
| `novel_fix_plan` | **Fix plan** — turns style diagnostics into a priority-ordered to-do list (line anchors + reference passages), re-checkable after edits; **direction only, never generates prose** |
|
|
144
145
|
|
|
145
146
|
---
|
|
146
147
|
|
|
147
148
|
## MCP server (usable outside DSH)
|
|
148
149
|
|
|
149
|
-
The package ships a **stdio MCP server** (`mcp/server.mjs`) that exposes all
|
|
150
|
+
The package ships a **stdio MCP server** (`mcp/server.mjs`) that exposes all 18 tools to any MCP client,
|
|
150
151
|
e.g. Claude Desktop or Cursor. **It runs as a local process on your own machine — no server, no network, no daemon.**
|
|
151
152
|
|
|
152
153
|
```bash
|
package/README.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
# 📚 dsh-novel-writer — 给网文作者的本地章节体检
|
|
2
2
|
|
|
3
|
-
> 🌐 **[在线主页](https://siweina.github.io/dsh-novel-writer/)** · [完整技术文档(16 个工具的实现细节、公式与约束)](https://siweina.github.io/dsh-novel-writer/tools/)
|
|
4
|
-
|
|
5
3
|
[English](./README.en.md) | 中文
|
|
6
4
|
|
|
7
5
|
[](https://www.npmjs.com/package/dsh-novel-writer)
|
|
@@ -12,11 +10,11 @@
|
|
|
12
10
|
[](https://github.com/siweina/dsh-novel-writer/stargazers)
|
|
13
11
|
[](https://glama.ai/mcp/servers/siweina/dsh-novel-writer)
|
|
14
12
|
|
|
15
|
-
**
|
|
13
|
+
**18 个工具,把"文风跑偏"变成可量化的数字。**
|
|
16
14
|
句式 / 情感 / 风格基线全部**在本地算**:24MB 中文模型随包分发,**零 API 花费、正文不出本机**。
|
|
17
15
|
为 DeepSeek Harness(DSH)打造;同一套能力也可作为 **MCP 服务器**给 Claude Desktop / Cursor 使用。
|
|
18
16
|
|
|
19
|
-
[安装](#安装) · [60 秒上手](#60-秒上手) · [看看输出](#看看输出长什么样) · [
|
|
17
|
+
[安装](#安装) · [60 秒上手](#60-秒上手) · [看看输出](#看看输出长什么样) · [18 个工具](#提供的工具18-个) · [MCP 服务器](#mcp-服务器非-dsh-用户也能用)
|
|
20
18
|
|
|
21
19
|
---
|
|
22
20
|
|
|
@@ -90,7 +88,7 @@ fixAnchors:3 条原著锚段(对话 / 心理 / 描写各一条,供逐句
|
|
|
90
88
|
| 花费 | **0(本地推理)** | 按 token 计费 | 自建 |
|
|
91
89
|
| 中文小说专用 | **是** | 通用 | 否 |
|
|
92
90
|
| 风格基线(μ±σ) | **有** | 少见 | 无 |
|
|
93
|
-
| 与 DSH 集成 | **
|
|
91
|
+
| 与 DSH 集成 | **18 工具 + 侧边栏开关** | 无 | 无 |
|
|
94
92
|
| 非 DSH 用户可用 | **可以(MCP)** | 可以 | 需自己封装 |
|
|
95
93
|
|
|
96
94
|
> **致非中文用户**:本插件为中文小说分析写作而设计——句式、情感、意象等核心能力以及内置的语义模型,全部针对中文语料构建与调优。在深耕中文的同时兼顾英文等其他语言,确实超出了我目前的能力范围。若因此给您带来不便,我深感抱歉,恳请谅解。
|
|
@@ -111,10 +109,11 @@ fixAnchors:3 条原著锚段(对话 / 心理 / 描写各一条,供逐句
|
|
|
111
109
|
10. **写作哨兵三件套**:`novel_continuity_check` 扩展——①**衔接检查**(chapter 参数:时间硬跳/语义距离/人物延续/钩子承接四路检测,带原文引用)②**OOC 检测**(ooc 参数:角色情绪基线偏离)③**大纲走偏**(outline 参数:方向行 vs 正文关键词重合);报告工具支持 **brief 精简模式**。
|
|
112
110
|
11. **原创模式与创作资料**:侧边栏填写创作设定(世界观/角色/禁忌/主线/题材/额外要求,留空=模型自定,多书独立设定库);novel_outline 维护创作资料(创作设定/人物/剧情大纲/钩子记录/创作状态卡),原创强制「设定书→大纲→钩子」链,动态批次(10→20→30 章)防剧情跳跃与角色 OOC。
|
|
113
111
|
12. **体验与统计**:主面板**书库统计卡**(每本章数/总字数/近 7 天活跃字数,活跃🔥标绿)、**🎬 体验演示**(内置示例不落盘跑六维基线)、**📊 报告历史**(analysis/style-reports 列表浏览);错误提示带解决步骤;工具说明压缩省 token。
|
|
112
|
+
13. **写作台三件套**:`novel_chapter_brief` **开写包**——动笔前**一次调用**取齐材料(上一章承接口 / 本章方向 / 相关人物 / 待回收伏笔 / 用语规范 / 风格基线 / 锚段与骨架 / 禁用清单 / 开写清单),取不到的材料进 `degraded` 并说明原因;`novel_fix_plan` **改稿台**——把风格诊断变成按优先级排好的待办(原句行号定位 + 当前值与目标值 + 原著锚段 + 改写方向),`plan` / `verify` / `mark` 三态复测,**只给方向、不生成正文**;`novel_plot { action: "graph" }` **结构视图**——伏笔埋设跨度 / 人物连续缺席 / 剧情线空档 / 时间线顺序 / 大纲对照。另有**场景化提示词**(general / writing / revising / auditing / setup,`general` 即旧行为)。
|
|
114
113
|
|
|
115
114
|
---
|
|
116
115
|
|
|
117
|
-
## 提供的工具(
|
|
116
|
+
## 提供的工具(18 个)
|
|
118
117
|
|
|
119
118
|
| 工具 | 说明 |
|
|
120
119
|
|------|------|
|
|
@@ -125,21 +124,23 @@ fixAnchors:3 条原著锚段(对话 / 心理 / 描写各一条,供逐句
|
|
|
125
124
|
| `novel_new_chapter` | 创建新章节文件 |
|
|
126
125
|
| `novel_import` | 原稿件批量导入/分类 |
|
|
127
126
|
| `novel_sentence_analysis` | 句式模式分析(九类/情感净化/量化/曲线/指纹) |
|
|
128
|
-
| `novel_sentence_config` |
|
|
127
|
+
| `novel_sentence_config` | 查看/修改工具与功能开关(含提示词场景) |
|
|
129
128
|
| `novel_style_check` | 风格自检(规则+语义双维度) |
|
|
130
129
|
| `novel_style_report` | **风格画像报告**(6 维测量 + AI 判断分离) |
|
|
131
|
-
| `novel_plot` |
|
|
130
|
+
| `novel_plot` | 伏笔/剧情线登记表;`action: "graph"` 结构视图(伏笔埋设跨度 / 人物连续缺席 / 剧情线空档 / 时间线顺序 / 大纲对照) |
|
|
132
131
|
| `novel_settings` | 设定管理(人物/地点/道具/时间线/世界观) |
|
|
133
132
|
| `novel_summary` | 章节摘要(长书续写辅助) |
|
|
134
133
|
| `novel_continuity_check` | 连贯性审计 + **衔接/OOC/大纲走偏哨兵** |
|
|
135
134
|
| `novel_semantic_search` | 语义检索(本地 embedding,0 token) |
|
|
136
135
|
| `novel_outline` | **创作资料管理**(创作设定/人物/大纲/钩子/状态卡) |
|
|
136
|
+
| `novel_chapter_brief` | **开写包**——动笔前一次调用取齐材料(上一章承接口/本章方向/相关人物/待回收伏笔/用语规范/风格基线/锚段与骨架/禁用清单/开写清单) |
|
|
137
|
+
| `novel_fix_plan` | **改稿台**——把风格诊断变成按优先级排好的待办(带行号定位与锚段),改完可复测;**只给方向不生成正文** |
|
|
137
138
|
|
|
138
139
|
---
|
|
139
140
|
|
|
140
141
|
## MCP 服务器(非 DSH 用户也能用)
|
|
141
142
|
|
|
142
|
-
包里自带一个 **stdio MCP 服务器**(`mcp/server.mjs`),把
|
|
143
|
+
包里自带一个 **stdio MCP 服务器**(`mcp/server.mjs`),把 18 个工具原样暴露给任何 MCP 客户端,
|
|
143
144
|
例如 Claude Desktop、Cursor。**它是跑在你自己电脑上的本地进程,不需要服务器、不需要联网、不需要常驻。**
|
|
144
145
|
|
|
145
146
|
```bash
|
package/cordis.patch.yml
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# dsh-novel-writer
|
|
1
|
+
# dsh-novel-writer v5.0.0 bundle patch: 18 tools (incl. novel_semantic_search) + local embedding engine.
|
|
2
2
|
# dsh-novel-writer bundle patch: mounts the novel-writing assistant plugin
|
|
3
3
|
# into the profile's loader tree. The entry's name is the plugin package
|
|
4
4
|
# itself, resolved from the profile's node_modules.
|