dsh-session-cleaner: Removing Sessions for the Running DeepSeek Harness Web Runtime

Preface

The extension method of DSH is plugin-oriented, and the community plugin directory is an independent site with no official affiliation to DeepSeek / High-Flyer, nor should it be understood as an official app store. For a running DeepSeek Harness web runtime, a common pain point is: a session has become unavailable from the interface, but the live store, workspace records, and disk artifacts remain in the running instance. dsh-session-cleaner addresses this issue by providing a Web UI entry point and an API route to delete running sessions, where the deletion itself does not require restarting dsh web.

What This Is

dsh-session-cleaner is a DeepSeek Harness plugin for the dsh web runtime environment, maintained by fountunt, licensed under MIT.

Its one-line positioning is: delete sessions for a running DeepSeek Harness web runtime, removing live store, workspace records, and disk artifacts without restarting dsh web.

Verified basic information is as follows:

  • Plugin name: dsh-session-cleaner
  • Maintainer: fountunt
  • License: MIT
  • package.json version: 1.0.2
  • peerDependencies requirement: @deepseek-ai/cordis ^4.0.1
  • GitHub repository: https://github.com/fountunt/dsh-session-cleaner

Core Features

The following verified capabilities are described below.

  1. Delete DeepSeek Harness sessions, covering three types of data:
  • files
  • live store
  • workspace records
  1. Delete sessions within a running dsh web runtime, where the deletion itself does not require restarting dsh web.

  2. Add a Delete session entry at the bottom of the menu in the sidebar session row.

  3. Register a Web API route:

POST /api-ext/session.delete

This route supports a JSON request body with the field sessionId.

  1. Perform three types of cleanup during deletion:
  • Remove live store entries
  • Remove workspace records
  • Delete disk artifact directories

Installation and Enablement

The installation command is as follows:

dsh plugin --profile web add github:fountunt/dsh-session-cleaner

After installation, dsh web needs to be restarted. Running instances will not hot-load new bundles, so two things are distinguished here:

  • After installing or updating a plugin, dsh web needs to be restarted to load the plugin.
  • Once the plugin is enabled, deleting running sessions itself does not require restarting dsh web.

If @deepseek-ai/cordis is already installed in the environment, please confirm the version satisfies:

@deepseek-ai/cordis ^4.0.1

Typical Usage

Web UI

After enabling the plugin, the Delete session entry can be seen at the bottom of the menu in the sidebar session row.

Usage steps:

  1. Locate the target session row in the sidebar.

  2. Open the menu on the right side or at the bottom of that row.

  3. Click Delete session.

  4. Confirm the deletion.

  5. The sidebar will refresh.

Verified interface behaviors are as follows:

  • When a session is running, this entry is disabled and displayed in gray.
  • Idle agents already open in the UI are stopped first, then the deletion is performed.
  • Ambiguous rows such as duplicate titles skip this entry.
  • The current conversation cannot be deleted through this endpoint.

API

The interface registered by the plugin is:

POST /api-ext/session.delete
Content-Type: application/json

Example request body:

{ "sessionId": "..." }

On a same-origin harness page, it can also be called from the browser console:

await fetch('/api-ext/session.delete', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({ sessionId: '...' })
});

Applicable Scenarios and Notes

Suitable usage scenarios:

  • Need to clean up DeepSeek Harness sessions in a running dsh web.
  • Need to remove live store entries, workspace records, and disk artifact directories simultaneously.
  • Want to perform batch or repeated session deletion operations via the Web UI or same-origin API.

Important notes before use:

  1. This plugin runs under the permissions of the current dsh process and may modify the live store, workspace records, and disk artifacts. Review the source code before installation and confirm acceptance of the MIT license.

  2. Deletion is irreversible. artifacts, workspace membership, and live entry will all be removed.

  3. Sessions with attached agents will be rejected. Attached agents in either running or idle status will cause this endpoint to reject the deletion; the current conversation cannot be deleted through this endpoint.

  4. The sidebar entry is disabled for running sessions; idle agents are stopped first before deletion.

  5. The session-projection cache may retain harmless stale rows until the next restart.

Conclusion

The value of dsh-session-cleaner is quite specific: it breaks down session deletion in a running DeepSeek Harness web runtime into three types of cleanup—live store, workspace records, and disk artifacts—and provides both Web UI and API entry points. For developers who need to maintain the session lifecycle of dsh web, this is a client-side plugin that can be directly incorporated into cleanup workflows.

Repository address:

  • https://github.com/fountunt/dsh-session-cleaner
羽毛球分组比赛记分
小程序二维码

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

Xiaoye