@idoall/dsh-notify 0.3.2 → 0.3.3
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 +15 -0
- package/README.md +19 -14
- package/README.zh.md +19 -14
- package/dist/client.js +8 -2
- package/dist/index.js +34 -6
- package/package.json +18 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,21 @@ All notable changes to this project are documented here. The format follows [Kee
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.3.3] - 2026-09-24
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- **Adapted to DeepSeek Harness `0.1.7-rc.1`.** Background-job completions now subscribe to the consolidated `jobs.events` stream (`settled`, unawaited only) instead of the removed `onJobDone` listener. Tool-result settlement reads `message.toolCallId` / `message.isError` on the flattened tool-role message. In-toast answers read the unified `uiSession.sessionStatus` snapshot, where the answerable interaction is nested under `pendingInteraction`.
|
|
12
|
+
- **Declared DSH compatibility as a load-time requirement.** `dsh.manifestVersion`, `dsh.engines.dsh`, and every `@deepseek-ai/dsh-*` peer now state `>=0.1.7-rc.1 <0.2.0`, so DSH 0.1.7-rc.1 can refuse an incompatible bundle at profile load. `@deepseek-ai/schemastery` moves from a plain dependency to a peer (with a matching devDependency) so a `link:` install resolves it from the running installation.
|
|
13
|
+
|
|
14
|
+
### Verified
|
|
15
|
+
|
|
16
|
+
- Host jobs coverage confirms the 0.1.7 event stream, awaited settlements stay silent, and the pre-0.1.7 `onJobDone` listener remains a fallback.
|
|
17
|
+
- Flattened `tool/result` messages close the matching interaction; a nested pre-0.1.7 `tool-result` block still does.
|
|
18
|
+
- Client pending-interaction coverage reads both the 0.1.7 Session status snapshot and the older map.
|
|
19
|
+
- Live `link:` install on DSH `0.1.7-rc.1` hot-mounted without restarting: Host routes answered, the client bundle registered, **Settings → Notifications** rendered, and a four-tone self-test produced the collapsed overlay stack above the settings modal.
|
|
20
|
+
- Full verification passed: static source checks, **86 automated tests**, build, and package precondition checks.
|
|
21
|
+
|
|
7
22
|
## [0.3.2] - 2026-09-20
|
|
8
23
|
|
|
9
24
|
### Fixed
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
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
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
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.
|
|
9
|
+
<img src="https://img.shields.io/badge/DSH-0.1.7--rc.1-4B6BFB" alt="DSH 0.1.7-rc.1">
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">English | <a href="README.zh.md">中文</a></p>
|
|
@@ -45,7 +45,7 @@ Requirements:
|
|
|
45
45
|
|
|
46
46
|
- DeepSeek Harness with a Web profile
|
|
47
47
|
- Node.js 20 or newer
|
|
48
|
-
- Verified DeepSeek Harness version: `0.1.
|
|
48
|
+
- Verified DeepSeek Harness version: `0.1.7-rc.1`
|
|
49
49
|
|
|
50
50
|
Install from npm into your Web profile:
|
|
51
51
|
|
|
@@ -93,17 +93,22 @@ Custom sounds are stored in `<dataDir>/sounds/` in the profile data directory, n
|
|
|
93
93
|
|
|
94
94
|
## Compatibility
|
|
95
95
|
|
|
96
|
-
Current release
|
|
96
|
+
Current release: plugin **`0.3.3`** is verified against DeepSeek Harness **`0.1.7-rc.1`**.
|
|
97
97
|
|
|
98
|
-
| Plugin | Verified DeepSeek Harness |
|
|
99
|
-
| --- | --- |
|
|
100
|
-
|
|
|
101
|
-
| `0.3.
|
|
102
|
-
| `0.3.
|
|
103
|
-
| `0.
|
|
104
|
-
| `0.2.
|
|
105
|
-
| `0.2.
|
|
106
|
-
| `0.
|
|
98
|
+
| Plugin | Verified DeepSeek Harness | What that version is |
|
|
99
|
+
| --- | --- | --- |
|
|
100
|
+
| **`0.3.3`** | `0.1.7-rc.1` | Adapts to DSH 0.1.7: job completions follow `jobs.events.subscribe`, tool results read the flattened tool-role message, in-toast answers read `uiSession.sessionStatus`, and `@deepseek-ai/schemastery` is a peer |
|
|
101
|
+
| `0.3.2` | `0.1.6-alpha.1` | Completion follows native `agent/status: idle`; one green card per continuous task |
|
|
102
|
+
| `0.3.1` | `0.1.6-alpha.1` | Sound matches visible delivery; open interactions recover after overlay remount |
|
|
103
|
+
| `0.3.0` | `0.1.6-alpha.1` | Enhanced/soft styles, collapsed stack, and page-local self-test |
|
|
104
|
+
| `0.2.2` | `0.1.6-alpha.1` | Latest published npm `latest` until `0.3.3` is released |
|
|
105
|
+
| `0.2.1` | `0.1.6-alpha.1` | — |
|
|
106
|
+
| `0.2.0` | `0.1.6-alpha.1` | — |
|
|
107
|
+
| `0.1.2` | `0.1.6-alpha.1` | — |
|
|
108
|
+
|
|
109
|
+
- **`0.3.3` supports the DSH `0.1.7` line only.** DSH `0.1.7` removed `jobs.onJobDone`, flattened tool-result identity onto the tool-role message, and replaced `uiSession.pendingInteractions` with the unified `sessionStatus` snapshot. On an older DSH — including `0.1.6-alpha.1` — stay on plugin **`0.3.2`**.
|
|
110
|
+
- Two declarations make the `0.1.7` line load at all: `dsh.engines.dsh` and every `@deepseek-ai/dsh-*` peer declare `>=0.1.7-rc.1 <0.2.0`. DSH `0.1.7-rc.1` refuses an incompatible bundle at profile load, so a range that excluded the running release would silently drop the plugin.
|
|
111
|
+
- `@deepseek-ai/schemastery` is a **peer**, not a plain dependency: DSH 0.1.7 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.
|
|
107
112
|
|
|
108
113
|
The layout is also checked at a 390px mobile viewport: the settings controls reflow and the toast becomes full-width without falling behind the mobile sidebar.
|
|
109
114
|
|
|
@@ -134,8 +139,8 @@ npm run pack:check # publish preconditions + client registration check
|
|
|
134
139
|
Releases are tag-driven. Bump `package.json`, move the matching CHANGELOG section out of `Unreleased`, write `release-notes/v<version>.md`, then push the release commit and tag:
|
|
135
140
|
|
|
136
141
|
```sh
|
|
137
|
-
git tag v0.3.
|
|
138
|
-
git push origin v0.3.
|
|
142
|
+
git tag v0.3.3
|
|
143
|
+
git push origin v0.3.3
|
|
139
144
|
```
|
|
140
145
|
|
|
141
146
|
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
|
@@ -6,7 +6,7 @@
|
|
|
6
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
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
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.
|
|
9
|
+
<img src="https://img.shields.io/badge/DSH-0.1.7--rc.1-4B6BFB" alt="DSH 0.1.7-rc.1">
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center"><a href="README.md">English</a> | 中文</p>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
- 带 Web profile 的 DeepSeek Harness
|
|
47
47
|
- Node.js 20 或更新
|
|
48
|
-
- 已验证的 DeepSeek Harness:`0.1.
|
|
48
|
+
- 已验证的 DeepSeek Harness:`0.1.7-rc.1`
|
|
49
49
|
|
|
50
50
|
从 npm 安装:
|
|
51
51
|
|
|
@@ -93,17 +93,22 @@ dsh plugin --profile web add "link:$(pwd)"
|
|
|
93
93
|
|
|
94
94
|
## 兼容性
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
当前发布:插件 **`0.3.3`** 已在 DeepSeek Harness **`0.1.7-rc.1`** 上验证。
|
|
97
97
|
|
|
98
|
-
| 插件 | 已验证的 DeepSeek Harness |
|
|
99
|
-
| --- | --- |
|
|
100
|
-
|
|
|
101
|
-
| `0.3.
|
|
102
|
-
| `0.3.
|
|
103
|
-
| `0.
|
|
104
|
-
| `0.2.
|
|
105
|
-
| `0.2.
|
|
106
|
-
| `0.
|
|
98
|
+
| 插件 | 已验证的 DeepSeek Harness | 这一版是什么 |
|
|
99
|
+
| --- | --- | --- |
|
|
100
|
+
| **`0.3.3`** | `0.1.7-rc.1` | 适配 DSH 0.1.7:后台任务完成走 `jobs.events.subscribe`,工具结果读取扁平化后的 tool-role 消息,卡片内回答读取 `uiSession.sessionStatus`,`@deepseek-ai/schemastery` 改为 peer |
|
|
101
|
+
| `0.3.2` | `0.1.6-alpha.1` | 完成通知跟随原生 `agent/status: idle`;连续任务只发一张绿色卡 |
|
|
102
|
+
| `0.3.1` | `0.1.6-alpha.1` | 提示音与可见投递对齐;浮层重挂载后恢复未处理交互 |
|
|
103
|
+
| `0.3.0` | `0.1.6-alpha.1` | 增强/柔和样式、折叠堆叠、页内自测 |
|
|
104
|
+
| `0.2.2` | `0.1.6-alpha.1` | 在 `0.3.3` 发布前仍是 npm `latest` |
|
|
105
|
+
| `0.2.1` | `0.1.6-alpha.1` | — |
|
|
106
|
+
| `0.2.0` | `0.1.6-alpha.1` | — |
|
|
107
|
+
| `0.1.2` | `0.1.6-alpha.1` | — |
|
|
108
|
+
|
|
109
|
+
- **`0.3.3` 只支持 DSH `0.1.7` 线。** DSH `0.1.7` 移除了 `jobs.onJobDone`,把工具结果身份扁平化到 tool-role 消息上,并用统一的 `sessionStatus` 快照替换了 `uiSession.pendingInteractions`。更早的 DSH(含 `0.1.6-alpha.1`)请继续用插件 **`0.3.2`**。
|
|
110
|
+
- 两处声明决定 `0.1.7` 线能否加载:`dsh.engines.dsh` 与每一个 `@deepseek-ai/dsh-*` peer 都声明 `>=0.1.7-rc.1 <0.2.0`。DSH `0.1.7-rc.1` 会在 profile 加载时拒绝不兼容的 bundle,范围写错就会静默丢掉插件。
|
|
111
|
+
- `@deepseek-ai/schemastery` 是 **peer**,不是普通依赖:DSH 0.1.7 只会把 **link 形态**插件的 peer 解析到当前安装;若仍写成普通依赖,`link:` 安装的 Host 半会导入失败。
|
|
107
112
|
|
|
108
113
|
同时在 390px 手机视口检查:设置控件会重排,Toast 会满宽显示且不会被移动端侧栏遮挡。
|
|
109
114
|
|
|
@@ -134,8 +139,8 @@ npm run pack:check # 发布前置条件 + 客户端注册校验
|
|
|
134
139
|
发版由 tag 驱动。更新 `package.json`、将对应 CHANGELOG 段落移出 `Unreleased`、编写 `release-notes/v<版本>.md` 后,推送发版提交与 tag:
|
|
135
140
|
|
|
136
141
|
```sh
|
|
137
|
-
git tag v0.3.
|
|
138
|
-
git push origin v0.3.
|
|
142
|
+
git tag v0.3.3
|
|
143
|
+
git push origin v0.3.3
|
|
139
144
|
```
|
|
140
145
|
|
|
141
146
|
发版工作流会运行 `npm run verify`、打包插件、通过 npm trusted publishing(OIDC)发布,并创建附带 tarball 与 sha256 的 GitHub Release。
|
package/dist/client.js
CHANGED
|
@@ -1094,7 +1094,10 @@ window.__ModuleLoader__.load({
|
|
|
1094
1094
|
}
|
|
1095
1095
|
function pendingInteractionFor(pending, sessionId) {
|
|
1096
1096
|
if (!pending || typeof pending.get !== "function" || typeof sessionId !== "string") return null;
|
|
1097
|
-
|
|
1097
|
+
const entry = pending.get(sessionId) ?? null;
|
|
1098
|
+
if (!entry) return null;
|
|
1099
|
+
if ("pendingInteraction" in entry) return entry.pendingInteraction ?? null;
|
|
1100
|
+
return typeof entry.answer === "function" ? entry : null;
|
|
1098
1101
|
}
|
|
1099
1102
|
function toastAnswer(record, interaction) {
|
|
1100
1103
|
if (!interaction || typeof interaction.answer !== "function") return null;
|
|
@@ -1238,7 +1241,10 @@ window.__ModuleLoader__.load({
|
|
|
1238
1241
|
const status = { service: slots?.inject && slots?.register ? "available" : "unavailable", seats: {} };
|
|
1239
1242
|
if (status.service === "unavailable") return { status, destroy() {
|
|
1240
1243
|
} };
|
|
1241
|
-
const pendingInteractions = () =>
|
|
1244
|
+
const pendingInteractions = () => {
|
|
1245
|
+
const ui = getUiSession?.();
|
|
1246
|
+
return ui?.sessionStatus ?? ui?.pendingInteractions;
|
|
1247
|
+
};
|
|
1242
1248
|
const disposers = [installClientStyles(), installAudioUnlock()];
|
|
1243
1249
|
const activate = (name, options, Component) => {
|
|
1244
1250
|
status.seats[name] = "active";
|
package/dist/index.js
CHANGED
|
@@ -333,12 +333,17 @@ export async function apply(ctx, config = {}) {
|
|
|
333
333
|
return;
|
|
334
334
|
}
|
|
335
335
|
if (event?.type === 'tool/result') {
|
|
336
|
-
|
|
337
|
-
|
|
336
|
+
// DSH 0.1.7 flattened the tool result onto the tool-role message (`message.toolCallId` and
|
|
337
|
+
// `message.isError`); the nested `tool-result` content block this used to read is gone. The message
|
|
338
|
+
// is the authoritative shape, and the old nested block stays only as a fallback so an older host
|
|
339
|
+
// keeps settling its interactions.
|
|
340
|
+
const message = data.message ?? {};
|
|
341
|
+
const nested = message.content?.find?.((block) => block?.type === 'tool-result');
|
|
342
|
+
const callId = message.toolCallId ?? nested?.toolCallId;
|
|
338
343
|
if (!callId) return; // Unlinked records cannot be guessed closed by an uncorrelated result.
|
|
339
344
|
removePending(sessionId, callId);
|
|
340
|
-
const
|
|
341
|
-
const existing = reducer.questionResult({ sessionId, callId, outcome });
|
|
345
|
+
const failed = message.isError === true || nested?.isError === true || data.outcome === 'abort';
|
|
346
|
+
const existing = reducer.questionResult({ sessionId, callId, outcome: failed ? 'abort' : 'settled' });
|
|
342
347
|
if (existing) safely(() => dispatch(existing));
|
|
343
348
|
return;
|
|
344
349
|
}
|
|
@@ -448,6 +453,17 @@ export async function apply(ctx, config = {}) {
|
|
|
448
453
|
workflowOwners.delete(info.id);
|
|
449
454
|
safely(() => dispatch(reducer.upsert({ kind: 'workflow-end', mergeKey: `wf:${info.id}`, ...(sessionId ? { sessionId } : {}), title: info.meta?.name || '工作流结束', body: result.error || result.stopReason, phase: 'settled', outcome: result.stopReason })));
|
|
450
455
|
});
|
|
456
|
+
/**
|
|
457
|
+
* One settled job becomes one card. DSH 0.1.7 consolidated the registry into a single event stream whose
|
|
458
|
+
* terminal event is `settled`, and a settlement that released a live waiter was already handed to that
|
|
459
|
+
* caller, so only the unawaited ones are news for a human. The older `onJobDone` listener, which delivered
|
|
460
|
+
* the terminal snapshot with its owning Agent, is kept for a host that still has it.
|
|
461
|
+
*/
|
|
462
|
+
const onJobSettled = (job) => {
|
|
463
|
+
if (!subtasksWanted() || !job) return;
|
|
464
|
+
if (job.status === 'running' || job.status === 'stopping') return;
|
|
465
|
+
safely(() => dispatch(reducer.upsert({ kind: 'job-end', mergeKey: `job:${job.id}`, ...(typeof job.owner === 'string' && job.owner !== '' ? { sessionId: job.owner } : {}), ...jobNotification(job), phase: 'settled', outcome: job.status })));
|
|
466
|
+
};
|
|
451
467
|
const onJobDone = (snapshot, owner) => {
|
|
452
468
|
if (!subtasksWanted()) return;
|
|
453
469
|
safely(() => dispatch(reducer.upsert({ kind: 'job-end', mergeKey: `job:${snapshot?.id}`, sessionId: snapshot?.ownerSession ?? sessionIdOf(owner), ...jobNotification(snapshot ?? {}), phase: 'settled', outcome: snapshot?.status })));
|
|
@@ -462,10 +478,22 @@ export async function apply(ctx, config = {}) {
|
|
|
462
478
|
*/
|
|
463
479
|
let jobListenerAttached = false;
|
|
464
480
|
const attachJobs = (registry) => {
|
|
465
|
-
if (jobListenerAttached
|
|
481
|
+
if (jobListenerAttached) return false;
|
|
482
|
+
// Current DSH: one lifecycle stream, subscribed with an explicit owner filter. This plugin observes
|
|
483
|
+
// every owner because a profile-level mount is the only composition that can see all sessions.
|
|
484
|
+
if (typeof registry?.events?.subscribe === 'function') {
|
|
485
|
+
jobListenerAttached = true;
|
|
486
|
+
registry.events.subscribe({ owners: 'all' }, (event) => {
|
|
487
|
+
if (event?.type !== 'settled' || event.awaited === true) return;
|
|
488
|
+
onJobSettled(event.job);
|
|
489
|
+
});
|
|
490
|
+
diagnostics.services.jobs = 'events';
|
|
491
|
+
return true;
|
|
492
|
+
}
|
|
493
|
+
if (typeof registry?.onJobDone !== 'function') return false;
|
|
466
494
|
jobListenerAttached = true;
|
|
467
495
|
registry.onJobDone(onJobDone);
|
|
468
|
-
diagnostics.services.jobs = '
|
|
496
|
+
diagnostics.services.jobs = 'onJobDone';
|
|
469
497
|
return true;
|
|
470
498
|
};
|
|
471
499
|
if (typeof ctx?.inject === 'function') { try { ctx.inject(['jobs'], (jobCtx) => { attachJobs(jobCtx?.jobs); }); } catch { /* no registry in this composition */ } }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idoall/dsh-notify",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "DSH web plugin: in-page task notifications for DeepSeek Harness — enhanced or soft status toasts, a collapsible top-right stack, 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",
|
|
@@ -18,6 +18,10 @@
|
|
|
18
18
|
"LICENSE"
|
|
19
19
|
],
|
|
20
20
|
"dsh": {
|
|
21
|
+
"manifestVersion": 1,
|
|
22
|
+
"engines": {
|
|
23
|
+
"dsh": ">=0.1.7-rc.1 <0.2.0"
|
|
24
|
+
},
|
|
21
25
|
"bundle": {
|
|
22
26
|
"patch": "./cordis.patch.yml"
|
|
23
27
|
},
|
|
@@ -29,6 +33,11 @@
|
|
|
29
33
|
"@deepseek-ai/dsh-client-ui-settings",
|
|
30
34
|
"@deepseek-ai/dsh-client-ui-settings-general"
|
|
31
35
|
]
|
|
36
|
+
},
|
|
37
|
+
"compatibility": {
|
|
38
|
+
"dshReleases": {
|
|
39
|
+
"0.1.7-rc.1": "compatible"
|
|
40
|
+
}
|
|
32
41
|
}
|
|
33
42
|
},
|
|
34
43
|
"scripts": {
|
|
@@ -43,14 +52,18 @@
|
|
|
43
52
|
"publishConfig": {
|
|
44
53
|
"access": "public"
|
|
45
54
|
},
|
|
46
|
-
"dependencies": {
|
|
47
|
-
"@deepseek-ai/schemastery": "^3.18.2"
|
|
48
|
-
},
|
|
49
55
|
"peerDependencies": {
|
|
56
|
+
"@deepseek-ai/cordis": "^4.0.4",
|
|
57
|
+
"@deepseek-ai/dsh-client-connection": ">=0.1.7-rc.1 <0.2.0",
|
|
58
|
+
"@deepseek-ai/dsh-client-ui-session": ">=0.1.7-rc.1 <0.2.0",
|
|
59
|
+
"@deepseek-ai/dsh-host-webserver": ">=0.1.7-rc.1 <0.2.0",
|
|
60
|
+
"@deepseek-ai/dsh-jobs": ">=0.1.7-rc.1 <0.2.0",
|
|
61
|
+
"@deepseek-ai/schemastery": "^3.18.4",
|
|
50
62
|
"react": "^18.2.0"
|
|
51
63
|
},
|
|
52
64
|
"devDependencies": {
|
|
53
|
-
"@deepseek-ai/cordis": "4.0.
|
|
65
|
+
"@deepseek-ai/cordis": "^4.0.4",
|
|
66
|
+
"@deepseek-ai/schemastery": "^3.18.4",
|
|
54
67
|
"@types/node": "^22.15.29",
|
|
55
68
|
"@types/react": "^18.3.23",
|
|
56
69
|
"esbuild": "^0.25.5",
|