AI Agent Hub
Back to plugins
🧩

dsh-plugin-recycle-bin

admin-security Updated 2026.08.30

Run the following command in DeepSeek Harness:

dsh plugin install Xylocarpro/dsh-plugin-recycle-bin

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install Xylocarpro/dsh-plugin-recycle-bin to install this plugin in DeepSeek Harness; the full source repository is at https://github.com/Xylocarpro/dsh-plugin-recycle-bin

About this plugin

When an AI agent executes local file commands on Windows, the most dangerous outcome is a single del, Remove-Item, shred, or sdelete call that erases files straight off disk. There is no safety net, and one request to empty the Recycle Bin turns a recoverable mistake into permanent data loss. dsh-plugin-recycle-bin is built to eliminate that failure mode.

It operates on three layers. At the shell junction it wraps every ctx.shell.run and ctx.shell.start call—covering PowerShell and bash, both foreground and background subprocesses—and blocks a broad list of destructive tokens (del, rm, Remove-Item, erase, rd, rmdir, deltree, find -delete, unlink, sdelete, shred, srm, cipher /w, wipe) before they are ever spawned. Matching is done by command position, so variables like $rm or words such as form never produce a false positive. All sanctioned deletions flow through the file_trash tool, which hands the target to a PowerShell SendToRecycleBin call, guaranteeing the file lands in the system Recycle Bin and that permanent erasure is mechanically impossible within the agent's tool path. The plugin also forbids Clear-RecycleBin and any command that targets the Recycle.Bin folder directly. Before each deletion it measures free disk space (fs.statfsSync with a Get-PSDrive fallback); when the remaining space falls below a configurable threshold the plugin pauses and asks the user to free up space and retry, force-recycle anyway, or cancel. A trash_status tool reports Recycle Bin support, remaining versus total capacity, and the safety threshold at any time.

The plugin is a strong fit for developers and teams who run DSH agents on Windows to tidy project directories, clean up build artefacts, or perform bulk file operations while requiring that every deletion stays recoverable from the Recycle Bin. If your workflow needs the agent to be able to delete files but every single deletion must remain reachable, this plugin is the guardrail that sits between the model and the disk.

Use Cases

  • Batch file cleanup by an AI agent on Windows where every deletion must remain recoverable from the Recycle Bin
  • Blocking irreversible disk commands such as del, rm, Remove-Item, sdelete inside agent tool calls
  • Pausing deletions and prompting the user to free space, force-recycle, or cancel when free disk drops below a threshold

Best For

  • Developers running DSH agents on Windows for file management tasks
  • Teams that need a hard safety boundary around AI agent file deletion
  • Users who want agents to delete files but require every operation to be recoverable from the Recycle Bin