DeepSeek Harness (DSH) continuously accumulates data during operation. However, due to DSH’s design principle of not actively deleting files, disk usage only grows. Faced with increasingly expanding storage space, developers need a solution that can clearly show the composition of disk usage without mistakenly deleting important data.
dsh-disk-doctor is a DSH plugin designed for this purpose. It provides read-only disk usage statistics, separating data, programs, and system cache, and offers a “move-only, no-modify” cleanup mechanism.
Plugin Introduction¶
dsh-disk-doctor is a DSH space health-check plugin maintained by Yeqij. It analyzes the disk usage of DeepSeek Harness by reading file system status, providing a visual right sidebar panel and safe cleanup features.
Core Features¶
Three-Zone Side-by-Side Statistics
The plugin divides disk usage into three zones: DSH data folder, DSH program installation, and system cache (including desktop user data and pnpm content store). These three physically overlap in terms of bytes (e.g., the pnpm store uses hard links pointing to plugin files), so summing them directly leads to double counting. This plugin counts them separately and explains the reasons for the overlap.
Automatic Path Detection
The plugin supports multiple path detection methods:
* Data directory follows $DSH_HOME (falling back to ~/.dsh);
* Program installation directory is detected from the running executable, and must actually contain resources/app.asar to be recognized;
* System cache is detected from %APPDATA% / %LOCALAPPDATA%, with fallbacks to .config and Library/Application Support;
* Simultaneously supports DSH instances installed globally via npm.
Right Sidebar Persistent Panel
After installation, the plugin displays a persistent panel in the DSH right sidebar. It supports sorting by category and Top N, as well as switching views by plugin or chat history. Each row provides a “Open in File Manager” function.
Safe Cleanup Mechanism
The plugin never performs delete operations. All cleanup functions are disabled by default and require secondary confirmation. During cleanup, it only executes renameSync, moving files to the plugin’s isolation directory <dshHome>/disk-doctor/quarantine/<timestamp>/. The manifest is rewritten after every move to ensure consistency with the disk state even if the power is interrupted, and it supports one-click undo.
Security and Privacy
* No Network Access: The plugin declares network: [] in its manifest and has been tested to ensure no outbound calls.
* Report Sanitization: Outputs that leave the machine (such as Markdown or JSON reports) will replace the home directory with ~, while only the local panel displays the real path.
Installation and Usage¶
Prerequisites
* DeepSeek Harness version: >=0.1.0-rc.2 (tested on 0.2.0-rc.2).
* Node.js version: ^22.19.0 or >=24.0.0.
Installation Methods
Since this plugin is not published to npm, it must be installed via the following methods:
- Directly use the repository address:
dsh plugin --profile <profile> add https://github.com/Yeqij/dsh-disk-doctor
- Use the packaged tgz file:
dsh plugin --profile <profile> add https://github.com/Yeqij/dsh-disk-doctor/releases/download/v0.1.0/dsh-disk-doctor-0.1.0.tgz
- Or download the source code, add the local folder path in DSH plugin management, and then restart DSH.
Testing
After installation, you can run tests to verify functionality:
npm test
The tests cover 177 items, including four modules: locate, scan, plugin, and client.
Notes¶
- Statistics only grow: DSH itself does not delete files, so the plugin’s statistics are cumulative.
- Program directory detection: The detection of the program installation directory relies on the actual existence of
resources/app.asar. Headless environment deployments will report errors accordingly. - No build dependencies: The plugin has zero runtime dependencies and zero build steps.
- Cleanup disabled by default: To prevent accidental operations, cleanup functions are disabled by default and require manual enabling and secondary confirmation. Cleanup only targets four types of “safe to clean” files.
Conclusion¶
dsh-disk-doctor solves the problem of opaque DSH disk usage and the risks associated with cleanup. With a safe cleanup mechanism implemented via quarantine renaming, it is suitable for developers who need to run DSH locally for long periods.