Archived-session management: browse archived sessions, unarchive them, or clear them out.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:MuWinds/dsh-archived-sessions
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
归档会话管理(Archived sessions manager)—— DeepSeek Harness Web 界面的设置页扩展,以单 bundle 包分发,一条命令即可安装。
在 Harness 的「设置 → 归档会话」页面中提供:
- 查看所有已归档会话(标题、创建时间、所属目录、磁盘上的实际文件路径)
- 每个会话占用的磁盘空间与总占用
- 释放(取消归档,回到原工作区)—— 单个、批量、一键全部
- 从硬盘删除会话文件 —— 单个、批量、一键清空(两步确认)
- 点击会话标题展开查看会话内容(用户 / 助手 / 工具消息预览)
⚠️ 安全提示:本插件包含「从硬盘删除会话文件」能力,删除不可恢复。安装即代表信任本仓库代码会在你的机器上以你的权限运行,请自行审阅源码。
安装(推荐:bundle 一键安装)
本包是一个声明了 dsh.bundle 的插件组合包,lib/ 里已是构建好的纯 JavaScript,可直接从 GitHub 安装:
dsh plugin --profile web add github:MuWinds/dsh-archived-sessions
然后重启 Harness(npx @deepseek-ai/dsh web)。设置面板底部会出现「归档会话」页面。
lib/中的分发产物是纯 JS、没有prepare构建脚本,因此不需要 pnpmallowBuilds授权。若你习惯锁定版本,可钉住 commit:github:MuWinds/dsh-archived-sessions#<sha>。
从本地目录安装(开发调试)
dsh plugin --profile web add ./dsh-archived-sessions
⚠️ 路径含空格时不要直接写
link:<路径>:dsh plugin会按空格切分参数,把路径拆成两个包(例如C:\...\Coding Project\pkg会被装成Coding和Project\pkg)。先把目录 junction 到无空格路径,或改用绝对路径的 junction 再 link:
New-Item -ItemType Junction -Path 'C:\dsh-archived-sessions' -Target 'C:\path with space\dsh-archived-sessions'
dsh plugin --profile web add 'link:C:\dsh-archived-sessions'
dsh plugin --profile web remove @muwinds/dsh-archived-sessions 可卸载(同时移除依赖与对应的 bundle 层)。
仓库结构
dsh-archived-sessions/
├── package.json # dsh.bundle + dsh.client 声明(单包双端)+ 构建脚本
├── cordis.patch.yml # 插入一行 archived-sessions(宿主端 + 浏览器端)
├── src/ # TypeScript 源码(npm run build 编译到 lib/)
│ ├── index.ts # 宿主端插件:webServer 路由 /dsh-archived/* + 全部业务逻辑
│ └── client.tsx # 浏览器端插件:设置页 UI(JSX,编译后包装为 __ModuleLoader__ bundle)
├── lib/ # 构建产物(package.json 的 main / exports 指向这里)
│ ├── index.js # 由 src/index.ts 编译生成(ESM)
│ └── client.js # 由 src/client.tsx 编译 + scripts/build-client.mjs 包装生成
├── scripts/
│ └── build-client.mjs # 把编译后的 client 模块包装进 window.__ModuleLoader__.load({...})
├── tsconfig.json # 宿主端编译配置(NodeNext / ESM → lib/index.js)
├── tsconfig.client.json # 浏览器端编译配置(CommonJS + JSX → lib/.client/)
├── README.md
└── LICENSE # MIT
开发与构建
源码是 TypeScript,lib/ 里的 JS 由 npm run build 生成(package.json 的 main / exports 仍指向 lib/,安装与分发方式不变):
npm install # 安装 typescript 等开发依赖
npm run typecheck # 仅做类型检查,不产出文件
npm run build # tsc 编译宿主端 + 浏览器端,并生成 __ModuleLoader__ 包装
说明:
lib/是src/的编译产物,已按0.1.5-rc.1的契约重新构建。仓库没有prepare脚本,改动src/后需手动跑一次npm run build再提交;这也正是从 GitHub 直装无需 pnpmallowBuilds授权的原因。
宿主端 API(POST /dsh-archived/*,无鉴权、同源):
| 路由 | 请求体 | 返回 |
|---|---|---|
/dsh-archived/list |
{} |
{ items, totalBytes } |
/dsh-archived/unarchive |
{ sessionId } |
{ ok, changed, archivedSessionIds } |
/dsh-archived/delete |
{ sessionId } |
{ ok, deleted, sessionId, path?, sizeBytes?, reason? } |
/dsh-archived/detail |
{ sessionId } |
{ id, createdAt, cwd, totalEvents, messageCount, truncated, messages } |
兼容性
- 目标 Harness 版本:
0.1.5-rc.1(web profile 组合结构)。 - 宿主端插件无第三方运行时依赖(纯 ESM,不 import 任何
@deepseek-ai/*,需要的能力全部从ctx获取);浏览器端仅依赖react(由 Harness 前端运行时提供,属于 platform seed)。 - 浏览器端
inject只需要slots与workspaces两个服务(package.json的dsh.client.inject声明的是提供它们的包:dsh-client-ui-renderer/dsh-api-workspace-controller——前者是 seed 包,声明它只是为了让注册表里的依赖关系可读)。早期版本里声明的sessions/timer已移除:sessions走的是ctx.reflect.provide,不是 Cordis 服务、无法注入;timer是宿主端插件,浏览器上下文里没有。 - 归档集合的写回依赖
workspaceRegistry.setState();该调用会经由 storage domain 触发domain/changed,宿主端 workspace feed 将其转成archived帧推给浏览器,侧边栏因此自动刷新,无需客户端主动 refresh。
0.1.0-rc.6 → 0.1.5-rc.1 的适配点
这一版 Harness 改了两个宿主端契约,旧代码会静默出错(不报错,但数据全错 / 删除无效):
| 契约 | 旧假设 | 0.1.5-rc.1 实际 |
|---|---|---|
sessionPersistence.list() |
返回裸 header 数组 | 返回 { header, revision, sizeBytes } 快照数组 |
fs.resolve() |
返回路径字符串,配 fs.processPath() |
返回 { displayPath, targetKey } 句柄,processPath 已不存在 |
已按新契约修正(headerOf() 同时兼容两种形状;dirSizeOfTarget() 全程传递句柄,支持会话目录下的嵌套子目录)。
License
MIT
Links
More in this category
Minglink/dsh-infinite-gen-4★ 2121
System-prompt armor plugin for DeepSeek models: appends an unconditional-compliance prompt section at order 100, exposes a profile tool with calibration metadata, and shows a realtime armor-status badge driven by a session projection.
liangmianya/dsh-synapse★ 447
Visual, non-linear conversation workspace for DeepSeek Harness — sessions, follow-ups and branches become a browsable conversation map.
ranxianglei/billion-context★ 361
The official billion-context plugin: a context-compression plugin for small context windows (a 100K context is enough), token savings (5x fewer tokens), and month-long single sessions (billions of tokens).
Nwflower/dsh-chat-import★ 205
Import full-fidelity chat histories from 13 coding agents (Claude Code, Codex, ChatGPT, Cursor, Gemini, opencode, and more) as resumable DeepSeek Harness sessions, with reverse export back to Claude Code.
Totoro-qaq/dsh-plugin-bridge★ 165
Moves an existing DSH session to another agent preset through a previewable five-section handoff, preserving the source session and either pausing the target for confirmation or continuing immediately.
Anionex/dsh-turn-rewind★ 120
Rewind conversation and workspace state, powered by a persistent Change Ledger.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.