tmpdot/dsh-checkpoint-diff 预览 preview

tmpdot/dsh-checkpoint-diff

DeepSeek Harness检查点时间节点之间的文件差异可视化:只读时间线 + 通过 /diff 命令、JSON HTTP API 和 GUI 面板,对 dsh-checkpoint-rewind 检查点进行逐文件行差异比较。

Project Overview项目介绍

This repository is a natively built plugin for DeepSeek Harness (DSH), distributed with a DSH bundle manifest that allows it to be installed directly into the DSH ecosystem. It consumes checkpoint snapshots generated by the upstream dsh-checkpoint-rewind plugin, and provides visual file difference comparison between any two checkpoint time nodes. Users can access the core feature via a Diff button in the session header, a /diff slash command for CLI use, or a JSON HTTP API for headless automation workflows. It also supports rolling back the workspace to any previous checkpoint node, with strict safety rules that prevent accidental deletion or modification of existing files.

The plugin is designed for developers who use DSH to work with AI agents that make autonomous changes to the local workspace. It solves the common problem of not being able to trace exactly what changes the AI made, or recover from broken changes that break the working codebase. To start a comparison, you first select two time nodes to compare via the GUI panel or the command line interface. The plugin will then render a collapsible directory tree of all changed files, marked clearly as added, modified, or deleted. Clicking any file opens a side-by-side view of the full line-by-line difference between the two versions of the file.

The plugin is released under the open-source Apache-2.0 license, and requires you to install the upstream dsh-checkpoint-rewind plugin first, since it does not generate any checkpoints on its own. It is compatible with DSH versions 0.1.0-rc.5 and rc.6, and supports both v1 and v2 checkpoint formats from the upstream plugin. It requires Node.js version 22.19 or higher, and can be installed via the npm package registry. Rollback operations are designed with safety in mind: they only overwrite changed files, leave new files created after the checkpoint intact, never touch .git or .dsh directories, and the last rollback can be undone with a single command.

dsh-checkpoint-diff 是专为 DeepSeek Harness 开发的原生插件,用于消费上游 dsh-checkpoint-rewind 生成的工作区检查点快照,提供任意两个时间节点之间的文件差异可视化能力。用户可通过会话头部的 Diff 按钮打开操作面板,也可使用 /diff 命令或 JSON HTTP API 获取差异数据,同时支持从任意节点回滚恢复工作区文件。本插件本身不生成快照,必须先安装上游插件才能正常使用,未安装上游时仅支持会话日志范围查询。

该插件面向安装了 dsh-checkpoint-rewind 的 DeepSeek Harness 用户,解决 AI 代理自主修改工作区后无法追溯变更、出现问题难以恢复的痛点。典型工作流为:先通过 UI 面板或命令行选择需要对比的起始和结束时间节点,插件会以可折叠目录树形式展示变更文件清单,点击单个文件即可查看逐行差异。用户可预览恢复效果,确认后再执行回滚操作,全程安全可控,不会误删原有文件。

本插件采用 Apache-2.0 许可证开源,兼容 DSH 0.1.0-rc.5 及 rc.6 版本,同时兼容上游 rewind 0.4.0 和 0.5.0 两个大版本,要求 Node.js 版本不低于 22.19 或 24 以上。回滚操作遵循安全规则:仅覆盖原有修改、不删除节点后新建的文件,不触碰 .git 和 .dsh 目录,最近一次回滚可通过命令一键撤销。开发可通过 pnpm 安装依赖、运行单测和集成测试。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 5 stars - very few users, little community feedback星标只有 5,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-checkpoint-rewind

把 tmpdot/dsh-checkpoint-diff 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-checkpoint-diff

English version: README.en.md

把 dsh-checkpoint-rewind 的检查点(快照)当作时间节点,提供任意两个节点之间的文件差异可视化:会话头部 "Diff" 按钮打开浮层面板(时间线 → 文件清单 A/M/D → 逐行 diff),另有 /diff 命令与 JSON HTTP API 供 headless 使用。

只读设计,唯一显式例外是回滚:可从任意时间节点把工作区文件恢复回来(整节点或单文件),经面板、/rollback 命令或 API 触发。回滚只覆盖写、绝不删除(节点之后新建的文件保留并报告)、绝不碰 .git/.dsh、绝不写快照存储/git/会话。"绝不删除"的唯一例外是回滚的单次撤销(/rollback --undo、面板按钮):只删除恢复操作自己刚创建的文件,其余一律不动(进程内记忆,重启即失效)。

[!IMPORTANT] 先装上游,再装本插件。 本插件是只读消费端——检查点(快照)由上游 dsh-checkpoint-rewind(快照生产者)产生,本插件自身不产生快照。只装 dsh-checkpoint-diff 而漏掉上游,检查点时间线是空的:Diff 按钮、/diff、回滚都没有数据(只有 Trace (session log) 范围可用)。安装见安装。

npm version License CI

理念:它解决什么问题,为什么是它

场景。 AI 代理在替你写代码、改文件。它的"思考"是黑盒,但它的行动会落到你的工作区:它改了什么?什么时候改的?改坏了怎么办?——这些问题不能没有答案。

立场。 这类工具通常有两条路:一是替你省事——自动总结、自动判断、替你过滤信息;二是让你安心——把真相原样交给你,保证你随时能查清、能追究、能退回去。本插件明确选择第二条路:不做"替你看"的总结与过滤,而是把看清楚和退回去的能力完整交到你手里。

  • 你不必看,但你必须能看。 日常开发可以完全无视它;但任何时候想查,每次变更动作都对应一个高粒度的快照时间节点,任意两个节点之间改了什么、怎么改的,逐文件、逐行可见;
  • 出问题能追究到底。 哪一步、哪个工具、动了哪些文件,都能精确还原;确认误伤后,还能从任意时间节点把工作区恢复回来(只覆盖写、绝不删除、可撤销);
  • 安全感不来自"不出错",而来自"查得到、退得回"。

一句话:你可以不看,但它不能不可查。 人可以不看不追究,但绝不能没有看和追究的手段——这就是本插件存在的理由。

演示

GUI 面板

全部为真实截图(运行在真实 harness 会话上)。面板全貌——scope 切换、from/to 时间节点下拉(意图标签 + (HEAD) 前缀)、目录树文件清单(A/M/D)、逐行 diff(红删绿增 + ↑/↓ 变更块跳转)、Restore workspace 恢复卡片:

面板全貌

Trace (session log) 范围——会话日志重放 + 三泳道拖选时间线(Input / Model / Tools span、turn 边界;拖选区间自动映射为 from/to 边界节点):

Trace 范围

本会话 范围——当前会话的检查点时间线,选择要回滚的版本,点击“Preview Restore”预览效果:

本会话范围

本项目 范围——跨会话合并 + fork 血缘分支下拉:

本项目范围

UI 每次大改后必须重新截图并更新本文(采集规则见 docs/screenshots/README.md)。

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-plugin-template 下一个 Next dshx →