Introduction¶
The DeepSeek Harness (DSH) notification plugin typically runs in the render layer (JavaScript within the browser page). When you switch tabs, close the browser window, or minimize DSH, these notifications fail — exactly when you most need to be called back to handle tasks.
The dsh-win-notify plugin runs in the host layer (the Cordis host half), i.e., DSH’s main process. Events are generated directly within the process, bypassing the browser. Therefore, whether a foreground window is open or a tab is active in the browser has no impact on notification delivery. It leverages the native Windows Toast API to provide notifications for conversation completion, sub-agent status, background tasks, and other events.
Core Features¶
The plugin triggers notifications by listening to DSH host events, covering the following scenarios:
- Conversation events: Conversation turn completion, errors, or interruptions.
- Sub-agent events: Sub-task completion or abnormal termination.
- Background tasks: Task completion, failure, or cancellation.
- User interaction: Model questions, tool approval requests.
- Notification characteristics:
- Foreground detection: In the default
automode, uses the Win32 API to detect the foreground window; no popup appears when you are already viewing DSH. Can be set toalwaysornever. - Merging and deduplication: Multiple session completions in the same workspace within a short time are merged into a single notification; background tasks and turn completions are also merged.
- Rate limiting: Supports global rate quotas (
minIntervalMs/ratePerMinute) and quiet hours (quietHours). - Sound effects: Uses Windows system named sounds (
Notification.*), differentiated by event (completion, question, approval, error). - Click behavior: In Desktop configurations, clicking the notification brings the window to the foreground; in other scenarios, it opens the Web UI with an authentication token.
- Foreground detection: In the default
Installation and Activation¶
The plugin package name is @zhang-tod/dsh-win-notify.
CLI Installation¶
Applicable to web, headless, sdk, acp, and custom configuration profiles:
dsh plugin --profile <profile> add @zhang-tod/dsh-win-notify
After installation, you must restart DSH to load the host-layer plugin.
Desktop Installation¶
The DSH Desktop configuration profile is exclusively managed by the Electron application; CLI commands will be rejected. Please use the in-app entry point:
- Click Plugins in the sidebar.
- Click Add plugin and enter
@zhang-tod/dsh-win-notify. - Enable the bundle after installation, then restart DSH.
Configuration¶
The configuration file is located at cordis.patch.yml in the configuration profile. Write it in the following format:
id: dsh-win-notify
config:
# Foreground detection mode: auto (default), always, never
mode: 'auto'
# Whether to enable conversation turn notifications
turns: true
# Whether to enable sub-agent notifications
subagents: true
# Whether to enable background task notifications
jobs: true
# Whether to enable question notifications
questions: true
# Whether to enable approval notifications
approvals: true
# Whether to play sound effects
sound: true
# Port: 0 means auto-acquire DSH's actual port, do not hardcode
port: 0
# Quiet hours, e.g., "23:00-07:30", supports crossing midnight
quietHours: ""
# Whether to allow urgent events (questions/approvals) during quiet hours
quietUrgent: true
# Global rate limit: minimum interval in milliseconds between adjacent notifications
minIntervalMs: 3000
# Merge window: time window for merging completions from multiple sessions in the same workspace
mergeWindowMs: 3000
Limitations and Non-Goals¶
The plugin has clear capability boundaries that should be understood before use:
- Platform limitations: Only supports Windows, not macOS or Linux.
- Sound limitations: Sound effects are not customizable; must use Windows system named sounds (
Notification.*prefix).soundis only a switch and cannot change the tone. - Approval limitations: Does not support one-click approval via toast buttons; does not support persistent notifications (
scenario="reminder"). - Click limitations: Clicking a notification does not navigate to a specific session, only opens the DSH main interface (brings the window to the foreground in Desktop).
- Permission dependencies: If DSH is in full-permission mode (
approval: never), the system will not issue approval requests, so the plugin naturally receives no notifications. - Installation limitations: Desktop configuration profiles cannot be installed via CLI’s
--profile desktop; must go through in-app settings. - Technical details:
- Does not declare
@deepseek-ai/dsh-*peerDependencies. - Does not provide a graphical settings page; configuration is written directly to
cordis.patch.yml. - Notification attribution may display as a generic value (depends on the application identifier registered with the system).
- Foreground detection may fail if the window title is modified.
- Does not declare
Summary¶
dsh-win-notify provides reliable host-layer notification capabilities for DSH on Windows, solving the problem of message loss after the browser is closed. Through merging, deduplication, and rate limiting, it keeps the notification system clean. Due to its dependency on native Windows APIs, its configuration is relatively low-level, requiring direct editing of cordis.patch.yml.