DeepSHPlugins
dsh-session-notification 專案預覽
GITHUB / COMMUNITY PROJECT

dsh-session-notification

工具與整合TypeScript

dsh-session-notification:會話完成、報錯、向你提問或需要許可權時發出提醒——播放提示音,離開標籤頁時彈系統通知,避免白等。

19 Starsdingyi222666 更新時間 2026-09-09
訪問 GitHub 倉庫
dsh-session-notification 專案預覽
dsh-session-notification 介面截圖dsh-session-notification 介面截圖

專案介紹

中文

dsh-session-notification:會話完成、報錯、向你提問或需要許可權時發出提醒——播放提示音,離開標籤頁時彈系統通知,避免白等。

English

dsh-session-notification: alerts when a session completes, errors, asks you a question or needs permission — plays a sound and fires a system notification when the tab is backgrounded, so you stop waiting blind.

專案資訊與收錄訊號

快照 2026-09-11
作者 / 組織
dingyi222666
倉庫
dingyi222666/dsh-session-notification
GitHub Stars
19
Forks
0
開發語言
TypeScript
許可證
未記錄
最近推送
2026-09-09
Manifest
資料中檢測到宣告

公開倉庫不自動等於可商用;許可證與當前相容性以原專案文件為準。Manifest 和資料評分不構成安裝安全認證。

資料評分

71/ 100
維護活躍
99
文件與實用資訊
74
生態關注度
37
安裝便捷訊號
75
專案宣告訊號
80

近 2 天仍在更新。

評分來自已有資料快照的五維模型,僅作瀏覽參考,不是實際使用評測或安全檢測結論。

安裝與使用

所有專案資料與許可均以對應 GitHub 倉庫為準。

dsh plugin add github:dingyi222666/dsh-session-notification

複製命令不會自動執行。請先閱讀倉庫文件,確認環境要求與許可證。

專案截圖

倉庫 README

GitHub 原文

已儲存的倉庫文件快照;文件抓取時間未記錄,可能與上方目錄介紹處於不同版本。安裝前請核對當前倉庫說明。

儲存庫檔案保留原文,指令與授權文字不作自動改寫。

dsh-session-notification

npm version

English | 中文

A notification plugin for the dsh web GUI. When a session finishes, hits an error, asks you a question, or needs your permission, you get a heads-up: a sound plays, and when you step away from the tab a system notification keeps you in the loop.

Screenshots

The settings panel with the Notifications entry in the sidebar and the section contentThe sound picker for each kind (the official dropdown)
The Notifications settings sectionThe sound picker menu

Install

# Install from npm (requires dsh >= 0.1.5-alpha.2)
dsh plugin --profile web add @dingyi222666/dsh-session-notification
# Restart dsh web for it to take effect
dsh web

Everything lives in this plugin — no harness (host) changes:

  • The settings section is registered through the client slot system (settings.section), exactly like official sections.
  • Preferences persist in the browser (localStorage) and sync across tabs; nothing requires the host's WEB_SETTINGS_NAMESPACES or any other host-package change. (The node half still reserves the dsh-session-notification namespace host-side through the settings seam; that reservation is inert without exposure.)
  • The settings shell maps only its own section ids to nav icons, so the Notifications nav row shows the shell's default gear.

The four notification kinds

KindWhen it firesDefault sound
Session completedA turn ends normally (turn/end completed)chime
Session failedA turn breaks with an error, or the host reports an agent errorfault
Question askedThe agent is waiting for your answer (question/requested)pop
Permission requestedThe agent requests an authorized operation (approval/requested)alert

Each kind can be enabled or disabled and reassigned to any of the four built-in sound effects (or muted). The four sounds are synthesized with Web Audio — no audio files are shipped — and the master volume is adjustable with the official-style slider (0–100%). A fixed loudness boost (~+6 dB) with a soft limiter on the playback chain makes every sound noticeably louder without distortion; custom audio feeds the same chain.

Custom audio

Beyond the four built-in sounds, each kind accepts your own audio file (mp3/ogg/wav, up to 1 MB): pick Custom audio on a kind's row to upload one, and it replaces the built-in for that kind — with a Replace and remove affordance, plus the Custom audio in use tag. Custom files are stored browser-locally (they are device media, not shared preferences).

Browser notifications & the quiet default

Browser (system-level) notifications are off by default; turning the switch on asks for the browser's permission first (a user gesture). Once granted, a notification is shown when the event's session is not the one you are reading, or when the tab is in the background. Notifications carry the page's own icon (the favicon the harness serves). A completed session's notification carries its final reply text (the last assistant message). The Test notification button in the section sends one immediately to verify the channel once permission is granted. The session you are reading stays quiet by default — its own events don't interrupt you; flip the Alert for the current session toggle if you want it to alert too.

Notify for picks the scope (default Main, after subagents): *All sessions* alerts for every session including subagents; *Main only* alerts for the main session as soon as it goes idle; *Main, after subagents* holds that alert until every subagent the main session spawned has finished, so a run that only paused between subagent waves never interrupts you early (failures always alert immediately).

The Notifications settings section

The plugin registers a Notifications section in the settings panel (Settings ⚙ → Notifications):

  • Browser notifications master switch (+ permission state and an enable button),
  • Alert for the current session toggle (opt in to being alerted while reading that session),
  • Notify for picker (All sessions / Main only / Main, after subagents),
  • Sound master switch,
  • Volume slider (0–100%),
  • one row per notification kind: enable switch, custom-audio upload, sound picker (the official dropdown menu), and a Preview button,
  • a Test notification button on the browser-notifications row (verifies the OS channel once permission is granted).

Preferences are stored browser-locally (localStorage) under the dsh-session-notification key — no host settings-namespace exposure required — so they persist across sessions and sync across tabs, and never depend on a harness change.

How it works

The browser half watches the sessions list snapshot and each session's conversation snapshot — no polling, no new wire channels:

  • A session's running edge true→false ends a run; the run is classified failed when a new turn-error node or a host agent-error appeared during it, otherwise completed (a failure that a retry recovered reads as completed).
  • A pending-interaction edge (question / approval) raises the question / permission kinds, with the question text or the tool name+reason in the notification body.
  • Sessions already idle (or already pending) when the plugin loads raise nothing.

Development

  • yarn run build — builds the browser bundle (lib/client.js) and the Node half (lib/index.js / lib/invariant.js).
  • src/client/notification-service.ts — the engine (classification) and dispatcher (gating); src/client/settings-store.ts — the settings section bridge; src/client/NotificationsSection.tsx — the section UI; src/client/sounds.ts + src/client/custom-audio.ts — the built-in and custom sounds.
  • yarn test — behavior tests; yarn run typecheck — type gate.
  • dsh 0.1.5-alpha.2: the @deepseek-ai/dsh-* types install from npm as devDependencies (^0.1.5-alpha.2); no checkout path mappings.
  • Node-half changes need a dsh web restart; browser-bundle changes need a rebuild (yarn run build) — a --dev server hot-reloads them.

Known limitations

  • Failure detection reads the conversation snapshot, which the client only maintains for sessions that have been opened; a session that runs without ever being opened notifies as completed even on failure.
  • Browser notifications require permission, and sound playback requires the page to have user activation (the browser's autoplay policy) — both are normal for browser apps and resolve as soon as the user interacts with the GUI.
  • Custom audio files live in the browser (localStorage), so they do not follow you across browsers or profiles.
  • The browser half is event-driven from the sessions list; it does not observe the raw event stream, so a run that starts and finishes between two list snapshots could in principle be missed (the host sends a status flip per edge, so this does not happen in practice).

Model Experience

None. The plugin is a pure client-side observer over the already-logged session state; nothing here reaches a model request.

KV Cache effect

None; this package neither assembles nor sends provider requests.

使用前核對

安裝步驟、相容版本與授權範圍以原專案當前文件為準。Stars 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案