Skills Plugins MCP Prompt Model 导航 博客 资讯 我的中心
会话与消息 #deepseek-harness#dsh#dsh-plugin#session-manager

dsh-session-cleaner

从运行中的 Web 运行时删除会话:实时存储、工作区记录与磁盘文件一并清除,无需重启。

fountunt @fountunt ⬇ 1 ★ 1 main

安装

dsh plugin --profile web add github:fountunt/dsh-session-cleaner
下载安装清单

需要可复现安装时,可在仓库后追加 #commit 固定提交。

从运行中的 Web 运行时删除会话:实时存储、工作区记录与磁盘文件一并清除,无需重启。

该插件未提供要点说明,请参考仓库 README。

deepseek-harnessdshdsh-pluginsession-manager
  1. 安装并启动 DeepSeek Harness:npx @deepseek-ai/dsh web
  2. 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
  3. 用 dsh plugins list 确认已安装,必要时重启 Harness 生效

插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。

代码仓库github.com/fountunt/dsh-session-cleaner
许可证MIT
主要语言main
下载量1
GitHub 星标1
最近推送2026-08-14
收录日期2026-09-19
分类会话与消息

事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。

以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。

# dsh-session-cleaner

[English](README.md) | [中文](README.zh.md)

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

```sh
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:

```http
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:

```js
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):

```json
{ "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

```sh
pnpm install        # peer: @deepseek-ai/cordis
node --test test/   # unit tests
```

## License

MIT

数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。