Introduction¶
DeepSeek Harness (DSH) allows archiving sessions. After archiving, they disappear from the main list, but the session log directories and projection caches remain on disk, and there is no public “Delete Session” entry in the UI. Manually deleting directories in the file system often leads to missing workspace ownership, projection caches, or in-memory session references, potentially leaving “ghost” rows in the sidebar that cause errors when clicked.
The following introduces the community plugin luckamuu/dsh-sessions-plugin (package name @local/archived-sessions): it adds an “Archived Sessions” page to the sidebar, listing sessions currently in the archive set, and provides a thorough deletion process with two-step confirmation. The maintainer is luckamuu, and it is categorized as a client plugin. The current release is v1.0.0, licensed under MIT, with zero runtime dependencies. The README states it is verified on @deepseek-ai/dsh-desktop 0.2.0-rc.1, with a compatibility baseline badge for DSH 0.2.0-rc.2.
What is this¶
This is a DeepSeek Harness plugin composed of a host side (index.js) and a browser side (client.js): the host registers the archivedSessions service and handles disk deletion after confirmation; the client registers the entry in the sidebar and renders the management page. The two sides communicate via DSH’s Typert Remote. The frontend only calls archivedSessions/list and archivedSessions/deleteSession and does not perform file operations directly.
Core Features¶
| Feature | Description |
|---|---|
| Archived Session List | Sorted by recent activity time in descending order; displays title, time, working directory, occupied space, and file count. |
| Permanent Deletion | Only one action per row; first click “Permanently Delete,” then “Confirm Deletion”. This is irreversible. |
| Space Statistics | Recursively calculates the size of the session directory, allowing visibility into the space to be freed before deletion. |
| Missing File Marker | Sessions still in the archive set but with directories missing from disk are marked as “Files Missing”. |
| Host Version Self-Check | If the panel detects a mismatch between the host endpoint and the interface, it explains the reason and disables deletion instead of silently returning a 404. |
| Bilingual Support | Switches with the DSH language setting; text uses ctx.locale. |
Deletion is executed only when the session is definitely in the archive set (workspaceRegistry.archivedSessionIds); sessions currently running a turn (agent.status === 'running') will be rejected and must be stopped first. Sub-agent sessions are not in the archive set and will not appear in the list.
Installation and Activation¶
Prerequisites¶
- DSH Desktop is installed.
- The installation target can be an absolute path to a local directory (recorded as
link:by the package manager) or a Git repository shorthandgithub:<owner>/<repo>(no need to clone the repository beforehand). - You must completely exit and reopen DSH after installing or uninstalling (ensure no
DeepSeek Harnessprocess remains in the system tray or Task Manager). The hostimport()of plugins and the UI plugin manifest are generated at startup and do not take effect dynamically.
Steps¶
- Open DSH and navigate to the Plugins page in the left sidebar.
- Click Install and enter one of the following in the input box, for example:
C:\Users\you\Desktop\dsh-sessions-plugin (Windows, absolute path to local directory)
/home/you/tools/dsh-sessions-plugin (macOS / Linux)
github:luckamuu/dsh-sessions-plugin (Git repository address)
- Confirm installation. The plugin has no dependencies and no installation scripts, so it will not trigger a build confirmation.
- Completely exit and reopen DSH.
- After restarting, an Archived Sessions entry will appear in the sidebar near “Plugins/Plans”.
If you need to pin a specific Release version, you can obtain the source code directory for the corresponding tag yourself before installation and fill in the absolute path of that directory in the plugin page; Releases have no additional build artifacts, so the source package is the complete content. Manually editing ~/.dsh/profiles/<profile>/package.json is also feasible, but the README recommends using the plugin page first, and a DSH restart is required after making changes either way.
Typical Usage¶
The top of the panel displays the actual DSH home directory read (DSH_HOME, otherwise ~/.dsh) to facilitate troubleshooting issues such as “archived but list is empty”.
- Open Archived Sessions and click Refresh if necessary.
- Click Permanently Delete on a row.
- Click Confirm Deletion on the confirmation bar (or Cancel to abort).
- Upon success, the top displays “Deleted \<session id>“, and the list refreshes automatically.
Deletion follows a defined order to remove archive flags, workspace ownership, in-memory sessions, and projection caches, and recursively deletes the corresponding directories under sessions and session_projcache related files, finally notifying the UI via api-session/removed. Shared content such as attachments will not be deleted.
Use Cases and Notes¶
Who it is for: Developers who use DSH to archive old sessions for a long time, have their disks filled with logs, and want to clean up registries and caches in the correct order to avoid ghost session rows.
Permissions and Security: The plugin runs with the current DSH process privileges. Deletion uses node:fs and resolved absolute paths, without going through the shell. Before installation, you should read the source code and MIT license of the GitHub repository to ensure it complies with your environment policies. Deletion is irrecoverable, so rely on the two-step confirmation in the UI.
Ecosystem Note: DSH emphasizes “Everything is a plugin”; the SkillHub directory page is a community collection site and has no official affiliation with DeepSeek or High-Flyer.
Conclusion¶
luckamuu/dsh-sessions-plugin fills the gap in DSH for “permanent removal from disk” after archiving: listing, statistics, version self-checks, and strict archive boundaries turn the originally manual, multi-step cleanup alignment into a confirmable operation within the sidebar.
- Directory Page: https://www.skillhub.cn/plugins/luckamuu/dsh-sessions-plugin
- GitHub: https://github.com/luckamuu/dsh-sessions-plugin