ZIye1208/dsh-approval-voice

DSH Web GUI 插件:当需要你审批或回答的弹窗(沙箱权限升级审批、askuserquestion 提问、计划审批等)出现时,自动播放提示音并用语音播报,避免漏看。

catalog descriptioncatalog 简介 / catalog description:DSH Web GUI 审批语音提示插件:需要审批/回答的弹窗出现时播放提示音并语音播报

Project Overview项目介绍

dsh-approval-voice is a native plugin built exclusively for the DSH Web GUI. It is designed to alert users when approval or user input requests pop up, so users do not miss pending requests that are in background sessions. There are two supported installation methods: the recommended way is to install via npm by running dsh plugin --profile web add dsh-approval-voice, and the alternative is to install directly from the GitHub repository with the command dsh plugin --profile web add github:ZIye1208/dsh-approval-voice. After installation, you need to restart the DSH web service and refresh the browser page for the plugin to take effect.

This plugin detects pending approval, user question, and plan review requests via two paths. The primary path subscribes to DSH’s global pending interaction hook, which allows it to detect requests across all sessions, even those that are not open in any browser tab. The fallback DOM detection method works for older versions of DSH that do not support the global hook. Each request is only alerted once, even across multiple open tabs, to avoid duplicate notifications.

The plugin is released under the permissive MIT open source license, so it can be used and modified freely. Voice broadcast relies on the system’s installed Chinese TTS voice, and it will automatically fall back to only an alert tone if no Chinese voice is found. Browsers block auto-playback of audio until the user interacts with the page via a click or keypress, so the first alert will only work after the initial user interaction. Custom alert tones are stored as data URLs in the browser’s local storage and must be under 4MB in size.

这是一款专为 DeepSeek Harness (DSH) Web 客户端打造的原生插件,核心功能是当 DSH 出现需要用户审批或回答的弹窗(包括沙箱权限升级审批、用户提问、计划审批等场景)时,自动播放提示音并进行语音播报,避免用户漏看后台会话的待处理请求。插件采用双检测路径,通过会话作用域的事件标识确保不会重复发送提醒。

默认开启提示音加语音播报,对所有会话生效,哪怕是没有打开在任何标签页里、仅在侧边栏显示「等待审批」的会话也能正常提醒。用户可以在 DSH 设置的「常规 → 审批语音提示」入口自定义配置,支持开关总提醒、切换提醒方式、调整音量、限定提醒范围,还能替换自定义提示音。

插件采用 MIT 许可证开源,可通过 npm 或 GitHub 直接安装,安装后需要重启 DSH Web 服务并刷新页面生效。语音播报依赖系统安装的中文 TTS 语音,找不到中文语音时会自动退化为仅提示音。首次使用需要用户点击页面解锁音频,自定义提示音大小不超过 4MB。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
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 dsh-approval-voice

把 ZIye1208/dsh-approval-voice 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-approval-voice(审批语音提示)

DSH Web GUI 插件:当需要你审批或回答的弹窗(沙箱权限升级审批、ask_user_question 提问、计划审批等)出现时,自动播放提示音并用语音播报,避免漏看。

工作原理

插件有两条检测路径,两条路径统一使用会话作用域的事件标识 (session:<sessionId>:<kind>:<key>),因此不会重复提醒:

  1. 全局待处理交互源(首选):订阅 DSH 客户端的全局待处理交互快照,按 Map<sessionId, {kind, key}> 感知所有会话的 approval / question / plan-review —— 包括没有开在任何标签页里的会话。两种客户端核心形状都支持(resolveGlobalSource() 自动适配):
    • 网页版 dsh 0.1.5-rc.3:ctx.uiSession.pendingInteractions (即侧边栏「等待审批」所用的 root hook sessionPendingInteraction);
    • 桌面端 dsh-desktop 0.2.0-rc.2:没有 pendingInteractions,改用 ctx.uiSession.sessionStatus(Map<sessionId, {running, pendingInteraction, completionUnread}>, 取其中的 pendingInteraction),这正是桌面端侧边栏「等待审批」用的源。
  2. DOM 标记(兜底):仅在两个源都取不到时(更老的 DSH)才使用,监听当前视图渲染出来的卡片:
标记 对应界面
data-approval-key 沙箱权限升级等审批(ApprovalPanel)
data-question-key 提问 / 选择题(QuestionComposer)
data-plan-review-key 计划审批(PlanReviewPanel)

命中时按配置播放升调提示音(Web Audio,C5-E5-G5)和/或语音播报(SpeechSynthesis,中文语音)。每个请求只提醒一次。

安装

方式一:npm(推荐,已发布到 npmjs)

dsh plugin --profile web add dsh-approval-voice

方式二:GitHub(备选)

dsh plugin --profile web add github:ZIye1208/dsh-approval-voice

安装后重启 dsh web 服务,刷新页面即可生效。

本地开发安装(改代码即时生效):

dsh plugin --profile web add link:C:\path\to\dsh-approval-voice

使用

  • 默认开启「提示音 + 语音播报」,且默认对所有会话提醒(多会话 / 单页签切换会话 / 多标签页都能听到任何会话的审批、提问、计划审批)。
  • 设置入口:设置 → 常规 → 审批语音提示,可配置:
    • 总开关;
    • 提醒方式:仅提示音 / 仅语音播报 / 提示音 + 语音播报;
    • 音量;
    • 提醒范围:所有会话(默认,覆盖所有会话,含没开在任何标签页里的会话)或 仅当前会话(只在当前标签页响应本页显示的会话);
    • 提示音文件:选择本地音频文件(mp3/wav/ogg 等,≤2MB)替换内置提示音;点「恢复默认」回到内置提示音。超限或保存失败时面板会直接报错,不会"看着像存住了"。
  • 试听按钮:按当前设置播放一次(含自定义提示音)。
  • 控制台调试:window.__approvalVoice.get() / set({...}) / test() / pending() / global() / alertedCount() / soundBytes() / currentSessionId() / tabId。 set({...}) 返回 { ok, error, config }:ok:false 表示没存住(已回滚内存配置),别忽略它。
  • 配置保存在浏览器 localStorage(键 dsh.approvalVoice.v1),同一浏览器所有标签页共享。

多会话提醒原理

DSH Web GUI 里每个会话可能是一个独立标签页,也可能只是同一页签侧边栏里的一条。插件按以下方式让任一会话的审批都能被听到:

  • 每个页签订阅 DSH 客户端的全局待处理交互源(网页版 ctx.uiSession.pendingInteractions、 桌面端 ctx.uiSession.sessionStatus),因此任何会话(哪怕没开在任何页签里、只在侧边栏显示 「等待审批」)出现审批 / 提问 / 计划审批时,每个页签都会感知到;两个源都取不到时才退回监听本页 DOM 里的卡片。
  • 事件标识是会话作用域的(session:<sessionId>:<kind>:<key>),配合 BroadcastChannel (并写入 localStorage 作为兜底)在全浏览器内一次提醒只响一次:优先由当前聚焦的标签页 播放(声音最可靠),若没有任何聚焦标签页,则由最先到时的后台标签页兜底播放。
  • 若抢到播放权的页签实际没能出声(浏览器拒绝自动播放且音频未解锁),它会释放 claim 并广播 bell-failed,请已解锁音频的其它页签补响一次。
  • 仅当前会话 模式不广播,只在本地为本页正在显示的那个会话出声。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-understand-anything 下一个 Next dsh-project-compass →