Introduction¶
DeepSeek Harness (DSH) local attachments are managed by @deepseek-ai/dsh-attachment-local. The official README states: Images are kept forever—stored images are not automatically deleted, nor is there a component to collect unreferenced objects. The postponement of garbage collection is because resumed or forked sessions may share immutable objects, requiring correctness to be guaranteed first.
Long-term use of DSH for agent development leads to continuous growth in sessions, attachments, and various caches, yet lacks a management mechanism to “visualize usage, clean up by risk, and recover from accidental deletion.” The community plugin dsh-reclaim (repository @was35/dsh-reclaim, maintained by was35) targets admin-security scenarios to fill this gap while respecting official constraints.
What is this¶
dsh-reclaim is a DSH plugin that audits how much space sessions, attachments, and rebuildable caches occupy, and who references them. It categorizes risk levels based on rules. Instead of direct deletion, cleanup moves data into the plugin’s built-in quarantine zone for easy restoration. It also includes a read-only Agent audit tool—allowing models to query but not delete.
Features are complete but not yet published to npm (package.json current version is 0.3.0, MIT License). Directory page: was35/dsh-reclaim; Source code: github.com/was35/dsh-reclaim.
Core Features¶
Auditing and Grading¶
The plugin calculates and displays:
- Session usage
- Attachment usage and reference relationships
- Rebuildable cache usage and reference relationships
It marks risks based on tiering rules:
| Level | Meaning |
|---|---|
| Safe | Suitable for batch cleanup |
| Requires Confirmation | Review individually recommended |
| Dangerous | Do not clean up |
| Uncategorized | Report only |
What Can and Cannot Be Cleaned¶
Rebuildable caches are enumerated (e.g., derived images, atomic write staging residues, etc.) and can be moved to quarantine. Data such as repository tests and documentation can be restored byte-for-byte to their original state.
Attachment objects are not classified as rebuildable caches: they are referenced by at least one session, so the grading rule is always “Dangerous.” This is a design trade-off, not an omission; see docs/safety.md in the repository for details.
Quarantine and Empty¶
Cleanup is not deletion: selected items are moved to the plugin’s quarantine zone and can be restored when needed.
The only irreversible operation is when you explicitly choose to Empty a specific batch of quarantined content in the interface—this only destroys the batches already moved into quarantine and does not touch active data still in use.
Agent Side¶
Provides a read-only audit tool for Agents to query usage and references; deletion cannot be executed via the tool.
Installation and Enablement¶
Install into a profile with a web layer (the one used to launch the UI). Do not install the plugin in a brand-new empty profile alone—an empty profile only contains @deepseek-ai/dsh-base and lacks the web connection layer, causing the plugin to stall at pending (waiting for service: connection). If building your own profile, it must include @deepseek-ai/dsh-web-app (e.g., based on the official web template).
The only current installation path (no Release packages provided yet):
# Install from GitHub (not yet published to npm)
dsh plugin --profile web add "git+https://github.com/was35/dsh-reclaim.git#main"
dsh web
Once installed, open Settings → Space Reclaim.
After future npm publication, the README mentions a shorter command will be available: dsh plugin --profile web add @was35/dsh-reclaim. Note that the upstream unscoped package name dsh-reclaim is not the same product as this repository’s @was35/dsh-reclaim; add dsh-reclaim installs the upstream version.
To confirm the service is working properly, request a health check (requires web session cookie and local port):
curl -b <session cookie> http://127.0.0.1:<port>/api/dsh-reclaim/health
The capabilities in the response will list item by item whether the host interfaces required by the plugin exist and what functionality is affected if they are missing; this is suitable for diagnostics when version mismatches occur.
Typical Usage¶
- Open the audit panel in Settings → Space Reclaim to view session, attachment, and cache usage breakdowns and risk grading.
- For rebuildable cache families marked as Safe, you can batch-move them to quarantine; for Requires Confirmation items, verify them individually before acting.
- Batches moved to quarantine by mistake can be restored from the quarantine zone; after confirming a batch of quarantined data is no longer needed, execute Empty in the interface (this only affects that batch of quarantined content).
- For scripting or automated troubleshooting, use
/api/dsh-reclaim/healthto check capabilities and path resolution (e.g., whetherrequest-imagesresolves tocache/attachments/request-images,dshCachePathExported, etc.).
Local verification commands provided by the repository maintainer (run after cloning the repo; not necessary for daily use by non-DSH developers):
npm test # Unit tests
npm run test:host # Full closed-loop with real host: install, start, probe /health, clean one cache family and restore
npm run test:all # Unit + Host
npm run test:host creates a disposable web profile in /tmp/dsh-reclaim-verify by default and deletes it after completion; KEEP_HOME=1 npm run test:host preserves the home for further plugin verification. The script refuses to point VERIFY_HOME to the real $HOME (exit code 2).
Use Cases and Notes¶
Who it is for
- Developers running sessions, pasting images, and tool calls on a single-machine DSH for a long time, where disk usage is opaque and they are hesitant to manually delete files in
~/.dsh. - Administrators who need to see “who is still referencing” before cleanup and want rollback capabilities for mistakes.
DSH Version
DSH is in developer preview, and official documentation states that there will be breaking changes for compatibility; the engines.dsh range declared by the plugin is not strictly enforced by the installer—installation success does not guarantee correct operation.
The supported range declared in the README and package.json is (OR clauses per minor, consistent with peer dependencies):
>=0.1.5-rc.1 <0.3.0-0 || >=0.1.6-0 <0.1.7-0 || >=0.1.7-0 <0.1.8-0 || >=0.2.0-rc.1 <0.3.0-0
Hosts marked as verified by the maintainer in the README include 0.1.5-rc.1 … 0.1.5-rc.3, 0.1.7-rc.1, 0.2.0-rc.2 (including automated assertions for “no dedicated adaptation required” on the desktop side); 0.1.6-* is inferred and not tested. Node >=20.0.0 is required.
Permissions and Security
The plugin reads and writes to the home directory with the current DSH process permissions (mainly relying on the environment variable DSH_HOME, sharing the same home worldview with web/desktop). You should review the source code and MIT license yourself before installation to ensure it complies with your security policy. Community directories like SkillHub are independent sites and have no official affiliation with DeepSeek / Huanfeng (High-Flyer).
Desktop
The official desktop profile cannot be launched from a standard CLI (it is launched by the desktop carrier with fixed ports, etc.); the sessions, attachments, sessionQuery, and other services required by the plugin are provided by dsh-base + dsh-web-app in the maintainer’s tests and do not depend on the profile name. Full manual verification of the UI via click-by-click inside Electron remains a TODO in the README.
Conclusion¶
DSH officially does not automatically reclaim attachments or caches in shared object scenarios; dsh-reclaim provides a reclamation path that is auditable, graded, restorable from quarantine, and restricts Agents to read-only access. If you are maintaining local DSH disk space, you can install it from GitHub using the git+https:// command above and use it in Settings → Space Reclaim.
- Directory Page: https://www.skillhub.cn/plugins/was35/dsh-reclaim
- GitHub: https://github.com/was35/dsh-reclaim