When using DeepSeek Harness for development or novel writing, you usually need to switch among file management, code editing, and document reading. This switching breaks flow and can easily cause loss of context. The DSH plugin ecosystem provides room for extension; among these extensions, the dsh-readwrite-hub plugin integrates file management, a writing mode, and novel reading, attempting to solve these problems within a single workspace.

This is a Read-Write Hub plugin for DeepSeek Harness, based on dsh-workspace-explorer (MIT License) and maintained by Nth-5620. It switches the same file between “writing” and “reading” modes, shares typography preferences, and provides automatic saving and progress memory.

Core Features

Reading Mode

Reading mode is optimized for long-form reading, using CJK character-width calibration and character slicing techniques to achieve character-level pagination. The bottom of the page keeps only one line of safety margin; pages are always filled, and new chapters automatically start on a new page.
- Progress Management: Progress is automatically saved when turning pages (written to ~/.dsh/readwrite-hub/state.json). After closing the app or switching files, reopening the file automatically resumes reading. Supports automatic progress bookmarks (pinned to the top) and user bookmarks.
- Interaction: Supports keyboard page turning (PageUp/Down, etc.), clicking the progress bar to jump, and a page-jump input box at the bottom. Reading mode and writing mode share typography preferences such as font size, line spacing, and background.
- Chapter Navigation: Automatically parses multiple chapter formats (e.g., “Chapter 1”, “Prologue”, “Chapter N”, etc.). Clicking the table of contents jumps directly to the corresponding chapter.
- Scrolling Optimization: In scroll mode, paragraphs enable content-visibility: auto, making long documents scroll smoothly.

Writing Mode

Writing mode provides a dedicated writing environment for novel creation.
- Ruled Lines and Auto-save: Provides a ruled-line background (drawn with CSS gradients; native scrolling without lag), and automatically saves after 3 seconds of no input.
- Typography Control: Supports switching fonts (serif / Kaiti / sans-serif / monospace), font size (A-/A+), line spacing, left and right margins, and paper background (default / beige / light green / blue).
- Formatting: Supports one-click removal of first-line indentation and automatic blank lines between paragraphs.

Bookshelf System

Text files that have been read are automatically added to the bookshelf. The bookshelf view and file tree view can be toggled via the top bar icon.
- Management: Supports sorting by most recently read time, and allows pinning, searching, and removing.
- Resume Reading: Clicking a book on the bookshelf automatically opens it in reading mode and resumes reading.
- Invalid Detection: If the source file is moved or deleted, the bookshelf marks it as “Cannot Open”; it can be removed with one click.

EPUB Read-only Reading

Opening a .epub file in the file tree automatically enters read-only reading mode.
- Rendering: Integrates foliate-js to extract and render directly in the browser.
- Progress Memory: Uses CFI (precise intrachapter position) to record progress, sharing the same progress field with text reading.
- Security Boundary: Blocks non-same-origin scripts via CSP and allows only the data: / blob: resources required by the EPUB’s own layout. Only read EPUB files from trusted sources.

File Management

  • Fixed Sidebar: Provides a fixed right-side sidebar that can be resized by dragging, replacing the popup two-column panel.
  • Single Workspace Tree: Shows only the file tree for the workspace that the current session belongs to.
  • References and Jumping: Supports inserting @ file references using native mechanisms; clicking a file link in the conversation opens it within the plugin.

Installation

dsh plugin --profile web add github:Nth-5620/dsh-readwrite-hub

After installation, restart dsh web and hard refresh the browser (Ctrl+Shift+R). The “Workspace Files” button appearing at the bottom of the sidebar indicates successful loading.

Typical Usage

  1. Open a text file (.txt or .md) in the sidebar file panel.
  2. Click the “Writing” button in the toolbar to enter writing mode, or click “Reading” to enter book mode.
  3. In reading mode, click the “Bookshelf” icon in the top bar to switch views, or click the table of contents to jump directly to the corresponding chapter.
  4. Click the “Bookshelf” icon in the top bar to close the bookshelf and switch back to the file tree view.

Notes

  • Runtime Environment: The plugin runs entirely locally, does not initiate outbound network connections, and does not upload file contents. File reading and writing are completed through a local HTTP API.
  • Version Dependency: Requires DeepSeek Harness 0.1.1-rc.2+ or 0.1.2-alpha.1+.
  • EPUB Security: EPUB mode is read-only; only read EPUB files from trusted sources.
  • Permission Scope: If you manually bind dsh web to a non-loopback address, the plugin API will be exposed on a non-local network. Do not expose DSH with this plugin directly to the public internet.