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

openclaw-custom-bot

v1.0.10

Published

OpenClaw Channel 插件:通过 WebSocket 连接 Custom Bot Server,将 AI Agent 接到自有平台

Readme

openclaw-custom-bot 插件

OpenClaw 的自定义 Bot 通道插件,通过 WebSocket 连接到你的 Custom Bot Server,让 OpenClaw AI Agent 可以接入任意外部平台(企业 IM、机器人框架、自建系统等)。

功能概览

  • WebSocket 通道:使用 clientId 作为 token 连接中继服务 wss://relay.echoclaw.me/ws/gateway
  • 多 Bot 绑定:一个 OpenClaw 实例可以被多个 Bot 绑定(通过 clientId
  • 双向消息收发:支持单聊 / 群聊消息,支持文本 + 媒体 URL
  • 无侵入部署:OpenClaw 侧只需安装插件并配置服务端 URL

安装

在有 OpenClaw CLI 的环境中:

openclaw plugins install openclaw-custom-bot

开发模式(本仓库内调试):

cd packages/shared && npm install && npm run build
cd ../custom-bot-plugin && npm install && npm run build
openclaw plugins install -l $(pwd)

卸载

如果不再需要该通道插件,可以在 OpenClaw 中执行:

openclaw config unset channels.openclaw-custom-bot
openclaw plugins uninstall openclaw-custom-bot

配置

在 OpenClaw 配置中设置插件的服务端地址(指向你的 Custom Bot Server):

openclaw config set channels.openclaw-custom-bot.accounts.default.enabled true
openclaw config set plugins.entries.openclaw-custom-bot.config.server_url ws://localhost:3100

插件会自动:

  • 在本地 ~/.openclaw/custom-bot-client-id 生成并持久化一个 openclaw_clientId
  • 作为 WebSocket token 连接中继服务

提示clientId 会在插件启动日志里打印,注册 Bot 时需要用到。

运行机制概览

  • 启动时调用 getOrCreateClientId
    • 读取或创建 ~/.openclaw/custom-bot-client-id
  • 从 OpenClaw 全局配置中读取 plugins.entries.custom-bot.config.server_url
  • 使用 WsClient 连接到中继服务,并监听来自 Bot Server 的用户消息
  • 收到消息后,通过 OpenClaw 的 channel.reply 体系转交给 Agent 处理
  • Agent 的回复再通过 WebSocket 发回 Bot Server(type: "agent_reply"

详细的服务端 REST API 与 Webhook 对接方式,见仓库根目录下的 docs/BOT_SERVER_API.md