sixtysevenlf/dsh-sound-alerts
DSH Web UI 声音提示插件:需要授权/提问与任务完成时播放提示音 (Web Audio, no assets)
Project Overview项目介绍
This is a native sound alert plugin built exclusively for the DSH web client. It plays a corresponding alert sound when specific session events trigger, including authorization requests, user questions, task completion, task failure, and goal completion. All default sounds are synthesized via Web Audio with no external audio assets required, and sounds play in any browser tab including background tabs. To install the plugin from source, you first run npm install with the --legacy-peer-deps flag, then build the node and client halves with the provided build scripts, before injecting the package into your local DSH profile.
The plugin lets users customize alert sounds for each event type through the DSH settings menu, found under Settings > General > Sound Alerts. Users can upload local audio files in MP3, WAV, OGG, M4A, or FLAC formats, with a maximum file size of 10MB per file. Custom audio files are stored as dataURLs in IndexedDB, so they persist across page refreshes and client restarts without taking up localStorage quota space. If a custom audio fails to load or play, the plugin automatically falls back to the built-in synthesized sound for that event. Users can also preview any custom or default sound directly in the settings menu.
All plugin settings, including the master on/off switch, volume slider, and individual event toggles, are saved persistently in the localStorage key dsh-sound-alerts:settings. The plugin adds a 1.2 second debounce to avoid multiple alerts from firing in quick succession when batch events trigger. After installation, you must refresh your browser page for the plugin to load correctly, because the DSH client needs to include the plugin’s client JavaScript in the boot sequence. On first run, you need to click anywhere on the page to unlock the AudioContext required for sound playback. Debug logs are stored in window.__soundAlertsLog for troubleshooting, with the most recent 100 entries retained.
这是一款专为DSH网页端客户端开发的原生声音提示插件,会在会话出现特定状态事件时播放对应提示音。支持的触发事件包括需要授权、需要用户回答问题、任务运行完成、任务失败、目标完成五种,每种事件都预设了不同的内置合成提示音,所有默认声音都由Web Audio合成,不依赖额外的外部音频资源,声音在浏览器标签页播放,包括后台标签页。
插件支持用户为每个事件自定义上传本地音频,支持mp3、wav、ogg、m4a、flac等多种常见格式,单文件大小不超过10MB即可。自定义音频会以dataURL形式存储在IndexedDB中,不会占用localStorage配额,刷新页面或重启客户端也不会丢失数据,自定义音频加载失败时会自动回退到内置合成音。
插件所有设置(总开关、音量调节、各事件开关)都持久化保存在localStorage的特定键中,播放音量跟随设置滑杆,还带有1.2秒防抖避免批量事件轰炸。用户安装后需要刷新浏览器页面生效,首次使用需要点击页面任意位置解锁AudioContext,内置调试日志可在控制台查看最近100条记录。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-sound-alerts(sixtysevenlf/dsh-sound-alerts)
仓库:https://github.com/sixtysevenlf/dsh-sound-alerts
本站详情页:https://www.yhbd.top/plugins/sixtysevenlf-dsh-sound-alerts/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 BSD-3-Clause · ⭐ 5 · 最近提交 2026-08-18 · 主语言 TypeScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:sixtysevenlf/dsh-sound-alerts
把 sixtysevenlf/dsh-sound-alerts 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
@dsh-external/dsh-sound-alerts
DSH Web UI 声音提示插件(browser client bundle,platform: web)。
当以下事件发生时播放提示音:
| 事件 | 默认声音 | 触发源 |
|---|---|---|
| 需要授权(沙箱/命令审批) | 双音 ×2(急切) | 会话 pendingInteraction === 'approval'(approval/requested 帧) |
| 需要回答问题(ask_user_question) | 单次双音(柔和) | 会话 pendingInteraction 为 question / plan-review |
| 任务/运行完成 | 三连胜利音 | 会话 running true→false(2.5s 复检)或后台会话 completed 标记 |
| 任务失败 | 关羽之歌(合成致敬版) | 当前会话 lastAgentError 从无到有(host/agent-error 帧) |
| goal 完成 | 四音胜利收尾 | 当前会话 goal 投影 phase → complete |
默认音全部由 Web Audio 合成(无音频资源);声音在浏览器标签页中播放(含后台 标签页),首次点击/按键后解锁 AudioContext。
自定义声音
设置 → 通用 → "声音提示 (Sound Alerts)",每个事件一行:
需要授权 [上传] [试听] [清除] 自定义文件名.mp3
- 上传:本地音频文件(mp3/wav/ogg/m4a/flac,≤10MB),以 dataURL 存入 IndexedDB(不占 localStorage 配额,刷新/重启不丢)
- 试听:有自定义播自定义,无自定义播内置合成音
- 清除:删除自定义音频,恢复内置音
- 自动回退:自定义音频加载/播放失败时静默回退内置合成音
播放时音量跟随滑杆;全局 1.2s 防抖避免批量事件轰炸。
设置
总开关 + 音量滑杆 + 各事件开关/上传/试听/清除,持久化于
localStorage 键 dsh-sound-alerts:settings。
诊断
console.debug('[sound-alerts]', ...) + window.__soundAlertsLog(最近 100 条)。
结构
src/index.ts— node half:空 apply(纯 UI 插件,让行出现在 host Loader)。src/client/index.ts— 浏览器 half:声音引擎 + sessions 监视 + 设置行 + 自定义音频。cordis.patch.yml— bundle patch:向 Web 装配树插入名录行sound-alerts。dsh.bundle.patch— 使本包作为 profile bundle 层装配(dependencies + bundles)。
构建与安装
# 依赖(esbuild 构建 client;--legacy-peer-deps 跳过内部 rc 包的 peer 自动安装)
npm install --legacy-peer-deps
# 构建(node half: tsc via scripts/build.sh;client half: esbuild via scripts/build-client.mjs)
bash scripts/build.sh # DSH_CHECKOUT 自动探测($HOME/dsh-harness)
npm run build:client
# 注入器环境内热装配(改 profile package.json + junction + loader.create)
dev_install_package D:/DSH/plugins/dsh-sound-alerts
安装后刷新浏览器页面:启动图 window.__DSH_BOOT__ 会包含本包 client.js,
声音即生效(新名录行需一次刷新,之后 HMR 管内容热更)。
pan17/dsh-wechat
huguangyu666/dsh-plugin-notify
liustack/modlens
Clarklevis1995/dsh-mobile
ZSeven-W/dsh-crew