Preface¶
When you hand an annual report PDF, a scanned invoice, or an Excel spreadsheet to an agent, the most common workflow is to upload it to a cloud parsing service first, then paste the extracted text back into the conversation. This works, but once contracts, financial reports, or internal scanned documents leave your local machine, it becomes difficult to maintain strict permission boundaries. Pure text models also cannot read binary documents: without local parsing, the agent can only see the filenames.
DeepSeek Harness (dsh) is an open-source agent framework developed by DeepSeek AI, with the official slogan “Everything is a plugin”: models, tools, sessions, sandboxes, and interfaces can be added or removed at the configuration layer without modifying core source code. As a result, the community has produced a number of single-purpose plugins. dsh-docs focuses on the document side — it converts PDFs, Office files, images, and scanned documents into Markdown, plain text, or structured JSON locally, with offline OCR, no HTTP services required, and no API Key needed.
This article is collated after cross-checking against the community plugin directory, the GitHub repository’s README / README.zh-CN.md / INSTALL.md / package.json, and the official deepseek-ai/deepseek-harness repository. The community plugin directory deepseek-harness-plugin.com is an independent site and has no official affiliation with DeepSeek / HyperMind, and should not be treated as an official app store. Harness is currently in developer preview, and plugins may have incompatible changes with core updates.
What is this¶
dsh-docs is a document intelligence plugin for DeepSeek Harness, maintained by GitHub user Sqhao-O. The repository uses the MIT license, and its primary language is TypeScript. The community directory categorizes it under the “Memory” section: it does not build cross-session knowledge graphs, but instead parses local documents into text that models can read, effectively equipping agents with a readable file memory.
Several names need to be clarified to avoid installation errors:
- The GitHub repository name is dsh-docs.
- The npm package name and plugin ID is dsh-doc (without the trailing s).
- Tool names uniformly follow the dshdoc_* format.
- The initial version used dsh-docling / docling_*, which has since been renamed.
The current version in package.json is 0.1.1. As of 2026-08-18, the GitHub API shows 9 stars for this repository; the community directory page showed 6 stars during the same period, so the GitHub primary data will be used as the reference here. The prerequisite for running is a working dsh CLI, with Node.js version requirement of ^22.19 or >= 24.
Its targeted problem is very specific: hand PDFs, Word, Excel, PowerPoint files to a local engine and get clean text back; hand scanned documents or images to offline Tesseract to extract text. The repository explicitly states “No Docker, no HTTP services, no API Keys, documents never leave your disk”.
Core Features¶
The covered input formats listed in the repository README are as follows. Integration tests generate PDF, DOCX, XLSX, PPTX, PNG, and scanned PDF in a temporary directory and perform real parsing; for other formats supported by Xberg, the author recommends verifying with your own corpus before deploying to production.
- Office and text files: PDF, DOCX, XLSX, PPTX, Markdown, HTML, CSV, plain text.
- Images and scanned documents: PNG, JPEG, TIFF, WebP, and scanned PDFs, using local OCR.
- Three output types: Markdown, plain text for model consumption, or JSON structured Tool Result. The default output format is
md.
There are two parsing paths, which are critical for enabling OCR:
- Windows x64 full path: A fixed, self-contained Python + Xberg runtime is provided with the package. Prebuilt artifacts include CPython 3.11.9, xberg==1.0.14, and fixed eng / chi_sim Tesseract language packs. Downloads perform SHA-256 verification, and come with a manifest, NOTICE, and SPDX inventory, without modifying the global Python installation. This is the “full offline OCR” path specified in the repository.
- Node fallback for any platform: Native Xberg Node bindings are used for PDF / Office / text parsing. defaultOcr defaults to false. To enable OCR with the Node engine, you must point tessdataPath to a locally verified directory containing all required .traineddata files; missing language packs will return ENGINE_OCR_UNAVAILABLE and will not download models automatically.
There are four public tools in total:
| Tool | Purpose |
|---|---|
dshdoc_health |
Check if the current local parsing engine is ready, and report available OCR languages. |
dshdoc_extract |
The recommended convenient tool for local files. |
dshdoc_convert_file |
Parse local files in the whitelist. |
dshdoc_convert_url |
A compatibility placeholder that always returns UNSUPPORTED_URL. |
HTTP(S) inputs will only be recognized and rejected. To parse remote documents, you must first use an approved download process to save them to an allowed directory before calling this plugin. The plugin will not pass URLs to Xberg or Python workers, to avoid redirection and DNS rebinding attacks.
The following options can be passed during conversion:
- page_range: 1-indexed, inclusive page range, applicable for Markdown and plain text; JSON output intentionally retains the full structured document.
- ocr_languages: Override the language set per request, for example ["chi_sim", "eng"].
- When the engine reports results, it will mark OCR: applied / OCR: not used. Enabling OCR will not overwrite intact embedded text layers in PDFs.
Security boundaries are also clearly documented in the README, not just slogans: paths are resolved with realpath and compared against the whitelist root directory and session workspace, blocking .. attacks, symbolic link escapes, root directories, non-files, and oversized files; a byte snapshot is read immediately after authorization, and parsing uses the snapshot rather than the path which may be modified later; both Node and Python engines only accept bytes, and do not create listening ports, URL downloaders, containers, or external parsing services. The default input limit maxFileBytes is 52428800 (50 MiB), and the default output limit returned to the model maxOutputChars is 32000.
Installation and Activation¶
The installation command given on the community directory page is as follows, taken directly from the page:
dsh plugin add github:Sqhao-O/dsh-docs
For reproducible installations, the directory page recommends pinning the commit hash:
dsh plugin add github:Sqhao-O/dsh-docs#commit
Replace #commit with the actual commit hash. The directory page also reminds users that the plugin runs with the permissions of the current dsh process, and may execute code during installation; you should inspect the source code repository and license before installing.
The INSTALL.md in the repository provides more detailed instructions. dsh web always uses the web profile, and installing the plugin to the default profile will make it unavailable in the web interface. The author’s recommended installation method for packaged releases is:
dsh plugin --profile web add dsh-doc
Only Windows x64 requires an additional download of the prebuilt offline OCR runtime, which should be placed in a stable directory outside node_modules to avoid it being deleted during plugin upgrades. The path in the YAML configuration must be an absolute path, and do not rely on ~:
node $HOME/.dsh/profiles/web/node_modules/dsh-doc/scripts/fetch-runtime-win32-x64.mjs $HOME/.dsh/runtimes/dshdoc-runtime-win32-x64
Then add or update the following entry in the profile’s cordis.patch.yml, preserving existing entries:
- id: dsh-doc
config:
engine: python
runtimeDir: $HOME/.dsh/runtimes/dshdoc-runtime-win32-x64
defaultOcr: true
maxOutputChars: 32000
Replace $HOME with the absolute path to your home directory. The session workspace is readable by default, and you do not need to configure allowedLocalRoots first; this field is only used for persistent directories such as shared document libraries outside the workspace. Setting allowWorkspaceFiles: false will revert to a strict whitelist lock.
Users on other platforms should skip the runtime download and use this configuration instead:
- id: dsh-doc
config:
engine: node
defaultOcr: false
maxOutputChars: 32000
After installation, verify the synthesized configuration with the following command, then restart dsh web:
dsh --profile web --dump-config
INSTALL.md warns that DSH may rewrite profile layers when dumping configurations, so you should version control your official configuration or back it up first. After restarting, first have the agent call dshdoc_health to confirm the engine and OCR language packs are ready, then parse files in the workspace.
The repository also provides an installation prompt that can be pasted directly into a dsh web session, allowing the agent to complete installation, pull the runtime, edit the YAML, and verify step-by-step in the terminal. Hard constraints are clearly stated: do not install, launch, or configure Docling Serve, Docker, containers, or any remote document conversion services; do not configure downloadable OCR backends, and do not allow model downloads during parsing. The baseUrl, apiKey, enableRemoteUrls, and allowPrivateUrls fields in old profiles are only accepted for migration compatibility, and cannot be used to re-enable remote parsing.
Typical Usage¶
After restarting dsh web, relative paths are resolved relative to the DSH session working directory, not the directory where you started dsh web. Only files under the session working directory or allowedLocalRoots are readable. The natural language example given in the repository is:
Read ./reports/annual-report.pdf and list the three main risks.
Extract the tables from ./financials.xlsx.
Extract the text from ./scanned-invoice.png.
A more secure workflow is to first have the agent run dshdoc_health to confirm the engine and OCR language packs are ready, then use dshdoc_extract to parse specific files. A full OCR configuration example (Windows x64) can also include table mode and output format:
- id: dsh-doc
config:
engine: python
runtimeDir: /absolute/path/to/dshdoc-runtime-win32-x64
maxFileBytes: 52428800
maxOutputChars: 32000
defaultOcr: true
defaultTableMode: accurate
defaultOutputFormat: md
engine defaults to auto: it uses Python if an embedded Python runtime is configured, otherwise falls back to Node Xberg. defaultOcr defaults to false, and should only be enabled when you have configured local tessdata. defaultTableMode can be either fast or accurate. timeoutMs defaults to 120000.
If you need to copy the runtime to another Windows machine, the repository requires you to first run:
node ./scripts/verify-runtime-win32-x64.mjs
Verify the payload hash before pointing runtimeDir to it. To audit and rebuild the runtime from source, use node ./scripts/build-runtime-win32-x64.mjs, and the built artifacts will default to the Git-ignored directory .dsh-runtime/runtime-win32-x64.
The Python worker only receives file byte snapshots, display names, MIME types, and options via stdio, and does not accept user paths or URLs; missing OCR language packs will fail securely and disable OCR caching for document parsing.
Applicable Scenarios and Notes¶
This plugin is suitable for the following use cases:
- You already have PDF / Office documents locally and want dsh web to read them directly without manually converting to text first.
- Text from scanned documents, photographed invoices, or screenshots needs to be included in conversations, but you do not want to use cloud OCR.
- You are on a Windows x64 environment and are willing to download a fixed-hash offline runtime for full PDF / Office / OCR coverage.
- You are on Linux / macOS and primarily parse text-layered PDFs and Office files, and can accept the Node fallback with OCR disabled by default.
There are several boundary conditions you need to understand before use:
1. Permissions and Source: The plugin runs with the permissions of the current dsh process, and may execute build scripts during installation. Before installing, you should read the source code and MIT license of Sqhao-O/dsh-docs; pin the commit hash for reproducible installations.
2. Platform Differences: The full offline OCR is currently prebuilt for Windows x64 as per the repository instructions; the default path for other platforms is the Node engine with defaultOcr: false. Do not assume scanning documents will work out of the box.
3. Readable Scope: Relative paths are relative to the session working directory, not the startup directory. Directories outside the workspace must be added to allowedLocalRoots.
4. 易混淆的分类名: The directory categorizes it under “Memory”, but it solves the problem of making local documents readable, rather than cross-session experience databases like graph-memory. There is another plugin in the same ecosystem called dsh-docs-panel, which provides a Markdown note reading panel in the Web UI, which is unrelated to this plugin.
5. Remote Documents: dshdoc_convert_url will reject URLs. Download the document to an allowed directory first before parsing.
6. Result Length: The text returned to the model is truncated to 32000 characters by default; for JSON outputs, the truncated formatted text that the model actually sees is used. For long annual reports, you may need to use page_range to parse in segments.
7. Runtime Location: Do not place the OCR runtime in the node_modules directory, as it will be deleted during plugin upgrades.
8. Early Version: The current npm version is 0.1.1, and tests cover common office formats and scanned PDFs; the repository still recommends verifying unsupported formats with your own corpus first.
Summary¶
dsh-docs adds a local document entry point for DeepSeek Harness: PDFs, Office files, images, and scanned documents are parsed within authorized directories. Windows x64 can use the fixed-hash offline Python / Tesseract runtime, while other platforms can use Node Xberg as a non-OCR fallback. The community directory installation command is dsh plugin add github:Sqhao-O/dsh-docs; for daily use in dsh web, the repository recommends dsh plugin --profile web add dsh-doc, and whether you need to pull the OCR runtime depends on your platform.
Directory page: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-docs/
GitHub: https://github.com/Sqhao-O/dsh-docs