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

@ssfxx44533/onebot-qq

v0.1.2

Published

OpenClaw channel plugin for NapCat / OneBot QQ

Readme

@ssfxx44533/onebot-qq

OpenClaw 原生 ChannelPlugin,直接把 NapCat / OneBot QQ 接到 OpenClaw。

设计目标:

  • 不再做独立 bridge + main + cron 的拼装服务
  • 不在接入层持有模型 API token
  • QQ 入站消息直接进入 OpenClaw 原生 session / reply pipeline
  • 出站统一走 OpenClaw channel 能力,支持文本、图片、音频、视频、文件

当前范围

已实现:

  • NapCat WebSocket 长连接与自动重连(指数退避重连)
  • QQ 私聊入站
  • QQ 群聊入站,默认要求 @机器人
  • OpenClaw 原生 session 路由与自动回复分发
  • DM pairing 审批流
  • 入站图片 / 音频 / 视频自动缓存到本地媒体目录
  • 入站文件附件元数据提取(file / onlinefile
  • 文本回复(超长自动分块,默认 1200 字)
  • 图片 / 音频 / 视频消息发送
  • 普通文件上传
  • 基础 allowFrom / groupAllowFrom / dmPolicy / groupPolicy
  • per-group requireMention / systemPrompt / allowFrom

暂未实现:

  • OneBot 反向 HTTP webhook 模式
  • 多账号复杂编排

安装

本地开发链接:

openclaw plugins install -l /root/openclaw-onebot-qq
openclaw plugins enable onebot-qq
openclaw gateway restart

后续发布到 npm 后:

openclaw plugins install @ssfxx44533/onebot-qq
openclaw plugins enable onebot-qq
openclaw gateway restart

配置

最小配置:

{
  channels: {
    "onebot-qq": {
      enabled: true,
      wsUrl: "ws://localhost:3001/?access_token=napcat_ws"
    }
  },
  plugins: {
    entries: {
      "onebot-qq": {
        enabled: true
      }
    }
  }
}

常用配置:

{
  channels: {
    "onebot-qq": {
      enabled: true,
      wsUrl: "ws://localhost:3001/?access_token=napcat_ws",
      selfId: "3546821676",
      requireMention: true,
      dmPolicy: "pairing",
      mediaMaxMb: 20,
      groupPolicy: "open",
      allowFrom: ["123456789"],
      groupAllowFrom: ["123456789"],
      groups: {
        "987654321": {
          requireMention: true,
          systemPrompt: "这是内部群,优先简洁回复。"
        }
      }
    }
  }
}

出站目标格式

  • 私聊:直接填 QQ 号,例如 123456789
  • 私聊:也可以用 qq:123456789private:123456789
  • 群聊:用 group:987654321

开发检查

cd /root/openclaw-onebot-qq
npm test
npm run check

兼容性说明

当前 OpenClaw 插件安装器只会对插件 package.json 里的 dependencies 执行隔离目录内的 npm install。因此本插件显式声明了 openclaw 运行时依赖,避免首次安装后出现 Cannot find module 'openclaw/plugin-sdk/... 这类宿主 SDK 解析失败。