dsh-turn-notify: Windows Desktop Badge Notification on Agent Turn Completion

Introduction

When running long tasks in DeepSeek Harness (DSH), developers often switch away to write code or check documentation, waiting for the agent to finish a round before switching back. Without explicit feedback, they have to repeatedly switch back to the main window to confirm status. dsh-turn-notify is a community-maintained client-side bundle plugin: when each agent task round ends, it pops up a self-dismissing WPF notification card in the bottom-right corner of the Windows desktop, displaying the session name, completion status, and duration. Unlike the common practice of browser Notifications or system Toasts, this plugin subscribes to DSH’s session events on the host side, uses PowerShell + WPF to render the card in a separate rendering process, and has been tested with trade-offs for the DSH plugin host (plain-node subprocess) and high-pressure security software environments.

What is this

  • Name: dsh-turn-notify (GitHub: koolook123/dsh-turn-notify)
  • Maintainer: koolook123
  • Category: Client (SkillHub directory category)
  • License: MIT (Consistent with README and package.json)
  • Current Release: GitHub Release v1.0.0; the package name dsh-turn-notify on the public npm is already taken by another project, so this plugin defaults to installation via GitHub / bundle and has not been published using that npm name.

The plugin only works on Windows: it will exit silently if process.platform !== 'win32'. No installation is required for non-Windows environments.

Core Features

Events and Copywriting

The plugin subscribes to turn/start and turn/end in the session/event stream on the host side:

  1. turn/start: Records the start time of this round.
  2. turn/end: Calculates duration, generates body text based on end reason (e.g., “Message completed”, “Round failed”, “Token limit reached”, “Round stopped”), then launches the rendering process to display the card.

Queue: The popup has a queue: only one card is retained at a time; a new round replaces the old queued content to avoid stacking multiple windows.

Copywriting Example (from README):

DeepSeek Harness · Reviewing A-share Closing Data
Message Completed · Duration 1m23s

Implementation Details (Why PowerShell + WPF)

The README records measured conclusions under the DSH plugin host. A summary follows: In unpacked Win32 processes, Windows Toasts are easily discarded silently; the plugin host cannot require('electron') to use BrowserWindow; launching PowerShell in a hidden manner may be intercepted by HIPS; detached: true causes the host to misjudge the subprocess as exiting prematurely; high DPI requires using SystemParameters.WorkArea and SetProcessDPIAware(). toast.ps1 must retain UTF-8 BOM for PowerShell 5.1 to correctly parse Chinese characters.

Requirements

  • Windows
  • PowerShell 5.1+, able to load PresentationFramework / PresentationCore / WindowsBase / System.Windows.Forms
  • Node.js 18+ (ESM)
  • DeepSeek Harness, with profile support for dsh.bundle.patch

Installation and Usage

Community Plugin Directory Page: https://www.skillhub.cn/plugins/koolook123/dsh-turn-notify
Source Code and Instructions: https://github.com/koolook123/dsh-turn-notify

The following commands are from the official README; please execute them as-is and do not manually concatenate other forms of dsh plugin add.

Execute in the profile directory (default ~/.dsh/profiles/desktop):

cd ~/.dsh/profiles/desktop
pnpm add github:koolook123/dsh-turn-notify

Write the package name to dsh.profile.bundles in the package.json of that directory:

"dsh": {
  "profile": {
    "bundles": [
      "@deepseek-ai/dsh-base",
      "@deepseek-ai/dsh-web-app",
      "dsh-turn-notify"
    ]
  }
}

DSH will read dsh.bundle.patch pointing to cordis.patch.yml inside the package and merge/mount it. Must restart DSH after modification (the plugin host is a persistent subprocess, hot updates do not take effect).

cd ~/.dsh/profiles/desktop
pnpm add link:C:/path/to/dsh-turn-notify

Add dsh-turn-notify to dsh.profile.bundles as well, and restart DSH.

Method 3: Manually Write cordis.patch.yml

Some DSH versions have inconsistencies in raw package name resolution baselines vs profile directories, which may lead to silent load failures. You can insert a mount section in the profile’s cordis.patch.yml and write name as a relative path, for example:

- insert:
    - id: turn-notify
      name: ./node_modules/dsh-turn-notify/lib/index.js
      config:
        enabled: true
        seconds: 6
        width: 380
        bottomMargin: 24
        rightMargin: 24
        notifyOnSuccess: true
        notifyOnError: true
        minDurationSec: 0
        showSessionTitle: true
        maxBodyChars: 160

Ensure the corresponding package exists in the dependencies of package.json (in github: or link: form).

Configuration

You can edit cordis.patch.yml in the profile after installation (or compare with the default values in the package’s cordis.patch.yml):

Key Default Description
enabled true Master switch
seconds 6 Seconds the card stays (including fade in/out)
width 380 Card width (DIP)
bottomMargin / rightMargin 24 / 24 Margins from bottom-right corner (DIP)
notifyOnSuccess true Popup on normal completion
notifyOnError true Popup on error / interrupted completion
minDurationSec 0 Minimum duration threshold; no popup if shorter than this; 0 means popup on every round
showSessionTitle true Whether title includes session name
maxBodyChars 160 Maximum body characters
debounceMs 400 Minimum interval between two popups
script Auto-detect Custom render script path, takes precedence over package’s toast.ps1

script parsing order: Config path -> package’s toast.ps1 -> ~/.dsh/plugins/dsh-turn-notify/toast.ps1.

Typical Usage and Self-Check

Without relying on DSH, you can manually trigger a card once to verify PowerShell and WPF environments:

powershell.exe -NoProfile -ExecutionPolicy Bypass -File toast.ps1 \
  -Title "DeepSeek Harness" -Body "Message Completed · Duration 12s" -Seconds 6

(The path to toast.ps1 depends on the actual location in your clone or node_modules.)

When troubleshooting, README suggests checking:

  • Host: ~/.dsh/turn-notify-debug.log (subscription, turn/end, render process exit codes, etc.)
  • Render: ~/.dsh/turn-notify-wpf.log (display coordinates, close, exceptions)

DSH_HOME can override the log directory prefix; defaults to %USERPROFILE%\.dsh if not set.

Syntax and BOM quick check:

node --check lib/index.js
xxd -l 3 toast.ps1

The first three bytes of xxd should be efbbbf (UTF-8 BOM).

Applicable Scenarios and Notes

Suitable for: Developers using DSH desktop profile on Windows who want local visual feedback when the agent finishes a round but don’t want to keep staring at the main window.

Not suitable for: Linux / macOS; scenarios that don’t require any desktop notifications (you can set enabled to false or not include bundles).

Security and Permissions: The plugin runs with the permissions of the current DSH process and its subprocesses, and will spawn PowerShell to execute the package’s scripts. Before installing, you should review lib/index.js and toast.ps1 to confirm the behavior is acceptable under the MIT license. SkillHub is a community directory with no official affiliation with DeepSeek / Synflow; stars and download counts are as displayed on each site at the time (currently 0 stars on the directory).

If the popup “flashes and disappears”, README mentions common causes including passing an empty -LogPath to PowerShell, removing the BOM from toast.ps1, or being intercepted by security software for hidden launches outside of minimized states—corresponding fixes are mentioned in the Implementation Details and log files above.

Conclusion

dsh-turn-notify connects the “end of each agent round” moment in DSH to a short-lived card in the bottom-right corner of Windows, driven by session events rather than polling the UI. To enable it, run pnpm add github:koolook123/dsh-turn-notify in the profile and add dsh-turn-notify to dsh.profile.bundles, then restart DSH; for more details and release notes, see the GitHub repository, and the index page is the SkillHub plugin page.

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

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

Xiaoye