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

@xuanmiss-npm/dingtalk

v0.1.4

Published

OpenClaw DingTalk (钉钉) channel plugin - Stream mode

Readme

@xuanmiss-npm/dingtalk

OpenClaw 钉钉 (DingTalk) 渠道插件 - 支持 Stream 模式接入。

安装

openclaw plugins install @xuanmiss-npm/dingtalk


### 从本地源码安装
# 或使用 link 模式(不复制文件,适合开发)
openclaw plugins install -l ./extensions/dingtalk

前置条件

  1. 钉钉开放平台 创建一个企业内部应用/机器人
  2. 获取以下凭证:
    • Client ID (AppKey)
    • Client Secret (AppSecret)
    • Robot Code (机器人 Code,可选,默认使用 Client ID)

配置

使用环境变量(推荐用于默认账户)

export DINGTALK_CLIENT_ID="your-client-id"
export DINGTALK_CLIENT_SECRET="your-client-secret"
export DINGTALK_ROBOT_CODE="your-robot-code"  # 可选

使用配置文件

在 OpenClaw 配置文件中添加:

{
  channels: {
    dingtalk: {
      enabled: true,
      clientId: "your-client-id",
      clientSecret: "your-client-secret",
      robotCode: "your-robot-code",  // 可选
      dmPolicy: "pairing",  // "open" | "allowlist" | "pairing"
      groupPolicy: "allowlist",  // "open" | "allowlist"
    },
  },
}

消息策略

DM(私聊)策略

  • pairing(默认):未知发送者需要通过配对码验证
  • allowlist:仅允许 allowFrom 列表中的用户
  • open:允许所有用户

Group(群聊)策略

  • allowlist(默认):需要 @机器人 才会响应
  • open:响应所有消息(需要 @机器人)

多账户配置

支持配置多个钉钉机器人账户:

{
  channels: {
    dingtalk: {
      accounts: {
        default: {
          name: "主机器人",
          clientId: "client-id-1",
          clientSecret: "secret-1",
        },
        alerts: {
          name: "告警机器人",
          clientId: "client-id-2",
          clientSecret: "secret-2",
        },
      },
    },
  },
}

配对验证

默认情况下,新用户需要通过配对验证:

# 查看待验证的配对请求
openclaw pairing list dingtalk

# 批准配对请求
openclaw pairing approve dingtalk <CODE>

发送消息

通过 CLI 发送消息:

# 发送到用户
openclaw message send dingtalk user:<userId> "Hello!"

# 发送到群聊
openclaw message send dingtalk <conversationId> "Hello group!"

故障排查

常见问题

  1. 无法连接

    • 检查 Client ID 和 Client Secret 是否正确
    • 确认机器人已在钉钉开放平台启用
  2. 群聊无响应

    • 确保机器人已被添加到群聊
    • 确认消息中 @了机器人
    • 检查 groupPolicy 配置
  3. 私聊无响应

    • 检查 dmPolicy 配置
    • 如果是 pairing 模式,确认用户已完成配对验证

相关链接

许可证

MIT