返回目录
消息通讯 插件

dsh-approval-ding

tianhengzhibei/dsh-approval-ding

Play a short ding whenever DeepSeek Harness asks for tool approval.

Stars
0
Forks
0
Issues
0
更新
8 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:tianhengzhibei/dsh-approval-ding

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-approval-ding

A short ding and a flashing taskbar button the moment DeepSeek Harness needs you: a tool-approval prompt, or a question.

审批提示音 + 任务栏闪烁:DeepSeek Harness 请求审批、或向你提问时响一声“叮”,同时任务栏图标像微信来消息那样闪烁。


Why

When an agent calls a tool that needs permission, or stops to ask you something, DSH waits silently. If you have switched to another window or another app, the turn stalls until you notice. This plugin plays a short bell as soon as the prompt appears — before you have answered anything.

It never answers, approves, rejects or delays anything. It only asks for your attention.

What triggers it

Trigger When it fires
approval/request A tool call needs your permission
user-questions/request ask_user_question asks you something, including its timed variant and the exit_plan_mode plan review

Install

From GitHub:

# Web GUI profile
dsh plugin --profile web add github:tianhengzhibei/dsh-approval-ding

# Desktop app profile
dsh plugin --profile desktop add github:tianhengzhibei/dsh-approval-ding

Or find it in the plugin market and install it there.

No build step, no dependencies — the package ships plain ESM and one WAV file.

What you hear

assets/ding.wav: a 0.62 s bell at E6 (1318.51 Hz) with four inharmonic partials, 44.1 kHz mono 16-bit.

sound: system uses the OS notification sound instead; any other value is treated as a path to a .wav (absolute, or relative to the package root).

Taskbar attention (Windows)

Along with the ding, the DSH taskbar button blinks — the same way WeChat tells you a message arrived. While the window is in the background it keeps blinking until you activate it; when it already has focus, six short blinks make the prompt noticeable without being noisy.

The plugin runs inside the Node-mode host process, which has no access to the Electron window (flashFrame / setOverlayIcon), so the hint is done by a small PowerShell helper: FlashWindowEx from user32. No extra dependency, no shell modification.

badge: true additionally pins a red exclamation overlay on the taskbar button (ITaskbarList3::SetOverlayIcon), cleared when the window comes to the foreground or after attentionTimeoutSeconds. It is off by default because the overlay is drawn by the shell on top of the app icon and looks heavy for a keyboard-driven workflow.

Configuration

Every key is optional; the defaults are shown.

# <profile>/cordis.patch.yml
- insert:
    - id: dsh-ding
      name: dsh-approval-ding
      config:
        enabled: true               # false mutes the plugin without uninstalling it
        sound: ding                 # "ding" | "system" | "C:\path\to\chime.wav"
        cooldownMs: 500             # parallel requests produce a single ding
        sources: [approval, question]  # drop one to silence only that kind
        attention: true             # flash the taskbar button (Windows)
        badge: false                # also pin a red ! overlay while unfocused
        attentionTimeoutSeconds: 60 # how long the badge may stay without focus

How it works

  • Two Cordis waterfalls are the triggers: approval/request, which DSH only dispatches when a prompt is really needed (under a never approval policy the request is rejected before the waterfall runs, so the plugin stays silent), and user-questions/request, which ctx.userQuestions.ask() dispatches for every question batch.
  • Both listeners are registered with { prepend: true, global: true }: global keeps a root-level listener visible to Agent-scoped dispatch, prepend makes it run before any answerer (including the browser bridge that takes over the composer), so the sound is not lost to a fast decision.
  • They return next() untouched. The real answerers — the web approval panel, the question card, a command-line prompt, another plugin — still receive the request unchanged.
  • Playback happens in a helper child process with stdio: 'ignore', so a slow PowerShell start or a missing audio device can never block the turn. Every failure is swallowed: a failed ding must not fail a request.

Platform

Platform Playback
Windows powershell.exe + System.Media.SoundPlayer
macOS afplay
Linux paplay, falling back to aplay

Taskbar attention is Windows-only. On macOS and Linux the plugin plays the sound and leaves the dock/taskbar alone.

The sound is played on the machine that runs the DSH host process. If your browser connects to a remote host, the ding is heard on the host, not in the browser tab.

Windows note: the helper must not be spawned with detached: true. A DETACHED_PROCESS powershell.exe starts without a console, exits 0 immediately and never runs its script — verified: no audio, no side effect.

Latency

PowerShell cold start is roughly 0.5 s on Windows, so the ding is heard about half a second after the prompt appears.

Uninstall

Remove the bundle with the plugin manager, or drop dsh-approval-ding from dsh.profile.bundles in the profile's package.json.

License

MIT.


中文说明

当 Agent 调用需要授权的工具、或停下来向你提问时,DSH 都会静静地等待。人不在窗口前, 这一轮就卡住了。本插件在请求出现的那一刻响一声短铃,并让任务栏图标像微信来消息那样 闪烁,不参与任何决策。

两种触发:

触发点 什么时候响
approval/request 工具调用需要授权
user-questions/request ask_user_question 向你提问(含带超时的变体,以及 exit_plan_mode 的计划复核)
  • 以 { prepend: true, global: true } 注册,保证先于任何应答器执行,随后立即 return next(), 不影响浏览器审批面板、提问卡片等既有应答器。
  • 播放放在独立子进程里,PowerShell 冷启动或没有声卡都不会阻塞请求;播放失败一律吞掉。
  • 任务栏提醒同样由子进程完成(FlashWindowEx 闪烁):窗口在后台时一直闪到你切回去, 已经在前台时短促闪 6 下提醒一眼。默认不挂角标;badge: true 才会用 ITaskbarList3 加红色感叹号,并在窗口回到前台或超时后自动清除。
  • 安装:
dsh plugin --profile web add github:tianhengzhibei/dsh-approval-ding

配置(全部可选,括号内为默认值):enabled(true)、sound(ding, 可选 system 或自定义 .wav 路径)、cooldownMs(500,并发请求只响一次)、 sources([approval, question],只留一个就只对那种请求发声)、 attention(true,任务栏闪烁,仅 Windows)、 badge(false,额外挂红色感叹号角标)、 attentionTimeoutSeconds(60,未获得焦点时角标最长保留秒数)。

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类消息通讯
规则置信度高

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: notification。