dsh-novel-writer 4.1.0 → 4.1.1

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 CHANGED
@@ -15,19 +15,19 @@ exposed as a **stdio MCP server** for Claude Desktop / Cursor.
15
15
 
16
16
  ## Install
17
17
 
18
- `sh
18
+ ```sh
19
19
  dsh plugin --profile web add dsh-novel-writer
20
20
  # or
21
21
  npm install dsh-novel-writer
22
- `
22
+ ```
23
23
 
24
24
  Requires **Node >= 22.3**. Restart the web app; a "写作助手功能" panel appears in the sidebar.
25
25
 
26
26
  ## MCP server
27
27
 
28
- `sh
29
- node /path/to/node_modules/dsh-novel-writer/mcp/server.mjs --root /path/to/your/novels
30
- `
28
+ ```sh
29
+ npx -y -p dsh-novel-writer dsh-novel-writer-mcp --root /path/to/your/novels
30
+ ```
31
31
 
32
32
  See [mcp/README.md](./mcp/README.md) for the Claude Desktop / Cursor config.
33
33
 
package/README.md CHANGED
@@ -32,15 +32,15 @@
32
32
 
33
33
  **方式一:npm(推荐)**
34
34
 
35
- `sh
35
+ ```sh
36
36
  dsh plugin --profile web add dsh-novel-writer
37
- `
37
+ ```
38
38
 
39
39
  **方式二:从 GitHub 安装**
40
40
 
41
- `sh
41
+ ```sh
42
42
  dsh plugin --profile web add github:siweina/dsh-novel-writer#main
43
- `
43
+ ```
44
44
 
45
45
  **方式三:MCP(不用 DSH 也能用)** —— 见 [MCP 服务器](#mcp-服务器非-dsh-用户也能用)
46
46
 
@@ -48,9 +48,9 @@ dsh plugin --profile web add github:siweina/dsh-novel-writer#main
48
48
 
49
49
  ## 60 秒上手
50
50
 
51
- `sh
51
+ ```sh
52
52
  mkdir -p novels/我的小说 # 把章节文件放进去(第01章.md、第02章.md …)
53
- `
53
+ ```
54
54
 
55
55
  然后在对话里说:**"用 novel_style_report 给我的小说做一次风格画像"**,你会拿到:
56
56
 
@@ -139,12 +139,18 @@ fixAnchors:3 条原著锚段(对话 / 心理 / 描写各一条,供逐句
139
139
  包里自带一个 **stdio MCP 服务器**(`mcp/server.mjs`),把 16 个工具原样暴露给任何 MCP 客户端,
140
140
  例如 Claude Desktop、Cursor。**它是跑在你自己电脑上的本地进程,不需要服务器、不需要联网、不需要常驻。**
141
141
 
142
+ ```bash
143
+ npx -y -p dsh-novel-writer dsh-novel-writer-mcp --root /你的小说库路径
144
+ ```
145
+
146
+ 客户端配置示例(`claude_desktop_config.json` / Cursor `mcp.json`):
147
+
142
148
  ```json
143
149
  {
144
150
  "mcpServers": {
145
151
  "dsh-novel-writer": {
146
- "command": "node",
147
- "args": ["/绝对路径/mcp/server.mjs", "--root", "/你的小说库路径"]
152
+ "command": "npx",
153
+ "args": ["-y", "-p", "dsh-novel-writer", "dsh-novel-writer-mcp", "--root", "/你的小说库路径"]
148
154
  }
149
155
  }
150
156
  }
package/mcp/README.md CHANGED
@@ -16,7 +16,10 @@ Claude Desktop、Cursor 等任何 MCP 客户端。
16
16
  ## 1. 快速开始
17
17
 
18
18
  ```bash
19
- # 直接以 stdio 服务器方式启动(书库根目录用 --root 指定)
19
+ # 推荐:不用先安装,npx 直接拉起(-p 指定包名,bin 名为 dsh-novel-writer-mcp)
20
+ npx -y -p dsh-novel-writer dsh-novel-writer-mcp --root /abs/path/to/novels-workspace
21
+
22
+ # 或已装进项目后,直接用包内文件启动
20
23
  node /abs/path/to/dsh-novel-writer/mcp/server.mjs --root /abs/path/to/novels-workspace
21
24
  ```
22
25
 
@@ -42,23 +45,32 @@ printf '%s\n' \
42
45
  - macOS:`~/Library/Application Support/Claude/claude_desktop_config.json`
43
46
  - Linux:`~/.config/Claude/claude_desktop_config.json`
44
47
 
48
+ ```json
49
+ {
50
+ "mcpServers": {
51
+ "dsh-novel-writer": {
52
+ "command": "npx",
53
+ "args": ["-y", "-p", "dsh-novel-writer", "dsh-novel-writer-mcp", "--root", "/绝对路径/novels-workspace"]
54
+ }
55
+ }
56
+ }
57
+ ```
58
+
59
+ 也可以不用 npx,直接把 `command` 写成 `node`、`args` 指向包内文件(需先 `npm install dsh-novel-writer`):
60
+
45
61
  ```json
46
62
  {
47
63
  "mcpServers": {
48
64
  "dsh-novel-writer": {
49
65
  "command": "node",
50
- "args": [
51
- "F:/doment/build/dsh-novel-writer-v4.0.0/mcp/server.mjs",
52
- "--root",
53
- "F:/doment/novels-workspace"
54
- ]
66
+ "args": ["/绝对路径/node_modules/dsh-novel-writer/mcp/server.mjs", "--root", "/绝对路径/novels-workspace"]
55
67
  }
56
68
  }
57
69
  }
58
70
  ```
59
71
 
60
72
  `args` 里的路径必须是**绝对路径**;Windows 上可用正斜杠 `/`(无需转义),或用双反斜杠 `\\`。
61
- 若 `node` 不在 PATH 中,把 `command` 写成 node 可执行文件的绝对路径(如 `"C:/Program Files/nodejs/node.exe"`)。
73
+ 若 `node` / `npx` 不在 PATH 中,把 `command` 写成可执行文件的绝对路径(如 `"C:/Program Files/nodejs/node.exe"`)。
62
74
 
63
75
  ### Cursor
64
76
 
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "dsh-novel-writer",
3
- "version": "4.1.0",
4
- "description": "小说写作助手插件(v4.1.0):句式/情感/意象分析、伏笔设定管理、本地语义检索、氛围光谱、风格画像报告、文笔六维基线带、原创模式与创作资料、写作哨兵(衔接/OOC/大纲);附 stdio MCP 服务器(Claude Desktop / Cursor 可用)。",
3
+ "version": "4.1.1",
4
+ "description": "小说写作助手插件(v4.1.1):句式/情感/意象分析、伏笔设定管理、本地语义检索、氛围光谱、风格画像报告、文笔六维基线带、原创模式与创作资料、写作哨兵(衔接/OOC/大纲);附 stdio MCP 服务器(Claude Desktop / Cursor 可用)。",
5
+ "mcpName": "io.github.siweina/dsh-novel-writer",
5
6
  "type": "module",
6
7
  "main": "lib/index.js",
7
8
  "exports": {
@@ -16,7 +17,8 @@
16
17
  "README.md",
17
18
  "README.en.md",
18
19
  "skills",
19
- "mcp"
20
+ "mcp",
21
+ "server.json"
20
22
  ],
21
23
  "dsh": {
22
24
  "engines": {
package/server.json ADDED
@@ -0,0 +1,22 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.siweina/dsh-novel-writer",
4
+ "title": "dsh-novel-writer — 网文写作体检",
5
+ "description": "Offline toolkit: 16 tools for Chinese web-novel style, plot-thread and continuity audits.",
6
+ "version": "4.1.1",
7
+ "repository": {
8
+ "url": "https://github.com/siweina/dsh-novel-writer",
9
+ "source": "github"
10
+ },
11
+ "websiteUrl": "https://github.com/siweina/dsh-novel-writer#readme",
12
+ "packages": [
13
+ {
14
+ "registryType": "npm",
15
+ "identifier": "dsh-novel-writer",
16
+ "version": "4.1.1",
17
+ "transport": {
18
+ "type": "stdio"
19
+ }
20
+ }
21
+ ]
22
+ }