DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
M

dsh-macos-signfix

Macos Signfix

macOS 代码签名修复工具,用于 DeepSeek Harness:一个 doc_ocr_sign_fix 工具,用于诊断并修复由于强化运行时和库验证导致捆绑的 Python 无法加载原生扩展(onnxruntime、cv2、pypdfium2)的情况,方法是注入 disable-library-validation entitl

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

npx -y @deepseek-ai/dsh plugin --profile web add github:zirscard/dsh-macos-signfix#adb660ffe2e95dad23f265dd22389cfd619aeac2
README兼容性版本

说明

适用于 DeepSeek Harness 的 macOS 代码签名修复:一个 doc_ocr_sign_fix 工具,用于诊断并修复由于强化运行时和库验证导致捆绑的 Python 无法加载原生扩展(onnxruntime、cv2、pypdfium2)的情况,方法是注入 disable-library-validation 权限并重新签名解释器,然后验证导入。绝不会触及外层应用。

兼容性与来源证明

Macos Signfix 以 dsh-macos-signfix 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

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

版本

0.1.0stable
2026/10/20

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/10/20
查看源码 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Experimental Auto Review@deepseek-ai/dsh-experimental-auto-review针对每个工具的 LLM 授权审查,适用于 DeepSeek Harness Auto 权限预设Cc Safety Netcc-safety-net编码代理 CLI 钩子——阻止破坏性命令和访问机密文件Doctor@linxin666/dsh-doctorDSH 配置档案的事务性救援模式,配备受监督的启动器、隔离的恢复容器、确定性修复、健康监控以及本地 Web 恢复控制台Pocketdsh-pocket把 DeepSeek Harness 装进你的口袋:一个包、一个设置页,手机扫码即同步访问电脑上的 DSH(局域网 + 公网,实时同屏)。

README

dsh-macos-signfix · macOS 代码签名修复插件

修复 DSH 内置 Python 在 macOS Hardened Runtime 下拒绝加载原生扩展(onnxruntime / cv2 / pypdfium2)的问题。agent 工具 doc_ocr_sign_fix 提供 diagnose / sign / verify / auto 四种模式。

一、根因(一句话)

DSH Desktop 的内置 python 是 Developer ID 签名(Team NAN929V4UM)并启用 Hardened Runtime(flags=0x10000(runtime));Hardened Runtime 启用 Library Validation,只接受与进程同 Team ID 的动态库;pip wheel 里的 .so/.dylib 是 ad-hoc(无 Team ID),dyld 因此拒绝加载。

不是 Gatekeeper / quarantine 问题,xattr -cr 不解决。

实际报错(dsh-ocr/test/macos-sign-report.txt 有完整记录):

ImportError: dlopen(.../onnxruntime/capi/onnxruntime_pybind11_state.so, 0x0002):
  ... not valid for use in process:
  mapping process and mapped file (non-platform) have different Team IDs

二、修复(方案 A)

对解释器注入 com.apple.security.cs.disable-library-validation entitlement 并 ad-hoc 重签:

codesign --force --options runtime \
  --entitlements sign/disable-library-validation.entitlements \
  --sign - ~/.dsh/dsh-runtimes/dsh-primary-runtime/dependencies/python/bin/python3
  • --options runtime 保留 Hardened Runtime(不破坏运行时语义),通过 entitlement 关闭 Library Validation;
  • 原二进制与 codesign -dvvv 输出备份到 sign/backup/<timestamp>/;
  • 幂等:已修复且 import 正常时 sign/auto 为 no-op;
  • 不碰 Electron 外层 App(绝不 --deep 签 .app)。

三、工具:doc_ocr_sign_fix

参数说明
pythonPath要修复的解释器;默认 DSH 内置 primary-runtime/bin/python3
modediagnose / sign / verify / auto(默认)
force已修复也强制重签(默认 false,幂等)
deepverify 时额外实例化 RapidOCR 跑一次最小推理
resignExtensions额外对 onnxruntime/cv2/pypdfium2 的 .so/.dylib 做 ad-hoc 重签(通常不需要,解释器 entitlement 已足够)
  • diagnose → { signed, adhoc, runtime, teamIdentifier, entitlements, imports.ok, imports.errors, needsFix, verdict }
  • sign → 前后签名状态 + backupDir + changed
  • verify → shallow(import + 版本)/ deep(RapidOCR 推理)
  • auto → diagnose → 需要则 sign → verify

四、安装与自检

dsh plugin --profile desktop add link:<plugin-dir>/dsh-macos-signfix

自检(复用内置 python,跑诊断→签名幂等→import→doc_ocr 回归):

DSH_PY=~/.dsh/dsh-runtimes/dsh-primary-runtime/dependencies/python/bin/python3
"$DSH_PY" <plugin-dir>/dsh-macos-signfix/test/run_tests.py

五、验收命令

DSH_PY=~/.dsh/dsh-runtimes/dsh-primary-runtime/dependencies/python/bin/python3
codesign -dvvv --entitlements - "$DSH_PY" | grep disable-library   # 有 → OK
"$DSH_PY" -c "import onnxruntime, cv2, pypdfium2; print('OK')"       # 退出码 0

六、红线

  • 不对 /Applications/DeepSeek Harness.app 本身 codesign --deep --force --sign -(破坏 Electron 外层签名 → App 崩溃);
  • 不依赖 DYLD_LIBRARY_PATH(Hardened Runtime 下 Python 会忽略);
  • Anaconda 只作为 auto 失败时的降级,不是最终方案;doc_ocr 会标注 fallback_used。

七、升级后注意事项

每次 DSH Desktop 升级/重装运行时,内置 python 可能恢复原签名 → 重跑一次 doc_ocr_sign_fix(mode="auto") 即可;doc_ocr 的 runner.js 在修复失效时会自动降级到 Anaconda,不阻塞 OCR。