DeepSeek Harness 插件

sakikoTGW/dsh-plugin-resolver

Star 数 ★ 3 下载量(近 30 天) 2,290 分类 开发与运行时 收录于 2026-10-19 npm dsh-plugin-resolver

面向 agent 的插件安装器:解析 DSH 兼容版本、处理同名歧义,并在安装后校验 loader 入口。

安装

# npm 包(预构建)

dsh plugin --profile web add dsh-plugin-resolver

# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)

dsh plugin --profile web add github:sakikoTGW/dsh-plugin-resolver

装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。

README

我做这个插件,是因为让 agent 装插件这件事一直不太靠谱。社区目录 8MB,从 GitHub Pages 拉一次要一分半;406 组同名,dsh-browser 一组就有 9 个 owner;npm 上的 latest 不一定兼容当前内核,装上会被静默禁用;GitHub-only 的仓库没有构建产物,main 指向一个不存在的文件,装完永远不加载。

这些判断每次都要重来。我把它们做进插件里,之后装插件就是一次工具调用。

如果你就是 agent,先看 llms.txt,完整契约在 agent.json。

这是它跑起来的样子

同一件事手工做要 45 次工具调用、20 多分钟;它 6 次,约 3 分钟,中间没有重试。测法和消融在 BENCHMARK 和 ABLATION。

安装

插件市场 npm

我平时直接跟 agent 说:

安装 dsh-plugin-resolver,然后用它安装 dsh-browser。

市场索引源:

https://sakikoTGW.github.io/dsh-plugin-resolver/market/index.json
dsh plugin --profile <profile> add dsh-plugin-resolver

GitHub 源码或 tarball:

dsh plugin --profile <profile> add github:sakikoTGW/dsh-plugin-resolver#<commit>

它怎么工作

阶段 工具 结果
搜索 plugin_search 目录命中、owner、星数、npm 名、同名标记
解析 plugin_resolve package、install spec、registry、是否需要源码构建
安装 plugin_install profile、lockfile、plugin-sources 的变更
校验 plugin_status bundle、loader entry、fiberPhase
上报 返回值 应用状态、restart 判定、下一步

只有 plugin_install 会写环境,其余三个只读。

生态

  • dsh-plugins:插件集和 catalog
  • dsh.so:L5 运行已验证
  • dshbase:Verified
  • 市场索引源:https://sakikoTGW.github.io/dsh-plugin-resolver/market/index.json

能做什么

能力 npm GitHub-only 显式 spec
同名消歧 ✓ ✓ ✓
兼容版本 ✓ ✓ 你给定
源码构建 — ✓ 按 spec
装后校验 ✓ ✓ ✓
重启判定 ✓ ✓ ✓

几个细节(Features)

  • 同名插件它不替你选。搜索结果会把 owner、星数、npm 名都列出来,你给 owner= 或者完整 spec 就行。
  • 兼容版本按 engines.dsh 和同命名空间的 peer 求解;解析结果是一份可以复核的 install spec。
  • GitHub-only 的包缺构建产物时,它会先 pnpm install / pnpm run build,再以 link: 装进去。
  • 装完回读 bundle、loader entry 和 fiberPhase,重启与否看插件管理器实际应用的结果。

验证

npm test   # 45 passing: 35 logic + 10 harness

机器可读的验证入口在 agent.json 的 validation;CI 在 test.yml。

给 agent 的契约

{
  "tools": ["plugin_search", "plugin_resolve", "plugin_install", "plugin_status"],
  "versionRule": "engines.dsh first; otherwise same-namespace @deepseek-ai/dsh peers",
  "ambiguity": "owner= or a full spec",
  "writes": ["profile", "lockfile", "plugin-sources"],
  "restart": "plugin manager result"
}

完整契约在 agent.json,给 agent 的索引入口是 llms.txt。有问题来 Issues,或者看 dsh-plugins。

参考

网页版:sakikoTGW.github.io/dsh-plugin-resolver/docs/

内容 位置
四个工具 docs/TOOLS.md
版本选择规则 docs/VERSION-SELECTION.md
安装路径与重启判定 docs/INSTALL-PATHS.md
结构 docs/ARCHITECTURE.md
效果与证据 docs/EVIDENCE.md · BENCHMARK · ABLATION
测试与 CI docs/TESTING.md
已知限制 docs/LIMITATIONS.md
反馈与安全 docs/SECURITY.md · Issues
License LICENSE

内容来自项目 README(GitHub)↗

链接

同类插件

查看整个分类 →

社区评论

评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。