DSH Session Manager

August 24, 2026 · View on GitHub

简体中文

Permanent session deletion and folder-aware archive management for DeepSeek Harness Web UI.

Warning

Deletion is permanent. This project is an unofficial community extension. Release 0.1.1 supports DeepSeek Harness 0.1.0-rc.6 and 0.1.1-rc.2.

Features

  • Adds Delete session to each session row's overflow menu, with an explicit irreversible-action confirmation.
  • Adds an Archived panel to the sidebar.
  • Groups archived sessions by their pre-archive workspace, with an archived-panel-only ungrouped fallback.
  • Restores archived sessions to their original workspace grouping.
  • Stops and drains the live Agent/Session before deleting durable data, preventing deleted conversations from reappearing in a new main-sidebar “Ungrouped” workspace.
  • Removes the persisted session directory, projection cache, workspace membership, and archive membership.

Why three patches?

The original plugin needed two integration patches:

  1. P1 — workspace unarchive API: adds WorkspaceRegistry.unarchiveSession(id).
  2. P2 — session row menu slot: exposes a list slot for plugin-provided row menu items.

Deletion initially removed files and cache entries but could leave a live in-memory session. DSH would list that object again as ungrouped, and teardown could flush it back to storage. The fix therefore adds:

  1. P3 — owned Agent disposal: retains Agent lifecycle handles and exposes AgentRegistry.dispose(id), allowing deletion to stop and drain the live Agent/Session before removing disk data.

The permanent-deletion order is now:

stop and drain live Agent/Session
  -> delete persisted session directory
  -> delete projection cache
  -> detach workspace membership
  -> remove archive membership

Compatibility

ComponentSupported version
DeepSeek Harness0.1.0-rc.6, 0.1.1-rc.2
Platform installerWindows PowerShell / PowerShell 7
Manual installationOther platforms, unverified

The installer detects the installed DSH version, selects its matching patch bundle and backup allowlist, and fails before making changes if package versions or patch contexts do not match.

Install on Windows

Close DSH, then run:

git clone https://github.com/6HOLLIS/dsh-session-manager.git
cd dsh-session-manager
pwsh -File .\scripts\install.ps1

If DSH is not discoverable in the npm npx cache, pass the node_modules directory explicitly:

pwsh -File .\scripts\install.ps1 -DshPackageRoot 'C:\path\to\node_modules'

Restart DSH after installation. The installer:

  • verifies all affected package versions;
  • dry-runs every patch before changing files;
  • stores recoverable backups under ~/.dsh/backups/dsh-session-manager/;
  • installs the plugin in the web profile;
  • records exact pre/post-install hashes in an install manifest.

Uninstall

Close DSH, then run:

pwsh -File .\scripts\uninstall.ps1

The uninstaller refuses to overwrite files changed after installation. Review those changes before using -Force.

Troubleshooting

  • More than one compatible DSH install found: rerun the installer with the exact -DshPackageRoot shown in the error. The installer never guesses between multiple npx caches.
  • Version or patch check failed: this release supports exactly DSH 0.1.0-rc.6 and 0.1.1-rc.2; do not force either patch bundle onto another version.
  • Uninstall says a backup is corrupt or missing: do not use -Force. It cannot bypass backup-integrity checks. Preserve ~/.dsh/backups/dsh-session-manager/ and restore from a known-good copy.
  • Uninstall says an installed file changed: inspect the local edit first. -Force only permits replacing changed installed files after all backups pass integrity checks.
  • DSH still shows the old sidebar: fully close and restart DSH after installation or removal.

Manual installation

  1. Check the installed DSH version, then apply the three patches from the matching patches/dsh-<version>/ directory at the DSH node_modules root.
  2. Copy plugin/ to ~/.dsh/profiles/web/dsh-session-manage/.
  3. Add "dsh-session-manage": "file:./dsh-session-manage" to the web profile dependencies.
  4. Add "dsh-session-manage" to dsh.profile.bundles.
  5. Link the plugin into ~/.dsh/profiles/node_modules/dsh-session-manage.
  6. Restart DSH.

Test

npm ci
npm test
npm run check
pwsh -File .\tests\install-roundtrip.test.ps1

The installer round-trip test downloads pristine packages for both supported DSH versions into temporary directories, installs the plugin, uninstalls it, and verifies that every original file hash is restored.

Repository layout

plugin/                         DSH host and browser plugin
patches/dsh-0.1.0-rc.6/        minimal versioned vendor patches
patches/dsh-0.1.1-rc.2/        patches adapted to the current DSH release
scripts/install.ps1             guarded Windows installer
scripts/uninstall.ps1           hash-aware restoration
scripts/verify-patches.ps1      clean-package patch verification
tests/                          deletion and installer regression tests

Upgrade notes

DSH upgrades replace patched vendor files. Uninstall this project before upgrading DSH whenever possible. After upgrading to a supported version, pull the latest repository and run the installer again; it will choose the matching patch bundle automatically. Never apply a patch directory whose version differs from the installed DSH version.

License

MIT