Introduction

In the daily use of DSH, sessions are frequently archived and no longer displayed directly in the sidebar, but the records are retained. After deleting a session, one also hopes for a place to view, restore, or permanently clear them. imrascal/dsh-archive is a DSH plugin designed for this scenario: it places archived sessions and trash management into the settings panel, allowing restore, delete, and empty operations to be completed in a single entry.

What is this

imrascal/dsh-archive is a DeepSeek Harness (DSH) plugin maintained by imrascal with an MIT license.

Its one-sentence positioning is: restoring/deleting archived sessions from the settings panel and managing the trash. The target version is DSH 0.1.0-rc.5 and later, supporting native Web UI and desktop GUI.

Core Features

Below are the verified main capabilities:

  • Manage archived sessions and trash, with the entry point located in the settings panel.
  • View archived sessions where the sidebar is hidden but records are retained.
  • Single or bulk restore of archived sessions.
  • Move archived sessions to the trash.
  • View deleted session records in the trash.
  • Restore trash sessions, permanently clear individual sessions, or empty the entire trash.
  • Deletion of sessions defaults to reversible, moving to ~/.dsh/trash; only purge / empty trash results in permanent deletion.
  • Running real-time sessions are rejected from deletion.
  • Provides native and fallback dual-path design.
  • Performs capability detection at startup and automatically no-ops when the capability is available.
  • deleteSession fail-closed when the persistence layer is not trash-aware.
  • The fallback path refreshes both workspaces and sessions stores simultaneously after deletion to avoid sessions remaining in the stale sessions list or Ungrouped bucket.

Installation and Enabling

First, ensure pnpm is in your PATH. This is because dsh plugin forwards to pnpm.

For remote installation, use:

dsh plugin --profile web add github:imrascal/dsh-archive

If you already have a local checkout, you can install using a local path:

dsh plugin --profile web add file:C:/path/to/dsh-archive

After the steps above, you need to restart the application and refresh the page. The entry point will appear at:

Settings → Archived Sessions

Regarding environment requirements, verified materials state:

  • Target DSH: 0.1.0-rc.5 and later.
  • Platform support: Windows / macOS / Linux.
  • package.json engines requires node >=22.0.0.
  • package.json devDependencies uses @deepseek-ai/cordis ^4.0.1.

Typical Usage

Below are steps and examples that can be executed directly.

  1. After installing the plugin, restart the app and refresh the page. Find the Archived Sessions entry in the settings panel.
  2. View archived sessions. Here you can see sessions where the sidebar is hidden but records are still retained.
  3. Restore archived sessions. Supports individual restore and bulk restore.
  4. Move archived sessions to the trash. After deleting a session, it will move to:
~/.dsh/trash/<sessionId>-<timestamp>/

This type of deletion is reversible by default and can be restored later.

  1. View trash records. You can check the status of deleted sessions in the trash.
  2. Restore trash sessions. If deleted by mistake, you can restore them as needed.
  3. Permanently clear individual sessions or empty the entire trash. purge / empty trash are irreversible and protected by confirmation dialogs.
  4. If your current DSH installation already has an in-box patch, you can restore dsh-client-ui-workspace/lib/client.js to the official release first, then install and restart this plugin.

Design and Security Boundaries

This plugin uses a native and fallback dual-path design.

  • Performs capability detection at startup.
  • If the current environment already possesses the same functionality, the plugin will automatically no-op.
  • deleteSession fail-closed when the persistence layer is not trash-aware.
  • The dual-store resync of fallback after deletion refreshes both workspaces and sessions stores to avoid sessions remaining in the stale sessions list or Ungrouped bucket.
  • In Cordis 4 strict inject scenarios, the plugin resolves services via ctx.get(...) and patched methods receiver to avoid errors reading undeclared inject properties.

Regarding data security, verified materials explicitly state:

  • Deleting a session moves it to ~/.dsh/trash/<sessionId>-<timestamp>/, allowing for later recovery.
  • Permanently clearing or emptying the trash is irreversible.
  • Deleting a session does not delete attachments; attachments are content-addressed and shared.
  • Running real-time sessions are rejected from deletion.

Development Verification

For local development verification, you can first install dependencies:

npm install

Then run the following scripts:

node scripts/host-logic-test.mjs
node scripts/host-robustness-test.mjs
node scripts/cordis4-strict-test.mjs
node scripts/eval-check.mjs

Use Cases and Notes

Suitable for users who want to handle archived sessions and trash uniformly in the DSH settings panel, especially scenarios where “deletion is default reversible and permanent deletion is protected by confirmation.”

Pre-use attention:

  • The plugin runs with the permissions of the current dsh process.
  • You should check the source code and license before installing.
  • purge / empty trash are irreversible.
  • Running real-time sessions cannot be deleted.
  • Deleting a session does not delete attachments.

Links

  • GitHub: https://github.com/imrascal/dsh-archive
  • Directory Page: Verified materials did not provide a URL.