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

@yaoyuanchao/dingtalk

v1.7.2

Published

DingTalk channel plugin for ClawdBot/OpenClaw with Stream Mode support

Downloads

1,075

Readme

🤖 DingTalk Plugin for Clawdbot

npm License: MIT

让你的 AI 助手住进钉钉。无需公网域名,3 分钟搞定。

✨ 特性

  • 🚀 Stream 模式 — 无需公网域名,内网即可用
  • 💬 私聊 + 群聊 — 完整的消息收发支持
  • 🖼️ 富媒体 — 图片、语音、视频、文件接收
  • 思考中提示 — 自动显示处理状态,完成后消失
  • 🔒 访问控制 — 灵活的用户/群组白名单

🚀 快速开始

# 1. 安装
clawdbot plugins install @yaoyuanchao/dingtalk

# 2. 配置(交互式向导)
clawdbot onboard --channel dingtalk

# 3. 启动
clawdbot gateway

完事!去钉钉找机器人聊天吧。

⚙️ 配置示例

{
  "channels": {
    "dingtalk": {
      "enabled": true,
      "clientId": "dingXXXXXXXXXXXX",
      "clientSecret": "YOUR_SECRET",
      "dm": {
        "policy": "pairing",
        "allowFrom": ["YOUR_STAFF_ID"]
      }
    }
  }
}

| 配置项 | 说明 | 默认值 | |--------|------|--------| | clientId | 钉钉应用 AppKey | - | | clientSecret | 钉钉应用 AppSecret | - | | dm.policy | 私聊策略: pairing/open/disabled | pairing | | dm.allowFrom | 允许私聊的 staffId 列表 | [] | | groupPolicy | 群聊策略: allowlist/open/disabled | allowlist | | groupAllowlist | 允许的群 conversationId 列表 | [] | | requireMention | 群聊是否需要 @机器人 | true | | messageFormat | 消息格式: text/markdown/auto | auto | | typingIndicator | 显示"思考中"提示 | true | | longTextMode | 长文本处理: chunk/file | chunk | | groups.<id>.systemPrompt | 指定群的额外 system prompt | - | | groups.<id>.enabled | 是否启用该群(false = 完全忽略) | true | | groups.<id>.allowFrom | 该群只响应这些 staffId 的消息(支持 "*" 通配符) | [](不限制) |

🔑 获取凭证

  1. 打开 钉钉开发者平台
  2. 创建企业内部应用 → 添加机器人能力
  3. 消息接收模式选 Stream 模式
  4. 复制 AppKey (clientId) 和 AppSecret (clientSecret)
  5. 发布应用

💡 获取 staffId

首次私聊机器人时会返回:

Access denied. Your staffId: 050914XXXXXXXXX

把这个 ID 加到 dm.allowFrom 里,重启 gateway 即可。

🔒 群聊发言人限制(Per-group allowFrom)

可以让机器人在某个群里只响应指定用户的 @ 消息,其他人 @ 会被静默忽略。

{
  "channels": {
    "dingtalk": {
      "groups": {
        "<conversationId>": {
          "allowFrom": ["050914185922786044"]
        }
      }
    }
  }
}

获取 conversationId: 机器人收到群消息时日志里会打印,或通过钉钉开放平台 API 查询。

支持通配符: "allowFrom": ["*"] 表示允许所有人(等同于不设置)。

dm.allowFrom 的区别:

  • dm.allowFrom — 私聊白名单(全局)
  • groups.<id>.allowFrom — 指定群的发言人白名单(per-group)

📝 更新日志

v1.5.0 — 新增 Typing Indicator(思考中提示,自动撤回)

v1.4.x — 媒体消息支持、长文本文件发送

查看完整 CHANGELOG

📄 License

MIT