@dingtalk-real-ai/dingtalk-connector 0.8.12 → 0.8.13

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.
Files changed (49) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/README.en.md +31 -6
  3. package/README.md +31 -6
  4. package/docs/RELEASE_NOTES_V0.7.10.md +40 -0
  5. package/docs/RELEASE_NOTES_V0.7.2.md +143 -0
  6. package/docs/RELEASE_NOTES_V0.7.3.md +149 -0
  7. package/docs/RELEASE_NOTES_V0.7.4.md +206 -0
  8. package/docs/RELEASE_NOTES_V0.7.5.md +267 -0
  9. package/docs/RELEASE_NOTES_V0.7.6.md +219 -0
  10. package/docs/RELEASE_NOTES_V0.7.7.md +122 -0
  11. package/docs/RELEASE_NOTES_V0.7.8.md +101 -0
  12. package/docs/RELEASE_NOTES_V0.7.9.md +65 -0
  13. package/docs/RELEASE_NOTES_V0.8.0.md +53 -0
  14. package/docs/RELEASE_NOTES_V0.8.1.md +47 -0
  15. package/docs/RELEASE_NOTES_V0.8.10.md +49 -0
  16. package/docs/RELEASE_NOTES_V0.8.11.md +51 -0
  17. package/docs/RELEASE_NOTES_V0.8.12.md +63 -0
  18. package/docs/RELEASE_NOTES_V0.8.13-beta.0.md +69 -0
  19. package/docs/RELEASE_NOTES_V0.8.13.md +62 -0
  20. package/docs/RELEASE_NOTES_V0.8.2.md +55 -0
  21. package/docs/RELEASE_NOTES_V0.8.3.md +63 -0
  22. package/docs/RELEASE_NOTES_V0.8.4.md +45 -0
  23. package/docs/RELEASE_NOTES_V0.8.7.md +49 -0
  24. package/docs/RELEASE_NOTES_V0.8.8.md +63 -0
  25. package/docs/RELEASE_NOTES_V0.8.9.md +81 -0
  26. package/docs/RELEASE_NOTES_v0.7.0.md +142 -0
  27. package/docs/RELEASE_NOTES_v0.7.1.md +74 -0
  28. package/openclaw.plugin.json +1 -1
  29. package/package.json +13 -2
  30. package/src/channel.ts +18 -6
  31. package/src/config/schema.ts +2 -2
  32. package/src/core/connection.ts +9 -6
  33. package/src/core/message-handler.ts +30 -10
  34. package/src/reply-dispatcher.ts +4 -3
  35. package/src/services/media/file.ts +7 -2
  36. package/src/services/media.ts +19 -12
  37. package/src/services/messaging/card.ts +1 -2
  38. package/src/services/messaging.ts +29 -16
  39. package/src/utils/http-client.ts +2 -1
  40. package/docs/images/dingtalk.svg +0 -1
  41. package/docs/images/image-1.png +0 -0
  42. package/docs/images/image-2.png +0 -0
  43. package/docs/images/image-3.png +0 -0
  44. package/docs/images/image-4.png +0 -0
  45. package/docs/images/image-5.png +0 -0
  46. package/docs/images/image-6.png +0 -0
  47. package/docs/images/image-7.png +0 -0
  48. package/install-beta.sh +0 -438
  49. package/install-npm.sh +0 -167
package/CHANGELOG.md CHANGED
@@ -5,6 +5,42 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.8.13] - 2026-04-08
9
+
10
+ ### 修复 / Fixes
11
+ - 🐛 **修复文件发送 mediaId 格式不一致导致静默失败** - `sendFileProactive` 在不同调用点传入 `cleanMediaId`(不带 `@`)和 `mediaId`(带 `@`),经实测钉钉 API 统一要求带 `@` 前缀。同时修复 catch 块吞掉异常导致外层误报成功
12
+ **Fix inconsistent mediaId format causing silent file send failure** - Unified to `@`-prefixed `mediaId`; fixed catch blocks swallowing errors
13
+
14
+ - 🐛 **修复多账号场景下凭据未解析** - `sendText`/`sendMedia` 在多账号模式下 `clientId`/`clientSecret` 可能为 `SecretInput` 对象,现已用已解析值覆盖
15
+ **Fix unresolved credentials in multi-account mode** - Resolved values now override raw config
16
+
17
+ - 🐛 **修复连接错误在 async 回调中无法传播** - 改为 `reject(new Error(...))` 确保 400/401 等错误正确传播
18
+ **Fix connection errors not propagating** - Changed `throw` to `reject()` inside async error handlers
19
+
20
+ - 🐛 **修复 QPS 限流后立即重试** - 收到 403 QpsLimit 后同步更新 `lastUpdateTime`
21
+ **Fix QPS rate limit immediate retry** - `lastUpdateTime` is now synced when skipping
22
+
23
+ - 🐛 **修复 `resolveAllowFrom` 全局过滤误拦截群消息** - 返回空列表禁用框架层全局过滤,群消息由内部 `groupAllowFrom` 处理
24
+ **Fix resolveAllowFrom blocking group messages** - Returns `[]` to disable framework-level filtering
25
+
26
+ ### 新增 / Added
27
+ - ✨ **消息路由支持 `group:`/`user:` 前缀** - `sendTextToDingTalk` 和 `sendMediaToDingTalk` 新增前缀格式解析,兼容旧版裸 `cid` 前缀
28
+ **Message routing supports `group:`/`user:` prefix targets** - Backward compatible with bare `cid` prefix
29
+
30
+ ### 改进 / Improvements
31
+ - ✅ **兼容 pdf-parse v1/v2 API** - 自动检测导出格式,v2.x 使用 class API,v1.x 使用函数 API
32
+ **Support both pdf-parse v1 and v2 API** - Auto-detects export format
33
+
34
+ - ✅ **`enableMediaUpload`/`systemPrompt` 移至共享配置** - 支持多账号独立配置
35
+ **Move `enableMediaUpload`/`systemPrompt` to shared config** - Per-account configurable
36
+
37
+ - ✅ **新增出站路由测试** - 覆盖 `group:`/`user:` 前缀解析和消息路由场景
38
+ **Add outbound routing tests** - Covers prefix parsing and routing scenarios
39
+
40
+ ### 文档 / Documentation
41
+ - 📝 **优化 README 安装验证说明** - 移除版本号硬编码,新增插件未加载时的警示提示
42
+ **Improve README plugin verification instructions** - Removed hardcoded version, added warning
43
+
8
44
  ## [0.8.12] - 2026-04-01
9
45
 
10
46
  ### 修复 / Fixes
package/README.en.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <div align="center">
2
- <img alt="DingTalk" src="docs/images/dingtalk.svg" width="72" height="72" />
2
+ <img alt="DingTalk" src="https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-openclaw-connector/main/docs/images/dingtalk.svg" width="72" height="72" />
3
3
  <h1>Official DingTalk OpenClaw Connector</h1>
4
4
  <p>Connect DingTalk bots to OpenClaw Gateway with AI Card streaming and session management</p>
5
5
 
@@ -122,7 +122,9 @@ registry=https://registry.npmmirror.com
122
122
  ```bash
123
123
  openclaw plugins list
124
124
  ```
125
- You should see `✓ DingTalk Channel (v0.8.6) - loaded`
125
+ You should see output similar to `✓ DingTalk Channel (vX.X.X) - loaded`.
126
+
127
+ > ⚠️ **If you don't see `loaded`**, resolve the plugin loading issue before proceeding to Step 3. Otherwise, DingTalk will not appear in `openclaw channels add`.
126
128
 
127
129
  ---
128
130
 
@@ -133,13 +135,13 @@ You should see `✓ DingTalk Channel (v0.8.6) - loaded`
133
135
  1. Go to [DingTalk Open Platform](https://open-dev.dingtalk.com/)
134
136
  2. Click **"Application Development"**
135
137
 
136
- ![Create Application](docs/images/image-1.png)
138
+ ![Create Application](https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-openclaw-connector/main/docs/images/image-1.png)
137
139
 
138
140
  #### 2.2 Add Bot Capability
139
141
 
140
142
  1. On the application details page, use the “one-click OpenClaw bot app” flow
141
143
 
142
- ![Create OpenClaw bot app](docs/images/image-2.png)
144
+ ![Create OpenClaw bot app](https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-openclaw-connector/main/docs/images/image-2.png)
143
145
 
144
146
  #### 2.3 Get Credentials
145
147
 
@@ -147,9 +149,9 @@ You should see `✓ DingTalk Channel (v0.8.6) - loaded`
147
149
  2. Copy your **AppKey** (Client ID)
148
150
  3. Copy your **AppSecret** (Client Secret)
149
151
 
150
- ![Finish creation](docs/images/image-3.png)
152
+ ![Finish creation](https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-openclaw-connector/main/docs/images/image-3.png)
151
153
 
152
- ![Get credentials](docs/images/image-4.png)
154
+ ![Get credentials](https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-openclaw-connector/main/docs/images/image-4.png)
153
155
 
154
156
  > ⚠️ **Important**: Client ID and Client Secret are your bot’s unique credentials. Store them safely.
155
157
 
@@ -279,6 +281,29 @@ Both session routing/message policy options (including `pmpolicy` and `groupPoli
279
281
 
280
282
  ---
281
283
 
284
+ ### Invalid Config: additional properties
285
+
286
+ **Symptoms**:
287
+
288
+ ```
289
+ Problem:
290
+ - channels.dingtalk-connector: invalid config: must NOT have additional properties
291
+ ```
292
+
293
+ **Cause**: Your config file contains deprecated or renamed fields that are no longer recognized.
294
+
295
+ **Solution**: Open `openclaw.config.yaml` and remove any unsupported fields under `channels.dingtalk-connector`. Known fields to remove:
296
+
297
+ | Old Field | Notes |
298
+ |-----------|-------|
299
+ | `gatewayPassword` | Deprecated legacy field |
300
+ | `gatewayToken` | Deprecated legacy field |
301
+ | `dmHistoryLimit` | Removed in v0.8.9 (never implemented) |
302
+
303
+ The error message will indicate the exact field name. Remove it and restart.
304
+
305
+ ---
306
+
282
307
  ### HTTP 401 Error
283
308
 
284
309
  **Symptoms**: Error message shows "401 Unauthorized"
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <div align="center">
2
- <img alt="DingTalk" src="docs/images/dingtalk.svg" width="72" height="72" />
2
+ <img alt="DingTalk" src="https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-openclaw-connector/main/docs/images/dingtalk.svg" width="72" height="72" />
3
3
  <h1>钉钉 OpenClaw 官方连接器</h1>
4
4
  <p>将钉钉机器人连接到 OpenClaw Gateway,支持 AI Card 流式响应和会话管理</p>
5
5
 
@@ -154,7 +154,9 @@ registry=https://registry.npmmirror.com
154
154
  ```bash
155
155
  openclaw plugins list
156
156
  ```
157
- 你应该看到 `✓ DingTalk Channel (v0.8.6) - loaded`
157
+ 你应该看到类似 `✓ DingTalk Channel (vX.X.X) - loaded` 的输出。
158
+
159
+ > ⚠️ **如果没看到 `loaded`**,请先解决插件加载问题,再进行步骤 3 的配置。否则 `openclaw channels add` 中不会出现钉钉选项。
158
160
 
159
161
  ---
160
162
 
@@ -165,13 +167,13 @@ openclaw plugins list
165
167
  1. 访问 [钉钉开放平台](https://open-dev.dingtalk.com/)
166
168
  2. 点击 **"应用开发"**
167
169
 
168
- ![创建应用](docs/images/image-1.png)
170
+ ![创建应用](https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-openclaw-connector/main/docs/images/image-1.png)
169
171
 
170
172
  #### 3.2 添加机器人能力
171
173
 
172
174
  1. 在应用详情页,点击 一键创建OpenClaw机器人应用
173
175
 
174
- ![创建OpenClaw机器人应用](docs/images/image-2.png)
176
+ ![创建OpenClaw机器人应用](https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-openclaw-connector/main/docs/images/image-2.png)
175
177
 
176
178
  #### 3.3 获取凭证
177
179
 
@@ -179,9 +181,9 @@ openclaw plugins list
179
181
  2. 复制你的 **AppKey**(Client ID)
180
182
  3. 复制你的 **AppSecret**(Client Secret)
181
183
 
182
- ![完成创建](docs/images/image-3.png)
184
+ ![完成创建](https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-openclaw-connector/main/docs/images/image-3.png)
183
185
 
184
- ![获取凭证](docs/images/image-4.png)
186
+ ![获取凭证](https://raw.githubusercontent.com/DingTalk-Real-AI/dingtalk-openclaw-connector/main/docs/images/image-4.png)
185
187
 
186
188
  > ⚠️ **重要**:Client ID和 Client Secret是机器人的唯一凭证。请合理保存。
187
189
 
@@ -312,6 +314,29 @@ openclaw logs --follow
312
314
 
313
315
  ---
314
316
 
317
+ ### 配置字段不合法(additional properties)
318
+
319
+ **症状**:
320
+
321
+ ```
322
+ Problem:
323
+ - channels.dingtalk-connector: invalid config: must NOT have additional properties
324
+ ```
325
+
326
+ **原因**:配置文件中包含已废弃或已重命名的字段,连接器不再识别。
327
+
328
+ **解决方案**:打开 `openclaw.config.yaml`,删除 `channels.dingtalk-connector` 下不再支持的字段。已知需要删除的旧字段:
329
+
330
+ | 旧字段 | 说明 |
331
+ |--------|------|
332
+ | `gatewayPassword` | 早期版本字段,已废弃 |
333
+ | `gatewayToken` | 早期版本字段,已废弃 |
334
+ | `dmHistoryLimit` | v0.8.9 移除(未实现) |
335
+
336
+ 错误信息会指出具体的字段名,删除后重启即可。
337
+
338
+ ---
339
+
315
340
  ### HTTP 401 错误
316
341
 
317
342
  **症状**:错误信息显示 "401 Unauthorized"
@@ -0,0 +1,40 @@
1
+ # Release Notes - v0.7.10
2
+
3
+ ## ✨ 功能与体验改进 / Features & Improvements
4
+
5
+ - **WebSocket 心跳重连机制优化 / WebSocket Reconnection**
6
+ WebSocket 会持续尝试重连,保留指数退避策略(1s → 2s → 4s → 8s → 16s → 30s),避免雪崩效应。重连成功后重置计数器,下次失败从 1 秒开始退避。
7
+ Removed maximum reconnection attempt limit, implemented infinite reconnection mechanism. WebSocket will continuously attempt to reconnect without giving up. Exponential backoff strategy retained (1s → 2s → 4s → 8s → 16s → 30s) to avoid avalanche effect. Counter resets on successful reconnection, starting from 1 second on next failure.
8
+
9
+ - **配置简化 / Configuration Simplification**
10
+ 从 `SocketManagerConfig` 中移除 `maxReconnectAttempts` 配置项,简化配置复杂度。
11
+ Removed `maxReconnectAttempts` configuration from `SocketManagerConfig`, simplifying configuration complexity.
12
+
13
+ - **日志输出优化 / Log Output Optimization**
14
+ 更新重连日志格式,移除最大次数显示(从 "尝试 X/5" 改为 "尝试 X"),更清晰地展示重连进度。
15
+ Updated reconnection log format, removed maximum attempt display (from "attempt X/5" to "attempt X"), providing clearer reconnection progress.
16
+
17
+
18
+ ## 📥 安装升级 / Installation & Upgrade
19
+
20
+ ```bash
21
+ # 通过 npm 安装最新版本 / Install latest version via npm
22
+ openclaw plugins install @dingtalk-real-ai/dingtalk-connector
23
+
24
+ # 或升级现有版本 / Or upgrade existing version
25
+ openclaw plugins update dingtalk-connector
26
+
27
+ # 通过 Git 安装 / Install via Git
28
+ openclaw plugins install https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector.git
29
+ ```
30
+
31
+ ## 🔗 相关链接 / Related Links
32
+
33
+ - [完整变更日志 / Full Changelog](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/blob/main/CHANGELOG.md)
34
+ - [使用文档 / Documentation](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/blob/main/README.md)
35
+
36
+ ---
37
+
38
+ **发布日期 / Release Date**:2026-03-16
39
+ **版本号 / Version**:v0.7.10
40
+ **兼容性 / Compatibility**:OpenClaw Gateway 0.4.0+
@@ -0,0 +1,143 @@
1
+ # Release Notes - v0.7.2
2
+
3
+ ## ✨ 功能增强版本 / Feature Enhancement Release
4
+
5
+ 本次更新新增异步模式功能,并修复了多个关键问题,提升了连接器的稳定性和用户体验。
6
+
7
+ This update adds async mode functionality and fixes several critical issues, improving connector stability and user experience.
8
+
9
+ ## ✨ 新增功能 / New Features
10
+
11
+ ### 1. 异步模式 / Async Mode
12
+
13
+ **功能描述 / Feature Description**:立即回执用户消息,后台处理任务,然后主动推送最终结果作为独立消息
14
+ Immediately acknowledge user messages, process in background, then push the final result as a separate message
15
+
16
+ **使用场景 / Use Cases**:
17
+ - 处理耗时较长的任务(如文档分析、代码生成等)
18
+ Processing time-consuming tasks (e.g., document analysis, code generation)
19
+ - 需要给用户即时反馈的场景
20
+ Scenarios requiring immediate user feedback
21
+ - 希望将处理过程和结果分离的场景
22
+ Scenarios where separating processing and results is desired
23
+
24
+ **配置方式 / Configuration**:
25
+
26
+ ```json5
27
+ {
28
+ "channels": {
29
+ "dingtalk-connector": {
30
+ "asyncMode": true, // 启用异步模式 / Enable async mode
31
+ "ackText": "🫡 任务已接收" // 可选:自定义回执消息 / Optional: Custom ack message
32
+ }
33
+ }
34
+ }
35
+ ```
36
+
37
+ **工作流程 / Workflow**:
38
+ 1. **立即回执** - 用户发送消息后,连接器立即发送回执消息
39
+ **Immediate Acknowledgment** - Connector immediately sends acknowledgment message after user sends message
40
+ 2. **后台处理** - 连接器在后台调用 Gateway 处理任务,支持文件附件和图片
41
+ **Background Processing** - Connector processes task in background via Gateway, supports file attachments and images
42
+ 3. **推送结果** - 处理完成后,连接器主动推送最终结果作为独立消息
43
+ **Push Result** - After processing completes, connector proactively pushes final result as separate message
44
+
45
+ **影响范围 / Impact**:所有用户均可选择启用此功能,默认关闭,不影响现有使用方式
46
+ All users can optionally enable this feature. Default is off, does not affect existing usage.
47
+
48
+ ## 🐛 修复 / Fixes
49
+
50
+ ### 1. 异步模式下 Agent 路由问题修复 / Agent Routing Fix in Async Mode
51
+
52
+ **问题描述 / Issue Description**:异步模式下 `streamFromGateway` 调用时缺少 `accountId` 参数,导致会话路由到 undefined agent
53
+ In async mode, `streamFromGateway` was called without `accountId`, causing sessions to route to undefined agent
54
+
55
+ **修复内容 / Fix**:
56
+ - 修复 `streamFromGateway` 调用,正确传递 `accountId` 参数
57
+ Fixed `streamFromGateway` call to correctly pass `accountId` parameter
58
+ - 确保异步模式下 Agent 路由正常工作
59
+ Ensures Agent routing works correctly in async mode
60
+
61
+ **影响范围 / Impact**:影响使用异步模式的用户,修复后异步模式下的 Agent 路由将正常工作
62
+ Affects users using async mode. After the fix, Agent routing in async mode will work correctly.
63
+
64
+ ### 2. 默认 Agent 路由修复 / Default Agent Routing Fix
65
+
66
+ **问题描述 / Issue Description**:当 `accountId` 为 `'default'` 时,仍然发送 `X-OpenClaw-Agent-Id` header,导致路由异常
67
+ When `accountId` is `'default'`, `X-OpenClaw-Agent-Id` header was still sent, causing routing issues
68
+
69
+ **修复内容 / Fix**:
70
+ - 当 `accountId` 为 `'default'` 时跳过 `X-OpenClaw-Agent-Id` header
71
+ Skip `X-OpenClaw-Agent-Id` header when `accountId` is `'default'`
72
+ - 让 gateway 路由到其配置的默认 agent
73
+ Let gateway route to its configured default agent
74
+
75
+ **影响范围 / Impact**:影响使用默认 Agent 配置的用户,修复后默认 Agent 路由将正常工作
76
+ Affects users with default Agent configuration. After the fix, default Agent routing will work correctly.
77
+
78
+ ### 3. 异步模式内容处理修复 / Async Mode Content Fix
79
+
80
+ **问题描述 / Issue Description**:异步模式使用原始 `content.text`,未包含文件附件内容
81
+ Async mode used raw `content.text`, did not include file attachment content
82
+
83
+ **修复内容 / Fix**:
84
+ - 使用 `userContent`(包含文件附件)替代原始 `content.text`
85
+ Use `userContent` (includes file attachments) instead of raw `content.text`
86
+ - 确保文件附件内容正确传递给 Gateway
87
+ Ensures file attachment content is correctly passed to Gateway
88
+
89
+ **影响范围 / Impact**:影响使用异步模式且发送文件附件的用户,修复后文件附件将正确处理
90
+ Affects users using async mode and sending file attachments. After the fix, file attachments will be processed correctly.
91
+
92
+ ### 4. 异步模式图片支持修复 / Async Mode Image Support Fix
93
+
94
+ **问题描述 / Issue Description**:异步模式下未将图片路径传递给 Gateway stream
95
+ Image paths were not passed to Gateway stream in async mode
96
+
97
+ **修复内容 / Fix**:
98
+ - 将 `imageLocalPaths` 传递给 gateway stream
99
+ Pass `imageLocalPaths` to gateway stream
100
+ - 确保图片在异步模式下正确处理
101
+ Ensures images are processed correctly in async mode
102
+
103
+ **影响范围 / Impact**:影响使用异步模式且发送图片的用户,修复后图片将正确处理
104
+ Affects users using async mode and sending images. After the fix, images will be processed correctly.
105
+
106
+ ## 🔧 配置更新 / Configuration Updates
107
+
108
+ ### 新增配置项 / New Configuration Options
109
+
110
+ - **`asyncMode`**(类型:`boolean`,默认:`false`)- 启用异步模式
111
+ **`asyncMode`** (type: `boolean`, default: `false`) - Enable async mode
112
+ - **`ackText`**(类型:`string`,默认:`'🫡 任务已接收,处理中...'`)- 自定义回执消息文本
113
+ **`ackText`** (type: `string`, default: `'🫡 任务已接收,处理中...'`) - Custom ack message text
114
+
115
+ ## 📥 安装升级 / Installation & Upgrade
116
+
117
+ ```bash
118
+ # 通过 npm 安装最新版本 / Install latest version via npm
119
+ openclaw plugins install @dingtalk-real-ai/dingtalk-connector
120
+
121
+ # 或升级现有版本 / Or upgrade existing version
122
+ openclaw plugins update dingtalk-connector
123
+
124
+ # 通过 Git 安装 / Install via Git
125
+ openclaw plugins install https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector.git
126
+ ```
127
+
128
+ ## 🔗 相关链接 / Related Links
129
+
130
+ - [完整变更日志 / Full Changelog](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/blob/main/CHANGELOG.md)
131
+ - [使用文档 / Documentation](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/blob/main/README.md)
132
+ - [问题反馈 / Issue Feedback](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/issues)
133
+
134
+ ## 🙏 致谢 / Acknowledgments
135
+
136
+ 感谢所有贡献者和用户的支持与反馈!
137
+ Thanks to all contributors and users for their support and feedback!
138
+
139
+ ---
140
+
141
+ **发布日期 / Release Date**:2026-03-05
142
+ **版本号 / Version**:v0.7.2
143
+ **兼容性 / Compatibility**:OpenClaw Gateway 0.4.0+
@@ -0,0 +1,149 @@
1
+ # Release Notes - v0.7.3
2
+
3
+ ## 🔧 兼容性修复版本 / Compatibility Fix Release
4
+
5
+ 本次更新主要修复了 0.7.0 版本引入的默认 Agent 路由回归问题,确保与 0.7.0 之前版本的向下兼容性。
6
+
7
+ This update primarily fixes the default Agent routing regression introduced in version 0.7.0, ensuring backward compatibility with versions before 0.7.0.
8
+
9
+ ## 🐛 修复 / Fixes
10
+
11
+ ### 1. 默认 Agent 路由兼容性修复 / Default Agent Routing Compatibility Fix
12
+
13
+ **问题描述 / Issue Description**:
14
+ 在 0.7.0 版本中,默认路由(没有配置 `accountId` 时)从 `main` agent 错误地改成了 `default` agent,导致与 0.7.0 之前版本的行为不一致,可能影响现有用户的配置和会话路由。
15
+ In version 0.7.0, the default route (when no `accountId` was configured) was incorrectly changed from `main` agent to `default` agent, causing inconsistency with versions before 0.7.0, which may affect existing user configurations and session routing.
16
+
17
+ **修复内容 / Fix**:
18
+ - 恢复默认路由到 `main` agent,与 0.7.0 之前版本保持一致
19
+ Restored default routing to `main` agent, consistent with versions before 0.7.0
20
+ - 使用 `__default__` 作为内部默认账号标识,避免与用户配置的 `default` 账号冲突
21
+ Use `__default__` as internal default account identifier to avoid conflicts with user-configured `default` accounts
22
+ - 在 `streamFromGateway` 中将 `__default__` 正确映射到 `main` agent
23
+ Correctly map `__default__` to `main` agent in `streamFromGateway`
24
+
25
+ **影响范围 / Impact**:
26
+ 影响所有使用默认配置(未配置 `accounts`)的用户。修复后,默认路由将恢复到 0.7.0 之前的行为,路由到 `main` agent,确保向下兼容性。
27
+ Affects all users using default configuration (without `accounts` configuration). After the fix, default routing will be restored to pre-0.7.0 behavior, routing to `main` agent, ensuring backward compatibility.
28
+
29
+ ### 2. 用户配置 `default` 账号映射修复 / User-Configured `default` Account Mapping Fix
30
+
31
+ **问题描述 / Issue Description**:
32
+ 当用户显式配置名为 `default` 的账号时,系统会错误地将其映射为内部默认账号,导致用户配置的 `default` 账号无法正常使用。
33
+ When users explicitly configure an account named `default`, the system incorrectly maps it to the internal default account, preventing the user-configured `default` account from working properly.
34
+
35
+ **修复内容 / Fix**:
36
+ - 使用 `__default__` 作为内部默认账号标识,与用户配置的 `default` 账号区分开
37
+ Use `__default__` as internal default account identifier, separate from user-configured `default` accounts
38
+ - 确保用户配置的 `default` 账号能够正常使用
39
+ Ensure user-configured `default` accounts can work properly
40
+
41
+ **影响范围 / Impact**:
42
+ 影响显式配置了名为 `default` 的账号的用户。修复后,用户配置的 `default` 账号将能够正常工作,不会被错误映射。
43
+ Affects users who explicitly configured an account named `default`. After the fix, user-configured `default` accounts will work properly and will not be incorrectly mapped.
44
+
45
+ ## 🔧 改进 / Improvements
46
+
47
+ ### 1. 代码结构优化 / Code Structure Optimization
48
+
49
+ **改进内容 / Improvements**:
50
+ - 抽取 `DEFAULT_ACCOUNT_ID` 常量到文件顶部(值为 `__default__`),统一管理默认账号标识
51
+ Extracted `DEFAULT_ACCOUNT_ID` constant to file top (value: `__default__`), unified management of default account identifier
52
+ - 更新所有相关代码,使用常量替代硬编码的字符串
53
+ Updated all related code to use constants instead of hardcoded strings
54
+ - 提高代码可维护性和可读性
55
+ Improved code maintainability and readability
56
+
57
+ **影响范围 / Impact**:
58
+ 内部代码改进,不影响用户使用,但提高了代码质量和可维护性。
59
+ Internal code improvements, does not affect user usage, but improves code quality and maintainability.
60
+
61
+ ### 2. API 文档更新 / API Documentation Updates
62
+
63
+ **改进内容 / Improvements**:
64
+ - 更新 API 文档注释,移除对 `default` 的硬编码引用
65
+ Updated API documentation comments, removed hardcoded references to `default`
66
+ - 明确说明 `accountId` 参数为可选,不传则使用默认配置
67
+ Clarified that `accountId` parameter is optional, uses default configuration if not provided
68
+
69
+ **影响范围 / Impact**:
70
+ 文档改进,帮助开发者更好地理解 API 的使用方式。
71
+ Documentation improvements, helping developers better understand API usage.
72
+
73
+ ## 📋 技术细节 / Technical Details
74
+
75
+ ### 内部实现变更 / Internal Implementation Changes
76
+
77
+ **变更前 / Before**:
78
+ - 默认账号标识使用 `'default'` 字符串
79
+ - 当 `accountId` 为 `'default'` 时,不发送 `X-OpenClaw-Agent-Id` header,让 gateway 路由到其配置的默认 agent
80
+
81
+ **变更后 / After**:
82
+ - 默认账号标识使用 `'__default__'` 常量
83
+ - 在 `streamFromGateway` 中,将 `'__default__'` 映射到 `'main'` agent,并发送 `X-OpenClaw-Agent-Id: main` header
84
+ - 用户配置的 `'default'` 账号正常使用,不会被特殊处理
85
+
86
+ ### 相关代码位置 / Related Code Locations
87
+
88
+ 主要修改文件:
89
+ - `plugin.ts` - 核心逻辑修改
90
+
91
+ 关键变更点:
92
+ - 新增 `DEFAULT_ACCOUNT_ID` 常量定义
93
+ - `streamFromGateway` 函数中的 agent 路由逻辑
94
+ - `listAccountIds`、`resolveAccount`、`defaultAccountId` 等配置相关函数
95
+ - API 方法文档注释
96
+
97
+ ## 📥 安装升级 / Installation & Upgrade
98
+
99
+ ```bash
100
+ # 通过 npm 安装最新版本 / Install latest version via npm
101
+ openclaw plugins install @dingtalk-real-ai/dingtalk-connector
102
+
103
+ # 或升级现有版本 / Or upgrade existing version
104
+ openclaw plugins update dingtalk-connector
105
+
106
+ # 通过 Git 安装 / Install via Git
107
+ openclaw plugins install https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector.git
108
+ ```
109
+
110
+ ## ⚠️ 升级注意事项 / Upgrade Notes
111
+
112
+ ### 兼容性说明 / Compatibility Notes
113
+
114
+ - **向下兼容**:本次更新恢复了 0.7.0 之前版本的默认路由行为,对现有用户完全兼容
115
+ **Backward Compatible**: This update restores the default routing behavior of versions before 0.7.0, fully compatible with existing users
116
+ - **无需配置变更**:现有配置无需修改即可正常工作
117
+ **No Configuration Changes Required**: Existing configurations work without modification
118
+ - **推荐升级**:使用默认配置的用户强烈建议升级到此版本,以确保正确的 Agent 路由
119
+ **Recommended Upgrade**: Users with default configuration are strongly recommended to upgrade to this version to ensure correct Agent routing
120
+
121
+ ### 迁移指南 / Migration Guide
122
+
123
+ 如果您在 0.7.0 或 0.7.1 版本中遇到了默认路由问题,升级到此版本后:
124
+ If you encountered default routing issues in versions 0.7.0 or 0.7.1, after upgrading to this version:
125
+
126
+ 1. **默认路由将自动恢复**:无需任何配置,默认路由将自动恢复到 `main` agent
127
+ **Default routing will be automatically restored**: No configuration needed, default routing will automatically restore to `main` agent
128
+ 2. **检查 Agent 配置**:确认您的 Gateway 中 `main` agent 的配置是否正确
129
+ **Check Agent Configuration**: Verify that your Gateway's `main` agent configuration is correct
130
+ 3. **验证路由**:升级后测试会话路由,确认消息正确路由到预期的 agent
131
+ **Verify Routing**: Test session routing after upgrade to confirm messages are correctly routed to the expected agent
132
+
133
+ ## 🔗 相关链接 / Related Links
134
+
135
+ - [完整变更日志 / Full Changelog](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/blob/main/CHANGELOG.md)
136
+ - [使用文档 / Documentation](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/blob/main/README.md)
137
+ - [问题反馈 / Issue Feedback](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/issues)
138
+ - [Pull Request #108](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/pull/108)
139
+
140
+ ## 🙏 致谢 / Acknowledgments
141
+
142
+ 感谢所有贡献者和用户的支持与反馈!
143
+ Thanks to all contributors and users for their support and feedback!
144
+
145
+ ---
146
+
147
+ **发布日期 / Release Date**:2026-03-09
148
+ **版本号 / Version**:v0.7.3
149
+ **兼容性 / Compatibility**:OpenClaw Gateway 0.4.0+