@huo15/dingtalk-connector-pro 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +106 -384
- package/README.md +14 -18
- package/dist/index.js +17 -0
- package/dist/openclaw.plugin.json +498 -0
- package/dist/package.json +91 -0
- package/dist/src/channel.js +415 -0
- package/dist/src/config/accounts.js +182 -0
- package/dist/src/config/schema.js +135 -0
- package/dist/src/core/connection.js +561 -0
- package/dist/src/core/message-handler.js +1422 -0
- package/dist/src/core/provider.js +59 -0
- package/dist/src/core/state.js +49 -0
- package/dist/src/directory.js +53 -0
- package/dist/src/docs.js +209 -0
- package/dist/src/gateway-methods.js +360 -0
- package/dist/src/onboarding.js +337 -0
- package/dist/src/policy.js +15 -0
- package/dist/src/probe.js +144 -0
- package/dist/src/reply-dispatcher.js +435 -0
- package/dist/src/runtime.js +26 -0
- package/dist/src/sdk/helpers.js +237 -0
- package/dist/src/sdk/types.js +13 -0
- package/dist/src/secret-input.js +13 -0
- package/dist/src/services/media/audio.js +40 -0
- package/dist/src/services/media/chunk-upload.js +211 -0
- package/dist/src/services/media/common.js +120 -0
- package/dist/src/services/media/file.js +54 -0
- package/dist/src/services/media/image.js +59 -0
- package/dist/src/services/media/index.js +9 -0
- package/dist/src/services/media/video.js +133 -0
- package/dist/src/services/media.js +889 -0
- package/dist/src/services/messaging/card.js +234 -0
- package/dist/src/services/messaging/index.js +8 -0
- package/dist/src/services/messaging/send.js +85 -0
- package/dist/src/services/messaging.js +680 -0
- package/dist/src/targets.js +38 -0
- package/dist/src/types/index.js +1 -0
- package/dist/src/utils/agent.js +55 -0
- package/dist/src/utils/async.js +40 -0
- package/dist/src/utils/constants.js +24 -0
- package/dist/src/utils/http-client.js +33 -0
- package/dist/src/utils/index.js +7 -0
- package/dist/src/utils/logger.js +76 -0
- package/dist/src/utils/session.js +95 -0
- package/dist/src/utils/token.js +71 -0
- package/dist/src/utils/utils-legacy.js +393 -0
- package/index.ts +3 -3
- package/openclaw.plugin.json +1 -1
- package/package.json +16 -5
- package/src/channel.js +415 -0
- package/src/channel.ts +12 -12
- package/src/config/accounts.js +182 -0
- package/src/config/accounts.ts +2 -2
- package/src/config/schema.js +135 -0
- package/src/config/schema.ts +2 -2
- package/src/core/connection.js +561 -0
- package/src/core/connection.ts +2 -2
- package/src/core/message-handler.js +1422 -0
- package/src/core/message-handler.ts +12 -12
- package/src/core/provider.js +59 -0
- package/src/core/provider.ts +4 -4
- package/src/core/state.js +49 -0
- package/src/directory.js +53 -0
- package/src/directory.ts +2 -2
- package/src/docs.js +209 -0
- package/src/docs.ts +3 -3
- package/src/gateway-methods.js +360 -0
- package/src/gateway-methods.ts +5 -5
- package/src/onboarding.js +337 -0
- package/src/onboarding.ts +4 -4
- package/src/policy.js +15 -0
- package/src/policy.ts +1 -1
- package/src/probe.js +144 -0
- package/src/probe.ts +2 -2
- package/src/reply-dispatcher.js +435 -0
- package/src/reply-dispatcher.ts +9 -9
- package/src/runtime.js +26 -0
- package/src/sdk/helpers.js +237 -0
- package/src/sdk/helpers.ts +1 -1
- package/src/sdk/types.js +13 -0
- package/src/secret-input.js +13 -0
- package/src/secret-input.ts +1 -1
- package/src/services/media/audio.js +40 -0
- package/src/services/media/audio.ts +2 -2
- package/src/services/media/chunk-upload.js +211 -0
- package/src/services/media/chunk-upload.ts +2 -2
- package/src/services/media/common.js +120 -0
- package/src/services/media/common.ts +3 -3
- package/src/services/media/file.js +54 -0
- package/src/services/media/file.ts +2 -2
- package/src/services/media/image.js +59 -0
- package/src/services/media/image.ts +2 -2
- package/src/services/media/index.js +9 -0
- package/src/services/media/index.ts +6 -6
- package/src/services/media/video.js +133 -0
- package/src/services/media/video.ts +2 -2
- package/src/services/media.js +889 -0
- package/src/services/media.ts +12 -12
- package/src/services/messaging/card.js +234 -0
- package/src/services/messaging/card.ts +3 -3
- package/src/services/messaging/index.js +8 -0
- package/src/services/messaging/index.ts +3 -3
- package/src/services/messaging/send.js +85 -0
- package/src/services/messaging/send.ts +3 -3
- package/src/services/messaging.js +680 -0
- package/src/services/messaging.ts +8 -8
- package/src/targets.js +38 -0
- package/src/targets.ts +1 -1
- package/src/types/index.js +1 -0
- package/src/types/index.ts +1 -1
- package/src/utils/agent.js +55 -0
- package/src/utils/async.js +40 -0
- package/src/utils/constants.js +24 -0
- package/src/utils/http-client.js +33 -0
- package/src/utils/http-client.ts +1 -1
- package/src/utils/index.js +7 -0
- package/src/utils/index.ts +4 -4
- package/src/utils/logger.js +76 -0
- package/src/utils/session.js +95 -0
- package/src/utils/session.ts +1 -1
- package/src/utils/token.js +71 -0
- package/src/utils/token.ts +2 -2
- package/src/utils/utils-legacy.js +393 -0
- package/src/utils/utils-legacy.ts +8 -8
- package/CHANGELOG.md +0 -485
- package/SKILL.md +0 -40
- package/_meta.json +0 -4
- package/docs/AGENT_ROUTING.md +0 -335
- package/docs/DEAP_AGENT_GUIDE.en.md +0 -115
- package/docs/DEAP_AGENT_GUIDE.md +0 -115
- package/docs/images/dingtalk.svg +0 -1
- package/docs/images/image-1.png +0 -0
- package/docs/images/image-2.png +0 -0
- package/docs/images/image-3.png +0 -0
- package/docs/images/image-4.png +0 -0
- package/docs/images/image-5.png +0 -0
- package/docs/images/image-6.png +0 -0
- package/docs/images/image-7.png +0 -0
- package/install-beta.sh +0 -438
- package/install-npm.sh +0 -167
- package/tsconfig.json +0 -20
package/README.en.md
CHANGED
|
@@ -1,441 +1,168 @@
|
|
|
1
1
|
<div align="center">
|
|
2
|
-
<img
|
|
3
|
-
<h1>Official DingTalk OpenClaw Connector</h1>
|
|
4
|
-
<p>Connect DingTalk bots to OpenClaw Gateway with AI Card streaming and session management</p>
|
|
5
|
-
|
|
6
|
-
<p>
|
|
7
|
-
<a href="README.md">简体中文</a> •
|
|
8
|
-
<a href="CHANGELOG.md">Changelog</a>
|
|
9
|
-
</p>
|
|
2
|
+
<img src="https://tools.huo15.com/uploads/images/system/logo-colours.png" alt="huo15" width="120" />
|
|
10
3
|
</div>
|
|
11
4
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
## 📋 Table of Contents
|
|
15
|
-
|
|
16
|
-
- [Prerequisites](#prerequisites)
|
|
17
|
-
- [Quick Start](#quick-start)
|
|
18
|
-
- [Features](#features)
|
|
19
|
-
- [Configuration](#configuration)
|
|
20
|
-
- [Troubleshooting](#troubleshooting)
|
|
21
|
-
- [Advanced Topics](#advanced-topics)
|
|
22
|
-
- [DingTalk DEAP Agent Integration](docs/DEAP_AGENT_GUIDE.en.md)
|
|
23
|
-
- [License](#license)
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Prerequisites
|
|
28
|
-
|
|
29
|
-
Before you begin, ensure you have:
|
|
5
|
+
<div align="center">
|
|
30
6
|
|
|
31
|
-
|
|
7
|
+
**Breaking Information Silos. Driving Enterprise Growth with One System.**
|
|
8
|
+
**Accelerating Enterprise Users' Transition to Full-Scenario AI Robots.**
|
|
32
9
|
|
|
33
|
-
|
|
10
|
+
</div>
|
|
34
11
|
|
|
35
|
-
|
|
36
|
-
- **Installation**: Follow the official guide to install OpenClaw
|
|
37
|
-
- **Verify installation**:
|
|
38
|
-
```bash
|
|
39
|
-
openclaw gateway status
|
|
40
|
-
```
|
|
41
|
-
Expected output: `✓ Gateway is running on http://127.0.0.1:18789`
|
|
12
|
+
<div align="center">
|
|
42
13
|
|
|
43
|
-
|
|
14
|
+
| 🏫 Institution | 👨🏫 Instructor | 📧 Contact | 💬 QQ Group | 📺 Video |
|
|
15
|
+
|:-----------:|:--------:|:------------------:|:-----------:|:-----------------------------------:|
|
|
16
|
+
| Yixunzhiku | Job | support@huo15.com | 1093992108 | [📺 Bilibili](https://space.bilibili.com/400418085) |
|
|
44
17
|
|
|
45
|
-
|
|
46
|
-
- Official Website: https://www.dingtalk.com/
|
|
18
|
+
</div>
|
|
47
19
|
|
|
48
20
|
---
|
|
49
21
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
> 💡 **Goal**: Get your DingTalk bot working in ~5 minutes
|
|
53
|
-
|
|
54
|
-
### Operating System Support
|
|
55
|
-
|
|
56
|
-
- macOS / Linux: Use the default shell (zsh, bash, etc.).
|
|
57
|
-
- Windows:
|
|
58
|
-
- Recommended: **PowerShell** or **Windows Terminal**.
|
|
59
|
-
- OpenClaw config file path (default): `C:\Users\<YourUserName>\.openclaw\openclaw.json`.
|
|
60
|
-
|
|
61
|
-
Whenever you see `~/.openclaw/openclaw.json` below, it is equivalent to the above path on Windows.
|
|
62
|
-
|
|
63
|
-
### Step 1: Install the Plugin
|
|
64
|
-
|
|
65
|
-
#### Method A: Install via npm (Recommended)
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
openclaw plugins install @dingtalk-real-ai/dingtalk-connector
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
#### Method B: Install from Local Source
|
|
72
|
-
|
|
73
|
-
If you want to develop or modify the plugin, clone the repository first:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
# 1. Clone the plugin repository
|
|
77
|
-
git clone https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector.git
|
|
78
|
-
cd dingtalk-openclaw-connector
|
|
79
|
-
|
|
80
|
-
# 2. Install dependencies (required)
|
|
81
|
-
npm install
|
|
82
|
-
|
|
83
|
-
# 3. Install in link mode (changes take effect immediately)
|
|
84
|
-
openclaw plugins install -l .
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
#### Method C: Manual Installation
|
|
88
|
-
|
|
89
|
-
1. Download or copy this repository to `~/.openclaw/extensions/dingtalk-connector`.
|
|
90
|
-
2. Make sure it contains `index.ts`, `openclaw.plugin.json`, and `package.json`.
|
|
91
|
-
3. Run `npm install` in that directory to install dependencies.
|
|
92
|
-
|
|
93
|
-
#### Method D: China Mainland Installation (npm Mirror)
|
|
94
|
-
|
|
95
|
-
If `openclaw plugins install` gets stuck at `Installing plugin dependencies...` or fails with `npm install failed` due to network issues in China, you can specify a mirror registry for that install:
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
NPM_CONFIG_REGISTRY=https://registry.npmmirror.com openclaw plugins install @dingtalk-real-ai/dingtalk-connector
|
|
99
|
-
```
|
|
100
|
-
|
|
101
|
-
If the plugin is in a partially installed state (e.g., the extension directory exists but dependencies are incomplete), you can manually reinstall dependencies:
|
|
102
|
-
|
|
103
|
-
```bash
|
|
104
|
-
cd ~/.openclaw/extensions/dingtalk-connector
|
|
105
|
-
rm -rf node_modules package-lock.json
|
|
106
|
-
NPM_CONFIG_REGISTRY=https://registry.npmmirror.com npm install
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
To make the mirror permanent, set the default npm registry:
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
npm config set registry https://registry.npmmirror.com
|
|
113
|
-
```
|
|
22
|
+
<div align="center">
|
|
114
23
|
|
|
115
|
-
|
|
24
|
+
# 🔔 @huo15/dingtalk-openclaw-connector
|
|
116
25
|
|
|
117
|
-
|
|
118
|
-
registry=https://registry.npmmirror.com
|
|
119
|
-
```
|
|
26
|
+
**的火一五定制版钉钉 OpenClaw 连接器 | Huo15 Customized DingTalk Connector for OpenClaw**
|
|
120
27
|
|
|
121
|
-
**
|
|
122
|
-
|
|
123
|
-
openclaw
|
|
124
|
-
|
|
125
|
-
|
|
28
|
+
> **Author**: 青岛火一五信息科技有限公司 (Huo15 Information Technology)
|
|
29
|
+
> **Version**: v1.0.0
|
|
30
|
+
> **Based on**: [dingtalk-openclaw-connector](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector) v0.8.12
|
|
31
|
+
> **npm**: [@huo15/dingtalk-openclaw-connector](https://www.npmjs.com/package/@huo15/dingtalk-openclaw-connector)
|
|
32
|
+
> **Trigger**: 钉钉、钉钉连接器、dingtalk
|
|
126
33
|
|
|
127
34
|
---
|
|
128
35
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
#### 2.1 Create Application
|
|
132
|
-
|
|
133
|
-
1. Go to [DingTalk Open Platform](https://open-dev.dingtalk.com/)
|
|
134
|
-
2. Click **"Application Development"**
|
|
135
|
-
|
|
136
|
-

|
|
137
|
-
|
|
138
|
-
#### 2.2 Add Bot Capability
|
|
139
|
-
|
|
140
|
-
1. On the application details page, use the “one-click OpenClaw bot app” flow
|
|
36
|
+
</div>
|
|
141
37
|
|
|
142
|
-
|
|
38
|
+
## 一、Introduction | 简介
|
|
143
39
|
|
|
144
|
-
|
|
40
|
+
火一五定制版钉钉 OpenClaw 连接器,基于官方 dingtalk-openclaw-connector v0.8.12 定制,支持 huo15-memory-evolution 记忆系统集成和 Claude Code 能力增强。
|
|
145
41
|
|
|
146
|
-
|
|
147
|
-
2. Copy your **AppKey** (Client ID)
|
|
148
|
-
3. Copy your **AppSecret** (Client Secret)
|
|
42
|
+
Huo15 customized DingTalk connector for OpenClaw, based on official dingtalk-openclaw-connector v0.8.12, with huo15-memory-evolution integration and Claude Code capability enhancements.
|
|
149
43
|
|
|
150
|
-
|
|
44
|
+
---
|
|
151
45
|
|
|
152
|
-
|
|
46
|
+
## 二、Core Features | 核心特性
|
|
153
47
|
|
|
154
|
-
|
|
48
|
+
| Feature | Description |
|
|
49
|
+
|---------|-------------|
|
|
50
|
+
| 🤖 **Memory System** | huo15-memory-evolution integration |
|
|
51
|
+
| 💬 **AI Card Streaming** | Typewriter effect with real-time streaming |
|
|
52
|
+
| 🔒 **Session Persistence** | Multi-turn context preservation |
|
|
53
|
+
| 🎯 **Session Isolation** | Separate sessions for DMs / groups |
|
|
54
|
+
| ⏰ **Auto Session Reset** | 30 min inactivity timeout |
|
|
55
|
+
| 📁 **Rich Media** | JPEG/PNG image + file attachments |
|
|
56
|
+
| 🎵 **Audio Messages** | mp3, wav, amr, ogg support |
|
|
57
|
+
| 📄 **DingTalk Docs API** | Create, append, search, list docs |
|
|
58
|
+
| 🔗 **Multi-Agent Routing** | Multiple bots → multiple agents |
|
|
155
59
|
|
|
156
60
|
---
|
|
157
61
|
|
|
158
|
-
|
|
62
|
+
## 三、Quick Start | 快速开始
|
|
159
63
|
|
|
160
|
-
|
|
64
|
+
### 3.1 Prerequisites
|
|
161
65
|
|
|
162
|
-
|
|
66
|
+
- OpenClaw Gateway installed and running
|
|
67
|
+
- DingTalk enterprise account
|
|
163
68
|
|
|
164
|
-
|
|
69
|
+
### 3.2 Install
|
|
165
70
|
|
|
166
71
|
```bash
|
|
167
|
-
|
|
168
|
-
|
|
72
|
+
# Clone the fork
|
|
73
|
+
git clone https://github.com/zhaobod1/huo15-dingtalk-openclaw-connector.git
|
|
74
|
+
cd huo15-dingtalk-openclaw-connector
|
|
169
75
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
76
|
+
# Install dependencies
|
|
77
|
+
npm install
|
|
78
|
+
|
|
79
|
+
# Link mode (dev-friendly, changes take effect immediately)
|
|
80
|
+
openclaw plugins install -l .
|
|
81
|
+
```
|
|
173
82
|
|
|
174
|
-
|
|
83
|
+
### 3.3 Configure
|
|
175
84
|
|
|
176
|
-
|
|
85
|
+
1. Get DingTalk credentials at [DingTalk Open Platform](https://open-dev.dingtalk.com/)
|
|
86
|
+
- Create an internal app → get **AppKey** and **AppSecret**
|
|
177
87
|
|
|
178
|
-
|
|
179
|
-
- Windows: `C:\Users\<YourUserName>\.openclaw\openclaw.json`
|
|
88
|
+
2. Edit `~/.openclaw/openclaw.json`:
|
|
180
89
|
|
|
181
90
|
```json
|
|
182
91
|
{
|
|
183
92
|
"channels": {
|
|
184
93
|
"dingtalk-connector": {
|
|
185
94
|
"enabled": true,
|
|
186
|
-
"clientId": "
|
|
187
|
-
"clientSecret": "
|
|
95
|
+
"clientId": "yourAppKey",
|
|
96
|
+
"clientSecret": "yourAppSecret"
|
|
188
97
|
}
|
|
189
98
|
}
|
|
190
99
|
}
|
|
191
100
|
```
|
|
192
101
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
---
|
|
196
|
-
|
|
197
|
-
### Step 4: Restart and Test
|
|
102
|
+
### 3.4 Restart & Verify
|
|
198
103
|
|
|
199
104
|
```bash
|
|
200
|
-
# Restart OpenClaw Gateway
|
|
201
105
|
openclaw gateway restart
|
|
202
|
-
|
|
203
|
-
# Watch logs in real-time
|
|
106
|
+
openclaw plugins list
|
|
204
107
|
openclaw logs --follow
|
|
205
108
|
```
|
|
206
109
|
|
|
207
|
-
**Test your bot**:
|
|
208
|
-
1. Open DingTalk app
|
|
209
|
-
2. Find your bot in the contact list
|
|
210
|
-
3. Send a message: `Hello`
|
|
211
|
-
4. You should receive a response within 10 seconds
|
|
212
|
-
|
|
213
|
-
---
|
|
214
|
-
|
|
215
|
-
## Features
|
|
216
|
-
|
|
217
|
-
### ✅ Core Features
|
|
218
|
-
|
|
219
|
-
- **AI Card Streaming** - Typewriter-like replies with real-time streaming
|
|
220
|
-
- **Session Management** - Multi-turn conversations with context preservation
|
|
221
|
-
- **Session Isolation** - Separate sessions for DMs, groups, and different groups
|
|
222
|
-
- **Auto Session Reset** - Automatic new session after 30 minutes of inactivity
|
|
223
|
-
- **Manual Session Reset** - Send `/new` or `新会话` to clear conversation history
|
|
224
|
-
- **Image Auto-Upload** - Local image paths automatically uploaded to DingTalk
|
|
225
|
-
- **Proactive Messaging** - Send messages to users or groups programmatically
|
|
226
|
-
- **Rich Media Reception** - Receive and process JPEG/PNG images, pass to vision models
|
|
227
|
-
- **File Attachment Extraction** - Parse .docx, .pdf, text files, and binary files
|
|
228
|
-
- **Audio Message Support** - Send audio messages in multiple formats (mp3, wav, amr, ogg)
|
|
229
|
-
- **DingTalk Docs API** - Create, append, search, and list DingTalk documents
|
|
230
|
-
- **Multi-Agent Routing** - Connect multiple bots to different agents for specialized services
|
|
231
|
-
- **Markdown Table Conversion** - Auto-convert Markdown tables to DingTalk-compatible format
|
|
232
|
-
- **Async Mode** - Immediate acknowledgment with background processing (optional)
|
|
233
|
-
|
|
234
110
|
---
|
|
235
111
|
|
|
236
|
-
##
|
|
237
|
-
|
|
238
|
-
### Basic Configuration
|
|
239
|
-
|
|
240
|
-
| Option | Environment Variable | Description |
|
|
241
|
-
|--------|---------------------|-------------|
|
|
242
|
-
| `clientId` | — | DingTalk AppKey |
|
|
243
|
-
| `clientSecret` | — | DingTalk AppSecret |
|
|
244
|
-
|
|
245
|
-
### Session Management
|
|
246
|
-
|
|
247
|
-
| Option | Default | Description |
|
|
248
|
-
|--------|---------|-------------|
|
|
249
|
-
| `separateSessionByConversation` | `true` | Separate sessions for DMs/groups |
|
|
250
|
-
| `groupSessionScope` | `group` | Group session scope: `group` (shared) or `group_sender` (per-user) |
|
|
251
|
-
| `sharedMemoryAcrossConversations` | `false` | Share memory across different conversations |
|
|
252
|
-
|
|
253
|
-
### Session routing policies (`pmpolicy` / `groupPolicy`)
|
|
254
|
-
|
|
255
|
-
Both session routing/message policy options (including `pmpolicy` and `groupPolicy`) are supported now, so you **do not need to remove** them from existing configurations.
|
|
112
|
+
## 四、Features | 功能列表
|
|
256
113
|
|
|
257
|
-
|
|
114
|
+
### 4.1 Basic Features
|
|
258
115
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
116
|
+
- **AI Card Streaming** — Real-time typewriter replies
|
|
117
|
+
- **Session Management** — Multi-turn context
|
|
118
|
+
- **Session Isolation** — DMs / groups / group_sender per user
|
|
119
|
+
- **Auto Session Reset** — `/new` or 30 min inactivity
|
|
120
|
+
- **Image Auto-Upload** — Local images → DingTalk CDN
|
|
121
|
+
- **Rich Media Reception** — JPEG/PNG → vision models
|
|
122
|
+
- **File Attachments** — .docx, .pdf, text, binary
|
|
123
|
+
- **Audio Messages** — mp3, wav, amr, ogg
|
|
124
|
+
- **DingTalk Docs API** — Create, append, search, list
|
|
125
|
+
- **Multi-Agent Routing** — Multiple bots → multiple agents
|
|
126
|
+
- **Markdown Tables** — Auto-convert to DingTalk format
|
|
265
127
|
|
|
266
128
|
---
|
|
267
129
|
|
|
268
|
-
##
|
|
269
|
-
|
|
270
|
-
### Bot Not Responding
|
|
271
|
-
|
|
272
|
-
**Symptoms**: Bot doesn't reply to messages
|
|
273
|
-
|
|
274
|
-
**Solutions**:
|
|
275
|
-
1. Check plugin status: `openclaw plugins list`
|
|
276
|
-
2. Check gateway status: `openclaw gateway status`
|
|
277
|
-
3. Check logs: `openclaw logs --follow`
|
|
278
|
-
4. Verify the app is published/enabled in DingTalk Open Platform
|
|
130
|
+
## 五、Development Roadmap | 开发计划
|
|
279
131
|
|
|
280
|
-
|
|
132
|
+
### 5.1 Huo15 Memory Evolution Integration
|
|
281
133
|
|
|
282
|
-
|
|
134
|
+
- [ ] Integrate huo15-memory-evolution
|
|
135
|
+
- [ ] Session memory persistence
|
|
136
|
+
- [ ] user / feedback / project / reference memory types
|
|
137
|
+
- [ ] Auto Capture for highlights
|
|
138
|
+
- [ ] Dream Agent daily log summarization
|
|
283
139
|
|
|
284
|
-
|
|
140
|
+
### 5.2 Claude Code Capability Integration
|
|
285
141
|
|
|
286
|
-
|
|
142
|
+
- [ ] findRelevantMemories smart retrieval
|
|
143
|
+
- [ ] CLAUDE.md project-level injection
|
|
144
|
+
- [ ] Manifest pre-inject
|
|
145
|
+
- [ ] Forked extraction
|
|
146
|
+
- [ ] Before recommending rules
|
|
287
147
|
|
|
288
148
|
---
|
|
289
149
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
**Symptoms**: Logs show "Request failed with status code 400"
|
|
293
|
-
|
|
294
|
-
**Common Causes**:
|
|
295
|
-
|
|
296
|
-
| Cause | Solution |
|
|
297
|
-
|-------|----------|
|
|
298
|
-
| App not published | DingTalk Open Platform → Version Management → Publish |
|
|
299
|
-
| Invalid credentials | Check `clientId`/`clientSecret` for typos or extra spaces |
|
|
300
|
-
| Not Stream mode | Verify bot is configured for Stream mode (not Webhook) |
|
|
301
|
-
| IP whitelist | Check if the app has IP whitelist restrictions |
|
|
150
|
+
## 六、Comparison with Official | 与官方版对比
|
|
302
151
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
152
|
+
| Feature | Official | Huo15 Custom |
|
|
153
|
+
|---------|----------|-------------|
|
|
154
|
+
| Basic features | ✅ | ✅ |
|
|
155
|
+
| Memory system integration | ❌ | ✅ huo15-memory-evolution |
|
|
156
|
+
| Claude Code capability | ❌ | ✅ WIP |
|
|
157
|
+
| AI Card streaming | ✅ | ✅ |
|
|
158
|
+
| Multi-agent routing | ✅ | ✅ |
|
|
306
159
|
|
|
307
160
|
---
|
|
308
161
|
|
|
309
|
-
##
|
|
162
|
+
## 七、Project Structure | 项目结构
|
|
310
163
|
|
|
311
|
-
### Multi-Agent Configuration
|
|
312
|
-
|
|
313
|
-
Configure multiple bots connected to different agents:
|
|
314
|
-
|
|
315
|
-
```json5
|
|
316
|
-
{
|
|
317
|
-
"agents": {
|
|
318
|
-
"list": [
|
|
319
|
-
{
|
|
320
|
-
"id": "ding-bot1",
|
|
321
|
-
"name": "Customer Service Bot",
|
|
322
|
-
"model": "your-model-config",
|
|
323
|
-
"workspace": "~/.openclaw/workspace-bot1",
|
|
324
|
-
"identity": {
|
|
325
|
-
"name": "Service Assistant",
|
|
326
|
-
"theme": "customer service",
|
|
327
|
-
"emoji": "🤝"
|
|
328
|
-
}
|
|
329
|
-
// Other agent configurations...
|
|
330
|
-
},
|
|
331
|
-
{
|
|
332
|
-
"id": "ding-bot2",
|
|
333
|
-
"name": "Technical Support Bot",
|
|
334
|
-
"model": "your-model-config",
|
|
335
|
-
"workspace": "~/.openclaw/workspace-bot2",
|
|
336
|
-
"identity": {
|
|
337
|
-
"name": "Tech Expert",
|
|
338
|
-
"theme": "technical support",
|
|
339
|
-
"emoji": "🔧"
|
|
340
|
-
}
|
|
341
|
-
// Other agent configurations...
|
|
342
|
-
}
|
|
343
|
-
]
|
|
344
|
-
},
|
|
345
|
-
"channels": {
|
|
346
|
-
"dingtalk-connector": {
|
|
347
|
-
"enabled": true,
|
|
348
|
-
"accounts": {
|
|
349
|
-
"bot1": {
|
|
350
|
-
"enabled": true,
|
|
351
|
-
"clientId": "ding_bot1_app_key",
|
|
352
|
-
"clientSecret": "bot1_secret"
|
|
353
|
-
},
|
|
354
|
-
"bot2": {
|
|
355
|
-
"enabled": true,
|
|
356
|
-
"clientId": "ding_bot2_app_key",
|
|
357
|
-
"clientSecret": "bot2_secret"
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
},
|
|
362
|
-
"bindings": [
|
|
363
|
-
{
|
|
364
|
-
"agentId": "ding-bot1",
|
|
365
|
-
"match": {
|
|
366
|
-
"channel": "dingtalk-connector",
|
|
367
|
-
"accountId": "bot1"
|
|
368
|
-
}
|
|
369
|
-
},
|
|
370
|
-
{
|
|
371
|
-
"agentId": "ding-bot2",
|
|
372
|
-
"match": {
|
|
373
|
-
"channel": "dingtalk-connector",
|
|
374
|
-
"accountId": "bot2"
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
]
|
|
378
|
-
}
|
|
379
|
-
```
|
|
380
|
-
|
|
381
|
-
For more details, see [OpenClaw Multi-Agent Configuration Guide](https://gist.github.com/smallnest/c5c13482740fd179e40070e620f66a52).
|
|
382
|
-
|
|
383
|
-
---
|
|
384
|
-
|
|
385
|
-
### Session Commands
|
|
386
|
-
|
|
387
|
-
Users can send the following commands to start a fresh session:
|
|
388
|
-
|
|
389
|
-
- `/new`, `/reset`, `/clear`
|
|
390
|
-
- `新会话`, `重新开始`, `清空对话`
|
|
391
|
-
|
|
392
|
-
---
|
|
393
|
-
|
|
394
|
-
### DingTalk Docs via MCP (`docs.*`)
|
|
395
|
-
|
|
396
|
-
DingTalk Docs capabilities (`docs.*`, including `docs.create` / `docs.append` / `docs.search` / `docs.list` / `docs.read`) require MCP (Model Context Protocol) to provide the underlying tools. To enable `docs.*`, install and enable the corresponding MCP Server/Tool in the OpenClaw Gateway/Agent.
|
|
397
|
-
|
|
398
|
-
- **Where to get MCP Server/Tool**: via the [DingTalk MCP Marketplace](https://mcp.dingtalk.com/) (or your team’s internal MCP marketplace). You can also use a third-party marketplace to source an equivalent “DingTalk Docs Read / DingTalk Docs Reader” capability and connect it to OpenClaw.
|
|
399
|
-
- **Where to configure**: usually at the **Gateway or Agent tool configuration** level (not in this connector).
|
|
400
|
-
- **How it takes effect**: restart the Gateway and ensure the tool is exposed to the target agent.
|
|
401
|
-
|
|
402
|
-
References (OpenClaw configuration docs):
|
|
403
|
-
- `https://docs.openclaw.ai/configuration`
|
|
404
|
-
- `https://docs.openclaw.ai/gateway/configuration-reference`
|
|
405
|
-
|
|
406
|
-
Create and manage DingTalk documents from your agent:
|
|
407
|
-
|
|
408
|
-
```javascript
|
|
409
|
-
// Create document
|
|
410
|
-
dingtalk-connector.docs.create({
|
|
411
|
-
spaceId: "your-space-id",
|
|
412
|
-
title: "Test Document",
|
|
413
|
-
content: "# Test Content"
|
|
414
|
-
})
|
|
415
|
-
|
|
416
|
-
// Append content
|
|
417
|
-
dingtalk-connector.docs.append({
|
|
418
|
-
docId: "your-doc-id",
|
|
419
|
-
markdownContent: "\n## Appended Content"
|
|
420
|
-
})
|
|
421
|
-
|
|
422
|
-
// Search documents
|
|
423
|
-
dingtalk-connector.docs.search({
|
|
424
|
-
keyword: "search keyword"
|
|
425
|
-
})
|
|
426
|
-
|
|
427
|
-
// List documents
|
|
428
|
-
dingtalk-connector.docs.list({
|
|
429
|
-
spaceId: "your-space-id"
|
|
430
|
-
})
|
|
431
164
|
```
|
|
432
|
-
|
|
433
|
-
---
|
|
434
|
-
|
|
435
|
-
## Project Structure
|
|
436
|
-
|
|
437
|
-
```
|
|
438
|
-
dingtalk-openclaw-connector/
|
|
165
|
+
huo15-dingtalk-openclaw-connector/
|
|
439
166
|
├── src/
|
|
440
167
|
│ ├── core/ # Core connector logic
|
|
441
168
|
│ ├── services/ # DingTalk API services
|
|
@@ -444,36 +171,31 @@ dingtalk-openclaw-connector/
|
|
|
444
171
|
├── docs/
|
|
445
172
|
│ └── images/ # Documentation images
|
|
446
173
|
├── openclaw.plugin.json # Plugin manifest
|
|
447
|
-
├── package.json
|
|
174
|
+
├── package.json # npm dependencies
|
|
448
175
|
└── LICENSE
|
|
449
176
|
```
|
|
450
177
|
|
|
451
178
|
---
|
|
452
179
|
|
|
453
|
-
##
|
|
180
|
+
## 八、Related Links | 相关链接
|
|
454
181
|
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
| `pdf-parse` | PDF document parsing |
|
|
182
|
+
- **Official**: https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector
|
|
183
|
+
- **Fork**: https://github.com/zhaobod1/huo15-dingtalk-openclaw-connector
|
|
184
|
+
- **OpenClaw**: https://openclaw.ai
|
|
185
|
+
- **Huo15 Memory**: https://clawhub.ai/jobzhao15/huo15-memory-evolution
|
|
186
|
+
- **DingTalk Platform**: https://open-dev.dingtalk.com/
|
|
461
187
|
|
|
462
188
|
---
|
|
463
189
|
|
|
464
|
-
|
|
190
|
+
<div align="center">
|
|
465
191
|
|
|
466
|
-
|
|
192
|
+
**Company**: 青岛火一五信息科技有限公司 (Huo15 Information Technology)
|
|
193
|
+
**Email**: postmaster@huo15.com | **QQ**: 1093992108
|
|
467
194
|
|
|
468
195
|
---
|
|
469
196
|
|
|
470
|
-
|
|
197
|
+
**Follow Yixunzhiku for more updates**
|
|
471
198
|
|
|
472
|
-
|
|
199
|
+
<img src="https://tools.huo15.com/uploads/images/system/qrcode_yxzk.jpg" alt="Yixunzhiku QRCode" width="200" />
|
|
473
200
|
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
## Support
|
|
477
|
-
|
|
478
|
-
- **Issues**: [GitHub Issues](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/issues)
|
|
479
|
-
- **Changelog**: [CHANGELOG.md](CHANGELOG.md)
|
|
201
|
+
</div>
|
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
# @huo15/dingtalk-openclaw-connector
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
1
5
|
<div align="center">
|
|
2
6
|
|
|
3
7
|
<img src="https://tools.huo15.com/uploads/images/system/logo-colours.png" alt="火一五Logo" style="width: 120px; height: auto; display: inline; margin: 0;" />
|
|
@@ -21,11 +25,10 @@
|
|
|
21
25
|
|
|
22
26
|
---
|
|
23
27
|
|
|
24
|
-
# 🔔 huo15-dingtalk-connector-pro
|
|
25
|
-
|
|
26
28
|
> **作者**: 火一五信息科技有限公司
|
|
27
29
|
> **版本**: v1.0.0
|
|
28
30
|
> **参考**: [dingtalk-openclaw-connector](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector) v0.8.12
|
|
31
|
+
> **npm**: [@huo15/dingtalk-openclaw-connector](https://www.npmjs.com/package/@huo15/dingtalk-openclaw-connector)
|
|
29
32
|
> **触发词**: 钉钉、钉钉连接器、dingtalk
|
|
30
33
|
|
|
31
34
|
---
|
|
@@ -63,13 +66,13 @@
|
|
|
63
66
|
|
|
64
67
|
```bash
|
|
65
68
|
# 克隆仓库
|
|
66
|
-
git clone https://github.com/
|
|
67
|
-
cd huo15-dingtalk-connector
|
|
69
|
+
git clone https://github.com/zhaobod1/huo15-dingtalk-openclaw-connector.git
|
|
70
|
+
cd huo15-dingtalk-openclaw-connector
|
|
68
71
|
|
|
69
72
|
# 安装依赖
|
|
70
73
|
npm install
|
|
71
74
|
|
|
72
|
-
#
|
|
75
|
+
# 以链接模式安装(方便开发调试)
|
|
73
76
|
openclaw plugins install -l .
|
|
74
77
|
```
|
|
75
78
|
|
|
@@ -80,15 +83,7 @@ openclaw plugins install -l .
|
|
|
80
83
|
- 创建企业内部应用
|
|
81
84
|
- 获取 AppKey 和 AppSecret
|
|
82
85
|
|
|
83
|
-
2.
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
# 方式一:使用配置向导
|
|
87
|
-
openclaw channels add
|
|
88
|
-
|
|
89
|
-
# 方式二:直接编辑配置文件
|
|
90
|
-
# macOS: ~/.openclaw/openclaw.json
|
|
91
|
-
```
|
|
86
|
+
2. 配置连接器(编辑 `~/.openclaw/openclaw.json`)
|
|
92
87
|
|
|
93
88
|
```json
|
|
94
89
|
{
|
|
@@ -170,16 +165,16 @@ openclaw logs --follow
|
|
|
170
165
|
## 七、项目结构
|
|
171
166
|
|
|
172
167
|
```
|
|
173
|
-
huo15-dingtalk-connector
|
|
168
|
+
huo15-dingtalk-openclaw-connector/
|
|
174
169
|
├── src/
|
|
175
170
|
│ ├── core/ # 核心连接器逻辑
|
|
176
171
|
│ ├── services/ # 钉钉 API 服务
|
|
177
|
-
│ ├── utils/
|
|
172
|
+
│ ├── utils/ # 工具函数
|
|
178
173
|
│ └── types/ # TypeScript 类型定义
|
|
179
174
|
├── docs/
|
|
180
|
-
│ └── images/
|
|
175
|
+
│ └── images/ # 文档图片
|
|
181
176
|
├── openclaw.plugin.json # 插件清单
|
|
182
|
-
├── package.json
|
|
177
|
+
├── package.json # npm 依赖
|
|
183
178
|
└── LICENSE
|
|
184
179
|
```
|
|
185
180
|
|
|
@@ -188,6 +183,7 @@ huo15-dingtalk-connector-pro/
|
|
|
188
183
|
## 八、相关链接
|
|
189
184
|
|
|
190
185
|
- **官方版**: https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector
|
|
186
|
+
- **Fork 仓库**: https://github.com/zhaobod1/huo15-dingtalk-openclaw-connector
|
|
191
187
|
- **OpenClaw**: https://openclaw.ai
|
|
192
188
|
- **火一五记忆系统**: https://clawhub.ai/jobzhao15/huo15-memory-evolution
|
|
193
189
|
- **钉钉开放平台**: https://open-dev.dingtalk.com/
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DingTalk Connector Plugin for OpenClaw
|
|
3
|
+
*
|
|
4
|
+
* 钉钉企业内部机器人插件,使用 Stream 模式连接,支持 AI Card 流式响应。
|
|
5
|
+
* 已迁移到 OpenClaw SDK,支持多账号、安全策略等完整功能。
|
|
6
|
+
*
|
|
7
|
+
* Last updated: 2026-03-24
|
|
8
|
+
*/
|
|
9
|
+
import { dingtalkPlugin } from "./src/channel.js";
|
|
10
|
+
import { setDingtalkRuntime } from "./src/runtime.js";
|
|
11
|
+
import { registerGatewayMethods } from "./src/gateway-methods.js";
|
|
12
|
+
export default function register(api) {
|
|
13
|
+
setDingtalkRuntime(api.runtime);
|
|
14
|
+
api.registerChannel({ plugin: dingtalkPlugin });
|
|
15
|
+
// 注册 Gateway Methods
|
|
16
|
+
registerGatewayMethods(api);
|
|
17
|
+
}
|