Preface

Session data for DeepSeek Harness (DSH) is stored in the local disk directory ~/.dsh/sessions/. The official Web interface only displays sessions from the current workspace and lacks batch management capabilities, resulting in low management efficiency when the number of sessions grows. The dsh-session-admin plugin provides a global view in the Web settings panel, allowing users to view all existing and archived sessions, and offers archive, delete, and batch operation features.

Plugin Positioning

dsh-session-admin is a DeepSeek Harness plugin maintained by user robin758. It mounts a management entry point in the Web settings panel to enable unified governance of DSH sessions, addressing the issues of session accumulation and difficulty in cleanup.

Core Features

  • View all sessions: Lists all existing and archived sessions on disk, including title, workspace, and timestamp.
  • Archive and restore: Supports one-click archiving of infrequently used sessions, or restoring them from the archive at any time.
  • Permanent deletion: Deletes the session directory. This operation is irreversible, but includes a confirmation prompt to prevent accidental deletion.
  • Search and filter: Quickly filters the session list by keyword.
  • Batch operations: Supports selecting multiple sessions and batch executing archive, unarchive, or delete.

Installation and Enablement

Install the plugin using the official command:

dsh plugin --profile web add github:robin758/dsh-session-admin

After installation, you must restart the Web service to load the plugin:

launchctl kickstart -k gui/$(id -u)/com.deepseek.dsh

Typical Usage

  1. Start the DSH Web service.
  2. Go to the Settings → Session Management panel.
  3. Enter a keyword in the top input box to search for sessions, or select sessions directly to operate on them.
  4. Click an action button to execute archive, unarchive, or permanent deletion on the selected sessions.

HTTP API

The plugin provides RESTful endpoints for scripting automation or integration with third-party tools.

Method Path Description
GET /plugins/dsh-session-admin/list Lists all sessions on disk (existing + archived)
POST /plugins/dsh-session-admin/archive Archives a session
POST /plugins/dsh-session-admin/unarchive Unarchives a session
POST /plugins/dsh-session-admin/delete Permanently deletes a session
POST /plugins/dsh-session-admin/batch Batch archives / unarchives / deletes sessions

Note: Mutating endpoints (POST requests) only accept same-origin requests (Origin and Host must match), otherwise a 403 error is returned.

Configuration and Development

The plugin can be overridden through the config field in bundle patch (and can be further overridden at the profile level). The plugin is a pure ESM module with no build step and can be run directly.

Notes

  • Permanent deletion: The delete operation permanently deletes data and cannot be restored. Please confirm before proceeding.
  • Service restart: After installing or updating the plugin, you must run launchctl kickstart to restart the Web service.
  • Same-origin restriction: Mutating APIs restrict cross-origin requests. Ensure the calling environment is same-origin with the DSH Web service.