Introduction¶
When running long conversations in DeepSeek Harness (DSH) or waiting for the model to finish writing a full turn, developers often switch to other windows to handle tasks. Without explicit feedback, one must repeatedly switch back to the application to check when the turn ends or what the result roughly is. System notifications are a common solution, but aligning the “session name, duration, answer summary” with DSH’s turn lifecycle requires manually hooking into host events and handling differences across platforms.
Below is an introduction to the community plugin dsh-turn-notifier (maintainer: king-shao, category: Client). It sends a notification when a conversation turn completes normally: the title is the session name, and the body is a summary of the current turn’s answer; it uses different delivery channels for when the page is online versus when it is not running, with the plugin automatically selecting based on the environment.
What is this¶
dsh-turn-notifier is a DSH host plugin implemented in pure JavaScript with no native dependencies. Version 1.2.1, MIT licensed, requires Node.js >= 20.
The plugin listens for turn completion events and delivers {session name, duration, summary} as system or in-page notifications. Clicking the notification can activate the application window (the target application can be specified via configuration for the native channel).
Directory Page: skillhub.cn/plugins/king-shao/dsh-turn-notifier
Source Code & Docs: github.com/king-shao/dsh-turn-notifier
Notification Content and Delivery Channels¶
Notification Fields¶
| Field | Value |
|---|---|
| Title | Session name; uses the title config if the session has no title |
| Subtitle | Completed · <duration> |
| Body | Summary of the current turn’s answer |
| Icon | assets/whale.png inside the package |
Two Channels (Never delivered simultaneously)¶
| Channel | Trigger Condition | Description |
|---|---|---|
client |
Page is running | Delivered via the Notification API within the page, displayed as DeepSeek Harness itself, no additional system authorization required |
native |
Page is not running | macOS prefers terminal-notifier, falling back to osascript if unavailable; Linux uses notify-send; Windows uses PowerShell’s WinRT toast |
The page polls the host at 2-second intervals; this polling acts as the page’s online heartbeat. The host records events in memory upon each turn completion. The page pulls new events via GET /dsh-turn-notifier/last.json?after=<seq> and fetches the icon via GET /dsh-turn-notifier/icon.png; both routes only accept loopback requests.
Behavior Rules¶
- Only notify when
reason.kind === 'completed'. No notification for user interruptions, execution errors, policy interceptions, or turns hitting max-tokens. - Skip sub-agent sessions by default (
header.origin === 'subagent') to avoid multiple notifications for a single query. - The summary is taken from the last assistant message containing text in the turn: Markdown markers are removed, whitespace is collapsed, text is truncated by
summaryChars, and it attempts to end at sentence-ending punctuation. - Notification delivery failures are only written to the host log and do not affect the session itself.
Installation and Activation¶
<profile> is the profile name: usually desktop for the desktop app, and usually web for the command-line web combo.
Install from GitHub Release (example):
dsh plugin --profile <profile> add "https://github.com/king-shao/dsh-turn-notifier/releases/latest/download/dsh-turn-notifier.tgz"
Other installation methods (excerpt from README):
# Local development: link source directory
dsh plugin --profile <profile> add "link:/path/to/dsh-turn-notifier"
# Local build artifact
dsh plugin --profile <profile> add "/path/to/dsh-turn-notifier-<version>.tgz"
# Install by package name if published to npm
dsh plugin --profile <profile> add dsh-turn-notifier
dsh plugin writes dependencies to the profile’s package.json and adds dsh-turn-notifier to dsh.profile.bundles; the plugin’s own cordis.patch.yml handles inserting Loader entries. Injection lines and routes are registered at host startup; a host restart is required after installation or upgrade.
Uninstallation:
dsh plugin --profile <profile> remove dsh-turn-notifier
Then remove dsh-turn-notifier from dsh.profile.bundles in the profile’s package.json, and restart the host.
Configuration¶
Configuration items are in the config field of cordis.patch.yml:
| Key | Default | Description |
|---|---|---|
title |
DeepSeek Harness |
Notification title used when the session has no title |
summaryChars |
180 |
Max summary length; effective when value is >= 40 |
skipSubagents |
true |
Whether to skip sub-agent sessions |
minSeconds |
0 |
Only remind for turns with duration not less than this value |
preferClient |
true |
Use in-page notification when page is online to avoid duplication with native notifications |
sound |
Glass |
Native channel sound name; false for mute |
icon |
auto |
auto uses the package icon, can also specify absolute path, false for no display; old name contentImage is still recognized |
activate |
com.deepseek.dsh |
Application to activate when clicking the native notification |
backend |
auto |
terminal-notifier, osascript, or auto; fixed by platform for Windows and Linux |
logFile |
~/.dsh/turn-notifier.log |
Record one line of JSON per delivery; empty string means disabled |
Modify summaryChars, minSeconds, or skipSubagents as needed to adjust summary length, filter short turns, and manage sub-agent notifications.
Platform Support and Diagnostics¶
Both the desktop app and dsh web (browser) support in-page notifications; browsers require notification permission authorization on first use. terminal-notifier on macOS is an optional enhancement; if not installed, it falls back to osascript plain text banners (no icon displayed).
Troubleshooting delivery success:
tail -n 5 ~/.dsh/turn-notifier.log
curl -s http://<host>:<port>/dsh-turn-notifier/last.json
The channel field in the log indicates the actual channel; last.json allows you to view the most recent completion event.
Use Cases and Notes¶
Suitable for: Scenarios involving long waits for single-turn generation, or when you need to leave the DSH interface but want to know “did this turn end normally”. Not suitable for expecting reminders on interruption, error, or policy interception—these turns are deliberately not notified.
It is recommended to review the repository source code and MIT license before installing; the plugin runs with the permissions of the current dsh host process and may call local notification commands (such as notify-send, osascript, PowerShell). The native channel depends on system notification permissions; if unauthorized, notifications may not display and are only logged, though this generally does not apply when the page is online.
Known limitations (excerpt from README): Page polling interval is 2 seconds, so notification delay is at most ~2 seconds; no notification is generated if the host is not running. Windows native toasts may appear as “Windows PowerShell” in the notification center; Windows does not support custom sound names. The notification icon is derived from the DeepSeek Harness app icon; please verify the brand asset authorization scope before redistribution or public release.
The DSH ecosystem emphasizes “Everything is a plugin”; community directories like SkillHub are independent sites and have no official affiliation with DeepSeek / High-Flyer.
Conclusion¶
dsh-turn-notifier consolidates the event of “turn completed normally” into a single clickable notification: session name, duration, and answer summary, automatically switching between client and native channels based on whether the page is online. If you are already using DSH for multi-turn conversations, you can try it out by following the installation commands, modifying configuration, and restarting the host as described above.
- Directory Page: https://www.skillhub.cn/plugins/king-shao/dsh-turn-notifier
- GitHub: https://github.com/king-shao/dsh-turn-notifier