dsh-novel-writer 5.2.0 → 6.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 +12 -17
- package/README.md +10 -16
- package/lib/client.js +1282 -336
- package/package.json +2 -2
- package/server.json +2 -2
package/README.en.md
CHANGED
|
@@ -16,9 +16,7 @@ Sentence, emotion and semantic analysis all run **on your machine**: a 24MB Chin
|
|
|
16
16
|
**zero API cost, your manuscript never leaves the device**. Built for DeepSeek Harness (DSH); the same engine is also
|
|
17
17
|
exposed as a **stdio MCP server** for Claude Desktop / Cursor.
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
[Website](https://siweina.github.io/dsh-novel-writer/) · [Technical docs](https://siweina.github.io/dsh-novel-writer/tools/) · [Install](#install) · [The writing loop](#the-writing-loop-end-to-end) · [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)
|
|
19
|
+
[Website](https://siweina.github.io/dsh-novel-writer/) · [Technical docs (parameters & examples for all 18 tools)](https://siweina.github.io/dsh-novel-writer/tools/) · [Install](#install) · [The writing loop](#the-writing-loop-end-to-end) · [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)
|
|
22
20
|
|
|
23
21
|
---
|
|
24
22
|
|
|
@@ -34,12 +32,6 @@ exposed as a **stdio MCP server** for Claude Desktop / Cursor.
|
|
|
34
32
|
|
|
35
33
|
> **Everything local, read-only by default**: the brief and the structure view **write no files at all**; the fix desk writes only its own list file, **never touches your prose and never writes prose for you**; semantic search and emotion analysis cost zero tokens.
|
|
36
34
|
|
|
37
|
-
> **Token-saving mode (new in v5.1.0)**: the sidebar's **Lean workflow** switch (or `novel_sentence_config` with `leanWorkflow=true`) keeps exactly one rule — **call tools on demand**: no automatic self-checks, no re-checking fix lists, no registry updates; report tools return the brief form unless you explicitly pass `brief` (style report: 181 chars vs 1725 for the full one).
|
|
38
|
-
>
|
|
39
|
-
> **v5.1.0 cost & feel fixes**: v5.0.0 had turned "always run a self-check after writing + the closing trio" and "mark every item + verify repeatedly" into mandatory checklists — one chapter went from 3 tool calls to 6, and revising took 30+. Together with "build sentences to the skeletons" and "fix any out-of-band dimension", that made prose stiff. This release makes all of it **on demand**: a chapter now takes **2 calls and up**, the fix-list cap dropped **40 → 12** with only the worst paragraph per dimension, and it now says plainly that **out-of-band ≠ defect** (keep lyrical / psychological / elliptical passages when they read fine — `mark` them `skip`).
|
|
40
|
-
>
|
|
41
|
-
> **v5.2.0 official sidebar integration**: the browser half no longer injects DOM into the host. It uses the DSH 0.2.0 seats — `ctx.sidebarRightTabs.register` declares the tab type, `sidebar.right.pane.tab` provides the body (tab chip, docking, splitting, per-session layout and theming all belong to the host), `sidebar.footer.action` adds the left-sidebar entry, and `sidebar.right.pane.tab.title` keeps an open tab's label following language changes. Hosts without these services fall back to the old path automatically; tools, parameters and the state file are unchanged (still 18 tools).
|
|
42
|
-
|
|
43
35
|
## What problem does it solve
|
|
44
36
|
|
|
45
37
|
| Your pain | What you get here |
|
|
@@ -59,19 +51,22 @@ exposed as a **stdio MCP server** for Claude Desktop / Cursor.
|
|
|
59
51
|
**Option 1: npm (recommended)**
|
|
60
52
|
|
|
61
53
|
```sh
|
|
62
|
-
dsh plugin
|
|
54
|
+
dsh plugin add dsh-novel-writer
|
|
63
55
|
```
|
|
64
56
|
|
|
57
|
+
(Add `--profile <name>` to target a specific profile, e.g. `--profile desktop`.)
|
|
58
|
+
|
|
65
59
|
**Option 2: From GitHub**
|
|
66
60
|
|
|
67
61
|
```sh
|
|
68
|
-
dsh plugin
|
|
62
|
+
dsh plugin add github:siweina/dsh-novel-writer#main
|
|
69
63
|
```
|
|
70
64
|
|
|
71
65
|
**Option 3: MCP (no DSH required)** — see [MCP server](#mcp-server-usable-outside-dsh)
|
|
72
66
|
|
|
73
|
-
Requires **Node >= 22.3**. After installing, **restart
|
|
74
|
-
appears in the sidebar.
|
|
67
|
+
Requires **Node >= 22.3**. After installing, **restart DSH** (desktop / web); a 「写作助手功能」 ("Writing Assistant")
|
|
68
|
+
entry appears in the left sidebar's main nav (official DSH 0.2.0+ seat; older hosts fall back to the previous
|
|
69
|
+
mounting path automatically).
|
|
75
70
|
|
|
76
71
|
## 60-second start
|
|
77
72
|
|
|
@@ -155,7 +150,7 @@ fixAnchors:3 条原著锚段(对话 / 心理 / 描写各一条,供逐句
|
|
|
155
150
|
| Cost | **0 (local inference)** | Billed per token | Self-hosted |
|
|
156
151
|
| Purpose-built for Chinese fiction | **Yes** | Generic | No |
|
|
157
152
|
| Style baseline (μ±σ) | **Yes** | Rare | No |
|
|
158
|
-
| DSH integration | **18 tools +
|
|
153
|
+
| DSH integration | **18 tools + official seats & website-style UI** | None | None |
|
|
159
154
|
| Usable without DSH | **Yes (MCP)** | Yes | You wrap it yourself |
|
|
160
155
|
|
|
161
156
|
> **A note for non-Chinese users**: this plugin is designed for analysing and writing Chinese fiction — the sentence-pattern,
|
|
@@ -175,10 +170,10 @@ fixAnchors:3 条原著锚段(对话 / 心理 / 描写各一条,供逐句
|
|
|
175
170
|
6. **Emotion purification & quantification**: strong/weak emotion-word grading, pollution detection, caveat warning + AI re-verification; Valence sliding window → variance V / delta Δ / conflict index C + implicit imagery carriers.
|
|
176
171
|
7. **Worldview & pragmatics detection**: auto cultural-baseline detection with confidence; speechStyle title/honorifics/rituals/tone norms; genre & theme + webnovel signals.
|
|
177
172
|
8. **Writing toolkit**: plot tracking / five settings tables (characters·locations·items·timeline·worldview) / chapter summaries / continuity audit / batch import / style check / continuation writing.
|
|
178
|
-
9. **Per-tool UI toggles**: 「写作助手功能」 ("Writing Assistant") sidebar panel (master + grouped tool toggles + feature toggles + prompt mode/scene/**lean workflow
|
|
179
|
-
10. **Style Baseline**: Six writing metrics (syntactic complexity / modifier density / abstraction / action density / hedging / gap index) + per-chapter μ±σ baseline band; `novel_style_report` outputs the band, `novel_style_check` compares new chapters (in-band ✓ / out-of-band ⚠); per-metric ±% tolerance configurable in the
|
|
173
|
+
9. **Per-tool UI toggles**: a 「写作助手功能」 ("Writing Assistant") entry in the left sidebar plus a main-column panel (**official DSH 0.2.0 seats** since v5.2.0; hosts older than 0.2.0 fall back automatically) — master switch + grouped tool toggles + feature toggles + prompt mode/scene/**lean workflow**, plain-language labels, data-dir usage & semantic-engine status. **The v5.5.0 UI is rebuilt on the official design system with a website-style overhaul**: all colors go through `--dsw-alias-*` semantic tokens (three themes in sync with the host), controls use the official UI primitives, DeepSeek-blue accents, a glow hero header with section kickers, and equal-width pages across every level.<br>**v6.0.0 goes further (Plan A)**: source split + build chain (assert-failed builds never write, `--check` verifies source==artifact), 8 unified components with a single row pattern (`PreferenceRow`), group cards across every switch page, 19+5 line icons, a slider as auxiliary input on the tolerance rows, and page-level push-pop transition animations (zero state / zero hook).
|
|
174
|
+
10. **Style Baseline**: Six writing metrics (syntactic complexity / modifier density / abstraction / action density / hedging / gap index) + per-chapter μ±σ baseline band; `novel_style_report` outputs the band, `novel_style_check` compares new chapters (in-band ✓ / out-of-band ⚠); per-metric ±% tolerance configurable in the panel's **Six-metric baseline** view (**recommended = 1.5× σ of the book's chapter variance**, rounded, clamped to ±10%~100%; leave blank to use recommended) — free theme, writing style kept inside the band.
|
|
180
175
|
11. **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.
|
|
181
|
-
12. **Original mode & creation files**: fill in creation settings in the
|
|
176
|
+
12. **Original mode & creation files**: fill in creation settings in the panel's **Original mode** view (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.
|
|
182
177
|
13. **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.
|
|
183
178
|
|
|
184
179
|
---
|
package/README.md
CHANGED
|
@@ -15,9 +15,7 @@
|
|
|
15
15
|
句式 / 情感 / 语义全部**在本地算**:24MB 中文模型随包分发,**零 API 花费、正文不出本机**。
|
|
16
16
|
为 DeepSeek Harness(DSH)打造;同一套能力也可作为 **MCP 服务器**给 Claude Desktop / Cursor 使用。
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
[官网](https://siweina.github.io/dsh-novel-writer/) · [技术文档](https://siweina.github.io/dsh-novel-writer/tools/) · [安装](#安装) · [写作流程](#写作流程一条能走完的闭环) · [60 秒上手](#60-秒上手) · [看看输出](#看看输出长什么样) · [18 个工具](#提供的工具18-个) · [MCP 服务器](#mcp-服务器非-dsh-用户也能用)
|
|
18
|
+
[官网](https://siweina.github.io/dsh-novel-writer/) · [技术文档(18 个工具的参数与示例)](https://siweina.github.io/dsh-novel-writer/tools/) · [安装](#安装) · [写作流程](#写作流程一条能走完的闭环) · [60 秒上手](#60-秒上手) · [看看输出](#看看输出长什么样) · [18 个工具](#提供的工具18-个) · [MCP 服务器](#mcp-服务器非-dsh-用户也能用)
|
|
21
19
|
|
|
22
20
|
---
|
|
23
21
|
|
|
@@ -33,12 +31,6 @@
|
|
|
33
31
|
|
|
34
32
|
> **全程本地、只读优先**:开写包与结构视图**不写任何文件**;改稿台只写自己的清单文件、**从不改正文,也不代写正文**;语义检索与情感分析零 token。
|
|
35
33
|
|
|
36
|
-
> **省 token 模式(v5.1.0 新增)**:侧边栏「精简工作流」开关(或 `novel_sentence_config` 传 `leanWorkflow=true`)打开后只保留一条原则——**工具按需调用**:不主动跑自检、不复测清单、不登记伏笔/钩子/摘要;报告类工具未显式传 `brief` 时默认走精简输出(风格画像实测 181 字符 vs 完整 1725 字符)。
|
|
37
|
-
>
|
|
38
|
-
> **v5.1.0 成本与手感修复**:v5.0.0 曾把「写完必须自检 + 收尾三件」「改稿逐条 mark + 反复 verify」写成必做清单,一章从 3 次调用涨到 6 次、改稿要 30+ 次;同时"照骨架造句"与"任一维度出带必改"会让文章越改越僵。本版全部改回**按需**:写一章 **2 次调用起**,改稿清单上限 **40 → 12 条**、同一维度只报最严重的 1 段,并明确了**出带不等于缺陷**(抒情/心理/留白段读起来不别扭就保留,可用 `mark` 标 `skip`)。
|
|
39
|
-
>
|
|
40
|
-
> **v5.2.0 官方侧边栏适配**:浏览器半边不再往宿主 DOM 里塞东西。改用 DSH 0.2.0 的官方席位——`ctx.sidebarRightTabs.register` 声明 tab 类型 + `sidebar.right.pane.tab` 提供正文(tab chip、停靠、分栏、每会话布局、深浅主题全归宿主)+ `sidebar.footer.action` 放左栏入口 + `sidebar.right.pane.tab.title` 让已打开的 tab 跟随语言切换。检测不到这些服务的宿主自动回退旧路径;工具、参数、状态文件完全不变(仍 18 个工具)。
|
|
41
|
-
|
|
42
34
|
## 它解决什么问题
|
|
43
35
|
|
|
44
36
|
| 你的困扰 | 这里给的答案 |
|
|
@@ -58,18 +50,20 @@
|
|
|
58
50
|
**方式一:npm(推荐)**
|
|
59
51
|
|
|
60
52
|
```sh
|
|
61
|
-
dsh plugin
|
|
53
|
+
dsh plugin add dsh-novel-writer
|
|
62
54
|
```
|
|
63
55
|
|
|
56
|
+
(需要指定配置时加 `--profile <名称>`,如 `--profile desktop`。)
|
|
57
|
+
|
|
64
58
|
**方式二:从 GitHub 安装**
|
|
65
59
|
|
|
66
60
|
```sh
|
|
67
|
-
dsh plugin
|
|
61
|
+
dsh plugin add github:siweina/dsh-novel-writer#main
|
|
68
62
|
```
|
|
69
63
|
|
|
70
64
|
**方式三:MCP(不用 DSH 也能用)** —— 见 [MCP 服务器](#mcp-服务器非-dsh-用户也能用)
|
|
71
65
|
|
|
72
|
-
要求 **Node ≥ 22.3**。安装后**重启 Web
|
|
66
|
+
要求 **Node ≥ 22.3**。安装后**重启 DSH**(桌面端 / Web),左栏主导航区出现「写作助手功能」入口(DSH 0.2.0+ 官方席位;更早宿主自动回退旧挂载)。
|
|
73
67
|
|
|
74
68
|
## 60 秒上手
|
|
75
69
|
|
|
@@ -155,7 +149,7 @@ fixAnchors:3 条原著锚段(对话 / 心理 / 描写各一条,供逐句
|
|
|
155
149
|
| 花费 | **0(本地推理)** | 按 token 计费 | 自建 |
|
|
156
150
|
| 中文小说专用 | **是** | 通用 | 否 |
|
|
157
151
|
| 风格基线(μ±σ) | **有** | 少见 | 无 |
|
|
158
|
-
| 与 DSH 集成 | **18 工具 +
|
|
152
|
+
| 与 DSH 集成 | **18 工具 + 官方席位与官网式界面** | 无 | 无 |
|
|
159
153
|
| 非 DSH 用户可用 | **可以(MCP)** | 可以 | 需自己封装 |
|
|
160
154
|
|
|
161
155
|
> **致非中文用户**:本插件为中文小说分析写作而设计——句式、情感、意象等核心能力以及内置的语义模型,全部针对中文语料构建与调优。在深耕中文的同时兼顾英文等其他语言,确实超出了我目前的能力范围。若因此给您带来不便,我深感抱歉,恳请谅解。
|
|
@@ -172,10 +166,10 @@ fixAnchors:3 条原著锚段(对话 / 心理 / 描写各一条,供逐句
|
|
|
172
166
|
6. **情感净化 + 量化**:强/弱情绪词分级、污染源检测、caveat 预警 + AI 复核;Valence 滑动窗口 → 方差 V / 斜率 Δ / 矛盾指数 C + 隐性意象载体。
|
|
173
167
|
7. **世界观与语用检测**:文化基准自动判断(西/东/混合)+ 置信度;speechStyle 称谓/客套/仪式/语气规范;题材流派 + 网文信号。
|
|
174
168
|
8. **写作辅助全家桶**:伏笔登记表 / 设定五张表(人物·地点·道具·时间线·世界观)/ 章节摘要 / 连贯性审计 / 批量导入 / 风格自检 / 续写辅助。
|
|
175
|
-
9. **全工具 UI
|
|
176
|
-
10. **风格基线**:文笔六维测量(句法复杂度/修饰密度/抽象度/动作密度/不确定性/留白指数)+ 按章节 μ±σ 基线带;`novel_style_report` 输出基线带,`novel_style_check` 对照新章偏差(带内 ✓ / 出带
|
|
169
|
+
9. **全工具 UI 开关**:左栏「写作助手功能」入口 + 主栏面板(**DSH 0.2.0 官方席位**,v5.2.0 起;老宿主 < 0.2.0 自动回退旧挂载)——总开关 + 工具开关分组 + 功能开关 + 提示词档位/场景/**精简工作流**,大白话文案,显示数据目录占用与语义引擎状态。**v5.5.0 界面按官方设计体系统一并做官网式重构**:颜色全走 `--dsw-alias-*` 语义 token(三主题与官方同源)、控件用官方 UI primitives、品牌蓝强调、光晕头部与分区 kicker、各级页面等宽。<br>**v6.0.0 再进一步(方案 A)**:源码分块 + 构建链装配(构建失败不写盘、`--check` 校验源与产物一致)、8 个统一组件与单一行模式(`PreferenceRow`)、分组卡片贯穿全部开关页、19+5 枚线图标、阈值 slider 辅助输入、页面级 push-pop 过渡动画(零 state / 零 hook)。
|
|
170
|
+
10. **风格基线**:文笔六维测量(句法复杂度/修饰密度/抽象度/动作密度/不确定性/留白指数)+ 按章节 μ±σ 基线带;`novel_style_report` 输出基线带,`novel_style_check` 对照新章偏差(带内 ✓ / 出带 ⚠);面板「六维基线」视图可自定义每维 ±% 容差(**推荐值 = 原著章节波动的 1.5 倍 σ**,自动取整、限 ±10%~100%;输入框留空即用推荐)——原创/续写时主题自由、写法保持在基线带内。
|
|
177
171
|
11. **写作哨兵三件套**:`novel_continuity_check` 扩展——①**衔接检查**(chapter 参数:时间硬跳/语义距离/人物延续/钩子承接四路检测,带原文引用)②**OOC 检测**(ooc 参数:角色情绪基线偏离)③**大纲走偏**(outline 参数:方向行 vs 正文关键词重合);报告工具支持 **brief 精简模式**。
|
|
178
|
-
12.
|
|
172
|
+
12. **原创模式与创作资料**:面板「原创模式」填写创作设定(世界观/角色/禁忌/主线/题材/额外要求,留空=模型自定,多书独立设定库);novel_outline 维护创作资料(创作设定/人物/剧情大纲/钩子记录/创作状态卡),原创强制「设定书→大纲→钩子」链,动态批次(10→20→30 章)防剧情跳跃与角色 OOC。
|
|
179
173
|
13. **体验与统计**:主面板**书库统计卡**(每本章数/总字数/近 7 天活跃字数,活跃🔥标绿)、**🎬 体验演示**(内置示例不落盘跑六维基线)、**📊 报告历史**(analysis/style-reports 列表浏览);错误提示带解决步骤;工具说明压缩省 token。
|
|
180
174
|
|
|
181
175
|
---
|