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-ssh-terminal

v0.1.3

Published

SSH 远程终端:在 dsh-better-sidebar 侧边栏里连接远程主机,逐步查看命令与输出。

Readme

dsh-ssh-terminal

🌏 English · 中文

SSH 远程终端:在 dsh-better-sidebar 侧边栏里连接远程主机,逐步查看 agent 输入的命令和输出,不影响对话主流程;同时为 Agent 提供 SSH 工具。

SSH 终端面板

功能

  • Better-sidebar「SSH 终端」tab:右侧栏 + 菜单里出现,点击即打开面板,含连接表单 + 命令输入 + 实时命令→输出转录(带时间戳、颜色跟随 DSH 皮肤)。
  • 多连接并行:每次 ssh_connect 都会创建独立的 SSH 进程、输出缓冲和命令队列;侧边栏左侧列出各连接,点击即可切换对应转录。
  • Agent 工具(独立可用):ssh_connect / ssh_exec / ssh_disconnect / ssh_status / ssh_list。
  • 记录持久化:本机会话内跨重启保留(写盘到 ~/.dsh/ssh-terminal-history.json),面板右上角「清空当前」只清理当前选中连接的记录。

多任务调用约定

并行任务必须保存 ssh_connect 返回的 connectionId,后续对同一主机的 ssh_exec、ssh_status、ssh_disconnect 都传入它。不同 connectionId 的命令可以同时执行;同一个连接内的命令会按调用顺序排队,避免写入同一个 SSH PTY 时互相串线。旧调用不传 ID 时仍兼容当前活动连接。

依赖

  • DSH web(dsh web / DSH Desktop)
  • dsh-better-sidebar(>= 0.12.0)——只有「侧边栏面板」需要它;Agent 的 SSH 工具不依赖 better-sidebar,单独装本插件即可用。

可选增强:未安装 better-sidebar 时,本插件只提供 Agent 的 SSH 工具(模型可连接、执行、断开,结果在对话里看到);不显示侧边栏「SSH 终端」面板。

安装

dsh plugin add github:sunzhyang1616-ui/dsh-ssh-terminal

装完硬刷新浏览器(Cmd/Ctrl+Shift+R)即可(Client 改动无需重启;仅 Host 改动才需重启 DSH)。

本地安装(源码 / link 方式)

1. 让 profile 使用本包:编辑 ~/.dsh/profiles/<profile>/package.json 的 dependencies 加入
   "dsh-ssh-terminal": "link:<本目录绝对路径>"
2. 挂载 bundle patch(package.json 已声明 "dsh": { "bundle": { "patch": "./cordis.patch.yml" } })
3. 在 profile 目录执行 pnpm install
4. 硬刷新浏览器(Cmd/Ctrl+Shift+R)

文件说明

| 文件 | 说明 | | --- | --- | | lib/index.js | Host 半:按 connectionId 启动和隔离多个 ssh -tt、维护转录、注册工具 + /ssh-terminal/api HTTP 路由 | | lib/client.js | Client 半:ctx.betterSidebar.registerTab 注册「SSH 终端」tab + 多连接列表和独立转录 UI | | src/client/index.tsx | Client 源码(tsdown 构建入口) | | tsdown.config.ts | client 构建配置 | | cordis.patch.yml | bundle 挂载补丁 |

限制 / 说明

  • SSH 连接为 Host 进程态,DSH 重启即断(连接不自动重连);操作记录会本机落盘、跨重启保留。
  • 密码仅本次调用内使用,不回显、不写入转录;推荐 identity(私钥文件)认证。
  • 若目标 DSH 版本对已安装插件不暴露 harness,Host 已改用 ctx.tools.register + webServer 路由,无需 harness。