证据快照复核于 2026-09-16GitHub 数据核对日期: 2026-08-21
证据已验证Plugin Bundle开发工具Web Profile

DSH Time Machine

为 DeepSeek Harness 工作区提供 Git 影子检查点、差异查看和回滚控制。

快速了解

它能做什么

为 DeepSeek Harness 工作区提供 Git 影子检查点、差异查看和回滚控制。

本站提供的是中文说明,不代表该项目或 Plugin 自身提供中文界面;语言支持请以上游文档为准。

使用场景
开发工具git-workflows自动化UI
适配技术
deepseek-harnessGit
兼容性

Web Profile
Not declared in supplied evidence

可信度与状态

证据已验证
核对日期 2026/9/13 UTC 14:09

有代码证据的贡献

它为 DSH 增加什么

Time Machine 检查点工具

创建、列出、比较、恢复、删除和清理工作区检查点。

机制证据
检查点时间线与差异界面

在 Web 侧边栏和设置中提供浏览检查点、查看差异及回滚的界面。

机制证据

选择前先看

DSH Time Machine 是一个 DSH Web 插件,会围绕工作区活动创建滚动的 Git 影子检查点。它提供工具和时间线界面,用于检查变更、比较检查点与当前工作区,并恢复检查点或单个文件。

适合谁

会让智能体或命令执行多文件工作区修改,并希望保留本地恢复点的 DeepSeek Harness 用户。

常见任务

  • 在高风险编辑或命令前创建检查点。
  • 将当前工作区与先前检查点进行比较。
  • 在出现不需要的修改后恢复整个工作区或单个文件。
  • 为会话保留数量受限的检查点历史。

权限与数据

设计为在当前 Git 工作区中运行,并在 DSH Web 界面提供控制入口。

权限
  • 读取并记录工作区状态以创建 Git 影子检查点。
  • 在确认回滚操作时可以恢复工作区文件。
  • 在删除或清理检查点时可以删除检查点引用。
数据处理
  • README 声称快照包括工作树、暂存更改和未跟踪文件。
  • README 描述了滚动且按会话划分的检查点历史。

局限

  • 提供的证据未声明与特定 DeepSeek Harness 版本的兼容性。
  • 未审计 npm tarball 中的包内容。
  • 未实际运行或独立验证回滚安全性、自动快照和界面集成。

DSHub 已核对

  • 已验证包身份、MIT 许可证、bundle patch 和不可变 Git 源提交。
  • manifest 声明了 DSH Web 客户端支持,以及 Cordis、DSH webserver、settings、tools 和 Schemastery 的 peer dependencies。

DSHub 未核对

  • 未执行安装。
  • 未运行所声称的自动快照、恢复提示、文件恢复和可视化差异功能。
  • README 中关于保留 Git 历史和暂存状态的说法未经独立测试。

固定版本安装

安装 DSH Time Machine

这个Plugin Bundle没有 DSH Plugin 安装操作,请根据源码文档使用真实交付方式。

访问源码项目

维护者原文

项目 README

查看 commit 5ab1c11 对应的 README
维护者编写的上游内容原文于 2026/9/13README.md 获取,正文和仓库相对媒体固定到 commit 5ab1c1140436,内容哈希为 3a63b63ac7de。以下是未经 DSHub 翻译的上游原文,语言可能与当前页面不同;第三方托管的 badge 可能独立更新。

📦 @goodandready/dsh-time-machine

<div align="center"><h3>Automated Shadow Git Snapshots, Workspace Time-Travel & Instant Rollback for DeepSeek Harness</h3><p align="center"> <a href="https://www.npmjs.com/package/@goodandready/dsh-time-machine"><img src="https://img.shields.io/npm/v/@goodandready/dsh-time-machine.svg?style=for-the-badge&color=6366f1&labelColor=1e1b4b" alt="npm version"></a> <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-10b981.svg?style=for-the-badge&color=10b981&labelColor=064e3b" alt="license"></a> <a href="https://github.com/topics/dsh-plugin"><img src="https://img.shields.io/badge/DSH-Plugin-8b5cf6.svg?style=for-the-badge&labelColor=2e1065" alt="DSH Plugin"></a> <a href="https://nodejs.org"><img src="https://img.shields.io/badge/Node-20%2B-f59e0b.svg?style=for-the-badge&labelColor=451a03" alt="Node version"></a> </p><!-- Showcase Catalog Button --> <p align="center"> <a href="https://goodandready.app/"><img src="https://img.shields.io/badge/All_Author_Projects-goodandready.app-ff4500.svg?style=for-the-badge&logo=rocket&logoColor=white&labelColor=1a1a2e" alt="All Author Projects"></a> </p><p align="center"> <a href="README.md"><b>🇬🇧 English</b></a> • <a href="README.ru.md"><b>🇷🇺 Русский</b></a> • <a href="README.zh.md"><b>🇨🇳 中文说明</b></a> </p><table align="center"> <tr> <td align="center"> ⭐ <strong>If you like this plugin, please star it on GitHub</strong> — it shows me that the plugin is useful to you and motivates me to keep developing it. <br><br> 🐛 <strong>If you find a bug or would like to request a feature</strong>, open a GitHub issue in any language — I will review your proposal and implement useful suggestions in a future plugin version. </td> </tr> </table></div>

⚡ Overview

dsh-time-machine provides an automated safety net and instantaneous rollback engine for DeepSeek Harness workspaces.

Autonomous agents frequently execute complex multi-file refactorings, run mutating shell commands, or install dependencies. When an unexpected regression or broken state occurs, manual git reversion can be messy and risk losing untracked files or user git history.

dsh-time-machine creates lightweight shadow git snapshots in the background without modifying user git commits or branches, providing 1-click interactive rollback, visual file diffs, and automatic recovery prompts on command failure.

graph LR
    subgraph AgentAction [DSH Agent Mutating Operations]
        Agent[🤖 Agent: Edits Files / Runs Commands] --> Trigger{Pre-Action Hook}
    end

    subgraph TimeMachine [dsh-time-machine Core Engine]
        Trigger --> ShadowGit[Shadow Git Snapshot Engine]
        ShadowGit --> Snapshots[(In-Memory Checkpoint Timeline)]
        Snapshots --> DiffEngine[Visual Workspace Diff Calculator]
    end

    subgraph SafetyNet [Restoration & Web UI Studio]
        DiffEngine --> Sidebar[🕒 Time Machine Sidebar Tab]
        Snapshots --> Rollback[⏪ 1-Click Instant Workspace Rollback]
        Rollback --> CleanState[Restored Pristine Working Tree]
        Trigger -.->|Command Error| AutoHeal[🩹 Auto-Heal Rollback Prompt]
    end

    style AgentAction fill:#1e1e2e,stroke:#89b4fa,stroke-width:2px,color:#cdd6f4
    style TimeMachine fill:#181825,stroke:#cba6f7,stroke-width:2px,color:#cdd6f4
    style SafetyNet fill:#11111b,stroke:#a6e3a1,stroke-width:2px,color:#cdd6f4

🌟 Key Capabilities

1. 🛡️ Lightweight Shadow Git Snapshots

  • Captures the full working tree, staged changes, and untracked files using isolated Git shadow tree references;
  • Zero interference with user commit history, current active branch, or repository staging area;
  • Maintains a rolling history of the most recent checkpoints with clear timestamps, session scoping, and labels.

2. ⏪ Instant Safe Rollback (time_machine_checkpoint_rollback)

  • Restores the entire workspace or specific files to any previous checkpoint in milliseconds;
  • Uses non-destructive checkout-index and clean without moving HEAD or rewriting branch history;
  • Can be triggered programmatically by the agent or interactively by the user in the UI.

3. 🔍 Visual Snapshot Diff Inspector (time_machine_diff)

  • Computes file-by-file visual diffs comparing current workspace state against any checkpoint;
  • Highlights added, deleted, and modified lines with clean line numbers and statistics.

4. 🕒 Interactive Sidebar & Settings Timeline (lib/client.js)

  • Seamlessly integrates into DSH Web UI sidebar and settings tab;
  • Displays a chronological timeline of session checkpoints with 1-click "Rollback", "Diff", and "Delete" buttons.

5. 🩹 Auto-Heal on Command Failure

  • Automatically records checkpoints when a tool or command fails, preserving recovery options.

4. Selective File Rollback & Staging Safety (v0.1.15)

  • Single File Restore: Restore individual files corrupted by an agent without losing progress in other files via time_machine_file_rollback or Diff Modal UI.
  • Staging Safety Guard: Preserves user uncommitted git add index (stagedTreeHash) across turns.
  • Pre-Tool Auto-Checkpoints: Captures checkpoints automatically prior to high-risk tools (bash, execute_command, apply_patch).
  • Structured File Diff Navigation: Monospace side-by-side file tree with line addition/deletion statistics.

🛠️ Agent Tools Reference (7 Tools)

Tool Name Parameters Description
time_machine_checkpoint_create label?: string, sessionId?: string Creates a shadow git workspace checkpoint before risky edits or operations
time_machine_checkpoint_list sessionId?: string Lists all recent workspace checkpoints newest first
time_machine_checkpoint_rollback id: string, confirm: boolean Safely reverts workspace files back to specified checkpoint without altering branch HEAD
time_machine_diff from: string, to?: string Returns unified file diff between current workspace and target checkpoint
time_machine_checkpoint_delete id: string, confirm: boolean Permanently deletes a single checkpoint and purges its git reference
time_machine_checkpoint_prune sessionId?: string, keep?: number Prunes session checkpoints, keeping only the newest N checkpoints

📦 Quick Installation

dsh plugin --profile web add @goodandready/dsh-time-machine

⚙️ Configuration Reference (settings.yaml)

dsh-time-machine:
  autoSnapshotEnabled: true    # Automatically take checkpoints before file modifications
  maxSnapshots: 20             # Maximum rolling checkpoints retained in memory
  autoHealPrompt: true         # Prompt for rollback when a command fails

📋 Release Notes

v0.1.12 — Fix Oversized Clock Icon in Native Sidebar Guide

  • v0.1.14: Complete visual alignment with the dsh-clinebot design token standard: full light/dark theme support using --dsw-alias-* tokens, primary and danger action buttons, status badges for settings card and timeline, dark modal unified diff viewer with backdrop blur. Added CSRF protection (isTrustedSettingsRequest) for all mutating HTTP routes, hooked orphaned Git index cleanup (cleanupOrphanedIndices) into plugin initialization, and added autoHealPrompt error checkpoint support to the legacy event bus fallback.
  • v0.1.13: Deprecated and removed top-level settings.section fallback to prevent occupying the flat global settings sidebar in DeepSeek Harness Web UI; plugin settings strictly reside in collapsible settings.plugin.item card. Harmonized settings scope resolution using safe ctx.get('settingsScope') proxy access.
  • Fixed in v0.1.12: Replaced function-based icon with dedicated TimeMachineIcon component supporting both props object { size, className } and numeric argument, with explicit inline sizing (width, height, display: inline-block, flex: none) to prevent overflow in the Right Sidebar Guide card.

v0.1.11 — Dual Sidebar Support: Native DSH Right Sidebar & BetterSidebar

  • Added in v0.1.11: Support for native DSH Right Sidebar (sidebarRightTabs + sidebar.right.pane.tab) introduced in DSH 0.1.5-alpha.1, including guide page registration with custom icon.
  • Preserved in v0.1.11: Legacy betterSidebar integration retained with deterministic surface-scoped registrations, preventing ID collisions or duplicate mounts when both surfaces exist.
  • Added in v0.1.11: Graceful degradation to plugin settings card when neither sidebar surface is available.

v0.1.10 — Stability, Dynamic CWD, Unified Diff & Architecture Polish

  • Added in v0.1.10: Dynamic / session-aware cwd resolution: TimeMachine tools and REST endpoints automatically locate the active session workspace or accept explicit target directory.
  • Added in v0.1.10: Unified diff support (format: "patch" | "stat") with size limits (up to 256KB) and clean truncation warnings.
  • Added in v0.1.10: Async execution queue on Git mutation engine to completely eliminate lockfile collisions under concurrent agent operations.
  • Added in v0.1.10: Single-batch Git ref querying using git for-each-ref replacing $O(N)$ sequential git log processes for instant snapshot listings.
  • Added in v0.1.10: Redundant commit deduplication: auto-snapshots are safely skipped if the working tree has not changed.
  • Added in v0.1.10: Startup cleanup of temporary tm_index_* staging files.
  • Changed in v0.1.10: Settings UI card streamlined, directing snapshot inspection to the dedicated Time Machine sidebar tab.
  • Changed in v0.1.10: Comprehensive error logging replacing silent exceptions.

v0.1.9 — Event Bus Harmonization & Dependency Cleanup

  • Changed in v0.1.9: Harmonized event bus subscriptions to prevent duplicate checkpoints. Native DSH session/event bus takes precedence, with legacy ctx.events used strictly as a fallback when ctx.on is unavailable.
  • Changed in v0.1.9: Removed unused @deepseek-ai/dsh-credentials from peerDependencies.
  • Added in v0.1.9: Standardized project design contract in docs/design/DESIGN.md.

v0.1.7 — Critical Safety, Staging Isolation & Native Event Bus

  • Changed in v0.1.7: Safe workspace rollback via read-tree + checkout-index + clean -fd. Rolling back to a checkpoint never modifies branch HEAD or severs git commit history.
  • Changed in v0.1.7: User staging area protection. Checkpoints now isolate git index creation through GIT_INDEX_FILE, preventing disruption of pre-staged files in .git/index.
  • Changed in v0.1.7: Native DSH session event integration. Subscribed to session/event bus for automated checkpoints on turn/start, approval/asked, turn/end, and command errors.
  • Changed in v0.1.7: Automatic Git ref cleanup on snapshot eviction to eliminate disk ref leaks.
  • Changed in v0.1.7: Direct working directory diff computation when comparing checkpoints with uncommitted changes.
  • Changed in v0.1.7: Strict compliance with DSH Plugin Authoring guidelines: form fields are enabled only when settings status is ready.
  • Added in v0.1.7: WebServer request body size limit (1MB max payload) for DoS protection.
  • Added in v0.1.7: Complete Chinese localization (zh) in frontend interface.

📄 License

MIT © GooDAnDReaDY

有意识地管理

安装与管理

前置条件与目标 Profile

目标 Web Profile

交付方式 Git Bundle — GooDAnDReaDY/dsh-time-machine#5ab1c1140436ca329bd09039d176376a916f973d

验证、更新与移除

显示生命周期命令
验证
dsh plugin --profile web list

兼容性与访问范围

DSH web bundle with declared peer dependencies Not declared in supplied evidence

检查兼容性证据

风险事实

workspace-modification

Rollback can restore the whole workspace or selected files and may remove current changes.

证据
git-data

The plugin states that it records shadow Git snapshots, including working-tree and untracked-file state.

证据
证据与编辑审查Manifest、Bundle patch、分发与新鲜度

不可变证据

审查状态与源码活动

AI 已审查

当工作区可恢复性比保留每一次智能体修改更重要时可使用;确认回滚前应先检查差异。

AI 审查于 2026/9/13 UTC 14:10GitHub 事实核对日期: 2026/9/13 UTC 14:10

自当前证据基线以来,没有记录到重要源码变化。

下一步

按 Plugin 安装流程操作

订阅重要变化: DSH Time Machine