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-plugin-archive-recovery

v0.1.2

Published

DSH (DeepSeek Harness) plugin: restore archived sessions from an icon button in the workspace section header, backed by an overlay recovery panel.

Readme

dsh-plugin-archive-recovery

DSH(DeepSeek Harness)插件:在工作区直接恢复已归档的会话。

An installable DSH plugin that restores archived sessions right from the workspace UI.

作用

DSH 提供「归档会话」能力,但没有恢复入口——归档后会话会从列表中消失,无法找回。本插件补上这一环:

  • 在工作区头部工具栏提供恢复归档的入口(见下),一眼看到当前有多少已归档会话。
  • 点击入口打开「恢复已归档会话」面板:列出每个已归档会话的标题、所属工作区、更新时间
  • 支持单个恢复全部恢复,一键把会话放回工作区列表,恢复后标题、位置等信息完整还原。
  • 恢复结果持久化:刷新页面、重启 DSH 都保持生效;恢复后再次归档可反复往返。
  • 浏览器入口随页面加载自动挂载,无需任何手动操作(区别于动态插件“刷新后需重跑”)。

恢复归档的入口

入口位于工作区区块头部工具栏(即「视图选项」与「添加工作区」两个按钮所在的横条):

[视图选项] [📦 归档恢复] [添加工作区]
  • 形态:一枚 28px 圆形图标按钮,与两侧系统按钮同尺寸、同间距、垂直居中对齐;图标为“归档盒”,右上角带数量徽标(= 当前已归档会话数,为 0 时不显示)。
  • 点击图标 → 弹出居中面板「恢复已归档会话」。
  • 面板内每一行:会话标题 + 工作区 · 更新时间 + 「恢复」按钮;底部(多于 1 条时)有「全部恢复」。
  • 搜索框展开时,入口随头部工具栏一起自动隐藏,不遮挡搜索。
  • 未安装插件时该位置只有 [视图选项] [添加工作区] 两个按钮。

安装

环境要求

  • DSH Web 界面部署(浏览器入口只在 web 表面加载)。
  • 依赖 workspaceRegistry(dsh-workspace)与 storageDomain(dsh-storage-domain)——Web 部署默认具备。

方式一:从远端 npm 仓库安装(推荐)

本插件已发布到 npm:https://www.npmjs.com/package/dsh-plugin-archive-recovery,直接 npm install 即从远端仓库拉取。

1. 安装到 DSH 部署的依赖树内

# 以 Windows 全局安装为例(部署根目录):
cd C:\Users\admin\AppData\Roaming\npm\node_modules\@deepseek-ai\dsh
npm install dsh-plugin-archive-recovery

默认从 https://registry.npmjs.org 拉取;如需显式指定 registry 或使用镜像:

npm install dsh-plugin-archive-recovery --registry=https://registry.npmjs.org

⚠️ 关键:必须与部署共享同一份 @deepseek-ai/dsh-typert-protocol 模块实例,否则 host 半区注册的远程方法对网关不可见。因此要装进部署自己的 node_modules,而不是随便一个项目目录。

2. 在主机组合(cordis.yml / cordis.patch.yml)中挂载一行

- id: archive-recovery
  name: 'dsh-plugin-archive-recovery'

这一行同时挂载 host 半区;浏览器半区由包的 dsh.client 元数据自动发现并下发,无需修改或重建 Web 前端

3. 重启 DSH web(或热重载)并刷新页面

刷新后即可在工作区头部看到归档入口。

方式二:从源码安装(可选)

克隆 GitHub 仓库(https://github.com/hisaniwo/dsh-plugin-archive-recovery)后,将包以相同名称链接进部署依赖树(需自行保证 @deepseek-ai/dsh-typert-protocol 模块实例与部署一致),其余步骤(cordis.yml 挂载行、重启)与方式一相同。

验证安装成功

  1. 工作区头部出现 📦 图标(有徽标 = 存在已归档会话)。
  2. 点击图标 → 面板列出已归档会话。
  3. 点某行「恢复」→ 该行消失、徽标减一、会话回到工作区列表。
  4. 刷新页面 → 入口与徽标仍在,已恢复的会话不再出现在面板中(持久化生效)。
  5. (可选)再归档一个会话 → 徽标 +1,面板重新出现该行(往返闭环)。

开发

lib/index.js   host 半区:ArchiveRecoveryService(Typert Remote,
               namespace: archiveRecovery, method: unarchive(sessionIds[, signal]))
lib/client.js  浏览器半区(window.__ModuleLoader__ chunk;shell.overlay 席位)
test/          host 半区冒烟测试(真实 Cordis root + Typert 网关 SRC 分发)
npm install           # 安装开发依赖
npm run test:host     # 冒烟测试:marker 注册 / 端点 claim / SRC 分发调用 / 错误路径

说明

  • Remote 服务 archiveRecovery 是进程级唯一 namespace:同一部署只挂载一行,否则网关报 ambiguous-endpoint
  • 头部入口通过 DOM 测量定位,并注入与当前前端构建匹配的头部容器样式(CSS 类名哈希随构建变化,插件读取真实类名动态生成规则,无需随版本适配)。
  • 恢复写路径复用 workspace 注册表自身机制(setState -> domain.global.set),非自造旁路;浏览器侧数据经框架标准 host/archived-sessions-changed 推送同步。
  • 纯 Web 插件:host 半区无 Web 之外的能力。

License

MIT