fountunt/dsh-session-cleaner ↗★ 0
dsh-session-cleaner
从运行中的 Web 运行时删除 DeepSeek Harness 会话,包括实时存储分离、工作区记录和磁盘工件。
AI 分析
核心用途是清理 DSH 会话及磁盘残留。适合需要管理和彻底删除历史会话、释放存储空间的用户。在 Web 界面侧边栏菜单中提供“删除会话”选项。
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:fountunt/dsh-session-cleaner说明文档
阅读完整 README ↗Usage
Web UI (v1.0.0)
The client half adds a 🗑 "Delete session" item at the bottom of the sidebar session row ⋮ menu — the item is skipped when the row title is ambiguous (duplicate titles).
Click, confirm, and the session is deleted and the sidebar refreshes. The item is disabled (greyed) while the session is running; sessions opened in the UI (idle agents) are stopped first, then deleted. The current running conversation can never be deleted.
API
The plugin registers one route on the web server:
POST /api-ext/session.delete
Content-Type: application/json
{ "sessionId": "session-1bb8d361-ea6b-4b92-bab2-c858c92e8822" }
Same-origin calls work from the browser console of the harness page:
await fetch("/api-ext/session.delete", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ sessionId: "session-1bb8d361-ea6b-4b92-bab2-c858c92e8822" }),
}).then(r => r.json());
Response envelope (mirrors the host's RPC style):
{ "ok": true, "value": { "detached": true, "workspaces": 1, "files": 1 } }
{ "ok": false, "error": { "code": "refused", "message": "..." } }
detached— the session was removed from the in-memory live store (this is what makes it disappear from the sidebar immediately, without a restart).workspaces— how many workspace records the session was detached from.files— how many on-disk artifact directories were removed.