sugarxl/dsh-safety
Denies raw filesystem deletion in DSH by default and routes it through a trash-style safe_delete that needs a one-shot, time-limited approval.
Closes the failure mode the README's own incident note describes: a recursive delete aimed at a path that only exists after variable expansion, where the directory was recoverable only because it had been generated. Direct deletion calls — fs.rmSync, fs.rm, fs.unlink, rm -rf through require('fs') — are denied by default and routed to safe_delete, which is the only sanctioned delete channel and moves targets to a trash area instead of removing them. Sensitive deletes and writes outside the workspace (home directory, node_modules, the deployment install dir, home patch and settings, agent presets) are denied and require a granted, one-shot, time-limited user approval; and some deletes are never approvable at all — the README states the only way to remove a directory tree is a human action, not a model confirmation. Installed as a plugin it exposes model-facing tools for the safe path while the same logic is available as a standalone CLI, and the approval workflow plus the configuration reference are documented so the policy can be read before it is trusted.
Install
dsh plugin --profile web add @suagr_xl/dsh-safetyThe npm line from the README's Install section, which carries an inline comment in the original; the README notes that dsh plugin runs pnpm and reconciles dsh.profile.bundles automatically. A repository/development install is also documented as a symlink (dsh plugin --profile web add link:$(pwd)) rather than a copy, with the trade-off stated: the symlink reflects edits immediately, unlike file: which snapshots. Uninstall is dsh plugin --profile web remove @suagr_xl/dsh-safety, and updating goes through dsh plugin --profile web update after a pnpm-workspace.yaml step the README spells out. A standalone CLI path exists for people who want the guard without installing the plugin at all.
Compatibility
System requirements are stated plainly: a working DeepSeek Harness (dsh web boots), npm install with no extra requirements, and Node.js >= 22 for the repository route. The package has zero runtime dependencies. It installs into the official profile layout and lands where the standard DSH plugin loader expects, which the README documents with a Verify & uninstall section and an install-troubleshooting chapter. The design is host-side enforcement rather than prompt advice, so it holds regardless of which model or preset is selected.
Details
- Repo: sugarxl/dsh-safety
- Category: Agent Capabilities
- Stars: 1
- Version: 0.2.1 (npm)
Alternatives
stardustlc666/dsh-sql · U-Illll/dsh-memory · SnowAmberX/dsh-role-router