DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Windows Ocr — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins

dsh-windows-ocr

Windows Ocr

dsh 插件:使用内置的 Windows OCR 引擎(Windows.Media.Ocr)识别附件中的图像,并仅将识别出的文本发送给模型。文本模型永远不会接收图像字节;视觉透传需选择启用。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add dsh-windows-ocr@0.7.0
README兼容性版本

兼容性与来源证明

Windows Ocr 以 dsh-windows-ocr 发布,当前版本为 0.7.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
npm
Registry 更新时间
2026/9/20

版本

0.8.1stable
2026/9/13
0.8.0stable
2026/9/11
0.7.0stable
2026/9/11
查看其余 11 个版本收起版本
0.6.0stable
2026/9/11
0.5.0stable
2026/9/10
0.4.0stable
2026/9/9
0.3.8stable
2026/9/4
0.3.7stable
2026/9/3
0.3.6stable
2026/9/2
0.3.5stable
2026/9/1
0.3.4stable
2026/9/1
0.3.3stable
2026/8/31
0.3.2stable
2026/8/30
0.3.1stable
2026/8/30

相关插件

正在加载相关插件…

最新版
0.7.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
98.3 kB
文件数
31
Surface
any
许可证
MIT
发布源
npm
GitHub
★ 0
周下载
186
安全扫描
✓ v0.7.0 扫描通过
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题

相关插件

继续浏览 vision-media 分类下经过校验的插件。

Tool Describe Image@linxin666/dsh-tool-describe-image面向模型的 describe_image 工具,用于 dsh Web GUI:通过在兼容 OpenAI 的端点调用视觉语言模型,为文本模型提供图像理解能力,以描述一张图像(本地路径、http(s) URL 或附件引用)。可热插拔 —Modlens@liustack/modlens面向仅支持文本的 LLM 的插件视觉能力,由免费的 Antigravity CLI 提供支持Deepseek Ivideodeepseek-ivideoiPolloWork HyperFrames Video Studio,以及 27 个可编辑视频模板,以原生 DeepSeek Harness 对话视图呈现。Codexdsh-codexChatGPT OAuth、Codex 模型、搜索、read_image URL 支持,以及适用于 DeepSeek Harness 的 gpt-image-2 生成

README

windows-ocr

English | 简体中文

DeepSeek Harness (dsh) plugin that lets text-only models accept attached images: every image is recognized locally with the built-in Windows OCR engine (Windows.Media.Ocr) and only the recognized text is sent to the model API.

Privacy default: image bytes are OCR'd locally and not sent to the provider. Set passthrough: true only if you intentionally want genuine vision models to receive original image bytes.

  • No configuration changes to your models — no input: [text, image] hacks in settings.yaml.
  • Works with any provider/model in dsh; by default every attached image is OCR'd before the request leaves the machine.
  • Vision-model passthrough is opt-in (passthrough: true).
  • Fail-closed: if the plugin is not loaded, models stay text-only and image attachments are refused — nothing can silently leak. Missing attachments are replaced with a refusal text block (never left as raw image).

Install from npm

dsh plugin --profile web add dsh-windows-ocr

(Replace web with your profile, e.g. tui.) Prebuilt and published with Sigstore provenance — no source build or allowBuilds approval needed. Installing from source (this repo) still works via the agent guide or the manual steps below.

or from the repository / a tarball:

dsh plugin --profile web add ./dsh-windows-ocr        # source checkout
dsh plugin --profile web add ./dsh-windows-ocr-0.7.0.tgz
dsh plugin --profile web add github:maxwell-feng/dsh-windows-ocr

Git installs fetch sources, not built artifacts: the package's prepare script runs tsc to rebuild lib/ from source, and pnpm ≥ 10 requires you to allow the build once (it prints the exact pnpm-workspace.yaml snippet).

npm install registers the windows-ocr row by itself. The package ships a bundle patch (dsh.bundle + its own cordis.patch.yml) that inserts the windows-ocr loader entry. Do not also add a manual - insert: row with the same id to your profile — dsh 0.1.5-rc.2 (cordis-plugin-loader 1.0.2) rejects duplicate loader entry ids and dsh web fails to boot with duplicate loader entry id: windows-ocr.

Documentation

  • Configuration Guide (简体中文)
  • Install Guide (简体中文)
  • Usage Guide (简体中文)
  • Update Guide (简体中文)
  • Uninstall Guide (简体中文)
  • Changelog

Quick install via an AI agent

Hand this repository to any AI agent, or paste the instruction below, and the agent will install and verify the plugin for you:

Please install the dsh plugin in this repository by following https://github.com/maxwell-feng/dsh-windows-ocr/blob/main/agents-install.md. Run every preflight check, choose an install mode, then complete the mandatory verification: attach an image to a text-only model session and confirm the model answers with the recognized text.

agents-install.md is a step-by-step guide written for AI agents: preflight checks, both install modes (permanent profile patch / temporary --patch overlay), mandatory functional verification, and troubleshooting for the failure modes you are likely to hit. Manual install instructions are below.

Why a plugin (not a skill)

dsh skills are Markdown instruction files injected into the model context — they cannot execute code, cannot hook the request pipeline, and cannot stop an image from being serialized. This feature needs exactly that, so it is a cordis plugin that hooks two public seams of the llm service:

  1. Capability shim — ctx.llm.resolveModelInfo (also listModels). The host gates image attachments on inputModalities.includes("image") at three places: message admission, model switching, and the read_image tool. The shim answers "yes", so text models admit images.
  2. Pre-step rewrite — agent/pre-step, the harness's official seam for replacing the messages that enter a model call ("Reject a proposed step or replace the messages that enter it"). Every image content block is replaced with an OCR text block before the request is built, so no attachment bytes are ever serialized and no image_url is ever built. It covers every dispatch path — ctx.llm.stream and prepareCall().stream both build from the step's messages; wrapping adapter.stream no longer works because the bundled adapters override prepareCall() and dispatch through generation-bound closures.
you attach an image
  → admission asks ctx.llm.resolveModelInfo (shimmed: "image" ✓)
  → image stored in the local attachment store (session log, UI preview)
  → agent loop proposes a step → agent/pre-step (rewritten)
  → image block read locally (ctx.attachments.readImage) → Windows OCR
  → block replaced with <image_ocr>…text…</image_ocr>
  → request built from OCR'd messages → adapter serializes text only → provider

Requirements

  • Windows 10/11 (Windows PowerShell 5.1+ ships with the OS; no install needed)
  • A Windows OCR-capable language pack for your language (Settings → Time & language → Language). English is usually present; Chinese requires the Chinese language pack (OCR-capable).
  • dsh with a profile (tested against dsh 0.1.5-rc.2)

Install

Installing via an AI agent

agents-install.md in this repository is a step-by-step installation guide written for AI agents (and careful humans). Give it to an agent — e.g. "install this plugin per agents-install.md from https://github.com/maxwell-feng/dsh-windows-ocr" — and the agent can perform the preflight checks, install, verification, and troubleshooting on its own. The guide covers both install modes, the mandatory functional verification (attach an image → model answers with the OCR text), and the failure modes you are likely to hit.

Manual install

Two official ways to load this plugin, both referencing the plugin file by absolute path (see docs/user/develop/basic). On Windows the path must be a file:// URL — a bare C:/... path is parsed as the c: URL scheme and the loader rejects it.

Permanent: profile patch layer

Append to your profile's cordis.patch.yml (e.g. ~/.dsh/profiles/web/cordis.patch.yml):

- insert:
    - id: windows-ocr
      name: 'file:///C:/absolute/path/to/windows-ocr/lib/index.js'
      config:
        language: ''
        passthrough: false

Then restart dsh web. Remove the rows to uninstall — the plugin restores the original llm / adapter methods on unload.

Choose one way to load the plugin: the npm bundle (above) or this manual insert — never both. Both register the same windows-ocr entry id, and dsh 0.1.5-rc.2 fails the boot with duplicate loader entry id: windows-ocr when the row exists twice. If the row is already present (for example after an npm bundle install), configure it with an id-targeted override (see Configuration below) instead of inserting a second row.

Temporary: --patch overlay

Put the same rows in an overlay file and boot with it; your profile stays untouched:

dsh --profile web --patch C:/path/to/overlay.yml

Notes

  • dsh web fails with EADDRINUSE on port 3080 when an older instance is still running: find it with netstat -ano | findstr :3080 and stop it (taskkill /PID /F) before starting a new one.
  • For a packaged install (npm / tarball / github:user/repo), package the plugin as a bundle (dsh.bundle + cordis.patch.yml, see docs/user/develop/basic/publish); a git install additionally needs a prepare build script and pnpm allowBuilds consent.

To verify the plugin loaded, look for windows-ocr in the boot logs, or check the OCR smoke test below.

Configuration

All settings live in the patch row windows-ocr (cordis.patch.yml here) and can be overridden from your profile's cordis.patch.yml. Configuration is validated at load time (Schemastery Config schema) — an invalid value fails the boot with an actionable error instead of being silently ignored:

KeyDefaultMeaning
language""BCP-47 tag for Windows OCR, e.g. zh-Hans, en-US. Empty = user profile languages.
passthroughfalsefalse (default): OCR every image. true: genuine vision models receive images untouched.
ocrScriptbundled lib/ocr.ps1Absolute path override for the PowerShell OCR script.
timeoutMs60000Per-image OCR timeout.
maxCacheEntries200Bound on the per-run OCR cache (keyed by attachment id).

Example override in ~/.dsh/profiles/web/cordis.patch.yml — an id-targeted row (not insert:) replaces the existing windows-ocr row's config:

- id: windows-ocr
  config:
    language: zh-Hans

Usage

Attach any image to a text-model session and send a message — the plugin intercepts agent/pre-step, OCRs the image locally via Windows.Media.Ocr, and replaces the image block with a text block before the request is built. No code or model-config changes needed; every provider/model in dsh benefits.

How the model sees the image

Each image block becomes a text block (local filenames are not forwarded):

<image_ocr>
…recognized lines…
</image_ocr>

Recognition text is cached per attachment id for the lifetime of the dsh process, so repeated turns do not re-run OCR.

Temp-file hygiene

Every OCR run writes its input image and output text into a fresh temporary directory (windows-ocr-* under the system temp dir). The directory is removed automatically in finally — on success, on OCR error, and on timeout — so no per-run script, image, or output file survives. At plugin start, any orphaned windows-ocr-* directories left behind by a previously crashed process are swept as well. Nothing is written outside the plugin's own temporary directory and the dsh attachment store.

Smoke test (no dsh needed)

# 1x1 PNG — exercises WinRT loading, language availability, recognition
powershell.exe -NoProfile -ExecutionPolicy Bypass -File lib/ocr.ps1 -ImagePath test.png -OutFile out.txt
Get-Content out.txt

Exit code 0 with an empty/whitespace out.txt means the OCR engine works (a 1×1 image has no text). Exit 2/3 means a language pack is missing.

Verification inside dsh

  1. Attach an image to a text-model session and send a message — the model should answer using the recognized text.
  2. Confirm the image never goes out: open DevTools → Network in the web UI, inspect the request to your provider base URL, and verify the payload contains only text content parts (no image_url / data URI).

Uninstall

dsh plugin --profile web remove dsh-windows-ocr

For manual installs, delete the windows-ocr row from your profile's cordis.patch.yml and restart dsh --profile web. The plugin restores the original llm shims on unload; a full restart is safest after removal. After uninstall, text-model image attachments are refused again (fail-closed).

Limitations

  • OCR language availability depends on installed Windows language packs (script exits 2/3 and the plugin degrades to a placeholder text).
  • GIFs: Windows OCR recognizes the first frame.
  • Cache is per process; a long-lived session keeps OCR text cached, bounded by maxCacheEntries.
  • The plugin registers one fiber-scoped agent/pre-step listener and restores the llm capability shims on unload. A full restart is still the safest path after any dsh update.
  • The model picker may show text models without an "image" badge (cosmetic only — listModels is shimmed consistently).
  • If the OCR plugin is removed, image attachments to text models are refused again (fail-closed), not uploaded.

License

MIT