Environment housekeeper for the agent: toolchain inventory (node/pnpm/git/gh/ffmpeg/browsers), scratch/cache scan with whitelist-guarded one-click cleanup, and the machine rules file (AGENTS.md) editor - all in the Web GUI settings.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:guo6x/dsh-housekeeper
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time. Only install sources you trust, and pin a commit (github:owner/repo#sha).
README
中文说明 · DeepSeek Harness plugin
Keep your agent's hands clean: toolchain inventory, safe one-click cache cleanup, and machine rules (AGENTS.md) editing — all inside the DSH Web GUI settings. Zero runtime dependencies, one command install.
- 📋 Toolchain inventory — auto-detects node/pnpm/git/gh/ffmpeg/Edge/Chrome locations and versions
- 🗑️ Honest cache cleanup — scans the
.tmpand cache directories agents leave behind: size / file count / mtime, 4000-file truncation markers, 30-day-untouched highlighting, click-to-expand content preview, check and delete - 🛡️ Whitelist protection — only project
.tmpdirs and cache-root children are deletable;..escapes, symlink escapes, and system paths are rejected, with a realpath re-check before every delete - 📝 Machine rules editor with a safety net — read/write
~/.dsh/AGENTS.md(the global rules every agent session loads), auto-backup of the previous version on every save, one-click restore, live on save - 🌍 Configurable — scan roots default per platform (Windows:
D:\github/D:\environment\cache), editable in the panel, overridable via env vars - 🤖 Agent tools —
housekeeper_report(inventory + disk report) andhousekeeper_clean(same whitelist, max 10 paths per call)
Install
dsh plugin --profile web add dsh-housekeeper
Restart dsh web, then Settings → Plugins → 环境管家.
Requirements: DSH web profile, Node ≥ 22.
Security model
- All routes accept loopback clients only (403 otherwise)
- Cleanup whitelist — a path is deletable only when ALL hold:
- under
<projects-root>\<repo>\ .tmp\, or a direct child of<cache-root>\ - normalized path stays inside the whitelist root (no
..) realpathstill lands inside the whitelist root (no symlink escapes)- the whitelist roots and repo dirs themselves are never deletable
- under
- The rules endpoint reads/writes
$DSH_HOME/AGENTS.mdonly; the path is fixed - No telemetry, no external network calls
How it works
GUI settings ──fetch──▶ /housekeeper/state|clean|rules (loopback) ──▶ host plugin
├─ probe: candidate paths + PATH lookup + versions
├─ scan: rule-driven walk with sizes (4000-file cap)
├─ clean: whitelist + realpath check, then rm
└─ rules: read/write $DSH_HOME/AGENTS.md (64KB cap)
Develop
pnpm install
node build.mjs # esbuild → lib/index.js (host ESM) + lib/client.js (ModuleLoader bundle)
node tests/core.mjs # 21 whitelist/scan/clean sandbox tests, no real environment needed
MIT licensed. Issues and ideas welcome.
Links
More in this category
strukto-ai/mirage#dsh★ 3443
Swaps the filesystem and bash providers for a mirage virtual workspace: file tools and shell commands run over mounted resources (RAM, S3, Redis, Slack, Gmail, Notion, Postgres) instead of the host disk, with per-mount read/write/exec modes, per-command sandbox routing (monty, pyodide, quickjs in process; docker, e2b, daytona remote), and installed CLIs (git, gh, slack, linear, ntn, gws, or one you register) as head words in the virtual terminal.
hust-open-atom-club/oh-dsh★ 189
Community distribution: TUI, desktop, and Web UI as one bundle with layered installation.
Jayden-X-L/forkprobe★ 66
Compare multiple skills on the same task and pick the winner.
vlln/plugin-registry★ 43
Ecosystem infrastructure: a thin browser console for managing official repository plugins (zero patches) plus a make-dsh-plugin skill for guided plugin development.
forrestchang/dsh-multica-runtime★ 37
Run the dsh runtime on Multica.
omdsh-dev/dsh-plugin-check★ 18
Plugin health checks: manifest protocol / patch format / build traps, zero-dependency and read-only.