Preface¶
DeepSeek Harness (DSH) allows archiving sessions. The “Show archived only” filter in the sidebar can select historical sessions, but archiving is not equivalent to erasing them from disk and workspace records. Session logs still reside in $DSH_HOME/sessions/<project-key>/<session-id>/, and workspace membership along with archive markers remain in persistent state. During long-term development or parallel projects, tried sessions and conversations on abandoned branches tend to accumulate, taking up space and cluttering the list.
The community plugin dsh-archive-purge (maintainer Angela-lwh, category admin-security) targets exactly this point: it provides a “Delete Session” entry on archived sessions, purging log directories, workspace membership, and archive markers in a fixed order; if the host still holds the session, it writes to a to-do list to complete the deletion on next startup or manual trigger. The following introduces its capabilities, installation, and daily usage.
What is this¶
dsh-archive-purge is an npm package plugin for DSH, with the package name @angela_lwh/dsh-archive-purge (version 1.0.3 in current materials, MIT license, requires Node >= 22). In one sentence: it adds “real deletion” to archived sessions—removing the session’s log generations, workspace membership, and archive markers; for sessions the host cannot temporarily release, it provides delayed deletion ($DSH_HOME/archive-purge/pending.json), and unarchiving during the registration period can cancel the registration.
It does not replace DSH’s built-in archiving flow; it does not delete attachments ($DSH_HOME/attachments) or projection caches. Deletion is irreversible and does not go to the trash.
Interface and Deletion Flow¶
After installation, a “Archive Session Purge” card appears on the Plugins page in the sidebar (bilingual, following the app language), allowing the plugin to be toggled.
UI Entries (appear only on archived session rows; active or non-archived sessions will not show them):
- Delete Session in the inline
...menu; - A trash can button appearing on hover.
Both will first pop up a confirmation dialog, stating the session name and declaring that the action is irreversible.
After one confirmation, the host executes in order (as per the original material):
- Reject active sessions (sessions with ongoing conversations);
- Reject unarchived sessions—the archive marker is the authorization for deletion;
- Locate directory
$DSH_HOME/sessions/<project-key>/<session-id>/, verify the content indeed belongs to the session logs, and do not delete if the path is incorrect; - If the host is still loading the session, release the hold provided it is archived and idle (active sessions are never released);
- Recursively delete the directory (all log generations);
- Clear persistent records such as workspace membership and archive markers, and notify connected UIs via
api-session/removedto remove the row immediately.
When it cannot be deleted immediately: Active sessions are never deleted; those that cannot be temporarily released are written to pending.json to be completed automatically on the next DSH startup or manually at any time (see below). Session history remains unchanged during registration; unarchiving can revoke this registration.
Installation and Activation¶
Replace desktop with your profile name during installation. The following commands are from the repository README; choose any one. All five methods write to profile dependencies, add @angela_lwh/dsh-archive-purge to dsh.profile.bundles, and install it into the profile’s node_modules.
# Install from npm (package name has a scope; the unscoped dsh-archive-purge on npm is taken by others)
dsh plugin --profile desktop add @angela_lwh/dsh-archive-purge
# GitHub repository address
dsh plugin --profile desktop add https://github.com/Angela-lwh/dsh-archive-purge
# Pin to a 40-character full commit (recommended for sharing to avoid main drift)
dsh plugin --profile desktop add https://github.com/Angela-lwh/dsh-archive-purge#<40-char full commit>
# Release tarball
dsh plugin --profile desktop add https://github.com/Angela-lwh/dsh-archive-purge/releases/download/v1.0.3/dsh-archive-purge-1.0.3.tgz
# Local checkout (for development, changes take effect immediately)
dsh plugin --profile desktop add file:<absolute path to this repo>/plugin
The README explicitly reminds: do not use syntax like github:owner/repo#<sha>&path:/subdirectory, as pnpm may report ERR_PNPM_INVALID_DEPENDENCY_NAME; use the HTTPS address with #<commit> to specify a commit.
Uninstall:
dsh plugin --profile desktop remove @angela_lwh/dsh-archive-purge
How changes take effect after modifying the plugin (as tested in README): For browser-side plugin/lib/client.js, refresh the page; for host-side plugin/index.js, restart DSH or toggle the bundle off and on to remount it.
Typical Usage¶
- Switch the sidebar view filter to Show archived only;
- Hover over the row and click the trash can, or
...→ Delete Session; - Confirm in the dialog. Sessions the host can release are deleted immediately, and the row disappears instantly; registered sessions will be completed on next startup, and the dialog will explain the situation.
Manually complete pending purges: On any session row, ... → Complete pending purges → Purge now.
Permissions, Use Cases, and Precautions¶
The plugin runs locally with the current dsh process permissions. The permission and side-effect table in the README can be summarized as:
| Aspect | Behavior |
|---|---|
| File System | Reads and recursively deletes session directories; writes $DSH_HOME/archive-purge/pending.json |
| DSH Persistent State | Removes workspace membership and archive markers via Workspace API (involving $DSH_HOME/storages/workspace.json) |
| Local HTTP | Registers POST /api/archive-purge/deleteSession, inheriting DSH authentication |
| Interface | Registers sidebar menus and hover buttons; notifies UI to remove row after deletion |
| Network | None (host uses only node: built-in modules) |
| Install Scripts | None (no postinstall, etc.) |
Who it is for: DSH users who need to regularly clean up archived trial sessions and want the list and disk state to remain consistent; categorized under admin-security, involving irreversible log deletion, so it is advisable to browse the GitHub Source Code and license before installing.
Not suitable or things to know: Unarchived sessions and active conversations cannot be deleted via this entry; attachments and projection caches shared across sessions will not be touched; do not expect a trash bin or one-click recovery.
The DSH ecosystem emphasizes “everything is a plugin”; the community directory SkillHub Plugin Page is an independent site and has no official affiliation with DeepSeek / High-Flyer. If you are already using archiving to filter historical sessions, dsh-archive-purge supplements the step after archiving—after confirming there are no errors, clean up the logs and workspace records together, and hand over to the delay queue if the host hold prevents immediate action.