DeepSeek Harness 插件

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(英文原文)

跳到安装方式

来源信息

GitHub 仓库
DosterBool/dsh-ocr-seam-guard
最近更新
2026年8月16日
分类
安全与权限
GitHub stars
0
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/DosterBool/dsh-ocr-seam-guard
插件名:dsh-ocr-seam-guard
作者:DosterBool

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

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.