dsh-recall-plugin 2.3.0 → 2.3.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/CHANGELOG.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  本文件格式遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循语义化版本。
4
4
 
5
+ ## [2.3.1] - 2026-09-01
6
+
7
+ 修复批次(PR #13 贡献,macOS 实机验证;Windows 侧本仓库复核)。单测 285 → 290 例全绿(新增 `nextShadowPriority` 5 例)、`test:probe` 探针 29 → 31 例全绿(新增 `slots.entries` 双包探测)、`verify:host` 装配门禁全绿。
8
+
9
+ ### 修复
10
+
11
+ - **兼容 dsh-turn-fold 的用户消息渲染槽位**:`conversation.chat.node` 的 `user` key 改为在槽位回调实际执行时读取已占用的 priority,并自动选择当前最低 priority 再低一级,避免与 `dsh-turn-fold` 等第三方插件固定占用 `-1` 时发生冲突;其他插件继续占用更低 priority 时也会自动避让。
12
+ - **POSIX diff awk 程序多余点号导致预览/回退失败**:`lib/scripts.posix.js` 的 `diffScript` 中 awk 程序起始引号后混入多余 `.`(v2.2.0 随 PF-1 引入),awk 报语法错误退出非零,macOS/Linux 上点「撤回」预览即失败、无法回退;Windows 走 pwsh 路径不受影响,故此前仅 Windows 冒烟未暴露。
13
+
14
+ ### 变更
15
+
16
+ - **dsh 升级一键核验门禁 `npm run check:upgrade`**:串联 check:dsh + test:probe + verify:host 三层机器化核验,输出后提示在 compat-audit.md 头部追加核验记录——dsh 升级后一条命令替代手动三步。
17
+ - **compat 台账复查方式增强**:I1/I3/I4/I5/I7/I9/I12/I18/I20 复查动作补官方产物证据链(读哪个包哪个文件、断言什么),修正 I1 与 I29 的 priority 语义脱节(guard 强制分配 shadowing priority)、I5 补「context 键已评估无害」结论;I9/I15/I19/I22/I23 出处标注「非官方耦合」(项目内约定,dsh 升级复查不涉及)。
18
+ - **字段探针补盲 + 负向断言**:fork 探针改双包探测(原指向已删除的 dsh-client-runtime,alpha.3 下静默零断言)+ atSeq/increaseTitle 严格可选负向断言;settings RPC 探针迁至 dsh-api-settings-controller(原 dsh-host-apiproxy 已删除);新增 I1/I3/I4/I7/I8/I9/I12/I18/I20 断言与 ConversationNode 节点集合断言——官方新增投影 kind / 收紧可选参数 / 删除字段即红。探针 29 例全绿。
19
+
5
20
  ## [2.3.0] - 2026-08-31
6
21
 
7
22
  修复批次:适配 dsh 0.1.2 / 0.1.2-alpha.2(兼容 0.1.1-rc.2)。单测 285 例全绿,`verify:host` 装配门禁、`check:dsh` 巡检、`test:probe` 探针全绿;新旧两版 DSH(0.1.1-rc.2 / 0.1.2-alpha.2,Windows)实弹验证通过——撤回按钮、设置页「撤回插件」卡片、快照删除均正常。
package/README.md CHANGED
@@ -2,14 +2,11 @@
2
2
 
3
3
  简体中文 | [English](README.en.md)
4
4
 
5
- ![npm](https://img.shields.io/npm/v/dsh-recall-plugin?label=npm&color=cb3837)
5
+ [![npm version](https://img.shields.io/npm/v/dsh-recall-plugin.svg)](https://www.npmjs.com/package/dsh-recall-plugin)
6
+ [![npm downloads](https://img.shields.io/npm/dm/dsh-recall-plugin.svg)](https://www.npmjs.com/package/dsh-recall-plugin)
6
7
  ![License](https://img.shields.io/badge/license-MIT-blue)
7
- ![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20Linux%20%7C%20macOS-blue)
8
- ![Build](https://img.shields.io/badge/%E7%BA%AFJS-green)
9
-
10
- ![DSH](https://img.shields.io/badge/DSH-0.1.1--rc.2-blue)
11
- ![DSH](https://img.shields.io/badge/DSH-0.1.1--rc.1-blue)
12
- ![DSH](https://img.shields.io/badge/DSH-Desktop-blue)
8
+ [![DSH](https://img.shields.io/badge/DSH-0.1.1--rc.2-blue)](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.1.1-rc.2)
9
+ [![DSH](https://img.shields.io/badge/DSH-0.1.2--alpha.3-red)](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.1.2-alpha.3)
13
10
  ---
14
11
  **在任意一条你发过的消息下方**,**点「↶ 撤回」**,**工作区文件和对话历史一起回到那条消息发出之前的状态**(DSH 0.1.1-rc.2)。
15
12
  ---
@@ -67,15 +64,15 @@ dsh plugin --profile web add dsh-recall-plugin
67
64
  ```powershell
68
65
  dsh plugin --profile web add github:limbo947/dsh-recall-plugin
69
66
  ```
70
- - 重启 DSH 进程(按你的启动方式,任选其一)
67
+
68
+ - 卸载:同时移除依赖与挂载,快照数据保留在 home 下 `dsh-recall-snapshots/`,想彻底清除手动删掉该目录即可。
71
69
  ```powershell
72
- dsh web # 前台直接启动
73
- pm2 restart <你的dsh进程名> # 若用 pm2 托管
70
+ dsh plugin --profile web remove dsh-recall-plugin
74
71
  ```
75
72
 
76
- **验证**:重启后硬刷新页面(Ctrl+Shift+R),悬停任意一条插件启用后发送的用户消息——复制按钮旁出现「↶」即生效。没有按钮?九成是没重启 DSH 进程,或 git CLI 不在 PATH 里。
73
+ - 验证:重启后硬刷新页面(Ctrl+Shift+R),悬停任意一条插件启用后发送的用户消息——复制按钮旁出现「↶」即生效。没有按钮?九成是没重启 DSH 进程,或 git CLI 不在 PATH 里。
74
+
77
75
 
78
- **卸载**:`dsh plugin --profile web remove dsh-recall-plugin`(同时移除依赖与挂载层),快照数据保留在 home 下 `dsh-recall-snapshots/`,想彻底清除手动删掉该目录即可。
79
76
 
80
77
  ## 使用
81
78
 
package/lib/client.js CHANGED
@@ -1419,6 +1419,15 @@ function buildSettingsCards(React, util, sessionsSvc) {
1419
1419
  }
1420
1420
 
1421
1421
  // src/client/app.js
1422
+ function nextShadowPriority(entries, key) {
1423
+ let priority = -1;
1424
+ for (const entry of Array.isArray(entries) ? entries : []) {
1425
+ if (!entry || !entry.options || entry.options.key !== key) continue;
1426
+ const occupied = Number.isFinite(entry.options.priority) ? entry.options.priority : 0;
1427
+ if (occupied <= priority) priority = occupied - 1;
1428
+ }
1429
+ return priority;
1430
+ }
1422
1431
  function createApp(React) {
1423
1432
  return function apply(ctx) {
1424
1433
  const slots = ctx.slots;
@@ -1438,17 +1447,16 @@ function createApp(React) {
1438
1447
  const { UserRecallNode } = buildRecallNode(React, util, ctx, sessionsSvc, workspacesSvc);
1439
1448
  const { RecallSettingsCard } = buildSettingsCards(React, util, sessionsSvc);
1440
1449
  for (const slotKey of ["user", "steering"]) {
1441
- let mounted = false;
1442
- for (let priority = -1; priority >= -3 && !mounted; priority--) {
1443
- try {
1444
- slots.inject("conversation.chat.node", () => slots.register(
1450
+ try {
1451
+ slots.inject("conversation.chat.node", () => {
1452
+ const priority = nextShadowPriority(slots.entries("conversation.chat.node"), slotKey);
1453
+ return slots.register(
1445
1454
  { name: "conversation.chat.node", key: slotKey, priority },
1446
1455
  UserRecallNode
1447
- ));
1448
- mounted = true;
1449
- } catch (error) {
1450
- if (priority === -3) console.error("[dsh-recall-plugin] slot register failed (" + slotKey + "):", error);
1451
- }
1456
+ );
1457
+ });
1458
+ } catch (error) {
1459
+ console.error("[dsh-recall-plugin] slot register failed (" + slotKey + "):", error);
1452
1460
  }
1453
1461
  }
1454
1462
  try {
@@ -328,7 +328,7 @@ export function diffScript(root, store, gitExe, tag, base) {
328
328
  'set -e -o pipefail',
329
329
  collectListsBlock(store, gitExe, root, tag, base),
330
330
  "trap 'rm -f \"$tmpc\" \"$tmpt\"' EXIT",
331
- 'awk -F\'\\t\' -v OFS=\'\\t\' \'.',
331
+ 'awk -F\'\\t\' -v OFS=\'\\t\' \'',
332
332
  ' FNR==1 { fidx++ }',
333
333
  ' fidx==1 { split($1, a, " "); cur[$2]=a[2]; next }',
334
334
  ' { split($1, a, " "); tgt[$2]=a[3] }',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-recall-plugin",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "DSH 消息撤回插件:在用户消息气泡旁加「撤回」按钮,把项目文件(独立影子 git 仓库快照)与对话历史(官方 fork)一并回退到该消息发送之前。",
5
5
  "type": "module",
6
6
  "repository": {
@@ -29,6 +29,7 @@
29
29
  },
30
30
  "scripts": {
31
31
  "check:dsh": "node scripts/check-dsh-version.mjs",
32
+ "check:upgrade": "node scripts/check-upgrade.mjs",
32
33
  "build": "node scripts/build-client.mjs",
33
34
  "test": "vitest run tests/unit",
34
35
  "test:probe": "vitest run tests/probe",