Preface¶
When DeepSeek Harness (DSH) agents process long-form text, they need stable context and retrievable reference material. Relying on a browser to open web pages every time not only interrupts the workflow but is also subject to network and storage limitations. Local files are better suited as a persistent source for a knowledge base.
YuanYue Bookshelf is a DSH plugin that stores books in local files, providing DSH agents with tools to browse books, search, read by section, and track reading progress. It also offers a native reading panel within the settings interface.
Core Features¶
Native Reading Panel¶
In the settings left navigation, select YuanYue Bookshelf to open a native React panel. Within the panel, you can manage your bookshelf, perform full-text search, view the table of contents, navigate pages, and check the progress bar. There is a + import button in the top-right corner, or you can simply drag and drop files.
The page and agent tools read and write to the same progress.json, keeping progress synchronized between the browser panel and agent invocations.
Agent Tools¶
The plugin provides a set of tools on the agent side for programmatic operations:
reader_import path="..."— Import a bookreader_list_books— List imported booksreader_search query="..."— Full-text searchreader_read bookId="..." chapter=0 offset=0 limit=4000— Read content by chapter and offsetreader_progress bookId="..." chapter=2 offset=120— Set or retrieve reading progressreader_notes bookId="..." excerpt="..." note="..."— Add excerpts and notes
Local Data Management¶
Books, progress, and notes are all stored in local files on your machine. By default, they reside under the plugin’s data/ directory:
index.json: Metadata + chapter character rangesprogress.json: Chapter / character offset / percentagenotes.json: Excerpts and notes<id>.txt: Plain-text body content
If you need to store your library elsewhere (e.g., D:\Books), you can specify dataDir in the configuration. The default data/ directory is excluded via .gitignore to prevent personal book libraries from being committed to GitHub.
Installation and Setup¶
Prerequisites¶
DSH 0.2.2+ Web profile.
Installation Steps¶
git clone https://github.com/YuYuesangzi/dsh-whale-reader.git
cd dsh-whale-reader
pnpm install # 或 npm install
Install the local plugin directory in DSH:
- Plugins → Add plugin — Select this directory
- Or have the agent invoke:
plugin_manager install_bundle target="<absolute-path>/dsh-whale-reader"
After installation, refresh the DSH page and open Settings → YuanYue Bookshelf.
Dependencies¶
The plugin depends on jszip, mammoth, and pdfjs-dist.
Typical Usage¶
- Settings → YuanYue Bookshelf
- Use the
+button in the top-right corner to import TXT / DOCX / EPUB / PDF - Navigate pages, view the TOC, and search; progress is saved automatically
Example agent-side invocations:
reader_import path="D:\Books\某本书.epub"
reader_list_books
reader_search query="关键词"
reader_read bookId="..." chapter=0 offset=0 limit=4000
reader_progress bookId="..." chapter=2 offset=120
reader_notes bookId="..." excerpt="..." note="..."
Use Cases and Cautions¶
Suited for scenarios requiring localized, controllable document reading and knowledge base management. All file reads and writes happen locally—no AI API calls are made, and no library data is uploaded.
The plugin runs with the current DSH process permissions. Review the source code and license before installing. The current version is 0.1.8, and the license is MIT.
Summary¶
YuanYue Bookshelf provides a local library solution within DSH: agents can use tools to browse books, search, read by section, and record progress, while the settings interface offers a native reading panel. Books, progress, and notes are all stored in local files—no reliance on browser IndexedDB, and no AI API calls.
- Directory page: https://www.skillhub.cn/plugins/YuYuesangzi/dsh-whale-reader
- GitHub: https://github.com/YuYuesangzi/dsh-whale-reader