DeepSeek Harness plugin

dsh-ocr-seam-guard

Self-healing guard for the dsh-ocr plugin: re-applies the llm-deepseek adapter OCR seam (and the dsh-ocr package fixes) after a dsh upgrade wipes them. Fail-safe: verifies the patched module loads

Jump to install

Source facts

Repository
DosterBool/dsh-ocr-seam-guard
Latest update
Aug 16, 2026
Category
Security & Permissions
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/DosterBool/dsh-ocr-seam-guard
Plugin: dsh-ocr-seam-guard
Author: DosterBool

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-ocr-seam-guard

Self-healing guard for the dsh-ocr plugin on DeepSeek Harness: automatically re-applies the local patches that npm i -g @deepseek-ai/dsh upgrades (or a plugin re-install) wipe out.

中文说明见下方。

What it guards

The dsh-ocr plugin needs three fixes that live OUTSIDE the profile (so profile reconcile never touches them, and a harness upgrade wipes the adapter one):

FixFileWiped by
The ocr service seam in the official dsh-llm-deepseek adapter<dsh package>/node_modules/@deepseek-ai/dsh-llm-deepseek/lib/index.jsnpm i -g @deepseek-ai/dsh upgrade
UTF-8 stdout enforcement for the Python OCR subprocess<DSH_HOME>/profiles/node_modules/@deepseek-ai/dsh-ocr/lib/index.jsplugin re-install
rapidocr 1.2.3 API fix (text_dettext_detector, text_rectext_recognizer)<DSH_HOME>/profiles/node_modules/@deepseek-ai/dsh-ocr/tools/ocr_image.pyplugin re-install

How it works

On every harness boot the plugin checks the three sites. A missing fix is re-applied with anchored string replacements — every anchor must match exactly once or the whole site is skipped (never a partial patch) — then the patched module is import-verified in a child node process. A failed verification rolls the file back and reports the error. If the upstream code shape is unknown (anchors drifted), the guard does nothing but log.

When a fix is (re-)applied, the running process already holds the old module — restart dsh once more to activate.

Install

dsh plugin --profile web add github:YOURNAME/dsh-ocr-seam-guard
# or from a local clone:
dsh plugin --profile web add file:D:/path/to/dsh-ocr-seam-guard

Restart dsh. The guard logs its status on every boot:

  • adapter seam: ok — everything in place
  • adapter seam: patched — just re-applied; restart once to activate
  • adapter seam: skipped — upstream code drifted, human review needed

Upgrade flow

npm i -g @deepseek-ai/dsh   # upgrade wipes the adapter patch
restart dsh                 # guard auto-patches at boot (log: "restart once")
restart dsh again           # patch active

Configuration

Env varDefaultPurpose
DSH_OCR_ADAPTER_FILEauto-detect (npm global root)override the adapter file path

The adapter is located via npm root -g with a fallback to the platform npm global directory; only npm-global dsh installs are supported out of the box.

License

MIT.