dsh-all-notify: Native Windows System Notifications for DSH Host Events

Introduction

When running long-running tasks with DeepSeek Harness (DSH), the browser tab is not necessarily in the foreground: approving tool calls, answering Agent questions, turn completions, or errors can easily be missed if only in-page prompts are relied on. The browser’s native Notification API also depends on the page being open and permissions granted; once the tab is closed or the window minimized, it often goes silent.

The following describes the community plugin dsh-all-notify (npm package @mkasoy/dsh-all-notify): published by maintainer mkasoy, it pops up system toasts on Windows by invoking PowerShell and WinRT ToastNotificationManager through the host process, and automatically mutes itself when “the session currently being viewed and the page is in the foreground”, avoiding repeated interruptions within the same window.

What This Is

dsh-all-notify is a native system notification plugin for DSH, with zero runtime dependencies and no build step. The host side monitors events such as approvals, questions, task completion, and Agent errors; the browser side only reports “current session id + whether the page is hidden”, and the two collaborate via a custom HTTP route. The plugin is categorized as “model inference” in the SkillHub directory, consistent with the capability description in the README: pushing key nodes during reasoning and interaction to the desktop layer as reminders.

  • Directory page: https://www.skillhub.cn/plugins/mkasoy/dsh-all-notify
  • Source code and docs: https://github.com/mkasoy/dsh-all-notify
  • License: MIT (consistent in package.json and README)

Core Features

Native toasts, not relying on browser Notification

Notifications are triggered by the host directly spawning PowerShell to invoke the Windows system toast, rather than the page’s Notification API. The README states: toasts can still pop up after the browser is closed (executed on the host side in a Windows environment).

Session title included

The second line of each notification follows the format 「session title」 · event details. The title is read on demand from the persisted title projection (depends on @deepseek-ai/dsh-session-title).

Separate alerts per event type

Event Notification gist
approval/request 需要你的批准 (Approval required) — tool name and reason (sandbox privilege-escalation approvals use the same channel)
user-questions/request 需要你的回答 (Answer required) — the first question
session/event + turn/end 任务完成 (Task completed) / 任务出错 (Task failed) / 任务已中止 (Task aborted) / 任务被阻塞 (Task blocked) / 任务达到输出上限 (Task reached output limit)
agent/error 出错 (Error) — error code and message

A failed turn only triggers one toast: once agent/error is reported, the turn/end(error) of the same turn will not repeat.

Smart muting

Toasts are suppressed only when the session of the event = the session displayed on the page and the page is in the foreground (document.hidden is false). After switching to other software, even if the browser stays on that session, events will alert again. The browser reports the current session and visibility every 10 seconds, and reports immediately on session switch or visibilitychange; if no report is received for over 30 seconds, it is considered stale and notifications resume. When the browser side is not working, the host receives no reports, and all events are notified (the failure direction is more alerts, not silence).

Per-event toggles

Outcomes such as approval, question, normal completion, error, aborted, blocked, output limit can be individually toggled in the config; there is also a master switch enabled and a debug option debug.

Installation and Activation

Install under the web profile (commands from the GitHub README):

# npm
dsh plugin --profile web add @mkasoy/dsh-all-notify

# or from GitHub
dsh plugin --profile web add github:mkasoy/dsh-all-notify

Notes:

  1. After modifying the host side, restart dsh web; when only the browser side changes, just refresh the page.
  2. The plugin runs with the permissions of the current dsh process; it is recommended to read the repository source code and the MIT license before installing.
  3. The README’s development and testing environment is DSH 0.1.7-alpha.1 (dsh web profile, Windows 11 + Windows PowerShell 5.1). package.json requires Node >=20.

Configuration

All keys are optional. Write them in the plugin’s bundled cordis.patch.yml, or override using the same line id in ~/.dsh/profiles/web/cordis.patch.yml:

- id: all-notify
  config:
    enabled: true                # master switch
    onApproval: true             # approval requests
    onQuestion: true             # questions
    onCompleted: true            # normal completion
    onError: true                # turn or step failure
    onAborted: true              # aborted
    onBlocked: true              # blocked
    onMaxTokens: true            # reached output limit
    appName: DeepSeek Harness    # application name shown on notifications
    debug: false                 # when true, log every decision to the dsh web terminal

Currently there is no graphical settings page; configuration requires editing YAML. This is a design choice explicitly stated in the README to avoid additional browser dependency surface.

Typical Usage

After installation and restart or refresh, no extra commands are needed: the host listens for events, and the browser reports status automatically. To troubleshoot “why it alerted / why it didn’t alert”, set debug to true and check the decision logs in the dsh web terminal.

Local syntax check (from the README “Development” section):

node --check lib\index.js
node --check lib\client.js

Use Cases and Notes

Who it’s for

  • Running DSH web Agents on Windows, frequently switching to IDEs, terminals, or other applications, and wanting approvals and task results to arrive as system toasts on the desktop.
  • Wanting to receive key event alerts via the host even after closing the browser tab (not applicable to non-Windows platforms, see below).

Limitations you must know

  • Windows only; on other platforms the host side loads but does not execute notification logic.
  • Each notification has about a 0.5–1 second delay (requires spawning PowerShell); the README explains this is the trade-off of the zero-dependency approach.
  • Multiple tabs will overwrite each other’s “current session” reports; the last report wins. This problem does not exist with a single tab.
  • SkillHub is a community plugin directory, with no official affiliation with DeepSeek / Huanfang; stars and versions are per the repository (current package.json version 0.1.0).

Summary

dsh-all-notify connects DSH’s approvals, questions, and turn outcomes to native Windows toasts, and uses browser-side visibility and session id to perform foreground muting. See above for installation commands; see the GitHub README for details and architecture diagrams.

  • Directory: https://www.skillhub.cn/plugins/mkasoy/dsh-all-notify
  • GitHub: https://github.com/mkasoy/dsh-all-notify
羽毛球分组比赛记分
小程序二维码

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

Xiaoye