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

@lsq64737/dsh-windows-notifications

v0.1.1

Published

Windows desktop notifications, sounds, and DSH-styled in-app notification cards for DeepSeek Harness

Downloads

385

Readme

DSH Windows 通知

为 DeepSeek Harness Web 提供 Windows 系统通知、提示音和 DSH 风格页面通知卡片。只要 DSH 标签页保持打开,切换到其他软件、最小化浏览器或浏览其他标签页时,任务状态变化仍会出现在 Windows 通知中心。

功能

  • 正常完成任务时通知。
  • 报错、中止、阻塞、达到输出上限或异常中断时通知。
  • 等待审批、计划确认或回答问题时通知。
  • 点击 Windows 通知后聚焦 DSH 并打开对应会话。
  • 页面活跃时显示顶部居中的 DSH 风格通知卡片,使用官方鲸鱼标识和原生状态点,避免和系统通知重复。
  • 使用 Web Audio 生成轻量提示音,不携带额外音频文件。
  • 在独立的“设置 → 通知”页面控制通知类型、页面提示、声音、音量和子任务通知。
  • 可分别测试 Windows 通知、页面内通知和提示音三条通路。
  • 连续点击测试按钮会立即替换尚未结束的同类测试通知,不会不断累积;Windows 测试仍使用独立投递标识,避免浏览器静默忽略。

插件使用 Harness 的持久化 turn/end 结果投影,而不是从“停止运行”猜测任务结果。首次加载、刷新和重连只建立基线,不会把旧任务重复通知。

安装

本项目针对 dsh 0.1.1-rc.2 开发。安装公开 npm 包并重启 dsh web

dsh plugin --profile web add @lsq64737/dsh-windows-notifications

如需移除:

dsh plugin --profile web remove @lsq64737/dsh-windows-notifications

首次启用

  1. 打开 DSH Web 页面。
  2. 进入“设置 → 通知”。
  3. 点击“授权通知”,在浏览器弹窗中选择允许。
  4. 分别点击“测试 Windows 通知”“测试页面通知”和“测试声音”。

浏览器要求由用户手势申请通知权限,因此插件不会在页面加载时自动弹权限框。如果曾选择“阻止”,需要先在 Edge 或 Chrome 的站点权限中恢复通知权限。

Windows 通知测试与声音测试相互独立,不会因为 Web Audio 被浏览器暂停而阻塞桌面通知。连续触发 Windows 或页面通知测试时,新测试会覆盖同类旧测试并重新计时;真实任务通知仍按发生顺序展示。浏览器拒绝创建或投递通知时,插件会显示页面错误提示,并以 windows-notifications: 前缀记录详细信息。

设置项

| 设置 | 默认值 | 说明 | | --- | --- | --- | | 启用通知 | 开 | 总开关 | | Windows 系统通知 | 开 | 后台时调用浏览器 Notification API | | 仅在 DSH 不活跃时弹系统通知 | 开 | 避免前台重复弹窗 | | 页面内提示 | 开 | 前台使用顶部居中的 DSH 风格通知卡片 | | 提示音 | 开 | 播放合成提示音 | | 音量 | 55% | 提示音音量 | | 任务完成 | 开 | 正常完成提醒 | | 失败与中断 | 开 | 所有非正常结束提醒 | | 等待你的操作 | 开 | 审批、计划确认和问题提醒 | | 子任务通知 | 关 | 关闭可避免子智能体产生大量提醒 |

浏览器与 Windows 限制

  • DSH 标签页必须保持打开;关闭标签页或彻底退出浏览器后插件无法运行。
  • Windows 系统通知要求浏览器认可当前页面为安全来源,否则 Notification API 可能不可用。
  • Windows 系统通知的外框、位置和持续时间由 Windows 控制。标题、内容和 DSH 图标由插件提供;页面通知卡片固定在顶部居中,直接复用 DSH 官方鲸鱼组件、状态点和浮层设计变量,并自动适配明暗主题。
  • Windows“勿扰”或浏览器站点权限可以阻止通知;插件无法绕过系统策略。
  • 部分浏览器会冻结长时间未使用的后台标签页。保持 DSH 与服务器连接可以降低发生概率,但浏览器调度仍是最终控制方。

开发与验证

npm run typecheck
npm test
npm run build

公开 npm 包的 repository 元数据固定指向本仓库,供插件列表和安装界面核验包与源码的归属关系。

关键路径和异常会以 windows-notifications: 前缀写入 Harness 日志或浏览器控制台,包括测试通知请求/显示、设置保存失败、权限请求失败、通知构造或投递失败和声音播放失败。

代码结构

  • src/index.ts:Host 设置和任务结果投影注册。
  • src/projection.ts:持久化任务结束原因折叠。
  • src/client/event-detector.ts:会话状态边沿检测与去重。
  • src/client/browser-notifier.ts:Notification API 和 Web Audio 边界。
  • src/client/controller.ts:通知策略与会话导航。
  • src/client/NotificationSettingsSection.tsx:Harness 独立通知设置页面。
  • src/client/PageNotificationOverlay.tsx:页面通知卡片、自动消失和无障碍语义。
  • src/client/page-notification-queue.ts:真实通知排队与测试通知覆盖规则。
  • src/client/page-notification-styles.ts:顶部居中布局及 DSH 设计变量样式。