dsh-desktop-notify: Desktop notifications for DSH Desktop sessions

Preface

When running Agents in DeepSeek Harness (DSH), a Session might be waiting in the background for your approval, answers to questions, or to finish a task round. If the window is not in the foreground, it is easy to miss interactions or know when it finishes. Browser tabs themselves lack Windows application identity, making it difficult to pop up system toasts consistent with DSH Desktop.

dsh-desktop-notify is a DSH plugin provided by community maintainer guanhaisen: In DSH Desktop, when a Session requires your intervention, or a run finishes and its duration reaches a threshold, it pops up a Windows notification; clicking the notification brings the corresponding Session back to the foreground. The plugin does not poll or create a separate state source; it only reads the published ctx.uiSession.sessionStatus from @deepseek-ai/dsh-client-ui-session.

What is this

  • Name: dsh-desktop-notify (npm package name, repository guanhaisen/dsh-desktop-notify)
  • Maintainer: guanhaisen
  • Positioning: A desktop notification plugin for DeepSeek Harness; depends on the Desktop application (Windows toast path relies on the Electron renderer process; pure browser tabs lack a usable AppUserModelID).
  • Version (package.json): 0.1.0; License MIT; Requires Node >=20, DSH ^0.2.0-rc.1.

Core Features

Two Trigger Conditions

Trigger When to pop up
Needs attention Agent is blocked, waiting for your approval or answer
Run finished A running Session has stopped, and the duration of this run is at least minRunMs

When “Needs attention,” the notification text corresponds to pendingInteraction.kind: approval (privileged tool awaiting approval), question (Agent asking a question), plan-review (plan awaiting review). The same interaction is deduplicated using its key; duplicate status pushes will not trigger a second toast.

Why implement as a plugin instead of modifying the Shell

The DSH Desktop Host is an independent Node child process where require('electron') cannot obtain a usable Notification or AppUserModelID; notification logic in the Shell main process is only used for forced update prompts. On the renderer process side: dsh-app: is a privileged protocol and a secure context, and combined with the session granting permissions for everything except media, calling the Web Notification API within the window allows real Windows toasts to appear under the electron.app.DeepSeek Harness identity. This requires no Shell modification and no auxiliary process.

Common situations where toasts will not appear

Situation Reason
You are currently watching that Session The prompt is already on the screen
Run duration is less than minRunMs (default 20 seconds) Quick finishes are not treated as “news”
Session was already running when the window was opened The first snapshot serves as a baseline to avoid burst notifications at startup
Windows Focus Assist (Do Not Disturb) The system suppresses banners; notifications may still enter the Notification Center

For troubleshooting, you can check the decision log (see “Verify it works” below).

Installation and Activation

Prerequisite: Use the DSH Desktop application, not just a browser page.

Install via the Plugin Page (No Terminal Needed)

Open Settings → Plugins → Add plugin, paste one of the following into Package name or address, and click Install:

Content Purpose
github:guanhaisen/dsh-desktop-notify Install directly from the GitHub repository (not published to npm)
https://github.com/guanhaisen/dsh-desktop-notify Same as above, URL form
D:\path\to\dsh-desktop-notify Local directory, must be an absolute path

The plugin manager will execute pnpm add in the profile and write to the bundle list; in most cases, it takes effect without restarting. If the first toast does not appear, you can refresh the page with Ctrl+R.

Community plugin page note: Installed plugins do not auto-update; upgrading requires uninstalling and reinstalling. github: installations track the repository’s default branch; reinstalling can pull new commits. If the default branch differs after forking, you can specify a ref using forms like github:you/dsh-desktop-notify#main.

Command Line Installation

Execute in the DSH Desktop profile directory (Windows example path: %USERPROFILE%\.dsh\profiles\desktop):

pnpm add github:guanhaisen/dsh-desktop-notify

For local development, you can link a working copy, and changes take effect upon saving:

pnpm add link:/path/to/dsh-desktop-notify

After manual installation, you must also add the package name to the profile bundles in the package.json of that directory (installation via the plugin page completes this automatically):

{
  "dsh": {
    "profile": {
      "bundles": ["...existing bundles...", "dsh-desktop-notify"]
    }
  }
}

README Requirement: Do not include dependencies when running this package; pnpm will not install dependencies for link packages, and Cordis tree initialization failure will cause DSH to fail to start.

Configuration Options

In the profile patch for this plugin line, or via the Plugins page settings:

Key Default Meaning
notifyOnAttention true Whether to notify when a Session is blocked waiting for you
notifyOnComplete true Whether to notify when a run ends
minRunMs 20000 Ignore completion notifications for runs shorter than this number of milliseconds
sound true Whether to play system notification sounds

Typical Usage and Verification

No additional API is needed daily: After installation and activation, switch to another window or application. You should receive a toast when the Session has items awaiting approval, answers, or when a long run finishes; clicking the notification should focus the corresponding Session.

For debugging, the browser half provides DesktopNotify via Cordis Inspect, which can be queried from outside the page:

Method Function
status Whether the half is mounted, Notification.permission, whether it is a secure context, tracked Sessions
testToast Immediately send a real toast and report the construction result
decisions In-memory decision log: records of sent and intentionally suppressed notifications with reasons

decisions can answer “Why didn’t it pop up?”: e.g., suppressed: 'watched' (currently watching that Session), suppressed: 'too-short' (did not reach minRunMs). The log keeps only the most recent 100 entries in memory and does not write to disk.

testToast returning delivered: true only indicates that a Notification was constructed; whether it matches the OS side needs to be confirmed against behaviors like the Windows Notification Center.

Behavior logic is in test/watcher.test.mjs, which can be run with node test/watcher.test.mjs or pnpm test within the package.

Scenarios and Cautions

  • Suitable for: Developers using DSH Desktop on Windows, running Agents in the background for long periods, and needing system-level reminders to switch back to the Session.
  • Not suitable for: Using DSH solely in a browser, or environments other than Windows that are not declared as supported in the materials (the README explicitly revolves around Windows toasts and Desktop).
  • Permissions and Security: The plugin runs with the permissions of the current DSH process. Before installation, please read the repository source code and the MIT license to judge whether to include it in your profile.
  • Ecosystem: The DSH community plugin directory is an independent site (e.g., SkillHub Plugin Page) and has no official affiliation with DeepSeek / High-Flyer. Installation sources are based on github:guanhaisen/dsh-desktop-notify given in the README or guidance on the plugin page.

Conclusion

dsh-desktop-notify connects the Session’s “waiting for your intervention” and “long run finished” states to Windows desktop notifications. The state comes from the existing sessionStatus, and clicking allows you to return to the corresponding Session. Directory and documentation:

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

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

Xiaoye