AI Agent Hub
Back to plugins
🧩

dsh-safe-delete

admin-security Updated 2026.09.03

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