Preface¶
When using DeepSeek Harness (DSH) for AI programming, the workspace often contains source code, .git history, and sensitive files like .env and keys. While backing up the entire repository to the cloud facilitates cross-device recovery or conversation-level rollback, common practices involve silent uploads, keys residing on the server, and sensitive files packed into the bundle regardless—users can neither disable this nor decrypt the contents.
Below is an introduction to the community plugin dsh-plugin-repo-snapshot (maintainer isayrhythm, categorized as a networking tool on SkillHub): It packages and encrypts the current project within DSH, storing it in a local directory or your own Alibaba Cloud OSS; decryption private keys remain local only. The settings page allows toggling, connection testing, and immediate backups. The plugin runs with the permissions of the current dsh process; it is recommended to read through the GitHub repository source code and MIT license before installation.
What is this¶
dsh-plugin-repo-snapshot is an encrypted snapshot backup plugin for the DeepSeek Harness workspace (npm package name dsh-plugin-repo-snapshot, version 1.0.0 in current materials). It solves the problem of: under the premise of “needing to back up the workspace (optionally including .git)”, ensuring that data destination, whether to upload, and ability to decrypt are all controlled by the user, rather than handed over to invisible cloud logic.
The DSH ecosystem philosophy is “Everything is a plugin”; the SkillHub directory page is a community site and has no official affiliation with DeepSeek / High-Flyer.
Core Features¶
The capabilities explicitly stated in the materials are as follows.
- Encrypted Snapshots: AES-256-GCM archives (optional AES-256-CTR); the AES key is wrapped using a local RSA-4096 public key (RSA-OAEP-SHA256). The private key is located at
<DSH_HOME>/repo-snapshot/keys/private.pemand is not uploaded. - Two Destinations: Local directory, or Alibaba Cloud OSS (zero
ali-ossSDK dependency, using Node’s built-infetch+node:cryptofor V1/V4 signed PUT). - Settings Interface: “Repository Snapshot Backup” section within the DSH Web settings page—toggles, OSS parameters, save and test connection, backup now.
- Sensitive File Interception: By default, intercepts
*.pem,*.key,id_rsa,*_rsa,.env,.npmrc,.git-credentials,.ssh, etc.; skipped items are counted and explained in the conversation. - Other Behaviors: Oversized files are skipped and counted based on
scan.maxFileSizeMB; unchanged content can be deduplicated to skip redundant uploads; optional inclusion of the full.git; trigger timing supportssession-start/pre-step/both/manual.
Installation and Activation¶
Install from npm / GitHub¶
The package declares dsh.bundle.patch, which automatically inserts the plugin line into the composition upon installation, eliminating the need to manually modify profile configuration (except for local link development).
dsh plugin --profile web add dsh-plugin-repo-snapshot
Dependencies: Uses archiver for packaging; OSS does not depend on the official Alibaba Cloud Node SDK. The host requires Node >=20.0.0.
Local Development Mounting (Optional)¶
If linking from a local directory for development, you need to mount the plugin line in the profile’s cordis.patch.yml and restart dsh web—the plugin itself is ESM, and the client bundle is only loaded at startup; hot reload will not re-import it.
cd <your DSH profile directory> # e.g., ~/.dsh/profiles/web
pnpm add link:/path/to/dsh-plugin-repo-snapshot
- insert:
- id: repo-snapshot
name: dsh-plugin-repo-snapshot
Typical Usage¶
After completing the installation steps above and restarting dsh web, open Settings → Repository Snapshot Backup.
- Turn on the Enable switch to determine whether to create snapshots.
- Select “Local Directory” or “Alibaba Cloud OSS” for Storage Location.
- For OSS, fill inRegion(e.g.,oss-cn-hangzhou),Bucket,AccessKey ID, andAccessKey Secret; it is recommended to use a RAM sub-account with write permissions only for this bucket.
- If you do not want the AK/SK written tosettings.json, you can leave it blank in the settings page and use environment variables instead:
export ALIYUN_OSS_ACCESS_KEY_ID=LTAI...
export ALIYUN_OSS_ACCESS_KEY_SECRET=...
- Click Save and Test Connection: This will write and delete a probe file at the destination to verify availability.
- Click Backup Now to generate a snapshot immediately; you can also configure it to trigger automatically at session start according to the
triggersetting.
The approximate structure of the snapshot at the destination:
<Destination>/<prefix>/<Date>/<SessionID>/<snap_...>/
├── snapshot.tar.gz.enc # Encrypted archive
└── snapshot.key.enc # AES key wrapped by the local public key
The archive contains manifest.json (time, workspace, list, skip statistics) and file contents under files/<relative path>.
Recovery¶
After retrieving the snapshot.tar.gz.enc and snapshot.key.enc for a specific snapshot from the destination, use the repository’s built-in script to decrypt them locally (you must retain private.pem; if lost, recovery is impossible, as there are no backdoors):
node scripts/decrypt.mjs \
--input snapshot.tar.gz.enc \
--key snapshot.key.enc \
--private-key ~/.dsh/repo-snapshot/keys/private.pem \
--output ./restored
On Windows, the default path for the private key is C:\Users\<You>\.dsh\repo-snapshot\keys\private.pem. The materials note: A “one-click download and recovery from OSS” script has not yet been provided; you need to retrieve the two files from the console or ossutil before running decrypt.mjs.
Configuration and HTTP Interface (Scripting)¶
The settings page writes to <DSH_HOME>/repo-snapshot/settings.json, which takes precedence over cordis.patch.yml. Common items include enabled, oss.provider (local / aliyun), oss.prefix (default repo-snapshots/), scan.includeGit, scan.excludeSensitiveFiles, trigger, dedupe, etc.; for the full table, see the GitHub README.
The host also registers routes for use by the settings page or scripts, such as:
| Method | Path | Description |
|---|---|---|
GET |
/plugins/repo-snapshot/status |
Configuration (key masked), fingerprint, recent snapshots |
POST |
/plugins/repo-snapshot/backup-now |
Backup immediately, can pass workspacePath |
Applicable Scenarios and Notes¶
Who it is for: Developers who want to perform encrypted, auditable backups of the current workspace (optionally including .git) to their own storage within the DSH Web scenario; especially users concerned about default interception of .env, keys, etc., and OSS least privilege (PutObject / DeleteObject).
Points to Note:
- The plugin reads and writes the workspace and uploads files with the permissions of the current
dshprocess; you should review the source code and MIT license yourself before installation. - Snapshots are full packages; incremental backups have not yet been implemented; large repository Git packs may be skipped due to
maxFileSizeMB(default 5), so adjust it if necessary. - Snapshots only increase and are not deleted; you need to formulate a strategy for cleaning up old snapshots yourself.
- OSS signatures default to
auto(try V4 first, then fall back to V1); for 403 or signature errors, the README provides troubleshooting instructions forsignatureVersionand RAM permissions.
Links¶
- SkillHub Directory: isayrhythm/dsh-plugin-repo-snapshot
- Source Code and Documentation: github.com/isayrhythm/dsh-plugin-repo-snapshot