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.

Package
dsh-cache-cleaner
Compatibility
Unverified
Version
0.1.1
License
MIT
Last updated
Nov 18, 2026

Other repositories with this package name

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:you112358/dsh-cache-cleaner

Usage

Settings page

Settings → Cache Cleaner (缓存清理), then:

  1. Pick 仅 7 天前的 / 7+ days old or 全部缓存 / Everything. The list rescans immediately with the chosen age policy.
  2. Review the groups; rows show size, file count, decoded path, notes and badges (app restart recommended, only 7+ days old, N newer skipped).
  3. 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:

OptionDefaultMeaning
staleHours6cutoff used by targets whose staleHours is 'config' (temp/spill targets)
targetsallid 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