dsh-recall-plugin 2.4.3 → 2.4.4
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 +10 -0
- package/README.en.md +2 -2
- package/README.md +2 -2
- package/lib/client.js +12 -1
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
本文件格式遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循语义化版本。
|
|
4
4
|
|
|
5
|
+
## [2.4.4] - 2026-09-24
|
|
6
|
+
|
|
7
|
+
### 修复
|
|
8
|
+
|
|
9
|
+
- **反向代理子路径部署下插件全部调用失效(端点路径写成了根绝对路径)**:dsh 0.1.7-rc.1 起官方支持「Web 挂在反向代理子路径」,口径是客户端把服务端路径按**文档基址**解析——index 由 `dsh-host-frontend-static` 注入 `<base href="./">`、前端资源改相对引用、`dsh-api-gateway` 用 `streamBaseUrl ?? document.baseURI`、connection RPC 直接 POST 去前导斜杠的相对路由。插件客户端原先硬编码根绝对 `fetch('/api/recall/<name>')`:子路径部署下浏览器会越过前缀打到代理未映射的根,预览/撤回/快照管理/设置卡片全部失效。实弹(真宿主 + 只映射 `/dsh/*` 的反向代理):带前缀 `POST /dsh/api/recall/status` → 200、根绝对 `POST /api/recall/status` → 404。修复=新增 `src/client/util.ts` 的 `recallApiUrl(name, base?)` 统一解析端点 URL(基址缺尾斜杠按目录补齐,避免直接访问 `/dsh` 时前缀被当作文件名吞掉;无 `document`/基址非法回落原根绝对路径,旧环境行为不变),`api()` 唯一调用点改走它。Host 端零改动——代理剥前缀后宿主见到的仍是 `/api/recall/*`,exact 路由照常命中。配套 5 条单测(根/子路径/多级/缺尾斜杠/回落 + fetch 桩钉调用点 URL)与 3 条探针(I40:`<base href="./">` 注入、前端资源相对引用、官方 `document.baseURI` 对照),台账见 compat-audit I40。
|
|
10
|
+
|
|
11
|
+
### 变更
|
|
12
|
+
|
|
13
|
+
- **兼容声明同步 dsh 0.1.7-rc.1(零破坏核验,无代码改动)**:全局实装 `@deepseek-ai/dsh@0.1.7-rc.1`(npm dist-tag `next`)后以**全树内容级 diff** 核验——升级前对 alpha.2 整包做快照,升级后比对得 915 条变更(853 改 / 49 增 / 9 删 / 4 重命名)、647 个非 package.json 文件有真实内容差异(其中 320 个为随包 LibreOffice 运行时)。插件消费面**零破坏**:`dsh-session`/`dsh-session-query`/`dsh-shell`/`dsh-pwsh-local`/`dsh-sandbox-policy`/`dsh-host-webserver`/`dsh-client-connection`/`dsh-client-modules`/`dsh-settings`/`dsh-agent{,-loop}`/`dsh-attachment{,-local}`/`dsh-workspace` 等 24 个包与整个 cordis vendor 栈内容字节级一致(仅版本号),三个关键契约文件(`ui-chat`/`ui-conversation` 的 `contract/slots.d.ts`、`api-session-controller` 的 `contract/session.d.ts`)**SHA256 相同**;真改动集中在 `ui-chat`(工具调用准备态/本地图片预览)、`ui-conversation`(`RunningToolCall` 拆 preparing/start 两阶段、瞬态 start 语义)、`api-session-controller`(assistant 流退休记账)与 `ui-plugin-manager`(host 侧安装/失败类型),均不在插件消费面(插件不定义 ConversationNode、不消费工具调用类型)。**本版新增机制**:启动期插件/runtime 兼容性门禁——按 `peerDependencies` 中 `@deepseek-ai/dsh[-*]` 条目用 `semver.satisfies(runtime, range, { includePrerelease: true })` 判定,不兼容的行启动期整行禁用(可由 profile `compatibility.json` 或 `dsh plugin allow-version` 豁免),安装命令在 pnpm 前预检;本插件 6 条 peer 实测放行 0.1.7-rc.1、无需豁免(`dsh.compatibility.dshReleases` 仍是市场台账声明,非安装门禁)。门禁:`test:probe` 49/49、`npm test` 430/430、`verify:host` 装配断言全过、`typecheck` 通过、`build` 产物零漂移。同步项:`dshReleases` 补 `0.1.7-rc.1: compatible`(peer 范围 `>=0.1.7-alpha.1 <0.1.8` 天然覆盖,无需新 tuple)、`docs/reference/` 镜像按 `dsh-v0.1.7-rc.1` tag 重拉(13 源中仅 11 号对话节点文档有实质差异 +182 字符)、`docs/dsh-contract.md` 与 compat-audit 头部版本字段同步、README 双语徽章与兼容范围同步,评估实证见 `docs/upgrade-assessments/dsh-0.1.7-rc.1.md`。观察项(不阻塞、均非回归):peer 区间升级为启动硬门槛(新 minor 线需先核验再开窗);子路径部署与 SSH 远端工作区两个新场景下插件未验证(插件 API 走绝对路径、影子仓库假定本机文件系统)。
|
|
14
|
+
|
|
5
15
|
## [2.4.3] - 2026-09-23
|
|
6
16
|
|
|
7
17
|
### 修复
|
package/README.en.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|

|
|
8
8
|

|
|
9
9
|
|
|
10
|
-
[](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.1.7-rc.1)
|
|
11
11
|

|
|
12
12
|
---
|
|
13
13
|
Under any message you've sent, click "↶ Recall" — **your workspace files and the conversation history roll back to just before that message was sent**.
|
|
@@ -69,7 +69,7 @@ Boundaries accepted by design and edge cases not yet covered — worth checking
|
|
|
69
69
|
|
|
70
70
|
## Installation
|
|
71
71
|
|
|
72
|
-
Prerequisites: git CLI (without it the recall button won't appear and a notice shows at the top of the page — DSH itself keeps running); PowerShell 5.1 / 7 on Windows, bash + git on Linux/macOS; DSH `0.1.2-alpha.1` through `0.1.7-
|
|
72
|
+
Prerequisites: git CLI (without it the recall button won't appear and a notice shows at the top of the page — DSH itself keeps running); PowerShell 5.1 / 7 on Windows, bash + git on Linux/macOS; DSH `0.1.2-alpha.1` through `0.1.7-rc.1` (peerDependencies open a window per minor line: `>=0.1.2-alpha.1 <0.1.3 || >=0.1.3-alpha.1 <0.1.4 || >=0.1.5-alpha.1 <0.1.6 || >=0.1.6-alpha.1 <0.1.7 || >=0.1.7-alpha.1 <0.1.8`, consistent with the `dsh.compatibility.dshReleases` declaration; each line is anchored at its first verified version with an exclusive upper bound at the next minor, so later prereleases/releases within a verified line are admitted without touching the peer declaration, while unverified new minor lines remain blocked). **0.1.7-alpha.1 is a breaking release** (`ShellExecutor.run`/`start` became `execute().result()`, and the settings surface became `SettingsForms`, addressed by profile entry id with `.volatile()` marked fields), and the plugin ships **both seams side by side**: the same release keeps working on every 0.1.2–0.1.6 line and on 0.1.7, with unchanged behaviour on older DSH versions. `0.1.1-rc.2` and earlier are no longer declared supported: their client runtime lacks the `sessions`/`workspaces`/`uiWorkspace` services, so the plugin UI silently fails to render.
|
|
73
73
|
|
|
74
74
|
- Official DSH plugin command: install and auto-mount into the web profile
|
|
75
75
|
```powershell
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://www.npmjs.com/package/dsh-recall-plugin)
|
|
6
6
|
[](https://www.npmjs.com/package/dsh-recall-plugin)
|
|
7
7
|

|
|
8
|
-
[](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.1.7-rc.1)
|
|
9
9
|
---
|
|
10
10
|
在任意一条你发过的消息下方点「↶ 撤回」——**工作区文件和对话历史一起回到那条消息发出之前的状态**。
|
|
11
11
|
---
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
|
|
68
68
|
## 安装
|
|
69
69
|
|
|
70
|
-
前置:git CLI(未装时撤回按钮不出现,页面顶部会提示安装 git,不影响 DSH 运行);Windows 上 PowerShell 5.1 / 7 均可,Linux/macOS 需 bash + git;DSH `0.1.2-alpha.1` 至 `0.1.7-
|
|
70
|
+
前置:git CLI(未装时撤回按钮不出现,页面顶部会提示安装 git,不影响 DSH 运行);Windows 上 PowerShell 5.1 / 7 均可,Linux/macOS 需 bash + git;DSH `0.1.2-alpha.1` 至 `0.1.7-rc.1`(peerDependencies 为按 minor 版本线开窗 `>=0.1.2-alpha.1 <0.1.3 || >=0.1.3-alpha.1 <0.1.4 || >=0.1.5-alpha.1 <0.1.6 || >=0.1.6-alpha.1 <0.1.7 || >=0.1.7-alpha.1 <0.1.8`,与 `dsh.compatibility.dshReleases` 声明一致;每条线以首个核验版本为下限、开一条上界到下一 minor 的区间,同线内后续 prerelease/正式版自动放行、无需改 peer 声明,未核验的新 minor 线仍被拦截)。**0.1.7-alpha.1 是破坏性版本**(`ShellExecutor` 的 `run`/`start` 换成 `execute().result()`;settings 面换成 `SettingsForms`、按 profile 条目 id 寻址并要求字段标 `.volatile()`),插件已做**双分支共存适配**——同一次发布同时兼容 0.1.2–0.1.6 各线段与 0.1.7,老版本 DSH 上的行为不变。`0.1.1-rc.2` 及更早不再声明支持:那条线的客户端运行时没有 `sessions`/`workspaces`/`uiWorkspace` 服务,插件 UI 会静默不渲染。
|
|
71
71
|
|
|
72
72
|
|
|
73
73
|
- DSH 官方插件命令:安装并自动挂载进 web profile
|
package/lib/client.js
CHANGED
|
@@ -265,6 +265,17 @@
|
|
|
265
265
|
}
|
|
266
266
|
return wsList;
|
|
267
267
|
}
|
|
268
|
+
function recallApiUrl(name, base) {
|
|
269
|
+
const root = base ?? (typeof document === "undefined" ? "" : document.baseURI);
|
|
270
|
+
if (!root) return "/api/recall/" + name;
|
|
271
|
+
try {
|
|
272
|
+
const baseUrl = new URL(root);
|
|
273
|
+
if (!baseUrl.pathname.endsWith("/")) baseUrl.pathname += "/";
|
|
274
|
+
return new URL("api/recall/" + name, baseUrl).href;
|
|
275
|
+
} catch (e) {
|
|
276
|
+
return "/api/recall/" + name;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
268
279
|
function useAutoDismissMessage(React, state, setState) {
|
|
269
280
|
React.useEffect(() => {
|
|
270
281
|
if (!state.message || state.error || state.busy) return;
|
|
@@ -276,7 +287,7 @@
|
|
|
276
287
|
}
|
|
277
288
|
function buildUtil() {
|
|
278
289
|
function api(name, args) {
|
|
279
|
-
return fetch(
|
|
290
|
+
return fetch(recallApiUrl(name), {
|
|
280
291
|
method: "POST",
|
|
281
292
|
headers: { "content-type": "application/json" },
|
|
282
293
|
body: JSON.stringify(args || {})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-recall-plugin",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"description": "在 DSH 中撤回自己发过的消息:工作区文件与对话历史一起回到那条消息发出之前,消息的文本与附件自动放回输入框,改完即可重发。文件走独立影子 git 快照(不碰项目自身的 git),对话走官方 sessions.fork,原会话归档可找回。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -60,7 +60,8 @@
|
|
|
60
60
|
"0.1.6-alpha.1": "compatible",
|
|
61
61
|
"0.1.6-alpha.2": "compatible",
|
|
62
62
|
"0.1.7-alpha.1": "compatible",
|
|
63
|
-
"0.1.7-alpha.2": "compatible"
|
|
63
|
+
"0.1.7-alpha.2": "compatible",
|
|
64
|
+
"0.1.7-rc.1": "compatible"
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
67
|
},
|