dsh-recall-plugin 2.3.0 → 2.3.2

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,51 @@
2
2
 
3
3
  本文件格式遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循语义化版本。
4
4
 
5
+ ## [2.3.2] - 2026-09-04
6
+
7
+ ### 修复
8
+
9
+ - **设置页表单跨行对齐修复(V4 跟进)**:配置表单的勾选框(快照行为三行)与数字输入框(自动治理五行)此前各行的 label 列宽独立计算、控件列参差——根因是每行 `.cfg-row` 是独立 grid 容器,V4 的「第一列 `max-content` 自适应最长标签」只在同一 grid 内生效,跨行从未成立。现引入单一共享 grid(`.cfg-grid`)包裹全表单,`.cfg-row` 以 `display:contents` 透明化,label/控件/hint 直接参与同一网格,控件列由全表单最长 label 统一对齐;分组小标题占满整行;行间节奏(原 flex gap 8px)由 hint `padding-bottom` 补偿保持。同时:三个折叠头(高级基础排除表 / 排除配置 / 快照管理)去掉卡片头样式的 16px 左内边距、与表单内容贴左对齐;配置操作区(放弃修改 / 恢复默认 / 保存)移到「高级:基础排除表」折叠头之前——按钮服务整个表单,排在折叠头之后会被误读为折叠区内容。纯布局修复,无行为变化。
10
+
11
+ - **设置页基础排除表标签关联补漏(V2 跟进)**:「高级:基础排除表」textarea 补 `id` 并与 label 以 `htmlFor` 关联(V2 只覆盖了 numRow 与 exclude.txt 三处,此为同款漏网),读屏可正确播报标签。
12
+
13
+ - **设置页确认条统一与过渡动效(V9)**:四种删除确认(快照 / 会话 / 工作区 / 全部)收敛为同一 `ConfirmRow` 组件,「确认」统一为危险红 chip、「取消」为普通 chip;确认条与树展开增加 opacity 入场过渡(≤200ms),并尊重系统「减少动效」设置自动关闭。纯交互打磨。
14
+
15
+ - **设置页响应式补全(V8)**:exclude 快速添加行在 ≤480px 下输入框独占一行、按钮与建议芯片换行排列;操作区按钮行加 `flex-wrap:wrap`,长状态/错误文案不再挤压按钮。与 V4 共用同一 480px 断点。纯样式增补。
16
+
17
+ - **设置页排版收敛(V7)**:字阶统一为 15/14/13/12 四级(辅助 meta 与标签的 11px 升 12px);SectionToggle 标题内联样式收敛为 class;全量 line-height 改无单位写法(1.4/1.5);声明间距刻度变量 `--dsh-recall-space-1/2/3`(4/8/12)。纯样式整理,无行为变化。
18
+
19
+ - **设置页表单分组与危险操作固定位(V5)**:配置表单 9 字段平铺改为「快照行为 / 自动治理」两组语义分组(带小标题),「高级」维持折叠;快照管理操作区「全部删除」固定为最后一个按钮(刷新 / 立即 gc / 全部删除),不再随「加载更多」出现而漂移。纯结构重排,无行为变化。
20
+
21
+ - **设置页表单布局 Grid 化(V4)**:配置表单从「label 定宽 130px + hint 缩进 138px」魔法数对齐改为 CSS Grid(label 列 `max-content` 自适应最长标签,控件/hint 归第二列);≤480px 窄面板下表单纵向堆叠不挤压;快照树缩进量化为 `--dsh-recall-tree-indent` 单一变量(原来 16+8 恰好等于折叠钮 18+6 的巧合)。纯布局重构,无行为变化。
22
+
23
+ - **设置页健康徽章化与错误区升级(V6)**:快照管理卡片的 git 状态从灰色文案升级为彩色 pill(可用 = 绿 / 不可用 = 红,官方状态行令牌配对),成为卡片顶部横幅;「最近错误」区标题改错误红 + 条数徽章,并从卡片最底部上移到操作区之上——致命状态与历史错误更醒目。纯展示层重排。
24
+
25
+ - **设置页交互反馈(V3)**:禁用按钮/芯片补 `opacity:.5` + 默认光标,且禁用态 hover 不再变色(未修改时的「保存 / 放弃修改」不再误导);三张卡片(配置/排除/快照管理)的成功状态消息 4s 自动消退、错误提示常驻、busy 中不消退;打开「快照管理」先见 pulse 加载骨架再出树,不再是一段空白。纯交互反馈增补。
26
+
27
+ - **设置页可访问性补强(V2)**:快照树折叠钮从纯视觉 `<span>` 升为 `<button>`(Tab/Enter/Space 可达),配 `aria-expanded`/`aria-label`;数字输入 label/input 按 id 关联;三处状态消息加 `role="status"` + `aria-live="polite"`、错误文案补「错误:」文字前缀;三个无标签控件(快照搜索/排除编辑/快速添加)补 `aria-label`;全按钮与输入框补 `:focus-visible` 焦点环(官方 border-l3 惯例)。键盘完全不可达的树折叠是本次最重的功能性缺陷,纯增量修复。
28
+
29
+ - **设置页语义色修复(V1)**:ExcludeCard「保存」按钮去掉危险红样式、与配置表单保存按钮统一;快照文件清单「已修改」badge 从错误红改为 warning(amber)色系——修改不是错误;配置表单三类状态标签分化(「已修改」warn 底色 /「已覆盖」中性灰 /「环境变量锁定」中性灰 + 左边框);`btn-danger` 前景色硬编码 `#fff` 换为官方实证的主题感知令牌 `--dsw-alias-bg-layer-3`,hover 亮度集中为 css.ts 顶部语义变量,消灭令牌体系外散落补丁。纯样式改动,无行为变化。
30
+
31
+ ### 变更
32
+
33
+ - **源码整体迁移 TypeScript(同形态复刻)**:host/client 源码迁入 `src/`(`src/host/` 13 文件 + `src/client/` 6 文件 + `src/types/` 类型库,跨域契约以编译期类型锁死),`lib/` 转为纯构建产物目录——`npm run build` 经 esbuild 逐文件转译 host 产物 + 打包 `lib/client.js`;功能与对外契约零变化(npm 包布局、`main`/`exports`/`files`、`cordis.patch.yml`、端点/探针/装配门禁均不变),行为一致性由类型检查 + 既有回归网双保险。新增 `npm run typecheck`(CI 类型门禁)与统一产物新鲜度校验。
34
+
35
+ ## [2.3.1] - 2026-09-01
36
+
37
+ 修复批次(PR #13 贡献,macOS 实机验证;Windows 侧本仓库复核)。单测 285 → 290 例全绿(新增 `nextShadowPriority` 5 例)、`test:probe` 探针 29 → 31 例全绿(新增 `slots.entries` 双包探测)、`verify:host` 装配门禁全绿。
38
+
39
+ ### 修复
40
+
41
+ - **兼容 dsh-turn-fold 的用户消息渲染槽位**:`conversation.chat.node` 的 `user` key 改为在槽位回调实际执行时读取已占用的 priority,并自动选择当前最低 priority 再低一级,避免与 `dsh-turn-fold` 等第三方插件固定占用 `-1` 时发生冲突;其他插件继续占用更低 priority 时也会自动避让。
42
+ - **POSIX diff awk 程序多余点号导致预览/回退失败**:`lib/scripts.posix.js` 的 `diffScript` 中 awk 程序起始引号后混入多余 `.`(v2.2.0 随 PF-1 引入),awk 报语法错误退出非零,macOS/Linux 上点「撤回」预览即失败、无法回退;Windows 走 pwsh 路径不受影响,故此前仅 Windows 冒烟未暴露。
43
+
44
+ ### 变更
45
+
46
+ - **dsh 升级一键核验门禁 `npm run check:upgrade`**:串联 check:dsh + test:probe + verify:host 三层机器化核验,输出后提示在 compat-audit.md 头部追加核验记录——dsh 升级后一条命令替代手动三步。
47
+ - **compat 台账复查方式增强**:I1/I3/I4/I5/I7/I9/I12/I18/I20 复查动作补官方产物证据链(读哪个包哪个文件、断言什么),修正 I1 与 I29 的 priority 语义脱节(guard 强制分配 shadowing priority)、I5 补「context 键已评估无害」结论;I9/I15/I19/I22/I23 出处标注「非官方耦合」(项目内约定,dsh 升级复查不涉及)。
48
+ - **字段探针补盲 + 负向断言**: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 例全绿。
49
+
5
50
  ## [2.3.0] - 2026-08-31
6
51
 
7
52
  修复批次:适配 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.en.md CHANGED
@@ -138,7 +138,7 @@ When each user message is sent (before the agent touches any files), the workspa
138
138
 
139
139
  ## Local Development (without publishing)
140
140
 
141
- Point the profile's dependency for this package at your clone via `link:`, and changes take effect after restarting DSH (the workspace `lib/` IS the running code — no copying or publishing needed):
141
+ Point the profile's dependency for this package at your clone via `link:`; DSH loads the built `lib/` artifacts from the workspace (source lives in `src/`), so run `npm run build` after editing `src/`, then restart DSH — no copying or publishing needed:
142
142
 
143
143
  ```powershell
144
144
  # 1. Edit $env:USERPROFILE\.dsh\profiles\web\package.json:
@@ -150,15 +150,15 @@ pnpm install
150
150
  # 3. Restart DSH and hard-refresh the page (Ctrl+Shift+R)
151
151
  ```
152
152
 
153
- Note: the browser-side source lives in `src/client/` (multiple files); `lib/client.js` is the esbuild bundle and is committed with the source **you must run `npm run build` after changing `src/client/`**, otherwise the old UI keeps running (CI enforces bundle freshness). The host side (the rest of `lib/`) has no build step.
153
+ Note: all source lives in `src/` (host in `src/host/`, browser side in `src/client/`, shared types in `src/types/`); `lib/` is a pure build-output directory — `npm run build` generates it via esbuild (per-file host transpilation plus the `lib/client.js` bundle), and the artifacts are committed with the source. **You must run `npm run build` after changing any `src/` file**, otherwise the stale artifacts keep running (CI enforces artifact freshness).
154
154
 
155
155
  ### Tests
156
156
 
157
157
  - `npm test`: pure-logic unit tests (vitest, 17 files / 227 cases, no DSH dependency, runs identically in CI and locally) — config parsing, snapshot parsers, rescue orchestration, error classification, script-template same-name-export contract, client pure functions, published-package layout, snapshot index persistence, storage caps and retention, etc.;
158
158
  - `npm run test:probe`: official-API field probes (requires a local dsh installation; **must run after any dsh upgrade**) — pins fields like `renderMessageImages`/`node`/`cwd`, `atSeq`/`increaseTitle` of `sessions.fork`, `listSessions` record shape, `AgentRegistry`, and goes red on violation;
159
159
  - `npm run verify:host`: assembly gate (requires a local dsh installation) — boots the plugin with a real cordis context, asserting inject declarations, endpoint registration, Config schema, and teardown cleanliness, catching assembly regressions before release;
160
- - `npm run build`: bundle the client artifact (mandatory after `src/client/` changes); `npm run check:dsh`: dsh version inspection (pre-release).
161
- - CI (GitHub Actions) runs `npm ci --legacy-peer-deps` + `npm test` + client bundle freshness check (probes and the assembly gate only run on machines with dsh).
160
+ - `npm run build`: full host+client build (mandatory after any `src/` change); `npm run check:dsh`: dsh version inspection (pre-release).
161
+ - CI (GitHub Actions) runs `npm ci --legacy-peer-deps` + `npm run typecheck` + `npm test` + unified artifact-freshness check (`npm run build && git diff --exit-code lib/`; probes and the assembly gate only run on machines with dsh).
162
162
 
163
163
  ## License
164
164
 
package/README.md CHANGED
@@ -1,17 +1,13 @@
1
- # dsh-recall-plugin
1
+ # dsh-recall-plugin ![awesome · DSH plugin](https://awesome-dsh-plugin.com/badge.svg)
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/dt/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.2--rc.1-blue)](https://github.com/deepseek-ai/deepseek-harness/releases/tag/dsh-v0.1.2-rc.1)
13
9
  ---
14
- **在任意一条你发过的消息下方**,**点「↶ 撤回」**,**工作区文件和对话历史一起回到那条消息发出之前的状态**(DSH 0.1.1-rc.2)。
10
+ **在任意一条你发过的消息下方**,**点「↶ 撤回」**,**工作区文件和对话历史一起回到那条消息发出之前的状态**
15
11
  ---
16
12
 
17
13
  [更新日志](CHANGELOG.md)
@@ -67,15 +63,15 @@ dsh plugin --profile web add dsh-recall-plugin
67
63
  ```powershell
68
64
  dsh plugin --profile web add github:limbo947/dsh-recall-plugin
69
65
  ```
70
- - 重启 DSH 进程(按你的启动方式,任选其一)
66
+
67
+ - 卸载:同时移除依赖与挂载,快照数据保留在 home 下 `dsh-recall-snapshots/`,想彻底清除手动删掉该目录即可。
71
68
  ```powershell
72
- dsh web # 前台直接启动
73
- pm2 restart <你的dsh进程名> # 若用 pm2 托管
69
+ dsh plugin --profile web remove dsh-recall-plugin
74
70
  ```
75
71
 
76
- **验证**:重启后硬刷新页面(Ctrl+Shift+R),悬停任意一条插件启用后发送的用户消息——复制按钮旁出现「↶」即生效。没有按钮?九成是没重启 DSH 进程,或 git CLI 不在 PATH 里。
72
+ - 验证:重启后硬刷新页面(Ctrl+Shift+R),悬停任意一条插件启用后发送的用户消息——复制按钮旁出现「↶」即生效。没有按钮?九成是没重启 DSH 进程,或 git CLI 不在 PATH 里。
73
+
77
74
 
78
- **卸载**:`dsh plugin --profile web remove dsh-recall-plugin`(同时移除依赖与挂载层),快照数据保留在 home 下 `dsh-recall-snapshots/`,想彻底清除手动删掉该目录即可。
79
75
 
80
76
  ## 使用
81
77
 
@@ -134,7 +130,7 @@ pm2 restart <你的dsh进程名> # 若用 pm2 托管
134
130
 
135
131
  ## 本地开发(无需发布)
136
132
 
137
- 把 profile 对本包的依赖改成 `link:` 指向克隆目录,改完代码重启 DSH 即生效(工作区 `lib/` 即运行代码,无需复制或发布):
133
+ 把 profile 对本包的依赖改成 `link:` 指向克隆目录;DSH 加载的是工作区 `lib/` 构建产物(源码在 `src/`),改 `src/` 后先 `npm run build` 再重启 DSH 生效,无需复制或发布:
138
134
 
139
135
  ```powershell
140
136
  # 1. 编辑 $env:USERPROFILE\.dsh\profiles\web\package.json:
@@ -146,15 +142,15 @@ pnpm install
146
142
  # 3. 重启 DSH + 硬刷新页面(Ctrl+Shift+R)
147
143
  ```
148
144
 
149
- 注意:浏览器端代码的源码在 `src/client/`(多文件),`lib/client.js` esbuild 打包产物并随源码提交——**改 `src/client/` 后必须跑 `npm run build`**,否则运行的是旧 UI(CI 有产物新鲜度校验)。Host 端(`lib/` 其余文件)无构建步骤。
145
+ 注意:全部源码在 `src/`(Host 在 `src/host/`、浏览器端在 `src/client/`、共享类型在 `src/types/`),`lib/` 是纯构建产物目录——`npm run build` 经 esbuild 生成(逐文件转译 host 产物 + 打包 `lib/client.js`),产物随源码提交。**改任何 `src/` 后必须跑 `npm run build`**,否则运行的是旧产物(CI 有产物新鲜度统一校验)。
150
146
 
151
147
  ### 测试
152
148
 
153
149
  - `npm test`:纯逻辑单测(vitest,17 个文件 227 例,无 DSH 依赖,CI 与本地同跑)——配置解析、快照解析器、救援编排、错误分类、脚本模板同名导出契约、客户端纯函数、发布包内容布局、快照索引持久化、存储上限与保留天数等;
154
150
  - `npm run test:probe`:官方 API 字段探针(依赖本机 dsh 安装;dsh 升级后本地必跑)——钉住 `renderMessageImages`/`node`/`cwd`、`sessions.fork` 的 `atSeq`/`increaseTitle`、`listSessions` 记录结构、`AgentRegistry` 等字段,违反即红;
155
151
  - `npm run verify:host`:装配门禁(依赖本机 dsh 安装)——用真实 cordis 起插件,断言 inject 声明、端点注册、Config schema、卸载清理,装配回归发版前即可拦截;
156
- - `npm run build`:打包 client 产物(改 `src/client/` 后必跑);`npm run check:dsh`:dsh 版本巡检(发布前)。
157
- - CI(GitHub Actions)跑 `npm ci --legacy-peer-deps` + `npm test` + client 产物新鲜度校验(探针与装配门禁只在有 dsh 的机器跑)。
152
+ - `npm run build`:host+client 全量打包(改任何 `src/` 后必跑);`npm run check:dsh`:dsh 版本巡检(发布前)。
153
+ - CI(GitHub Actions)跑 `npm ci --legacy-peer-deps` + `npm run typecheck` + `npm test` + 产物新鲜度统一校验(`npm run build && git diff --exit-code lib/`;探针与装配门禁只在有 dsh 的机器跑)。
158
154
 
159
155
  ## License
160
156