@idoall/dsh-notify 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +135 -0
- package/LICENSE +21 -0
- package/README.md +165 -0
- package/README.zh.md +165 -0
- package/assets/mobile.png +0 -0
- package/assets/panel.png +0 -0
- package/assets/settings.png +0 -0
- package/assets/toast.png +0 -0
- package/cordis.patch.yml +10 -0
- package/dist/buffer.js +109 -0
- package/dist/client.js +1195 -0
- package/dist/core.js +170 -0
- package/dist/index.js +481 -0
- package/dist/sound-choices.js +48 -0
- package/dist/sounds.js +63 -0
- package/package.json +87 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented here. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); this project uses [Semantic Versioning](https://semver.org/spec/v2.0.0.html). GitHub Releases use the same bilingual layout as [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.1.6-alpha.1).
|
|
4
|
+
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## [0.2.2] - 2026-09-19
|
|
8
|
+
|
|
9
|
+
Published to npm as **`@idoall/dsh-notify`**, with a tag-driven release pipeline. Nothing about the plugin's behaviour changes: the cordis name, the mount id, the `/plugins/dsh-notify/*` routes and every CSS class keep their short spelling, so profile config and the test suite are untouched.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- **npm releases.** The package publishes as `@idoall/dsh-notify`. The unscoped `dsh-notify` name belongs to another author's Windows tray plugin, so the scope is what keeps `dsh plugin add dsh-notify` from pulling the wrong package. `package.json` drops `private`, declares `publishConfig.access: public`, and now ships `assets/` so the README screenshots render on the npm package page.
|
|
14
|
+
- **`.github/workflows/release.yml`.** A `v*` tag gates on the `package.json` version, runs `npm run verify`, packs the plugin, publishes through GitHub Actions OIDC (no long-lived token; a version that is already on npm is skipped instead of failing), and creates the GitHub Release with the tarball and its sha256. `release-notes/v<version>.md` supplies the bilingual notes whenever it exists.
|
|
15
|
+
- **`.github/dependabot.yml`**: monthly grouped npm maintenance plus GitHub Actions updates.
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **`cordis.patch.yml` mounts `@idoall/dsh-notify`** — the Node-resolvable package name — while the mount `id` stays `dsh-notify`.
|
|
20
|
+
- **The client bundle registers under `@idoall/dsh-notify`.** `scripts/build.mjs` derives the `__ModuleLoader__.load({id})` id from `package.json` instead of hardcoding it, because DSH identifies a browser module by its manifest package name.
|
|
21
|
+
- **`scripts/pack-check.mjs` also asserts the publish preconditions**: `private` unset, public scoped access, `assets/` shipped, `repository.url` matching the GitHub repository, and both `cordis.patch.yml` and the client registration id tracking `package.json`'s name.
|
|
22
|
+
- Installing from a local clone no longer needs a manual `npm run build`: `npm install` builds through `prepare`, and `prepack` rebuilds before packing or publishing.
|
|
23
|
+
- README and README.zh document the scoped install name, the npm badge and the release flow.
|
|
24
|
+
|
|
25
|
+
## [0.2.1] - 2026-09-18
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- One plan review (or question) no longer becomes two toasts. A profile plugin sees both the live `tool/call` (`exit_plan_mode` / `ask_user_question`) and the `user-questions/request` waterfall for the same interaction; those used to be two `mergeKey`s, so the corner showed two 「计划待审」 cards for one session — one with the real question (`Approve this plan and leave plan mode?`) and one with the generic `计划待审:请在页面里查看并批准或拒绝`. Complementary identities now collapse onto the callId, the waterfall body wins over the fallback, and a rekey drops the old buffer copy so a page asking from 0 still sees one card.
|
|
30
|
+
- Clicking a card can jump to its session again. Current DSH moved view selection to `uiWorkspace.openSession` and dropped `sessions.open` / `list.current`; `sessions.binding()` is only live after the main view has already retained the session, so requiring it first made every card report 没能打开这个会话. The toast now selects through `openSession` and treats `retainedBy.mainView` as landed (the older `open` + `current` path still works).
|
|
31
|
+
- The toast follows the conversation's top-right when a sidebar opens or closes. AppFrame animates `grid-template-columns` on a frame that does not itself resize, so a ResizeObserver on the first `[data-conversation-scroll]` node (or on `body`) never saw the toggle: the stack stayed at the old `inset-inline-end` while the chat expanded. It now re-queries the conversation, watches the grid frame's style and collapsed attributes, and tracks the slow column transition.
|
|
32
|
+
|
|
33
|
+
## [0.2.0] - 2026-09-18
|
|
34
|
+
|
|
35
|
+
Notifications are delivered live and nothing is stored: the stack in the top-right corner is the whole feature, so the sidebar bell, the history list and the store behind them are gone.
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
|
|
39
|
+
- **A toast stack.** Up to five notifications live in the top-right corner, newest on top; each new one takes the first slot and pushes the older ones down, animated by a measured `transform` rather than a re-flow. Cards enter with a spring scale + fade and leave by sliding out to the right.
|
|
40
|
+
- **Every card carries its own time.** The arrival time leads the card, to the second (`00:33:08`), because parallel tasks finish seconds apart and "which one was this" is exactly the question a stack of similar cards raises. It shares the metadata row the session name already used, so it costs the card no height and five cards still fit the same window; a record that is not from today falls back to `02-14 09:05`, and the full local date and time always sits in the tooltip. The clock leads rather than trails that row because the `+N` count is pinned to the corner and would otherwise sit on top of it; fixed-width digits keep the clocks in one column either way. The self-test group is spread over the previous half-minute so a burst shows distinct moments instead of eight identical ones.
|
|
41
|
+
- **A window, not a pile.** The corner is exactly five cards tall — three on a narrow, touch viewport, where screen space is the scarce thing. A sixth notification takes its place below them, where the window scrolls to it (the wheel, a swipe, or the count button, which jumps between the two ends of the queue); a sliver of the next card under the window edge is what makes the rest look reachable. The count is the whole queue — eight notifications show `+8`, whether five of them are on screen or not — and it is pinned to the corner outside the scroll box, so it neither scrolls away nor means something different once you have scrolled.
|
|
42
|
+
- **Action state on the card.** Answering a question or a plan review from a card reports itself: the icon spins while the answer is in flight, the buttons disable, and the card settles on a green check plus 已完成 (then retires on its own) or on a red error with the host message and a 重试 button.
|
|
43
|
+
- The settings self-test can fire a window-sized group (**测试 5 条**) and an overflowing one (**测试 8 条**), so what happens past the window — the count, the scroll and the card that waits below the fold — can be looked at without waiting for eight real notifications.
|
|
44
|
+
- **`src/buffer.js`**: a bounded in-memory delivery buffer, plus the one thing that does persist — the user own preferences. A page asks `/pull?since=<seq>` for whatever it has not seen, and the first poll of a page is treated as history it was not there for: it is never replayed as a pile of old cards.
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- **The corner is a window onto a page-scoped queue.** Five cards fit — always including anything waiting on the user, which is ordered first — and everything older keeps its slot below the fold instead of being dropped, one wheel-scroll away. Nothing about the stack depends on the pointer any more, and a card on its way out no longer counts towards the window while it slides away. A refresh still clears everything: nothing is stored, here or on the host.
|
|
49
|
+
|
|
50
|
+
- **A card leaves when the user says so.** No countdown bar and no clock: a notification stays until it is closed with **×**, opened by clicking the body, or answered successfully from the card itself. A record that arrives again because the host settled it (an approval, asked and then decided) updates its card in place instead of stacking a second one, and retires it.
|
|
51
|
+
- **Nothing is stored.** The profile keeps `settings.json` (sound, toast position, subtask noise) and nothing else. Records do not survive a restart, there is no read state anywhere, and no page is brought up to date on work it was not there for.
|
|
52
|
+
|
|
53
|
+
### Removed
|
|
54
|
+
|
|
55
|
+
- The sidebar bell with its badge, the pending/history panel, paging, mark-all-read, 已处理 and the batch delete behind **Select…** — along with `/ack`, `/settle`, `/clear`, `/delete`, `/open` and the host self-test suite that existed to exercise them. The plugin registers two seats instead of three.
|
|
56
|
+
- `src/storage.js` (394 lines): the epoch/cursor protocol, the change log, capacity eviction, the JSON documents and their schema validation and recovery. Every bug fixed in this release lived in that bookkeeping, and it was the only reason a full store could go silent.
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
|
|
60
|
+
- The corner could paint as a sliver of overlapping card edges before the cards appeared. A batch is created in a single commit, and the cards are measured in that commit's ref callbacks — while the frame is still `display:none`, because a `popover` that has not been shown yet is not laid out. Every card honestly reported a height of 0, and the window was built out of those zeros: five slots twelve pixels apart, clipped to one card-tall sliver. It then stayed that way until an unrelated re-render (the next poll, a resize) measured it again, which is the one-to-two seconds of "top borders with no content". The frame is now promoted to the top layer and re-measured in a layout effect, so the first painted frame is the finished one; the suite fakes the hidden-frame condition (a card height of 0 until the popover is shown) and asserts a measured window in the same flush, and both new tests fail against the old code.
|
|
61
|
+
- A burst of notifications trickled in one card per poll. The toast effect served only the *next* un-toasted record, which was right when a poll carried a single event; now that a poll returns everything after a sequence, several tasks finishing together appeared one card every 1.5 seconds. Every record delivered since the last poll is now presented in one pass, oldest first so the newest still lands on top.
|
|
62
|
+
- A click that could not go anywhere looked exactly like one that worked: the card slid away and nothing said so, because the card was dismissed *before* the jump was even attempted. It is now dismissed only once the host has really selected the session, and the three ways a click can fail are told apart: a session that is gone (deleted, archived, or absent from this page's list) leaves the card in place reading 这个会话已经不在了,无法打开; a jump that merely failed — no sessions service, a race with a deletion — says 没能打开这个会话,再点一次试试, and clicking the card again retries; and a record with no session of its own says so rather than blaming the navigation. A self-test card still disappears silently, because having no session is what it is for. Verified on the live page by handing it a record whose session does not exist: the card stayed, turned red, and named the reason.
|
|
63
|
+
- 工作流结束 notifications can jump to their session. `workflow/end` cannot say which session a run belongs to — the engine emits it from its own unscoped context and the payload is `{id, meta}` — so that kind shipped with no session at all and was the one card that could never be clicked. The owning session is learned from `session/event` instead: `dsh-tool-workflow` appends `tool-workflow/run-start {runId, name}` to the parent Session before the run begins, and every append is delivered there. The lookup is dropped as it is consumed and capped, and nothing depends on which of the two events lands first.
|
|
64
|
+
- In a window narrower than 768px the host's own mobile stylesheet (`bridge-mobile-styles`) stretches every input and select inside the settings pane to `width:100%`. That is right for our select and wrong for the checkbox: it took the whole row and pushed its label out of the card. The host's selector (`div[class*=…] input`) outranks a bare `.dsh-notify-toggle input`, so the control's sizing is scoped to the settings section now and pinned three ways (width, max-width and a flex basis) — the tap target still grows to 22px for a coarse pointer, and the label may shrink so a cramped pane wraps instead of overflowing. Measured on the live page at 375px with a fine pointer (18px box, nothing overflows) and on a touch preset (22px box, 44px select, nothing overflows); jsdom resolves stylesheets by source order and ignores rules inside `@media`, so this one has no unit test that could honestly fail.
|
|
65
|
+
- The notification settings read as a wall of text, because a card's vertical rhythm never reached its paragraphs. The rhythm was one rule — `.dsh-notify-card>*+*{margin-top:10px}` — which has the same specificity as the `.dsh-notify-hint{margin:0}` reset further down the same stylesheet, and the reset comes later, so it won: labels, selects and button rows kept their 10px while every hint sat flush against the control above it. Measured inside 提示通道, the gaps were 10, 0, 10, 0, 0. The rhythm is now scoped to the settings section so no reset can reach it, a note sits 6px under the control it explains rather than 10px from it, two separate notes and a card's lead sentence keep the full 10px, and the cards use the host's own metrics — `16px 18px` padding, a 12px radius, a 36px select. Five rules that no markup uses any more (the old self-test card strip, the details/summary block and the confirm block) went with it.
|
|
66
|
+
- The stack flickered when the pointer crossed the gap between two cards. Hovering used to resize it — a card listening for its own pointer left the stack at the 12px gap, which collapsed it, which slid the cards back under the cursor and expanded it again. The window is now a fixed size and the queue is below the fold, so the pointer cannot move anything; the suite fires every boundary event a browser sends while the pointer crosses the stack and asserts that nothing — height, content, transforms, order — has changed.
|
|
67
|
+
- A card could flash and vanish a moment after it appeared. A record already on screen was treated as "the host has settled it" whenever it arrived again, so a host that re-sends what it has already delivered — an older host answering the old cursor protocol, or any duplicate delivery — closed every card on the next poll. Only a record that was **waiting on the user** and has since been settled retires its card now; every other repeat is the same notification and is ignored. The suite covers both a legacy host and a host whose sequence never advances.
|
|
68
|
+
- A notification that arrived once the store held its 300-record cap was delivered as a full-snapshot `reset`, and a reset pull is history rather than news — so it never raised a toast, while the background tab kept flashing about it. With no store there is no cap to reach, no epoch to advance and no reset to swallow.
|
|
69
|
+
|
|
70
|
+
## [0.1.2] - 2026-09-16
|
|
71
|
+
|
|
72
|
+
The sidebar badge could pin itself at 1 and refuse to go away. A notification left pending by an interrupted interaction is now resolved where it is created, when its session is rebuilt, and when the host starts.
|
|
73
|
+
|
|
74
|
+
### Fixed
|
|
75
|
+
|
|
76
|
+
- An interrupted approval (“需要审批” whose turn was stopped before any `approval/decided`) came back to the sidebar badge on every session reload and could not be dismissed: 已处理 cleared it, reopening the session put it straight back. DSH’s `approval/asked` payload carries no `turn`, so restart healing — which only expires a record from a turn that already ended — left every approval alone, and the history replay re-applied `phase: 'open'` on top of a record the user had already settled. An approval now records the turn its `tool/call` belonged to (live and during the rebuild), and a replayed ask never reopens a record that is already settled or expired.
|
|
77
|
+
- A pending record inherited from a previous host process is expired at boot, so a leftover in a session that is never reopened can no longer pin the badge across restarts: per-session healing only runs when that session is created again. A cordis re-activation inside a running host is not a boot and never clears a genuinely pending interaction.
|
|
78
|
+
|
|
79
|
+
## [0.1.1] - 2026-09-15
|
|
80
|
+
|
|
81
|
+
Notify when the **task** is done, not when a **turn** is done. The sidebar badge now counts only work that still waits on you.
|
|
82
|
+
|
|
83
|
+
### Added
|
|
84
|
+
|
|
85
|
+
- Quiet **已处理** action on pending rows, plus batch **标记已处理**. Host `POST /settle` ends pending state (idempotent, same-origin + auth). Distinct from `/ack`, which only means “seen”.
|
|
86
|
+
- Plugin config `completionGraceMs` (default `8000`). Set to `0` to restore “notify on every finished turn”.
|
|
87
|
+
|
|
88
|
+
### Changed
|
|
89
|
+
|
|
90
|
+
- Sidebar badge and aria-label count `phase: open` only. Finished work never inflates the number.
|
|
91
|
+
- History panel tabs are **待处理 / 历史**, matching the badge. Rows still dim once seen; read retention trims the history tab.
|
|
92
|
+
- Toast **×** marks every kind as read, including an open question (the composer still holds the answer).
|
|
93
|
+
- Tab flash fires for pending work, or for unread that arrived while the tab was hidden — never for a stale backlog.
|
|
94
|
+
- A notifiable `turn/end` is deferred: a `turn/start` or `tool/call` inside the grace window cancels it; an engaged goal holds it until `goal/activation-changed` reports the goal is gone.
|
|
95
|
+
|
|
96
|
+
### Fixed
|
|
97
|
+
|
|
98
|
+
- One unanswered `open` record no longer starves later toasts.
|
|
99
|
+
- Answering a question in the composer (or elsewhere) closes the live toast and marks it read.
|
|
100
|
+
- `/ack` is idempotent; a duplicate ack no longer skips the next one.
|
|
101
|
+
- Listeners are bounded so a stuck write cannot wedge DSH HTTP, session creation, or other plugins.
|
|
102
|
+
- Startup rebuild expires leftovers whose turn already ended; a live question in a turn that has not ended is left alone.
|
|
103
|
+
- A settle the host did not accept is reported as a failure, not as success.
|
|
104
|
+
|
|
105
|
+
## [0.1.0] - 2026-09-14
|
|
106
|
+
|
|
107
|
+
First public release. Verified against DeepSeek Harness `0.1.5-rc.1`.
|
|
108
|
+
|
|
109
|
+
### Added
|
|
110
|
+
|
|
111
|
+
- In-page toast for completed turns, failures, questions, approvals, plan reviews and job/workflow ends: title, body, session name, kind tone, close button, countdown bar.
|
|
112
|
+
- Answering questions and approvals straight from the toast, sharing the same pending interaction as the composer.
|
|
113
|
+
- Sidebar bell with unread/read history, paging, "mark all read", and batch delete behind a **Select…** trigger.
|
|
114
|
+
- Jump to the session **and the exact turn** (`data-chat-turn`), with a brief highlight.
|
|
115
|
+
- WebAudio notification sound: synthesised built-ins (chime / ping / alert / silent), uploadable custom sounds with validation, and a preview button that also unlocks the audio context. Plays while the page is hidden.
|
|
116
|
+
- Background tab attention indicator: 🔔 title prefix and an alternating favicon dot, stopping when the tab is looked at or nothing is unread.
|
|
117
|
+
- Settings section: read retention, toast position, opt-in subtask/background-job notifications, sound, self-test.
|
|
118
|
+
- Self-test card plus advanced checks (persisted history, navigation/unread, storage round-trip, deduplication).
|
|
119
|
+
- Profile-owned persistence with recovery on corrupt documents and an epoch/cursor protocol for clients.
|
|
120
|
+
|
|
121
|
+
### Changed
|
|
122
|
+
|
|
123
|
+
- Read state is immediate in the bell count while the row fades in place; it only moves to the read list when the list is reopened.
|
|
124
|
+
- The narrow-layout history panel is capped to its flex container instead of a `dvh` guess, so it no longer overflows the top on phones.
|
|
125
|
+
- The history panel is promoted to the browser top layer so a fixed mobile sidebar cannot cover it.
|
|
126
|
+
|
|
127
|
+
### Removed
|
|
128
|
+
|
|
129
|
+
- Browser system notifications (channel B), host OS notifications (channel C) and web push / service worker (channel D), along with the `web-push` and `ipaddr.js` dependencies. Those channels failed invisibly (submitted but never seen) and could not be made reliable across browsers and operating systems.
|
|
130
|
+
|
|
131
|
+
[0.2.1]: https://github.com/idoall/dsh-notify/releases/tag/v0.2.1
|
|
132
|
+
[0.2.0]: https://github.com/idoall/dsh-notify/releases/tag/v0.2.0
|
|
133
|
+
[0.1.2]: https://github.com/idoall/dsh-notify/releases/tag/v0.1.2
|
|
134
|
+
[0.1.1]: https://github.com/idoall/dsh-notify/releases/tag/v0.1.1
|
|
135
|
+
[0.1.0]: https://github.com/idoall/dsh-notify/releases/tag/v0.1.0
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DSH Notify contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
<h1 align="center">DSH Notify</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">In-page task notifications for DeepSeek Harness: a toast stack, a sound, and a flashing tab title. Live delivery only — nothing is stored.</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://github.com/idoall/dsh-notify/actions/workflows/ci.yml"><img src="https://github.com/idoall/dsh-notify/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
7
|
+
<a href="https://www.npmjs.com/package/@idoall/dsh-notify"><img src="https://img.shields.io/npm/v/@idoall/dsh-notify?label=npm&color=CB3837" alt="npm version"></a>
|
|
8
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-0F172A" alt="MIT"></a>
|
|
9
|
+
<img src="https://img.shields.io/badge/DSH-0.1.6--alpha.1-4B6BFB" alt="DSH 0.1.6-alpha.1">
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">English | <a href="README.zh.md">中文</a></p>
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="#what-it-does">What it does</a> ·
|
|
16
|
+
<a href="#quick-start">Quick start</a> ·
|
|
17
|
+
<a href="#usage">Usage</a> ·
|
|
18
|
+
<a href="#settings">Settings</a> ·
|
|
19
|
+
<a href="#compatibility">Compatibility</a> ·
|
|
20
|
+
<a href="#uninstall">Uninstall</a> ·
|
|
21
|
+
<a href="CHANGELOG.md">Changelog</a>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
> DSH Notify is a DeepSeek Harness community plugin. It registers exactly two seats — the settings section and the in-page overlay — and does not modify DSH source.
|
|
25
|
+
|
|
26
|
+
When a session **really stops**, fails, asks a question, or needs approval, a card appears in the top-right corner of the current page. Intermediate goal rounds and queued follow-up turns stay silent. Clicking a card jumps to the session (and the exact turn) that produced it — or the card stays put and says why it could not; questions and approvals are answered straight from the card. When you are done with a notification you close it, and it is gone — there is no history list behind it.
|
|
27
|
+
|
|
28
|
+
Everything happens **inside the page you already have open**. There is no service worker, no web push, no host-side OS notification, and no extra app to install: browser and operating-system notification matrices were removed on purpose, because they fail invisibly (submitted, never seen) and cannot be made reliable across platforms.
|
|
29
|
+
|
|
30
|
+
<p align="center">
|
|
31
|
+
<img src="./assets/toast.png" width="70%" alt="Notification cards in the top-right corner: arrival time, session name, title, body text and a close button">
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
## What it does
|
|
35
|
+
|
|
36
|
+
- **Toast on the page**: a stack in the top-right corner, newest on top. Each card carries the arrival time to the second (`00:33:08`, or `02-14 09:05` when it is not from today; the full date is in its tooltip), the session name, the title, the body, a tone colour per kind and a close button. Click the body to jump to the session; click the answers to reply without leaving the page, and the card reports the answer as loading until the host confirms (then ✓ 已完成 or ✗ with a 重试 button). Nothing expires on a clock: a card stays until you close it, open its session, or answer it — and a card whose record the Host has dropped leaves with it.
|
|
37
|
+
- **A window onto the queue, not a folded pile**: one through five cards (three on a narrow, touch viewport) are **all fully visible** — they never overlap, whether they arrived together or one by one. The **sixth** card is the first that sits below the fold, one scroll (or one swipe) away, with a sliver of the next card under the window edge. The count on the corner is the whole queue the page is holding (`+8`), not just what is out of sight; click or tap it to jump between the two ends. Nothing is thrown away while the page is open; a refresh clears it.
|
|
38
|
+
- **Answer in the toast**: a pending question or approval renders the same options as the composer. Answering here and answering in the composer act on the same pending interaction, so the two stay in sync.
|
|
39
|
+
- **Jump to the exact turn**: clicking a card opens its session (through the host's `uiWorkspace.openSession` on current DSH, with the older `sessions.open` still accepted) and scrolls to (and briefly highlights) the turn the notification came from. The card is dismissed only once that really happened, so a jump that could not happen is not silently swallowed: a session that is gone (deleted, archived, or not in this page's list) leaves the card in place reading 这个会话已经不在了,无法打开, a jump that merely failed says 没能打开这个会话,再点一次试试 and clicking again retries, and a self-test card — which has no session on purpose — just closes.
|
|
40
|
+
- **One card per ask**: a plan review or a question is one notification even when the host emits it twice — the live `tool/call` and the in-page question waterfall. The corner will not stack two 「计划待审」 cards for the same session.
|
|
41
|
+
- **Sound that survives being in the background**: synthesised in-page with WebAudio (no audio files shipped), plus uploadable custom sounds. It plays **even when the page is hidden** — that is the only way to reach you when the browser is behind another app.
|
|
42
|
+
- **Flashing tab title**: while the tab is in the background and a card arrived that you have not looked at, the title gets a 🔔 prefix and the favicon alternates to a red dot. It stops the moment you look at the tab.
|
|
43
|
+
- **Opt-in noise**: subtask, background-job and workflow completion notifications are **off by default** (they fire for every subagent, every job and every workflow run, which gets noisy fast).
|
|
44
|
+
- **Live only — there is no history**: the least surprising thing a notification can do is stop existing once you have dealt with it, so the plugin stores nothing. A page is told about what happens while it is open; nothing is kept to catch up on later, and a page that was not connected never learns about it. That is the trade for having no queue, no read state and no panel to reconcile.
|
|
45
|
+
|
|
46
|
+
<p align="center">
|
|
47
|
+
<img src="./assets/panel.png" width="46%" alt="Eight notifications in a window five cards tall: the count reads +8 and the sixth card shows its edge below the window">
|
|
48
|
+
</p>
|
|
49
|
+
|
|
50
|
+
## Quick start
|
|
51
|
+
|
|
52
|
+
Requirements:
|
|
53
|
+
|
|
54
|
+
- DeepSeek Harness with a Web profile
|
|
55
|
+
- Node.js 20 or newer
|
|
56
|
+
- Verified DSH version: `0.1.6-alpha.1` (plugin `0.2.2`)
|
|
57
|
+
|
|
58
|
+
Install from npm into your Web profile:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
dsh plugin --profile web add @idoall/dsh-notify@latest
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Install from GitHub:
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
dsh plugin --profile web add "github:idoall/dsh-notify"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
From a local clone (what this repository is developed against):
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
git clone https://github.com/idoall/dsh-notify.git
|
|
74
|
+
cd dsh-notify
|
|
75
|
+
npm install
|
|
76
|
+
dsh plugin --profile web add "link:$(pwd)"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Restart DSH and refresh the Web UI. The client half registers the settings card in `settings.section` and the toast in `shell.overlay`; the host half mounts through `cordis.patch.yml`.
|
|
80
|
+
|
|
81
|
+
> **Name note:** the unscoped npm name `dsh-notify` belongs to a **different** author (a Windows tray/toast plugin). This plugin is published as **`@idoall/dsh-notify`** — always install it with the scope, because a bare `dsh plugin add dsh-notify` would pull the other plugin.
|
|
82
|
+
>
|
|
83
|
+
> Only the published package name is scoped. The plugin's internal identity — cordis name, the `dsh-notify` mount id and the `/plugins/dsh-notify/*` routes — keeps its short spelling, so profile config and settings are unaffected.
|
|
84
|
+
|
|
85
|
+
## Usage
|
|
86
|
+
|
|
87
|
+
1. Run a task. When the task **stops**, fails, or asks something, a card appears in the top-right corner carrying the time it arrived.
|
|
88
|
+
2. Click the card to jump to its session and the exact turn it came from, click an answer button to answer in place, or click **×** to dismiss it. A card that cannot go anywhere says so and waits for you instead of vanishing.
|
|
89
|
+
3. Switch to another tab and keep working: while a card is waiting to be looked at, the title gets a 🔔 prefix and the favicon alternates to a red dot, and the sound plays even though the DSH page is in the background.
|
|
90
|
+
4. A refresh clears the corner. Nothing is stored — not here, not on the host — so what this page saw while it was open is all there is, and a page that was not open never learns about it at all.
|
|
91
|
+
|
|
92
|
+
## Settings
|
|
93
|
+
|
|
94
|
+
**Settings → Notifications**:
|
|
95
|
+
|
|
96
|
+
<p align="center">
|
|
97
|
+
<img src="./assets/settings.png" width="60%" alt="Notification settings: toast position, subtask notifications, the three self-test buttons and the sound card">
|
|
98
|
+
</p>
|
|
99
|
+
|
|
100
|
+
| Setting | Default | What it does |
|
|
101
|
+
| --- | --- | --- |
|
|
102
|
+
| Toast position | conversation column, top-right | Anchors the toast to the chat column's top-right. Opening or closing either sidebar (the session list or the right pane) moves the stack with the conversation edge, including through the grid-column animation. |
|
|
103
|
+
| Subtask / background job notifications | **off** | Each subagent, each background job and each workflow run would otherwise record an entry (titles often being raw commands). |
|
|
104
|
+
| In-page sound | **on** | WebAudio cue on every new toast, **including while the page is hidden**. Built-ins: chime, ping, alert, silent — plus custom uploads. |
|
|
105
|
+
| Self-test | — | There is one channel, so there is one test surface: **测试一条**, **测试 5 条** (exactly fills the corner window) and **测试 8 条** (three past it, which is where the count, the window edge and the scrolling show up). Tests never fire on page load. |
|
|
106
|
+
|
|
107
|
+
Custom sounds are uploaded to `<dataDir>/sounds/` in the profile data directory (not the plugin install directory), so reinstalling the plugin keeps them. Uploads are limited to 1 MB and to `mp3 / m4a / aac / wav / ogg / flac`; the file name must be a single path segment (no `../`, no subdirectories).
|
|
108
|
+
|
|
109
|
+
## Compatibility
|
|
110
|
+
|
|
111
|
+
Current release: plugin **`0.2.2`** is verified against DeepSeek Harness **`0.1.6-alpha.1`**.
|
|
112
|
+
|
|
113
|
+
| Plugin | Verified DeepSeek Harness |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| `0.2.2` | `0.1.6-alpha.1` |
|
|
116
|
+
| `0.2.1` | `0.1.6-alpha.1` |
|
|
117
|
+
| `0.2.0` | `0.1.6-alpha.1` |
|
|
118
|
+
| `0.1.2` | `0.1.6-alpha.1` |
|
|
119
|
+
| `0.1.1` | `0.1.5-rc.1` |
|
|
120
|
+
| `0.1.0` | `0.1.5-rc.1` |
|
|
121
|
+
|
|
122
|
+
Newer DSH releases are not auto-declared compatible. If a future DSH breaks the plugin, disable or uninstall it — do not patch DSH core.
|
|
123
|
+
|
|
124
|
+
Verified on macOS (Chrome and the DSH desktop shell) and remotely through a phone browser on the same Host. The layout adapts to narrow viewports: the corner holds three cards instead of five, the stack becomes full-width, and it is promoted to the browser top layer so a fixed mobile sidebar cannot cover it.
|
|
125
|
+
|
|
126
|
+
<p align="center">
|
|
127
|
+
<img src="./assets/mobile.png" width="34%" alt="Notification cards on a 390 px phone viewport: full width, drawn above the mobile sidebar">
|
|
128
|
+
</p>
|
|
129
|
+
|
|
130
|
+
## Uninstall
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
dsh plugin --profile web remove @idoall/dsh-notify
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Uninstalling deletes nothing that persists: the uploaded sounds and `settings.json` (sound, toast position, subtask noise) live in the data directory your profile patch owns (`config.dataDir`). Delete that directory to wipe them. Notification records never reach the disk, so there is no history to clean up.
|
|
137
|
+
|
|
138
|
+
## Development
|
|
139
|
+
|
|
140
|
+
```sh
|
|
141
|
+
npm install
|
|
142
|
+
npm run verify # typecheck + tests + build + package check
|
|
143
|
+
npm run test # node --test test/*.test.js
|
|
144
|
+
npm run build # dist/index.js, dist/client.js
|
|
145
|
+
npm run pack:check # publish preconditions + the exact client registration
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The repository keeps the host half (`src/index.js`, `src/core.js`, `src/buffer.js`, `src/sounds.js`, `src/sound-choices.js`), the client half (`src/client.js`), and a dependency-free test suite (`test/`). `dist/` is build output and is not committed.
|
|
149
|
+
|
|
150
|
+
### Releasing
|
|
151
|
+
|
|
152
|
+
Releases are tag-driven. Bump `version` in `package.json`, move the CHANGELOG entry out of `Unreleased`, write bilingual notes in `release-notes/v<version>.md`, then push the tag:
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
git tag v0.2.2
|
|
156
|
+
git push origin v0.2.2
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
`.github/workflows/release.yml` then gates the tag against `package.json`, runs `npm run verify`, packs the plugin, publishes to npm through GitHub Actions OIDC (no long-lived token, `repository.url` must match this repository, and an already-published version is skipped instead of failing), and creates the GitHub Release with the tarball and its sha256.
|
|
160
|
+
|
|
161
|
+
Publishing needs a **trusted publisher** on npmjs.com for `@idoall/dsh-notify` naming this repository and the exact workflow filename `release.yml`, with a direct `npm publish` allowed (connections created after 2026-09-03 default to staged publishing only).
|
|
162
|
+
|
|
163
|
+
## License
|
|
164
|
+
|
|
165
|
+
MIT. See [LICENSE](LICENSE).
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
<h1 align="center">DSH Notify</h1>
|
|
2
|
+
|
|
3
|
+
<p align="center">为 DeepSeek Harness 提供页内任务通知:右上角一叠浮层、提示音,以及后台标签页标题闪动。只做实时投递,不存任何历史。</p>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<a href="https://github.com/idoall/dsh-notify/actions/workflows/ci.yml"><img src="https://github.com/idoall/dsh-notify/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
7
|
+
<a href="https://www.npmjs.com/package/@idoall/dsh-notify"><img src="https://img.shields.io/npm/v/@idoall/dsh-notify?label=npm&color=CB3837" alt="npm 版本"></a>
|
|
8
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-0F172A" alt="MIT"></a>
|
|
9
|
+
<img src="https://img.shields.io/badge/DSH-0.1.6--alpha.1-4B6BFB" alt="DSH 0.1.6-alpha.1">
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center"><a href="README.md">English</a> | 中文</p>
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="#能做什么">能做什么</a> ·
|
|
16
|
+
<a href="#快速开始">快速开始</a> ·
|
|
17
|
+
<a href="#使用">使用</a> ·
|
|
18
|
+
<a href="#设置">设置</a> ·
|
|
19
|
+
<a href="#兼容性">兼容性</a> ·
|
|
20
|
+
<a href="#卸载">卸载</a> ·
|
|
21
|
+
<a href="CHANGELOG.md">更新记录</a>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
> DSH Notify 是 DeepSeek Harness 社区插件,只注册两个座位——设置区块与页内浮层——不修改 DSH 源码。
|
|
25
|
+
|
|
26
|
+
会话**真正停下**、运行失败、向你提问或请求审批时,当前页面右上角弹出一张卡片。goal 自动续跑、排队的下一轮不会每轮弹一次。点卡片跳回产生该通知的会话(并定位到那一轮)——跳不过去时卡片会留在原地说明原因;提问与审批还能**直接在卡片上回答**。处理完关掉,它就没了——背后没有历史列表。
|
|
27
|
+
|
|
28
|
+
一切都发生在**你已经打开的这个页面里**。没有 Service Worker、没有 Web Push、不做宿主机系统通知、也不需要安装任何 App——浏览器与操作系统通知矩阵是被**故意删掉**的:它们失败时对用户不可见(提交成功却永远看不到横幅),且无法跨平台做可靠。
|
|
29
|
+
|
|
30
|
+
<p align="center">
|
|
31
|
+
<img src="./assets/toast.png" width="70%" alt="右上角通知卡片:到达时刻、会话名、标题、正文与关闭按钮">
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
## 能做什么
|
|
35
|
+
|
|
36
|
+
- **页内浮层**:右上角一叠卡片,新消息在最上方。每张卡的最前面是**到达时刻**(精确到秒,如 `00:33:08`;不是今天的会显示 `02-14 09:05`,完整日期在悬浮提示里),后面跟着会话名、标题、正文、按类型着色的状态色和关闭按钮。点正文跳到该会话,点选项就地回答,回答期间卡片显示 loading,宿主确认后就地变成 ✓ 已完成或 ✗ 加「重试」。**没有任何东西按时间自动消失**:卡片会一直留着,直到你点 × 关闭、点正文跳会话、或在卡上回答成功;如果宿主那边这条记录已被清空/删除,卡片也会跟着退场。
|
|
37
|
+
- **一扇窗,不是叠压**:桌面 **1~5 条全部完整展开**(窄屏/触屏是 1~3 条),不会折叠、不会重叠——一次来 5 条和从 1 条加到 5 条一样。**第 6 条**起才排到窗下面,滚动或手指滑动就能看到,窗沿会露出下一张的边。角上的计数是**本页全部**条数(8 条就是「+8」),不是藏起来的那些;点它可以在队列两端之间跳转。页面开着期间一条都不丢,刷新即清空。
|
|
38
|
+
- **在浮层里回答**:待回复的提问/审批会渲染与输入框一致的选项。在这里回答和在输入框里回答操作的是**同一个**待处理交互,两边实时同步。
|
|
39
|
+
- **精确跳到那一轮**:点一张卡片会打开对应会话(当前 DSH 走宿主的 `uiWorkspace.openSession`,旧的 `sessions.open` 仍可用),并滚动到(短暂高亮)产生该通知的那一轮。**只有真的跳过去了卡片才会消失**,所以跳不过去不会被悄悄吞掉:会话已经不在了(被删、被归档、或不在本页列表里)会在卡片上写「这个会话已经不在了,无法打开」;只是这次失败会写「没能打开这个会话,再点一次试试」,再点一次就是重试;自测卡本来就没有会话,点了就安静关闭。
|
|
40
|
+
- **一次提问只弹一张**:计划待审或提问在宿主里会同时走 live `tool/call` 和页内提问瀑布流,插件会合到同一张卡上,不会同一会话叠两张「计划待审」。
|
|
41
|
+
- **后台也能听见的提示音**:用 WebAudio 在页面内合成(不带任何音频文件),也支持上传自定义音。**页面隐藏时照样响**——浏览器被别的应用挡住时,这是唯一能提醒到你的方式。
|
|
42
|
+
- **标签标题闪动**:标签在后台、且有你还没看过的新卡片时,标题加 🔔 前缀、favicon 交替成红点;你一切回标签就停。
|
|
43
|
+
- **噪声默认关**:子任务、后台任务与工作流完成通知**默认关闭**(每个子代理、每个后台任务、每次工作流运行都会弹一条,开久了很乱)。
|
|
44
|
+
- **只有实时,没有历史**:通知最不让人意外的行为是「你处理完它就不存在了」,所以插件什么都不存。页面开着时发生的事才会告诉它;不会留一份给你事后翻,页面不在线时发生的事它也不会知道——这就是换来「没有队列、没有已读状态、没有面板要对账」的代价。
|
|
45
|
+
|
|
46
|
+
<p align="center">
|
|
47
|
+
<img src="./assets/panel.png" width="46%" alt="八条通知装在一扇五张卡高的窗里:角上计数显示 +8,窗沿露出第六张的边">
|
|
48
|
+
</p>
|
|
49
|
+
|
|
50
|
+
## 快速开始
|
|
51
|
+
|
|
52
|
+
环境要求:
|
|
53
|
+
|
|
54
|
+
- 带 Web profile 的 DeepSeek Harness
|
|
55
|
+
- Node.js 20 或更新
|
|
56
|
+
- 已验证的 DSH 版本:`0.1.6-alpha.1`(插件 `0.2.2`)
|
|
57
|
+
|
|
58
|
+
从 npm 装进 Web profile:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
dsh plugin --profile web add @idoall/dsh-notify@latest
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
从 GitHub 安装:
|
|
65
|
+
|
|
66
|
+
```sh
|
|
67
|
+
dsh plugin --profile web add "github:idoall/dsh-notify"
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
从本地克隆安装(本仓库的开发方式):
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
git clone https://github.com/idoall/dsh-notify.git
|
|
74
|
+
cd dsh-notify
|
|
75
|
+
npm install
|
|
76
|
+
dsh plugin --profile web add "link:$(pwd)"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
重启 DSH,刷新 Web UI。客户端半边把设置卡片挂到 `settings.section`、浮层挂到 `shell.overlay`;宿主半边通过 `cordis.patch.yml` 挂载。
|
|
80
|
+
|
|
81
|
+
> **命名提醒**:无 scope 的 npm 名 `dsh-notify` 属于**另一位作者**(一个 Windows 托盘通知插件)。本插件发布为 **`@idoall/dsh-notify`**——请务必带 scope 安装,因为裸的 `dsh plugin add dsh-notify` 会装成别人的插件。
|
|
82
|
+
>
|
|
83
|
+
> 只有「发布用的包名」带 scope。插件的内部身份——cordis 名、`dsh-notify` 挂载 id、`/plugins/dsh-notify/*` 路由——都保持原来的短名,profile 配置与设置项不受影响。
|
|
84
|
+
|
|
85
|
+
## 使用
|
|
86
|
+
|
|
87
|
+
1. 跑一个任务。任务**真正停下**、失败或向你提问时,右上角出现一张卡片,带上是几点到的。
|
|
88
|
+
2. 点卡片跳到它的会话与那一轮;点选项就地回答;点 **×** 关掉。**跳不过去的卡片会说明原因并留在原地**,等你关掉它。
|
|
89
|
+
3. 切到别的标签继续干活:有卡片还没被你看过时,标题会加 🔔、favicon 变红点,提示音也会响——即使 DSH 页面在后台。
|
|
90
|
+
4. **刷新即清空**。什么都不存——本页不存、宿主也不存——所以这个页面开着期间看到的就是全部;页面没打开时发生的事,它永远不会知道。
|
|
91
|
+
|
|
92
|
+
## 设置
|
|
93
|
+
|
|
94
|
+
**设置 → 通知**:
|
|
95
|
+
|
|
96
|
+
<p align="center">
|
|
97
|
+
<img src="./assets/settings.png" width="60%" alt="通知设置:Toast 位置、子任务通知、三个自测按钮与提示音卡片">
|
|
98
|
+
</p>
|
|
99
|
+
|
|
100
|
+
| 设置项 | 默认 | 作用 |
|
|
101
|
+
| --- | --- | --- |
|
|
102
|
+
| Toast 位置 | 会话区右上 | 浮层贴在聊天区右上角。左侧会话栏或右侧栏展开、收起时都会跟着会话列走,包括 grid 分栏动画过程中。 |
|
|
103
|
+
| 子任务 / 后台任务完成时通知 | **关** | 否则每个子代理、每个后台任务、每次工作流运行都会记一条(标题常常是命令行原文)。 |
|
|
104
|
+
| 页内提示音 | **开** | 每条新通知响一次,**窗口不在最前也响**。内置 chime / ping / alert / 静音,另可上传自定义音。 |
|
|
105
|
+
| 自测 | — | 只有一条通道,所以只有页面浮层这一项:**测试一条**、**测试 5 条**(正好填满角上那一窗)、**测试 8 条**(多出 3 条,看角上「+8」的计数、窗沿和向下滚动)。页面加载**不会**自动发送测试。 |
|
|
106
|
+
|
|
107
|
+
自定义提示音上传到 profile 数据目录下的 `<dataDir>/sounds/`(**不是**插件安装目录),所以重装插件不会丢。上传上限 1 MB,仅支持 `mp3 / m4a / aac / wav / ogg / flac`;文件名必须是单段(不允许 `../` 或子目录)。
|
|
108
|
+
|
|
109
|
+
## 兼容性
|
|
110
|
+
|
|
111
|
+
当前发布:插件 **`0.2.2`** 已在 DeepSeek Harness **`0.1.6-alpha.1`** 上验证。
|
|
112
|
+
|
|
113
|
+
| 插件 | 已验证的 DeepSeek Harness |
|
|
114
|
+
| --- | --- |
|
|
115
|
+
| `0.2.2` | `0.1.6-alpha.1` |
|
|
116
|
+
| `0.2.1` | `0.1.6-alpha.1` |
|
|
117
|
+
| `0.2.0` | `0.1.6-alpha.1` |
|
|
118
|
+
| `0.1.2` | `0.1.6-alpha.1` |
|
|
119
|
+
| `0.1.1` | `0.1.5-rc.1` |
|
|
120
|
+
| `0.1.0` | `0.1.5-rc.1` |
|
|
121
|
+
|
|
122
|
+
更新的 DSH 版本不会自动声明兼容。若将来 DSH 变更导致插件失效,请停用或卸载它——不要去改 DSH 核心。
|
|
123
|
+
|
|
124
|
+
已在 macOS(Chrome 与 DSH 桌面壳)以及同一 Host 下的手机浏览器远程访问中验证。窄屏会自适应:角上从五张变**三张**、浮层变成全宽,并被提升到浏览器顶层。
|
|
125
|
+
|
|
126
|
+
<p align="center">
|
|
127
|
+
<img src="./assets/mobile.png" width="34%" alt="390px 手机视口下的通知卡片:全宽,浮在移动端侧栏之上">
|
|
128
|
+
</p>
|
|
129
|
+
|
|
130
|
+
## 卸载
|
|
131
|
+
|
|
132
|
+
```sh
|
|
133
|
+
dsh plugin --profile web remove @idoall/dsh-notify
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
卸载**不会**删除任何会留下来的东西:已上传的提示音与 `settings.json`(提示音、Toast 位置、子任务开关)在你自己 profile patch 指定的数据目录(`config.dataDir`)里,要清空就删掉那个目录。通知记录从不落盘,所以没有历史要清。
|
|
137
|
+
|
|
138
|
+
## 开发
|
|
139
|
+
|
|
140
|
+
```sh
|
|
141
|
+
npm install
|
|
142
|
+
npm run verify # typecheck + 测试 + 构建 + 打包检查
|
|
143
|
+
npm run test # node --test test/*.test.js
|
|
144
|
+
npm run build # dist/index.js、dist/client.js
|
|
145
|
+
npm run pack:check # 发布前置条件 + 客户端注册 id 校验
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
仓库包含宿主半边(`src/index.js`、`src/core.js`、`src/buffer.js`、`src/sounds.js`、`src/sound-choices.js`)、客户端半边(`src/client.js`)以及一套零依赖测试(`test/`)。`dist/` 是构建产物,不入库。
|
|
149
|
+
|
|
150
|
+
### 发版
|
|
151
|
+
|
|
152
|
+
发版由 tag 驱动。改 `package.json` 的 `version`、把 CHANGELOG 里 `Unreleased` 段落成正式版本、在 `release-notes/v<版本>.md` 写好双语说明,然后推 tag:
|
|
153
|
+
|
|
154
|
+
```sh
|
|
155
|
+
git tag v0.2.2
|
|
156
|
+
git push origin v0.2.2
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
`.github/workflows/release.yml` 会先校验 tag 与 `package.json` 版本一致,再跑 `npm run verify`、打包,通过 GitHub Actions OIDC 发布到 npm(不需要长期令牌;`repository.url` 必须与本仓库一致;版本已存在时跳过而不是报错),最后创建带 `.tgz` 与 sha256 的 GitHub Release。
|
|
160
|
+
|
|
161
|
+
发布前需要在 npmjs.com 给 `@idoall/dsh-notify` 配置 **trusted publisher**:填本仓库、workflow 文件名必须正好是 `release.yml`,并且要勾选允许直接 `npm publish`(2026-09-03 之后新建的连接默认只允许暂存发布)。
|
|
162
|
+
|
|
163
|
+
## 许可证
|
|
164
|
+
|
|
165
|
+
MIT,见 [LICENSE](LICENSE)。
|
|
Binary file
|
package/assets/panel.png
ADDED
|
Binary file
|
|
Binary file
|
package/assets/toast.png
ADDED
|
Binary file
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Bundle mount. Persistence stays disabled until the profile owner supplies an
|
|
2
|
+
# absolute config.dataDir in its own patch; the plugin never guesses a profile.
|
|
3
|
+
#
|
|
4
|
+
# `name` is the Node-resolvable package name and must stay in sync with
|
|
5
|
+
# package.json; it is quoted because `@` cannot open a plain YAML scalar.
|
|
6
|
+
# `id` is the local mount id, so profile config keys keep the short
|
|
7
|
+
# `dsh-notify` spelling independent of the published name.
|
|
8
|
+
- insert:
|
|
9
|
+
- id: dsh-notify
|
|
10
|
+
name: '@idoall/dsh-notify'
|