Preface¶
In DSH, when changing configurations, installing plugins, or running long tasks, the risk isn’t just “the current page crashing.” Breaking settings.yaml, profiles/, skills/, losing sessions/ archives, not knowing which commit to roll back to after a crash, and being unable to recover local state after a standalone failure can all turn troubleshooting into a memory-based recreation.
dsh-git-rescue is a rescue and recovery plugin for DSH. The core idea is to include .dsh in git version control, use commit history for rollback, and use independent daemon processes, remote backups, rescue environments, and specialized recovery tools as safety nets.
What is it¶
dsh-git-rescue is a DSH plugin maintained by EIGHTfs, positioned as:
DSH Rescue Recovery Plugin — Guardian + .dsh Git Repo Management + Remote Backup + Rescue Environment + Specialized Recovery Tools.
Repository address:
https://github.com/EIGHTfs/dsh-git-rescue
Verified data indicates:
- License:
MIT package.jsonversion:2.5.0enginesrequirements:dsh >=0.0.1,node >=20.0.0
It should be noted that the version numbers in the documentation appear inconsistently, such as “current 2.0.0 merged version” in the README feature overview, while package.json is 2.5.0. It is recommended to use the current repository files as the standard.
Core Capabilities¶
.dsh Local Version Management¶
The plugin manages .dsh as a local git repository, supporting automatic commits, heartbeat, and crash detection.
The commit format is:
chore(guard): <trigger reason> | <self-check summary>
This allows every commit to carry the trigger reason and self-check summary, making it easier to review what happened at that time.
Inclusion Boundaries¶
Verified data provides the following boundaries:
- Credentials are never included:
.credentials.yaml,.env,.anonymous-user-id,git-rescue/(token/heartbeat/events) - Large files are not included:
node_modules/,profiles/*/node_modules/ sessions/storagesare zstd compressed binary; default is one full baseline per day plus regular incremental excludes
Remote Backup¶
Remote backup supports the GitHub token / SSH key dual approach.
The default remote repository name is:
.dsh@<dsh-version>.<device-id>
If GitHub does not allow a leading dot, it automatically falls back to:
dsh-at-...
The token is stored locally only, with permission 600, and is never written to any commit; it is used only for push authentication.
During initialization, it detects if the system git is available; if the local git is missing git-remote-https, it automatically falls back to direct connection via the GitHub REST API.
Guardian & Autostart¶
The plugin uses an autostart guardian process. The startup command is at the .dsh directory level and writes system autostart entries.
guardian operates as a separate process for health checks, git rollback, startup, self-check, OOM protection, OOM fault identification, and peak-resume.
When starting DSH, it carries:
NODE_OPTIONS=--max-old-space-size=4096
Crash Recovery Path¶
Crash recovery is handled via the following path:
Failure Classification → Preserve Scene → Mark Bad Points → Reset to Good Commit → Startup → Self-check
If recovery cannot be achieved through git rollback, the further path provided in the documentation is to invoke the rescue environment for assistance.
Rescue Environment¶
The rescue environment includes:
<dsh-version>@Save-clean
<dsh-version>@Save-test
When recovery is impossible, Save-clean can be invoked, and a clean dsh loads the plugin skills directory to assist.
Specialized Recovery Tools¶
Specialized recovery tools include:
plugin_config
boot_symlink
ro_volume
plugin_load
permission
session_repair
plugin-health performs declaration/product consistency checks and auto-fixes before startup.
There is also a takeover restart capability with the path:
TERM → Polling Recovery → Verification
Session Recovery & Auto-resume¶
After a crash, session-manager is automatically called to resume interrupted sessions, and this is constrained by the auto-resume global gate.
The auto-resume global gate rules are:
DSH defaults to resume off upon startup; user manually enables it, or it automatically passes after the first manual conversation.
profile Restore Points¶
profile restore points are automatically zipped when profile/ configuration changes are committed to git.
For manual restoration:
unzip -o
This performs a coverage restore, independent of git.
Built-in LLM Autonomous Diagnosis¶
guardian can connect directly to an LLM to analyze faults and suggest actions, executing them after verification.
Documentation indicates it uses the DEEPSEEK_API_KEY from .credentials.yaml to call the DeepSeek API.
Auto Update¶
Auto-update supports forcing the latest stable version from GitHub and supports major version upgrades.
Directory Structure View¶
tools/dir-tree.mjs is an independent tool, zero-dependency, and cross-platform compatible with Node.js.
It can be run via CLI or imported for use, and by default lists only 2 levels of directories:
tools/dir-tree.mjs
Plugin Installation Gate¶
The package.json description mentions “plugin installation gate”.
The verified data does not elaborate on the specific rules of this gate.
Agent Tools¶
The documentation lists the following Agent tools:
git_rescue_status
git_rescue_init
git_rescue_backup
git_rescue_log
git_rescue_rollback
git_rescue_push
git_rescue_restart
git_rescue_repair
git_rescue_rescue_env
git_rescue_boot_autostart
git_rescue_link_recovery
git_rescue_restorepoints
git_rescue_restorepoint_build
git_rescue_restorepoint_restore
Installation & Enablement¶
Current verified data does not provide an installation command, so no installation command is constructed here.
Before enabling, the environment must be confirmed:
dsh >=0.0.1
node >=20.0.0
The plugin runs with the permissions of the current DSH process. Before installing, you should check the source code and license:
https://github.com/EIGHTfs/dsh-git-rescue
MIT
Regarding token, SSH key, .credentials.yaml, and system autostart, review them according to your own security requirements.
Applicable Scenarios & Notes¶
Suitable for the following scenarios:
- Need to version-manage
.dshconfigurations, sessions, skills, and other states - Need automatic health checks, rollback, startup, and self-check after a crash
- Need GitHub remote backup
- Need a clean rescue environment and specialized recovery tools for assistance
- Need
profilerestore points as a coverage recovery method outside of git
Notes:
- Verified data does not include install command, star count, categories, or directory page URL.
- Version inconsistency: README feature overview mentions
2.0.0,package.jsonis2.5.0, and profile restore point related descriptions mentionv2.5.0. - The scope of “git restore” differs:
package.jsondescribes it as “restore profile only”, while README describes it as rolling back to a good commit and committing the scene; the scope descriptions are not fully consistent. - Name casing differences exist in the data: GitHub link is
EIGHTfs/dsh-git-rescue,package.jsonname isdsh-git-rescue. - The DSH plugin directory is a standalone site and has no official affiliation with DeepSeek / Huanfang; this plugin is not from the official app store.
Conclusion¶
The value of dsh-git-rescue lies in splitting DSH’s “configuration state” and “crash recovery” into executable paths: version management to git, local safety net to guardian, remote backup to GitHub, and extreme faults to the rescue environment and clean DSH.
GitHub:
https://github.com/EIGHTfs/dsh-git-rescue
Verified data does not provide a directory page URL.