dsh-desktop-notifier: Desktop Task Reminders via Web Focus Loss

Preface

When running long tasks in DeepSeek Harness (DSH), you tend to switch to editors, documents, or other tabs. When a task finishes or gets stuck on approvals, plan confirmations, or questions, it’s easy to miss status changes on the Harness page if you are still staring at another window. This plugin, dsh-desktop-notifier (maintained by lurejewel), fills this gap by utilizing the system notification bar (Action Center on Windows) on the browser side: when the page is in the background or loses focus, it pushes “Task Complete” and “Action Needed” notifications to the environment you are currently using. Clicking the notification switches you back to the corresponding session.

What is this

dsh-desktop-notifier is a client-side plugin for the DSH Web surface. All functionality runs within the browser, delivering reminders via the Notification API. It does not add host routes, write session logs, or modify the agent loop; status is derived from the session list and UI session state already present in the client runtime.

DeepSeek Harness version requires >= 0.1.7-rc.2 (Plugin 0.2.0 is adapted to the client contract following the Session Controller split). Node.js requires >= 20. Browsers should primarily be Chrome or Edge (notification authorization relies on user gestures; Safari has not been verified in the documentation).

Core Features

When Notifications Trigger

Timing Notify? Description
Any session task completes Yes Includes the session you are watching, provided the Harness window/tab has switched away
Session runtime is below threshold (default 1 min) No Avoids frequent pop-ups for extremely short tasks
Session starts waiting for your action Yes Approvals, plan confirmations, questions, etc.; not subject to the duration threshold
Subagent session completes No Skipped by default; parent session completion triggers a reminder; can be enabled via includeSubagents
Page is in the foreground (visible and focused) No Does not disturb when the user is watching the page
Page is visible but focus is on another program (including dual screens) Yes Determined by document.hasFocus()
Another DSH tab is in the foreground No Suppresses duplicate reminders across tabs via BroadcastChannel

The notification title is taken from the session title; the body might read “✅ Task Complete · Duration 3 min 12 sec” or “⏳ Awaiting Your Approval”. Notifications of the same type for the same session use the same tag and will replace each other rather than stacking infinitely.

Correspondence with Harness Versions

Plugin Version Required DSH Description
0.2.0 >= 0.1.7-rc.2 Adapted to the contract after the Session Controller split
0.1.0 0.1.0 – 0.1.5-rc.x Partially fails on 0.1.7-rc.2: completion reminders still work, but “Waiting for approval/questions” and clicking notification to switch sessions may not work; should upgrade to 0.2.0

Starting from 0.1.7-rc.2, edge determination reads uiSession.sessionStatus; clicking a notification switches back to the session via uiWorkspace.openSession(sessionId).

Installation and Activation

The official installation command is as follows (the package declares a dsh.bundle patch, and dsh plugin will automatically mount it into the profile configuration layer, so no manual mounting lines are needed):

dsh plugin --profile web add dsh-desktop-notifier

After installation, it is recommended to do three things in order:

  1. Restart dsh web—dsh.profile.bundles is read only once at boot and will not be perceived by an already running instance;
  2. Hard refresh the browser (Ctrl+Shift+R);
  3. Click anywhere on the Harness page once: Chrome/Edge only allows requesting notification permissions within a user gesture; this is the only authorization entry point specified in the documentation.

Quick Self-Check

Execute the following in the DevTools console:

__dshNotifyTest__()   // Directly pops a test notification, bypassing the "only notify when unfocused" rule

If it returns false and the console indicates permission is not authorized, it means Step 3 has not been completed.

Installation Status Self-Check

node scripts/verify-install.mjs <port> <token>
# Example: dsh web: http://127.0.0.1:3080/?token=XXXX  ->  node scripts/verify-install.mjs 3080 XXXX

The script checks if this plugin row exists in the web boot graph and if the corresponding client bundle returns 200. npm users can execute this under ~/.dsh/profiles/web/node_modules/dsh-desktop-notifier. The Web surface contains /plugins behind a process token fence, so a bare curl will not get results.

For cleanup steps when installing from source via link: or switching from a link to the npm release version, see the GitHub README; on Windows, the local scripts/install-local.ps1 can be used, and the profile user patch layer can be hot-applied without restarting dsh web, just hard refresh.

Typical Usage: localStorage Configuration

Without modifying the source code, you can write a JSON object to the key dsh-desktop-notifier:config in the browser’s localStorage to override the DEFAULTS in lib/client.js:

localStorage.setItem('dsh-desktop-notifier:config', JSON.stringify({
  thresholdMs: 60000,        // Only remind upon completion for tasks running longer than this millisecond count
  includeSubagents: false,   // true = Remind when subagent sessions complete
  pendingInteraction: true,  // Remind when waiting for approval/questions
  silent: false,             // true = Notifications make no sound
  debug: true                // true = Print [dsh-desktop-notifier] determination logs to console
}))

If the field type is incorrect or the JSON is invalid, the entire configuration will fall back to the built-in defaults; the page must be refreshed after making changes.

Developers can run node test/client.test.mjs at the repository root to run client logic tests (executing the real lib/client.js with stubbed global variables in Node).

Scenarios and Notes

Who it’s for: Developers who often run long tasks in DSH Web and need to switch to other applications or tabs; users who wish to receive completion and blocking event reminders in the Windows Action Center (or the browser’s corresponding system notifications).

Permissions & Security: The plugin runs in the browser along with DSH Web; notification capabilities are constrained by browser and OS policies. You can view the source code and the MIT license in the GitHub repository before installation to ensure it meets your environment requirements.

Known Limitations (from the documentation):

  • Requires the browser process to be running; no notifications will appear if the tab is closed (host-side tasks may continue; native toasts require a host-side solution, this plugin only does browser notifications).
  • For tasks already running when the plugin loads, the duration is calculated from the moment the page loads (the session log lacks a “start time for this round”), which may underestimate the time, but will not falsely report long tasks because of this.
  • The identity displayed in the Windows Action Center is that of Chrome/Edge, not a standalone DSH application.

The DSH ecosystem emphasizes “Everything is a plugin”; the community directory skillhub.cn is an independent site and has no official affiliation with DeepSeek or High-Flyer.

Conclusion

dsh-desktop-notifier fills the gap of visible feedback when “the human is not on the Harness page” with minimal intrusion: two types of edge events (completion and waiting for action), focus and cross-tab suppression, configurable thresholds, and subagent strategies are all written into the client bundle. If you are already using DSH on a Web profile >= 0.1.7-rc.2, you can install it via the command above and perform a __dshNotifyTest__() and an unfocus scenario verification.

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

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

Xiaoye