@jeik/dingtalk-connector 0.8.21-fix1

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 (154) hide show
  1. package/CHANGELOG.md +686 -0
  2. package/LICENSE +21 -0
  3. package/README.en.md +181 -0
  4. package/README.md +221 -0
  5. package/bin/dingtalk-connector.js +858 -0
  6. package/bin/wizard-config.mjs +110 -0
  7. package/dist/accounts-BAzdqkAV.mjs +268 -0
  8. package/dist/accounts-BQptOmgB.mjs +2 -0
  9. package/dist/chunk-upload-BBQgGtcZ.mjs +193 -0
  10. package/dist/chunk-upload-DaLXXZH3.mjs +2 -0
  11. package/dist/common-C8pYKU_y.mjs +2 -0
  12. package/dist/common-Dt9n6fQN.mjs +101 -0
  13. package/dist/connection-DHHFFNQJ.mjs +423 -0
  14. package/dist/entry-bundled.d.mts +16 -0
  15. package/dist/entry-bundled.mjs +31 -0
  16. package/dist/game-xiyou-CqHt-6Q1.mjs +4271 -0
  17. package/dist/gateway-methods-C4tcgI7P.mjs +771 -0
  18. package/dist/gateway-methods-Ci31A3vg.mjs +2 -0
  19. package/dist/http-client-CpnJHB89.mjs +2 -0
  20. package/dist/http-client-DFWZgO1n.mjs +33 -0
  21. package/dist/index.d.mts +193 -0
  22. package/dist/index.mjs +45 -0
  23. package/dist/logger-BmJkQkm1.mjs +2 -0
  24. package/dist/logger-mZ9OSbmD.mjs +58 -0
  25. package/dist/media-C_SVin7s.mjs +2 -0
  26. package/dist/media-cz72EVS3.mjs +509 -0
  27. package/dist/message-handler-DESzFFDc.mjs +1971 -0
  28. package/dist/messaging-B6l1sRvX.mjs +1044 -0
  29. package/dist/runtime-DUgpo5zC.mjs +1422 -0
  30. package/dist/session-DJ4jYqPv.mjs +114 -0
  31. package/dist/utils-Bjh4r_qS.mjs +4 -0
  32. package/dist/utils-CIfI_3Jh.mjs +63 -0
  33. package/dist/utils-legacy-CALCPP1t.mjs +230 -0
  34. package/dist/utils-legacy-CFYDBM4r.mjs +3 -0
  35. package/docs/DEAP_AGENT_GUIDE.en.md +115 -0
  36. package/docs/DEAP_AGENT_GUIDE.md +115 -0
  37. package/docs/DINGTALK_MANUAL_SETUP.md +50 -0
  38. package/docs/MULTI_AGENT_SETUP.md +306 -0
  39. package/docs/RELEASE_NOTES_V0.7.10.md +40 -0
  40. package/docs/RELEASE_NOTES_V0.7.2.md +143 -0
  41. package/docs/RELEASE_NOTES_V0.7.3.md +149 -0
  42. package/docs/RELEASE_NOTES_V0.7.4.md +206 -0
  43. package/docs/RELEASE_NOTES_V0.7.5.md +267 -0
  44. package/docs/RELEASE_NOTES_V0.7.6.md +219 -0
  45. package/docs/RELEASE_NOTES_V0.7.7.md +122 -0
  46. package/docs/RELEASE_NOTES_V0.7.8.md +101 -0
  47. package/docs/RELEASE_NOTES_V0.7.9.md +65 -0
  48. package/docs/RELEASE_NOTES_V0.8.0.md +53 -0
  49. package/docs/RELEASE_NOTES_V0.8.1.md +47 -0
  50. package/docs/RELEASE_NOTES_V0.8.10.md +49 -0
  51. package/docs/RELEASE_NOTES_V0.8.11.md +51 -0
  52. package/docs/RELEASE_NOTES_V0.8.12.md +63 -0
  53. package/docs/RELEASE_NOTES_V0.8.13-beta.0.md +69 -0
  54. package/docs/RELEASE_NOTES_V0.8.13.md +62 -0
  55. package/docs/RELEASE_NOTES_V0.8.14.md +86 -0
  56. package/docs/RELEASE_NOTES_V0.8.16.md +40 -0
  57. package/docs/RELEASE_NOTES_V0.8.17.md +87 -0
  58. package/docs/RELEASE_NOTES_V0.8.18.md +64 -0
  59. package/docs/RELEASE_NOTES_V0.8.19.md +62 -0
  60. package/docs/RELEASE_NOTES_V0.8.2.md +55 -0
  61. package/docs/RELEASE_NOTES_V0.8.20.md +49 -0
  62. package/docs/RELEASE_NOTES_V0.8.3.md +63 -0
  63. package/docs/RELEASE_NOTES_V0.8.4.md +45 -0
  64. package/docs/RELEASE_NOTES_V0.8.7.md +49 -0
  65. package/docs/RELEASE_NOTES_V0.8.8.md +63 -0
  66. package/docs/RELEASE_NOTES_V0.8.9.md +81 -0
  67. package/docs/RELEASE_NOTES_v0.7.0.md +142 -0
  68. package/docs/RELEASE_NOTES_v0.7.1.md +74 -0
  69. package/docs/TROUBLESHOOTING.md +122 -0
  70. package/index.ts +77 -0
  71. package/openclaw.plugin.json +551 -0
  72. package/package.json +147 -0
  73. package/skills/dingtalk-channel-rules/SKILL.md +91 -0
  74. package/skills/dingtalk-troubleshoot/SKILL.md +93 -0
  75. package/skills/dws-cli/SKILL.md +129 -0
  76. package/skills/dws-cli/references/error-codes.md +95 -0
  77. package/skills/dws-cli/references/field-rules.md +105 -0
  78. package/skills/dws-cli/references/global-reference.md +104 -0
  79. package/skills/dws-cli/references/intent-guide.md +114 -0
  80. package/skills/dws-cli/references/products/aitable.md +452 -0
  81. package/skills/dws-cli/references/products/attendance.md +93 -0
  82. package/skills/dws-cli/references/products/calendar.md +217 -0
  83. package/skills/dws-cli/references/products/chat.md +292 -0
  84. package/skills/dws-cli/references/products/contact.md +108 -0
  85. package/skills/dws-cli/references/products/ding.md +57 -0
  86. package/skills/dws-cli/references/products/report.md +162 -0
  87. package/skills/dws-cli/references/products/simple.md +128 -0
  88. package/skills/dws-cli/references/products/todo.md +138 -0
  89. package/skills/dws-cli/references/products/workbench.md +39 -0
  90. package/skills/dws-cli/references/recovery-guide.md +94 -0
  91. package/src/channel.ts +588 -0
  92. package/src/config/accounts.ts +242 -0
  93. package/src/config/schema.ts +180 -0
  94. package/src/core/connection.ts +741 -0
  95. package/src/core/message-handler.ts +1788 -0
  96. package/src/core/provider.ts +111 -0
  97. package/src/core/state.ts +54 -0
  98. package/src/device-auth-config.ts +14 -0
  99. package/src/device-auth.ts +197 -0
  100. package/src/directory.ts +95 -0
  101. package/src/docs.ts +293 -0
  102. package/src/game-xiyou/achievement-engine.ts +252 -0
  103. package/src/game-xiyou/bounty-system.ts +315 -0
  104. package/src/game-xiyou/commands.ts +223 -0
  105. package/src/game-xiyou/drop-engine.ts +241 -0
  106. package/src/game-xiyou/encounter-system.ts +135 -0
  107. package/src/game-xiyou/escape-engine.ts +164 -0
  108. package/src/game-xiyou/exp-calculator.ts +139 -0
  109. package/src/game-xiyou/index.ts +479 -0
  110. package/src/game-xiyou/level-system.ts +91 -0
  111. package/src/game-xiyou/monster-pool.ts +180 -0
  112. package/src/game-xiyou/pity-counter.ts +114 -0
  113. package/src/game-xiyou/random-event-engine.ts +648 -0
  114. package/src/game-xiyou/renderer.ts +679 -0
  115. package/src/game-xiyou/storage.ts +218 -0
  116. package/src/game-xiyou/treasure-system.ts +105 -0
  117. package/src/game-xiyou/types.ts +582 -0
  118. package/src/game-xiyou/uid-resolver.ts +49 -0
  119. package/src/gateway-methods.ts +740 -0
  120. package/src/onboarding.ts +553 -0
  121. package/src/policy.ts +32 -0
  122. package/src/probe.ts +210 -0
  123. package/src/reply-dispatcher.ts +874 -0
  124. package/src/runtime.ts +32 -0
  125. package/src/sdk/helpers.ts +322 -0
  126. package/src/sdk/types.ts +519 -0
  127. package/src/secret-input.ts +19 -0
  128. package/src/services/media/audio.ts +54 -0
  129. package/src/services/media/chunk-upload.ts +296 -0
  130. package/src/services/media/common.ts +155 -0
  131. package/src/services/media/file.ts +75 -0
  132. package/src/services/media/image.ts +81 -0
  133. package/src/services/media/index.ts +10 -0
  134. package/src/services/media/video.ts +162 -0
  135. package/src/services/media.ts +1143 -0
  136. package/src/services/messaging/card.ts +604 -0
  137. package/src/services/messaging/index.ts +18 -0
  138. package/src/services/messaging/mentions.ts +267 -0
  139. package/src/services/messaging/send.ts +141 -0
  140. package/src/services/messaging.ts +1191 -0
  141. package/src/services/reply-markers.ts +55 -0
  142. package/src/targets.ts +45 -0
  143. package/src/types/index.ts +59 -0
  144. package/src/types/pdf-parse.d.ts +3 -0
  145. package/src/utils/agent.ts +63 -0
  146. package/src/utils/async.ts +51 -0
  147. package/src/utils/constants.ts +27 -0
  148. package/src/utils/http-client.ts +38 -0
  149. package/src/utils/index.ts +8 -0
  150. package/src/utils/logger.ts +78 -0
  151. package/src/utils/session.ts +147 -0
  152. package/src/utils/token.ts +93 -0
  153. package/src/utils/utils-legacy.ts +454 -0
  154. package/tsconfig.json +20 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DingTalk Real Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md ADDED
@@ -0,0 +1,181 @@
1
+ <div align="center">
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
+ <h1>dingtalk-openclaw-connector(Community Maintained Fork)</h1>
4
+ <p>Community maintained fork of the official <strong>v0.8.20</strong> release, tracking and fixing bugs the official team hasn't addressed.<br/>
5
+ Identical to the official release in functionality — only community-critical fixes applied.</p>
6
+
7
+ <p><strong>Current published release: <a href="https://www.npmjs.com/package/@jeik/dingtalk-connector">@jeik/dingtalk-connector</a> v0.8.21</strong> (now on npm — see "Installation" below).</p>
8
+
9
+ <p>
10
+ <a href="https://www.npmjs.com/package/@jeik/dingtalk-connector"><img src="https://img.shields.io/npm/v/@jeik/dingtalk-connector.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="npm version" /></a>
11
+ <a href="https://www.npmjs.com/package/@jeik/dingtalk-connector"><img src="https://img.shields.io/npm/dm/@jeik/dingtalk-connector.svg?style=flat&colorA=18181B&colorB=28CF8D&cacheSeconds=0" alt="npm downloads" /></a>
12
+ <a href="https://github.com/jeikl/dingtalk-openclaw-connector-fix-Community/blob/main/LICENSE"><img src="https://img.shields.io/github/license/jeikl/dingtalk-openclaw-connector-fix-Community.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="license" /></a>
13
+ </p>
14
+
15
+ <p>
16
+ <a href="README.md">🇨🇳 简体中文</a> •
17
+ <a href="CHANGELOG.md">Changelog</a> •
18
+ <a href="https://openclaw.ai/">OpenClaw Website</a>
19
+ </p>
20
+ </div>
21
+
22
+ ---
23
+
24
+ ## 🔧 Recent Updates
25
+
26
+ | Date | Tag | Update |
27
+ |------|------|--------|
28
+ | 2026-06-28 | ✨ | Install wizard now detects existing config: skip QR when a bot already exists; after QR, choose to overwrite or add a bot (bindings maintained automatically, other configs untouched) |
29
+ | 2026-06-28 | 📦 | Now published to npm (`@jeik/dingtalk-connector`) with one-command scan-to-install; `--force` overwrites for updates, no uninstall needed |
30
+ | 2026-06-28 | 🐛 | Fixed the connector mistaking an intermediate progress message for the final answer and ending AI Card rendering too early when the model emits multiple progress messages in one turn (card now finalized only at turn end) |
31
+ | 2026-05-14 | ✨ | Markdown image support for direct URLs and local paths, no download required |
32
+ | 2026-05-11 | 🔧 | AI Card flashing and repeated re-rendering caused by duplicate intermediate messages after Agent multi-round loop completes |
33
+ | 2026-05-11 | 🐛 | OpenClaw 4.29+ causing DingTalk plugin to show "✅ 任务执行完成(无文本输出)" in group chat @Agent |
34
+ | 2026-05-08 | 🌐 | WebSocket phantom reconnect caused by unregistered Pong listener, from [PR #566](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/pull/566) by [Majorshi](https://github.com/Majorshi) |
35
+
36
+ Full update log: [FIXES.md](FIXES.md)([🇨🇳 中文](FIXES.en.md))
37
+
38
+ ---
39
+
40
+ ## ✨ Enhanced Features
41
+
42
+ - 🔧 Markdown image support for direct URLs and local paths, no download required:
43
+ - Markdown syntax `![](direct-url)` or `![](local-path)` sends images directly
44
+ - Compatible with mediaId format
45
+ - ⚠️ This plugin supports image messages, but DingTalk side won't trigger this feature automatically. Use the following prompt to guide the Agent:
46
+
47
+ ```
48
+ Please write a DingTalk image sending skill following this approach: use markdown to send images, with image captions for rich text; direct URLs or local paths can be embedded directly in markdown, and if local paths contain spaces, rename to remove spaces first before sending.
49
+ ```
50
+
51
+ - 🎨 Custom AI Card template support for user-prebuilt cards (with copy button), uses official default card if not set:
52
+
53
+ ```json
54
+ "channels": {
55
+ "dingtalk-connector": {
56
+ "enabled": true,
57
+ "clientId": "your-clientId",
58
+ "clientSecret": "your-clientSecret",
59
+ "cardTemplateId": "your-card-template-id.schema",
60
+ "cardContentVar": "content"
61
+ }
62
+ }
63
+ ```
64
+
65
+ | Parameter | Description |
66
+ |-----------|-------------|
67
+ | `cardTemplateId` | AI Card template ID, uses official default if not set |
68
+ | `cardContentVar` | Final response content variable, defaults to `msgContent` |
69
+ | `cardProcessVar` | Intermediate process (block status) variable, defaults to `cardContentVar` if not set |
70
+ | `cardToolVar` | Tool call output variable, not written to card if not set |
71
+
72
+ > Card template must be created in [DingTalk Open Platform](https://open.dingtalk.com/) with matching variable fields.
73
+
74
+ ---
75
+
76
+ ## Why Fork?
77
+
78
+ Due to the sluggish pace of the official DingTalk connector's updates and bug fixes, this repository was forked to keep up with critical fixes.
79
+
80
+ **Bugs fixed using Claude Code (official AI model) to ensure maximum fix quality.**
81
+
82
+ Community contributions (features & bug fixes) are always welcome — submit a PR anytime!
83
+
84
+ ---
85
+
86
+ ## Differences from Official
87
+
88
+ | Item | Description |
89
+ |------|-------------|
90
+ | Base | Official v0.8.20, fully identical features |
91
+ | Fixes | Bugs the official team hasn't addressed (see recent fixes above) |
92
+ | Maintenance | Community maintained, continuously tracking official updates |
93
+
94
+ ---
95
+
96
+ ## Requirements & Installation
97
+
98
+ Before you start, make sure you have:
99
+
100
+ - **OpenClaw**: Installed and running properly. Visit the [OpenClaw website](https://openclaw.ai/) for details.
101
+ - **Version**: OpenClaw ≥ **2026.4.9**. Check with `openclaw -v`.
102
+
103
+ > If below this version, upgrade with: `npm install -g openclaw`
104
+
105
+ ---
106
+
107
+ ## Installation
108
+
109
+ > Same channel id as the official plugin (`dingtalk-connector`); `--force` overwrites in place, so **no need to uninstall** the official or an older version first.
110
+
111
+ ### Option 1: npm (recommended)
112
+
113
+ This build is published to npm (`@jeik/dingtalk-connector`).
114
+
115
+ **One-command scan-to-install** (recommended — DingTalk QR scan handles: bot creation → credentials → plugin install → config write):
116
+
117
+ ```bash
118
+ npx -y @jeik/dingtalk-connector install
119
+ ```
120
+
121
+ **Or install the plugin only** (configure credentials yourself, see advanced docs below):
122
+
123
+ ```bash
124
+ openclaw plugins install @jeik/dingtalk-connector --force
125
+ # or
126
+ npx openclaw@latest add @jeik/dingtalk-connector
127
+
128
+ openclaw gateway restart
129
+ ```
130
+
131
+ ### Option 2: Local build artifact (development / offline)
132
+
133
+ ```bash
134
+ # 1. Clone repo
135
+ git clone https://github.com/jeikl/dingtalk-openclaw-connector-fix-Community.git
136
+ cd dingtalk-openclaw-connector-fix-Community
137
+
138
+ # 2. Install, build & pack (npm or pnpm)
139
+ npm install && npm run build && npm pack # → jeik-dingtalk-connector-0.8.21.tgz
140
+ # pnpm install && pnpm run build && pnpm pack
141
+
142
+ # 3. Install to OpenClaw and restart
143
+ openclaw plugins install ./jeik-dingtalk-connector-0.8.21.tgz --force
144
+ openclaw gateway restart
145
+ ```
146
+
147
+ ---
148
+
149
+ ## Usage Guide
150
+
151
+ [OpenClaw DingTalk Plugin User Guide](https://alidocs.dingtalk.com/i/nodes/2Amq4vjg89GEno0zfPqoPGqdV3kdP0wQ?utm_scene=team_space)
152
+
153
+ ---
154
+
155
+ ## Advanced Documentation
156
+
157
+ - [Manual Setup Guide](docs/DINGTALK_MANUAL_SETUP.md) — Configure credentials manually
158
+ - [DingTalk DEAP Agent Integration](docs/DEAP_AGENT_GUIDE.en.md) — Local device operation capabilities
159
+ - [Multi-Agent Routing](docs/MULTI_AGENT_SETUP.md) — Bind multiple bots to different Agents
160
+ - [Troubleshooting](docs/TROUBLESHOOTING.md) — Installation and usage issue resolution
161
+ - [Official README(中文)](README_DINGTALK_OFFICIAL.md)
162
+ - [Official README(English)](README_DINGTALK_OFFICIAL_en.md)
163
+
164
+ ---
165
+
166
+ ## Contributing
167
+
168
+ Community contributions are welcome! If you find a bug or have feature suggestions, please submit an [Issue](https://github.com/jeikl/dingtalk-openclaw-connector-fix-Community/issues) or Pull Request.
169
+
170
+ ---
171
+
172
+ ## License
173
+
174
+ This project is licensed under the [MIT](LICENSE) License.
175
+
176
+ ---
177
+
178
+ ## Support
179
+
180
+ - **Issues**: [GitHub Issues](https://github.com/jeikl/dingtalk-openclaw-connector-fix-Community/issues)
181
+ - **Changelog**: [CHANGELOG.md](CHANGELOG.md)
package/README.md ADDED
@@ -0,0 +1,221 @@
1
+ <div align="center">
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
+ <h1>dingtalk-openclaw-connector(社区维护版)</h1>
4
+ <p>基于官方 <strong>v0.8.20</strong> 的社区维护版本,由社区持续跟进修复官方无暇处理的 Bug。<br/>
5
+ 功能与官方完全一致,拥有最快的修复速度,及时合并官方pr和个人发现的bug和社区急需的 Bug。</p>
6
+
7
+ <p><strong>当前发布版:<a href="https://www.npmjs.com/package/@jeik/dingtalk-connector">@jeik/dingtalk-connector</a> v0.8.21</strong>(已发布到 npm,使用方式见下方「安装」)</p>
8
+
9
+ <p>
10
+ <a href="https://www.npmjs.com/package/@jeik/dingtalk-connector"><img src="https://img.shields.io/npm/v/@jeik/dingtalk-connector.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="npm version" /></a>
11
+ <a href="https://www.npmjs.com/package/@jeik/dingtalk-connector"><img src="https://img.shields.io/npm/dm/@jeik/dingtalk-connector.svg?style=flat&colorA=18181B&colorB=28CF8D&cacheSeconds=0" alt="npm downloads" /></a>
12
+ <a href="https://github.com/jeikl/dingtalk-openclaw-connector-fix-Community/blob/main/LICENSE"><img src="https://img.shields.io/github/license/jeikl/dingtalk-openclaw-connector-fix-Community.svg?style=flat&colorA=18181B&colorB=28CF8D" alt="license" /></a>
13
+ </p>
14
+
15
+ <p>
16
+ <a href="README.en.md">🇺🇸 English</a> •
17
+ <a href="CHANGELOG.md">更新日志</a> •
18
+ <a href="https://openclaw.ai/">OpenClaw 官网</a>
19
+ </p>
20
+ </div>
21
+
22
+ ---
23
+
24
+ ## 🔧 最近更新
25
+
26
+ | 日期 | 标识 | 更新内容 |
27
+ |------|------|---------|
28
+ | 2026-06-28 | ✨ | 安装向导新增「已存在配置」检测:已有机器人配置可跳过扫码;扫码后可选覆盖或新增机器人(自动维护 bindings、不覆盖其它配置) |
29
+ | 2026-06-28 | 📦 | 改为发布到 npm(`@jeik/dingtalk-connector`),新增一键扫码安装命令;`--force` 覆盖更新无需卸载 |
30
+ | 2026-06-28 | 🐛 | 修复模型一轮内发送多条过程消息时,连接器把中间过程消息当成最终答案、提前结束 AI Card 渲染的问题(改为整轮结束才定稿卡片) |
31
+ | 2026-05-14 | ✨ | Markdown 图片发送支持直链和本地路径,无需下载到本地,请参考下列提示词|
32
+ | 2026-05-11 | 🔧 | Agent 多轮循环完成后,中间过程消息重复发送到钉钉对话,造成刷屏和 AI Card 倒放重渲染 |
33
+ | 2026-05-11 | 🐛 | OpenClaw 4.29+ 版本导致钉钉插件失效,群聊 @Agent 回复显示"✅ 任务执行完成(无文本输出)" |
34
+ | 2026-05-08 | 🌐 | 未注册的 Pong 监听器导致的 WebSocket 幻影重连,来源于 [PR #566](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/pull/566)([Majorshi](https://github.com/Majorshi) 提交) |
35
+
36
+ 完整更新日志:[FIXES.md](FIXES.md)([🇺🇸 English](FIXES.en.md))
37
+
38
+ ---
39
+
40
+ ## ✨ 增强功能
41
+
42
+ - 🔧 Markdown 图片发送支持直链和本地路径,无需下载到本地:
43
+ - Markdown 语法 `![图片注释](直链URL)` 或 `![图片注释](本地路径)` 直接发送图片
44
+ - 兼容 mediaId 格式
45
+ - ⚠️ 本插件支持图文发送,但钉钉侧不会主动触发此功能,需使用以下提示词引导 Agent:
46
+
47
+ ```
48
+ 请你把以下发送图片的方式写成你的钉钉图片发送skill,当涉及到图片发送,则调用该技能:用markdown语法发送图片,支持添加图片注释实现图文并茂;直链图片或本地路径文件均可直接嵌入markdown发送,如本地路径含空格请先重命名去除空格再发送。
49
+ ```
50
+
51
+ - 🎨 支持自定义 AI Card 模板,可使用本人预制的卡片(含内容复制按钮),不填则使用官方默认卡片。
52
+
53
+ **单机器人:**
54
+
55
+ ```json
56
+ "channels": {
57
+ "dingtalk-connector": {
58
+ "enabled": true,
59
+ "clientId": "你的clientId",
60
+ "clientSecret": "你的clientSecret",
61
+ "cardTemplateId": "你的卡片模板ID.schema",
62
+ "cardContentVar": "content"
63
+ }
64
+ }
65
+ ```
66
+
67
+ **多机器人(多 Agent):** 每个账号可绑定不同机器人
68
+
69
+ ```json
70
+ "channels": {
71
+ "dingtalk-connector": {
72
+ "enabled": true,
73
+ "accounts": {
74
+ "main-bot": {
75
+ "enabled": true,
76
+ "name": "工作流机器人",
77
+ "clientId": "你的clientId",
78
+ "clientSecret": "你的clientSecret",
79
+ "cardTemplateId": "f9b75aac-713c-40e8-a17f-e236d7b5422b.schema",
80
+ "cardContentVar": "content"
81
+ },
82
+ "another-bot": {
83
+ "enabled": true,
84
+ "name": "另一个机器人",
85
+ "clientId": "另一个clientId",
86
+ "clientSecret": "另一个clientSecret",
87
+ "cardTemplateId": "f9b75aac-713c-40e8-a17f-e236d7b5422b.schema",
88
+ "cardContentVar": "content"
89
+ }
90
+ }
91
+ }
92
+ }
93
+ ```
94
+
95
+ | 参数 | 说明 |
96
+ |------|------|
97
+ | `clientId` / `clientSecret` | 单机器人模式直接填在顶层 |
98
+ | `accounts` | 多机器人模式,key 为账号标识名(可任意命名) |
99
+ | `accounts.*.enabled` | 是否启用该账号 |
100
+ | `accounts.*.name` | 账号显示名称(仅用于标识) |
101
+ | `accounts.*.clientId` | 钉钉应用 ClientId |
102
+ | `accounts.*.clientSecret` | 钉钉应用 ClientSecret |
103
+ | `cardTemplateId` | AI Card 模板 ID,不填则使用官方默认模板 |
104
+ | `cardContentVar` | 最终回复内容变量名,不填默认 `msgContent` |
105
+ | `cardProcessVar` | 中间过程(block 状态)变量名,不填默认使用 `cardContentVar` |
106
+ | `cardToolVar` | 工具调用输出变量名,不填则不写入卡片 |
107
+
108
+ > 卡片模板需在[钉钉开放平台](https://open.dingtalk.com/)创建,并添加对应的变量字段。
109
+
110
+ **效果预览:**
111
+
112
+ ![自定义卡片效果](assets/image.png)
113
+
114
+ ---
115
+
116
+ ## 为什么 Fork?
117
+
118
+ 由于钉钉官方连接器那拉稀的仓库更新与 Bug 修复速度,所以 fork 了此仓库。
119
+
120
+ 本版本在官方代码基础上由社区进行 Bug 修复和维护。**BUG 采用 Claude Code 官方模型修复,保证最大修复效果。**
121
+
122
+ 欢迎民间大神提 PR,共建钉钉连接器生态!
123
+
124
+ ---
125
+
126
+ ## 与官方版本的差异
127
+
128
+ | 项目 | 说明 |
129
+ |------|------|
130
+ | 基础版本 | 官方 v0.8.20,功能完全一致 |
131
+ | 修复内容 | 官方一直不修的 Bug(见上方最近修复) |
132
+ | 维护方式 | 社区维护,持续跟进官方更新 |
133
+
134
+ ---
135
+
136
+ ## 安装与要求
137
+
138
+ 开始之前,请确保:
139
+
140
+ - **OpenClaw**:已安装并正常运行。详情请访问 [OpenClaw 官网](https://openclaw.ai/)
141
+ - **版本要求**:OpenClaw ≥ **2026.4.9**,通过 `openclaw -v` 查看
142
+
143
+ > 如低于此版本,执行 `npm install -g openclaw` 升级。
144
+
145
+ ---
146
+
147
+ ## 安装
148
+
149
+ > 与官方插件同 channel id(`dingtalk-connector`),`--force` 直接覆盖更新,**无需先卸载**官方版或旧版。
150
+
151
+ ### 方式一:npm(推荐)
152
+
153
+ 本版本已发布到 npm(`@jeik/dingtalk-connector`)。
154
+
155
+ **一键扫码安装**(推荐,钉钉扫码完成:机器人创建 → 凭证获取 → 插件安装 → 配置写入):
156
+
157
+ ```bash
158
+ npx -y @jeik/dingtalk-connector install
159
+ ```
160
+
161
+ **或仅安装插件**(自行配置凭证,见下方进阶文档):
162
+
163
+ ```bash
164
+ openclaw plugins install @jeik/dingtalk-connector --force
165
+ # 或
166
+ npx openclaw@latest add @jeik/dingtalk-connector
167
+
168
+ openclaw gateway restart
169
+ ```
170
+
171
+ ### 方式二:本地构建产物(开发 / 离线)
172
+
173
+ ```bash
174
+ # 1. 克隆仓库
175
+ git clone https://ghfast.top/https://github.com/jeikl/dingtalk-openclaw-connector-fix-Community.git
176
+ cd dingtalk-openclaw-connector-fix-Community
177
+
178
+ # 2. 安装依赖 & 构建 & 打包(npm 或 pnpm 任选)
179
+ npm install && npm run build && npm pack # → jeik-dingtalk-connector-0.8.21.tgz
180
+ # pnpm install && pnpm run build && pnpm pack
181
+
182
+ # 3. 安装到 OpenClaw 并重启
183
+ openclaw plugins install ./jeik-dingtalk-connector-0.8.21.tgz --force
184
+ openclaw gateway restart
185
+ ```
186
+
187
+ ---
188
+
189
+ ## 使用指南
190
+
191
+ [OpenClaw 钉钉官方插件使用指南](https://alidocs.dingtalk.com/i/nodes/2Amq4vjg89GEno0zfPqoPGqdV3kdP0wQ?utm_scene=team_space)
192
+
193
+ ---
194
+
195
+ ## 进阶文档
196
+
197
+ - [手动配置指南](docs/DINGTALK_MANUAL_SETUP.md) — 手动填写凭证配置
198
+ - [钉钉 DEAP Agent 集成](docs/DEAP_AGENT_GUIDE.md) — 本地设备操作能力
199
+ - [多 Agent 路由配置](docs/MULTI_AGENT_SETUP.md) — 多机器人绑定不同 Agent
200
+ - [常见问题](docs/TROUBLESHOOTING.md) — 安装与使用问题排查
201
+ - [官方 README(中文)](README_DINGTALK_OFFICIAL.md)
202
+ - [Official README(English)](README_DINGTALK_OFFICIAL_en.md)
203
+
204
+ ---
205
+
206
+ ## 贡献
207
+
208
+ 欢迎社区贡献!Bug 修复或功能建议,请提交 [Issue](https://github.com/jeikl/dingtalk-openclaw-connector-fix-Community/issues) 或 Pull Request。
209
+
210
+ ---
211
+
212
+ ## 许可证
213
+
214
+ 本项目基于 [MIT](LICENSE) 许可证。
215
+
216
+ ---
217
+
218
+ ## 支持
219
+
220
+ - **问题反馈**:[GitHub Issues](https://github.com/jeikl/dingtalk-openclaw-connector-fix-Community/issues)
221
+ - **更新日志**:[CHANGELOG.md](CHANGELOG.md)