Preface¶
When running long turns with DeepSeek Harness (DSH), if the client is minimized or covered by windows such as browsers or ComfyUI, approval cards and “Turn Finished” messages in the interface are often invisible. The official desktop client lacks complete notification capabilities, and the community has several similar plugins that only provide “completion reminders” or “non-disturbing when in foreground.” Below is an introduction to dsh-plugin-desktop-notify maintained by LeeRolling: it subscribes to client events under the desktop profile and pops up system Toasts with task summaries when authorization, answers, or turn completion are required; it suppresses notifications when the window is in the foreground to avoid duplicate disturbances.
What is this¶
dsh-plugin-desktop-notify is a desktop notification plugin for DSH. The repository is LeeRolling/dsh-plugin-desktop-notify, licensed under MIT, with the current package version at 0.1.0. It injects the host half and browser half via dsh.bundle.patch and dsh.client (platform: web). It calls new Notification() within the dsh-app://app/ secure context. In the verified environment DSH Desktop 0.2.0-rc.2 (Electron 44), Windows 11, under the desktop profile, the notification displays as DeepSeek Harness, using Windows Notification Center Toasts and the system default sound.
The plugin extends DSH in an “everything is a plugin” approach, corresponding to the entry on the SkillHub Plugin Directory; note that this directory is a community site and has no official affiliation with DeepSeek or Hithink.
Core Functions¶
When notifications pop up¶
The browser half listens for three types of client events (observation only, not consumed, returning next() as-is):
| Event | Purpose |
|---|---|
approval/request |
Approval waterfall |
user-questions/request |
Model questions |
api-session/status |
Session running status; detecting the true → false edge indicates turn end |
Classified by scenario, the notification titles and bodies are as follows (table from source materials):
| Situation | Notification Title | Body |
|---|---|---|
Command execution requires authorization (pwsh / bash, etc.) |
Task requires authorization |
Tool name + operation purpose (approval reason; strips escalate sandbox to <mode>: prefix) |
File modification requires authorization (write / edit, etc.) |
File modification required |
Tool name + operation purpose |
| Other tool confirmation required | Task requires your confirmation |
Tool name + approval reason |
| Model question waiting for your answer | Question requires your answer |
Original question text |
| Turn finished | Task completed |
Session name + prompt to check client for results |
When not to disturb¶
- Client in foreground (window has focus, page is visible): No pop-up, displayed only in the UI.
- Subagent session turn end: No pop-up; alerts are only for main session completion.
- Sessions already idle during cold start: No pop-up; alerts are only triggered by observing
running: true → false. - Duplicate events within 1.5 seconds of the same event: Deduplication, pops up only once.
Usage note: Send the message in the client first, then switch away immediately. The turn starts from pressing send; if you switch away and then come back to type, the window returns to the foreground, and by design, no notification will pop up.
Diagnostics and Self-check (Permanent)¶
Browser-side behavior is invisible externally, so the plugin provides a resident diagnostic channel to troubleshoot “Installed but silent”:
| Endpoint | Direction | Function |
|---|---|---|
POST /api/desktop-notify/report |
Browser → Host | Reports decision: whether the event arrived, which gate blocked it, whether new Notification() threw an exception, environment snapshot |
GET /api/desktop-notify/selftest |
Browser → Host | Returns self-check switch status, trace, and switch path |
Default trace is written to <DSH_HOME|~/.dsh>/desktop-notify/trace.jsonl; the environment variable DSH_DESKTOP_NOTIFY_TRACE can change the path. Setting it to off / 0 / false / none / no disables writing (endpoints and self-check remain available). Trace rotates at line boundaries when exceeding 512 KB, retaining approximately the last 256 KB.
Placing selftest.flag in the same directory will force a Toast titled “Notification Self-check” approximately 2 seconds after the next page load, regardless of foreground/background status, to distinguish between “code not running” and “system not displaying.” The file should be deleted after self-checking.
Reading trace summary:
node tools/trace.mjs # Stats + last 15 entries
node tools/trace.mjs --all # Full data
Installation and Activation¶
Install under the desktop profile (commands from repository README):
dsh plugin --profile desktop add link:<this directory>
# Or install from repo:
dsh plugin --profile desktop add github:LeeRolling/dsh-plugin-desktop-notify
Restart the DSH client after installation to take effect. If using link: for local linking, changes to lib/client.js require a restart, no reinstall needed.
Uninstall:
dsh plugin --profile desktop remove dsh-plugin-desktop-notify
Typical Usage and Acceptance¶
- After installing and restarting the client, send a message that triggers a long turn, and immediately switch to another window.
- Wait for authorization, model questions, or turn completion; you should see corresponding titles and summaries in the Windows Notification Center.
- If there are no notifications: Place
selftest.flagin the trace directory for a forced pop-up; or runnode tools/trace.mjsto check kinds likesuppressed(e.g.,window-in-front),threw,apply-failed.
The repository provides smoke tests that do not depend on starting DSH:
npm test
(Fake DOM + Fake Notification, covering the three events, classification, foreground suppression, deduplication, subagent silence, cold start edges, etc.)
Use Cases and Notes¶
Who it is for: Developers who primarily use DSH Desktop on Windows and often minimize the client or leave it behind other windows; those who need system reminders with summaries for the four situations of “Authorization / File Modification / Questions / Completion,” rather than just a single “Task Complete” bell.
Permissions and Security: The plugin runs with the current DSH desktop process. Please read the source code and MIT license before installation to ensure event subscription and HTTP diagnostic endpoints comply with your environment policy.
Known Limitations (From README):
- Clicking the notification to switch back to the client relies on
window.focus(); Electron does not guarantee window top-most behavior; preload does not expose focus/flash. Full guarantee requires modifying the main process, which is easily overwritten by client updates. - Notifications cannot be received after the client process completely exits.
Similar ideas exist in several community plugins (e.g., turn end + foreground suppression, approval + questions). This plugin focuses on context-based summary classification, resident trace/self-check, and offline runnable browser half tests. File authorization (write / edit) is marked as pending real event triggers in the README acceptance table, sharing the same classification code logic with command types.
Conclusion¶
dsh-plugin-desktop-notify supplements the DSH official desktop client with context-aware system notifications: it only alerts when in the background, explains in the body “what needs authorizing, what is being asked, which session finished,” and comes with trace and self-check for troubleshooting. Simply install and use the desktop profile with the dsh plugin command from the README.
- Plugin Directory: https://www.skillhub.cn/plugins/LeeRolling/dsh-plugin-desktop-notify
- Source Code & Documentation: https://github.com/LeeRolling/dsh-plugin-desktop-notify