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

@lanyingim/lanying

v1.0.9

Published

OpenClaw Lanying IM channel plugin

Downloads

780

Readme

OpenClaw Channel Plugin: Lanying

Lanying IM Channel for OpenClaw.

功能说明

  • 使用蓝莺 IM Web SDK 接入 OpenClaw
  • 支持登录、收发文本消息
  • 支持断线后的自动重连
  • 当前版本仅处理单聊消息(群聊事件会忽略)

安装

推荐使用 OpenClaw CLI 安装扩展。

从 npm 安装(推荐):

openclaw plugins install @lanyingim/lanying

从 GitHub 安装:

git clone https://github.com/maxim-top/openclaw-channel-lanying
openclaw plugins install ./openclaw-channel-lanying

配置

在 OpenClaw 配置中添加 channels.lanying

{
  "channels": {
    "lanying": {
      "enabled": true,
      "appId": "xxxxx",
      "username": "xxxx",
      "password": "xxxx",
      "allowManage": false,
      "dmPolicy": "open",
      "allowFrom": ["*"]
    }
  }
}

参数说明

  • enabled: 是否启用插件(可选,默认 false)。不设置时不会启用。
  • appId: 蓝莺应用 App ID
  • username: 登录名
  • password: 登录密码
  • allowManage: 是否允许通过自发消息触发配置变更(默认 false
  • dmPolicy: 私聊策略,常用 openpairing
  • allowFrom: 允许发起对话的来源列表。dmPolicy=open 且未设置时会自动补为 ["*"]

allowManage=true 时,若收到 fromto 都等于当前 selfId 的消息,且 ext 为:

{
  "openclaw": {
    "type": "config_patch",
    "raw": "PATCH STRING"
  }
}

插件会执行:

openclaw gateway call config.get --params '{}'
openclaw gateway call config.patch --params '{"raw":"PATCH STRING","baseHash":"xxxxxxx"}'

使用

配置生效并重启网关后:

  1. 用蓝莺账号向机器人账号发送私聊消息
  2. 插件收到消息后会转发给 OpenClaw
  3. OpenClaw 生成回复后由插件回发到蓝莺

日志与排查

插件日志前缀为 [lanying],常见关键日志:

  • attempting login
  • login success
  • sdk ready
  • inbound event: onRosterMessage
  • inbound message
  • reply dispatcher result
  • schedule reconnect
  • reconnect attempt start
  • reconnect attempt success

常见问题

  1. 登录成功但很快退出
  • 请确认 appId/username/password 正确
  • 观察是否出现 loginFail eventflooError event
  1. 收到消息但 OpenClaw 不回复
  • 当前只处理单聊;群聊不会触发回复
  • 历史消息、回环消息(from === to)和自发同步消息会被跳过
  • 检查是否出现 reply dispatcher skipped payloadreply dispatcher send failed
  1. 断线后未恢复
  • 检查是否有 disconnected / schedule reconnect / reconnect attempt 日志
  • 插件已内置指数退避重连(2s 起步,最大 30s)

目标格式(主动发送时)

插件支持以下目标写法:

  • user:<uid>
  • group:<gid>
  • 直接写 <uid>(按单聊处理)
  • 可带前缀 lanying:,例如 lanying:user:123456