dsh-mineru:在 DSH 中把 PDF 解析为 Markdown 的客户端插件

Preface

When performing retrieval, Q&A, or document pipelines in DeepSeek Harness (DSH), the raw materials are often PDFs: research papers, technical manuals, scanned documents. Relying solely on generic text extraction locally often causes formulas and cross-page tables to lose their structure, and long documents may hit the page limit of the remote parsing interface. Below is an introduction to the community plugin dsh-mineru (repo Mu-scorpio/dsh-mineru): it provides a standalone operation panel on the left side of Harness and registers an Agent tool to convert the main text, LaTeX formulas, tables, and charts in PDFs into Markdown via the OpenDataLab MinerU v4 interface, performing chunking and local merging for ultra-long documents.

What is it

dsh-mineru is a DSH plugin classified as a Client, maintained by Mu-scorpio. The description in package.json is: Extract formulas, tables, and text into Markdown in DeepSeek Harness, combined with smart chunking and an interactive UI (MinerU PDF parsing plugin for DeepSeek Harness (DSH): extract formulas, tables, and text into Markdown with smart chunking and interactive UI.).

The plugin is split into a Host engine and a Web Client frontend according to the Cordis specification; the current release version is 1.0.0 in the documentation, and the open-source license is MIT. Community directory page: https://www.skillhub.cn/plugins/Mu-scorpio/dsh-mineru.

Core Features

Left Panel and Task Management

After installing and refreshing Harness, the MinerU Parse entry point will appear in the left main navigation. Upload, option configuration, and task progress viewing are completed on a dedicated page, rather than relying on scattered pop-ups. Task status is managed by the Host and persists after switching pages or refreshing; error codes and “One-click Retry” are provided when errors occur.

Parsing Capabilities

  • Based on the MinerU v4 API, it supports mathematical formula recognition (inline and standalone formulas converted to LaTeX), complex and cross-page table structuring, and multimodal extraction of charts.
  • OCR can be enabled for scanned documents or image-based PDFs.
  • Optional additional exports include docx, html, or latex (“Additional Export” in the interface).

Smart Chunking for Ultra-Long PDFs

The official API has page limits. The plugin detects the total number of pages in the PDF; when exceeding the chunk page count threshold (default 200 pages), it automatically makes batch requests. After parsing, it merges Markdown and image resources locally and maintains image reference paths.

Directory and Credentials

After selecting a PDF, the save directory can be pre-filled with the directory of that file, or a specific path can be specified using the system directory picker. The API Token is only written to the Harness local credentials database ~/.dsh/.credentials.yaml; input in the interface is masked, and it is not uploaded with the session as described in the README.

Agent Tool

In addition to the panel, the plugin registers the mineru_parse tool, which can be called by the smart assistant in conversations to parse a specified PDF and read the results.

Installation and Enablement

The documentation provides three methods; the community plugin market is an independent directory site for the DSH ecosystem and has no official affiliation with DeepSeek / Hypersphere, so you only need to follow the steps below within Harness.

In DeepSeek Harness, open Settings → Plugin Market, search for dsh-mineru, and click Install.

Method 2: DSH CLI

# 从 GitHub 仓库直接添加
dsh plugin add github:Mu-scorpio/dsh-mineru

# 或从 Release 预打包文件免编译极速安装
dsh plugin add https://github.com/Mu-scorpio/dsh-mineru/releases/download/v1.0.0/dsh-mineru-1.0.0.tgz

Enabling Interface

After installation, refresh the application (Cmd + R / Ctrl + R), and the MinerU Parse icon should appear on the left.

Method 3 is aimed at local development (cloning and symbol-link debugging) in the README and can generally be skipped by end users.

Typical Usage

The following steps are from the repository README and can be reproduced in order.

  1. Register on the MinerU Official Platform and copy the API Token.
  2. Click MinerU Parse on the left, paste the Token in the “API Key” field and Save (a green “Configured” should appear in the top right corner).
  3. Drag and drop or select single/multiple PDFs, confirm the parsing options, and click Start Parsing.
  4. After completion, the results are archived to the specified save directory, usually containing full.md, an image directory, and optional docx/html, etc.

Parsing options (excerpt, default values follow the table in README):

Parameter Description Recommended / Default
Model Version vlm (multimodal high precision) or pipeline vlm
Document Language e.g., ch (Chinese/English mix), en ch
Page Range e.g., 1-10,15; leave empty for full text Leave empty
Chunk Page Count Triggers chunking and local aggregation when exceeded 200
Formula Recognition Convert to LaTeX Enabled
Table Recognition Convert to Markdown tables Enabled
Enable OCR Scanned docs / Image PDFs Depends on file type
Additional Export docx, html, latex Optional

When the assistant needs to handle parsing in a conversation, the prerequisite is that the plugin is loaded and the Token is configured, then the assistant can process a specified PDF through the registered mineru_parse.

Use Cases and Notes

Who is it for: Developers and users who need to convert PDFs containing formulas, complex tables, or scanned pages into editable Markdown and want to complete the upload—progress—save flow within DSH in a single chain; long documents rely on built-in chunking, eliminating the need to manually cut and merge by page.

Runtime and Trust Boundary: The plugin runs with the current DSH process permissions, will access the PDF paths you choose, write to the save directory, and initiate parsing requests to the MinerU cloud. It is recommended to read the GitHub source code and the MIT license before installation to evaluate whether to store the Token in the local credentials database.

Dependencies and Network: Parsing quality and timeliness depend on the MinerU v4 service and the network; the README mentions using direct connection and streaming decompression for the parsing result Zip to alleviate TLS resets and timeout issues in certain network environments.

Conclusion

dsh-mineru embeds MinerU’s PDF structuring capabilities into Harness: the panel handles daily batch processing and option tuning, while mineru_parse handles automation within conversations. To check installation package info and community entries, visit the directory page https://www.skillhub.cn/plugins/Mu-scorpio/dsh-mineru, and for source code and Releases, see https://github.com/Mu-scorpio/dsh-mineru.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye