Zhengshuji/dsh-sound-notifier ↗★ 0
dsh-sound-notifier
DSH bundle: plays distinct chimes in the Web UI on message received, thinking start, tool call, and turn end.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Zhengshuji/dsh-sound-notifier说明文档
阅读完整 README ↗dsh-sound-notifier
Sound alerts for DeepSeek Harness (DSH): distinct chimes in the Web UI on message received, thinking start, tool call, and turn end.
DSH(DeepSeek Harness)插件:在 Web 界面中,于收到消息、开始思考、调用工具、回合结束四个关键节点播放不同的提示音。以官方 bundle 形式分发,随 DSH 启动自动加载,无需在会话内重复激活。
Features
- 📩 收到消息 — 双音短提示(660Hz → 990Hz)
- 💭 输出思考 — 上升滑音(392 → 784Hz,三角波)
- 🛠 调用工具 — 清脆两下(233Hz → 311Hz,三角波)
- 🏁 任务结束 — 大三和弦琶音(C5-E5-G5)
- 🔇 子代理/工作流内部活动不响铃(仅顶层会话发声)
- 💾 页面刷新不重播已播提示(
sessionStorage记录序号) - 🔊 提示音全部由 Web Audio API 合成,无需任何音频资源文件
工作原理
| 半 | 文件 | 职责 |
|---|---|---|
| Host 半 | index.js | 监听 DSH 事件 → 有界队列(上限 256 条)→ 经官方 webServer 服务暴露 GET /sound-alerts/events?after=N 轮询端点 |
| Browser 半 | client.js | 标准 dsh.client 客户端插件,由 client-modules 注入 window.__DSH_BOOT__ 加载;每 400ms 同源 fetch 轮询端点,用 Web Audio 播放 |
事件对照:
| 节点 | 触发事件 |
|---|---|
| 收到消息 | agent/inbox/inserted |
| 开始思考 | llm/stream 中首次 reasoning-delta |
| 调用工具 | tools/pre-execute |
| 回合结束 | agent/turn-stopping |
环境要求
- DeepSeek Harness(源码 checkout 或安装版均可),Web 界面(
dsh web/dsh --profile web) - Node.js ≥ 22.19(DSH 自身要求)
- pnpm(
dsh plugin子命令转发到 pnpm)
安装
在 deepseek-harness checkout 根目录执行:
pnpm dsh plugin --profile web add /path/to/dsh-sound-notifier
该命令会把本目录以 link: 形式安装进 ~/.dsh/profiles/web,并因 package.json 声明了 dsh.bundle 而自动把 dsh-sound-notifier 追加到该 profile 的 dsh.profile.bundles。安装后重启 DSH 进程(停掉当前的 再重新启动)即可生效。