DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Safe Delete — DSH Plugin for DeepSeek Harness
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins
S

dsh-safe-delete

Safe Delete

Intercepts `rm` commands issued by any DSH agent session (GUI, automation runs, headless bridges) at the tools guard layer and moves the targets to the macOS Trash instead of deleting them. Switchable from the web GUI under Settings → General.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add github:NattoCB/dsh-safe-delete#149190d58104e8b09497967babaa69de2252d309
READMECompatibilityVersions

Compatibility and provenance

Safe Delete is published as dsh-safe-delete and currently resolves to version 0.2.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
9/3/2026

Versions

0.2.0stable
9/3/2026
0.1.0stable
9/1/2026

Related plugins

Loading related plugins…

Latest
0.2.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
9/3/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in security-access.

Doctor@linxin666/dsh-doctorTransactional rescue mode for DSH profiles with a supervised launcher, isolated recovery capsule, deterministic repairs, health monitoring, and a local Web recovery consolePocketdsh-pocketPut DeepSeek Harness in your pocket: one package, one settings page, and scan a QR code on your phone to access DSH on your computer in sync (LAN + public network, real-time screen mirroring).DSCODE@toddzheng024/dscode-bundleA complete DeepSeek coding agent with persistent shell, Ultra collaboration and automatic permission review.Auto Reviewdsh-auto-reviewSecond-model AI auto-review for DeepSeek Harness approval requests: a read-only reviewer subagent decides allow/deny on the approval answerer chain, with fail-closed fallback and full session-log audit.

README

dsh-safe-delete

Every rm an agent runs becomes a recoverable move to the macOS Trash.





One global guard on the tools registry — ctx.tools.guard() —— no tool, prompt, or core changes

A DeepSeek Harness host-side plugin that makes agent-issued rm commands recoverable: targets are moved to the macOS Trash instead of deleted, across GUI sessions, automation runs, headless bridges, and subagents. One switch in Settings → General turns it off — disabled, commands run with native DSH behavior.

Capabilities

  • Recoverable deletion — an rm in command position is denied and rewritten to /usr/bin/trash -v; the model receives a report of exactly what was moved, so nothing silently disappears.
  • Every session, one guard — registers once on the DSH tools registry; GUI chats, scheduled automations, headless bridges, and subagents are all covered with zero per-session wiring.
  • Shell-aware interception — quote-preserving lexer catches sudo rm, /bin/rm, env/nice-prefixed rm, VAR=x rm, and xargs rm inside compound commands (&&, ||, ;, |).
  • Fail-safe by design — constructs that could hide an rm ($(...), backticks, subshells, heredocs, eval, nested sh -c) are denied with guidance instead of rewritten; a failed trash is reported, never retried as real deletion.
  • Runtime switch — toggle in the web GUI (Settings → General → Safe Delete) or via POST /safe-delete/config; the state persists across restarts in $DSH_HOME/storages/safe-delete.json.

How it works

The plugin installs one guard on the DSH tools registry. Every bash tool call is scanned before execution:

flowchart LR
    A["bash tool call"] --> B{"rm in command<br/>position?"}
    B -- "no" --> C["native execution"]
    B -- "yes" --> D{"switch on?"}
    D -- "off" --> C
    D -- "on" --> E{"safely<br/>rewritable?"}
    E -- "no: subshell, eval,<br/>heredoc, backticks" --> F["deny with guidance,<br/>nothing runs"]
    E -- "yes" --> G["run trash -v, deny the<br/>original, report targets"]

Intercepted calls are denied and re-executed as trash by the guard itself, so quoting and globs survive:

[dsh-safe-delete] intercepted `rm` — the targets were MOVED TO TRASH (recoverable),
not deleted. Original command denied. Targets: build/ dist
trash: build/ → .Trash/build/

Plain non-rm commands pass through untouched; commands that merely mention rm (echo rm, grep "rm " log) are ignored. rm flags (-f, -r, …) are stripped rather than honored: trash moves whole directories natively.

Scope and limits

CoveredNot covered
Commandsrm, sudo rm, absolute-path rm, xargs rm — simple and compoundfind -delete, unlink, git clean, language runtimes' own file APIs
Guaranteeintercepted at the guard layer, before executionthe guard is an accident-prevention net for the most common destructive verb, not a sandbox

sudo rm is intercepted before sudo ever runs, but trashing files that require root can still fail — trash errors are reported verbatim.

Install

dsh plugin --profile web add github:NattoCB/dsh-safe-delete

Restart the DSH web process — host-side bundles and their patches load at process start. On boot the plugin logs rm guard active once.

Configuration

SurfaceHow
Web GUISettings → General → Safe Delete — the switch takes effect on the next bash call, no reload
HTTPGET /safe-delete/config → { "enabled": bool }; POST /safe-delete/config with { "enabled": bool }
File$DSH_HOME/storages/safe-delete.json — { "enabled": bool }

Default: enabled. A missing or corrupt state file also resolves to enabled — installing the plugin expresses the intent to have the guard, and a corrupt file never silently downgrades protection.

Development

npm test        # node --test: lexer, rewrite matrix, guard contract, switch store/API

The lexer/rewriter is exported as exports._internals so tests exercise the real code paths (analyzeCommand, tokenize, splitSegments, makeGuard, ConfigStore, handleConfigRequest).

License

MIT — part of the awesome-dsh-plugin ecosystem.