Invoice-Downloader
EthanYoQ
电子发票整理与报销准备工具:从邮箱批量收集 PDF/OFD/XML 发票,OCR 识别、分类归档并生成 Excel 汇总;提供 Windows/macOS 桌面版与 DSH 插件。
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:66Ronghua99/dsh-notifier
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A macOS banner when a DeepSeek Harness session finishes a turn. Click it and DSH comes forward at that exact session — even if the window was closed when the turn ended.
Repo: github.com/66Ronghua99/dsh-notifier · License: MIT (code) · third-party character art is not bundled — see ATTRIBUTION.md.
turn/end → host half → helper app (banner)
│ click
▼
pending.json + open dsh://open
│
▼
client half → uiWorkspace.openSession(sessionId)
turn/end session events, so a banner means the agent really stopped and owes you an answer (not just a lull between tool calls).suppressWhenFocused: true to go back to background-only banners).会话完成, 会话出错 (with the error text), 已停止 (max tokens), 已中断.shell.overlay: it pops a speech bubble when a session finishes (clicking the bubble switches to that session), and clicking the doll opens a per-session reminder inbox. The panel footer resizes the doll (48–220 px) and remembers the choice; whaleSize sets the starting size. Rows are unread only: jumping to one clears it from the list, so the panel empties as you work through it. Drag the doll to move it; the position is remembered. 全部已读 clears the rest, and /notify off mutes the OS banners only — the doll keeps collecting.~/Library/Application Support/dsh-notifier/pending.json and opens dsh://open, so the click works with DSH open, hidden, or quit-and-relaunch.osascript notifications if the helper app is missing or notification permission was denied (the fallback banner is not clickable).# 0. Clone (or download) this repository to a directory you keep
git clone https://github.com/66Ronghua99/dsh-notifier.git
cd dsh-notifier
# 1. Build the native helper (once; needs Xcode Command Line Tools)
./helper/build.sh
# 2. Add this directory as a bundle in the DSH profile
# Settings → Plugins → Add plugin → this directory (or `dsh plugin add <dir>`)
The first activation asks macOS for notification permission for DSH Notifier. If the banner never appears, allow it in System Settings → Notifications → DSH Notifier and run POST /dsh-notifier/test (below).
Rebuilding the helper changes its code signature, which macOS treats as a new app: allow notifications again after ./helper/build.sh.
| Scope | How |
|---|---|
Everything (banners, /notify, the click hand-off) |
Settings → Plugins → DSH Notifier and switch the row off; switch it back on to resume. |
| Banners only, without unloading the plugin | Type /notify off in any conversation; /notify on resumes. The state is stored in <stateDir>/mute.json and survives a restart. |
| Permanently, from configuration | Set enabled: false on the dsh-notifier row in the profile's cordis.patch.yml. |
/notify status reports the current state, and /notify test posts a banner for the conversation you are in, so you can check the click without waiting for a turn.
Set these in the profile's cordis.patch.yml under the dsh-notifier row:
- id: dsh-notifier
config:
enabled: true
locale: auto # auto | zh | en
suppressWhenFocused: true # no banner while the DSH window is focused
dedupeWindowMs: 1500 # minimum gap between two banners for one session
includeSubagents: false # also notify for subagent sessions
notifyOnAborted: false # also notify when you abort a turn
notifyOnInterrupted: false
requestPermission: true # ask macOS once at activation
openUrl: dsh://open # URL opened by the click
whaleImage: auto # auto | builtin | absolute path to a PNG/GIF of your own
whaleSize: 96 # doll size in px (48–220); adjustable in the panel too
stateDir: ~/Library/Application Support/dsh-notifier
helperPath: '' # override the bundled helper binary
The doll prefers a real character image and falls back to the built-in SVG whale.
With whaleImage: auto the Host looks for the artwork of an installed
dsh-whale-widget (assets/DSniang1.png) and serves it from its own location
through GET /dsh-notifier/art — nothing is copied into this package, and the
plugin keeps working when that file is gone. Set whaleImage: builtin for the
SVG whale only, or point it at your own PNG/GIF.
That artwork is not covered by the widget's MIT code license (see its
PROVENANCE.md: provided as-is, no sublicense), so this plugin never bundles it;
it only reads the copy already installed on this machine. Before publishing the
bundle, keep it in auto/builtin mode.
Served by the DSH web server, same origin as the GUI:
| Endpoint | Purpose |
|---|---|
GET /dsh-notifier/state?focused=0\|1&surface=desktop\|web |
Everything the client half needs: queued clicked sessions, the reminder inbox, unread count, mute state. |
GET /dsh-notifier/pending?… |
Same hand-off queue on its own (kept for scripts and older clients). |
POST /dsh-notifier/read |
Mark one session read ({"sessionId":"…"}) or all ({"all":true}). |
POST /dsh-notifier/forget |
Drop one session's reminders ({"sessionId":"…"}) or all ({"all":true}). |
GET /dsh-notifier/reminders |
Read the inbox without consuming hand-offs. |
GET /dsh-notifier/status |
Helper path, permission diagnostics, pending count, last delivery and last navigation. |
POST /dsh-notifier/test |
Post a test banner, optionally for one session: {"sessionId":"…","title":"…","body":"…"}. |
POST /dsh-notifier/navigate |
Queue one session as a notification click would: {"sessionId":"…"}. |
GET /dsh-notifier/opened?session=… |
The client half reports a completed navigation (diagnostics only). |
# Test banner that will jump to a session when clicked
curl -s -X POST http://127.0.0.1:58208/dsh-notifier/test \
-H 'content-type: application/json' \
-d '{"sessionId":"session-…","title":"DSH 通知测试"}'
# Test the click hand-off without a click
curl -s -X POST http://127.0.0.1:58208/dsh-notifier/navigate \
-H 'content-type: application/json' -d '{"sessionId":"session-…"}'
curl -s http://127.0.0.1:58208/dsh-notifier/status
A click always opens dsh://open, so its queue entry targets the Desktop surface; a browser tab on the same host answers only after a 6-second grace period, which keeps a browser-only setup working.
node scripts/selftest.mjs # synthetic turn/end -> real banner, routes, hand-off
Then: switch away from DSH, let a turn finish, and click the banner. The DSH window comes forward and the session opens. GET /dsh-notifier/status shows lastDelivery (banner), presence (surface/focus), and lastOpened (navigation) after a click.
whaleImage: auto the plugin reads the copy already installed on your machine
and serves it at runtime. The project's own SVG whale is used when that copy is absent.Details: ATTRIBUTION.md.
dsh://open focus on click, is the v1 notification surface.CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: notifications。