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

@jw-king/dsh-plugin-workspaces-extra

v0.1.0

Published

DeepSeek Harness UI plugin: session deletion (删除会话). Adds a header action on the current session with a confirm dialog; on confirm it terminates the session's agent and removes the session's files and local data.

Readme

@jw-king/dsh-plugin-workspaces-extra

DeepSeek Harness 组合包插件:删除会话。

在会话头部「Session 日志」按钮右边增加一个「删除」动作(官方增量插槽 conversation.session.header.utilities,order 排在其后),点击后弹出全屏二次确认框(shell.overlay 插槽)。确认后插件会:

  1. 终止会话 — 取消该会话正在运行的 agent、flush 未落盘事件,并把会话从内存 store 中驱逐(session/disposed 广播后侧栏列表自动移除该行);
  2. 删除文件与数据 — 删除该会话在 DSH home 下的全部磁盘数据:
    • ~/.dsh/sessions/<项目key>/session-<id>/(会话日志)
    • ~/.dsh/storages/session_projcache/sessions/session-<id>.json(投影缓存)

说明:官方各版本(master / npm 0.1.2-rc.1)均不存在 sidebar.workspaces.row-menu 插槽,向未声明插槽注册会抛错,因此本插件采用官方增量插槽 conversation.session.header.actions + shell.overlay 实现同等能力。

安装

dsh plugin --profile web add @jw-king/dsh-plugin-workspaces-extra
# 或本地目录 / tarball
dsh plugin --profile web add ./dsh-plugin-workspaces-extra

重启 Web UI 后,打开任意会话,标题旁出现「删除」按钮。

结构

src/index.js           宿主半插件:注册 HTTP 路由
src/route-handler.js   POST /jwk-session-delete/api/delete 处理器
src/delete-session.js  终止 + 驱逐 + 文件收集/删除(纯函数,可测)
lib/client.js          浏览器半(dsh.client bundle,手写、免构建)
tests/                 node --test 单元测试

请求策略

路由仅接受携带自定义头 x-jwk-session-delete: 1 的同源 JSON POST(跨源需预检而本路由不应答预检,浏览器会直接拦截),且 sessionId 必须是 UUID 形态,杜绝路径穿越。

已知边界

  • ~/.dsh/attachments/ 为内容寻址的跨会话共享存储,不做按会话清理。
  • 浏览器半依赖 slots 服务;插件注册包裹在 ctx.slots.inject() 中,随宿主插槽声明自动重挂。

开发

npm run check   # 语法检查
npm test        # 单元测试