dsh-turn-scratch
Run the following command in DeepSeek Harness:
dsh plugin install popujiang/dsh-turn-scratch
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install popujiang/dsh-turn-scratch in the DeepSeek Harness terminal to install the plugin; the source code is hosted at https://github.com/popujiang/dsh-turn-scratch
About this plugin
After every dsh turn, the workspace is littered with temporary files you cannot identify, do not dare delete, and end up manually cleaning after each conversation. dsh-turn-scratch exists to eliminate that friction: at the end of each turn it scans the entire workspace, moves transient files into an isolation folder under the user directory (never inside the workspace itself), lets code-level rules decide what is safe to keep or discard, and escalates genuinely ambiguous files to a single isolated model call. Actual deletion only happens when you explicitly purge the isolation folder, so the worst case is a file being quarantined and easily restored, never a wrong deletion.
It also provides a fixed-path staging area: mid-turn intermediate output is written straight into the staging directory so the workspace is clean from second one, then batch-moved into the per-turn isolation folder at turn end. The staging area is an additional source, not a replacement; the original full-workspace scan runs unchanged, so anything that slipped into the workspace without touching the staging path is still collected at turn-end. Cross-volume transfers follow a strict copy, verify file count and byte total, persist the record, and only then remove the original, meaning if any step fails the original remains intact.
Ideal for anyone who relies on dsh for daily work and wants the workspace to stay pristine without a manual cleanup ritual after every conversation. Zero configuration out of the box; adjust behaviour by adding a config block for turn-scratch in the profile cordis.patch.yml. The plugin is tiny, exposes five conversation-driven tools (status, restore, purge, mark, workdir), and requires no extra interface.
Use Cases
- Temporary files pile up in the workspace after every dsh turn and need automatic collection
- Long turns produce mid-process artifacts; the workspace should stay clean from the very first second
- You prefer quarantining files with an easy restore path over risking manual deletion
Best For
- Developers who rely on dsh for multi-turn task execution daily
- Users who want a consistently clean workspace without post-conversation manual cleanup
- Safety-conscious automation users who prefer isolation over direct deletion workflows
Related Plugins
A network security red-team benchmark plugin for DeepSeek-V4.1/Flash featuring dual-layer kernel injection and zero-tool architecture for controlled model safety assessment.
A security red-team prompt plugin for DeepSeek-V4 that uses code-formal mapping and zero-trigger system prompts to enable unconditional output, intended for authorized testing and research only.
Adds an Auto approval mode on the official workspace-write sandbox, classifying semantic risks, asking when ambiguous, and denying destructive operations.
Undo/rollback system for DSH: config & plugin snapshots, one-click undo/redo/restore, message-level revert, secret masking, safe mode, and offline WebUI/GUI/CLI rescue tools for when DSH won't start.