@xiaoyuyu6420/dsh-backup 0.14.1 → 0.14.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/README.en.md +4 -0
- package/README.md +6 -2
- package/lib/client.js +3 -3
- package/lib/encrypt.js +111 -12
- package/lib/index.js +251 -117
- package/lib/oplock.js +77 -53
- package/lib/paths.js +56 -0
- package/lib/redact.js +37 -0
- package/package.json +1 -1
- package/rescue/rescue.mjs +34 -3
package/README.en.md
CHANGED
|
@@ -152,6 +152,10 @@ Tried it? Tell us what broke, what's missing, what you liked — it directly sha
|
|
|
152
152
|
<details>
|
|
153
153
|
<summary>Recent releases</summary>
|
|
154
154
|
|
|
155
|
+
- **0.14.3** — ships the security and reliability fixes from #139: validates archive/plugin paths, repairs rollback and operation locking, keeps retained credentials private, and preserves healthy backups when corrupt sessions are detected. Also fixes local-plugin migration, preview validation and large-archive rescue verification. tar/ZIP exports exclude a backup directory inside `DSH_HOME`, including its vault; move that entire directory outside `DSH_HOME` before a full restore. Includes 26 regression scenarios and 71/71 real-host checks on DSH `0.2.2-rc.1`. [Release notes](docs/promo/release-0.14.3.md).
|
|
156
|
+
|
|
157
|
+
- **0.14.2** — review fixes: encryption/decryption now **stream in chunks** and write to a temp file before an atomic rename (no whole-archive buffering, no truncated ciphertext on crash); added the missing client descriptor for `setGithubToken` plus a reverse assertion that every panel method has a descriptor; braced `redactSyncChannel` (s3/gist no longer report a bogus `passwordSet:false`); copy now mentions Codex, the import preview no longer promises per-item override UI, multi-channel sync is documented as push-only, About gains a feedback link, and `rescue --fix --map` requires `--yes`. Verified: smoke 596 / settings 47 / client 62 / real-host e2e 70.
|
|
158
|
+
|
|
155
159
|
- **0.14.1** — follow-up release: npm 0.14.0 shipped before Codex support landed; this version adds Codex chat-history import to the npm track (Claude Code / Codex: scan → preview → import as a new session, function calls paired by call_id into tool call/result, originals untouched) and syncs the verified numbers (smoke 587 / settings 47 / client 60 / real-host e2e 70).
|
|
156
160
|
- **0.14.0** — one big release: backup-folder UX + panel redesign + full capability parity. ① **Directory rename**: default `~/Desktop/dsh-backups` → `~/Desktop/DSH Backups`; users who never configured a destination get the old folder renamed in place on first start (atomic, no lost backups), explicit destinations are untouched, and a failed rename keeps the old folder working; every backup writes `使用说明.txt` (what each file is + three restore paths). ② **Panel redesign**: three tabs (Backup / Restore / Settings), three-step onboarding, typed-backup chips, plain-language copy, responsive. ③ **Backup upgrades**: optional password encryption (scrypt+AES-256-GCM, password never persisted), single-file ZIP export/import (section preview → conflicts keep existing by default → auto snapshot → auto rollback), local `link:`/`file:` plugin migration. ④ **Sync & ops**: WebDAV / S3-compatible / Gist channels, GFS monthly/yearly retention, operation lock + stale-lock reclaim, disk-usage report + tiered cleanup, weekly schedules. ⑤ **Ecosystem**: config market (index validation + preview install + supply-chain notes), import skills & global instructions from Claude Code / Cursor / Codex (MCP detected and reported only), Profiles management (built-ins read-only), conversation rewind fork (original untouched), About panel, agent tools 1→6, cross-tool chat-history import (Claude Code / Codex → new DSH session, originals untouched), offline CLI (reinstall / sessions repair / recover-stale-lock). ⑥ **Compatibility & acceptance**: real-host e2e 70/70 on DSH **0.2.1-rc.2**, smoke 587 / settings 47 / client 60 green; also fixed `doctor --repair` on Windows failing because bsdtar refuses to overwrite existing objects (#131) — it now extracts to a staging directory and copies only the targets, leaving non-target files untouched. peers/engines unchanged (`^0.2.0-rc.1` covers the 0.2.1 train, next peer boundary 0.3.0).
|
|
157
161
|
- **0.13.4** — Metadata-only release (**no code or behavior change**): the npm description and keywords now carry the terms people actually search for — migration, moving to a new machine, plugins, MCP, skills, sessions, workspace — so dsh-backup shows up for "upgrade went wrong" and "moving my DSH setup" queries. Features, archive format, settings and RPC are identical to 0.13.3; staying on 0.13.3 behaves exactly the same.
|
package/README.md
CHANGED
|
@@ -49,7 +49,7 @@ sha256: 8f9ae6322ef782d21554981cf4547220d5bb3e64d7964a883317415ad54e3cbb
|
|
|
49
49
|
| 「换新电脑了」 | GitHub 同步:`/backup github pull` 拉回云端备份,`restore --sync-deps` 顺手重装插件 |
|
|
50
50
|
| 「备份悄悄坏了没人知道」 | 每份归档带 sha256,`/backup verify all` 随时体检;每日/每周分级保留,留得住有用的历史 |
|
|
51
51
|
| 「我会忘记备份」 | `/backup auto 12`——每 12 小时自动跑,重启不中断,旧副本自动轮换(默认保留 7 份) |
|
|
52
|
-
| 「换新电脑,插件和配置都要重装」 | 单文件 ZIP **导出/导入** + 本地 link:/file: 插件迁移;也能 WebDAV / S3 兼容 / Gist
|
|
52
|
+
| 「换新电脑,插件和配置都要重装」 | 单文件 ZIP **导出/导入** + 本地 link:/file: 插件迁移;也能 WebDAV / S3 兼容 / Gist 多通道**推送**(跨机恢复走 GitHub 通道拉取或 ZIP 导入) |
|
|
53
53
|
| 「想从别的 AI 工具搬过来」 | 从 Claude Code / Cursor / Codex 读取**技能与全局指令**,预览后导入(MCP 只检测报告) |
|
|
54
54
|
| 「想回到对话里的某个时刻」 | 会话 **Rewind 分叉**:从指定轮次开新分支,原会话完整保留 |
|
|
55
55
|
| 「备份把磁盘占满了」 | **磁盘占用报告** + 分级清理:只清可再生缓存/过期备份,快照与同步数据不动 |
|
|
@@ -154,8 +154,12 @@ dsh plugin --profile web add github:xiaoyuyu6420/dsh-backup
|
|
|
154
154
|
<details>
|
|
155
155
|
<summary>最近的版本</summary>
|
|
156
156
|
|
|
157
|
+
- **0.14.3** —— 发布 #139 的安全与可靠性修复:限制归档与插件导入路径,修复失败回滚、凭据留档权限和操作锁;损坏会话不再触发删除健康备份;修复本地插件迁移、预览结果校验和救援大文件校验。备份目录位于 `DSH_HOME` 内时,tar/ZIP 会排除整个备份目录及 vault,避免重复打包和文件变化错误;整包恢复前需先将整个备份目录移到 `DSH_HOME` 外。新增 26 组回归,真实 DSH `0.2.2-rc.1` e2e 71/71。详情:[发布说明](docs/promo/release-0.14.3.md)。
|
|
158
|
+
|
|
159
|
+
- **0.14.2** —— 复核修复:加密/解密改**分块流式**并「写临时文件 → 原子替换」(大归档不再整包入内存,崩溃不留半截密文);补 `setGithubToken` 缺失的客户端 descriptor + 「面板方法必有 descriptor」反向断言;`redactSyncChannel` 补花括号(修掉 s3/gist 通道假的 `passwordSet:false`);文案补 Codex、导入预览不再承诺界面逐项覆盖、多通道同步写清为单向推送、About 加反馈入口、`rescue --fix --map` 需 `--yes`;验收 smoke 596 / settings 47 / client 62 / 真机 e2e 70。
|
|
160
|
+
|
|
157
161
|
- **0.14.1** —— 补发:npm 上的 0.14.0 先于 Codex 支持发布,本版把「Codex 聊天记录导入」补齐到 npm 版本(Claude Code / Codex 双来源:扫描 → 预览 → 导入为新会话,函数调用按 call_id 配对成工具调用/结果,原数据零改动),并同步验收数字(smoke 587 / settings 47 / client 60 / 真机 e2e 70)。
|
|
158
|
-
- **0.14.0** —— 一次大版本:备份目录 UX + 面板重构 + 与同类方案对齐的完整能力。① **目录改名**:默认 `~/Desktop/dsh-backups` → `~/Desktop/DSH Backups`,从未配置过 destination 的用户升级后首次启动同盘自动改名(原子、不丢备份),显式配置不动,失败继续用旧目录;每次备份在根目录写「使用说明.txt」(每个文件是什么 + 三条恢复路径)。② **面板重构**:三个 Tab(备份 / 恢复 / 设置)+ 首启三步引导 + 分类型 chips + 文案去术语 + 响应式。③ **备份增强**:可选口令加密(scrypt+AES-256-GCM,口令不落盘)、单文件 ZIP 导出/导入(节段预览 → 冲突默认保留 → 自动快照 → 失败回滚)、本地 link:/file: 插件迁移。④ **同步与运维**:WebDAV / S3 兼容 / Gist
|
|
162
|
+
- **0.14.0** —— 一次大版本:备份目录 UX + 面板重构 + 与同类方案对齐的完整能力。① **目录改名**:默认 `~/Desktop/dsh-backups` → `~/Desktop/DSH Backups`,从未配置过 destination 的用户升级后首次启动同盘自动改名(原子、不丢备份),显式配置不动,失败继续用旧目录;每次备份在根目录写「使用说明.txt」(每个文件是什么 + 三条恢复路径)。② **面板重构**:三个 Tab(备份 / 恢复 / 设置)+ 首启三步引导 + 分类型 chips + 文案去术语 + 响应式。③ **备份增强**:可选口令加密(scrypt+AES-256-GCM,口令不落盘)、单文件 ZIP 导出/导入(节段预览 → 冲突默认保留 → 自动快照 → 失败回滚)、本地 link:/file: 插件迁移。④ **同步与运维**:WebDAV / S3 兼容 / Gist 多通道**单向推送**(跨机恢复用 GitHub 通道拉取或 ZIP 导入;Gist 单文件上限 10MB,只适合小体积)、GFS 月/年保留、操作锁 + 残留锁回收、磁盘占用报告 + 分级清理、每周调度。⑤ **生态**:配置市场(索引校验 + 预览安装 + 供应链提示)、从 Claude Code / Cursor / Codex 导入技能与全局指令(MCP 只检测报告)、Profiles 管理(内置只读)、会话 Rewind 分叉(原会话零改动)、About 面板、agent 工具 1→6、跨工具聊天记录导入(Claude Code / Codex → 新 DSH 会话,原数据不动)、离线 CLI(reinstall / sessions repair / recover-stale-lock)。⑥ **兼容与验收**:DSH **0.2.1-rc.2** 真机 e2e 70/70,smoke 587 / settings 47 / client 60 全绿;另修复 Windows 上 `doctor --repair` 因 bsdtar 拒绝覆盖同名对象而失败(#131):改为暂存区解包 + 按目标拷贝,非目标文件零改动。peers/engines 不变(`^0.2.0-rc.1` 覆盖 0.2.1 列车,下一 peer 边界 0.3.0)。
|
|
159
163
|
- **0.13.4** —— 元数据版(**无代码与行为变更**):npm 描述与关键词对齐检索用词——补入「迁移 / 换机 / 插件 / MCP / 技能 / 会话 / 工作区」等,让"搬家换机、升级翻车"场景的人在 npm 搜索里能找到本插件。功能、归档格式、设置项、RPC 与 0.13.3 完全一致;升级到本版与停留在 0.13.3 在行为上没有任何区别。
|
|
160
164
|
- **0.13.3** —— 三条真实用户报障的修复 + 两个自建缺陷修复,全部在四条宿主列车(0.1.5-rc.3 / 0.1.7-rc.2 / 0.2.0-rc.2 / 0.2.1-alpha.1)真机 e2e 各 41/41 复验:① **含附件的归档恢复全链路不可用**(#112,@zevs281):DSH 附件库用硬链接(tar 记为 `h` 条目),而恢复校验器只放行 `-`/`d`——0.13.2 及更早对这类归档的完整恢复/dry-run/分类型合并/doctor 修复一律拒绝。修法:条目与目标都在备份根内的硬链接放行(符号链接、设备仍拒)。② **大归档恢复被误拒**(#119,@Yoshino-JF):归档清单超过宿主 subprocess 的 spill 上限时宿主会**丢弃 spill 文件**、只留 8 KB 尾窗,校验器把"断在文件名中间的碎片"当成不安全条目 → 整包拒绝(备份成功、verify 报完整、只在恢复时炸)。修法:清单改走原始流逐行校验(无上限,发现违规立即终止)。③ **doctor/migrate 看不见 v4 会话日志**(#117,@xiuwufangoc-design):宿主 0.1.7 起会话格式为 v4(`session.v4.jsonl.zstd`),而文件名与校准代写死到第 0 代/v3——体检与迁移预检一份都扫不到。修法:按宿主同源形态匹配文件名、校准代推进到 v4、更新代只提示。④ **一键更新跨不过 minor**(#115):pnpm `update` 只在声明范围内升级,跨 minor 停在旧版且回执谎报成功。修法:`update --latest` + 跑完读回 profile 内真实版本核对。⑤ **迁移预检误报**(#113,@zevs281):未知 `source.kind` 从"判打不开"降级为提示,名单对齐宿主权威集合(真机曾把 81/82 份健康日志误报)。
|
|
161
165
|
- **0.13.2** —— 适配 dsh **0.2.0 列车**:peers/engines 追加 `^0.2.0-rc.1`(宿主自 0.1.7-rc.1 起有安装期兼容闸门,不覆盖会被拒绝安装);**修复 0.1.7 起失效的设置表单**(宿主改从条目 Config schema 派生表单且只认 `volatile` 字段——本插件导出 `Config` 并逐字段 `.volatile()`,设置卡片恢复可读可写);修复 Windows 调度器启动卡死(#103:流式哈希 + 启动宽限 + 尝试锚点落盘);review P2 债清偿与产品内 Star 入口。
|