Expose MineRU document parsing tools to the model.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:HuanLinOTO/dsh-plugin-mineru
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
dsh-mineru
DSH 插件:向模型暴露 MinerU 文档解析工具。MinerU 可将 PDF、图片、DOCX、PPTX、XLSX 等文件转换为结构化的 Markdown / JSON。
安装
# 从 npm 安装(推荐):
dsh plugin --profile web add @huanlin/dsh-plugin-mineru
# 从本地 checkout 开发安装:
dsh plugin --profile web add link:D:\Projects\deepseek-harness\dsh-mineru
若从 git 安装(pnpm ≥10),需在 profile 的 pnpm-workspace.yaml 中允许构建:
allowBuilds:
'@huanlin/dsh-plugin-mineru': true
配置
在 DSH GUI 的 Plugins 页(插件列表 → @huanlin/dsh-plugin-mineru 包 → dsh-mineru 行 → Configure)或 cordis.patch.yml 中配置。配置页的修改通过 dsh 0.1.7-rc.1 的 profile-owned Config 持久化到当前 profile 的 cordis.patch.yml,并对运行中的 mineru_* 工具即时生效:
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
baseURL |
string | (必填) | MinerU API 地址,如 http://your-mineru-host:18000 |
apiKeyEnv |
credential-ref | MINERU_API_KEY |
API key 的环境变量名 / 凭据引用。测试实例无需鉴权。 |
defaultBackend |
enum | pipeline |
pipeline / vlm-engine / hybrid-engine / vlm-http-client / hybrid-http-client |
defaultParseMethod |
enum | auto |
auto / txt / ocr |
defaultLang |
string | ch |
pipeline 后端的语言代码 |
pollIntervalMs |
number | 2000 |
异步状态轮询间隔 |
pollTimeoutMs |
number | 600000 |
mineru_parse_document 最大轮询时长(10 分钟) |
requestTimeoutMs |
number | 60000 |
单次 HTTP 请求超时 |
maxMdOutputChars |
number | 200000 |
内联返回给模型的 markdown 字符上限;超出时完整内容存到临时文件 |
工具
mineru_parse_document(推荐)
解析本地文档并返回提取出的 markdown。内部自动完成:提交文件 → 轮询至完成 → 返回 markdown。大多数解析任务用这个即可。
mineru_submit_parse_job
异步提交解析任务,立即返回 task_id。适合大文档或并行批量提交。
mineru_get_parse_status
轮询异步任务状态,返回 pending / processing / completed / failed。
mineru_get_parse_result
获取已完成任务的结果。内联返回 markdown(过大则截断),并将完整结构化 JSON 存到 raw_result_path。
mineru_health
检查服务器健康状态、版本、队列深度与并发容量。
开发
pnpm install # 安装开发依赖(schemastery、typescript、vitest)
pnpm run typecheck # tsc --noEmit 类型检查
pnpm test # vitest run 单元测试
pnpm run build # tsdown 构建 → lib/
目录结构
dsh-mineru/
├── src/
│ ├── index.ts # 入口:name、inject、Config(Schemastery,字段 .volatile())、apply
│ ├── client.ts # MinerUClient(基于 fetch 的 HTTP 客户端 + 类型)
│ ├── tools.ts # 5 个 defineTool 定义 + 辅助函数 + registerTools
│ ├── rpc.ts # mineru.health /api Fetch 路由(Plugins 页配置卡「测试连接」)
│ ├── client/ # 浏览器半:plugins.row.config 注册(Plugins 页行配置卡)+ configForms 取数/写数
│ └── types.d.ts # CSS modules 环境类型声明
├── tests/
│ └── tools.spec.ts # 单元测试(mock fetch,无需真实服务器)
├── cordis.patch.yml # bundle 层:插入 dsh-mineru 插件行
├── package.json # dsh.bundle.patch 声明 + peerDeps
└── tsconfig.json # NodeNext、ES2022、strict
测试 API
请自己部署 MinerU 实例。cordis.patch.yml 默认指向 http://localhost:18000,请在 DSH GUI 的 Plugins 页打开本插件的 Configure 页覆盖 baseURL,改为你的 MinerU 服务器地址。
Links
More in this category
tt-a1i/archify#integrations/deepseek-harness★ 72899
Generate validated, self-contained interactive architecture, workflow, sequence, data-flow, and lifecycle diagrams from repositories or system descriptions.
dream-num/dsh-univer-office★ 423
Give DeepSeek Harness a real office environment. Univer Office Plugin brings spreadsheets, docs, slides, canvases, relational tables, and more into one runtime — with connected data, validation, versioned changes, and isolated worktrees for multi-agent collaboration.
PerryLink/dsh-industry-research★ 175
Deterministic industry research reports for DeepSeek Harness — company and industry research flows produce structured, verifiable reports from staged evidence.
kw78/dsh-office-tools★ 25
Workspace-safe Office tools for agents: create/read Word, create/read/update Excel, and create/read PowerPoint decks with PNG/JPG/GIF image placement.
hanzhangzzz/dsh-diagram★ 14
Editable Excalidraw diagrams for DeepSeek Harness conversations.
fly233338/dsh-overleaf★ 12
Connect multiple Overleaf projects to DSH through OverleafMCP for browsing, analysis, and Git-based file updates.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.