Introduction¶
When working in a conversation within DeepSeek Harness (DSH), the Assistant frequently needs to view local files: reading a segment of text, parsing a DOCX or XLSX, performing OCR on an image, or rendering a specific page of a document into an image. Relying solely on manual text pasting makes it easy to lose file structure, table ranges, and page positions; switching to external tools interrupts the workflow.
dsh-open-file is a DSH plugin maintained by hyper-dsh-plugins, designed for DeepSeek Harness Web. It provides workspace-scoped file attachments, document reading, local OCR, and page rendering capabilities. It is released under the MIT license, with the GitHub repository at:
https://github.com/hyper-dsh-plugins/dsh-open-file
Below is an introduction to its features, installation methods, typical usage, and limitations.
What is this¶
The positioning of dsh-open-file is:
Workspace-scoped file attachments, document reading, local OCR, and page rendering for DeepSeek Harness Web.
It integrates into the DSH Web session, uploads files into the current active session workspace, and provides a set of trackable file tools for the Assistant. The plugin registers the Host service, Web client, and Skill via cordis.patch.yml.
The verified environment requirements are as follows:
- DeepSeek Harness:
0.1.0-rc.6 - Node.js:
>=22.13.0 - Operating System: Windows, Linux, macOS
- Browser APIs:
fetch,XMLHttpRequest,File, drag and drop, clipboard file paste
Core Features¶
The plugin primarily solves three things: putting files into the session, allowing the Assistant to inspect and read the content, and converting available content into referable or renderable results.
Specific capabilities include:
- Adding an
Add → Attachmententry to the existing+menu. - Receiving multiple files via the system file picker, page range drag-and-drop, and clipboard paste.
- Displaying format icons, upload progress, cancel, retry, and remove controls in compact draft cards.
- Placing attachment cards below the corresponding user message after sending, maintaining session alignment.
- Streaming write the same-origin binary upload to the active session workspace.
- Providing four agent tools:
file_inspect,file_read,file_ocr,file_render. - Reading text, PDF, DOCX, PPTX, XLSX, bounded ZIP archives, common image formats, and metadata of ordinary files.
- Running English and Simplified Chinese OCR using packaged language data.
- Returning source hashes, locators, cursors, parsers, and stable references to facilitate tracking reasoning.
The responsibilities of the four tools are as follows:
| Tool | Responsibilities |
|---|---|
file_inspect |
Returns metadata, parser details, and an optional part_ref value |
file_read |
Reads the selected part, supporting text cursors or worksheet ranges |
file_ocr |
Runs local English and Simplified Chinese OCR on the selected image part |
file_render |
Renders the selected document part as a workspace PNG |
Installation and Enablement¶
Before installation, confirm that the current DSH Web environment meets the compatibility requirements mentioned above. Then execute the installation command:
dsh plugin --profile web add dsh-open-file
After installation, the plugin will register the corresponding Host service, Web client, and Skill, relying on DSH Web Host’s same-origin upload capability to handle file uploads.
If you need to remove the plugin later, you can execute:
dsh plugin --profile web remove dsh-open-file
Typical Usage¶
Below is a reproducible workflow. First, open a DSH session with an active workspace, and then add files via the attachment entry.
- Open a DeepSeek Harness session and confirm that there is currently an active workspace.
- Select
+→Add→Attachment, or drag files to the Web app page, or paste files from the clipboard. - View the draft cards and wait for the upload to enter the ready state.
- Send a message; the session will generate session-bound attachment references:
dsh-open-file://attachment/v1/...
- Let the Assistant perform inspect, read, OCR, or render on the selected content.
- After the above steps, the Assistant can continue to answer or process tasks based on the file content.
Tool calls typically follow the order of “inspect first, then read, OCR, or render”:
- Use
file_inspectto get metadata, parser details, and the optionalpart_ref. - Use
file_readto read text, worksheet ranges, and other available content based on the returned part. - If the target is an image, use
file_ocrto perform local OCR on the selected image part. - If the target is to turn a document page into an image, use
file_renderto generate a workspace PNG.
Session Storage and Resource Limits¶
The plugin places source files and derived artifacts under the current session workspace:
<workspace>/.dsh/open-file/v1/sessions/<sha256(session-id)>/
The plugin reads and writes this session directory and registers same-origin upload routes on the DSH Web Host.
OCR uses the packaged eng and chi_sim language data. The extracted file content will be marked as untrusted evidence for reference by downstream inference; it should be handled as untrusted input.
The default resource limits are as follows:
- File size: 256 MiB
- Draft files per session: 20
- Draft bytes per session: 512 MiB
- ZIP entries: 10,000
- Expanded ZIP entry: 64 MiB
- Total expanded ZIP bytes: 512 MiB
- ZIP compression ratio: 100:1
- Upload timeout: 300 seconds
- Parse and render timeout: 30 seconds
- OCR timeout: 120 seconds
- Rendered pixels: 40,000,000
Use Cases and Notes¶
This plugin is suitable for scenarios where local files need to be handed to the DSH Assistant for processing, such as reading document summaries, checking tables, recognizing text in images, rendering document pages, or retaining trackable attachment references within a session.
Usage notes:
- The plugin runs with the permissions of the current
dshprocess; the source code, dependencies, and MIT license should be checked before installation. - The plugin will read and write the specified session directory and register same-origin upload routes; permissions of the workspace and availability of browser APIs should be confirmed before use.
- File content is marked as
untrusted evidence; the Assistant’s reasoning based on file content should not be equated with the file source having passed external trust verification. - Large files, large ZIPs, long OCR tasks, or high-pixel rendering may trigger default limits; tasks should be planned according to the resource limits above.
Conclusion¶
dsh-open-file adds a workspace file attachment chain to DeepSeek Harness Web: upload, draft control, post-send references, Assistant inspection and reading, and local OCR and page rendering are all completed within the same session.
GitHub repository:
https://github.com/hyper-dsh-plugins/dsh-open-file