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

clawdbot-dingtalk

v0.4.8

Published

DingTalk (钉钉) channel plugin for Openclaw - enables AI agent messaging via DingTalk Stream API

Readme

clawdbot-dingtalk

DingTalk (钉钉) channel plugin for OpenClaw — enables AI agent messaging via DingTalk Stream API.

Installation

openclaw plugins install clawdbot-dingtalk

Plugin ID: clawdbot-dingtalk (used in plugins.allow / plugins.entries) NPM package: clawdbot-dingtalk

Configuration

Edit ~/.openclaw/openclaw.json:

{
  "extensions": ["clawdbot-dingtalk"],
  "plugins": {
    "entries": {
      "clawdbot-dingtalk": {
        "enabled": true,
        "config": {
          "aliyunMcp": {
            "timeoutSeconds": 60,
            "tools": {
              "webSearch": { "enabled": false },
              "codeInterpreter": { "enabled": false },
              "webParser": { "enabled": false },
              "wan26Media": { "enabled": false, "autoSendToDingtalk": true }
            }
          }
        }
      }
    }
  },
  "channels": {
    "clawdbot-dingtalk": {
      "enabled": true,
      "clientId": "your-dingtalk-client-id",
      "clientSecret": "your-dingtalk-client-secret"
    }
  },
  "models": {
    "providers": {
      "dashscope": {
        "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
        "apiKey": "sk-xxx",
        "api": "openai-completions",
        "models": [
          { "id": "qwen3-coder-plus", "contextWindow": 1000000, "maxTokens": 65536 }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": { "primary": "dashscope/qwen3-coder-plus" }
    }
  },
  "tools": {
    "web": {
      "search": {
        "enabled": false
      }
    }
  }
 }

Aliyun MCP Tools (Optional)

The plugin can register 4 built-in DashScope MCP tools, each with an independent switch:

  • web_search -> WebSearch
  • aliyun_code_interpreter -> code_interpreter_mcp
  • aliyun_web_parser -> WebParser
  • aliyun_wan26_media -> Wan26Media (supports auto-send back to current DingTalk session)

All four switches default to false (disabled).
When plugin web_search is disabled and tools.web.search.enabled=false, no web search tool is available.

API key priority (high -> low):

  1. DASHSCOPE_MCP_<TOOL>_API_KEY
  2. DASHSCOPE_API_KEY
  3. plugins.entries.clawdbot-dingtalk.config.aliyunMcp.apiKey

MCP Availability and Fallback Behavior

  • The agent uses availability-first behavior for all four built-in MCP tools.
  • If a tool is disabled / not activated in Bailian / missing API key, the agent should briefly explain this and continue with a practical fallback instead of stalling.
  • aliyun_web_parser works best with publicly accessible HTTP/HTTPS pages; login-only pages may fail.
  • aliyun_wan26_media can involve async task flow (submit + fetch result). The agent should not claim generation is complete before final success status is returned.

DashScope Thinking Mode (Native)

DashScope's enable_thinking is natively supported via the /think command. No proxy is needed.

To enable thinking mode for a session:

/think on

Or use one-shot thinking for a single message:

/t! on 请帮我分析这段代码

Thinking levels: off, minimal, low, medium, high, xhigh.
/think on maps to high (OpenClaw gateway "high").

Reasoning Visibility (Optional)

Use /reasoning on to show model reasoning in replies (rendered as subtle Markdown blockquotes).
Use /reasoning off to hide it.

Start Gateway

openclaw gateway

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | enabled | boolean | true | Enable/disable the channel | | clientId | string | - | DingTalk app Client ID (required) | | clientSecret | string | - | DingTalk app Client Secret (required) | | clientSecretFile | string | - | Path to file containing client secret | | replyMode | "text" | "markdown" | "text" | Message format | | maxChars | number | 1800 | Max characters per message chunk | | allowFrom | string[] | [] | Allowlist of sender IDs (empty = allow all) | | requirePrefix | string | - | Require messages to start with prefix | | isolateContextPerUserInGroup | boolean | false | When enabled, isolate session context per user in group chats | | responsePrefix | string | - | Prefix added to responses | | tableMode | "code" | "off" | "code" | Table rendering mode | | showToolStatus | boolean | false | Show tool execution status | | showToolResult | boolean | false | Show tool results | | blockStreaming | boolean | true | Enable/disable block streaming before final reply | | thinking | string | "off" | Thinking mode (off/minimal/low/medium/high) |

AI Card (高级互动卡片)

Enable AI Card capability via config:

{
  "channels": {
    "clawdbot-dingtalk": {
        "aiCard": {
          "enabled": true,
          "templateId": "your-template-id",
          "autoReply": true,
          "textParamKey": "content",
          "defaultCardData": {
            "title": "OpenClaw"
          },
          "callbackType": "STREAM",
          "updateThrottleMs": 800,
          "fallbackReplyMode": "markdown",
          "openSpace": {
            "imGroupOpenSpaceModel": {
            "openConversationId": "cidxxx"
          }
        }
      }
    }
  }
}

Notes:

  • callbackType should be STREAM to receive card callbacks over Stream API.
  • autoReply=true 会把普通文本回复映射成卡片变量。
  • blockStreaming=true(默认)会优先发送 block 增量;设为 false 时退化为 final-only(卡片仍可完成,但不增量)。
  • 新版默认会写入 msgContenttext 两个键;若配置了 textParamKey,还会同时写入该键,便于兼容不同模板变量命名。
  • Inbound AI card now uses a true streaming state machine:
    • create card instance
    • deliver to target openSpace
    • set flowStatus=2 (INPUTING)
    • push incremental chunks via PUT /v1.0/card/streaming
    • finalize with isFinalize=true and then set flowStatus=3 (FINISHED)
  • updateThrottleMs controls non-final streaming update frequency; final update always flushes.
  • If openSpace / openSpaceId is missing, card delivery falls back to text.

Required DingTalk permissions for streaming card:

  • Card.Streaming.Write
  • Card.Instance.Write
  • qyapi_robot_sendmsg

Chat Commands

The following chat switches are supported in DingTalk:

  • /new - Reset session context
  • /think [off|minimal|low|medium|high] - Set thinking level (/think on => high)
  • /t! [off|minimal|low|medium|high|on] <message> - One-shot thinking (does not persist)
  • /reasoning [on|off|stream] - Toggle reasoning visibility
  • /model <provider/model> - Switch model
  • /models [provider] - List providers or models under a provider
  • /verbose on|off|full - Toggle non-final updates (tool/block)

Notes:

  • Commands respect allowFrom and requirePrefix (in group chats).
  • Inline usage is supported (e.g., "帮我看看 /model openai/gpt-4o").

Multi-account Configuration

{
  "channels": {
    "clawdbot-dingtalk": {
      "accounts": {
        "bot1": {
          "enabled": true,
          "clientId": "client-id-1",
          "clientSecret": "secret-1",
          "name": "Support Bot"
        },
        "bot2": {
          "enabled": true,
          "clientId": "client-id-2",
          "clientSecret": "secret-2",
          "name": "Dev Bot"
        }
      }
    }
  }
}

Message Coalescing

Control how streaming messages are batched before sending:

{
  "channels": {
    "clawdbot-dingtalk": {
      "coalesce": {
        "enabled": true,
        "minChars": 800,
        "maxChars": 1200,
        "idleMs": 1000
      }
    }
  }
}

Running as a Service

Using systemd (Linux)

Create /etc/systemd/system/openclaw.service:

[Unit]
Description=OpenClaw Gateway
After=network.target

[Service]
Type=simple
User=root
ExecStart=/usr/bin/openclaw gateway
Restart=always
RestartSec=10
Environment=NODE_ENV=production

[Install]
WantedBy=multi-user.target
sudo systemctl enable openclaw
sudo systemctl start openclaw

Using PM2

npm install -g pm2
pm2 start "openclaw gateway" --name openclaw
pm2 save
pm2 startup

DingTalk Setup

  1. Go to DingTalk Open Platform
  2. Create an Enterprise Internal Application
  3. Enable "Robot" capability
  4. Get Client ID and Client Secret from "Credentials & Basic Info"
  5. Configure the robot's messaging subscription

License

MIT