@kangyishuai/dsh-session-rewind 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +113 -2
- package/README.zh-CN.md +114 -0
- package/cordis.patch.yml +3 -0
- package/lib/client.js +4360 -0
- package/lib/file-tracking.js +696 -0
- package/lib/files.js +2387 -0
- package/lib/ghost.js +90 -0
- package/lib/index.js +7 -0
- package/lib/operations.js +363 -0
- package/lib/orphans.js +141 -0
- package/lib/plan.js +404 -0
- package/lib/service.js +850 -0
- package/locale/en.json +121 -0
- package/locale/zh.json +121 -0
- package/package.json +63 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 kangyishuai
|
|
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
CHANGED
|
@@ -1,3 +1,114 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @kangyishuai/dsh-session-rewind
|
|
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
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@kangyishuai/dsh-session-rewind) [](#compatibility) [](./LICENSE)
|
|
6
|
+
|
|
7
|
+
[中文](./README.zh-CN.md)
|
|
8
|
+
|
|
9
|
+
Unofficial plugin for [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness). Not affiliated with DeepSeek.
|
|
10
|
+
|
|
11
|
+
> **Status: early.** Verified end to end on DSH 0.2.2-rc.1: 31 GUI assertions in a throwaway DSH home, 158 unit tests, and a CDP-driven desktop pass (conflict refusal, conversation + file rewind, created-file trash, modified-file restore, rescue restore, panel/audit/diagnostics). Young software — keep backups of anything you cannot lose.
|
|
12
|
+
|
|
13
|
+
## What it does
|
|
14
|
+
|
|
15
|
+
Long conversations drift. A few turns later you wish you had answered a prompt differently, but starting a new session loses everything before it, and continuing keeps the unwanted turns in the context window forever. This plugin rewinds **in place**:
|
|
16
|
+
|
|
17
|
+
- **Two entries.** Press `Esc` `Esc` to open the rewind dialog, or click the ↶ button in any user message's action row (next to Copy).
|
|
18
|
+
- **Two scopes, chosen per rewind.** The confirmation dialog offers **Rewind conversation only** (default) and **Rewind conversation and files**. The dialog first shows a dry-run preview: how many messages and roughly how many tokens will be withdrawn, which files will be restored or moved to the trash, conflicts, and skipped files.
|
|
19
|
+
- **Conversation.** The target message and everything after it are withdrawn from the model-visible context and from the transcript. The session id, title and earlier history are untouched. Nothing is deleted from the log — one marker event is appended.
|
|
20
|
+
- **Files (optional).** Files changed by `write` / `edit` / `apply_patch` in the withdrawn turns are restored to their pre-change content. Files created after the target are moved to the plugin's trash instead of deleted. A rescue point of the current files is created before anything is written; failures roll back from it.
|
|
21
|
+
- **Composer.** The target message's text (and images) is put back into the composer, ready to edit and send again. An existing draft is never overwritten.
|
|
22
|
+
- **Rewind panel.** A new header action opens a panel with four tabs: **Withdrawn** (every message each rewind removed, searchable, copy or put back in the composer), **History** (audit of each rewind: scope, message count, tokens, file results), **Rescue points** (restore files from an earlier rescue), and **Settings** (default scope, page size, confirm-on-list, diagnostics).
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
dsh plugin --profile desktop add @kangyishuai/dsh-session-rewind
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
To run the working tree instead of a published version, pack it first — `link:` installs do not work (the host's `@deepseek-ai/*` resolution only covers packages whose real path is inside the profile):
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cd packages/session-rewind
|
|
34
|
+
pnpm pack --pack-destination /tmp
|
|
35
|
+
dsh plugin --profile desktop add /tmp/kangyishuai-dsh-session-rewind-*.tgz
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Re-run `pnpm pack` + `add` after changing the code. The plugin has a host half, so restart the DSH desktop app and refresh the page.
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
**Keyboard — `Esc` `Esc`.** In an idle conversation, press Escape twice quickly. The rewind dialog lists user messages, newest first; search, page to older messages with ↑/↓, Enter or click to choose. Then the preview opens; pick a scope and confirm. While a turn is running, `Esc` `Esc` keeps its native meaning (stop the turn); press it again when idle.
|
|
43
|
+
|
|
44
|
+
**Message action — ↶.** Every user message has a ↶ button next to Copy. It opens the same preview/confirmation dialog. Nothing is rewound until you confirm.
|
|
45
|
+
|
|
46
|
+
**Commands.** `/rewind` opens the same candidate list. `/rewind @<seq> [chat|both]` executes directly (the preview's seq is shown in the list). `/rewind` is decorated by the client; the bare form never sends text to the model.
|
|
47
|
+
|
|
48
|
+
**After a rewind** the target text returns to the composer (images are re-attached best-effort) and the composer is focused. If the composer already held a draft, the draft is kept and a notice says so.
|
|
49
|
+
|
|
50
|
+
**What is refused**
|
|
51
|
+
|
|
52
|
+
| Situation | What happens |
|
|
53
|
+
| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
|
|
54
|
+
| The session has a running turn | The host refuses (`session-rewind/busy`); stop the turn first and retry. |
|
|
55
|
+
| The session is a subagent child | No ↶ button and no `Esc` `Esc` dialog: the Harness refuses generic session RPCs there. |
|
|
56
|
+
| The target message was shadowed by compaction | Refused; the rewind boundary must still be in the model context. |
|
|
57
|
+
| A file was changed outside the agent since the last recorded state | File mode is refused with a conflict list; no file is touched. |
|
|
58
|
+
| A file is larger than 8 MiB, a symlink, or under `.git` / `node_modules` | That file is skipped and reported; other files still proceed. |
|
|
59
|
+
| A rewind is already running on this session | Refused; one at a time. |
|
|
60
|
+
|
|
61
|
+
## File restore scope & safety
|
|
62
|
+
|
|
63
|
+
- **Tracked changes only.** Only DSH file tools `write`, `edit` and `apply_patch` are tracked, and only under the session's working directory. Changes made by `bash`, scripts, external programs or subagents are **not** tracked; the plugin never claims a complete workspace snapshot.
|
|
64
|
+
- **Before every write.** The engine records the content before the tool runs, deduplicated by SHA-256 under `<DSH_HOME>/session-rewind/blobs/`. Before restoring, it verifies the current file still matches the last recorded state; any mismatch aborts the whole file operation with a conflict list.
|
|
65
|
+
- **Rescue before mutation.** All current affected files are copied to a rescue point first. If that fails, nothing is written. A failed restore rolls back applied files from the rescue point; failed rollbacks are reported. The five latest rescue points per session can be restored from the Rewind panel (a new rescue is created first).
|
|
66
|
+
- **Destructive operations go to trash.** Files created after the rewind target are moved to `<DSH_HOME>/session-rewind/trash/<session>/<auditId>/`, never `rm`'d. Files larger than 8 MiB, symlinks and excluded trees are left alone and reported.
|
|
67
|
+
- **No undo.** This plugin deliberately does not implement conversation undo/redo (it would require patching DSH internals). The withdrawn content stays in the session log and the Rewind panel; file-level recovery is available through rescue points and trash.
|
|
68
|
+
- **Order.** Preview and conflict checks run before anything is written; then the rescue point; then the conversation marker; then file writes. Once the marker is appended the conversation rewind stands even if file writes fail (they are reported and audited).
|
|
69
|
+
|
|
70
|
+
## Data & retention
|
|
71
|
+
|
|
72
|
+
All plugin data lives under `<DSH_HOME>/session-rewind/` (`DSH_HOME` defaults to `~/.dsh`):
|
|
73
|
+
|
|
74
|
+
| Path | Contents |
|
|
75
|
+
| ------------------------------- | ---------------------------------------------------- |
|
|
76
|
+
| `blobs/` | content-addressed file contents (SHA-256) |
|
|
77
|
+
| `sessions/<id>/entries.jsonl` | per-session file change records (newest shown first) |
|
|
78
|
+
| `trash/<session>/<auditId>/` | files created after a rewind target |
|
|
79
|
+
| `rescues/<session>/<rescueId>/` | rescue points (current files before a restore) |
|
|
80
|
+
| `audit.jsonl` | one line per rewind (append-only) |
|
|
81
|
+
|
|
82
|
+
On startup the plugin also removes data for sessions that no longer exist (they were deleted); the audit log is kept. Retention: the 20 latest message anchors per session, the 5 latest rescue points, the 20 latest trash operations (30 days), and a 1 GiB soft cap across blobs/trash/rescues. When the cap is exceeded, old trash → old rescues → unreferenced blobs → oldest anchors are cleaned in that order; if still over the cap, new captures stop and diagnostics report it (no referenced data is deleted). Uninstalling keeps the data. The data root can be overridden with the plugin's `dataRoot` config.
|
|
83
|
+
|
|
84
|
+
## Side effects & risks
|
|
85
|
+
|
|
86
|
+
- **Appends one marker event per rewind** to the current session log; nothing is deleted or rewritten.
|
|
87
|
+
- **Writes and deletes workspace files only in file mode**, after confirmation, with the safety described above.
|
|
88
|
+
- **The marker is visible to the model** as a short `(empty message)` user message where the withdrawn turns used to be. It is not shown in the transcript.
|
|
89
|
+
- **No network, no telemetry.** Everything is local; file snapshots may contain sensitive content, so treat `<DSH_HOME>/session-rewind/` like your workspace.
|
|
90
|
+
- **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.
|
|
91
|
+
- **POSIX/macOS paths only** in this version; Windows separators and permission bits are not verified.
|
|
92
|
+
|
|
93
|
+
## Compatibility
|
|
94
|
+
|
|
95
|
+
| DSH version | Status |
|
|
96
|
+
| ----------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
97
|
+
| 0.2.2-rc.1 | Verified: `pnpm smoke:session-rewind` (31/31) + 158 unit tests + CDP-driven desktop pass (conversation-only and file modes) |
|
|
98
|
+
|
|
99
|
+
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.
|
|
100
|
+
|
|
101
|
+
## Development
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pnpm test # unit tests (host engine, host RPC, client helpers)
|
|
105
|
+
pnpm verify # repo-wide gates
|
|
106
|
+
pnpm smoke:session-rewind # temp DSH home + real GUI end-to-end (needs dsh & ego-browser)
|
|
107
|
+
pnpm smoke:session-rewind-desktop # read-only desktop check (needs --remote-debugging-port=9222)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
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).
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
MIT
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# @kangyishuai/dsh-session-rewind
|
|
2
|
+
|
|
3
|
+
> DeepSeek Harness 的「就地回溯」:把会话退回到任意一条用户消息之前,目标消息及其后的内容同时从模型上下文和渲染对话中撤回;可选择一并还原这些轮次改过的工作区文件;目标消息文本(和图片)自动回填输入框。
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@kangyishuai/dsh-session-rewind) [](#兼容性) [](./LICENSE)
|
|
6
|
+
|
|
7
|
+
[English](./README.md)
|
|
8
|
+
|
|
9
|
+
非官方插件,与 DeepSeek 无关。面向 [DeepSeek Harness (DSH)](https://github.com/deepseek-ai/deepseek-harness)。
|
|
10
|
+
|
|
11
|
+
> **状态:早期。** 已在 DSH 0.2.2-rc.1 上端到端验证:一次性 DSH 目录里 31 项 GUI 断言 + 158 个单测 + CDP 驱动的桌面版实测(冲突拒绝、对话+文件回退、新建文件进回收站、修改文件还原、救援点恢复、面板/审计/诊断)。插件还年轻,重要数据请自行备份。
|
|
12
|
+
|
|
13
|
+
## 它做什么
|
|
14
|
+
|
|
15
|
+
长对话会跑偏。几轮之后你希望当初换个问法,但新开一个会话会丢掉之前的全部上下文,继续聊又会让不想要的几轮永远占着上下文窗口。这个插件做**就地回溯**:
|
|
16
|
+
|
|
17
|
+
- **两个入口**:连按两次 `Esc` 打开回溯对话框;或点任意用户消息操作行里、复制按钮旁边的 ↶ 按钮。
|
|
18
|
+
- **每次回溯二选一**:确认框里提供「**仅回退对话**」(默认)与「**回退对话和文件**」,并先展示 dry-run 预览:将撤回多少条消息、约多少 token、哪些文件会还原/移入回收站、冲突与被跳过的文件。
|
|
19
|
+
- **对话**:目标消息及其后的内容从模型上下文和渲染对话中撤回;会话 id、标题和目标之前的历史不变;日志只追加一条 marker,不删历史。
|
|
20
|
+
- **文件(可选)**:被撤回轮次里由 `write` / `edit` / `apply_patch` 改过的文件还原到改动前内容;目标之后新建的文件移入插件回收站而不是删除。写入前先建救援点,失败从救援点回滚。
|
|
21
|
+
- **输入框**:目标消息文本(以及图片)放回输入框,改完可直接重发;已有草稿绝不覆盖。
|
|
22
|
+
- **回溯面板**:会话头部新增一个入口,四个页签:**已撤回**(每次回溯撤回的全部消息,可搜索、复制、放回输入框)、**回溯记录**(审计:范围、条数、token、文件结果)、**救援点**(手动恢复文件)、**设置**(默认范围、每页数量、列表确认、诊断)。
|
|
23
|
+
|
|
24
|
+
## 安装
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
dsh plugin --profile desktop add @kangyishuai/dsh-session-rewind
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
如果要用工作区里的代码而不是发布版,先打包再装——`link:` 装法不行(宿主的 `@deepseek-ai/*` 解析只覆盖真实路径位于 profile 内的包):
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cd packages/session-rewind
|
|
34
|
+
pnpm pack --pack-destination /tmp
|
|
35
|
+
dsh plugin --profile desktop add /tmp/kangyishuai-dsh-session-rewind-*.tgz
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
改完代码要重新 `pnpm pack` + `add`。插件带宿主半,装完重启 DSH 桌面版并刷新页面。
|
|
39
|
+
|
|
40
|
+
## 用法
|
|
41
|
+
|
|
42
|
+
**键盘 — `Esc` `Esc`。** 空闲会话里快速连按两次 Escape,打开回溯对话框:按时间倒序列出用户消息,可搜索、↑/↓ 选择、Enter 或点击;随后进入预览/确认框,选范围并确认。回合运行中 `Esc` `Esc` 保持原生「停止」含义;停下后再按两次即可。
|
|
43
|
+
|
|
44
|
+
**消息操作 — ↶。** 每条用户消息的复制按钮旁都有 ↶;点开同一个预览/确认框,确认后才执行。
|
|
45
|
+
|
|
46
|
+
**命令。** `/rewind` 打开同一份候选列表;`/rewind @<序号> [chat|both]` 直接执行(序号在列表里可见)。客户端会接管裸 `/rewind`,不会把命令发给模型。
|
|
47
|
+
|
|
48
|
+
**回溯之后**,目标文本回到输入框(图片尽力重新挂回)并获得焦点。如果输入框里本来有草稿,不会被覆盖,并会提示草稿已保留。
|
|
49
|
+
|
|
50
|
+
**会被拒绝的情况**
|
|
51
|
+
|
|
52
|
+
| 情况 | 表现 |
|
|
53
|
+
| ----------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
54
|
+
| 会话有正在运行的回合 | 宿主返回 `session-rewind/busy`;先停止回合再回溯。 |
|
|
55
|
+
| 子代理会话 | 没有 ↶ 按钮,`Esc` `Esc` 也不弹框:宿主拒绝对这类会话的通用 RPC。 |
|
|
56
|
+
| 目标消息已被 compaction 遮蔽 | 拒绝;回溯边界必须仍在模型上下文里。 |
|
|
57
|
+
| 文件在上次记录后被外部修改 | 文件模式整体拒绝并列出冲突文件;一个文件都不动。 |
|
|
58
|
+
| 文件超过 8 MiB、是符号链接、或在 `.git` / `node_modules` 下 | 该文件跳过并报告,其余文件继续。 |
|
|
59
|
+
| 同一会话已有回溯在执行 | 拒绝;一次只允许一个。 |
|
|
60
|
+
|
|
61
|
+
## 文件还原的范围与安全
|
|
62
|
+
|
|
63
|
+
- **只追踪写类工具**:`write` / `edit` / `apply_patch`,且只限会话工作目录。`bash`、脚本、外部程序、子代理的改动**不在追踪范围**,插件不会声称做过完整工作区快照。
|
|
64
|
+
- **写前记录**:工具执行前记录内容,按 SHA-256 去重存到 `<DSH_HOME>/session-rewind/blobs/`。还原前逐个比对「当前内容」与「最后一次记录的 after」,不一致就整体中止并列出冲突。
|
|
65
|
+
- **先救援点、再写入**:还原前把当前受影响文件复制成救援点;救援点失败则一个字节都不写。恢复逐文件写回/移入回收站,写后校验哈希;失败用救援点回滚,回滚失败也会报告。每个会话保留最近 5 份救援点,可在回溯面板手动恢复(恢复前会再建一份救援点)。
|
|
66
|
+
- **删除走回收站**:目标之后新建的文件移入 `<DSH_HOME>/session-rewind/trash/<session>/<auditId>/`,不会 `rm`。超限/符号链接/被排除目录的文件保持原样并报告。
|
|
67
|
+
- **没有 undo**:本插件刻意不做真 undo/redo(那需要 patch 宿主内部)。被撤回的内容仍在会话日志和回溯面板里;文件层面可用救援点或回收站手动恢复。
|
|
68
|
+
- **顺序**:预览与冲突检查 → 建救援点 → 追加会话 marker → 写文件。marker 一旦写入,对话回退即生效;文件失败只报告并写审计,不回滚对话。
|
|
69
|
+
|
|
70
|
+
## 数据与保留
|
|
71
|
+
|
|
72
|
+
所有数据在 `<DSH_HOME>/session-rewind/`(`DSH_HOME` 默认 `~/.dsh`):
|
|
73
|
+
|
|
74
|
+
| 路径 | 内容 |
|
|
75
|
+
| ------------------------------- | ----------------------------- |
|
|
76
|
+
| `blobs/` | 内容寻址的文件内容(SHA-256) |
|
|
77
|
+
| `sessions/<id>/entries.jsonl` | 每个会话的文件改动记录 |
|
|
78
|
+
| `trash/<session>/<auditId>/` | 回溯时新建文件的回收站 |
|
|
79
|
+
| `rescues/<session>/<rescueId>/` | 还原前的救援点 |
|
|
80
|
+
| `audit.jsonl` | 每次回溯一行(只追加) |
|
|
81
|
+
|
|
82
|
+
启动时会自动清理已删除会话的残留数据(entries/trash/救援点);审计日志保留。保留策略:每会话最近 20 个消息锚点、最近 5 份救援点、最近 20 次回收站操作(30 天)、blobs/trash/rescues 合计 1 GiB 软上限。超限时按「旧回收站 → 旧救援点 → 无引用 blob → 最旧锚点」清理;仍超限则停止新捕获并在诊断里告警(不删有引用的数据)。卸载保留数据。数据根可用插件配置 `dataRoot` 覆盖。
|
|
83
|
+
|
|
84
|
+
## 副作用与风险
|
|
85
|
+
|
|
86
|
+
- **每次回溯追加一条 marker** 到当前会话日志;不删除、不改写历史。
|
|
87
|
+
- **仅在文件模式下写/删工作区文件**,且经过确认与上述安全流程。
|
|
88
|
+
- **marker 对模型可见**:在被撤回回合的位置,模型会看到一条很短的 `(empty message)` user 消息;界面不显示它。
|
|
89
|
+
- **不联网、不上报**;文件快照可能含敏感内容,请把 `<DSH_HOME>/session-rewind/` 当工作区数据对待。
|
|
90
|
+
- **客户端私有 seam**:隐藏行和注入 ↶ 按钮依赖 DSH 内部 view/slot 注册表;安装时做形状检查,失效时降级为「上下文已回溯、界面不隐藏」或「按钮消失」,不破坏会话。
|
|
91
|
+
- **本版只验证 POSIX/macOS 路径**;Windows 分隔符与权限位未验证。
|
|
92
|
+
|
|
93
|
+
## 兼容性
|
|
94
|
+
|
|
95
|
+
| DSH 版本 | 状态 |
|
|
96
|
+
| ---------- | ------------------------------------------------------------------------------------------------- |
|
|
97
|
+
| 0.2.2-rc.1 | 已验证:`pnpm smoke:session-rewind` 31/31 + 158 个单测 + CDP 驱动的桌面版实测(仅对话与文件模式) |
|
|
98
|
+
|
|
99
|
+
插件不声明 `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 变了会降级而不是让会话出错。
|
|
100
|
+
|
|
101
|
+
## 开发
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pnpm test # 单测(宿主文件引擎、宿主 RPC、客户端 helper)
|
|
105
|
+
pnpm verify # 仓库统一门禁
|
|
106
|
+
pnpm smoke:session-rewind # 临时 DSH 目录 + 真实 GUI 端到端(需要 dsh 与 ego-browser)
|
|
107
|
+
pnpm smoke:session-rewind-desktop # 只读桌面回归(需要以 --remote-debugging-port=9222 重启)
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
设计记录:[ADR 0006](../../docs/adr/0006-session-rewind-architecture.md)、[ADR 0007](../../docs/adr/0007-session-rewind-file-restore.md)。
|
|
111
|
+
|
|
112
|
+
## License
|
|
113
|
+
|
|
114
|
+
MIT
|
package/cordis.patch.yml
ADDED