dsh-safe-delete
Run the following command in DeepSeek Harness:
dsh plugin install NattoCB/dsh-safe-delete
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install NattoCB/dsh-safe-delete inside DeepSeek Harness to install the plugin; the source code is hosted at https://github.com/NattoCB/dsh-safe-delete .
About this plugin
When a DeepSeek agent executes bash on macOS, a single rm -rf can wipe away a half-day of work with no way to undo it. Developers who grant models free terminal access—whether in GUI chats, CI pipelines, headless bridges, or multi-agent orchestration—face that risk every day.
dsh-safe-delete takes a direct approach: it installs one global guard on the DSH tools registry that intercepts every bash call containing rm in command position and re-executes it as /usr/bin/trash. The model receives a clear receipt of exactly what was moved, so nothing vanishes silently. Its quote-preserving lexer catches sudo rm, /bin/rm, env- or nice-prefixed rm, xargs rm, and rm buried inside compound commands joined by &&, ||, ;, or |. Constructs that could hide an rm—$(...), backticks, heredocs, eval, nested sh -c—are denied outright with guidance rather than rewritten. One registration covers GUI sessions, scheduled automations, headless bridges, and subagents with zero per-session wiring.
If you run DeepSeek Harness on macOS and grant your agent bash access—whether for casual chat, automation, or multi-agent workflows—this plugin is a zero-intrusion safety net. It ships enabled by default, toggles with a single switch under Settings → General, and persists across restarts. It does not aim to be a sandbox; it solves exactly one problem: making the most destructive verb recoverable.
Use Cases
- Agent accidentally runs rm on critical files or directories
- Subagents in multi-agent pipelines trigger destructive commands
- Automation runs where models execute deletions unsupervised
Best For
- Developers granting bash access to agents on macOS
- Engineers running DSH automations or headless bridges
- Teams seeking zero-intrusion safety for agent file operations
Related Plugins
A network security red-team benchmark plugin for DeepSeek-V4.1/Flash featuring dual-layer kernel injection and zero-tool architecture for controlled model safety assessment.
A security red-team prompt plugin for DeepSeek-V4 that uses code-formal mapping and zero-trigger system prompts to enable unconditional output, intended for authorized testing and research only.
Adds an Auto approval mode on the official workspace-write sandbox, classifying semantic risks, asking when ambiguous, and denying destructive operations.
Undo/rollback system for DSH: config & plugin snapshots, one-click undo/redo/restore, message-level revert, secret masking, safe mode, and offline WebUI/GUI/CLI rescue tools for when DSH won't start.