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-delete

v0.1.0

Published

DSH sidebar session deletion & bulk archive: adds delete-session to session row menus and archive-all/delete-all to workspace row menus

Readme

dsh-session-delete

中文 | English

中文

DSH(DeepSeek Harness)工作区侧栏增强插件:补上官方缺失的会话删除能力,并增加目录级批量操作。

功能

| 入口 | 菜单项 | 行为 | |---|---|---| | 会话行 菜单 | 删除会话 | 永久删除该会话的全部本地记录(~/.dsh/sessions/<项目目录>/<会话目录>/,含日志文件),不可恢复 | | 目录行 菜单 | 归档全部会话 | 一键归档该工作区下所有未归档会话(记录保留,仅隐藏) | | 目录行 菜单 | 删除全部会话 | 批量删除该工作区全部会话(含已归档) |

安全设计

  • 红色危险确认对话框,明示"不可恢复"及目标数量
  • 运行中/已打开的会话一律跳过(含当前会话),防止误删活跃会话
  • 删除命令运行在受限沙箱内(workspace-write,root 限定为该会话所属的项目目录)
  • 先删文件、后做归档/账目簿记:任何失败都不会留下"已隐藏但未删除"的半删状态

安装

dsh plugin --profile web add dsh-session-delete

(自动加入 profile 的 dsh.profile.bundles 层,包内 cordis.patch.yml 随层生效,无需手动编辑。web 换成你的 profile 名。)

手动兜底(不使用 dsh plugin 时):

cd ~/.dsh/profiles/web
pnpm add dsh-session-delete --registry https://registry.npmjs.org

然后在 cordis.patch.yml 添加挂载行(无需 config):

- insert:
    - id: dsh-session-delete
      name: dsh-session-delete

重启 DSH 生效。命令菜单文案自动跟随 GUI 语言(中文/英文)。

工作原理

  • Host 半index.js):注册 POST /dsh-session-delete/{delete,delete-all,archive-all} 同源路由;删除经 ctx.shell 在按调用沙箱策略下执行(POSIX rm / Windows Remove-Item 自动分派,路径单引号转义防注入)
  • Client 半client.jsdsh.client web bundle):点击捕获 + React fiber 读取行数据;MutationObserver 在菜单挂载后克隆现有菜单项 DOM 注入新命令(样式/主题自动一致),操作经同源 fetch 调 Host 路由

注:浏览器半通过 DOM 增强注入菜单(官方未开放该菜单的扩展 Slot)。DSH 大版本升级若调整侧栏结构,插件可能需要跟进——菜单未注入时功能静默缺失,不会有其他影响。

兼容性

  • DSH 0.1.0-rc.6(依赖 webServer / shell / sessionPersistence / workspaceRegistry / sessions 服务)
  • Linux / Windows(按会话路径分隔符自动分派删除命令)

English

A DSH (DeepSeek Harness) sidebar enhancement plugin: adds the missing session deletion capability plus directory-level bulk operations.

  • Session row menu → Delete Session: permanently removes the session's local records (log directory included)
  • Workspace row menu → Archive All Sessions / Delete All Sessions

Safety: danger-styled confirmation dialog; live/opened sessions are always skipped; removal runs in a per-call sandbox (workspace-write scoped to the session's project directory); files are removed before any bookkeeping so a failure never leaves a half-deleted state.

Install: dsh plugin --profile <name> add dsh-session-delete (or pnpm add dsh-session-delete plus a manual - insert: dsh-session-delete row in cordis.patch.yml), restart DSH. UI language follows the GUI locale (zh/en).

License

MIT