npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-chat-archive-manager

v0.1.8

Published

在设置页提供「归档管理」页面:按工作区浏览、批量归档、恢复,以及需要二次确认的永久删除,不额外创建 Workspace。

Readme

dsh-chat-archive-manager

给 DeepSeek Harness Web 用的插件:在“设置”里提供一个归档聊天管理页,支持按工作区分组浏览、批量归档、恢复,以及需要二次确认的永久删除。不创建归档专用 Workspace,也不修改 DSH 源码或已安装的 @deepseek-ai/* 包。

功能

  • 在“设置”左侧导航增加「归档管理」页面(带归档图标):标题后紧跟归档计数,超过 99 显示 99+ 条聊天。
  • 按 DSH 自己的工作区顺序分组浏览,只有一个“未分组”桶;组与组之间只用间距区分,空组不显示。
  • 分组与单列表两种视图,搜索框(标题 / 目录 / 工作区),最近更新 与 归档先后 两种排序。
  • 一键恢复:只移除归档集合成员关系,会话回到原工作区的原位置;原 Workspace 已删除时进入“未分组”。
  • 批量归档:按范围(全部 / 某个工作区 / 未分组)与时间条件(含不做时间过滤的「所有时间」)筛选,冻结预览逐条核对后串行执行,可中止,执行完可一键「撤销本次归档」。
  • 批量删除:同样的三步流程,但终点是永久删除;无论选中几条都必须勾选确认,结果页不提供撤销。
  • 每行的副标题只显示相对最近更新(20 天、1 个月),不显示绝对时间戳或目录名。
  • 不添加侧边栏一级入口,DSH 自带的动态 Cordis Plugin 底部入口保持独立。

要求

  • DeepSeek Harness Web >=0.1.7-alpha.1 <0.1.8;0.1.7-alpha.1 已逐版本核对契约,同线后续 prerelease 带警告运行、仍受结构与能力检查保护,范围外(0.1.6 及更早、0.1.8 起)保持 inert。
  • 能力探测始终是权威:即使版本在范围内,探测不到的能力(例如删除、恢复)也各自 fail closed,并在页面上写明原因,其余功能照常可用。
  • 永久删除依赖 session-persistence-jsonl(DSH 默认部署自带),并按运行中的 DSH 实际写的日志 generation(session.vN.jsonl[.zstd],0.1.7 是 v4)工作。
  • Node.js 20 或更高版本。

安装与卸载

dsh plugin --profile web add dsh-chat-archive-manager       # 安装
dsh plugin --profile web add [email protected] # 升级到指定版本
dsh plugin --profile web remove dsh-chat-archive-manager    # 卸载

已发布为 dsh-chat-archive-manager。profile 里的依赖是 caret 范围,升级需要显式写版本号(如上)。安装会向 profile 增加 bundle,而 bundle 列表只在启动时读取,因此需要重启 dsh web 并刷新页面。卸载只移除 profile 依赖和 bundle 层,不删除会话、附件、旧版归档目录或删除事务日志。

从源码运行:./install.sh 安装 link:<源码目录>,./uninstall.sh 移除,两者都走同一个官方 profile manager。

使用

  1. 用 DSH 原生操作归档会话。
  2. 打开「设置」,在左侧选择「归档管理」。
  3. 列表上方唯一一行里:最左是「批量归档」「批量删除」,最右是「展开全部/折叠全部」,搜索框在工具栏中;可在「按工作区分组 / 单列表」之间切换,按「最近更新 / 归档先后」排序。分组默认折叠,点击工作区行展开。
  4. 恢复:点该行的恢复按钮,会话回到原工作区的原位置。
  5. 永久删除:点红色的「永久删除」按钮,在确认弹窗中确认。若该聊天仍开在当前 dsh web 里且完全空闲,插件会先关闭它的会话再删除日志。
  6. 批量归档:选择范围与时间条件,决定是否包含运行中、空白、当前打开的会话(子代理始终排除),在冻结的预览清单中逐条核对;默认全选,可逐条取消或用汇总行的「全不选」清空;超过 50 条需要勾选确认。执行逐条串行、可中止,结束后可「撤销本次归档」。
  7. 批量删除:同样的三步流程,作用对象就是页面上的归档聊天;无论几条都必须勾选确认,执行后可看到跳过/失败清单,但没有撤销。
  8. 归档之外的浏览/恢复也可以直接用 DSH 自己的入口:0.1.7 起 DSH 把归档管理放在侧栏的「已归档会话」视图筛选与搜索结果里。

时间条件中「所有时间」不做时间过滤,全部候选都参与(想一次性清理所有聊天时选它);「24 小时前」是滚动 24 小时;「1 天前」从本地今天 00:00 起算(含昨天及更早),刻意不等同于滚动窗口;其余预设为滚动 N×24 小时,自定义日期取所选日期的本地 00:00。

永久删除会做什么

成功删除会:

  • 校验 backend 返回的会话 header 与物理日志 identity;
  • 把会话目录同文件系统原子移动到 trash 目录;
  • 从 Workspace 记账和归档集合里移除该会话;
  • 尽力清理投影缓存、消息反馈与搜索索引;
  • 复核后再递归删除 trash。

不会删除 $DSH_HOME/attachments/v1/objects:附件是内容寻址的,可能被多个会话共享。

事务日志与垃圾目录沿用历史名字,属于持久化的安全契约:

$DSH_HOME/dsh-archived-chats/deletions.json          # 事务日志
$DSH_HOME/.dsh-archived-chats-trash/                 # 同文件系统 trash(在 JSONL 扫描根之外)

删除与恢复共用同一个串行队列。存在未完成的事务时,删除与恢复都会暂停并保持现场,等待人工检查;插件不会依据日志自动重命名、回滚、前滚或递归删除。

注意事项

  • 永久删除是严格的私有 ABI 兼容层:只有 JSONL backend、Workspace registry、handle tracker、迁移任务与缓存结构都与已验证契约一致时才开放;不匹配时列表与恢复仍可用,删除会 fail closed,页面上会给出原因。日志 generation(session.vN.jsonl[.zstd])不是写死的常量,按运行中的 DSH 实际写的那个 generation 工作。
  • 未迁移到当前 generation 的会话日志不会被删除,而是给出明确的迁移提示(旧 generation 必须先由 DSH 自身迁移;这类聊天需要先恢复并继续一次对话才会迁移)。
  • 运行中或已有排队输入的会话返回「会话忙」;存在持久化或 live 后代的父会话不能单独删除。
  • DSH 0.1.7 已删除自带「已归档会话」设置页(0.1.6 有),归档会话改由侧栏的「已归档会话」视图筛选与搜索结果里的取消归档原位恢复;两条入口操作同一份归档集合,语义一致,本插件的「归档管理」页不受影响。
  • 状态、恢复与删除接口都先复用 DSH 的 trusted-host 与签名浏览器 cookie 认证;两个 mutation 另外要求同源请求与 application/json。

License

MIT