DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Tool Ocr — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
T

dsh-tool-ocr

Tool Ocr

Extract text from images and PDFs in DeepSeek Harness: read a born-digital text layer, or OCR a scan with any engine you configure.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:yuehancn/dsh-tool-ocr#6248268d0037100eaf4cbe9a25f1dcffb619096a
READMECompatibilityVersions

Compatibility and provenance

Tool Ocr is published as dsh-tool-ocr and currently resolves to version 1.0.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
github
Registry updated
10/2/2026

Versions

1.0.0stable
10/2/2026

Related plugins

Loading related plugins…

Latest
1.0.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
any
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
10/2/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in vision-media.

Modlens@liustack/modlensPlug-in vision for text-only LLMs, powered by the free Antigravity CLITool Describe Image@linxin666/dsh-tool-describe-imageModel-facing describe_image tool for the dsh web GUI: gives a text-only model image understanding by asking a vision-language model at an OpenAI-compatible endpoint to describe one image (local path, http(s) URL, or attachment reference). Hot-pluggable — Vision Routerdsh-vision-routerEyes for text-only DeepSeek Harness agents: built-in free vision chain + pixel-level tools. Remote vision providers, including the default free fallback, receive image content unless strict local-only use is configured.Vision Toolkit@anionex/dsh-vision-toolkitDeepSeek Harness-native integration for agent-vision-toolkit: image Q&A, OCR, grounding, UI restoration, pixel diff, Artifacts, and Web UI.

README

dsh-tool-ocr

在 dsh 里直接读图取字 —— 把截图、扫描件、发票、合同 PDF 丢给 Agent, 它自己判断有没有文字层,没有就调你配置的 OCR 引擎,最后把正文交回来。

给 DeepSeek Harness 用的自建工具插件:图片 OCR + PDF 文本抽取。

Compatibility: built and tested against dsh 0.2.0-rc.2 (preview). The apply(ctx) plugin spec is stable; verify against your own dsh version if newer.


一行安装

dsh plugin --profile desktop add github:yuehancn/dsh-tool-ocr

支持的 profile:desktop(桌面版)/ web(Web 版)。装完重启 dsh 即可用。


它解决什么问题

Agent 能读文本文件,但读不了图里的字。你发给它一张发票截图、一份扫描合同、 一个手机拍的表格,它只能猜。这个插件补上这一段:

输入插件怎么处理
带文字层的 PDF(电子合同、导出的报告)直接读文字层,不调 OCR,快且准
扫描件 / 图片型 PDF检测到文字层为空 → 自动栅格化 → 调 OCR 引擎
图片(截图、照片、表格)直接交给 OCR 引擎

关键点:(1)它会先判断是不是电子版,不会把电子 PDF 白跑一遍 OCR; (2)引擎是你自己配的,tesseract / PaddleOCR / 公司内部 API 客户端都能接。


两个工具

ocr_read

ocr_read(path, engine?, lang?, pages?, saveAs?)
  • path —— 图片或 PDF 的绝对路径
  • engine —— 用哪个 OCR 引擎;不填走默认
  • lang —— 语言提示,如 chi_sim+eng
  • pages —— PDF 页码范围,如 1-3 或 2,5
  • saveAs —— 把抽出的文字另存到输出目录

返回:text(正文)+ kind(image / pdf)+ engine(实际用的引擎)

  • pages + textPath + note(走了哪条路径、有什么提醒)。

note 是有意暴露给你的:Agent 能据此判断「这次结果可不可信」, 而不是把一堆字照单全收。

ocr_status

报告本机哪些引擎真能用(逐个探 --version),以及当前后端是什么。 动手 OCR 之前先问一句,能避免白跑一次几秒到几十秒的任务。


配置引擎

默认 backend: native —— 只用 poppler 读 PDF 文字层,不需要装任何 OCR。

要读扫描件,改成 command 并在 engines 里加一个:

# ~/.dsh/profiles/<profile>/cordis.patch.yml
- id: tool-ocr
  config:
    backend: command
    outputDir: C:/Users/you/Documents/ocr-output
    engines:
      - id: tesseract
        label: Tesseract 中英混排
        command: tesseract
        args: ["{input}", "{output}", "-l", "chi_sim+eng"]
        isDefault: true

参数占位符(在 args 里可用):

占位符展开成
{input}交给引擎的图片绝对路径
{output}引擎应写入纯文本的绝对路径
{lang}本次调用的 lang 参数(可为空)

引擎把文字写进 {output} 或打到 stdout 都行 —— 两种都被识别。

再配一个引擎(比如表格走 PaddleOCR、正文走 tesseract)就是再加一个条目:

    engines:
      - id: tesseract
        command: tesseract
        args: ["{input}", "{output}", "-l", "chi_sim+eng"]
        isDefault: true
      - id: paddle
        label: PaddleOCR(表格/版面更好)
        command: python
        args: ["-m", "paddleocr", "--image_dir", "{input}", "--use_angle_cls", "true"]

依赖

插件本体只在 Node 里跑,不装任何 Python 包。外部依赖按需:

依赖用途不装会怎样
pdftotext(poppler)读 PDF 文字层电子 PDF 也读不了,note 会告诉你
pdftoppm(poppler)把 PDF 页栅格化成图扫描 PDF 无法 OCR
任一 OCR 引擎识别图里的字图片输入直接报错,提示你配置

Windows 装 poppler:下载 poppler-windows 解压,把 bin 加进 PATH, 或直接把 pdftotext.exe 的完整路径写进 config 的 command。 Windows 装 tesseract:用 UB-Mannheim 的安装包,记得勾中文语言包 (chi_sim),否则 -l chi_sim 会报缺 traineddata。


安全说明

  • 插件只读你给的那个文件,不扫目录、不上传、不联网。
  • OCR 引擎是你配置的本地命令,插件用 spawn 直接调用, 不经 shell 拼接 —— 路径里的空格、引号、中文都不会出问题。
  • 抽取的文字写到 outputDir,仅此一处写盘。

跑测试

三个套件,85 条断言,全部针对真实的 dsh 运行时跑(不是 mock 掉 defineTool):

# 1) 把 dsh 的依赖链放进 node_modules(复用本机已装的 profile)
PROFILE=~/.dsh/profiles/desktop/node_modules/@deepseek-ai
mkdir -p node_modules/@deepseek-ai
cp -r "$PROFILE/." node_modules/@deepseek-ai/

# 2) 跑全部
node _test/run-all.mjs
套件覆盖什么
test-logic.mjs页码解析、类型判定、参数模板、引擎选择、Config 默认值
test-integration.mjs插件加载、工具注册、开关生效、输出 schema、错误路径
test-e2e.mjs真跑子进程:调一个模拟引擎,验证抽取、存盘、选引擎、失败透传

test-e2e.mjs 用 _test/fixtures/mock-ocr.mjs 冒充 tesseract, 遵守同样的 {input} {output} 约定 —— 所以除了识别模型本身, spawn、参数替换、读结果、错误处理全都真跑过。


许可

MIT