DSH Plugin: Notifications on Session End and During Interaction

Introduction

When debugging or running agents with DeepSeek Harness (DSH), sessions may end or change state due to completion, errors, cancellation, waiting for input, or requiring authorization. If the interface is not in the foreground or you are viewing a different session, these changes can easily go unnoticed. A plugin can keep you informed in real time.

Plugin Overview

mloluyu/dsh-session-notify is a DSH client plugin that, when a top-level session completes, fails, is cancelled, stops waiting for input, or requires your authorization or answers to questions, reminds you via an in-app card in the top-right corner or a system notification dispatched from the page. It is purely client-side, with zero dependencies, zero subprocesses, and zero configuration.

Maintainer: mloluyu

Core Features

  • Session state change notifications: When a session completes, errors out, is cancelled, or stops waiting for input, an in-app card is displayed
  • Interaction request reminders: When a session requires user authorization or answers to questions, a notification is sent
  • Multi-scenario coverage:
  • If you are currently viewing the session that triggered the event, no notification is shown
  • If you are viewing another session/panel in the interface, an in-app card appears in the top-right corner
  • If the interface has lost focus, a page-dispatched system notification is shown
  • If the interface is not open, no reminder is given (by design)
  • Notification content: The title is the session name; the body reflects the end reason of the last turn, or the in-progress interaction request

Installation and Activation

Install the locally cloned repository directory via the DSH plugin manager:

/path/to/dsh-session-notify

After installation, the default behavior is defined in the DEFAULTS block at the top of client.js. Modify it and reload to take effect. The first focus-loss notification will request notification permission once—click “Allow” to proceed.

Implementation

All plugin logic resides in client.js and operates through the following mechanisms:

  • Tracks session runtime state via api-session/status push events
  • Reads the session event stream (sessions.retain)
  • Monitors the currently viewed session (uiSession.adapter.current)
  • Renders pure DOM cards and dispatches system notifications via the browser Notification API

For in-progress interaction requests (authorization/questions), detection is performed through multiple redundant channels: tool/call (ask_user_question) in the session stream, polling remote.session.state.pendingInput, and forwarded push events for approval/request / user-questions/request. A shared deduplication key ensures each request triggers only one notification.

index.js is a no-op that serves solely as the host plugin registration, enabling the GUI to load the client-side portion.

Compatibility and Caveats

  • Built against DSH v0.2.2-rc.3 (desktop profile, macOS); verified to be byte-identical on v0.2.2-rc.5, so upgrading has no impact
  • The logic runs in the page context, so it should work in theory on Windows/Linux desktop builds, though this has not been tested
  • The plugin relies on several undocumented page-side interfaces (sessions / remote / uiSession), which may silently break after a DSH upgrade. On startup, a self-check runs: any missing interface is listed in the console with the [session-notify] prefix, a one-time card is displayed, and the plugin remains disabled
  • The plugin runs with the current dsh process privileges. Review the source code and license (MIT) before installing

Use Cases

  • You need to run agents for extended periods and monitor their state changes
  • You frequently switch between multiple sessions/panels and tend to miss individual session end events
  • You want to receive reminders for critical session changes even when the interface has lost focus

Closing

This plugin helps you stay on top of session state changes in a timely manner through in-app cards and system notifications, reducing the chance of missing important events. If you need clearer session state feedback while using DSH, give it a try.

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

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

Xiaoye