Introduction¶
DeepSeek Harness (DSH) provides archiving by default but does not offer a deletion API. As a result, session logs and caches can accumulate in the persistence layer. dsh-minimal-session-delete is a plugin maintained by reverse-PAI that completes this workflow: it provides deletion entry points through the sidebar menu, hover buttons, and keyboard shortcuts. After a secondary confirmation, it uses Host authentication routes to clean up logs, caches, and archive markers.
Core Capabilities¶
- Deletion Entry Points
- The
...menu item on a session row in the sidebar provides a Delete Session option. - Hovering over a session row displays a trash can icon.
- Keyboard shortcuts:
Ctrl/⌘ + Shift + Don desktop andCtrl/⌘ + Alt Din the browser.
- The
- Execution Flow
- Triggers a secondary confirmation dialog that displays the title, session ID, and an unrecoverable warning.
- Deletes session logs, projection cache rows, and archive markers through Host routes.
- Safety Mechanisms
- Supports
dryRunmode, allowing preview before execution. - Path traversal protection using regex whitelist validation.
- Running sessions return a
409status code, and deletion is rejected.
- Supports
- Lightweight Features
- Zero dependencies, zero build, and zero configuration.
Installation¶
Use the DSH command-line tool to install the plugin:
dsh plugin add dsh-minimal-session-delete
After installation, the plugin is automatically added to dsh.profile.bundles and enabled by default, requiring no additional configuration.
Usage¶
- UI Operations: Hover over a session row and click the trash can icon, or click the
...menu and select Delete Session. - Keyboard Shortcuts: After opening a session in the main view, use
Ctrl/⌘ + Shift + Don desktop orCtrl/⌘ + Alt Din the browser. - Script Invocation:
curl -X POST 'http://<你的 DSH Web 地址>/api/dsh-session-delete' \
-H 'content-type: application/json' --cookie '<DSH 会话 Cookie>' \
-d '{"sessionId":"session-6f1c2f0e-3b7a-4a6e-9a1d-2c5b8f7d9e01","dryRun":true}'
A response of `ok: true` indicates success. The `code` field contains error information such as `running` and `invalid-id`.
Notes¶
- Archive ≠ Delete: Archiving only hides the session; logs remain retained in the persistence layer.
- Unrecoverable: Deletion is irreversible.
- Rejected While Running: Sessions that are running cannot be deleted.
- Client Update: After installing or updating the plugin, refresh the page or restart the application.
References¶
- GitHub: https://github.com/reverse-PAI/dsh-minimal-session-delete
- Directory: https://www.skillhub.cn/plugins/reverse-PAI/dsh-minimal-session-delete