归档会话管理:在设置页新增“归档会话”,列出所有已归档会话,支持恢复与二次确认后的永久删除。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:jujiujiang222-cell/dsh-archive-sessions
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
Archived-session manager for DeepSeek Harness.
在 DSH 设置界面新增“归档会话”页:列出所有已归档会话,支持恢复与永久删除(删除前二次确认)。
Adds an “归档会话” (Archived Sessions) settings page that lists archived sessions and lets you restore or permanently delete each one (with an in-page confirmation step).
Features
- Lists archived sessions that still have a durable log on disk (disk is the source of truth — no ghost rows from the in-memory session store).
- Shows title, creation time, working directory and whether the session is currently open in memory.
- Restore: moves a session out of the archive set; it reappears in the sidebar.
- Permanently delete: removes the session's durable log file and detaches it from workspace accounting. Requires a two-step in-page confirmation.
Install
Requirements: a DeepSeek Harness desktop / web profile (the “web” profile on this machine) with the plugin market runtime.
# from a GitHub checkout (once the repository is listed in the marketplace
# registry) or directly from the repository:
dsh plugin --profile web add github:<owner>/dsh-archive-sessions
To build it from source and install locally, place the package into the active
profile's dependency set (pnpm install file:/git target), then make sure the
row below is present in the profile's bundle patch layer:
# cordis.patch.yml
- insert:
- id: dsh-archive-sessions
name: dsh-archive-sessions
After install/update, restart the app (or let the market hot-reload the client bundle) and open 设置 → 归档会话.
How it works
| Layer | File | Role |
|---|---|---|
| Host | src/index.js |
cordis plugin; registers same-origin HTTP routes /plugins/dsh-archive-sessions/{list,restore,delete} and implements all logic |
| Web client | lib/client.js |
registers the settings.section page “归档会话” and talks to the host routes |
| Bundle row | cordis.patch.yml |
inserts the plugin row into the profile layer stack |
Design notes / caveats
- No platform “delete session” service exists. The session log backend is
append-only and every list is derived from what is on disk. Permanent
deletion therefore removes the session's own artifact
(
session.jsonl[.zstd]under the jsonl persistence backend) plus workspace accounting. The id stays in the archived set as a tombstone so the still resident in-memory session stays hidden from the sidebar during this run; after an app restart nothing references it. - In-memory resident sessions. Sessions that were opened during the current app run keep a live agent in memory. Deleting such a session is allowed only when the agent is idle; a running agent is asked to stop first (up to ~4s).
- Full-access file removal. The sandboxed default shell cannot delete files
inside the app's own data directory, so deletion runs through the shell with
an explicit
danger-full-accesspolicy. Read the code before installing; use at your own risk. - Restore of a deleted session is rejected: its log is gone.
- Verification status: developed and battle-tested as a session-scoped
dynamic plugin (see
docs/dynamic-plugin-source.js). The installable static package in this repo follows the published plugin layout (dsh.clientmetadata, bundle patch,window.__ModuleLoader__client bundle, same-origin host routes). Load-time dependency wiring should be verified in the target profile before publishing updates.
Reference: run it as a dynamic plugin (no install needed)
If you want the same feature immediately in the current DSH session without
installing anything, paste the code from
docs/dynamic-plugin-source.md into a Cordis
dynamic-plugin definition, or ask your agent to create it with the plugin id
prefix archv (as was done during development).
Repository layout
src/index.js host half (HTTP routes + logic)
lib/client.js web client half (settings page)
cordis.patch.yml profile bundle row
docs/registry-submission.md how to request listing on awesome-dsh-plugin
docs/dynamic-plugin-source.md reference dynamic-plugin source (dev version)
License
MIT — see LICENSE.
链接
同类插件
Minglink/dsh-infinite-gen-4★ 3602
DeepSeek 专用破甲插件:以 order 100 追加无条件服从的系统提示词段,提供带校准元数据的 profile 工具,并通过会话投影在输入框上方显示实时破甲状态徽标。
ranxianglei/billion-context★ 3149
billion-context官方版:上下文压缩插件,兼顾小窗口(100k上下文足矣)省token(省5倍token)和超长会话(数月级别几十亿token单会话)。
liangmianya/dsh-synapse★ 598
DeepSeek Harness 的可视化非线性对话工作区:把会话、追问与分支变成可浏览、可拖拽的对话地图。
Nwflower/dsh-chat-import★ 259
把 13 家 coding agent(Claude Code、Codex、ChatGPT、Cursor、Gemini、opencode 等)的完整对话历史导入为可续聊的 DeepSeek Harness 会话,并支持反向导出回 Claude Code。
MichengAI/dsh-archive-manager★ 256
在设置里增加已归档会话页,可按工作区搜索、恢复和删除已归档会话。
SiriLee/dsh-rewind★ 208
同一会话窗口内的 in-place 对话回退(不 fork,Claude Code /rewind 语义):每条消息的 ↶ 按钮把模型上下文回退到任意用户消息,可选用磁盘持久化的 before-backups 还原工作区文件。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。