Introduction¶
In DeepSeek Harness (DSH), when a session is archived, it disappears from the project sidebar, but the session logs and related caches remain on disk. The Harness itself has no dedicated interface to view these “archived” entries, nor can they be restored with one click or deleted along with their logs in the settings. If you run multiple projects on the same machine over a long period, archived sessions will accumulate, occupying space in $DSH_HOME, yet it is difficult to determine which session each record corresponds to, how much space it occupies, or whether it can still be recovered.
The dsh-archive-manager introduced below (repository linanbuan/dsh-archive-manager) is a community-maintained client-side plugin: it adds an “Archived Session Management” page in the DSH settings, listing all archived sessions on the local machine, and supports restoring them individually back to the workspace, or permanently deleting the session logs and projection caches. Maintainer: linanbuan; Package version in the materials: 1.0.0, License: MIT. The plugin does not connect to the internet, has no telemetry, and only reads local files and the Harness service on the Host side.
What is this¶
The plugin’s positioning can be summarized as: a DSH desktop settings panel plugin, filling the management entry point for “archived sessions”.
- Entry location: Settings → Archived Session Management (
settings.section,order: 100, positioned after built-in pages and other plugins; row id isarchive-manager). - Runtime dependencies: No additional npm runtime dependencies; the browser side only requires
require('react'). - Relationship with official: Not an official DeepSeek plugin; relies on internal Harness seams (such as
workspaceRegistry,sessionPersistence, etc.), and may become invalid after Harness upgrades.
Core Features¶
List and Statistics¶
The top of the page displays a summary: number of archived items, deletable items, running items, disk usage, and data timestamp.
Each archived session displays:
- Session title (from the title snapshot of
sessionQuery, may show “Untitled” upon timeout or failure); - Associated project;
- Occupied size;
- Creation time, last write time;
- Disk directory (displayed as
~/.dsh/...or$DSH_HOME/..., not sending local absolute paths to the browser).
If an archive record no longer has a corresponding log, it will still be listed and marked as “Archive Record Only”, allowing removal from the archive list without deleting files.
Restore to Workspace¶
When clicking Restore to Workspace, the Host calls ctx.workspaceRegistry.unarchiveSession(id): removes the id from the archive collection. The accounting slot for the session in the workspace is always retained, so it will return to the original project and position. This operation can be archived again; it is not data deletion.
Permanent Deletion¶
When clicking Permanently Delete, an inline secondary confirmation is required (not a pop-up). Upon success, the operation result bar will list the paths actually removed this time, rather than a vague “Deleted” prompt.
Deletion steps (exact meanings from the materials):
- Delete the session log directory
~/.dsh/sessions/<project key>/<session id>/; - Delete the projection cache
~/.dsh/storages/session_projcache/sessions/<session id>.json; - Call
unarchiveSession(id)to update accounting, and broadcastapi-session/removed; the corresponding row in the sidebar will collapse.
Irrevocable: Harness has no recovery entry. Running sessions cannot be permanently deleted (the interface will mark “Running” and disable deletion); you must close the session or restart the application first.
Why Deletion is Implemented by the Plugin Itself¶
DSH’s sessionPersistence does not provide file paths or deletion APIs; workspaceRegistry documentation states that removal does not delete disk data. Therefore, “Permanent Deletion” is a file system operation performed by the plugin on the Host side, after deriving paths using the same rules as the DSH JSONL backend (projectKey, encodeSegment in lib/layout.js), and comes with multiple pre-validations (e.g., the id must be in the archive collection, cannot be SESSION_LIVE, the path must be within $DSH_HOME/sessions and consistent with the header derivation, etc.). If any condition is not met, deletion is refused, and the disk is not modified.
Installation and Activation¶
First, install the DSH desktop client (deepseek.com/download). This plugin is a standard DSH bundle (package.json declares dsh.bundle.patch and dsh.client); choose one of the following methods.
Method 1: Install within DSH Desktop (Recommended)¶
- Sidebar Plugins → Add plugin;
- Enter the spec in the input box, e.g., the repository address
https://github.com/linanbuan/dsh-archive-manager, or the Source code (zip) link of that repository, the absolute path of an existing local directory, or a potential npm package name in the future; - Click Install, confirm package information to complete installation;
- Click Enable Now.
Installation is written to the current profile’s dsh.profile.bundles by the Harness plugin manager; no command line or manual profile editing is required.
Method 2: Install via Agent¶
Point the Agent in the session to the repository URL or local directory, and let the Agent call plugin_manager (action: install_bundle), which goes through the same path as Method 1.
Method 3: Command Line¶
When dsh CLI is installed:
dsh plugin --profile <profile name> add <spec>
<spec> is the same as in Method 1; for specific parameters, refer to dsh plugin --help.
After Installation¶
- The browser side registers the settings page, loaded with the startup image; usually no page refresh is needed during HMR updates.
- The Host side registers three
/api/archive/*routes. If installation prompts a restart, you should restart the DeepSeek Harness application (not just refresh the browser). - Verify operation: Find the package in the sidebar Plugins; the component status should be “Running”.
Temporary deactivation can be set by disabled: true for archive-manager in the profile’s cordis.patch.yml or the plugin page switch; complete removal uses Uninstall on the plugin page.
The plugin manager currently does not support auto-update; upgrading requires uninstalling and installing the new version first. After replacing an installed package, the Host side requires restarting the application to load the new code.
Typical Usage¶
- Open DSH Settings, enter Archived Session Management.
- Browse the list: determine whether retention is needed based on title, project, size, and time.
- Need it to reappear in the project: click Restore to Workspace on the row; the sidebar project session list will restore that entry.
- Confirm no longer needed and session not running: click Permanently Delete, confirm inline; check the path list in the result bar to verify it matches expectations.
- If an entry is only “Archive Record Only” and has no logs on disk: it can still be removed from the archive accounting without deleting files.
Developers can use the self-check script within the repository to verify Host/Client logic (no network or real Harness required):
node test/selfcheck.mjs
Or pnpm test; when all pass, it outputs 19/19 checks passed.
Use Cases and Notes¶
Who it is for
- Developers who use DSH on a single machine long-term and frequently archive old sessions;
- Users who need to view archive usage in
$DSH_HOMEand clean up useless session logs and projection caches; - People who want to restore accidentally archived sessions from the UI rather than manually editing
workspace.jsonor directories.
Please be aware before use
- The plugin runs with the file system permissions of the current DSH process; if
$DSH_HOMEis in a directory requiring privilege escalation or locked by security software, deletion may reportEACCES/EPERM. - Permanent deletion has no trash bin; please confirm session content is no longer needed before deleting.
- Only affects this local
$DSH_HOME; does not sync to other devices or the cloud. - The recorded development verification environment in the materials is DSH
0.1.7-rc.2desktop version (Windows); the dependent APIs are internal implementations, not stable contracts. - Before installing third-party plugins, it is recommended to review the GitHub source code and MIT license to ensure compliance with your security and compliance requirements.
The community plugin directory skillhub.cn has no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem emphasizes “everything is a plugin”, and this plugin is a client-side extension addressing the archived session gap.
Conclusion¶
dsh-archive-manager centralizes local archived sessions into a page in settings: you can view titles, projects, sizes, and times, restore to the workspace, and permanently delete logs and caches after strict validation. If you are troubled by “cannot find after archiving, cannot delete cleanly”, you can install it into the current profile using the installation methods above, and start handling it from Settings → Archived Session Management.
- Directory page: https://www.skillhub.cn/plugins/linanbuan/dsh-archive-manager
- Source code and documentation: https://github.com/linanbuan/dsh-archive-manager