Qintsg/dsh-safe-delete

Safe delete plugin for DeepSeek Harness (DSH): move files to trash / staging area instead of permanent removal

Safe-delete plugin: moves files and directories into a trash area (.dsh-trash/) instead of permanent removal, with restore and purge support. Delete-command hijacking intercepts rm / Remove-Item in bash/pwsh and steers the model to safe_delete instead; ssh/scp remote commands are fully allowed. Oversize capacity guard (default 5 GiB trash cap): restricted sessions require approval, full-access sessions need DSH_FORCE_DELETE=1 to permanently delete. Workspace-less fallback to $DSH_HOME/.dsh-safe-delete-trash. Four agent tools: safe_delete, trash_list, restore (rename/skip/overwrite conflicts), purge (always behind approval). Human-friendly trash mirrors the original directory tree.

Files & Data ★ 3 updated 2026-08-18 ✅ runtime-tested
View on GitHub ↗

Install

pnpm add dsh-safe-delete

npm package dsh-safe-delete 0.2.1 (registry-verified 2026-08-26). Install with pnpm add dsh-safe-delete in the profile, then register the plugin row in the DSH composition (plugins: dsh-safe-delete: $include: node_modules/dsh-safe-delete/lib/index.js). README documents this composition-manual install (not dsh plugin add).

Compatibility

DeepSeek Harness (any profile). Intercepts rm / Remove-Item via the tools/pre-execute hook and guides the model to safe_delete.

Details

Recent updates

v0.2.1: safe_delete/trash_list/restore/purge tools; rm hijacking; oversize guard; workspace-less fallback; i18n settings card.

FAQ

How do I get a file back?
Use the restore tool with ids or pattern; conflict strategies are rename (default), skip, or overwrite. The trash also mirrors the original tree so you can drag files back manually.
Is permanent deletion blocked?
purge always requires approval; oversize deletes are approval-gated in restricted sessions and need DSH_FORCE_DELETE=1 in full-access sessions.
Does it intercept remote deletes?
No — ssh and scp remote commands are fully allowed and never intercepted.

Alternatives

omdsh-dev/dsh-tool-csv · bwndlct/dsh-session-export · XiLuovo/dsh-session-timeline

More plugins in Files & Data

Browse more in Files & Data

Guides for Files & Data plugins