dsh-system-notify: Agent Status Updates via System Notifications

Introduction

When DeepSeek Harness (DSH) runs on the desktop, the Agent works in the background to complete a round of responses, finish sub-tasks, or wait for your approval. Developers often find themselves frequently switching windows to check progress. The window.Notification API available in the page context, while functional, is constrained by Chromium’s Web APIs—plugins cannot bypass the main process’s permission requests, and notifications are silently discarded when rejected. As a result, a more reliable channel—invoking native system commands from the Host process—becomes the only viable solution.

What Is This

keycapai/dsh-system-notify is a DSH plugin for sending native OS desktop notifications locally. It directly invokes system commands from the Host process (terminal-notifier / osascript on macOS, notify-send on Linux, WinRT Toast on Windows), bypassing the renderer process entirely, so notifications are still delivered even after the page is closed. It is maintained by keycapai and categorized as a “Client” plugin.

Core Features

The plugin listens to DSH session events and triggers notifications in the following situations:

  • Main agent completes a round of responses: Title “Response Round Completed”, Body “Session Name · Duration Xs”
  • Sub-agent completes: Title “Sub-agent Completed”, Body “Session Name · Duration Xm Xs”
  • Awaiting approval: Title “Awaiting Your Approval”, Body “Session Name”
  • Awaiting a response: Title “A Question Is Waiting for Your Answer”, Body “Session Name”

The session name is sourced from the Host’s session summary (api-session/added) and rename events (session/event). When unavailable, it is automatically omitted and only the duration is displayed. Language (Chinese/English) switches automatically based on the system locale.

Installation & Activation

Install with the following command:

npm install dsh-system-notify

Once installed, the plugin works out of the box. Notifications for the main agent are triggered only when a round of responses takes longer than 30 seconds (short responses won’t trigger one). Both completion and waiting events are enabled by default.

To customize behavior, override the entry with the same id in your profile’s cordis.patch.yml:

- insert:
    - id: dsh-system-notify
      name: dsh-system-notify
      config:
        thresholdMs: 60000      # Only notify for responses longer than 1 minute
        subagentDone: true      # Also notify for sub-agent completion
        sound: false            # Mute

Configuration Reference

Key Type Default Description
enabled boolean true Master switch. When disabled, no listeners are registered.
turnDone boolean true Notify when the main agent completes a round.
needsYou boolean true Notify when awaiting approval / awaiting a response.
subagentDone boolean false Notify when a sub-agent completes. Disabled by default: sub-agents often run in rapid succession, causing notification spam.
thresholdMs number 30000 Only notify for responses exceeding this duration, in milliseconds. 0 means notify for all.
sound boolean true Whether to include a notification sound.
locale string auto auto / zh / en. auto reads macOS AppleLanguages first, then LC_ALL/LANG.
icon string '' Absolute path to a custom icon. Leave empty to use the bundled icon.png.
appName string DeepSeek Harness App name shown in Linux notifications.

Non-boolean values are not coerced into booleans (enabled: "yes" still resolves to the default). An invalid threshold falls back to the default—misconfigured values won’t cause the plugin to silently fail.

Platform-Specific Channels

Platform Channel Icon Notes
macOS terminal-notifier (preferred if available) ✅ Supports custom icons
macOS osascript (built-in fallback) ❌ display notification can only use the host script’s icon
Linux notify-send ✅ Requires libnotify-bin; a log entry is emitted once if missing
Windows WinRT Toast ✅ Uses appLogoOverride
Windows Tray balloon ❌ Toast requires a registered AppUserModelID; falls back automatically if not registered

To use a custom icon on macOS, simply install terminal-notifier:

brew install terminal-notifier

Use Cases & Cautions

Ideal for developers who run Agents in the background and don’t want to constantly switch windows. The plugin runs with the current dsh process permissions. Review the source code and license (MIT) before installing. Current version: 3.0.1.

Summary

dsh-system-notify delivers reliable desktop notifications via native system commands, eliminating the distraction of in-page overlays and giving you a clear view of Agent status at a glance. It works out of the box, offers flexible configuration, and is well-suited for scenarios where Agents run for extended periods.

Directory Page|GitHub

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye