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-session-cleaner

v1.0.2

Published

Delete DeepSeek Harness sessions from the running web runtime: live store detach, workspace records, and on-disk artifacts.

Readme

dsh-session-cleaner

运行中的 DeepSeek Harness Web 运行时删除会话——文件、内存 live store、工作区记录,无需重启 dsh web

官方 Web API 只有 workspace.archiveSession(隐藏),没有 session.delete。本 bundle 补上这个缺口。

安装

dsh plugin --profile web add dsh-session-cleaner            # 从 npm
dsh plugin --profile web add github:fountunt/dsh-session-cleaner   # 从 git

# 或使用本地 checkout
dsh plugin --profile web add file:/path/to/dsh-session-cleaner

然后重启 dsh web(运行中的实例不会热加载新 bundle)。

使用

Web UI(v1.0.0)

客户端部分在侧边栏会话行 ⋮ 菜单底部添加一个 🗑 "删除此会话" 菜单项——标题有歧义(重名)时会话的菜单项会被跳过以保证安全。

点击确认后,会话被删除并刷新侧边栏。会话运行时菜单项为灰色禁用状态;在 UI 打开过的会话(挂着空闲 agent)会先自动停止再删除。当前正在运行的对话永远无法被删除。

API

插件在 Web 服务器上注册一个路由:

POST /api-ext/session.delete
Content-Type: application/json

{ "sessionId": "session-1bb8d361-ea6b-4b92-bab2-c858c92e8822" }

同源调用可直接在 Harness 页面的浏览器控制台执行:

await fetch("/api-ext/session.delete", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({ sessionId: "session-1bb8d361-ea6b-4b92-bab2-c858c92e8822" }),
}).then(r => r.json());

响应格式(与宿主 RPC 风格一致):

{ "ok": true, "value": { "detached": true, "workspaces": 1, "files": 1 } }
{ "ok": false, "error": { "code": "refused", "message": "..." } }
  • detached — 会话已从内存 live store 移除(这就是它立刻从侧边栏消失、无需重启的原因)。
  • workspaces — 从多少个工作区记录中摘除了该会话。
  • files — 删除了多少个磁盘上的会话目录。

安全性

  • 有 agent 附着(运行中或空闲)的会话会被拒绝——当前对话永远无法通过此端点删除。
  • 删除不可逆:文件、工作区成员关系、live 条目都会被移除。session-projection 缓存可能保留一条无害的过期记录,直到下次重启。

工作原理

session.list 由 live SessionStore 加磁盘扫描共同提供。冷会话在列出时会被准备进 live store,因此文件删除后它们会以"幽灵"形式残留到服务器重启。本插件移除 live 条目(走 store 自身的 detach 通道)、从工作区记录摘除会话,并删除磁盘上的会话目录——让该行立即、永久消失。

开发

pnpm install        # peer: @deepseek-ai/cordis
node --test test/   # 单元测试

许可证

MIT