npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-plugin-precheck

v0.2.0

Published

插件安装预检助手:安装 DSH 插件前检查兼容性与启动问题,发现问题即阻止并保留原环境 / Pre-install checker for DeepSeek Harness plugins

Readme

dsh-plugin-precheck(插件安装预检助手)

安装 DSH 插件前先做兼容性与启动验证:发现问题即阻止安装并保留原环境,面向不了解插件依赖的新手。

它做什么

在 Web GUI「设置 → Plugins」中新增「安装预检」标签页。输入 npm 包名后:

  1. 解析并锁定版本(pnpm view)
  2. 基础兼容性检查:peerDependencies 与已装版本比对、Node engines、bundle 清单声明;信息缺失时显示「无法确认」而不是放行
  3. 组合检查:新插件的 cordis.patch.yml 与当前配置树(dsh --dump-config)比对——插入 id 重复(确定错误)、补丁目标不存在/被多个插件覆盖(疑似风险)
  4. 隔离试装 + 试启动:临时 DSH_HOME 中复制 profile 文本文件,pnpm add 锁定版本 → --dump-config 静态校验 → --port 0 --no-open 试启动,等就绪行 + 401 探针,180 秒超时树级杀死。隔离环境不含凭据、不挂载定时任务、不触碰正式环境
  5. 检查通过后才允许正式安装:使用同一锁定版本;安装前备份 profile 四个文本文件,失败自动还原 + pnpm install 复原 + --dump-config 复验;恢复失败如实告知并给出日志与手动步骤

保护范围(如实声明)

  • 覆盖:本页面的检查安装;开关开启时,本浏览器标签页中 dsh-market 的安装/更新点击(fetch 拦截 → 完整预检 → 通过才放行)
  • 不覆盖:命令行 dsh plugin add、其他浏览器标签页;市场插件若未来改变端点或传输方式,拦截会失效(探测不到即不启用,不会误拦,UI 有状态显示)
  • 检查通过 ≠ 插件永久稳定,≠ 通过安全审计

dsh-market 拦截的工作原理

dshmarket 的全部路由都是 exact 注册(webServer 精确表优先,重复注册会抛错),且没有预安装钩子——Host 层无法插入中间件。因此拦截做在浏览器层:patch window.fetch 识别 POST /dsh-market/install、/dsh-market/update、/dsh-market/api/v1/updates,暂停请求 → Host 半侧把请求映射为安装来源(安装:url → 注册表条目 → npm 包名或 GitHub target;更新:包名 → 市场目标版本)→ 跑完整预检(含隔离试启动)→ 通过才用原始 fetch 放行;阻止/取消则返回合成 400 让市场 UI 自己报错。可在「安装预检」标签页随时停用。

兼容性

  • 已针对 DeepSeek Harness 0.2.0-rc.2 验证。
  • Host 依赖要求 @deepseek-ai/cordis ~4.0.4;UI/Host 包兼容 0.1.2-0 至 0.3.0-0,覆盖当前 0.2.x 预发布线。
  • Node.js 要求 >=22。

安装

dsh plugin --profile web add dsh-plugin-precheck
# 然后重启 dsh web

状态词汇

检查中 / 检查通过 / 已阻止 / 无法完成检查 / 正在安装 / 正在恢复 / 已恢复 / 恢复失败。所有结论附判断依据,可复制脱敏诊断报告。