dsh-vault
DeepSeek Harness plugin: portable workspace vault for DSH conversations and logs
- Stars
- 0
- Language
- JavaScript
- Created
- Aug 26, 2026
- Updated
- Aug 26, 2026
Introduction
dsh-vault
English | 中文
A DeepSeek Harness (DSH) plugin that keeps every conversation and log inside the workspace folder, so the folder becomes a self-contained, portable archive.
When dsh-vault is installed, each workspace folder gains a hidden
.dsh-vault/ directory:
my-project/
.dsh-vault/
workspace.json # the workspace title (name)
sessions/
<session-id>.jsonl # one append-only conversation log per session
- Every session whose
cwdis the workspace is mirrored into.dsh-vault/sessions/as it happens. - The workspace title is cached in
.dsh-vault/workspace.json.
Why this works on a new computer
- Copy the workspace folder (the whole directory, including the hidden
.dsh-vault/) to the new computer. - Install DSH and this plugin there.
- Open the copied folder as a workspace.
On open, dsh-vault imports every session from the vault back into DSH
persistence (rebinding each session's cwd to the folder's current location),
and restores the workspace name from workspace.json. All conversations —
including the workspace title — come back.
Install
# from GitHub (works immediately — no npm publish required)
dsh plugin --profile web add git+https://github.com/XiaoWind/dsh-vault.git
# or from npm, once published
dsh plugin --profile web add dsh-vault
dsh plugin forwards to pnpm inside the web profile directory, then
reconciles the profile's dsh.profile.bundles layer list. Because this package
declares dsh.bundle.patch, it joins the layer stack automatically. Restart the
Web app after installing.
The plugin injects
sessionPersistence,workspaceRegistry, andcommands, so it activates only in profiles that compose those host services — the shippedwebprofile does.
Update
Pull the latest version into an installed profile:
dsh plugin --profile web update dsh-vault
dsh plugin forwards to pnpm update dsh-vault, which re-resolves the
github:XiaoWind/dsh-vault dependency to the latest commit on the default
branch. The lockfile pins a git dependency by commit hash, so a version bump
is not required for the update to land. If pnpm has cached an old resolution,
re-pin it explicitly:
dsh plugin --profile web add github:XiaoWind/dsh-vault
Restart the Web app after updating — the bundle layer is composed at boot, so a running Web process does not hot-reload an installed plugin.
Usage
The vault runs automatically — no setup required. A /vault slash command
provides visibility and manual control:
| Command | Result |
|---|---|
/vault status | Show vaulted workspaces and per-workspace session counts. |
/vault restore | Import vaulted sessions/titles for known workspaces now. |
/vault export | (Re)write vault files from current persistence now. |
/vault help | Show help. |
How it behaves
- Continuous mirroring. As a session appends events, they are written to
the workspace's
.dsh-vault/sessions/<id>.jsonlin order. On session disposal the file is rewritten as a clean snapshot. - Automatic restore. At boot, and whenever a workspace is opened, the plugin imports any vault session missing from DSH persistence and applies the vaulted title. On a brand-new machine, opening the copied folder as a workspace triggers the same restore.
- Portable paths. Session
cwds are rebound to the workspace's current absolute path on import, so a folder copied to a different location restores cleanly. - Idempotent. Sessions already in persistence are never re-imported, and attaching/renaming is a no-op when nothing changed.
Configuration
No configuration is required. The plugin inserts with an empty config; the
vault directory name (.dsh-vault) and the JSONL format are fixed so vaults
stay interchangeable across machines.
Development
# syntax check
node --check lib/index.js
node --check lib/vault.js
# format/parse unit tests (run in-process to avoid spawning under a sandbox)
node test/vault.test.mjs
The plugin is dependency-free ESM (lib/index.js + lib/vault.js) with no
build step. It exports apply, inject, and name, and the bundle layer
cordis.patch.yml inserts it into the profile composition. The JSONL format is
self-contained and independent of the harness, so lib/vault.js can be
unit-tested directly.
License
MIT