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

@starpivot/dsh-blank-session-gc

v0.1.0

Published

Keep at most one unused blank conversation: scan on session create and delete the rest from workspace accounts and JSONL logs

Downloads

136

Readme

@starpivot/dsh-blank-session-gc

DSH host 守护插件:库里最多只留 一条未使用的空对话

Web 点「新建对话」仍会立刻 session.create。这条空会话切走后从侧栏消失,但会留在 workspace 账本和 JSONL 会话库里。本插件不改本体创建路径:监听到新会话后扫描,删掉其余未使用空会话。

行为

  • 触发:进程启动一次;之后每次普通会话 session/created(防抖 250ms)。
  • 未使用:日志里没有 turn/start。权限钉选、/plan/goal、改标题都不算使用。
  • 保留:所有未使用空会话里 createdAt 最新的那一条(并列比 id)。
  • 删除:从每个 workspace 的 sessionIds 摘掉,并删掉 sessionPersistence.locate 指向的 JSONL 会话目录。
  • 子代理会话(origin: 'subagent')不碰。
  • 仍挂在本进程里的空会话卸不掉(Host 不公开 dispose)。账本和磁盘会清;进程内那条等重启消失。

本体没有公开 session.delete。删 JSONL 目录是这条部署上唯一能真擦掉会话日志的办法;升级后路径若变,插件可能扫得到但删不掉。

安装

dsh plugin --profile web add github:StarPivotNet/dsh-plugins-public#path:packages/blank-session-gc

然后重启 dsh web

验证

node scripts/pick-victims.test.mjs