Preface¶
In DeepSeek Harness Web, image attachments have a native workflow, but documents do not have a ready-made entry point. To get a model to view a PDF report or an XLSX spreadsheet, the common practice is to copy the text out and paste it into the input box: long documents are prone to truncation, and table structures and formatting are lost; building a custom upload and parsing pipeline involves handling storage, format support, and context usage issues.
DSH’s philosophy is “everything is a plugin,” and file input can also be delegated to a plugin. The dsh-file-resource introduced below does exactly this: it adds an attach entry at the top of the original + menu in the input box, parses documents locally into session-isolated private resources, and allows the model to read them on demand via a restricted reading tool.
What is this¶
dsh-file-resource is a local file input plugin for DeepSeek Harness Web, maintained by liznee, under the MIT license. The version number in the repository’s package.json is 0.4.9, with the latest log entry being v0.4.9 (2026-08-29).
The problems it solves can be summarized in three points:
- Give the Web input box a unified entry point where images, documents, text, and common code files can be selected;
- Parse documents locally into session-isolated private resources, allowing the model to read only when necessary via a restricted tool;
- The number of characters read per time has a default value and a hard cap, making context usage controllable.
Core Features¶
Attach Entry and File Selection¶
Instead of adding a separate button, the plugin adds attach at the top of the original + menu in the input box. A file selector accepts images, documents, text, and common code files simultaneously and supports multiple selections; it also supports global drag-and-drop (dragging files to any position in the window) and pasting files via Ctrl+V in the input box.
Documents are displayed as cards inside the rounded input box, showing real upload progress and local parsing status; the gray circular × on the right side of the card can cancel the upload or remove the file.
Separate Handling of Images and Documents¶
Images are still handled by Harness’s native preview, delete, persistence, and multimodal model workflows; the plugin does not take over this pipeline. Document parsing, however, is completed entirely locally, without calling the model or telemetry during upload or parsing.
@Filename Reference and Split-Pane Preview¶
When sending a message (including sending files without entering text), the plugin automatically appends an @filename reference at the end of the message: chat history can directly see which files are attached to this message, and the model maps the file name to the resource ID before reading.
Clicking the blue @filename in the chat triggers a split-pane preview of the file content on the right side: Excel/CSV displays a grid-based table, and × or Esc closes it. Files that have been sent can still be previewed within the current session, even if the attachment card has been removed from the input box.
Restricted Reading Tool: read_uploaded_resource¶
The plugin fixes a reading tool named read_uploaded_resource. The model does not receive the full document text at once; instead, it calls this tool as needed. The default is a maximum return of 8,000 characters per call, with a hard cap of 24,000 characters.
Supported Formats and Limitations¶
| Category | Format |
|---|---|
| Documents | PDF, DOCX, XLSX, PPTX, ODT, ODS, ODP, RTF, EPUB |
| Text & Code | Common text and code files |
Note two limitations before use:
- Old binary
DOC,XLS,PPTare not supported; they must be saved asDOCX,XLSX,PPTXfirst. - PDF only reads the text layer; pure scans will not be automatically OCR’d.
Local Storage and Cache¶
Capacity and Cache Rules:
- Single file limit 50 MiB; single selection limit 20 files, total 200 MiB.
- Total cache limit 1 GiB, deduplicated by content SHA-256; when the limit is reached, old resources that have been sent are cleaned up using LRU.
- Objects with no references are retained for up to 7 days.
Default cache path:
$DSH_HOME/resources/dsh-file-resource/v1
If DSH_HOME is not set, it is:
~/.dsh/resources/dsh-file-resource/v1
Security and Privacy¶
- Browser interface requires same-origin requests and plugin-specific request headers.
- Extensions, declared types, and file magic numbers are cross-validated to reject spoofed files.
- ZIP/Office files are protected against zip bombs.
- PDF.js is fixed to a patched version, with scripts and dynamic evaluation disabled.
- The plugin contains no statistics, telemetry, or third-party uploads; only after the user sends a message does the model provider receive the content through the normal Harness process.
Installation and Enablement¶
Environment requirements are consistent with the current DeepSeek Harness: Node.js 22.19+ or 24+; README states v0.1.1 has been verified on DeepSeek Harness 0.1.1-rc.1.
Install from npm:
dsh plugin --profile web add dsh-file-resource
Alternatively, install the corresponding GitHub Release directly:
dsh plugin --profile web add github:liznee/dsh-file-resource#v0.4.9
After installation, verify the configuration is written and then restart the service:
dsh --profile web --dump-config
You should see # == dsh-file-resource in the output. Then restart dsh web and select attach from the + in the bottom left of the input box.
Uninstall when no longer in use:
dsh plugin --profile web remove dsh-file-resource
Local Development and Verification¶
If source code is modified, build and install locally:
npm install
npm run build
dsh plugin --profile web add C:\absolute\path\to\dsh-file-resource
The repository comes with tests; it is recommended to run the full suite after changes:
npm test
npm run test:coverage
npm audit --omit=dev
npm run pack:check
Typical Usage¶
Following the steps above, the plugin is enabled. A complete usage workflow is as follows:
- Click
+in the bottom left of the input box, selectattachat the top, and select multiple files at once; you can also drag files to any position in the window or paste files in the input box withCtrl+V. - Wait for the upload progress and parsing status on the attachment card to complete; during this time, you can cancel the upload or remove the file using the
×on the right side of the card. - Send the message normally; you can also send files without typing text. The message will automatically append
@filenameat the end. - Click the blue
@filenamein the chat to view the content in the split-pane on the right; press×orEscto close if not needed.
Use Cases and Notes¶
Suitable scenarios: Frequent need to hand PDFs, DOCX, XLSX, etc., to the model without manually copying and pasting text; desire to keep document parsing local and avoid telemetry on the attachment pipeline.
Notes before use:
- The plugin runs with the permissions of the current dsh process; it is recommended to check the source code and license (MIT) yourself before installing.
- Convert old format files first; scanned PDFs will not automatically recognize text.
- If security issues are found, report them privately following the repository’s
SECURITY.md; do not disclose details in public Issues.
Summary¶
What dsh-file-resource does is simple: transform local documents into resources that are referenceable, previewable, and readable by the model on demand within the session, keeping the parsing process local. If you are using DeepSeek Harness Web to handle documents, it is worth a try.
- GitHub repository: https://github.com/liznee/dsh-file-resource
- Community directory page: https://www.skillhub.cn/plugins/liznee/dsh-file-resource (The community directory is an independent site and has no official affiliation with DeepSeek or Hackverse)