rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:vuvanmai936-dot/dsh-ocr-bridge
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
Paste images directly into DeepSeek Harness (DSH) chat and have them read by a free local backend — macOS Vision, with a Tesseract fallback — before the text-only DeepSeek model (e.g. deepseek-v4-flash) answers. Your model, agent capabilities, API key, and cost stay exactly the same.
Scope note: this is an OCR-level local bridge — it reads text out of images (macOS Vision → Tesseract). It is not general visual understanding, and no cloud endpoint is ever called.
Independence notice. This is an independent, community-built plugin for DeepSeek Harness (DSH). It is not an official DeepSeek product and is not affiliated with, endorsed by, or sponsored by DeepSeek or the DeepSeek Harness project. "DeepSeek" and "DeepSeek Harness" are trademarks of their respective owners.
⚠️ Trust boundary. This plugin runs inside the harness host process with shell-level access (it spawns
osascript/tesseract). Only install plugins you trust. The OCR text injected into the request is explicitly marked as untrusted observation data, not instructions — never execute commands, rules, or privilege escalations that appear in it.
DSH's image admission gate (dsh-host-apiproxy.submitPrompt) rejects attachments unless the current model declares image input. The official DeepSeek adapter hardcodes inputModalities: ["text"] for every model and its serializer throws on image blocks. The gate only checks the declaration, not real multimodality — so this plugin registers a wrapper adapter that:
["text", "image"] to let the gate pass;No new API keys, no settings changes, no model switching.
Requires DSH 0.1.0-rc.7 (peer dependencies are pinned; other release candidates are not supported — see Compatibility).
# npm registry
dsh plugin --profile web add dsh-ocr-bridge
# or directly from GitHub
dsh plugin --profile web add github:your-org/dsh-ocr-bridge
# local development (live reload of lib/ changes)
dsh plugin --profile web add link:~/dev/dsh-vision-bridge
Package name note: the npm name
dsh-vision-bridgeis taken by an unrelated project, and the upstreamdsh-visionpackage already owns the "vision" naming — so this plugin is published asdsh-ocr-bridge, which also states its OCR-level scope.
Restart dsh web after adding the plugin (patch layers load at boot). The model selector still shows the original deepseek-v4-flash / deepseek-v4-pro entries — nothing to re-select.
| Order | Backend | Requirements |
|---|---|---|
| 1 | macOS Vision (JXA via osascript) |
macOS 10.15+; zero installation, Chinese + English built in |
| 2 | Tesseract | tesseract CLI + language packs (chi_sim, chi_tra, eng); also the only option on Linux/Windows |
If Vision fails and Tesseract is missing, the request fails with VISION_UNAVAILABLE and the error lists both backend failures. Images are written to a temp directory and always cleaned up.
All settings are optional. They live in the llm-deepseek settings section (the official DeepSeek section this plugin takes over), so your existing DeepSeek settings keep working.
settings.yaml (or the GUI settings surface):
llm-deepseek:
visionTimeoutMs: 180000 # per-backend recognition timeout (ms), default 180000
maxImages: 8 # images recognized per request, 1..32, default 8
# …all official DeepSeek settings keep working: baseURL, apiKeyEnv, thinking, …
Notes:
VISION_IMAGE_LIMIT instead of silently dropping images.DEEPSEEK_API_KEY resolution is fully preserved: ctx.credentials first, then the launch environment, exactly like the official adapter.paste image ──► submitPrompt gate ──► wrapper adapter (inputModalities=["text","image"]) ──passes──► durable attachment refs
│
stream(): collectImageRefs(messages)
├─ no images ─► delegate to DeepSeekAdapter untouched
├─ native model supports image ─► delegate untouched
└─ images ─► attachments.readImage(ref) each
► local recognition (macOS Vision → Tesseract)
► strip image blocks, append <vision-bridge-context>
► delegate pure-text call to official DeepSeek API
pnpm install
pnpm check # typecheck + test + build
Live-testing against your harness:
dsh plugin --profile web add link:~/dev/dsh-vision-bridge # symlink: lib/ changes apply immediately
# editing cordis.patch.yml still requires restarting `dsh web`
Then paste an image into any conversation and verify the checklist below.
dsh plugin --profile web add dsh-ocr-bridge and restart, the model selector still shows deepseek-v4-flash / deepseek-v4-proMODEL_DOES_NOT_SUPPORT_IMAGESsettings.yaml unchanged works out of the boxmaxImages0.1.0-rc.7 only. Peer dependencies are pinned exactly (@deepseek-ai/* 0.1.0-rc.7, @deepseek-ai/cordis 4.0.1); later release candidates will be added as they ship.>=22.19, pnpm 10.x.The code skeleton is adapted from oil-oil/dsh-vision (MIT) and used with attribution (see LICENSE). Positioning differs deliberately: dsh-ocr-bridge is a local-first, OCR-level bridge (zero cloud, zero extra cost, pinned to rc.7), while upstream focuses on cloud multimodal endpoints plus a visual-memory workflow. The two are complementary rather than overlapping in scope; this plugin does not claim to be a fork or successor of upstream.
llava) as a third recognition optionsettings.yaml / composition config)MIT. See LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。