dsh-ocr-seam-guard
Run the following command in DeepSeek Harness:
dsh plugin install DosterBool/dsh-ocr-seam-guard
Paste the following prompt into your AI chat to install this plugin:
Install this plugin in DeepSeek Harness by running dsh plugin install DosterBool/dsh-ocr-seam-guard; source code is available at https://github.com/DosterBool/dsh-ocr-seam-guard
About this plugin
The dsh-ocr plugin on DeepSeek Harness relies on three hand-stitched patches that live outside the profile: an OCR service seam in the official dsh-llm-deepseek adapter, a UTF-8 stdout enforcement for the Python OCR subprocess, and a rapidocr 1.2.3 API compatibility fix. Any npm global upgrade or plugin re-installation silently wipes these patches, and the resulting OCR failure often produces misleading downstream errors that are painful to track down.
dsh-ocr-seam-guard inspects all three sites on every harness boot. When a patch is missing it re-applies the fix via anchored string replacement — every anchor must match exactly once, otherwise the entire site is skipped to guarantee no partial patch. After patching, the module is import-verified in a child node process; a failed verification rolls the file back and surfaces the error. If the upstream code shape has drifted and no anchors match, the guard simply logs and leaves the code untouched for human review.
If you run dsh-ocr on Harness and regularly perform dsh upgrades or plugin reinstalls, this guard turns every boot into an automatic health check: patches in place means a silent pass, a missing patch is re-applied in seconds with a one-restart notice, and drifted anchors trigger an explicit alert — keeping the silent post-upgrade OCR breakage out of your production path.
Use Cases
- OCR service seam vanishes after a dsh global upgrade; the guard re-applies it on next boot
- Plugin re-installation wipes the UTF-8 enforcement and rapidocr API fix; both are restored automatically
- Upstream adapter code drifts so no anchors match; the guard logs a warning and leaves the code for human review
Best For
- Ops engineers running dsh-ocr on Harness who upgrade dsh regularly
- Admins managing production Harness environments where OCR uptime is critical
- Developers maintaining local dsh-ocr patches who want automated self-checking over manual re-stitching
Related Plugins
A security red-team prompt plugin for DeepSeek-V4 that uses code-formal mapping and zero-trigger system prompts to enable unconditional output, intended for authorized testing and research only.
Adds an Auto approval mode on the official workspace-write sandbox, classifying semantic risks, asking when ambiguous, and denying destructive operations.
Undo/rollback system for DSH: config & plugin snapshots, one-click undo/redo/restore, message-level revert, secret masking, safe mode, and offline WebUI/GUI/CLI rescue tools for when DSH won't start.
Packages all 87 SKILL.md files from upstream reverse-skill as a DeepSeek Harness plugin that auto-registers them for authorized reverse engineering, penetration testing, and security research.