DeepSeek Harness Plugin

XXXXXQ-0206/dsh-session-delete

Stars ★ 1 Category Sessions & Messages Added 2026-09-18

Fork of harness-session-delete that adds Delete to the native session action menu and a recycle-bin page with search, sort, workspace grouping, message preview, batch restore, and per-workspace permanent purge; active sessions are protected.

Install

# from a prebuilt release tarball

dsh plugin --profile web add "https://github.com/XXXXXQ-0206/dsh-session-delete/releases/latest/download/dsh-session-delete.tgz"

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:XXXXXQ-0206/dsh-session-delete

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

Session recycle bin and permanent delete for DeepSeek Harness.

dsh-session-delete adds a safe, recoverable deletion workflow to DeepSeek Harness. Move a session into the recycle bin from its sidebar action menu, manage archived sessions in Settings, restore them with one click, or permanently remove them in batches. Active agents and live sessions are protected by default.

Highlights

  • Sidebar action
    The Delete item joins the native session action menu next to Rename, Fork, and Archive.

  • Header action
    The active session can be moved into the recycle bin from the conversation header.

  • Recycle bin manager
    Settings → 会话回收站 provides search, workspace grouping, multi-select, batch restore, and batch permanent delete.

  • Permanent delete
    Removes both the durable session log and projection-cache records, including ghost sessions without a log.

  • Active-session protection
    Refuses to delete sessions that are running or otherwise in use.

  • Recovery path
    Every archive action is recoverable and shows a bottom-right undo toast.

  • Native-looking dark/light UI
    Uses DSH design tokens and adapts to body[data-ds-dark-theme] with an OS-level fallback.

Why this workflow?

Deleting a Harness session is not merely removing a row. The session has durable event logs, projection cache, workspace membership, and potential in-progress work. dsh-session-delete treats deletion as a two-stage operation:

active session -> archive (recoverable) -> restore / permanent delete

This keeps the fast path simple while making irreversible deletion deliberate.

Install

Version 0.6.4 targets DeepSeek Harness 0.2.x (0.2.0-rc.1 or newer).

Install the latest release tarball:

dsh plugin --profile web add https://github.com/XXXXXQ-0206/dsh-session-delete/releases/download/v0.6.4/dsh-session-delete.tgz

Or use a pinned Git tag:

dsh plugin --profile web add github:XXXXXQ-0206/dsh-session-delete#v0.6.4

Restart dsh web after installation.

Update or remove:

dsh plugin --profile web update dsh-session-delete
dsh plugin --profile web remove dsh-session-delete

Usage

Delete a session

  1. Hover a session row in the sidebar.
  2. Open the session action menu.
  3. Select 删除.
  4. The session moves into the recycle bin and an undo toast appears.

Restore or permanently delete

  1. Open Settings → 会话回收站.
  2. Select one or more archived sessions.
  3. Choose 还原 or 彻底删除.
  4. Live sessions are protected automatically.

Architecture

The bundle has a host half and a browser half:

index.js                    Host entry: lifecycle, workspace/archive integration
client.js                   Browser half: sidebar action, recycle-bin UI, toasts
client.css                  DSH-native design tokens and components
cordis.patch.yml            Web Profile bundle patch
packages/session-trash-host Host implementation and HTTP routes

The browser talks to the host through the plugin-owned /api/session-trash/* routes. Non-GET requests carry the x-dsh-plugin header for CSRF protection. Host operations are idempotent, work per-session, and collect failures for batch operations.

Development

pnpm test

The test suite covers host logic, archive/purge behavior, and HTTP route contracts.

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.