When developing agents in DSH, changes in session state (such as run completion or waiting for human approval) need to be noticed promptly by developers. If developers switch windows or minimize DSH, these state changes may be overlooked. The dsh-session-notify plugin solves the problem of missing background task state updates through desktop notifications, chimes, and browser title flashing.

Plugin Positioning

This is a DSH web plugin maintained by huaiyuWangh. It listens to session state changes and triggers alerts when a session stops, whether it completes naturally or is waiting for human intervention. The plugin is implemented entirely at the plugin layer and does not modify DSH source code.

Core Features

  1. Multimodal Reminders: When a session stops, it triggers a desktop notification, a chime, and browser title flashing based on the page state (background or foreground).
  2. State Monitoring: The plugin watches the ctx.sessions.list store, using the same data source as the status indicator in the sidebar.
  3. Click-to-Navigate: The notification is clickable; clicking it focuses the window and switches to the corresponding session.
  4. Local Persistence: User preferences are stored in localStorage and do not require additional service-layer support.

Installation and Enablement

Install and mount the plugin using the official command:

dsh plugin --profile web add dsh-session-notify

After installation, restart the dsh web service and refresh the page in the browser.

Typical Usage

  1. Grant Permission: Grant notification permissions for this page in browser settings.
  2. State Awareness: When a session enters the “waiting for human input” or “completed” state, the plugin sends a notification in the background or foreground.
  3. Quick Locating: Click the notification, and the system will automatically focus the window and navigate to the corresponding session page.

Applicable Scenarios and Limitations

This plugin is suitable for scenarios involving long-running tasks or cases that require human approval.

Please note:
* Permission Requirement: Browser notification permissions must be granted for it to work.
* Tab Limitation: If the browser tab is closed, the plugin cannot send notifications.
* System-Level Muting: macOS system settings (Notification Center), Focus Mode, or Do Not Disturb Mode may mute or swallow notifications. The plugin cannot detect these system-level muted states.
* Notification Source: The browser enforces the page source as the notification source (such as 127.0.0.1:3080), and this displayed content cannot be changed in code.

Conclusion

dsh-session-notify helps developers maintain awareness of agent session status through a lightweight notification mechanism. For more technical details, refer to the GitHub repository.