dsh-macos-notifications
其他 活跃维护

dsh-macos-notifications

ihodorchenko/dsh-macos-notifications

轻量级通知插件,监听AI任务执行状态,实时推送结果到通知中心,支持成功与失败提醒,无需打开终端即可掌握进度,安装简单即插即用。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
7 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:ihodorchenko/dsh-macos-notifications
git clone https://github.com/ihodorchenko/dsh-macos-notifications.git
git clone git@github.com:ihodorchenko/dsh-macos-notifications.git
README.md main

dsh-macos-notifications

A Host plugin for DeepSeek Harness that posts native macOS notifications through Notification Center. It fills the gap where the app only notifies about its own updates, not about the agent's work.

The plugin runs inside the Host process (the Node runtime behind the Desktop app), watches the durable session/event feed, and shells out to osascript for each alert. It never writes to the session log and never talks to the model.

What triggers a notification

Moment Default Notification
A turn finished on Turn finished / Ход завершён
A turn failed on Turn failed + the error message
A turn hit the token limit on Token limit reached
An approval is requested on Approval needed · <tool>
The agent asks a question (ask_user_question, exit_plan_mode) on Your answer is needed · <question>

User-cancelled turns (aborted), forked and interrupted turns are silent. Subagent sessions are ignored so only the sessions you actually see can ring the bell. The notification body carries the session title (or, before a title exists, the workspace folder name).

Configuration

Every field is optional; the row's config mapping is merged over these defaults.

Field Default Meaning
language auto en, ru, or auto (host locale).
sound Glass Any macOS sound name, or null for a silent banner.
notifyOnTurnEnd true Notify when a turn completes, fails, or is blocked.
notifyOnApproval true Notify when the agent waits for an approval decision.
notifyOnQuestion true Notify when the agent asks the user a question.
- id: macos-notifications
  name: dsh-macos-notifications
  config:
    language: ru
    sound: Ping
    notifyOnTurnEnd: true
    notifyOnApproval: true
    notifyOnQuestion: true

Installing

From GitHub (what the Plugins page manages). Ask the agent to install the bundle, or use the Plugins page with this spec:

git+https://github.com/ihodorchenko/dsh-macos-notifications.git

The plugin_manager tool takes the same spec as install_bundle.target. The bundle patch inserts the macos-notifications row; the package carries its own dsh.bundle.patch, locale metadata, and icon.

From a local checkout. Point install_bundle at the absolute package directory, or pass link:<absolute directory> to the profile's package manager.

Without Plugin Manager. The Loader also accepts a plugin row that names a file URL directly. Add this to $DSH_HOME/profiles/desktop/cordis.patch.yml (or your profile's patch):

- insert:
    - id: macos-notifications
      name: 'file:///absolute/path/to/dsh-macos-notifications/index.js'
      config:
        language: ru

Save the file while the app runs: the profile's HMR watcher recomposes the loaded plugins, so a new row appears without restarting. A YAML error is rejected and the previous configuration keeps running.

macOS permission

The first notification triggers a system prompt for the process that sends it (in practice osascript / Script Editor). If nothing appears, open System Settings → Notifications and allow notifications for Script Editor (or for the item macOS showed). This is a platform limitation of script-driven notifications: there is no bundle identifier to register, so clicking the banner does not focus the Harness window.

Updating and moving

A file: row is not watched by HMR, because the file lives outside the profile directory. After editing index.js, touch cordis.patch.yml or restart the app so the module is imported again. Moving or deleting the checkout breaks a file: or link: install; reinstall the bundle from the new path instead.

Files

File Role
index.js Host plugin: session-event listeners, message rendering, osascript call
cordis.patch.yml Bundle patch that inserts the macos-notifications row
locale/en.json, locale/ru.json Plugin Manager display metadata
icon.svg Plugin icon