Introduction¶
When running long-running tasks in DeepSeek Harness (DSH), you usually don’t keep watching the interface. A common practice is to poll api-session/status to check if the agent has gone from busy back to idle, then treat it as “done” and proceed with follow-up actions. This signal has two blind spots: when a user clicks stop, when an error occurs, or when a hook intercepts, the status also becomes idle, indistinguishable from a normal completion; a single user task may also go through multiple drivers (sub-agent callbacks, goal round continuation, etc.), where stopping each driver causes an idle state, potentially triggering false chimes multiple times.
Below is an introduction to the community client plugin dsh-turn-chime (maintainer MacilyDots, GitHub: MacilyDots/dsh-turn-chime). It determines on the host side based on session events whether “the task initiated by the user has completed normally”, then notifies the browser via SSE to synthesize a chime sound using Web Audio, aiming to chime only once and not chime during interruptions.
What Is This¶
dsh-turn-chime is a session completion chime plugin for DSH, categorized as a client plugin. The host decides when to chime; the sound is played in the renderer process; the timbre is synthesized live via Web Audio without depending on audio files.
Community directory page: skillhub.cn/plugins/MacilyDots/dsh-turn-chime. The directory site has no official affiliation with DeepSeek / 幻方; the DSH ecosystem itself follows the “everything is a plugin” approach, and it’s recommended to review the source code and license yourself before installing third-party plugins (this plugin is MIT licensed, current package version 0.2.0). The plugin runs under the current DSH process permissions; please ensure you trust the repository before installing.
Core Features¶
Differences from Directly Checking idle¶
| Problem | Only checking api-session/status |
dsh-turn-chime |
|---|---|---|
| Normal completion vs. interruption | Cannot distinguish | Only counts when turn/end with reason.kind === "completed" |
| Multiple drivers in one task | May have multiple idle states | One user message corresponds to one pending; consumed after first chime |
| Who sent the message | Client only has busy boolean | Host verifies user/message and source.kind === "user" |
Trigger Conditions (all three must be met)¶
- Receive
user/messageinsession/event, andsource.kind === "user"(time context injection, sub-agent feedback, hook injection do not count); - Receive
turn/endinsession/event, andreason.kind === "completed"(aborted,error,blocked, hittingmax-tokenswill not chime); agent/statuschanges toidle(a driver completely stops).
The decision result is pushed to the client via SSE at path /dsh-turn-chime/events.
Client Settings¶
In the DSH interface, go to Settings → Chime to configure:
| Item | Description |
|---|---|
| Enable chime | Master switch |
| Voice | Crisp ding / Bell / Short pluck / Short beep / Water drop / Xylophone / Retro two-tone / Soft bass / Muted |
| Volume | 0–100%, auto-preview when releasing the slider |
| Ignore subagent sessions | Enabled by default; sub-agent completion doesn’t count as “what the user is waiting for” |
| Event channel | Shows whether SSE is connected and chime count |
Configuration is stored in browser localStorage with key name dsh-turn-chime:config:v1.
Architecture Points¶
Sound can only come from the renderer process: if the host side directly plays to the system, it either cold-starts an external player (high latency) or can only use Electron shell.beep() (no timbre selection). Web Audio has no additional dependencies, low latency, and is cross-platform.
The decision can only be on the host: turn/end reasons and user/message sources are only available on the host event bus; the session status available to the client is insufficient to distinguish between “completed” and “stopped”.
Main files: lib/index.js (host decision and routing), lib/client.js (SSE, Web Audio, settings panel), install.mjs (installation script).
Installation and Activation¶
Place the repository in any directory, then execute in the repository root directory (commands from the official README):
node install.mjs # Install to %DSH_HOME%\profiles\desktop
node install.mjs web # Install to named profile (can specify multiple different profiles)
node install.mjs X:\path\to\profile
The installation script will: write file: dependency to the corresponding profile’s package.json; add the plugin name to dsh.profile.bundles; create a junction pointing to this repository under node_modules/<plugin> (changes to source code take effect immediately, no need to copy/sync).
Must restart DSH after installation. The client module manifest is generated at startup; without restarting, the plugin won’t load.
To uninstall: remove the corresponding line from dsh.profile.bundles, then delete node_modules/dsh-turn-chime.
Typical Usage¶
- Complete the installation as described in the previous section and restart DSH.
- Open Settings → Chime, enable Enable chime, select Voice and Volume.
- Send a user message in the conversation and wait for the task to complete normally; you should hear a chime. If you stop mid-way or an error occurs, it should not chime.
- For troubleshooting, check the SSE status and chime count in Event channel in the settings.
Browser console debugging (provided in README):
__dshTurnChime.play('chime', 0.6) // Manual preview
__dshTurnChime.status() // { connected, chimes, config }
__dshTurnChime.onChime('x') // Simulate completion event, should chime once
Default host-side log path:
%DSH_HOME%\logs\dsh-turn-chime.log
A log segment for normal completion roughly includes client-ready, sse-open, chime, play (and ok:true). The same plugin also provides:
GET /dsh-turn-chime/events— SSE completion event streamGET /dsh-turn-chime/log— Recent 120 lines of logPOST /dsh-turn-chime/clear— Clear log
Logic tests can be run in the repository root directory:
node test/test-logic.mjs # or npm test
Covered scenarios include: chime on normal completion, silent on user interruption, silent on time context-only injection, one message with two drivers chiming only once, silent on error, chime again after new message completion following an interruption.
Use Cases and Notes¶
Suitable for: Developers who run DSH tasks in the background for long periods, want audible feedback when tasks are “truly done”, but don’t want to be disturbed by false idle states or multiple sub-agent completions.
Limitations (stated in README):
- Only plays sound in the browser renderer process; no sound when DSH is completely closed.
- Depends on DSH internal event formats (
session/event,agent/status); may need to updatelib/index.jsafter major version upgrades. - Defaults to chiming only for
completed; if you want errors to use a different sound, you need to modifyCHIME_REASONinlib/index.js.
Security and Trust: The plugin subscribes to session events and writes logs locally, opens SSE; please read the GitHub repository source code before installation to ensure it meets your environment policies.
Conclusion¶
dsh-turn-chime separates “completion” from a simple idle state: the host looks at user messages and turn end reasons, the client chimes once using Web Audio, with timbre and volume selectable in settings. If you’re doing agent development in DSH and need reliable completion alerts, you can get the repository from the directory page or GitHub, install it into your profile using install.mjs, and restart to try it out.
- Directory page: https://www.skillhub.cn/plugins/MacilyDots/dsh-turn-chime
- GitHub: https://github.com/MacilyDots/dsh-turn-chime