dsh-sfx-pad: Event Sound Pad for DeepSeek Harness

Introduction

The DeepSeek Harness (DSH) ecosystem already has a few audio plugins, such as ziyouti/dsh-read-aloud, which mainly solve the problem of “reading text aloud.” But there’s another overlooked direction: what sound should a UI event produce? When you’re writing code, running tests, recording screens, or deploying, your eyes are usually on the terminal or some other window. By the time you come back to DSH, minutes may have already passed. Sound is the only feedback channel that doesn’t require you to shift your gaze, but reading out an entire message would become noise—what you really need is a single, distinct “ding.”

dsh-sfx-pad is a plugin designed for exactly this. It hooks into DSH’s real event system and binds events like “tests passed / tests failed / build completed / recording started/ended / publish succeeded” to a set of local audio cues. It supports preview, one-click mute, and per-application automatic mute profile switching. It only reads local audio files and makes no network requests.

What It Does

The plugin determines events via command text and exit codes—it only makes a sound when there’s evidence. When a command chains multiple steps, the last step determines the outcome.

Event Trigger Condition Default Sound
Tests passed npm/pnpm/yarn test, node --test, pytest, go test, cargo test, vitest, jest, dotnet test … exit 0 Ascending two-tone
Tests failed Same as above, non-zero exit Descending low hum
Build passed npm run build, tsc, vite build, next build, cargo build, go build, msbuild, make … exit 0 Short ascending chirp
Build failed Same as above, non-zero exit Descending dull thud
Recording started obs --startrecording, ffmpeg … gdigrab/x11grab/avfoundation, screencapture -v, wf-recorder Two high-pitched beeps
Recording ended Foreground recording process exits normally, or --stoprecording Two descending beeps
Publish completed git push, gh release create, npm publish, cargo publish succeed Three-note arpeggio
Awaiting your decision ask_user_question invocation, approval request Double short alert
Turn ended Agent returns to idle Single soft tap
Runtime error Agent throws an error or is interrupted Double dull thud

Test case counts are logged alongside (e.g., # pass 30 → the panel displays “30 test cases passed”).

Mute Profiles & Per-Application Switching

Three profiles: Default (all on), Focus (only failure, error, awaiting decision, and recording boundary events), Mute (all off).

“Automatic per-application profile switching” has three layers of logic, in descending priority:

  1. One-click mute: the panel toggle or the speaker button to the left of the input field—highest priority.
  2. Application name matching: obs, teams, zoom, Tencent Meeting, screen recording are mapped to “Mute” by default; full-name wildcards like obs* are supported. The app name comes from the client’s focus reporting or a local process POST /dsh-sfx-pad/scene (requires the DSH browser session cookie).
  3. Leaving DSH: when the page loses focus, switch to the “Focus” profile (can be disabled).

The plugin cannot see other processes. The browser can only tell it “the DSH window has focus / no focus”—it cannot tell it “you’re currently using OBS or Feishu.” So the precise app name for per-application switching needs to be pushed externally; otherwise, only focus-based approximation applies: once you leave DSH, non-critical events stop making sound.

Installation

Install from the official directory:

dsh plugin --profile <your profile> add dsh-sfx-pad

Or install directly from GitHub:

dsh plugin --profile <your profile> add github:dingchenhui0618-arch/dsh-sfx-pad

After installation, a “Sound Pad” tab appears in the conversation view; a speaker button is added to the left of the input field for one-click mute without switching views.

Panel & Configuration

The panel is divided into three sections:

  • Top bar: pad count, cumulative trigger count, current profile, and the reason it’s active (manual / left DSH / per-app / one-click mute).
  • Pad grid: each event’s name, trigger condition, duration, trigger count, individual toggle, and preview.
  • Last 30 triggers: timestamp, source tool, details (e.g., “30 test cases passed”); muted entries show the reason.

Audio is only read at runtime—never modified or downloaded. The default 10 WAV files live in assets/cues/, deterministically synthesized by node scripts/make-cues.mjs (the repo commits the generated files, so no regeneration is needed on a new machine).

To use your own sounds, configure the directory:

- id: dsh-sfx-pad
  config:
    cueDir: D:\my-sounds    # filenames must match: test-pass.wav / build-fail.mp3 / …

The plugin recognizes wav, mp3, ogg, m4a, and flac. It looks up files by pad id with matching filenames, checking cueDir first, then falling back to built-in. Single file cap: 8 MB. If not found, it uses the built-in—never goes silent.

HTTP API

The panel uses same-origin endpoints with cookies, going through the same browser trust barrier as DSH’s own /api:

Method Path Purpose
GET /dsh-sfx-pad/state Full snapshot (pads, profiles, recent triggers)
GET /dsh-sfx-pad/events SSE real-time stream
GET /dsh-sfx-pad/audio/<id> Read a cue file (only pad id + allowed extensions)
POST /dsh-sfx-pad/mute {muted?} one-click mute / toggle
POST /dsh-sfx-pad/profile {profile} manually select a profile
POST /dsh-sfx-pad/auto {enabled} auto profile switching
POST /dsh-sfx-pad/pad {id, enabled?, gain?} individual pad settings
POST /dsh-sfx-pad/scene {app?, focused?} report current application
POST /dsh-sfx-pad/preview {id} get preview URL (doesn’t write to history)
POST /dsh-sfx-pad/fire {id} manually trigger through the full policy chain
POST /dsh-sfx-pad/clear Clear recent triggers

Push the app name from a local script (dsh-auth-* cookie copied from browser DevTools → Application → Cookies, valid for 30 days):

curl -X POST http://127.0.0.1:3080/dsh-sfx-pad/scene \
  -b 'dsh-auth-XXXXXXXXXXXXXXXX=v1.…' \
  -H "content-type: application/json" -d "{\"app\":\"OBS Studio\",\"focused\":false}"

What It Doesn’t Do

  • No network: no downloads, no uploads, no cloud audio library—audio is only read from local disk.
  • Cannot see other processes: no native dependencies, no platform API calls, no way to know “which app is in the system foreground.” Precise app names must be pushed via /scene; otherwise, only focus approximation applies.
  • No renaming, no sound library: no built-in music, nothing longer than 1 second, no mixing—it’s a UI feedback sound, not a player.
  • Doesn’t make decisions for you: the listeners on tools/pre-execute and approval/request always continue calling next(). Sound never affects whether a tool runs or an approval passes. Any exception in any path is swallowed.
  • Doesn’t write your files: it only writes one preference file $DSH_HOME/sfx-pad.json (atomic replacement). Audio files are always read-only.
  • Not a security boundary: it merely calls your attention back; it doesn’t guarantee what you hear is the truth.

Use Cases & Notes

This plugin is suitable for users who want to use sound feedback to improve development and collaboration efficiency. It runs with the current DSH process permissions. Before installing, review the source code and license (MIT).

Summary

dsh-sfx-pad fills in the “event → sound” piece of the DSH ecosystem, turning key milestones like tests, builds, recordings, and deployments into audible signals using local audio. Combined with mute profiles and per-app switching, it provides necessary reminders while helping you stay focused. For details, visit the skill directory: https://www.skillhub.cn/plugins/dingchenhui0618-arch/dsh-sfx-pad; source code on GitHub: https://github.com/dingchenhui0618-arch/dsh-sfx-pad.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye