you112358/dsh-cache-cleaner ↗★ 0
dsh-cache-cleaner
A DeepSeek Harness plugin that reclaims the rebuildable caches of DSH itself, the desktop client and installed plugins.
同名包的其他仓库
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:you112358/dsh-cache-cleaner说明文档
阅读完整 README ↗Usage
Settings page
Settings → Cache Cleaner (缓存清理), then:
- Pick 仅 7 天前的 / 7+ days old or 全部缓存 / Everything. The list rescans immediately with the chosen age policy.
- Review the groups; rows show size, file count, decoded path, notes and badges (
app restart recommended,only 7+ days old,N newer skipped). - Press 清理选中 / Clean selected. The first click arms the button, the second click (within 6 seconds) actually deletes; the page then reports freed space, removed files/directories, skipped entries and errors.
Agent tools
Scan everything with the default age policy:
{ "ids": null }
Preview a week-old-only cleanup of two targets:
{ "ids": ["dsh-prepared-shells", "dsh-updater-cache"], "dryRun": true, "olderThanHours": 168 }
Delete everything those targets hold, including fresh entries:
{ "ids": ["dsh-temp-subprocess", "dsh-temp-spill", "dsh-temp-misc"], "olderThanHours": null }
Both tools return a Markdown report; clean also returns structured totals (freedBytes, removedFiles, removedDirs, skipped, fresh).
HTTP route
The settings page talks to the Host through:
POST /dsh-cache-cleaner/api/scan { "olderThanHours": 168 | null | omit, "ids"?: string[] }
POST /dsh-cache-cleaner/api/clean { "ids": string[], "dryRun"?: boolean, "olderThanHours"?: 168 | null }
Requests must pass Connection's Host/Origin and browser-authentication checks (anything else gets 401); only POST is accepted. Responses are { "ok": true, "value": … } or { "ok": false, "error": { "code", "message" } }.
Configuration
createCleaner(options) accepts:
| Option | Default | Meaning |
|---|---|---|
staleHours | 6 | cutoff used by targets whose staleHours is 'config' (temp/spill targets) |
targets | all | id allowlist, for embeddings and custom setups |
The bundle row created by the patch passes its config object straight through, e.g.:
- insert:
- id: dsh-cache-cleaner
name: dsh-cache-cleaner
config:
staleHours: 24