dsh-minimal-session-delete: Permanent Session Deletion Plugin for DeepSeek Harness

Introduction

DeepSeek Harness (DSH) provides archiving by default but does not offer a deletion API. As a result, session logs and caches can accumulate in the persistence layer. dsh-minimal-session-delete is a plugin maintained by reverse-PAI that completes this workflow: it provides deletion entry points through the sidebar menu, hover buttons, and keyboard shortcuts. After a secondary confirmation, it uses Host authentication routes to clean up logs, caches, and archive markers.

Core Capabilities

  1. Deletion Entry Points
    • The ... menu item on a session row in the sidebar provides a Delete Session option.
    • Hovering over a session row displays a trash can icon.
    • Keyboard shortcuts: Ctrl/⌘ + Shift + D on desktop and Ctrl/⌘ + Alt D in the browser.
  2. Execution Flow
    • Triggers a secondary confirmation dialog that displays the title, session ID, and an unrecoverable warning.
    • Deletes session logs, projection cache rows, and archive markers through Host routes.
  3. Safety Mechanisms
    • Supports dryRun mode, allowing preview before execution.
    • Path traversal protection using regex whitelist validation.
    • Running sessions return a 409 status code, and deletion is rejected.
  4. Lightweight Features
    • Zero dependencies, zero build, and zero configuration.

Installation

Use the DSH command-line tool to install the plugin:

dsh plugin add dsh-minimal-session-delete

After installation, the plugin is automatically added to dsh.profile.bundles and enabled by default, requiring no additional configuration.

Usage

  1. UI Operations: Hover over a session row and click the trash can icon, or click the ... menu and select Delete Session.
  2. Keyboard Shortcuts: After opening a session in the main view, use Ctrl/⌘ + Shift + D on desktop or Ctrl/⌘ + Alt D in the browser.
  3. Script Invocation:
    curl -X POST 'http://<你的 DSH Web 地址>/api/dsh-session-delete' \
      -H 'content-type: application/json' --cookie '<DSH 会话 Cookie>' \
      -d '{"sessionId":"session-6f1c2f0e-3b7a-4a6e-9a1d-2c5b8f7d9e01","dryRun":true}'
A response of `ok: true` indicates success. The `code` field contains error information such as `running` and `invalid-id`.

Notes

  • Archive ≠ Delete: Archiving only hides the session; logs remain retained in the persistence layer.
  • Unrecoverable: Deletion is irreversible.
  • Rejected While Running: Sessions that are running cannot be deleted.
  • Client Update: After installing or updating the plugin, refresh the page or restart the application.

References

  • GitHub: https://github.com/reverse-PAI/dsh-minimal-session-delete
  • Directory: https://www.skillhub.cn/plugins/reverse-PAI/dsh-minimal-session-delete
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye