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

@hualiong/dsh-session-delete

v0.4.3

Published

Delete sessions of a DeepSeek Harness profile from the UI: session-row menu item with a confirm dialog; the host endpoint deletes the log, projection cache and workspace accounting, cascading through the whole subagent tree. Optionally exposes session_lis

Readme

dsh-session-delete

在 DeepSeek Harness 界面里安全地彻底删除会话。 在侧栏会话行 "..." 菜单内添加"删除会话"项,点击后出现确认弹窗;确认后会先停止该会话正在运行的任务,再删除会话日志、投影缓存与工作区记账。可在web中使用,并且理论上兼容一切web套壳的客户端。

安装

dsh plugin --profile <profile> add @hualiong/dsh-session-delete

也可以直接从仓库安装:dsh plugin --profile <profile> add github:hualiong/dsh-session-delete,或在插件页面的“添加插件”里手动输入包名/仓库地址。

功能

  • 侧栏会话行 "..." 菜单原生"删除会话"项
  • 确认弹窗(Modal)
  • 删除链路:会话目录 + 投影缓存 + 工作区记账 + pin 记录(经活动 storageDomain,内存/磁盘一致)
  • 删除前先经官方 workspace/session-stop 事件停止会话及其后代名下的运行中任务(运行回合、后台任务、定时提醒、子代理)
  • 级联删除:删除一个会话时,其全部子代理后代(任意深度)一并删除,且只跟随 origin: subagent 的子代理关系;Agent 工具在任一后代忙碌时整体拒绝,不会留下半棵树
  • 删除后向客户端广播 api-session/removed,侧栏对应行立即消失
  • 删除接口只接受同源 application/json POST,并限制请求体大小,跨站页面无法直接调用
  • 删除当前会话后与原生归档行为一致:调用 uiWorkspace.clearMain() 清空主视图,界面停在空会话(选择工作区那一页),而不是自动新开一个会话
  • 可选暴露两个 agent 工具(默认开启,可在下面说的详细页里开关):
    • session_list:按工作区分组浏览可见会话,可钻取到单个工作区的会话列表
    • session_delete:删除会话;拒绝删除调用者自己、拒绝删除运行中的会话
  • 本插件自己的详细页开关:插件页 → 会话删除 所在行右侧 Configure → "向 Agent 暴露会话工具",拨动即生效。行页的 key 是 <bundle 包名>#<行 id>,本插件按两种发行形态各登记一次(套件内为 @hualiong/dsh-plugin-suite#chameleon-session-delete,单独安装为 @hualiong/dsh-session-delete#chameleon-session-delete);未被行认领的 key 不会产生任何界面
  • 界面删除路径始终可用,不受 exposeAgentTools 影响

运行时依赖

宿主半边 src/index.js 静态 import 两个由 DSH 运行时提供的包,按官方工具插件的口径声明为可选 peerDependencies(不从 registry 安装,由 DSH 的安装体解析表提供):

  • @deepseek-ai/dsh-home-paths:普通 dependencies(0.2.0-rc.2)。它曾被放在 devDependencies 里,从 registry 安装套件时触发 ERR_MODULE_NOT_FOUND(详见套件 README 的 0.3.6 记录),因此留在 dependencies。
  • @deepseek-ai/schemastery(Config schema)与 @deepseek-ai/dsh-tools(defineTool):参考已发布的第三方插件(如 dsh-rewind-plugin)的写法,写在 peerDependencies + peerDependenciesMeta.optional,由 DSH 侧解析。

客户端半边用 window.__ModuleLoader__ 的 require 取 react / @deepseek-ai/dsh-client-store / @deepseek-ai/dsh-client-ui-primitives,这些同样由 DSH 的客户端模块表提供,不经过 npm 解析。

本插件依赖较新的 DSH:级联删除用的 api-session/removed 事件与配置页用的 plugins.row.config 槽位都是近期才有的。

截图