dsh-recall-plugin 2.3.1 → 2.3.3

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,54 @@
2
2
 
3
3
  本文件格式遵循 [Keep a Changelog](https://keepachangelog.com/zh-CN/1.1.0/),版本号遵循语义化版本。
4
4
 
5
+ ## [2.3.3] - 2026-09-05
6
+
7
+ ### 修复
8
+
9
+ - **设置页风格对齐 DSH 官方插件设置卡**:以本机官方 `dsh-client-ui-settings-plugins` 构建产物为事实源,对卡片描边与圆角、次级/主/危险按钮、输入框、状态徽章、布尔开关(checkbox → role=switch 滑钮)、焦点环、折叠头箭头动效逐部位对齐官方配方,说明文字统一辅助色;「高级:基础排除表」更名为「基础排除表」。全部配色走官方 `--dsw-alias-*` 主题令牌(逐一核验),纯展示层调整,无行为变化。配方沉淀见 `docs/design-tokens.md`。
10
+
11
+ - **设置页三个折叠区展开态去冗余**:① 删除与折叠头重复的内标题(「快照管理」卡内大标题、「快照排除项」卡内标题)——折叠头已承担分区标题角色,展开后再出现同名标题是纯噪音;② 「基础排除表」展开后 textarea 与说明文字改为通栏——此前只占共享 grid 第二列,左侧长标签列形成竖直死区、编辑框被挤窄;label 保持原位(htmlFor 关联是可访问性契约);③ 排除配置的存储路径从长句中抽出为独立等宽小字行(break-all 整齐折行),说明正文不再被 Windows 长路径撑出断裂换行,多文件场景(降级工作区)也靠路径行区分。纯展示层调整,无行为变化。
12
+
13
+ - **设置页配置表单排版再打磨(六点位)**:① 数字输入框从「撑满整行」改为定宽 120px + 数值右对齐,单位(条/小时/MB/天)与状态标签(已修改/已覆盖/环境变量锁定)统一挂在输入框右侧同基线——此前输入框宽度随行内标签有无伸缩、各行右缘参差;② 主标签升为正文字色(label-primary),说明文字维持 12px tertiary 固定在控件下方第二行,主辅层级拉开;③ 五个数字字段补齐单位后缀(此前仅 MB);④ 「快照行为 / 自动治理」组间加分隔线与加倍留白,组界不再只靠小标题;组内行距统一为 12px;⑤ 「保存」升主色实心按钮(配色经官方主题产物核验:`button-primary-fill` / `label-primary-foreground` / `button-primary-hover`),「放弃修改 / 恢复默认」维持次级灰底;⑥ 三个折叠头(基础排除表 / 排除配置 / 快照管理)的箭头字形盒内改左对齐,与上方表单标签共享同一左缘。纯样式与文案层级调整,无行为变化。
14
+
15
+ - **设置页数字输入框隐藏原生加减微调按钮**:「自动治理」五个数字输入框为 34px 定宽,原生 spinner(上下箭头)跨引擎渲染不一(Chromium 有 / Firefox 无)、挤占右侧数字区,与「数值右对齐」的纵向扫描相冲——隐藏原生 spinner(`-webkit-appearance:none` + `appearance:textfield`,scope 到 `.dsh-recall-cfg-input` 不外溢),键盘 ↑↓ 微调与直接输入能力保留。纯样式调整。
16
+
17
+ ### 变更
18
+
19
+ - **新增 `docs/design-tokens.md` 设计令牌与组件配方参考**:把本次对齐所核验的官方事实源(`dsh-client-ui-theme` 令牌定义、`dsh-client-ui-settings-plugins` 组件配方)沉淀为长期规范文档——令牌命名空间说明、颜色/排版速查(含本插件使用处映射)、八类官方组件配方摘录(卡片/按钮组/表单字段/badge/switch/分组折叠/分隔线规格/阴影)、本插件落地约定与 dsh 升级后的重抽比对流程。后续改 client UI 先查此文档,避免凭印象写颜色与字阶。
20
+
21
+ - **`reference/` 官方文档镜像整合进 `docs/`**:目录 `reference/` → `docs/reference/`(.gitignore 同步改 `docs/reference/`,镜像仍不入库),官方文档镜像与项目文档收敛到同一目录;同步更新 AGENTS.md 合规清单与漂移控制节、`scripts/check-dsh-version.mjs`(镜像读取路径改为 `docs/reference/README.md`)、`scripts/check-upgrade.mjs` 提示文案、package-layout 单测禁入清单(`docs/` 已覆盖镜像)、`docs/dsh-contract.md` 升级指引、compat-audit 台账 I6 复查动作的镜像路径与 docs/README.md 目录索引;compat-audit 头部与各计划文档中的历史核验记录按当时原文保留。
22
+
23
+ ## [2.3.2] - 2026-09-04
24
+
25
+ ### 修复
26
+
27
+ - **设置页表单跨行对齐修复(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 左内边距、与表单内容贴左对齐;配置操作区(放弃修改 / 恢复默认 / 保存)移到「高级:基础排除表」折叠头之前——按钮服务整个表单,排在折叠头之后会被误读为折叠区内容。纯布局修复,无行为变化。
28
+
29
+ - **设置页基础排除表标签关联补漏(V2 跟进)**:「高级:基础排除表」textarea 补 `id` 并与 label 以 `htmlFor` 关联(V2 只覆盖了 numRow 与 exclude.txt 三处,此为同款漏网),读屏可正确播报标签。
30
+
31
+ - **设置页确认条统一与过渡动效(V9)**:四种删除确认(快照 / 会话 / 工作区 / 全部)收敛为同一 `ConfirmRow` 组件,「确认」统一为危险红 chip、「取消」为普通 chip;确认条与树展开增加 opacity 入场过渡(≤200ms),并尊重系统「减少动效」设置自动关闭。纯交互打磨。
32
+
33
+ - **设置页响应式补全(V8)**:exclude 快速添加行在 ≤480px 下输入框独占一行、按钮与建议芯片换行排列;操作区按钮行加 `flex-wrap:wrap`,长状态/错误文案不再挤压按钮。与 V4 共用同一 480px 断点。纯样式增补。
34
+
35
+ - **设置页排版收敛(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)。纯样式整理,无行为变化。
36
+
37
+ - **设置页表单分组与危险操作固定位(V5)**:配置表单 9 字段平铺改为「快照行为 / 自动治理」两组语义分组(带小标题),「高级」维持折叠;快照管理操作区「全部删除」固定为最后一个按钮(刷新 / 立即 gc / 全部删除),不再随「加载更多」出现而漂移。纯结构重排,无行为变化。
38
+
39
+ - **设置页表单布局 Grid 化(V4)**:配置表单从「label 定宽 130px + hint 缩进 138px」魔法数对齐改为 CSS Grid(label 列 `max-content` 自适应最长标签,控件/hint 归第二列);≤480px 窄面板下表单纵向堆叠不挤压;快照树缩进量化为 `--dsh-recall-tree-indent` 单一变量(原来 16+8 恰好等于折叠钮 18+6 的巧合)。纯布局重构,无行为变化。
40
+
41
+ - **设置页健康徽章化与错误区升级(V6)**:快照管理卡片的 git 状态从灰色文案升级为彩色 pill(可用 = 绿 / 不可用 = 红,官方状态行令牌配对),成为卡片顶部横幅;「最近错误」区标题改错误红 + 条数徽章,并从卡片最底部上移到操作区之上——致命状态与历史错误更醒目。纯展示层重排。
42
+
43
+ - **设置页交互反馈(V3)**:禁用按钮/芯片补 `opacity:.5` + 默认光标,且禁用态 hover 不再变色(未修改时的「保存 / 放弃修改」不再误导);三张卡片(配置/排除/快照管理)的成功状态消息 4s 自动消退、错误提示常驻、busy 中不消退;打开「快照管理」先见 pulse 加载骨架再出树,不再是一段空白。纯交互反馈增补。
44
+
45
+ - **设置页可访问性补强(V2)**:快照树折叠钮从纯视觉 `<span>` 升为 `<button>`(Tab/Enter/Space 可达),配 `aria-expanded`/`aria-label`;数字输入 label/input 按 id 关联;三处状态消息加 `role="status"` + `aria-live="polite"`、错误文案补「错误:」文字前缀;三个无标签控件(快照搜索/排除编辑/快速添加)补 `aria-label`;全按钮与输入框补 `:focus-visible` 焦点环(官方 border-l3 惯例)。键盘完全不可达的树折叠是本次最重的功能性缺陷,纯增量修复。
46
+
47
+ - **设置页语义色修复(V1)**:ExcludeCard「保存」按钮去掉危险红样式、与配置表单保存按钮统一;快照文件清单「已修改」badge 从错误红改为 warning(amber)色系——修改不是错误;配置表单三类状态标签分化(「已修改」warn 底色 /「已覆盖」中性灰 /「环境变量锁定」中性灰 + 左边框);`btn-danger` 前景色硬编码 `#fff` 换为官方实证的主题感知令牌 `--dsw-alias-bg-layer-3`,hover 亮度集中为 css.ts 顶部语义变量,消灭令牌体系外散落补丁。纯样式改动,无行为变化。
48
+
49
+ ### 变更
50
+
51
+ - **源码整体迁移 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 类型门禁)与统一产物新鲜度校验。
52
+
5
53
  ## [2.3.1] - 2026-09-01
6
54
 
7
55
  修复批次(PR #13 贡献,macOS 实机验证;Windows 侧本仓库复核)。单测 285 → 290 例全绿(新增 `nextShadowPriority` 5 例)、`test:probe` 探针 29 → 31 例全绿(新增 `slots.entries` 双包探测)、`verify:host` 装配门禁全绿。
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,14 +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
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
+ [![npm downloads](https://img.shields.io/npm/dt/dsh-recall-plugin.svg)](https://www.npmjs.com/package/dsh-recall-plugin)
7
7
  ![License](https://img.shields.io/badge/license-MIT-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)
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)
10
9
  ---
11
- **在任意一条你发过的消息下方**,**点「↶ 撤回」**,**工作区文件和对话历史一起回到那条消息发出之前的状态**(DSH 0.1.1-rc.2)。
10
+ **在任意一条你发过的消息下方**,**点「↶ 撤回」**,**工作区文件和对话历史一起回到那条消息发出之前的状态**
12
11
  ---
13
12
 
14
13
  [更新日志](CHANGELOG.md)
@@ -131,7 +130,7 @@ dsh plugin --profile web remove dsh-recall-plugin
131
130
 
132
131
  ## 本地开发(无需发布)
133
132
 
134
- 把 profile 对本包的依赖改成 `link:` 指向克隆目录,改完代码重启 DSH 即生效(工作区 `lib/` 即运行代码,无需复制或发布):
133
+ 把 profile 对本包的依赖改成 `link:` 指向克隆目录;DSH 加载的是工作区 `lib/` 构建产物(源码在 `src/`),改 `src/` 后先 `npm run build` 再重启 DSH 生效,无需复制或发布:
135
134
 
136
135
  ```powershell
137
136
  # 1. 编辑 $env:USERPROFILE\.dsh\profiles\web\package.json:
@@ -143,15 +142,15 @@ pnpm install
143
142
  # 3. 重启 DSH + 硬刷新页面(Ctrl+Shift+R)
144
143
  ```
145
144
 
146
- 注意:浏览器端代码的源码在 `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 有产物新鲜度统一校验)。
147
146
 
148
147
  ### 测试
149
148
 
150
149
  - `npm test`:纯逻辑单测(vitest,17 个文件 227 例,无 DSH 依赖,CI 与本地同跑)——配置解析、快照解析器、救援编排、错误分类、脚本模板同名导出契约、客户端纯函数、发布包内容布局、快照索引持久化、存储上限与保留天数等;
151
150
  - `npm run test:probe`:官方 API 字段探针(依赖本机 dsh 安装;dsh 升级后本地必跑)——钉住 `renderMessageImages`/`node`/`cwd`、`sessions.fork` 的 `atSeq`/`increaseTitle`、`listSessions` 记录结构、`AgentRegistry` 等字段,违反即红;
152
151
  - `npm run verify:host`:装配门禁(依赖本机 dsh 安装)——用真实 cordis 起插件,断言 inject 声明、端点注册、Config schema、卸载清理,装配回归发版前即可拦截;
153
- - `npm run build`:打包 client 产物(改 `src/client/` 后必跑);`npm run check:dsh`:dsh 版本巡检(发布前)。
154
- - 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 的机器跑)。
155
154
 
156
155
  ## License
157
156