DSH privacy plugins
Two local DeepSeek Harness bundles that cover the same need from two directions: keep a workspace's conversations behind a password, and delete a conversation for real when it is no longer wanted.
Both are plain ES-module bundles — no build step, no dependencies beyond the runtime DSH already ships.
| Bundle | Package | What it adds |
|---|---|---|
| Privacy vault | @local/privacy-vault |
Password-gates a workspace; its conversations are replaced by a lock screen until unlocked |
| Conversation purge | @local/session-purge |
“Delete conversation and wipe its data” in the session menu: shreds the log, caches, temporary output, and unreferenced attachments |
Privacy vault

Right-click a workspace in the sidebar:
| State | Menu |
|---|---|
| not protected | Set a privacy password… |
| unlocked | Lock now, Remove privacy protection… |
| locked | Unlock…, Remove privacy protection… |
Opening any conversation that belongs to a locked workspace replaces the whole window
with a lock screen. The unlock window is 15 minutes (unlockMinutes in the bundle
patch), and Lock now closes it immediately.
Where the secret lives. The Host half stores a PBKDF2-SHA256 verifier (210 000
iterations, 16-byte random salt) in <DSH_HOME>/plugin-data/privacy-vault.json. The
plaintext password is never written to disk and never returned to the page; the client
sends it once per unlock. Unlock state lives in Host memory, so quitting the harness
locks every protected workspace again.
Forgot the password? Run reset-vault.ps1 (or double-click the .cmd next to it).
It backs up the verifier file and empties the lock table; conversations are untouched.
Wait 30 s for the state poll or press Ctrl+R.
powershell -NoProfile -ExecutionPolicy Bypass -File .\reset-vault.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File .\reset-vault.ps1 -WorkspaceId <id> # one lock
powershell -NoProfile -ExecutionPolicy Bypass -File .\reset-vault.ps1 -DryRun # list only
Limits. This is an in-app lock, not disk encryption — session logs stay readable to
anything that can read <DSH_HOME>/sessions, and the verifier file is the whole secret
store, so anyone with file access can also clear it. Conversation titles remain visible
in the sidebar. See privacy-vault/docs/DETAIL.md.
Conversation purge
Session menu → Delete conversation and wipe its data. A dialog measures the target first, then removes:
| Path | Content |
|---|---|
<DSH_HOME>/sessions/<workspace>/<session>/ |
the session log |
<DSH_HOME>/storages/session_projcache/sessions/<session>.json |
projection checkpoint |
<DSH_HOME>/attachments/v1/objects/<xx>/<hash> |
image/file objects no other log references |
<DSH_HOME>/cache/attachments/request-images/<xx>/<hash> |
cached request renders of those objects |
| OS temp | dsh-spill-*/session-* holding that conversation's tool output |
Files are overwritten with random bytes before the directory entry disappears (the dialog can switch the overwrite off). The session is archived first, so the sidebar row leaves immediately.
Guards. A running conversation is refused (purge/session-running), and a
conversation currently open in the main view cannot be confirmed — switch away first.
Limits. No trash, no undo, no backup. Attachment objects are content-addressed and
shared, so an object still named by another conversation survives. The registry keeps an
inert archived ID for the removed session. See
session-purge/docs/DETAIL.md.
Install
The bundles are local packages; install them by directory, not from npm.
- Plugins ▸ Add plugin and pick the folder (
privacy-vaultorsession-purge), or use the plugin-manager action with the absolute directory:install_bundle→D:\path\to\privacy-vault. - Enable the row if it is not already selected; the Host half activates immediately.
- Reload the app window (
Ctrl+R) so the client half is served: client bundles are read on request, host modules are not hot-reloaded.
Each bundle ships package.json (dsh.bundle.patch + dsh.client), cordis.patch.yml,
locale files for en and zh, an SVG icon, and the detail document shown in the plugin
panel.
The packages are named
@local/...on purpose: they are installed from a directory. Rename them inpackage.json+cordis.patch.ymlbefore publishing to a registry.
Design notes
- Client → Host channel. Both halves talk over an exact Fetch route registered through
ctx.connection.fetch.register({ path: '/api/<name>', methods: ['POST'] }). Exact routes are reachable by the owner peer only, so nothing is exposed to a shared/remote viewer, and no typert code generation is needed. (ctx.connection.rpc.handle()also works but additionally requireswebServerin the plugin'sinjectlist.) - Session logs are concatenated zstd frames. A whole-file
zlib.zstdDecompressSyncrejects withprefix_unknown;session-purge/index.jswalks the frame headers first and decompresses frame by frame. - No client dependencies. The client halves use the module table for
reactonly and bring their own small store + RPC caller, so they never import host packages.
Verification
harness.mjs in each bundle drives the Host half outside DSH against a temporary
DSH_HOME:
node privacy-vault/harness.mjs # 14 checks: set / wrong password / lock / unlock / replace / remove / no plaintext
node session-purge/harness.mjs # 8 checks: log, cache, spill, attachment GC with a shared object, archive
Both print ALL CHECKS PASS. The Client halves were checked in the running app; the
rendered menu entries and lock screen are not covered by the harnesses.
Tested with
DSH 0.2.2-rc.5 (desktop profile, Windows 11). The bundle only uses documented extension
points, but DSH is pre-1.0: a release that changes slot names or the Connection Fetch
registry will need a matching update.
中文简介
两个 DSH 本地插件:
- 隐私工作区:工作区右键设置密码,打开该工作区的对话会被全屏锁屏挡住;密码以
PBKDF2 验证串存在 Host 端,网页里不留明文;忘记密码用
reset-vault.ps1清空验证记录 (对话内容不受影响)。 - 对话彻底清除:会话右键「删除对话并清除全部内容」,覆盖并删除会话日志、投影缓存、 工具输出临时目录,以及没有被其他对话引用的附件对象;运行中的对话会被拒绝。
安装:插件 ▸ 添加插件 选择目录,然后在 DSH 窗口按 Ctrl+R 刷新。
License
MIT — see LICENSE.
No comments yet. Be the first to write one.