dsh-web
zhu1090093659/dsh-webDeepSeek Harness(DSH)Web 插件聚合生态包 · 一切皆插件,创意工坊分发(dsh-market.com)
🇬🇧 English • 🇷🇺 Русский • 🇨🇳 中文说明
|
⭐ If you like this plugin, please star it on GitHub — it shows me that the plugin is useful to you and motivates me to keep developing it.
🐛 If you find a bug or would like to request a feature, open a GitHub issue in any language — I will review your proposal and implement useful suggestions in a future plugin version. |
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
time_machine_checkpoint_rollback)HEAD or rewriting branch history;time_machine_diff)lib/client.js)time_machine_file_rollback or Diff Modal UI.git add index (stagedTreeHash) across turns.bash, execute_command, apply_patch).| 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 |
dsh plugin --profile web add @goodandready/dsh-time-machine
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
isTrustedSettingsRequest to a strict fail-closed model, verifying loopback IP (127.0.0.1, ::1), sec-fetch-site (same-origin, none), request origin matching host, and bearer tokens. Enforced HTTP method restrictions across all REST routes: all 5 mutating endpoints (/create, /delete, /prune, /rollback, /rollback-file) strictly require POST and return 405 Method Not Allowed otherwise, while read routes (/snapshots, /diff) strictly require GET.tab kind "time-machine" is already registered) in DSH >= 0.1.6-alpha.1 when both native sidebarRightTabs and betterSidebar are present. Unified tab registration under a single shared guard with native sidebar precedence and safe error suppression.time_machine_file_rollback tool and /rollback-file HTTP route) enabling surgical restoration of specific modified files without touching the rest of the workspace.stagedTreeHash, protecting staged files during snapshot creation and rollback.auto:pre-tool:<tool>) triggered before tool executions that could modify the workspace.goodandready/dsh-russian-lang).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.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.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.sidebarRightTabs + sidebar.right.pane.tab) introduced in DSH 0.1.5-alpha.1, including guide page registration with custom icon.betterSidebar integration retained with deterministic surface-scoped registrations, preventing ID collisions or duplicate mounts when both surfaces exist.cwd resolution: TimeMachine tools and REST endpoints automatically locate the active session workspace or accept explicit target directory.format: "patch" | "stat") with size limits (up to 256KB) and clean truncation warnings.git for-each-ref replacing $O(N)$ sequential git log processes for instant snapshot listings.tm_index_* staging files.session/event bus takes precedence, with legacy ctx.events used strictly as a fallback when ctx.on is unavailable.@deepseek-ai/dsh-credentials from peerDependencies.docs/design/DESIGN.md.read-tree + checkout-index + clean -fd. Rolling back to a checkpoint never modifies branch HEAD or severs git commit history.GIT_INDEX_FILE, preventing disruption of pre-staged files in .git/index.session/event bus for automated checkpoints on turn/start, approval/asked, turn/end, and command errors.ready.zh) in frontend interface.MIT © GooDAnDReaDY