wbb316/dsh-novel

DSH 插件:小说创作台 —— 给 agent 5 个 novel_* 工具 + 一个开书向导 / 设定表单 / 关系图 / 剧情任务栏 / 一键续写流式直播的面板(宿主原生席位,入口在左侧栏)

Project Overview项目介绍

dsh-novel is a native DSH (DeepSeek Harness) plugin that turns the harness into a long-form novel writing bench, shipped as a single MIT-licensed JavaScript bundle with no build step. It is installed with dsh plugin --profile web add github:wbb316/dsh-novel, declares both sides through dsh.bundle (host) and dsh.client (browser) in its package.json, and wires into DSH via cordis.patch.yml. The plugin requires Node ≥ 20 and DSH ≥ 0.1.5 because it consumes the agent/assistant-stream frame for incremental text, and optionally pairs with the separate dsh-better-sidebar plugin to render the right-side panel; without that sidebar, the panel UI is unavailable but the five novel_* agent tools keep working inside any conversation.

The intended workflow has the writer curating outline, worldview, character cards and chapter files in the sidebar while asking the agent to continue the story: clicking "✍️ 写下一章" injects a request that streams the model output back into the chapter view in real time, parsing the content field out of partial JSON frames as they arrive. The plugin persists per-book progress (which novel is active, last chapter read) locally, supports a force-directed character relationship graph with draggable nodes, stores body text as plain .txt editable in Notepad, and groups chapters into volumes via drag-and-drop. Export options include 设定集.txt, plus EPUB and DOCX produced by an in-house ZIP packer that uses only Node's built-in zlib, so there are zero extra dependencies for the export pipeline.

Configuration lives at ~/.dsh-novel/config.json with precedence DSH_NOVEL_ROOT env var > config file > default D:\dsh-novel, and missing directories are created on demand. The author explicitly warns against UTF-8 BOM on any JSON or text file because PowerShell 5.1's Set-Content and Notepad's "Save as UTF-8" emit it and will crash JSON.parse; the plugin strips it defensively and ships a companion patch D:\tools\dsh-app-boot-bom-patch\ for the host. External validation is recommended: run W3C epubcheck on generated .epub files and open .docx in real Word, since the in-tree test suite cannot catch malformed OOXML. Multi-device sync is the only roadmap item still open.

dsh-novel 是一款专为 DSH(DeepSeek Harness)打造的原生小说创作插件,同时面向 agent 与真人写作者。它通过 dsh plugin --profile web add github:wbb316/dsh-novel 安装,并把 package.json 中的 dsh.bundle 与 dsh.client 字段分别挂入宿主与客户端两侧,无需构建步骤。安装后配合 dsh-better-sidebar 即可在右侧栏唤出「小说」面板,否则仅失去面板,5 个 novel_* 工具仍可在 agent 会话中调用。

典型工作流是:用户在面板中维护大纲、世界观、角色卡、章节正文与卷宗结构,调用「✍️ 写下一章」后 agent 会读取当前小说上下文,并以流式方式把章节正文回写到面板,实现边写边看的连续创作。插件会记住每本书读到哪一章,角色关系支持力导向图谱与拖拽排序,正文为可手工编辑的 .txt。导出方面提供 设定集.txt、自写 ZIP 打包器生成的 EPUB 与 DOCX 三种格式,卷与章的层级在 EPUB/DOCX 中以分组或标题呈现。

依赖上要求 Node ≥ 20、DSH ≥ 0.1.5(用到 agent/assistant-stream 流式帧),并依赖 dsh-better-sidebar 提供面板容器。小说根目录可通过环境变量 DSH_NOVEL_ROOT、配置文件 ~/.dsh-novel/config.json 或默认 D:\dsh-novel 指定,目录不存在会自动创建;配置文件、JSON 等文本严禁保存为带 UTF-8 BOM 的编码,否则会触发 JSON.parse 报错。项目采用 MIT 协议,目前尚未实现多设备同步。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:wbb316/dsh-novel

把 wbb316/dsh-novel 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-novel 🖋️

license node DSH seats tests release

DSH 插件:小说创作台。管你的小说项目(大纲 / 世界观 / 角色 & 关系 / 章节), 一半给 agent 用(novel_* 工具),一半给人用(宿主原生席位「小说」面板)。

它解决的是写长篇时的实际麻烦:设定和人物关系要随手能改、换个小说回来还记得读到哪、 点一下就让 AI 带着大纲和角色关系接着写、边写边看它流出来的字。

这是「自己做插件」的练手项目,所以代码里到处是注释,踩过的坑也都记在下面 —— 下次写别的插件直接抄。


🚀 安装

# 从 GitHub 装(本插件是纯 JS,不需要构建步骤)
dsh plugin --profile web add github:wbb316/dsh-novel

# 装完重启一次
dsh web

更新:再跑一遍同样的命令即可(不带版本号就是默认分支上最新的)。 每个版本改了什么、有没有坑要躲,都在 Releases 里。

前置条件

说明
DSH 0.2.0-rc.1 或更高(面板挂在宿主原生席位上);老宿主仍可用,面板会退回 dsh-better-sidebar 页签
Node >= 20
dsh-better-sidebar 可选——只有「宿主没有原生席位」的老版本才需要它
本地开发(改完立刻生效)
git clone https://github.com/wbb316/dsh-novel.git D:\dsh\plugins\dsh-novel-plugin
dsh plugin --profile web add link:D:/dsh/plugins/dsh-novel-plugin

link: 装的是软链,源码改了就是改了:客户端半(lib/client.js)刷新浏览器即可,宿主半(lib/index.js 等)要重启 dsh web。


✨ 面板能干什么

🎬 一键续写 + 流式直播:点「✍️ 写下一章」就把请求发进会话;模型正在写的字实时显示在面板里 (章节正文是当工具参数流出来的,所以从半截 JSON 里把 content 抠出来显示),写完自动刷出新章节。

📝 开书向导(单独一页):点「+ 新建」不是弹个小框、也不挤在列表下面,而是整页切换成向导 —— 基本 / 主角 / 世界观 / 大纲 / 进阶 五个折叠区,一页滚动,任何字段都能留空(先开书、再慢慢补)。 4 套模板(校园恋爱 / 都市异能 / 悬疑 / 空白)点一下只补空着的字段,绝不覆盖你已经写的; 点「创建这本书」一次性落盘:设定.json + 角色表(主角进"重要"档,外貌/想要/弱点/秘密拼进 desc)

  • 世界观.txt(舞台/规则/禁忌/名词表)+ 大纲.txt(三幕 + 灵感池)+ 剧情表的全书纲领 (可选顺手建一个空的第一章)。填了一半不想填了,点「✨ 让 AI 帮我补全」把这张表丢进对话, 缺的我替你定 —— 走的就是「写下一章」那条"写进输入框"的路。

⚙️ 设定页能改 设定.json:类型 / 基调 / 视角 / 每章目标字数 / 主线 / 结局 / 标签 / 备注 用表单改(跟向导同一套字段),想手改原文点「直接改 JSON」切过去;多写的键保存时会被丢掉。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-jev-adapter 下一个 Next dsh-forge-studio →