Introduction¶
In DeepSeek Harness (DSH), session logs are persisted. When you need to run a quick test or have a one-off exploratory conversation, manually cleaning up old sessions adds to the maintenance burden. The dsh-temp-workspace plugin adds a quick entry point in the sidebar, allowing users to create disposable temporary workspaces. When Harness restarts, these workspaces and their associated sessions are automatically cleaned up, leaving no traces behind.
What This Is¶
This is a DSH Web client plugin designed to add temporary workspace functionality to Harness. The plugin is maintained by wjj-8283 and is licensed under the MIT License. By injecting the required runtime modules and registering specific API routes, it provides a closed loop of “creating temporary environments” and “safe cleanup.”
Installation and Enablement¶
It is recommended to install directly using the official command, with no local build required.
dsh plugin --profile web add @wjj-8283/dsh-temp-workspace
If you need to install from GitHub source, you can use:
dsh plugin --profile web add github:wjj-8283/dsh-temp-workspace
After installation, the plugin is automatically added to the Loader layer stack. Restart dsh web for the plugin to take effect.
Core Features¶
The plugin mainly provides the following capabilities:
- Quick Entry: Adds a small hourglass icon next to the “Add Workspace” button in the sidebar.
- API Route: Registers the
/temp-workspace/apiroute for browser-side calls to create a workspace. - Settings Panel: Registers a card under “Settings -> Plugins” for configuring the deletion policy.
- Runtime Injection: Injects
webServer,webRuntime,workspaceRegistry,sessionPersistence,settings, andloader.
Typical Usage¶
Creating a Temporary Workspace¶
Click the small hourglass icon next to the “Add Workspace” button in the sidebar. The system automatically creates a temporary workspace and opens a new conversation window. This workspace is used only for the current session and does not create a persistence burden.
Converting a Temporary Workspace to Permanent¶
If the contents of a temporary workspace need to be retained, find the pin icon on the corresponding “Temporary Workspace” row in the sidebar and click it. This prompts the system to invoke the file picker, move the workspace files to a specified OS folder, and set that folder directly as a permanent workspace. After completing the operation, you need to restart Harness for the new workspace to take effect in the registry.
How It Works and Notes¶
Cleanup Mechanism¶
Because DSH’s persistence interface is append-only and there is no public “delete session log” API, cleanup must be performed when Harness restarts.
- Deletion Mode: The default is
immediate(delete immediately). It can also be configured asdelayed(delete after a delay), in which case adeleteDelaygrace period (default 3600 seconds) is set. - Deletion Confirmation: If
confirmBeforeDeleteis enabled (enabled by default), Harness does not automatically delete any sessions when it starts. Instead, a confirmation dialog is shown. Users can choose “Delete”, “Keep Temporary”, or “Keep As Is Until Next Time”. Unhandled sessions will be asked about again on the next startup. - No Residue: Whether they are temporary sessions or logs on disk, they are completely removed after deletion is confirmed, leaving no residual files or cache records.
Limitations¶
- Startup Dialog: When deletion confirmation is enabled, the host does not automatically delete at startup, and the “Keep Permanently” option is not available in the dialog. You need to manually use the pin button in the sidebar.
- Directory Marker: Directory cleanup for temporary workspaces relies on marker paths in
<dsh-home>/temp-workspaces/state.json. Even if the registry record has been removed from the UI, as long as the marker exists, the directory will still be cleaned up.