huashu-design
alchaincyf
Huashu Design 3.0 · 在 agent 里打一句话,拿回能交付的设计:网页 / App 原型 / 可编辑 PPTX / 动画 / 信息图 · 六个候选挑三个方向 · 84 种带样张的风格库 · 越用越懂你的外观账本与设计体检 · HTML-native design skill for Claude Code, Codex, Cursor & any agent
Nth-5620/dsh-readwrite-hub
DeepSeek Harness novel writing and reading workspace plugin (modified fork of dsh-workspace-explorer, MIT): character-accurate pagination, auto-saved progress, pinned progress bookmark, return-to-progress chip, chapter TOC, ruled-line writing mode
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Nth-5620/dsh-readwrite-hub
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
一个面向 DeepSeek Harness 的读写字间插件,提供「文件管理 + 码字 + 小说阅读」一体的工作区。
在编辑器工具栏点「码字」进入写作模式,点「阅读」进入书籍模式,同一个文件两种形态,排版偏好共享。
~/.dsh/readwrite-hub/state.json),关闭应用 / 切换文件 / 重开 Harness 都不丢进度;重新打开自动续读。2026-08-21 15:33)——用于续读与「返回原进度」。content-visibility: auto,视口外段落跳过 layout/paint,长文档拖动宽度、上下滚动流畅。.epub 文件自动进入只读阅读(不提供码字 / 编辑),由
foliate-js 在浏览器内直接解压渲染。book.toc),目录弹层内点击直达。~/.dsh/readwrite-hub/state.json,重开自动续读——与文本阅读共用同一进度字段,互不干扰。overflow-wrap: anywhere),横向无滚动条。slash/input-insert-reference 机制插入 @ 文件引用,发送时还原为完整绝对路径。# GitHub 安装(推荐)
dsh plugin --profile web add github:Nth-5620/dsh-readwrite-hub
安装后重启 dsh web,并硬刷新浏览器(Ctrl+Shift+R)。侧边栏底部出现「工作区文件」按钮即加载成功。
开发版:将本仓库
lib/放入~/.dsh/profiles/web/node_modules/dsh-readwrite-hub/并注册 bundle 即可,无需构建。
/readwrite-hub-api/*)完成,仅由 DSH 进程内的宿主插件提供。<script> / onerror 等)。本插件对 foliate-js 静态资源
(/readwrite-hub-foliate/*)与 raw 文件流(/readwrite-hub-api/raw)的响应设置
Content-Security-Policy(default-src 'self'; script-src 'self'; ...),阻断任何非本域来源的脚本,
并仅放行允许 EPUB 自身排版所需的 data: / blob: 资源。dsh web 默认仅绑定回环 127.0.0.1,插件 API 只有本机浏览器可访问。dsh web 绑定到非回环地址,插件 API 将无独立鉴权地与 DSH 一起暴露;切勿将带本插件的 DSH 直接暴露到公网。| 防护 | 实现 |
|---|---|
| 路径校验 | 所有操作要求绝对路径,拒绝相对路径与空路径 |
| 名称校验 | 新建 / 重命名仅接受单一路径段,拒绝空名、./.. 与含 /\ 的名称 |
| 目录列举 | 单层封顶 1000 条目 |
| 文件读取 | 默认 256 KiB、硬顶 8 MiB;只读文件头 |
| 文件写入 | 8 MiB 上限;请求体 64 KiB 上限 |
| 资源释放 | 所有文件句柄 try/finally 关闭;无缓存、无后台任务 |
lib/index.js):Cordis 插件,注册 /readwrite-hub-api/* REST 接口(list/read/write/rename/mkdir/newfile/copy/move/delete/reveal/state/shelf/shelf-remove/shelf-pin),state 原子读写 ~/.dsh/readwrite-hub/state.json(含书架 shelf 字段);提供 rc.2 设置槽。lib/client.js):__ModuleLoader__ 单文件浏览器 bundle,注册侧边栏入口与设置面板;阅读模式为 ReadingView 组件(字符级分页 = CJK 字宽校准 + 字符切片,页面与渲染严格一致),EPUB 只读为 EpubView 组件(动态加载 foliate-js 渲染),书架为 ShelfView 组件。0.1.1-rc.2+(稳定版) 与 0.1.2-alpha.1+(开发者 / ALPHA 版) 均兼容,
Node.js 20+。同一份源码无需修改即可在两个通道打开运行。ctx.remote.session.openWorkspacePath(其余功能如文件树 / 浏览器、码字、阅读、
EPUB、书架均无需改动)。若在 alpha 通道使用该按钮,请按此适配(见 docs/ 与 CHANGELOG)。关于 PDF:本项目定位是网络小说的读写字间,不打算支持 PDF(偏严肃办公排版、体积大、与码字定位不符)。因此 PDF 阅读不在计划内,仅保留 EPUB 一种电子书格式。
本插件的基础文件树、编辑器与「@ 文件引用」联动来自并集成了
3911ee/dsh-workspace-explorer(MIT License),
在此尊重并感谢原作者的贡献。
本插件的EPUB 阅读引擎来自并集成了
johnfactotum/foliate-js(MIT License,© John Factotum),
随插件以 lib/foliate/ 静态资源形式分发并保留其原始 LICENSE,由浏览器动态加载以渲染 EPUB 只读书,
在此尊重并感谢原作者的贡献。
本插件在继承上述基础能力之外,自行新增了码字模式(字体 / 字号 / 行距 / 边距 / 纸张背景 / 自动软换行 / 横线格 / 自动保存 / 段落格式化)、小说阅读模式(按字分页 / 进度记忆 / 书签 / 目录 / 滚动与翻页进度共享)、EPUB 只读阅读(见上文「EPUB 阅读」节)、书架,以及重新设计的固定右侧侧边栏与单工作区文件树。
本插件以 MIT 协议发布(见 LICENSE),同时保留上游版权声明并额外标注本插件版权;
foliate-js 仍遵循其自身 MIT 许可(见 lib/foliate/LICENSE)。
A read-write studio plugin for the DeepSeek Harness Web GUI: file management, writing mode, and a novel-reading mode, all in one workspace. Click Write for the drafting view or Read to turn the same file into a book layout; typography preferences are shared.
Feature highlights:
content-visibility: auto..epub in the file tree enters a read-only reader
(no editing), rendered in-browser by foliate-js
(MIT). It reads the EPUB navigation TOC, remembers progress by CFI (resume on reopen, sharing the
state.progress field with the text reader), and supports scroll/paged layout, font scaling, and
CFI bookmarks. EPUBs are auto-shelved like any other book.slash/input-insert-reference, in-editor
opening of chat file links, richer context menus.Compatibility: DeepSeek Harness 0.1.1-rc.2+ (stable) and 0.1.2-alpha.1+
(developer / ALPHA) are both supported — the same source runs on either channel with no
code changes. In v0.1.2 alpha a few plugin APIs changed: the host side needs nothing, while
the client-side "open external file with system app" action should use
ctx.remote.session.openWorkspacePath there (file tree / editor, writing, reading, EPUB, and
bookshelf all work unchanged). See docs/ and CHANGELOG.
Install: dsh plugin --profile web add github:Nth-5620/dsh-readwrite-hub
lib/ships as the runtime bundle — no build step required.
The foundational file tree, editor, and "@ file reference" integration of this plugin come
from 3911ee/dsh-workspace-explorer (MIT License).
We respect and thank the original author for their contribution.
The EPUB rendering engine is johnfactotum/foliate-js
(MIT License, © John Factotum). It is shipped in this repository under lib/foliate/ with its
original LICENSE, and is loaded dynamically by the browser to render EPUB books read-only.
We thank the author for this library.
On top of those inherited foundations, this plugin adds the writing mode (fonts, size, line spacing, margins, paper backgrounds, auto soft-wrap, ruled lines, auto-save, paragraph formatting), the novel-reading mode (character-accurate pagination, progress memory, bookmarks, TOC, shared scroll/paged progress), EPUB reading (via foliate-js), the bookshelf, as well as a redesigned fixed right sidebar and a single-workspace file tree.
This plugin is released under the MIT License (see LICENSE), retaining the upstream
copyright notice and additionally attributing this plugin. foliate-js remains under its own MIT
License; see lib/foliate/LICENSE.
See the Chinese sections above for deployment, security, and limits.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: writing。