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-plugin-sub2api

v0.1.2

Published

DSH plugin: Sub2API gateway in the settings sidebar — credentials, connection status, MCP tool-profile slider (readonly/readwrite/full), logout, and automatic MCP registration. Broad DSH compatibility declared; real support self-checked at runtime.

Readme

dsh-plugin-sub2api

DSH 插件:在设置侧边栏里填 Sub2API 网关地址 + 管理员账号密码,其余全自动 ✓

  • 依赖核心包 sub2api-mcp(所有 MCP 能力都在那里 ✓ 本插件只是 DSH 包装层 ✓)
  • 对外声明支持所有 DSH 版本(宽 peer 范围 ✓)
  • 内部运行时能力自检(src/host/capabilities.js ✓)→ 真实支持度分三档:
    full      凭据存储 + 设置页插槽 + MCP 注入点 全部可用 ✓
    degraded  缺 1~2 项 → 对应功能降级(仍可用 ✓)
    minimal   缺 3 项以上 → 仅宿主兜底 + 打印 CLI 命令 ✓

当前状态(如实标注 ⚠️)

| 部分 | 状态 | |---|---| | src/host/capabilities.js 能力自检 | ✅ 已完成,三档判定双向测试通过 ✓ | | src/host/index.js 宿主入口 | ✅ 已完成(apply + 降级 + 生命周期清理 ✓) | | src/host/register.js MCP 注册适配 | ✅ 已完成(API → 配置文件 → 打印命令 三级降级 ✓) | | src/host/doctor.js 自检命令 | ✅ 已完成(node src/host/doctor.js ✓) | | src/host/profile.js 档位常量 | ✅ 与核心包 DEFAULT_TOOL_PROFILE 同源(双通道 import ✓) | | lib/client.js 设置页 UI | ✅ 已装载联调(唯一客户端源;src/client/ 死码已删除 ✓) |

命令

node src/host/doctor.js          # 能力自检报告(在 DSH 内外都能跑)

设计文档

见 docs/PLUGIN-DESIGN.md(含分层、决策记录、兼容策略 ✓)

版本记录

| 版本 | 主要内容 | |---|---| | 0.1.2 | 删除无构建链且无人引用的 src/client/ 死码(lib/client.js 为唯一客户端源);默认档位改从核心包 DEFAULT_TOOL_PROFILE 同源引用(新增 src/host/profile.js);localStorage 不再回填密码;去掉两处失效的写死绝对路径 | | 0.1.1 | 修三个线上 bug:inject 限制、空响应、档位不回写 | | 0.1.0 | 首个发布:设置页 + 凭据托管 + 自动注册 + 能力自检三级降级 |

发布顺序:先 packages/sub2api-mcp(核心),再本包;两包版本号保持同步。