DeepSeek Harness plugin

dsh-session-dustbin

DSH 会话纸篓:归档的会话随手丢进纸篓——随时翻看对话内容,一键删除(含文件)或恢复,删除即时生效无需重启。

Jump to install

Source facts

Repository
Github-CJX/dsh-session-dustbin
Latest update
Aug 21, 2026
Category
Tools & Capabilities
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-21

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/Github-CJX/dsh-session-dustbin
Plugin: dsh-session-dustbin
Author: Github-CJX

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-session-dustbin

DSH 会话纸篓 — 归档的会话像丢进纸篓的纸:随时翻出来看内容,不要了连文件一起倒掉,删除即时生效、无需重启。

!plugin type !license !tests

<img width="1264" height="801" alt="image" src="https://github.com/user-attachments/assets/1b6eac82-df7f-4b33-962a-9fac70ef6d9b" />

<img width="1264" height="801" alt="image" src="https://github.com/user-attachments/assets/a5665b63-4d64-4eb1-a0f2-6ba5fb225405" />

在设置 → 插件 → 可配置 增加「会话纸篓」卡片:

  • 归档会话纸篓:列出已归档会话,展开可查看对话内容(从会话日志解码,多帧 zstd 兼容)
  • 删除会话:活跃与归档会话均可删除——先归档(侧边栏即时消失)再删文件(数据彻底清除),无需重启
  • 恢复归档:一键把归档会话恢复为活跃会话
  • 侧边栏快捷删除(实验性):会话行「…」菜单注入「🗑 删除对话」,DSH 风格确认框

工作原理

  • 列表状态实时读取平台 workspaceRegistry 内存服务(归档/恢复立即反映),磁盘 ~/.dsh/storages/workspace.json 为兜底
  • 会话内容从 ~/.dsh/sessions/<项目>/<id>/session.jsonl.zstd 多帧 zstd 逐帧解码(兼容 rc.7 追加式日志格式)
  • 所有操作走 loopback 围栏桥(/api/dsh-session-dustbin/*),仅本机浏览器可访问
  • 删除链路workspaceRegistry.archiveSession()(内存广播,侧边栏立即收走)→ 删除会话目录 → 清理 workspace.json 标记;列表读取时过滤目录已不存在的会话,标记残留不会显示

已知约束

  • 活跃会话的事件日志未完整落盘(关闭才 flush)→ 只能查看归档会话全文;活跃会话只列出不读内容
  • 删除不可逆(会话目录 + 标记一并清除),卡片与侧边栏均带 DSH 风格确认框(需勾选「无法恢复」才能确认)
  • 删除后重启前,DSH 侧边栏的归档分组可能残留一个点不开的空条目(平台无移除归档标记的 API;插件列表不受影响,重启后彻底干净)
  • 侧边栏注入为实验性:React 重渲染可能吞掉注入项(下次打开菜单重新注入);会话定位按标题反查,重复标题取第一个

仓库结构

dsh-session-dustbin/
├── lib/                        # 宿主侧(Node ESM,零 cordis 工具依赖)
│   ├── index.js                # 插件入口:设置段 + 路由挂载
│   ├── routes.js               # loopback 围栏桥(list / get / delete / unarchive)
│   ├── sessions.js             # workspace.json 读写 + 会话枚举/内容/删除/恢复
│   ├── zstd.js                 # 多帧 zstd 解码(rc.7 追加式日志格式)
│   ├── protocol.js             # 与客户端共享的路径/命名空间常量
│   └── client.js               # 预构建客户端 bundle(提交以便克隆即用)
├── src/client/                 # 客户端(浏览器侧,rolldown 打包)
│   ├── index.ts                # 入口:settings.plugin.item keyed 卡注册
│   ├── SessionAdminCard.tsx    # 会话纸篓卡片(列表/内容/删除/恢复)
│   ├── sidebar-inject.tsx      # 实验性:侧边栏会话菜单注入「删除对话」
│   ├── locales.ts              # zh / en 文案
│   └── session-card.module.css
├── docs/                       # installation / troubleshooting / architecture
├── build-client.mjs            # 客户端构建脚本
├── sync-profile.mjs            # 同步插件到 profile(清拷贝 + 重装 + 校验)
├── smoke-client.mjs            # 客户端冒烟测试
├── test-sessions.mjs           # 宿主逻辑测试
└── cordis.patch.yml            # profile bundle 注册补丁

开发

node test-sessions.mjs          # 宿主逻辑测试(临时目录,不碰真实数据)
node build-client.mjs           # 重建客户端 bundle
node smoke-client.mjs           # 客户端冒烟
node sync-profile.mjs           # 同步到 profile(file: 实体拷贝),然后重启 DSH

架构细节见 [docs/architecture.md](docs/architecture.md),安装见 [docs/installation.md](docs/installation.md),排障见 [docs/troubleshooting.md](docs/troubleshooting.md)。