BigFatGunn/dsh-approval-chime ↗★ 1

dsh-approval-chime

Plays a chime in the DeepSeek Harness Web UI whenever a tool-permission approval request appears.

Package
dsh-approval-chime
Compatibility
Unverified
Version
0.2.0
License
MIT
Last updated
Nov 18, 2026

Other repositories with this package name

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:BigFatGunn/dsh-approval-chime

dsh-approval-chime

CI Release License: MIT

A DeepSeek Harness Web UI plugin that plays a chime the moment a tool-permission approval request appears — including requests raised by a session you are not looking at, so you notice them while reading somewhere else.

Русская версия: README.ru.md

What it does

  • Watches the Client pending-interaction projection (ctx.uiSession.sessionStatus).
  • Rings when one or more new requests whose domain is approval appear, and stays silent for requests that were already listed when the plugin started.
  • Coalesces requests that arrive within about a second of each other into one chime, and interrupts a chime that is still ringing instead of stacking it.
  • Never answers, delays, or reroutes a request: the approval card, its keyboard handling, and the Host waterfall stay exactly as they were.
  • Does not touch other plugins' DOM, the conversation, or the Session log.

The plugin observes the pending-interaction status instead of the approval waterfall, so it cannot influence a decision. That is also why it sees approvals from every session, not just the visible one.

Requirements

  • DeepSeek Harness 0.2.2-rc.3 (declared in dsh.compatibility; the plugin uses ctx.uiSession.sessionStatus, which appeared with the pending-interaction projection).
  • A browser with Web Audio — the Desktop app and current Chromium/Firefox/Safari all qualify.
  • No runtime dependencies. Node 20.11+ is needed only to build and test.

Install

From a release

  1. Download dsh-approval-chime-.tgz from Releases.
  2. Unpack it anywhere.
  3. In Harness: Plugins → Add plugin → point it at the unpacked folder.
  4. Switch the Approval chime bundle on.

Release artifacts ship the built-in two-note chime, which is synthesised by the plugin and redistributable.

From source

git clone https://github.com/BigFatGunn/dsh-approval-chime.git
cd dsh-approval-chime
npm run build          # writes client.js from src/client.js

Then Plugins → Add plugin → the cloned folder → switch the bundle on.

client.js is a build artifact and is not committed, so a fresh clone has to be built once before Harness can load it.

Your own sound

The Web plugin route serves bundle scripts and image assets only, so the page cannot fetch an audio file: the sound is embedded into client.js as a base64 data URL at build time.

cp "my-sound.mp3" assets/ding.mp3   # assets/ is gitignored
npm run build                        # embeds it
npm test                             # also asserts the embedded bytes match the file

Any format the browser's decodeAudioData accepts works (MP3, WAV, OGG, M4A). If a browser cannot decode the file, the plugin falls back to the built-in chime, so the notification is never silent.

How it works

PieceRole
src/client.jsBrowser half: watches ctx.uiSession.sessionStatus, rings on a new approval interaction
scripts/build.mjsReplaces the @embed-ding marker line with the optional base64 sound
client.jsBuilt bundle the Harness serves (dsh.client → ./client.js)
index.jsHost half: empty; the row exists so the bundle's browser module loads
cordis.patch.ymlInserts the approval-chime row

Audio behaviour worth knowing:

  • Every chime waits for a running AudioContext. Browsers keep it suspended until the page has received a pointer or keyboard event, so a request that arrives before that gesture is dropped, not queued — a queued note would surface on the click that answers the request and read as a chime for an approval that no longer exists.
  • A new request fades the ringing chime out in 120 ms and starts a fresh one.
  • The AudioContext is created on the first chime and closed when the plugin unloads, together with its gesture listeners and status subscription.

Limitations

  • Only the approval domain rings; pending questions from other domains stay silent.
  • A freshly opened browser tab stays silent until you click or press a key once. The Desktop window normally has input long before an approval arrives.
  • There is no volume or mute control inside the plugin: switch the bundle off in Plugins → Installed plugins to silence it.
  • The chime is a single global signal; it does not say which session wants attention.

Development

npm test

test/client.test.mjs builds four artifacts into a temporary directory and drives them through a fake browser: the silent build, a build with a supplied sound, a build whose sound cannot be decoded, and a byte-exactness check against a local assets/ding.mp3 when one exists. The checks cover priming, coalescing, the suspended-context rule, interruption, non-approval domains, and disposal.

They prove the plugin's logic only. Neither browser audio nor rendering is verified by this suite — listen to it in the running Web UI before shipping a release.

Releases are cut by pushing a version tag; .github/workflows/release.yml builds the silent bundle, runs the tests, packs the plugin, and attaches the tarball to a GitHub Release.

License

MIT. Any audio file placed in assets/ stays local and is the maintainer's responsibility.