Foreword

The DeepSeek Harness (DSH) Web GUI adopts a plugin-based architecture. DSH natively provides session archive functionality (archiveSession), but lacks post-archive management capabilities for archived sessions, such as renaming, restoring, and deleting. The @crack/dsh-archive plugin is designed to fill this gap and provide full archived-session management capabilities for the DSH Web GUI.

Core Features

The plugin adds an archive entry in the sidebar and implements the following capabilities in the archive view:

  • Entry and View: A circular archive button (28px) is added to the right of the “Add Workspace” button. After clicking, the original workspace list area is covered by the archive view. The archive view is grouped by workspace, supports collapsing, and lists items in descending chronological order.
  • Session Operations: Hovering over each session row displays a three-dot menu, supporting:
    • Rename: Uses a native dialog and supports Chinese input method protection.
    • Restore: Restores an archived session to its original workspace position.
    • Delete: Executed through a native confirmation dialog, removes the corresponding log file and is irreversible.
  • API Endpoints: Provides REST endpoints for external calls:
    • GET /plugins/@crack/dsh-archive/api/archived: Get the archived session list.
    • POST /plugins/@crack/dsh-archive/api/rename-session: Rename a session.
    • POST /plugins/@crack/dsh-archive/api/unarchive: Restore an archived session.
    • POST /plugins/@crack/dsh-archive/api/delete-session: Delete an archived session.

Installation and Enabling

Installing this plugin requires linking a local package and registering the configuration.

  1. Link the local package to the dsh web profile (one-time operation):
    dsh plugin --profile web add "link:E:\path\to\dsh-archive"
  1. Register the plugin in the profile patch:
    • Edit C:\Users\<you>\.dsh\profiles\web\cordis.patch.yml.
    • Append the configuration:
        - insert:
            - id: archive
              name: '@crack/dsh-archive'
  1. Restart the dsh web service.

Development and Build

The project uses Node.js and pnpm for building. After the build is complete, the browser supports automatic hot replacement.

pnpm install          # 安装构建依赖
pnpm run build        # 构建宿主端与浏览器端代码
pnpm run typecheck    # 类型检查

During development, the following files can be edited:
* src/client/skin.css: Archive view styles.
* src/client/index.ts: Browser-side logic.
* src/index.ts: Host-side API route registration.

Uninstall

Uninstalling requires cleaning up the plugin registration and configuration files.

  1. Remove the plugin from the profile:
    dsh plugin --profile web remove @crack/dsh-archive
  1. Delete the archive registration line in cordis.patch.yml.

  2. Restart dsh web.

Notes

  • Data Security: Deleting an archived session removes the log file and is irreversible. Please confirm before performing the operation.
  • Permission Check: The plugin runs with the permissions of the current DSH process. It is recommended to check the source code and license before installation.