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-version-plugin

v1.0.1

Published

DSH 插件:在设置弹窗的「通用设置」底部展示当前 DSH 版本,并提供检查更新、更新到最新版本的按钮。

Readme

dsh-version-plugin

English | 中文

一个 DSH(DeepSeek Harness)Web 模式插件:在设置弹窗的「通用设置」底部展示当前 DSH 版本,并提供检查更新、更新到最新版本的按钮。

预览

安装

从 npm 安装(推荐)

已发布的 npm 包包含预构建的浏览器端产物,无需本地构建权限:

dsh plugin --profile web add dsh-version-plugin

从 GitHub 安装

也可以直接从 git 仓库安装源码。prepare 脚本会在安装后自动构建浏览器端产物:

dsh plugin --profile web add github:hotpot-labs/dsh-version-plugin

pnpm ≥10 默认禁止 git 依赖执行构建脚本。首次 add 失败后,需要在对应 profile 的 pnpm-workspace.yaml 中授权本包构建,然后重新执行上面的 add 命令:

allowBuilds:
  dsh-version-plugin: true

授权 allowBuilds 意味着允许该包源码在你的机器上安装时执行构建脚本。建议锁定到具体 commit:github:hotpot-labs/dsh-version-plugin#<sha>

本地安装

在包含本插件的目录中,把它作为本地 bundle 安装进 profile:

dsh plugin --profile web add ./dsh-version-plugin

使用

安装完成后以 web 模式启动:

dsh --profile web web

打开设置弹窗 → 通用设置,即可在最底部看到「DSH 版本」行:

  • 检查更新:查询 npm registry 上 @deepseek-ai/dsh 的最新版本。
  • 更新到最新版本:执行 npm install -g @deepseek-ai/dsh@latest 并展示命令输出。

功能特性

  • host 侧读取已安装 @deepseek-ai/dshpackage.json 获取当前版本。
  • 在 dsh web 模式的设置弹窗 → 通用设置 → 最底部增加「DSH 版本」行。
  • 一键查询 npm registry 上 @deepseek-ai/dsh 的最新版本。
  • 一键执行全局更新命令,并在界面上如实展示命令输出。

开发

工作原理

  • host 侧(src/index.ts)读取已安装 @deepseek-ai/dshpackage.json 获取当前版本,并通过 ctx.connection.rpc.handle('/dsh-version', ...) 暴露三个 RPC 端点:getInstalledVersiongetLatestVersionupdateToLatest
  • 浏览器侧(src/client.tsx)在设置弹窗的通用设置底部渲染「DSH 版本」行,通过 RPC channel 调用 host 侧端点完成查询与更新。

目录结构

dsh-version-plugin/
├── package.json          # 插件元数据、dsh.client/dsh.bundle 声明
├── cordis.patch.yml      # 注册插件层
├── src/index.ts          # Host 侧入口:版本读取 + /dsh-version RPC channel
├── src/client.tsx        # 浏览器侧源码:通用设置行
├── lib/                  # 构建产物(gitignore)
│   ├── index.js
│   └── client.js
├── scripts/build.mjs     # 构建脚本
├── tests/safety.mjs      # 结构与导出校验
└── tsconfig.json         # TypeScript 配置

构建与测试

npm install
npm run build       # 生成产物到 lib/
npm run typecheck   # 类型检查
npm test            # 结构与导出校验
npm pack --dry-run  # 确认 tarball 只包含 lib/ + patch + README

常见问题

问:点「更新到最新版本」后 workspace 里的 dsh 没有变化?

「更新到最新版本」使用全局安装命令 npm install -g @deepseek-ai/dsh@latest。如果当前 dsh 是通过 pnpm workspace 或本地源码运行,该命令只会更新全局 npm 包,不会改动 workspace 源码;界面会如实返回 npm 的输出。

问:从 GitHub 安装时报错或缺少构建产物?

pnpm ≥10 默认禁止 git 依赖执行构建脚本。在对应 profile 的 pnpm-workspace.yaml 中为本包授权 allowBuilds 后重新安装(见「安装 → 从 GitHub 安装」)。

问:更新完成后界面显示的版本没有变?

重启 web 进程并刷新页面,再点一次「检查更新」确认。