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

@little_monkey/dsh-win-notify

v0.4.0

Published

Windows 11 toast notifications when an agent turn finishes, asks a question, or needs approval, with switches on the bundle's own Plugins page.

Readme

dsh-win-notify

DSH 宿主插件:在需要你回到键盘的时刻,弹一条 Windows 11 系统通知。

触发时机

| 事件 | 什么时候弹 | 标题 | | --- | --- | --- | | turn/end · completed | 一轮任务正常结束 | DSH · 任务完成 | | turn/end · interrupted | 这一轮被打断 | DSH · 任务已中断 | | turn/end · aborted | 这一轮被中止(含用户取消) | DSH · 任务已中止 | | turn/end · blocked | 被阻止,等你处理 | DSH · 任务已阻塞 | | turn/end · error | 模型请求或执行出错 | DSH · 任务出错 | | turn/end · max-tokens | 输出触顶被截断 | DSH · 已达输出上限 | | user-questions/request | 有 ask_user_question 等你回答 | DSH · 需要你回答 | | user-questions/request(plan-review) | 计划提交待审批 | DSH · 等你审批计划 | | approval/request | 有工具调用等授权 | DSH · 需要你确认 |

正文 = 工作区目录名 + 最后一条助手回复的摘要(出错时是错误信息);问题和审批类直接显示问题/原因文本。

默认 不通知 子代理与队友会话(header.parentSession 存在或 origin: subagent),因为它们会在主任务里反复触发噪音。

发送方式

宿主跑在桌面版 Electron 的 Node 子进程里,拿不到 Electron 的 Notification,所以走系统自带的 Windows PowerShell 5.1:每次通知起一个短命 powershell.exe -EncodedCommand,调用 WinRT ToastNotificationManager,不阻塞 agent loop。

子进程不能 detached:本机实测 detached: true 的子进程退出码 0,但通知根本没有进系统通知库(静默失败);非 detached 的短命子进程才真正弹出。想复核就用通知库:%LOCALAPPDATA%\Microsoft\Windows\Notifications\wpndatabase.db 里 Notification JOIN NotificationHandler 的 PrimaryId 就是 AUMID。

Toast 的归属身份由 AppUserModelID 决定。默认用 DeepSeek Harness 自己注册的那个(com.deepseek.dsh,来自开始菜单里的 DeepSeek Harness.lnk,Get-StartApps 可核对),所以通知中心里显示为「DeepSeek Harness」并用它的图标,点通知会激活该应用。如果日后这个 AUMID 失效,会自动回退成 Windows PowerShell 身份发一条,保证不丢通知;也可以直接用 appId 指定别的已注册 AUMID。

在插件页面配置

  1. 侧边栏打开 Plugins,点开 @little_monkey/dsh-win-notify 卡片。
  2. 描述下面直接渲染开关面板(plugins.bundle.config 槽,按包名注册),没有单独的设置页:
    • 启用 Windows 通知(总开关)
    • 任务完成 · 中断 · 出错
    • 等你回答(含计划审批)
    • 等你确认授权
    • 子代理 / 队友会话也通知
    • 提示音
    • 正文摘要字数(40–400)
    • 通知语言(中文 / English)
  3. 拨动即保存,没有「保存」按钮。所有字段都是 volatile,Loader 把新值写进运行中的插件,下一个事件就用新设置,不需要重启或重载。
  4. 页面上写入的内容会作为覆盖行进入 profile 的 cordis.patch.yml,和手工改 YAML 等价。

客户端只改显示;真正的取值在 Host:index.js 的 settings() 每次事件现读 config,所以任何一处改动都立即生效。

开关为什么直接复用宿主的类名

自绘开关(36×20 + border-radius: 10px + 16px 旋钮)在宿主页面里渲染出的弧角始终比原生"方"一点(截图逐像素反推:自绘半径 ≈8.5px,原生 10px),改过 border-radius: 999px、把形状从 <button> 挪到内层 span、甚至改用 <div role="switch">,都治不好。

原生开关的真实结构(DevTools 实测)是:

<button type="button" role="switch" aria-checked="true" class="_switch_1ik0f_5">
  <span class="_thumb_1ik0f_33"></span>
</button>

36×20、padding: 2px、背景 #F9FAFB,样式按这组 CSS Module 哈希类生效。所以本插件直接渲染同样的 DOM 并复用这两个类名,wn-* 规则全部放进 :where()(零优先级)只当兜底——外观完全由宿主决定。

升级注意:_switch_1ik0f_5 / _thumb_1ik0f_33 的哈希会随 DSH 版本变化。升级后如果开关退回 wn-* 的兜底样式(弧角略方、颜色仍在),用 DevTools 选中一颗原生开关取新的类名替换 client.js 里的这两个字符串即可。

配置

在 profile 的 cordis.patch.yml 覆盖 win-notify 行:

- id: win-notify
  name: '@little_monkey/dsh-win-notify'
  config:
    language: zh          # zh | en
    notifyTurnEnd: true   # 完成/中断/出错等
    notifyQuestions: true # 等你回答
    notifyApprovals: true # 等授权
    notifyDelegated: false # 子代理/队友会话也通知
    previewChars: 160     # 正文摘要长度
    sound: true           # 通知音
    enabled: true

排查

  • 没弹出来:先确认 Windows 设置 → 系统 → 通知里「DeepSeek Harness」没有被关闭,且专注助手/免打扰没有生效。
  • 手动验证通道:在本目录跑 node selftest.mjs。它会用生产代码(notify.js 的 buildScript())同步发一条通知并打印结果,退出码 0 = 系统通知平台接受了这条 toast;再查通知库里是否出现该 AUMID 的记录。
  • 查"为什么没触发":给 win-notify 行加 debugLog: <绝对路径>,插件会把 apply / turnEnd kind= / toast / toast-exit / skip-delegated 写进该文件。改完用插件管理器的「禁用 → 启用」重载,无需重启 DSH。
  • 只影响当前 profile:装/卸用 DSH 插件管理器(install_bundle / remove_bundle),不要手改 profile 的 package.json。