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-harness-tags

v0.2.5

Published

DSH plugin: watch new GitHub tags of deepseek-ai/deepseek-harness (optionally through an HTTP proxy) — background poll, in-app reminder banner, /harness-tags command, check_harness_tags tool, settings card

Readme

dsh-harness-tags

DSH(DeepSeek Harness)插件:监控 deepseek-ai/deepseek-harness 的新发布 tag,并在 Web GUI 里提醒。网络请求可选走本机 HTTP 代理(默认 http://127.0.0.1:8099,可关闭直连)。

功能

  • 后台轮询:按 intervalMin(默认 30 分钟,0 关闭)抓取 GitHub tags 页,发现新 tag 时记入状态并追加写入 ~/.dsh/harness-tags/changes.log;基线不自动推进,等你确认。
  • 🛎 界面提醒:Web 页面每 60 秒拉一次 /api/harness-tags/status,一旦有"待确认新 tag"(包括 DSH 停机期间发现的),页面右上角弹出置顶提醒条(框架 shell.overlay 浮动层,z-index 高于应用层),列出新 tag 并提供:
    • 确认POST /api/harness-tags/check,把基线推进到当前列表,提醒条消失;
    • 忽略 → 本次隐藏(同一批里出现更多新 tag 时会再次提醒)。
  • /harness-tags 命令(别名 /gh-tags):立即检查一次,报告最新 tag 与自上次确认以来的新 tag,并把基线推进到当前列表。
  • check_harness_tags 工具:模型可随时查询;默认只报告不推进基线(acknowledge: true 才推进)。
  • 插件配置页(侧栏插件 → 已安装 → dsh-harness-tags → 页面上的配置表单):显示最新 tag / 待确认新 tag / 上次检查与错误,配置代理 / 仓库 / 轮询间隔,一键「立即检查」。

安装

npm install dsh-harness-tags

随后把包注册进目标 profile(~/.dsh/profiles/<profile>/,以 web profile 为例):

  1. 装进该 profile 的 node_modules:

    npm install --prefix ~/.dsh/profiles/web dsh-harness-tags
  2. ~/.dsh/profiles/web/package.json 中:

    • dsh.profile.bundles 追加 "dsh-harness-tags"
    • dependencies 加入 "dsh-harness-tags": "^0.2.5"
  3. 重启 dsh web(bundle 配置在启动时加载);插件配置页与提醒条随页面刷新生效。

桌面版(Electron)同样:包装进 ~/.dsh/profiles/desktop/node_modules,把包名追加到该 profile 的 dsh.profile.bundles,重启 App 生效(桌面版的「桌面插件…」窗口只接受 npm registry 规格,本地目录/file: 规格要手工落盘)。

版本兼容策略:只面向最新版 DSH(0.1.7+),不兼容旧版。

  • 0.1.6 席位迁移:配置页从「设置 → 插件 → 插件配置」搬到侧栏插件页,旧席位 settings.plugin.item 已从 slot 契约移除(沿用旧名不报错,只是 inject 永不触发、界面无声消失)。本插件注册 plugins.bundle.config(keyed,键 = 组合包包名 dsh-harness-tags,与插件页派发的 entryKey 一致)。
  • 0.1.7 配置模型迁移:settings 服务改为「把插件的 Config schema 投影成表单」,不再有 settings.register(ns, schema);设置命名空间就是本条目 idcordis.patch.yml 里的 id: harness-tags),配置改由 apply(ctx, config) 的第二个参数读取。客户端侧 settingsScope 服务被 configForms 取代:ctx.configForms.get('harness-tags') 拿表单引用,保存走一次原子 mutate(ops, revision)(用草稿开始时的 revision 设栅,Host 文档变过就拒绝而不是覆盖)。
  • 热更新:三个字段都标了 volatile(),所以设置页保存后 Loader 把新值就地提交进 apply 收到的 config 对象并广播 loader/volatile-update,插件重读后重排定时器——不会重挂载插件,命令/工具/路由不动。

踩坑记录:inject 里点名一个已被删除的服务(例如 0.1.7 里写 settingsScope不会报错——cordis 会一直等待,apply 根本不执行,于是配置页和提醒条一个都不注册,表现就是"插件打不开"。

@deepseek-ai/dsh 的 peer 范围为什么写 >=0.1.7-0:按 semver 规则,只有当范围里出现与宿主同一 major.minor.patch 的预发布版本时,预发布宿主才算命中。DSH 宿主长期只有预发布版,于是 >=0.1.0*>=0.1.0-00.1.x-0 全部判为不满足——桌面端 profile 校验(apps/desktop/src/profile-packages.tssatisfies(version, range))会因此回滚并移除插件。点名当前预发布线(0.1.7>=0.1.7-0)是唯一可行写法,而且每条预发布线都要单独点名:宿主每升一个预发布序号(0.1.5-rc.20.1.6-alpha.20.1.7-alpha.1),上一版写的范围就不再命中。根治办法在宿主侧一行:该校验改成 satisfies(version, range, { includePrerelease: true })

本包自带 undicibundledDependencies),无需额外安装依赖。

配置

插件页的配置表单(侧栏插件 → 已安装 → dsh-harness-tags),或直接编辑 profile 条目 harness-tagsconfig(0.1.7 起由 config-editor 持久化,条目 id 即设置命名空间):

| 字段 | 默认 | 说明 | | --- | --- | --- | | proxy | http://127.0.0.1:8099 | HTTP 代理地址;无协议时自动补 http://;填 off / none / direct 或留空 = 直连 | | repo | deepseek-ai/deepseek-harness | GitHub 仓库(owner/repo,也接受完整 URL) | | intervalMin | 30 | 后台轮询间隔(分钟);0 关闭轮询(命令/工具/配置页仍可手动检查) |

取数方式

优先抓取 GitHub tags 网页(https://github.com/{repo}/tags)并解析 .../releases/tag/<name> 链接;页面解析不到 tag 时回退 GitHub REST API(/repos/{repo}/tags)。两者都按配置决定是否经代理。

状态与基线语义

  • 状态文件:~/.dsh/harness-tags/state.jsonknownTags = 基线,newTags = 待确认新 tag);变更日志 ~/.dsh/harness-tags/changes.log
  • 首次检查(基线为空)只建立基线,不报新 tag。
  • 后台检查发现新 tag 只累加进 newTags不推进基线,因此停机期间的新 tag 在重启后仍会提醒;只有命令/工具(acknowledge: true)/提醒条「确认」才推进基线。

内部接口

宿主通过 Connection 的共享 /api 通道注册两条 fetch 路由(ctx.connection.fetch.register),客户端 lib/client.js 按同一对路径取数:

  • GET /api/harness-tags/status → 状态 + 配置(配置页与提醒条读取)
  • POST /api/harness-tags/check → 立即检查(body {"acknowledge": true|false}

这条通道与传输无关:web profile 由 webserver 把 /api 交给 Connection(同源 cookie 鉴权由连接层完成),桌面版(Electron)没有监听端口的 webServer,但同样把 /api/* 递进 Connection 的共享 fetch 处理器,因此配置页与提醒条在两边都可用。

开发

node test-core.mjs          # 核心逻辑(真实抓取 + 差分/状态/错误路径)
node test-client-smoke.mjs  # 客户端 bundle(ModuleLoader 契约 + configForms 表单/保存栅栏 + 提醒条)
node test-wiring.mjs        # 宿主接线(假 ctx:Config 导出、命令/工具/路由、volatile 热更新)
npm pack --cache .npm-cache # 打包(含 bundled undici;本机默认 npm 缓存在工作区外会被沙箱拒绝)

License

MIT