AK-blank/dsh-plugin-mac-notify ↗★ 1

dsh-plugin-mac-notify

会话结束或需要审批时发送macOS通知中心警报 适合macOS用户,在后台运行长任务时接收完成、提问或报错的即时提醒。

包名
dsh-plugin-mac-notify
兼容性
待验证
版本
1.0.0
许可证
MIT
最近更新
2026年10月3日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:AK-blank/dsh-plugin-mac-notify

Configuration

The bundle row carries no config, so the defaults apply. Override them in the profile's own cordis.patch.yml (applied after every bundle layer):

- id: mac-notify
  name: 'dsh-plugin-mac-notify'
  config:
    sound: Ping
    notifyOnApproval: false
    url: 'http://127.0.0.1:3080'
KeyDefaultMeaning
enabledtruemaster switch
notifyOnFinishtrueturn finished
notifyOnQuestiontruewaiting for an answer
notifyOnApprovaltruewaiting for a decision
notifyOnErrortruea step or turn errored
includeSubagentsfalsealso notify for subagent children
sound'default''default' = your system alert sound (read from com.apple.sound.beep.sound); a name from /System/Library/Sounds (Ping, Glass, Hero, …); 'off' = silent
onClick'focus''focus' = surface the existing DSH tab, else open the URL; 'open' = always open; 'none' = no click action
notifier'auto''auto' prefers terminal-notifier, 'osascript' forces the built-in banner
url''click target; empty means auto-detect (see below)
language'auto''auto' follows LANG/system locale, or pin 'zh' / 'en'
titlePrefix'DSH'banner title prefix
minIntervalMs1500pacing gap between non-urgent banners
bodyMaxChars200banner body budget

How the click target is resolved

url, else the port this Host actually serves the Web UI on (ctx.get('webServer').port), else DSH_WEB_URL from the environment — so a non-default port needs no configuration.

A click runs lib/click.mjs, which asks every running browser (Chrome, Edge, Brave, Vivaldi, Chromium, Safari — found with pgrep, so no browser is launched just to answer) whether one of its windows holds a tab whose URL starts with that target. The first match becomes the active tab and its window is raised. Only when no running browser has it does the helper fall back to /usr/bin/open .

Reading another app's tabs needs macOS Automation permission, which the system grants per browser on first use (click Allow on the “terminal-notifier wants to control …” prompt). A denial is not fatal: the helper falls through to open, so you land on the DSH page in a new tab instead of the existing one.