@idoall/dsh-notify 0.5.1 → 0.5.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 +12 -0
- package/README.md +7 -6
- package/README.zh.md +7 -6
- package/dist/client.js +11 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
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
4
|
|
|
5
|
+
## [0.5.2] - 2026-11-24
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
|
|
9
|
+
- **Handling a notification now clears the tab marker too.** The 🔔 title prefix and the red favicon dot only stopped when the page became visible, so a notification closed (or cleared, or answered, or jumped to) from a window the browser still reports as hidden — an occluded window, a second display, a desktop shell — left the tab flashing about work that was already done. A retiring card is now dropped from the unread set at the click, the slide-out timer also drops it, and the marker is recomputed against the cards still on screen, so no removal path can leave a stale count behind.
|
|
10
|
+
- **The indicator no longer reverts a title or favicon the host changed while it flashed.** Stopping used to restore the exact title captured when it started, which silently undid a session rename made in the meantime; it now restores only what it painted itself.
|
|
11
|
+
- **The indicator resolves `document` when it needs it** instead of capturing it at module load. A Client bundle evaluated before the page installs its document (and every test realm that swaps the global afterwards) used to get an indicator that silently did nothing.
|
|
12
|
+
|
|
13
|
+
### Verified
|
|
14
|
+
|
|
15
|
+
- Static checks, **125 automated tests**, build and package checks pass, and the packed tarball matches this checkout byte for byte. New coverage: a background toast marks the tab, closing it clears the marker while the page still counts as hidden; a host title/favicon change survives the marker; and a document installed after module evaluation is picked up.
|
|
16
|
+
|
|
5
17
|
## [0.5.1] - 2026-11-24
|
|
6
18
|
|
|
7
19
|
### Fixed
|
package/README.md
CHANGED
|
@@ -92,7 +92,7 @@ Reload the profile or restart DSH only when its plugin host has not hot-reloaded
|
|
|
92
92
|
|
|
93
93
|
Custom sounds are stored in `<dataDir>/sounds/` in the profile data directory, not the plugin installation. Uploads are limited to 1 MB and `mp3 / m4a / aac / wav / ogg / flac`; names must be a single path segment.
|
|
94
94
|
|
|
95
|
-
Above the cards, the page shows the running version against the newest one on npm: `v0.5.
|
|
95
|
+
Above the cards, the page shows the running version against the newest one on npm: `v0.5.2 ✓ 最新`, `v0.5.1 ➔ v0.5.2`, or `v0.5.2 · 检查失败`. **检查更新** forces a fresh lookup (`GET /plugins/dsh-notify/update?force=1`, authenticated); a page load reuses the host's six-hour cache. When a newer version exists the row reveals `dsh plugin --profile web add @idoall/dsh-notify@<version>` with a copy button — installing it, and restarting DSH afterwards, stays your decision.
|
|
96
96
|
|
|
97
97
|
<p align="center">
|
|
98
98
|
<img src="./assets/version-check.png" width="60%" alt="DSH notification settings with the version row: v0.4.0 newest, Check for updates, GitHub, Changelog and Issues links">
|
|
@@ -100,11 +100,12 @@ Above the cards, the page shows the running version against the newest one on np
|
|
|
100
100
|
|
|
101
101
|
## Compatibility
|
|
102
102
|
|
|
103
|
-
Current release: plugin **`0.5.
|
|
103
|
+
Current release: plugin **`0.5.2`** is verified against DeepSeek Harness **`0.2.3-alpha.2`**.
|
|
104
104
|
|
|
105
105
|
| Plugin | Verified DeepSeek Harness | What that version is |
|
|
106
106
|
| --- | --- | --- |
|
|
107
|
-
| **`0.5.
|
|
107
|
+
| **`0.5.2`** | `0.2.3-alpha.2` | Fixes the tab marker outliving the notification: closing, clearing, answering or jumping from a card now drops it from the unread set at the click, and the marker is recomputed from the cards still on screen. Stopping also stops reverting a session title the host renamed meanwhile. |
|
|
108
|
+
| `0.5.1` | `0.2.3-alpha.2` | Fixes the window covering the session toolbar: its vertical start is now measured from the conversation body (8px below it, 56px floor) instead of a hardcoded 56px offset, and follows resizes and zoom. The screen-corner placement keeps its own variable. |
|
|
108
109
|
| `0.5.0` | `0.2.3-alpha.2` | Puts the notification window in the conversation's **top-left** corner by default — the settings page keeps the top-right corner, the screen corner and off as alternatives. Adds the left-edge anchor and re-anchors it through the same sidebar-following observer. Notification content, sounds and triggers are unchanged. |
|
|
109
110
|
| `0.4.17` | `0.2.3-alpha.2` | **Fixes two breaks on the current host.** DSH moved HTTP admission into the WebServer and removed `Connection.requestRejection` — routes now declare `auth: 'required'` and call the method only when it still exists — and moved the Session status snapshot behind a `uiSession.sessionStatus` service that throws unless injected, so the toast reads the injection-free `uiSession.pendingInteractions` source instead. `0.4.16` failed every plugin endpoint and lost in-toast answering on this host. |
|
|
110
111
|
| `0.4.16` | `0.2.2-rc.5` | Declares DSH `0.2.2-rc.5` compatible — the first RC on npm `latest`. The one break since `rc.4` is a search-provider default this plugin never touches. Of the 15 packages it binds, the six that own its interfaces are byte-identical apart from their own versions; the only other changes are the same search work and release metadata (one source-location character, the displayed host version, the reported commit). No notification source changes. |
|
|
@@ -138,7 +139,7 @@ Current release: plugin **`0.5.1`** is verified against DeepSeek Harness **`0.2.
|
|
|
138
139
|
- Two declarations decide whether the plugin loads at all: `dsh.engines.dsh` and every `@deepseek-ai/dsh-*` peer state the same requirement, `>=0.1.7-rc.1 <0.3.0` as of `0.4.1`. DSH refuses an incompatible bundle at profile load, so a range that excluded the running release would silently drop the plugin — which is exactly what the old `<0.2.0` ceiling would have done on the `0.2.0` release.
|
|
139
140
|
- **An interactive gate only withholds a completion while it is unanswered.** DSH resolves an execution approval and a plan review *inside* the turn that asked them (`approval.request()` awaits its outcome under an open turn; `exit_plan_mode` returns its verdict to the same turn), so the turn that resumes is the turn that asked, and its end is the user's task finishing. `0.4.2` makes that the rule; `0.3.2`–`0.4.1` suppressed the whole turn, which silently dropped the completion of every approval-gated task.
|
|
140
141
|
- `@deepseek-ai/schemastery` is a **peer**, not a plain dependency: DSH resolves only a linked plugin's peer dependencies from the running installation, so a `link:` install of this directory would otherwise fail to import the Host half.
|
|
141
|
-
- **Verified releases are listed, not just matched.** `dsh.compatibility.dshReleases` names every release this plugin was actually booted on (`0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-alpha.1`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.2`, `0.2.1-rc.3`, `0.2.1-rc.4`, `0.2.2-alpha.2`, `0.2.2-alpha.3`, `0.2.2-rc.1`, `0.2.2-rc.3`, `0.2.2-rc.4`, `0.2.2-rc.5`, `0.2.3-alpha.2` as of `0.5.
|
|
142
|
+
- **Verified releases are listed, not just matched.** `dsh.compatibility.dshReleases` names every release this plugin was actually booted on (`0.1.7-rc.1`, `0.1.7-rc.2`, `0.2.0-rc.1`, `0.2.0-rc.2`, `0.2.1-alpha.1`, `0.2.1-alpha.3`, `0.2.1-alpha.4`, `0.2.1-alpha.5`, `0.2.1-rc.2`, `0.2.1-rc.3`, `0.2.1-rc.4`, `0.2.2-alpha.2`, `0.2.2-alpha.3`, `0.2.2-rc.1`, `0.2.2-rc.3`, `0.2.2-rc.4`, `0.2.2-rc.5`, `0.2.3-alpha.2` as of `0.5.2`) and `npm run pack:check` fails when one of them falls outside the declared range. Each entry means a real boot, not a semver guess.
|
|
142
143
|
|
|
143
144
|
The screenshots below come from earlier browser verification, not a new RC visual test. This check covers interface compatibility, automated tests and live overlay registration, not a fresh visual or audio test. The layout was checked at a 390px mobile viewport: the settings controls reflow and the toast becomes full-width without falling behind the mobile sidebar.
|
|
144
145
|
|
|
@@ -171,8 +172,8 @@ npm run pack:check # publish preconditions + client registration check
|
|
|
171
172
|
Releases are tag-driven. Bump `package.json` and the lockfile root versions, synchronize both READMEs and the DSH declarations, move the matching CHANGELOG section out of `Unreleased`, write `release-notes/v<version>.md`, then push the release commit and tag:
|
|
172
173
|
|
|
173
174
|
```sh
|
|
174
|
-
git tag v0.5.
|
|
175
|
-
git push origin v0.5.
|
|
175
|
+
git tag v0.5.2
|
|
176
|
+
git push origin v0.5.2
|
|
176
177
|
```
|
|
177
178
|
|
|
178
179
|
The release workflow runs `npm run verify`, packs the plugin, publishes through npm trusted publishing (OIDC), and creates a GitHub Release with the package tarball and sha256.
|
package/README.zh.md
CHANGED
|
@@ -92,7 +92,7 @@ dsh plugin --profile web add "link:$(pwd)"
|
|
|
92
92
|
|
|
93
93
|
自定义提示音保存在 profile 数据目录的 `<dataDir>/sounds/`,而非插件安装目录。上传限制 1 MB,支持 `mp3 / m4a / aac / wav / ogg / flac`,文件名必须是单段路径。
|
|
94
94
|
|
|
95
|
-
卡片上方是版本检测行:显示当前版本与 npm 上最新版本的关系——`v0.5.
|
|
95
|
+
卡片上方是版本检测行:显示当前版本与 npm 上最新版本的关系——`v0.5.2 ✓ 最新`、`v0.5.1 ➔ v0.5.2` 或 `v0.5.2 · 检查失败`。**检查更新**会强制重新查询(`GET /plugins/dsh-notify/update?force=1`,需通过鉴权);页面加载则复用宿主 6 小时缓存。检测到新版本时,行下方会展开 `dsh plugin --profile web add @idoall/dsh-notify@<版本>` 与复制按钮——是否安装、以及随后是否重启 DSH,都由你决定。
|
|
96
96
|
|
|
97
97
|
<p align="center">
|
|
98
98
|
<img src="./assets/version-check.png" width="60%" alt="DSH 通知设置中的版本检测行:v0.4.0 已是最新、检查更新、GitHub、更新日志与反馈 Issue 入口">
|
|
@@ -100,11 +100,12 @@ dsh plugin --profile web add "link:$(pwd)"
|
|
|
100
100
|
|
|
101
101
|
## 兼容性
|
|
102
102
|
|
|
103
|
-
当前发布:插件 **`0.5.
|
|
103
|
+
当前发布:插件 **`0.5.2`** 已在 DeepSeek Harness **`0.2.3-alpha.2`** 上验证。
|
|
104
104
|
|
|
105
105
|
| 插件 | 已验证的 DeepSeek Harness | 这一版是什么 |
|
|
106
106
|
| --- | --- | --- |
|
|
107
|
-
| **`0.5.
|
|
107
|
+
| **`0.5.2`** | `0.2.3-alpha.2` | 修复「通知已处理、标签页提示还在」:关闭/全部清除/回答/跳转卡片时立刻把它从未读集合里移除,并按仍在屏上的卡片重算提示;同时不再把宿主期间改过的会话标题回滚。 |
|
|
108
|
+
| `0.5.1` | `0.2.3-alpha.2` | 修复浮层盖住会话工具栏的问题:起点改为量取会话正文上沿(再下移 8px,56px 为下限),不再是写死的 56px 偏移,并随窗口尺寸与缩放跟随。屏幕右上仍用自己的变量定位。 |
|
|
108
109
|
| `0.5.0` | `0.2.3-alpha.2` | 通知浮层默认改到会话区**左上角**——设置页保留「会话区右上」「屏幕右上」「关闭页面通知」作为备选。新增左边缘锚点,并复用同一套跟随侧栏的观察器实时重定位。通知内容、提示音与触发时机均未变。 |
|
|
109
110
|
| `0.4.17` | `0.2.3-alpha.2` | **修复当前宿主上的两处断裂。** DSH 把 HTTP admission 移进 WebServer 并删除了 `Connection.requestRejection`——路由改为声明 `auth: 'required'`,仅在该方法仍存在时才调用;同时把 Session 状态快照移到需要注入的 `uiSession.sessionStatus` 服务,浮层改用无需注入的 `uiSession.pendingInteractions`。在本宿主上 `0.4.16` 的所有插件端点失败,卡片内回答也失效。 |
|
|
110
111
|
| `0.4.16` | `0.2.2-rc.5` | 声明兼容 DSH `0.2.2-rc.5`——第一个进入 npm `latest` 渠道的 RC。`rc.4` 以来唯一的破坏性变更是搜索提供方默认值,与本插件无关。它绑定的 15 个包里,决定接口的六个除自身版本号外逐字节相同;其余改动也只有同一次搜索调整与发布元数据(一个源码位置字符、界面显示的宿主版本号、上报的提交号)。通知源码无改动。 |
|
|
@@ -138,7 +139,7 @@ dsh plugin --profile web add "link:$(pwd)"
|
|
|
138
139
|
- 两处声明决定插件能否加载:`dsh.engines.dsh` 与每一个 `@deepseek-ai/dsh-*` peer 都写同一条要求,自 `0.4.1` 起为 `>=0.1.7-rc.1 <0.3.0`。DSH 会在 profile 加载时拒绝不兼容的 bundle,范围写错就会静默丢掉插件——旧的 `<0.2.0` 上限在 `0.2.0` 正式版上正是如此。
|
|
139
140
|
- **交互门禁只在「还没等到人回答」时压住完成通知。** DSH 的执行审批与计划审批都是在**提问的那个回合内**解决的(`approval.request()` 必须处于打开的回合中并原地等待结果;`exit_plan_mode` 把结论交回同一回合),所以接着干活的回合就是提问的那个回合,它的结束就是用户任务的完成。`0.4.2` 以此为规则;`0.3.2`–`0.4.1` 压掉了整个回合,于是每个带审批的任务都静默丢失完成通知。
|
|
140
141
|
- `@deepseek-ai/schemastery` 是 **peer**,不是普通依赖:DSH 只会把 **link 形态**插件的 peer 解析到当前安装;若仍写成普通依赖,`link:` 安装的 Host 半会导入失败。
|
|
141
|
-
- **声明的是「实测验证过的版本」,不是语义化猜测。** `dsh.compatibility.dshReleases` 列出真正启动验证过的每个版本(截至 `0.5.
|
|
142
|
+
- **声明的是「实测验证过的版本」,不是语义化猜测。** `dsh.compatibility.dshReleases` 列出真正启动验证过的每个版本(截至 `0.5.2`:`0.1.7-rc.1`、`0.1.7-rc.2`、`0.2.0-rc.1`、`0.2.0-rc.2`、`0.2.1-alpha.1`、`0.2.1-alpha.3`、`0.2.1-alpha.4`、`0.2.1-alpha.5`、`0.2.1-rc.2`、`0.2.1-rc.3`、`0.2.1-rc.4`、`0.2.2-alpha.2`、`0.2.2-alpha.3`、`0.2.2-rc.1`、`0.2.2-rc.3`、`0.2.2-rc.4`、`0.2.2-rc.5`、`0.2.3-alpha.2`),一旦其中某个落在声明范围之外,`npm run pack:check` 会直接失败。
|
|
142
143
|
|
|
143
144
|
以下截图来自此前的浏览器验证,并非本次 RC 的新视觉测试;本次验证覆盖接口兼容性、自动化测试与实时浮层注册,不包含新的视觉或声音实测。此前在 390px 手机视口检查:设置控件会重排,Toast 会满宽显示且不会被移动端侧栏遮挡。
|
|
144
145
|
|
|
@@ -171,8 +172,8 @@ npm run pack:check # 发布前置条件 + 客户端注册校验
|
|
|
171
172
|
发版由 tag 驱动。更新 `package.json` 与锁文件根版本、同步中英文 README 和 DSH 声明、将对应 CHANGELOG 段落移出 `Unreleased`、编写 `release-notes/v<版本>.md` 后,推送发版提交与 tag:
|
|
172
173
|
|
|
173
174
|
```sh
|
|
174
|
-
git tag v0.5.
|
|
175
|
-
git push origin v0.5.
|
|
175
|
+
git tag v0.5.2
|
|
176
|
+
git push origin v0.5.2
|
|
176
177
|
```
|
|
177
178
|
|
|
178
179
|
发版工作流会运行 `npm run verify`、打包插件、通过 npm trusted publishing(OIDC)发布,并创建附带 tarball 与 sha256 的 GitHub Release。
|
package/dist/client.js
CHANGED
|
@@ -693,9 +693,11 @@ window.__ModuleLoader__.load({
|
|
|
693
693
|
}
|
|
694
694
|
var soundPlayer = createSoundPlayer();
|
|
695
695
|
var ATTENTION_DOT = `data:image/svg+xml,${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><circle cx="8" cy="8" r="7" fill="#e5484d"/></svg>')}`;
|
|
696
|
-
function createAttentionIndicator({ document:
|
|
696
|
+
function createAttentionIndicator({ document: docSource = globalThis.document, timers = {}, intervalMs = 900, reducedMotion = globalThis.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches === true } = {}) {
|
|
697
697
|
const setTimer = timers.setInterval ?? globalThis.setInterval;
|
|
698
698
|
const clearTimer = timers.clearInterval ?? globalThis.clearInterval;
|
|
699
|
+
let doc = typeof docSource === "function" ? void 0 : docSource;
|
|
700
|
+
const target = () => doc = typeof docSource === "function" ? docSource() : docSource;
|
|
699
701
|
let timer = null;
|
|
700
702
|
let active = false;
|
|
701
703
|
let baseTitle = null;
|
|
@@ -715,8 +717,8 @@ window.__ModuleLoader__.load({
|
|
|
715
717
|
if (!active) return;
|
|
716
718
|
active = false;
|
|
717
719
|
phase = false;
|
|
718
|
-
if (doc && baseTitle !== null) doc.title = baseTitle;
|
|
719
|
-
if (iconNode && baseIcon !== null) iconNode.href = baseIcon;
|
|
720
|
+
if (doc && baseTitle !== null && (doc.title === baseTitle || doc.title === `\u{1F514} ${baseTitle}`)) doc.title = baseTitle;
|
|
721
|
+
if (iconNode && baseIcon !== null && iconNode.href === ATTENTION_DOT) iconNode.href = baseIcon;
|
|
720
722
|
if (iconNode && baseIcon === null) {
|
|
721
723
|
try {
|
|
722
724
|
iconNode.remove();
|
|
@@ -739,6 +741,7 @@ window.__ModuleLoader__.load({
|
|
|
739
741
|
stop();
|
|
740
742
|
return;
|
|
741
743
|
}
|
|
744
|
+
doc = target();
|
|
742
745
|
if (!doc) return;
|
|
743
746
|
baseTitle = doc.title ?? "";
|
|
744
747
|
iconNode = doc.querySelector?.('link[rel~="icon"]') ?? null;
|
|
@@ -755,7 +758,7 @@ window.__ModuleLoader__.load({
|
|
|
755
758
|
stop
|
|
756
759
|
};
|
|
757
760
|
}
|
|
758
|
-
var attentionIndicator = createAttentionIndicator();
|
|
761
|
+
var attentionIndicator = createAttentionIndicator({ document: () => globalThis.document });
|
|
759
762
|
function setToastConfig(config = {}) {
|
|
760
763
|
toastConfig = { ...toastConfig, ...config };
|
|
761
764
|
globalThis.dispatchEvent?.(new Event("dsh-notify:toast-config"));
|
|
@@ -840,6 +843,7 @@ window.__ModuleLoader__.load({
|
|
|
840
843
|
};
|
|
841
844
|
const forget = (eventId) => {
|
|
842
845
|
heights.current.delete(eventId);
|
|
846
|
+
unseen.current.delete(eventId);
|
|
843
847
|
};
|
|
844
848
|
const retire = (eventId) => {
|
|
845
849
|
const previous = exits.current.get(eventId);
|
|
@@ -856,6 +860,7 @@ window.__ModuleLoader__.load({
|
|
|
856
860
|
clearTimeout(success);
|
|
857
861
|
successes.current.delete(eventId);
|
|
858
862
|
}
|
|
863
|
+
unseen.current.delete(eventId);
|
|
859
864
|
if (!animate) {
|
|
860
865
|
forget(eventId);
|
|
861
866
|
commit(cardsRef.current.filter((card) => card.record.eventId !== eventId));
|
|
@@ -1006,6 +1011,8 @@ window.__ModuleLoader__.load({
|
|
|
1006
1011
|
const sync = () => {
|
|
1007
1012
|
const hidden = Boolean(globalThis.document?.hidden);
|
|
1008
1013
|
if (!hidden) unseen.current.clear();
|
|
1014
|
+
const live = new Set(cardsRef.current.filter((card) => !card.leaving).map((card) => card.record.eventId));
|
|
1015
|
+
for (const id of [...unseen.current]) if (!live.has(id)) unseen.current.delete(id);
|
|
1009
1016
|
attentionIndicator.update({ unread: hidden && toastConfig.toastPosition !== "off" ? unseen.current.size : 0, visible: !hidden });
|
|
1010
1017
|
};
|
|
1011
1018
|
sync();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idoall/dsh-notify",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "DSH web plugin: in-page task notifications for DeepSeek Harness — enhanced or soft status toasts, a collapsible stack in the conversation top-left corner, answer buttons, background-tab attention, and a WebAudio cue that also plays while the page is hidden. Live delivery only: no history, no service worker, no web push, no OS notification matrix.",
|
|
6
6
|
"main": "./dist/index.js",
|