Introduction¶
When running agents in DSH, conversation records accumulate one by one. DSH’s current Session persistence does not provide a deletion method; cleaning up requires manually handling the JSONL directory. However, directly moving a log that might still be written by an Agent is unsafe—a running process shouldn’t lose its log file without its knowledge.
dsh-essential solves this problem by separating the ‘intent’ from the ‘execution’ of deletion. Running processes only record the deletion request and immediately hide the corresponding Session; the actual log movement is postponed until the next cold start, completed before building the index, and fully recoverable. Below, we introduce its features, installation, and usage.
What is it¶
dsh-essential is a DeepSeek Harness plugin, package name @deepseek-ai/dsh-essential, version 0.0.1, under the MIT license, with the GitHub repository at omdsh-dev/dsh-essential. In a nutshell, it provides recoverable conversation deletion capabilities for DeepSeek Harness—injecting a Delete conversation operation into the menu of every Session row and registering a /delete-conversation command.
It targets the Web profile. Once installed, deletion no longer requires touching files: click the menu on the interface, confirm via an in-page card, or use a slash command in the terminal; archiving and recovery are handled by the plugin according to a fixed process.
Core Features¶
Session Row Menu Injection¶
Opening the ... menu of any Session row reveals an additional ‘Delete conversation’ operation. Instead of popping up a native browser dialog upon clicking, an in-page confirmation card ‘Delete this conversation?’ appears, offering Cancel and Delete conversation actions.
Implementation-wise, the plugin uses a stable document-level controller to mount the operation into the menu DOM via a React portal; therefore, the confirmation card does not disappear when the Host menu auto-closes. Historical Sessions without an active Agent are also supported for deletion; unidentified rows remain unchanged to prevent accidental deletion.
/delete-conversation Command¶
The plugin registers a /delete-conversation command. The command layer handles this directly without sending it to the model: zero request tokens, no model calls. The CONFIRM literal is mandatory.
Immediate Hide, Restart Archive¶
After explicit confirmation, the plugin immediately hides the Session via the Workspace’s persistent archive projection without moving or deleting any active logs. On the next DSH cold start, before building the index, the Session’s JSONL directory is atomically moved to:
<stateDir>/trash/<session-lifecycle-key>/
Reason for this design: during HMR (Hot Module Replacement), if the target Session is still alive, the request is retained; only a cold start can move the logs. The running process never moves the target log to preserve Agent ownership and persistence coordination.
Security Design¶
- Deletion requests bind
sessionId,createdAt, andcwdto prevent reusing an ID to accidentally delete an updated lifecycle. - Before moving, the persistence list, backend location, and full identity are verified.
- Deletion is implemented by renaming the Session directory without ever unlinking logs; if a crash occurs after renaming, recovery is possible via a deterministic trash target.
- If verification or moving fails, the request is retained and the source directory remains unchanged.
Installation and Activation¶
Perform installation first, then restart. The official installation command is as follows to add the plugin to the Web profile (replace /path/to/DSH and /path/to/dsh-essential with actual paths):
node /path/to/DSH/apps/cli/lib/bin.js plugin --profile web add /path/to/dsh-essential
Restart DSH after installation. This package is a self-contained DSH bundle (with cordis.patch.yml) and does not patch or rebuild the DeepSeek Harness source tree. After installation, the Web Workspace will wait for deletion recovery to complete before indexing persistent Sessions. The runtime environment requires Node.js ^22.19.0 || >=24.0.0.
If you do not use the installation command, you can also combine it directly in cordis.yml:
- id: essential-conversation-delete
name: '@deepseek-ai/dsh-essential'
config:
stateDir: /absolute/path/to/conversation-trash
stateDir is required, must be an absolute path, and must be located outside the Session artifact directory. commandName is optional, defaulting to delete-conversation (without /), used to alias the command; regardless of the configuration, the menu always uses the stable /delete-conversation.
Typical Usage¶
Menu Deletion¶
- Open the
...menu of the Session row and select Delete conversation. - Confirm or cancel in the in-page card ‘Delete this conversation?’; canceling does not send any request.
During deletion, the card remains open, both buttons are disabled, the main button changes to ‘Deleting…’ and shows progress; any failures or partial results indicating ‘queued but not yet hidden’ are also presented in the card.
Command Deletion¶
Delete the current conversation:
/delete-conversation CONFIRM
Delete other conversations by Session ID:
/delete-conversation <session-id> CONFIRM
After the command succeeds, restart DSH; the next startup will move the logs to <stateDir>/trash/<session-lifecycle-key>/.
Recover Conversations¶
Conversations deleted through the above steps can all be recovered:
- Stop DSH;
- Remove
deletion.jsonfrom the trash directory; - Move the directory back to the
originalDirectoryrecorded in it.
Use Cases and Notes¶
Who is it for? DSH users and teams who manage many conversations via the Web interface, need to clean up historical Sessions, but do not want to manually manipulate the JSONL directory or have their data permanently erased.
There are a few limitations to know before using it:
- Only supports persistence of JSONL per Session; SQLite does not have an independent artifact location, so the plugin will explicitly reject it.
- Log movement takes effect after a restart: rows are immediately hidden, but the running process never moves the target log.
- Non-permanent erasure: logs are retained in the recovery trash until an administrator applies a retention policy.
- No sidecar cascade: independent storage like message feedback may leave orphan rows, as DSH does not have a cross-domain Session deletion transaction.
- DOM compatibility boundary: before Harness provides a public Session menu slot, menu operations rely on semantic Session row/menu DOM and independent React-owner lookup. If the Host changes both in the future, the plugin will fail and close, but the slash command will remain usable.
Also, a reminder: the plugin runs with the permissions of the current DSH process. Before installing any third-party plugin, you should check its source code and license (this project is MIT).
If you wish to contribute to development, the repository uses pnpm@11.7.0, and the verification process is:
pnpm install
pnpm run verify:self-contained
pnpm run typecheck
pnpm test
pnpm run build
pnpm run prepare
Conclusion¶
The value of dsh-essential lies in: under the premise that DSH lacks a public deletion capability, it provides a deletion path that separates intent from execution, uses restart gating, and is fully recoverable—leaving an entry point in both the menu and command, with a trash can fallback for accidental deletion.
Plugin directory page: https://www.skillhub.cn/plugins/omdsh-dev/dsh-essential
GitHub repository: https://github.com/omdsh-dev/dsh-essential
It should be noted that skillhub.cn is an independent community plugin directory and has no official affiliation with DeepSeek or Huanfang.