@kangyishuai/dsh-session-rewind 0.6.0 → 0.6.1
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/README.md +8 -6
- package/README.zh-CN.md +8 -6
- package/lib/client.js +7 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
> In-place conversation rewind for DeepSeek Harness: send the conversation back to before any user message, withdraw everything after it from the model context and the transcript, optionally restore the workspace files those turns changed, and put the message back into the composer.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@kangyishuai/dsh-session-rewind) [](https://www.npmjs.com/package/@kangyishuai/dsh-session-rewind) [](#compatibility) [](./LICENSE)
|
|
6
6
|
|
|
7
7
|
[中文](./README.zh-CN.md)
|
|
8
8
|
|
|
9
9
|
Unofficial plugin for [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness). Not affiliated with DeepSeek.
|
|
10
10
|
|
|
11
|
-
> **Status: early.**
|
|
11
|
+
> **Status: early.** End to end verified against the current target DSH version — the [Compatibility](#compatibility) table records exactly what was run (unit tests, throwaway-home GUI suite, real-desktop read-only and `--recall` suites) and when. `pnpm gate:session-rewind` runs the whole release gate in one command. Young software — keep backups of anything you cannot lose.
|
|
12
12
|
|
|
13
13
|
## What it does
|
|
14
14
|
|
|
@@ -117,12 +117,14 @@ On startup the plugin also removes data for sessions that no longer exist (they
|
|
|
117
117
|
- **Private client seams.** Hiding rows and injecting the ↶ button rely on DSH's internal view/slot registries. They are shape-checked at install and degrade to “context rewound, transcript not hidden” or “button missing” rather than breaking a session.
|
|
118
118
|
- **Recall is a draft edit.** It fills the composer through the host facade, so `Ctrl+Z` steps back through recalls like any other draft change; it never appends to the session or the model context.
|
|
119
119
|
- **POSIX/macOS paths only** in this version; Windows separators and permission bits are not verified.
|
|
120
|
+
- **macOS overlays don't drag the window.** The drawer, its mask and the confirm dialog declare `data-window-drag-exclude`, so dragging over them while they cover the title bar behaves normally (verified with a real mouse drag on DSH 0.2.2-rc.2; earlier builds could drag the whole window).
|
|
120
121
|
|
|
121
122
|
## Compatibility
|
|
122
123
|
|
|
123
|
-
| DSH version | Status
|
|
124
|
-
| ----------- |
|
|
125
|
-
| 0.2.2-rc.
|
|
124
|
+
| DSH version | Status |
|
|
125
|
+
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
126
|
+
| 0.2.2-rc.2 | Verified 2026-11-12: 205 unit tests + `pnpm probe:runtime` 67/67 + web `smoke:session-rewind` 49/49 (throwaway DSH home, real host). Desktop on the live app over CDP: 23/23 read-only + `--recall` 30/30 + `--deep --workspace` 39/39 (real model call, file-mode end to end: write → rewind → trash → rescue-point restore). |
|
|
127
|
+
| 0.2.2-rc.1 | Verified 2026-11-09: 205 unit tests + web `smoke:session-rewind` 49/49 (temp DSH home) + desktop `smoke:session-rewind-desktop` 23/23 read-only, 30/30 with `--recall`, and 39/39 with `--deep` (file mode end to end, real Electron renderer over CDP); the full `--recall --deep` combination is 46/46. |
|
|
126
128
|
|
|
127
129
|
The plugin declares no `engines.dsh` and no `@deepseek-ai/*` peer range: DSH is pre-release and semver ranges over prereleases are unreliable (see [ADR 0005](../../docs/adr/0005-dsh-version-compatibility.md)). Treat the table as the compatibility statement. After a DSH upgrade run `pnpm probe:runtime`, `pnpm smoke:session-rewind`, and check the plugin's diagnostics tab; if a private seam changed, the plugin degrades instead of breaking the session.
|
|
128
130
|
|
|
@@ -132,7 +134,7 @@ The plugin declares no `engines.dsh` and no `@deepseek-ai/*` peer range: DSH is
|
|
|
132
134
|
pnpm test # unit tests (host engine, host RPC, client helpers)
|
|
133
135
|
pnpm verify # repo-wide gates
|
|
134
136
|
pnpm smoke:session-rewind # temp DSH home + real GUI end-to-end (needs dsh & ego-browser)
|
|
135
|
-
pnpm smoke:session-rewind-desktop # desktop (Electron) read-only check (23); --recall adds
|
|
137
|
+
pnpm smoke:session-rewind-desktop # desktop (Electron) read-only check (23); --recall adds 7 composer-recall checks; --deep --workspace <dir> adds the file-mode run (39 total)
|
|
136
138
|
```
|
|
137
139
|
|
|
138
140
|
Design notes: [ADR 0006](../../docs/adr/0006-session-rewind-architecture.md) and [ADR 0007](../../docs/adr/0007-session-rewind-file-restore.md) (Chinese; the repository docs are written in Chinese).
|
package/README.zh-CN.md
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
> DeepSeek Harness 的「就地回溯」:把会话退回到任意一条用户消息之前,目标消息及其后的内容同时从模型上下文和渲染对话中撤回;可选择一并还原这些轮次改过的工作区文件;目标消息文本(和图片)自动回填输入框。
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@kangyishuai/dsh-session-rewind) [](https://www.npmjs.com/package/@kangyishuai/dsh-session-rewind) [](#兼容性) [](./LICENSE)
|
|
6
6
|
|
|
7
7
|
[English](./README.md)
|
|
8
8
|
|
|
9
9
|
非官方插件,与 DeepSeek 无关。面向 [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness)。
|
|
10
10
|
|
|
11
|
-
> **状态:早期。**
|
|
11
|
+
> **状态:早期。** 已针对当前目标 DSH 版本端到端验证——具体跑了什么、什么时候跑的,见[兼容性](#兼容性)表格(单测、一次性 DSH 目录里的 GUI 冒烟、真实桌面版只读与 `--recall`)。`pnpm gate:session-rewind` 一条命令跑完发版门禁。插件还年轻,重要数据请自行备份。
|
|
12
12
|
|
|
13
13
|
## 它做什么
|
|
14
14
|
|
|
@@ -117,12 +117,14 @@ dsh plugin --profile desktop add /tmp/kangyishuai-dsh-session-rewind-*.tgz
|
|
|
117
117
|
- **客户端私有 seam**:隐藏行和注入 ↶ 按钮依赖 DSH 内部 view/slot 注册表;安装时做形状检查,失效时降级为「上下文已回溯、界面不隐藏」或「按钮消失」,不破坏会话。
|
|
118
118
|
- **召回只是改草稿**:它通过宿主输入框 facade 整篇替换草稿,所以 `Ctrl+Z` 会像普通编辑一样一步步退回;它不会向会话或模型上下文追加任何东西。
|
|
119
119
|
- **本版只验证 POSIX/macOS 路径**;Windows 分隔符与权限位未验证。
|
|
120
|
+
- **macOS 浮层不会拖走窗口。** 抽屉、遮罩与确认框都声明了 `data-window-drag-exclude`,覆盖页头时拖动行为正常(在 DSH 0.2.2-rc.2 上用真实鼠标拖动验证;更早的构建会把整个窗口拖走)。
|
|
120
121
|
|
|
121
122
|
## 兼容性
|
|
122
123
|
|
|
123
|
-
| DSH 版本 | 状态
|
|
124
|
-
| ---------- |
|
|
125
|
-
| 0.2.2-rc.
|
|
124
|
+
| DSH 版本 | 状态 |
|
|
125
|
+
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
126
|
+
| 0.2.2-rc.2 | 2026-11-12 已验证:205 个单测 + `pnpm probe:runtime` 67/67 + Web `smoke:session-rewind` 49/49(临时 DSH home,真实宿主)。桌面(live 桌面版,CDP):只读 23/23 + `--recall` 30/30 + `--deep --workspace` 39/39(真实模型调用,文件模式端到端:写文件 → 回溯 → 回收站 → 救援点还原)。 |
|
|
127
|
+
| 0.2.2-rc.1 | 2026-11-09 已验证:205 个单测 + Web `smoke:session-rewind` 49/49(临时 DSH home)+ 桌面 `smoke:session-rewind-desktop` 只读 23/23、加 `--recall` 30/30、加 `--deep` 39/39(文件模式端到端,真实 Electron 渲染进程走 CDP);全量组合 `--recall --deep` 46/46。 |
|
|
126
128
|
|
|
127
129
|
插件不声明 `engines.dsh`,也不声明 `@deepseek-ai/*` 的 peer 范围:DSH 还在预发布阶段,预发布版本的 semver 范围不可靠(见 [ADR 0005](../../docs/adr/0005-dsh-version-compatibility.md))。以这张表为准。DSH 升级后跑 `pnpm probe:runtime`、`pnpm smoke:session-rewind`,并看插件诊断页签;私有 seam 变了会降级而不是让会话出错。
|
|
128
130
|
|
|
@@ -132,7 +134,7 @@ dsh plugin --profile desktop add /tmp/kangyishuai-dsh-session-rewind-*.tgz
|
|
|
132
134
|
pnpm test # 单测(宿主文件引擎、宿主 RPC、客户端 helper)
|
|
133
135
|
pnpm verify # 仓库统一门禁
|
|
134
136
|
pnpm smoke:session-rewind # 临时 DSH 目录 + 真实 GUI 端到端(需要 dsh 与 ego-browser)
|
|
135
|
-
pnpm smoke:session-rewind-desktop # 桌面(Electron)只读回归(23 项);--recall 再加
|
|
137
|
+
pnpm smoke:session-rewind-desktop # 桌面(Electron)只读回归(23 项);--recall 再加 7 条召回断言;--deep --workspace <dir> 再跑文件模式(合计 39 项)
|
|
136
138
|
```
|
|
137
139
|
|
|
138
140
|
设计记录:[ADR 0006](../../docs/adr/0006-session-rewind-architecture.md)、[ADR 0007](../../docs/adr/0007-session-rewind-file-restore.md)。
|
package/lib/client.js
CHANGED
|
@@ -2416,7 +2416,7 @@ window.__ModuleLoader__.load({
|
|
|
2416
2416
|
|
|
2417
2417
|
return h(
|
|
2418
2418
|
"div",
|
|
2419
|
-
{ className: "dsh-srw-mask", onClick: () => api.close() },
|
|
2419
|
+
{ className: "dsh-srw-mask", "data-window-drag-exclude": "", onClick: () => api.close() },
|
|
2420
2420
|
h(
|
|
2421
2421
|
"div",
|
|
2422
2422
|
{
|
|
@@ -2994,11 +2994,16 @@ window.__ModuleLoader__.load({
|
|
|
2994
2994
|
|
|
2995
2995
|
return h(
|
|
2996
2996
|
"div",
|
|
2997
|
-
{
|
|
2997
|
+
{
|
|
2998
|
+
className: "dsh-srw-drawer-mask",
|
|
2999
|
+
"data-window-drag-exclude": "",
|
|
3000
|
+
onClick: () => api.closeDrawer(),
|
|
3001
|
+
},
|
|
2998
3002
|
h(
|
|
2999
3003
|
"aside",
|
|
3000
3004
|
{
|
|
3001
3005
|
className: "dsh-srw-drawer",
|
|
3006
|
+
"data-window-drag-exclude": "",
|
|
3002
3007
|
role: "dialog",
|
|
3003
3008
|
"aria-modal": "true",
|
|
3004
3009
|
"aria-label": t("drawer.title"),
|
package/package.json
CHANGED