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-1panel-ops

v0.1.0

Published

1Panel ops assistant for DeepSeek Harness: mount the whole server environment (probe/fs/shell) and drive 1Panel (containers/compose/apps/stats/deploy dsh)

Readme

dsh-1panel-ops

1Panel 运维助手:让部署在 Linux 服务器上的 DeepSeek Harness(DSH)挂载整台服务器环境,并直接驱动 1Panel 完成容器 / Compose / 应用商店 / 面板监控运维。

dsh-1panel-ops 是 DSH 生态中第一个把 服务器环境挂载1Panel OpenAPI 打通的运维插件(agent 工具形态,无 UI):

  • 挂载整机环境:突破 dsh 默认工作区限制,探测系统状态、读写任意路径文件、执行 shell 命令。
  • 驱动 1Panel:通过官方 OpenAPI(自动探测 2024 端口 + API Key 签名)管理容器、Compose、应用商店实例,读取面板监控,并支持一键把 dsh 本身装进服务器。
  • 安全审批:删除容器、卸载应用、compose 变更、shell 命令等破坏性操作走 dsh 内置 approval 机制。

工具

环境挂载(本机直连)

| 工具 | 说明 | | --- | --- | | env_probe | 系统探测:OS / 主机名 / CPU 负载 / 内存 / 磁盘 / 运行时长(只读) | | env_service | systemd 服务列表(无 systemd 时回退进程快照),可按名过滤(只读) | | env_port | 监听端口(ss / netstat),可按端口号过滤(只读) | | env_proc | Top 进程(按 CPU),可按命令关键字过滤(只读) | | env_log | 读日志尾部:文件路径走 tail,systemd 单元走 journalctl(只读) | | fs_read | 读任意路径文件(默认 200k 字符上限,支持 offset/length) | | fs_write | 写任意路径文件(自动创建父目录,支持 append) | | fs_list | 列任意路径目录(一层,目录优先) | | sh_exec | 整机 shell 命令执行(bash -lc,默认每次调用都需审批) |

1Panel 联动(OpenAPI)

| 工具 | 说明 | | --- | --- | | panel_detect | 探测 1Panel 是否运行、插件是否已配置,并给出安装/配 Key 指引(只读) | | panel_containers | 容器列表(名称/镜像/状态/端口),可按名与状态过滤(只读) | | panel_container_ops | 容器启停/重启/删除/暂停(变更操作需审批) | | panel_compose | Compose 项目:列表 / 日志 / up / down / start / stop / restart / remove(变更需审批) | | panel_apps | 应用商店:搜商店 / 已安装列表 / 安装 / 卸载 / 启停重启(变更需审批) | | panel_stats | 面板与主机监控:系统信息 / 当前节点状态 / Top CPU 与内存进程(只读) | | panel_deploy_dsh | 通过 1Panel 应用商店把 dsh 装到本服务器(需审批) |

安装

在目标 Linux 服务器上(dsh 已装好)执行:

dsh plugin --profile web add dsh-1panel-ops

需要 Node.js >= 22(目标平台为 Linux;环境工具依赖 systemctl / ss / ps / tail / journalctl)。

配置 1Panel API

  1. 登录 1Panel → 左下角用户菜单 → API 接口 → 启用并创建 API Key(IP 白名单加入你的客户端地址;测试可填 0.0.0.0/0)。
  2. 在 profile 的 cordis.patch.yml 中配置:
- id: panel-ops
  name: dsh-1panel-ops
  config:
    panelBaseUrl: https://127.0.0.1:2024   # 留空则自动探测
    panelApiKey: your-api-key              # 必填(未填时工具会提示)
    panelTimeoutMs: 15000                  # 1Panel 请求超时
    panelSkipTlsVerify: true               # 1Panel 使用自签证书,默认跳过校验
    panelDetectPort: 2024                  # 自动探测端口
    shExecApproval: ask                    # ask=每次 sh_exec 都审批;dangerous=仅危险命令审批
    shExecDangerousPatterns: []            # 额外危险命令正则(shExecApproval=dangerous 时生效)
  1. 重启实例。先用 panel_detect 验证连通性,再开始运维。

审批策略

| 工具 / 场景 | 是否审批 | | --- | --- | | 全部只读工具(env_*、fs_read、fs_list、panel_detect/containers/stats) | 否 | | fs_write | 否(如担心可后续加配置) | | sh_exec | 默认每次审批(shExecApproval: dangerous 时仅危险命令审批,内置 rm -rf/reboot/mkfs/dd/kill -9/强推等模式) | | panel_container_ops 的 stop/restart/remove/pause/unpause | 是 | | panel_compose 的 up/down/start/stop/restart/remove | 是 | | panel_apps 的 install/uninstall/start/stop/restart | 是 | | panel_deploy_dsh | 是 |

审批走 dsh 内置 approval 机制(tools/pre-execute + ApprovalService),无可用审批通道时 fail-closed 拒绝。

开发

pnpm install
pnpm test          # vitest 单元测试
pnpm run typecheck
pnpm run build     # tsdown -> lib/

说明:@deepseek-ai/* 的 rc 版本未发布到 npm registry,开发时通过 junction 链接本地 deepseek-harness 仓库的 node_modules/@deepseek-ai 提供类型。

许可证

MIT