dsh-host-notify: Host-Side macOS Notification Plugin

Introduction

In DeepSeek Harness (DSH) development scenarios, developers often encounter the issue of not receiving notifications after leaving the page. This is because, when an Electron window is suspended or hidden, notifications emitted by the renderer process are often silently blocked by the system. To address this level of loss, the host process should be used to deliver notifications directly to the system.

Below is dsh-host-notify. It is a host-side macOS notification plugin that delivers notifications through a built-in signed application, making it immune to notification loss caused by a hidden Electron renderer process. It is maintained by huhui-tech and licensed under the MIT License.

Core Features

The plugin runs in the host process and does not go through the renderer process or a Service Worker, ensuring reliable delivery. Its main capabilities include:

  1. Event listening: Monitors the ask_user_question event, approval events, and reply completion events.
  2. Application delivery: Sends notifications using the built-in DSH Notifier application.
  3. Interaction enhancement: Supports clicking a notification to bring DSH back to the foreground.
  4. Fallback: Provides an osascript fallback to ensure notifications can still be delivered in certain environments.
  5. Deduplication: Supports notification deduplication to avoid repeated interruptions.

Installation and Activation

Run the following command in the terminal to install it:

dsh plugin --profile web add dsh-host-notify

The plugin is only available on the macOS platform (darwin). On other platforms, the plugin remains silently disabled after installation and does not affect host runtime.

Usage

  1. Off-page alerts: Stay informed without missing any activity even after leaving the DSH page.
  2. Click to wake: Click the notification to bring DSH directly back to the foreground.
  3. Style settings: Set the notification style to persistent in system settings so the banner remains on screen.
  4. System authorization: On first use, authorize DSH Notifier to send notifications in system settings.

Notes

  1. Initial setup: When the first notification is received after installation, the system may display an authorization prompt; manually click “Allow”.
  2. Notification style: It is recommended to set the DSH Notifier notification style to “Persistent” in system settings.
  3. Environment dependency: Requires Node.js >= 20.
  4. Deduplication rules: 60-second deduplication at the interaction level and 5-second deduplication at the completion level.

Summary

dsh-host-notify solves the pain point of browser notifications easily being lost in Electron environments. It is suitable for developers who need to maintain awareness in the background. Its host-side execution mechanism ensures notification stability.

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

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

Xiaoye