dshbase

插件目录 / Developer / dsh-session-cleanup

dsh-session-cleanup

已验证 · 实测可装 ShiraGawaAnri

✓ 持续维护 2 位贡献者

查看 GitHub ↗ ← 返回插件目录

0Stars
0Forks
0未关闭 issue
—语言
2026-08-16最近推送
跨平台平台

功能简介

DSH 会话/归档清理插件:在 **设置** 面板里新增两个页面,用来查看并清理 DSH 的残留会话与归档会话。

✅
我们的评价
可用 — 实测通过,早期项目

DSH 会话/归档清理插件:在 **设置** 面板里新增两个页面,用来查看并清理 DSH 的残留会话与归档会话。 实测能干净安装、正常启动。早期项目,但功能可用。

「已验证」表示我们的自动化 CI 在干净 profile 里实际执行了 dsh plugin add 并启动成功——仅此而已。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

README

中文 | English

dsh-session-cleanup

A DSH profile bundle that adds two Settings pages for inspecting and cleaning
up residual (persisted but not open) sessions and archived sessions.

Features

Settings → Sessions清理

  • 刷新Sessions button
  • 当前Sessions: live in-memory sessions (display only, no action buttons) with session ID / date / summary (title + first user message excerpt)
  • 残留Sessions: persisted but not currently open sessions, each with a delete button

Settings → 归档清理

  • 刷新归档 button
  • 所有归档: all archived sessions with ID / summary / date
  • Per-row delete button plus delete-all
  • Live sessions show a "运行中" badge and cannot be deleted

Every deletion requires double confirmation (arm → confirm, with cancel).

What deletion does

  1. Refuses live (running) sessions
  2. Removes the persisted session log file/directory (paths come from
    sessionPersistence.locate(); the client only ever submits session ids)
  3. Detaches the session from its workspace account (durable write)
  4. Removes the id from the global archive set if present (durable write +
    registry cache sync so later archive operations cannot resurrect it)

Deletion is not recoverable.

Installation

Prerequisites: a working DSH installation (dsh web) and pnpm on PATH
(dsh plugin forwards to pnpm).

# 1. Unzip, e.g. to D:\plugins\dsh-session-cleanup

# 2. Install into the web profile
dsh plugin --profile web add file:D:/plugins/dsh-session-cleanup

# or from the parent directory of the unzipped folder:
dsh plugin --profile web add ./dsh-session-cleanup

dsh plugin add runs pnpm in the profile directory and appends
@dsh-external/dsh-session-cleanup to the profile's dsh.profile.bundles
layer — no manual cordis.yml edit.

# 3. Restart dsh web
# 4. Open Settings → Sessions清理 / 归档清理

Uninstall

dsh plugin --profile web remove @dsh-external/dsh-session-cleanup
# then restart dsh web

Notes

  • Host-side deletion uses Node fs.rm, restricted to paths returned by
    sessionPersistence.locate().
  • The API route (POST /_dsh/session-cleanup/api) rejects cross-site requests.
  • Deletion is an administrative action triggered explicitly from the Settings
    page; it does not interact with DSH sandbox policies or model tool calls.
  • Requires host services sessions, sessionPersistence, workspaceRegistry,
    storageDomain (and optional webServer), plus the client slots service.
  • Zero third-party npm dependencies.

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 dsh-session-cleanup」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包。

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:ShiraGawaAnri/dsh-session-cleanup

Headless(CLI)profile:

dsh plugin --profile headless add github:ShiraGawaAnri/dsh-session-cleanup

实测报告

验证通过:从 GitHub 源码完成 L1 安装 + L2 加载 + L3 运行(dsh 0.1.0-rc.6)。

安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7819 个插件 →