返回插件市场

dsh-filesnap

编程与工具

extracurricular-ai/dsh-filesnap

将 DeepSeek Harness 对话及其修改的文件一起回退,无需 Git 仓库。由 Rust 核心驱动,快照会话和工作区文件,实现快速撤销/重做,磁盘占用低。

  • checkpoint
  • coding-agent
  • cordis
  • deepseek-harness
  • developer-tools
  • dsh
  • dsh-filesnap
  • dsh-plugin
  • filesystem
  • restore
  • rewind
  • rust
  • snapshot
  • undo
  • undo-redo
GitHub Stars
41GitHub
浏览量
0DSH Plugin Hub
Forks
9GitHub
开放问题
1GitHub Issues
Manifest 版本
0.2.2dsh-filesnap
最近推送
2026年9月5日GitHub
许可证
Apache-2.0TypeScript
插件类型
Host + Client同时运行于 Host 与 Web Client

验证与兼容性

这里展示目录实际采集到的证据;未声明的信息会明确标为未知。

运行时已验证
01精确来源: npm · dsh-filesnap@0.2.202验证时间: 2026年9月5日03验证版本: 0.1.0-rc.7
当前版本兼容性
已在当前目录版本验证
声明的 Harness 范围
未声明
声明的平台
未声明
适用 Profile
web
构建授权
未检测到需要
权限声明
未声明
外部服务
未声明
遥测声明
未知
未发现已知风险标记

这不是安全背书;安装前仍应查看源码、权限和配置。

查看证据与判定范围

验证仅覆盖标出的来源、版本和 Harness 环境,不代表未来版本仍然兼容。

  • dsh-filesnap@0.2.2
  • 插件已在隔离环境完成加载检查。

README

查看源文件

dsh-filesnap — rewind DSH conversations and files together

npm CI licence powered by 🦀 Rust git not required

English | 中文

Join the discussion · Report a bug

Rewind a DeepSeek Harness conversation and its workspace together — without touching Git. Every rewind happens in a fork, so /redo can take you back if you change your mind. Powered by a blazing-fast Rust 🦀 engine.

dsh-filesnap: conversation and workspace rewind together

> /rewind 2
Rewound to turn 2 (make the rate limit per-tenant).
Files: 7 written, 1 deleted.

The conversation continues in session-9f3c1a04-….
Run /redo there to reverse this rewind.

Quick start

Requirements

  • DeepSeek Harness with a web or headless profile
  • Node.js ^22.19 or >=24
  • Linux, macOS or Windows on x64 or arm64

The native filesnap binary is installed with this package. You do not need Rust, Git or a separate runtime.

[!IMPORTANT] dsh does not yet provide a supported registration API for event types declared by out-of-repository plugins. dsh-filesnap therefore registers its session events at load time. If you uninstall the plugin, sessions it captured will not open until you reinstall it. Their data remains intact on disk. The same refusal appears with the plugin installed if dsh is started with pnpm dsh from a source checkout — use the built CLI or an npm-installed dsh; see troubleshooting and the architectural limitation.

1. Install

$ dsh plugin --profile web add dsh-filesnap

That is the whole install: the package declares a dsh.bundle, so the launcher mounts it into the profile itself. For headless use, replace web with headless.

[!WARNING] Upgrading from 0.2.1 or earlier? Those versions asked you to add an id: filesnap row to ~/.dsh/profiles/<profile>/cordis.patch.yml by hand. Delete that row before you start dsh on 0.2.2. The bundle now supplies the same row, the loader refuses two entries with one id, and dsh will not boot: plugin tree failed to load: … duplicate loader entry id: filesnap.

2. Verify and use

$ dsh --profile web --dump-config | grep -A 1 filesnap
- id: filesnap
  name: dsh-filesnap

Restart the profile, run one agent turn, then enter /rewind. If the plugin is not listed in the composed profile or the browser control is missing, follow the troubleshooting guide.

Why dsh-filesnap

What it means
Conversation + filesA rewind forks the transcript at the selected turn and restores the workspace into that fork.
Git-independentWorks in repositories and ordinary directories. Commits, branches, stash and worktree state are never changed.
Undoable rewindA rescue point is captured before restore writes begin; /redo reverses the rewind.
Broad file coverageHandles binary files, ignored files and edits made through ctx.fs outside the project root.
Native engineBounded scanning, content addressing and restore run in a small 🦀 Rust binary outside the session's Node process.
Inspectable/rewind status reports storage use and files that are not protected, with the reason for each exclusion.

The design does not treat version control as a snapshot store. For a version-stamped, source-audited comparison with other dsh rewind plugins, see Comparison.

Commands

CommandResult
/rewindList the workspace state captured before each turn.
/rewind <turn>Fork the conversation at that turn and restore its files.
/redoReverse the rewind that landed in the current session.
/rewind statusReport stored data and files that are currently unprotected.

/rewind accepts the displayed turn number or a point id. Relative addressing such as “go back three” is deliberately not supported: a restore overwrites files, so the target must be explicit.

Both commands dispatch without a model turn. Rewinding is something you do to a conversation, not a request that should pass through the conversation being rewound.

What gets protected

Before every model step, dsh-filesnap captures a bounded union of:

  • files already known to the workspace, including Git-tracked names;
  • paths observed immediately before a ctx.fs write or edit, even outside the project root;
  • a bounded scan of recent workspace changes, which covers writes made by shell commands.

Content is addressed by hash, so unchanged files are reused rather than copied once per turn. .filesnapignore is symmetric: an ignored path is never stored, restored or deleted by a restore. A restore deletes a path only when the target snapshot positively recorded that the path was absent.

/rewind status re-scans the current tree and names anything outside coverage, such as an unreadable path, an oversized file or a non-regular file. Coverage details and restore invariants live in Architecture.

Performance

The engine runs once before a model request that normally takes seconds. The current preliminary measurements, taken with a warm page cache, are:

WorkspaceFiles capturedFirst captureRepeat capture
this repository8420 ms8 ms
DeepSeek Harness monorepo7,995 of 70,918 on disk1.75 s268 ms

These numbers describe their original machine, not a universal promise. The tracked set is bounded instead of walking all 70,918 files every turn, and the repeat capture reuses unchanged content. See Benchmarks for the method, missing metadata and a reproducible command sequence.

Browser experience

The optional ./client export adds:

  • a rewind action beside the existing actions on each completed assistant turn;
  • header actions for redo and store status.

The transcript is already the list of turns, so the plugin does not add a second checkpoint panel. In the browser, the deployment creates the correctly composed child session, the host restores files into it, and the client opens that child. Headless use performs the fork in the host plugin.

The browser bundle is typechecked and built during release. It does not yet have an automated in-browser test; that remains a tracked limitation.

Configuration

Defaults are intended to work on an ordinary local deployment.

FieldDefaultPurpose
commandresolved automaticallyUse another engine build, or a bare command resolved by a remote subprocess provider.
dataDirplatform data directoryStore location; never inside the project.
timeoutMs120000Wall-clock limit for one engine invocation.
graceMs2000SIGTERM-to-SIGKILL grace period after cancellation or timeout.
maxOutputBytes1048576In-memory limit for each collected output stream.
declareEditstrueRecord file pre-images immediately before edits.

Unknown keys and unusable values fail at plugin load rather than silently removing a later rewind point.

Current limits

  • Uninstalling the plugin makes sessions containing its event types unreadable until it is reinstalled; no session data is deleted.
  • Typing /rewind into the web composer reports the child session id instead of navigating to it. The per-turn browser action performs the navigation.
  • A host-performed headless fork inherits the model route and preset, but not the deployment's per-agent model selection or workspace attachment.
  • Shell-created files outside the workspace, above the engine size bound or outside the recent-change budget require an observed filesystem write to be covered.
  • gc, doctor and session deletion exist in the engine but are not yet exposed as /rewind subcommands.

See Architecture for the event-registration constraint and Troubleshooting for operational workarounds.

Documentation

DocumentWhat it answers
ArchitectureWhen captures happen, how forks and restores are ordered, and what is recorded.
ComparisonHow the available dsh rewind designs differ, with dated package versions.
BenchmarksWhat the published timings mean and how to reproduce them.
TroubleshootingInstallation, profile, client bundle and storage diagnostics.
ContributingLocal development, builds and the four test tiers.

The snapshot engine is also usable outside dsh through Rust (cargo add filesnap) or its versioned JSON Lines CLI. The complete subprocess adapter in this repository is src/cli.ts.

Contributing

Issues, discussions and pull requests are welcome in English or Chinese:

Read CONTRIBUTING.md before changing the host/engine boundary. Report security problems through SECURITY.md, not a public issue.

Licence

Apache-2.0. See LICENSE. The filesnap engine uses the same licence.

评论

0
最新优先