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-complete-notify

v0.6.2

Published

任务完成时播放提示音并弹出小通知(页面内 toast + 后台时系统通知),按结果状态着色(完成/阻塞等待反馈/中断/失败),支持按操作系统选择音效预设、三状态独立音效,附带一句话小结(recap)与运行统计(时长/tokens/步骤)。纯浏览器方案,零系统依赖,跨 Windows/macOS/Linux。

Readme

dsh-complete-notify

DeepSeek Harness(DSH)任务完成通知插件:任务完成时播放提示音并弹出小通知

  • 纯浏览器方案:音效用 Web Audio 合成、弹窗是页面内 toast、页面在后台时改用系统通知(Web Notification API)——零系统依赖、零音频文件,Windows / macOS / Linux 通用
  • 不依赖任何系统通知命令(无 osascript / notify-send / PowerShell),通知权限是浏览器站点级授权,授权一次即可
  • 与官方运行指示灯同源的完成检测:会话列表快照的 running / completed 状态
  • toast 与系统通知附带运行统计(时长 / tokens / 步骤)与一句话小结(💬 recap,≤50 字),点击直达对应会话

安装

# 从 npm 安装(推荐)
dsh plugin --profile web add dsh-complete-notify
# 或锁定 GitHub 版本
dsh plugin --profile web add "github:kaixinbaba/dsh-complete-notify"
# 重启 dsh web 生效(launchd 托管时):
launchctl kickstart -k gui/$(id -u)/com.dsh.dsh-web

本地开发时用源码安装(link: 指向本地目录,改代码后重启即生效,无需每次走 npm):

dsh plugin --profile web add link:/path/to/dsh-complete-notify

使用

  1. 任务完成后:听到「叮咚」提示音 + 右上角弹出状态着色的小卡片(绿 ✓ 任务完成 / 黄 ⚠ 等待你的反馈 / 红 ✕ 任务中断或失败 / 橙 ⚠ 达到 token 上限),包含一句话小结(💬 recap,≤50 字)、运行统计(时长 ⏱ / tokens ⚡ / 步骤 🔧)与「点击打开会话」提示;点击卡片快速跳转到对应会话,5 秒自动消失
  2. 页面切到后台/其他标签页时完成任务:收到系统通知(标题与正文按结果状态区分,同样带小结与统计,点击通知会聚焦窗口并打开对应会话)+ 提示音 + 标签页标题闪烁
  3. 设置 → 任务完成通知
    • 启用提醒 / 提示音 / 系统通知(页面在后台时)开关、音量滑块
    • 分别为绿色完成、黄色阻塞、红色中断选择不同音效
    • 下拉框按当前浏览器识别的操作系统分组:macOS / Windows / Linux 推荐预设 + 通用预设 + 静音
    • 「测试音效」「测试通知」按钮;首次点「测试通知」会请求浏览器通知权限,点允许
    • 全部设置保存在浏览器 localStorage(dsh.completeNotify.v1

音效选择说明

音效由浏览器 Web Audio API 合成,不读取系统原生声音文件,因此跨操作系统稳定工作。预设名称是对应系统提示音的风格,不是调用 macOS/Windows/Linux 的系统音频文件;每个状态可以独立选择,也可以单独设为静音。

结果状态

结果状态以 Host 端 turn/endreason.kind 为权威来源(客户端兜底推断:turn-error / turn-max-tokens 节点、被打断的 assistant 消息):

| 状态 | 颜色 | 文案 | |---|---|---| | completed | 🟢 绿 | 任务完成 | | blocked | 🟡 黄 | 等待你的反馈(模型提问 / 等待审批) | | aborted | 🔴 红 | 任务已中断 | | error | 🔴 红 | 任务失败 | | max-tokens | 🟠 橙 | 达到 token 上限 |

弹窗效果预览

关于小结(recap):弹窗先立即显示降级小结(最终回答前 50 字的清洗版),随后由 Host 端异步调用 LLM 生成真正的一句话小结(≤50 字)并自动升级替换。每次运行结束调用一次 LLM(输入为最终回答,输出约 50 字,成本极小)。小结覆盖整轮运行(多轮 goal 任务取最终回答),与运行统计的「最后一轮」口径不同。

行为细节

| 场景 | 行为 | |---|---| | 页面可见,任一会话完成 | toast(小结 + 时长/token/steps)+ 对应状态音效 | | 页面在后台,会话完成 | 系统通知(含小结与统计)+ 对应状态音效 + 标题闪烁 | | 系统通知权限被拒 | 降级为长时 toast(30 秒,回来也能看到)+ 标题闪烁 | | 一次完成 | 只提醒一次(按会话去重,重新运行后再完成会再次提醒) | | 子代理(subagent)会话 | 不提醒 | | 多会话同时完成 | toast 栈最多 3 条(FIFO) |

运行统计口径为「最后一轮」(turn 号最大的已结束轮次):时长来自 turnTimings,tokens 为 assistant 消息 usage 的输入+输出之和,steps 为工具调用块数量。单轮任务即为本次运行的完整数据;多轮 goal 运行显示最后一轮。

已知限制

  • 标签页必须开着(浏览器限制);标签页关闭后系统通知也收不到。如需关页推送可后续接 Push API(需推送服务器)
  • toast 为深色样式,暂未跟随明暗主题切换
  • 浏览器自动播放策略:首次用户交互(点击/按键)后音效才可用——DSH 里发第一条消息时即自然解锁

开发

node --test          # 完成检测状态机 + 运行统计单测(通过 stub 执行同一份 client/client.js)
npm run check        # 语法检查

结构:

lib/index.js      # 宿主入口(事件监听、recap LLM 与路由装配)
client/client.js  # 客户端单文件(DSH 模块加载器格式;全部逻辑在此)
cordis.patch.yml  # bundle insert 声明
tests/            # node --test 单测

卸载

dsh plugin --profile web remove dsh-complete-notify

License

MIT