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

@kesike/dsh-exit

v0.2.6

Published

在 dsh web 界面提供退出按钮:确认后结束宿主进程并释放端口

Readme

dsh-exit

为 DeepSeek Harness Web 界面提供一个明确、可确认的退出控制。

dsh Web 插件 npm 平台 版本 依赖

简体中文 | English

✨ 功能概览

dsh-exit 在 dsh 设置面板中增加一个独立的退出栏目,并使用最高排序值,确保新安装的设置类插件仍排在它前面。

  • 先弹出确认弹窗,确认前不会执行退出动作。
  • 退出栏目始终位于设置左侧导航的最底部。
  • 确认后调用类型化的 dshExit/exit Remote 方法。
  • 先返回调用应答,再等待短暂窗口结束宿主进程。
  • 释放该进程占用的全部端口;设置页会显示当前 dsh Web 的真实主机和端口。
  • 保留宿主终端窗口和浏览器标签页,方便后续操作。
  • 使用 dsh 现有设计令牌与 Lucide power 电源图标。

🎬 GitHub 展示区

下面展示退出流程,以及插件在 dsh 设置面板中的实际效果。

📸 真实 dsh 界面

下图是已经安装 dsh-exit 的真实 dsh 设置界面;红色的退出就是设置左侧列表底部的插件导航项。

🧱 npm 包内容

| 层次 | 文件 | 职责 | | --- | --- | --- | | 宿主侧 | lib/index.js | 注册 dshExit Cordis 服务和类型化 exit() Remote 方法。 | | 客户端 | lib/client.js | 自包含浏览器 bundle:设置栏目、退出按钮、样式、弹窗、键盘交互和 Remote 挂载。 | | Bundle 补丁 | cordis.patch.yml | 向 dsh profile 插入插件行。 | | 包元数据 | package.json | 声明宿主入口、Web 客户端和 Bundle 补丁。 |

npm 包聚焦于运行所需的源码和包元数据,下面同时提供截图和流程源文件:

| 展示素材 | 位置 | | --- | --- | | 动画 WebP | docs/dsh-exit-landscape.webp | | MP4 / WebM 视频 | docs/dsh-exit-landscape.mp4 · docs/dsh-exit-landscape.webm | | Archify 源文件 | docs/exit-flow-landscape.html · docs/exit-flow-landscape.workflow.json | | 真实界面截图 | docs/dsh-exit-real.png |

🚀 从 npm 安装

直接将 npm 包加入 dsh 的 Web profile:

dsh plugin --profile web add @kesike/dsh-exit

安装后重启 profile。裸导入由 dsh 宿主加载器解析,因此本包不声明运行时依赖。更新或移除:

dsh plugin --profile web update @kesike/dsh-exit
dsh plugin --profile web remove @kesike/dsh-exit

🖥️ 交互说明

| 操作 | 结果 | | --- | --- | | 点击设置左侧列表底部的红色退出栏目 | 打开退出栏目和确认操作。 | | 点击取消、按 Esc 或点击弹窗外部 | 关闭弹窗,不改变宿主状态。 | | 点击确认退出 | 禁用重复操作并调用宿主 Remote 方法。 | | Remote 调用失败 | 恢复控件并显示行内错误信息。 | | Remote 调用成功 | 关闭弹窗,宿主随后退出。 |

🔌 Remote 接口

宿主侧公开一个严格校验、无参数的 Remote 方法:

namespace: dshExit
method:    exit
result:    true
gateway:   /api/dshExit/exit

dsh 客户端网关成功时返回标准 envelope:{ ok: true, value: true }。服务端通过 exiting 标志防止重复调用,并在应答有机会完成后延迟执行 process.exit(0)。

🧪 开发检查

在项目根目录执行轻量语法检查:

node --check lib/index.js
node --check lib/client.js

🗺️ 快速信息

  • 目标: DeepSeek Harness Web profile
  • 安装方式: npm 包
  • 界面位置: 设置左侧导航的最后一栏
  • 执行动作: 结束 dsh 宿主进程
  • 运行端口: 从设置页当前 dsh Web 地址动态读取
  • 仓库主题: dsh · deepseek-harness · dsh-plugin · plugin · javascript · web

电源图标来自 Lucide,遵循其 ISC 许可使用。

界面小而专注,退出动作明确且可预期。