fountunt/dsh-session-cleaner
Delete DeepSeek Harness sessions from a running web runtime — files, live store, and workspace records — without restarting dsh web.
catalog 简介 / catalog descriptioncatalog description:为 DeepSeek Harness 提供会话删除能力,支持侧边栏 ⋮ 菜单入口
项目介绍Project Overview
DSH 插件 dsh-session-cleaner 用于在运行中的 DSH Web 运行时内直接删除 DeepSeek Harness 会话。它补全官方 web API 缺失的 session.delete 能力,可即时清理文件、实时存储与工作区记录,并刷新侧边栏。点击侧边栏会话行 ⋮ 菜单中的 🗑 Delete session 即可使用。注意:删除不可逆,当前运行中的会话无法被删除,关闭代理后空闲会话才会被处理。
dsh-session-cleaner is a DSH plugin that deletes DeepSeek Harness sessions from a running DSH web runtime, removing files, live store entries, and workspace records without a restart. It exposes a 🗑 "Delete session" item in the sidebar row's ⋮ menu and registers POST /api-ext/session.delete. Use it when hiding via workspace.archiveSession is not enough and a session must be removed immediately. Caveat: deletion is irreversible, and the active conversation cannot be deleted; running or idle agents must stop first.
请帮我了解并安装插件:【dsh-session-cleaner】【https://github.com/fountunt/dsh-session-cleaner】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add dsh-session-cleaner
把 fountunt/dsh-session-cleaner 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-session-cleaner
Delete DeepSeek Harness sessions from a running web runtime — files, live
store, and workspace records — without restarting dsh web.
The official web API only offers workspace.archiveSession (hide); there is no
session.delete. This bundle closes that gap.
Install
dsh plugin --profile web add dsh-session-cleaner # from npm
dsh plugin --profile web add github:fountunt/dsh-session-cleaner # from git
# or from a local checkout
dsh plugin --profile web add file:/path/to/dsh-session-cleaner
Then restart dsh web (a running instance does not hot-load new bundles).
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.
Safety
- Sessions with an attached agent (running or idle) are refused — the current conversation can never be deleted through this endpoint.
- Deletion is irreversible: artifacts, workspace membership, and the live entry are all removed. The session-projection cache may keep a harmless stale row until the next restart.
How it works
session.list is served from the live SessionStore plus a disk scan. Cold
sessions get prepared into the live store while being listed, so after their
files are deleted they linger as "ghosts" until the server restarts. This
plugin removes the live entry (the store's own detach path), detaches the
session from workspace records, and deletes the on-disk artifact directory —
so the row disappears immediately and permanently.
Development
pnpm install # peer: @deepseek-ai/cordis
node --test test/ # unit tests
License
MIT
nexu-io/open-design
ruvnet/ruflo
amruthpillai/reactive-resume
volcengine/OpenViking
Molunerfinn/PicGo
titanwings/colleague-skill
nocobase/nocobase
Tencent/WeKnora