@jeik/dingtalk-connector 0.8.29 → 0.8.31

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/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@ 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.31] - 2026-07-29
9
+
10
+ ### Fixes
11
+
12
+ - **manifest 版本自动对齐** — `prepublishOnly` 将 `openclaw.plugin.json` 的 `version` 同步为 `package.json` 版本,避免 `plugins install --force` 后 package 已是新版、inspect 仍显示旧 manifest 版本。
13
+
14
+ ## [0.8.30] - 2026-07-28
15
+
16
+ ### Fixes
17
+
18
+ - **incomplete_turn 误报不定格错误卡** — 上游 `final + isError` 文案为 `Agent couldn't generate a response`,但卡片已有真实答案(`lastAnswerText`/`accumulatedText` ≥20 字)时,忽略该误报,用已有答案 `closeStreaming`,不再覆盖正文/定格错误(避免网关误报后卡片停止流式)。
19
+
8
20
  ## [0.8.29] - 2026-07-25
9
21
 
10
22
  ### 主题
@@ -23,14 +35,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
23
35
 
24
36
  ### 安装
25
37
 
38
+ **npx(一键扫码,按顺序试):**
39
+
26
40
  ```bash
27
- # 1)装最新
28
- openclaw plugins install @jeik/dingtalk-connector --force && openclaw gateway restart
41
+ npx @jeik/dingtalk-connector install --force && openclaw gateway restart
42
+ npx @jeik/dingtalk-connector@0.8.29 install --force && openclaw gateway restart
43
+ NPM_CONFIG_REGISTRY=https://registry.npmjs.org npx @jeik/dingtalk-connector@0.8.29 install --force && openclaw gateway restart
44
+ ```
29
45
 
30
- # 2)若不是最新,指定版本
31
- openclaw plugins install @jeik/dingtalk-connector@0.8.29 --force && openclaw gateway restart
46
+ **openclaw plugins install(只装插件,按顺序试):**
32
47
 
33
- # 3)仍失败时走 npm 官方源
48
+ ```bash
49
+ openclaw plugins install @jeik/dingtalk-connector --force && openclaw gateway restart
50
+ openclaw plugins install @jeik/dingtalk-connector@0.8.29 --force && openclaw gateway restart
34
51
  NPM_CONFIG_REGISTRY=https://registry.npmjs.org openclaw plugins install @jeik/dingtalk-connector@0.8.29 --force && openclaw gateway restart
35
52
  ```
36
53
 
package/README.en.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <p>Community-enhanced fork based on official <strong>v0.8.24</strong>: adopts official long-connection improvements, plus stronger message delivery, queue feedback, and error-card UX.<br/>
5
5
  Keeps <strong>this repo’s unique</strong> extras (images, answer cards, first-response UX) and continues to fix issues not yet covered upstream.</p>
6
6
 
7
- <p><strong>Current release: <a href="https://www.npmjs.com/package/@jeik/dingtalk-connector">@jeik/dingtalk-connector</a> v0.8.29</strong></p>
7
+ <p><strong>Current release: <a href="https://www.npmjs.com/package/@jeik/dingtalk-connector">@jeik/dingtalk-connector</a> v0.8.31</strong></p>
8
8
 
9
9
  <p>
10
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>
@@ -23,7 +23,7 @@
23
23
 
24
24
  ## 🔧 Recent Updates
25
25
 
26
- ### 🚀 v0.8.29 · 2026-07-25 (current)
26
+ ### 🚀 v0.8.31 · 2026-07-29 (current)
27
27
 
28
28
  **Theme: production hardening · quieter logs · debug config only**
29
29
 
@@ -37,13 +37,9 @@ Built on **0.8.28** (steadier connection / fewer lost messages / clearer error c
37
37
  | ⚠️ **Model failures** | 503 / billing / no-channel settle to clear Chinese cards instead of spinning forever |
38
38
  | 🃏 **This repo’s unique extras** | Answer cards, full image paths, first-response UX remain |
39
39
 
40
- ```bash
41
- openclaw plugins install @jeik/dingtalk-connector --force && openclaw gateway restart
42
- ```
43
-
44
40
  ### 📦 v0.8.28 · 2026-07-25
45
41
 
46
- Official 0.8.24-aligned connection & delivery hardening (included in 0.8.29).
42
+ Official 0.8.24-aligned connection & delivery hardening (included in 0.8.31).
47
43
 
48
44
  ### 📦 v0.8.26 / 0.8.25 and earlier
49
45
 
@@ -51,45 +47,65 @@ Target ID rules, sender identity, answer cards, image fixes — see [CHANGELOG.m
51
47
 
52
48
  ---
53
49
 
54
- ## Enhanced Features
50
+ ## 🚀 Quick Start
55
51
 
56
- ### 🖼️ Image sending: full fix & upgrade
52
+ ### Requirements
57
53
 
58
- > 🔥 **No dead corners** · mixed send paths · far beyond the official’s weak image pipeline
59
- > Chat · message direct · ✅ markdown embed · ✅ split or merge layout
54
+ - **OpenClaw** installed and running ([website](https://openclaw.ai/))
55
+ - **Version**: OpenClaw **2026.4.9** (`openclaw -v`)
56
+ - Same channel id as official (`dingtalk-connector`); `--force` overwrites — **no uninstall** needed
57
+ - Always `openclaw gateway restart` after install/upgrade
60
58
 
61
- Full-path image fixes — every channel below renders correctly:
59
+ Package: [`@jeik/dingtalk-connector`](https://www.npmjs.com/package/@jeik/dingtalk-connector)
62
60
 
63
- | | Path | Capability |
64
- |--|------|------------|
65
- | 💬 | **Normal chat reply** | Agent embeds `![alt](…)`; upload to mediaId before finalize |
66
- | 📤 | **message · mediaUrl** | Proactive direct send (local / LAN / public) |
67
- | 📝 | **message · markdown body** | Nested `![](…)` (local / `file://` / URL) with text |
68
- | ⚙️ | **Configurable layout** | Default 📎 **separate**; `messageImageMd: true` → 🧩 **merge** one markdown |
61
+ ### A) npx one-command QR install (try in order)
69
62
 
70
- #### 🌐 Source types covered
63
+ ```bash
64
+ # 1) Install latest
65
+ npx @jeik/dingtalk-connector install --force && openclaw gateway restart
71
66
 
72
- | | Type | Examples |
73
- |--|------|----------|
74
- | 🌍 | Public URL | `https://…` |
75
- | 🏠 | Private / LAN URL | `http://intranet/…` |
76
- | 📁 | Local absolute path | `/tmp/…` · `/root/…` |
77
- | 💾 | **`/mnt` mounts** | Chinese paths · SMB shares |
78
- | 🔗 | `file://` URI | `file:///mnt/…` · `file:///tmp/…` |
79
- | 🆔 | Existing mediaId | `@lADP…` |
67
+ # 2) If you did not get the latest, pin the version
68
+ npx @jeik/dingtalk-connector@0.8.31 install --force && openclaw gateway restart
80
69
 
81
- #### 🛡️ Extra safeguards
70
+ # 3) If it still fails, force the official npm registry
71
+ NPM_CONFIG_REGISTRY=https://registry.npmjs.org npx @jeik/dingtalk-connector@0.8.31 install --force && openclaw gateway restart
72
+ ```
82
73
 
83
- - 📦 Code-block / inline-code paths are **not** uploaded
84
- - ⬇️ Remote: **download then upload**; local: **`/tmp` retry** on failure
85
- - 🫧 Image + download link in **one bubble**: `![]` → mediaId, URL kept as-is
74
+ ### B) Plugin only (credentials already set; try in order)
86
75
 
87
- ### 🎨 AI Card template
76
+ ```bash
77
+ # 1) Install latest
78
+ openclaw plugins install @jeik/dingtalk-connector --force && openclaw gateway restart
88
79
 
89
- - Custom stream cards; **if `cardTemplateId` is omitted**, defaults to
90
- `0d2c84b3-12c1-473b-b14a-f329a7a102cd.schema` (📋 copy button, etc.)
80
+ # 2) If you did not get the latest, pin the version
81
+ openclaw plugins install @jeik/dingtalk-connector@0.8.31 --force && openclaw gateway restart
82
+
83
+ # 3) If it still fails, force the official npm registry
84
+ NPM_CONFIG_REGISTRY=https://registry.npmjs.org openclaw plugins install @jeik/dingtalk-connector@0.8.31 --force && openclaw gateway restart
85
+ ```
86
+
87
+ ### Local tgz / from source (dev / offline)
88
+
89
+ ```bash
90
+ git clone https://github.com/jeikl/dingtalk-openclaw-connector-fix-Community.git
91
+ cd dingtalk-openclaw-connector-fix-Community
92
+ npm install && npm run build && npm pack
93
+ openclaw plugins install ./jeik-dingtalk-connector-0.8.31.tgz --force && openclaw gateway restart
94
+ ```
95
+
96
+ ### Smoke check
91
97
 
92
- ### ⚙️ Minimal config
98
+ ```bash
99
+ openclaw -v
100
+ openclaw plugins list
101
+ # Send a DingTalk message — first “summoning model…”, then streaming / answer card
102
+ ```
103
+
104
+ ---
105
+
106
+ ## ⚙️ Configuration
107
+
108
+ ### Minimal config
93
109
 
94
110
  ```json
95
111
  "channels": {
@@ -107,8 +123,6 @@ Defaults apply: stream card `0d2c84b3-…schema`, session answer card on, messag
107
123
 
108
124
  ### Maximal config (for illustration; defaults written out)
109
125
 
110
- **Single Agent** and **multi Agent** (all values are defaults — **not extra features**).
111
-
112
126
  **Single Agent (top-level credentials):**
113
127
 
114
128
  ```json
@@ -183,12 +197,64 @@ Defaults apply: stream card `0d2c84b3-…schema`, session answer card on, messag
183
197
  | `answerCardTemplateId` | string | `d246b7f5-1783-4e9b-bb46-bef52d63050e.schema` | Static answer card template |
184
198
  | `messageAnswerCard` | boolean | **true** | message-tool body via answer card; `false` = plain message |
185
199
  | `messageImageMd` | boolean | **false** | message images: separate vs merge markdown |
200
+ | `debug` | boolean | **false** | Verbose diagnostics (connection / image mediaId / quote / queue). **Off in production**; set `true` then restart gateway |
186
201
 
187
202
  > `answerCard` = conversation finalize; `messageAnswerCard` = message-tool outbound.
188
203
 
204
+ **Temporary debug example:**
205
+
206
+ ```json
207
+ "channels": {
208
+ "dingtalk-connector": {
209
+ "enabled": true,
210
+ "clientId": "…",
211
+ "clientSecret": "…",
212
+ "debug": true
213
+ }
214
+ }
215
+ ```
216
+
189
217
  ---
190
218
 
191
- ## 🎯 Reply markers + Answer card + Tool progress (core enhancements)
219
+ ## Enhanced Features
220
+
221
+ ### 🖼️ Image sending: full fix & upgrade
222
+
223
+ > 🔥 **No dead corners** · mixed send paths · far beyond the official’s weak image pipeline
224
+ > ✅ Chat · ✅ message direct · ✅ markdown embed · ✅ split or merge layout
225
+
226
+ Full-path image fixes — every channel below renders correctly:
227
+
228
+ | | Path | Capability |
229
+ |--|------|------------|
230
+ | 💬 | **Normal chat reply** | Agent embeds `![alt](…)`; upload to mediaId before finalize |
231
+ | 📤 | **message · mediaUrl** | Proactive direct send (local / LAN / public) |
232
+ | 📝 | **message · markdown body** | Nested `![](…)` (local / `file://` / URL) with text |
233
+ | ⚙️ | **Configurable layout** | Default 📎 **separate**; `messageImageMd: true` → 🧩 **merge** one markdown |
234
+
235
+ #### 🌐 Source types covered
236
+
237
+ | | Type | Examples |
238
+ |--|------|----------|
239
+ | 🌍 | Public URL | `https://…` |
240
+ | 🏠 | Private / LAN URL | `http://intranet/…` |
241
+ | 📁 | Local absolute path | `/tmp/…` · `/root/…` |
242
+ | 💾 | **`/mnt` mounts** | Chinese paths · SMB shares |
243
+ | 🔗 | `file://` URI | `file:///mnt/…` · `file:///tmp/…` |
244
+ | 🆔 | Existing mediaId | `@lADP…` |
245
+
246
+ #### 🛡️ Extra safeguards
247
+
248
+ - 📦 Code-block / inline-code paths are **not** uploaded
249
+ - ⬇️ Remote: **download then upload**; local: **`/tmp` retry** on failure
250
+ - 🫧 Image + download link in **one bubble**: `![]` → mediaId, URL kept as-is
251
+
252
+ ### 🎨 AI Card template
253
+
254
+ - ✨ Custom stream cards; **if `cardTemplateId` is omitted**, defaults to
255
+ `0d2c84b3-12c1-473b-b14a-f329a7a102cd.schema` (📋 copy button, etc.)
256
+
257
+ ### 🎯 Reply markers + Answer card + Tool progress
192
258
 
193
259
  These make the "process → final answer" rendering on DingTalk cleaner and more stable, working around DingTalk's official streaming AI Card bug:
194
260
 
@@ -224,53 +290,6 @@ Community contributions (features & bug fixes) are always welcome — submit a P
224
290
 
225
291
  ---
226
292
 
227
- ## Requirements & Installation
228
-
229
- - **OpenClaw** installed and running ([website](https://openclaw.ai/))
230
- - **Version**: OpenClaw ≥ **2026.4.9** (`openclaw -v`)
231
- - Same channel id as official (`dingtalk-connector`); `--force` overwrites — **no uninstall** needed
232
- - Always `openclaw gateway restart` after install/upgrade
233
-
234
- Package: [`@jeik/dingtalk-connector`](https://www.npmjs.com/package/@jeik/dingtalk-connector)
235
-
236
- ### Three install commands (try in order)
237
-
238
- ```bash
239
- # 1) Install latest
240
- openclaw plugins install @jeik/dingtalk-connector --force && openclaw gateway restart
241
-
242
- # 2) If you did not get the latest, pin the version
243
- openclaw plugins install @jeik/dingtalk-connector@0.8.29 --force && openclaw gateway restart
244
-
245
- # 3) If it still fails, force the official npm registry
246
- NPM_CONFIG_REGISTRY=https://registry.npmjs.org openclaw plugins install @jeik/dingtalk-connector@0.8.29 --force && openclaw gateway restart
247
- ```
248
-
249
- > Optional QR wizard: `npx @jeik/dingtalk-connector install --force`
250
-
251
- ### Local tgz / from source (dev / offline)
252
-
253
- ```bash
254
- git clone https://github.com/jeikl/dingtalk-openclaw-connector-fix-Community.git
255
- cd dingtalk-openclaw-connector-fix-Community
256
- npm install && npm run build && npm pack
257
- openclaw plugins install ./jeik-dingtalk-connector-0.8.29.tgz --force && openclaw gateway restart
258
- ```
259
-
260
- ### Smoke check
261
-
262
- ```bash
263
- openclaw -v
264
- openclaw plugins list
265
- # Send a DingTalk message — first “summoning model…”, then streaming / answer card
266
- ```
267
-
268
- ### Debug logs
269
-
270
- Set `"debug": true` under `channels.dingtalk-connector` (or a specific account), then restart the gateway. No environment variables required.
271
-
272
- ---
273
-
274
293
  ## Usage Guide
275
294
 
276
295
  [OpenClaw DingTalk Plugin User Guide](https://alidocs.dingtalk.com/i/nodes/2Amq4vjg89GEno0zfPqoPGqdV3kdP0wQ?utm_scene=team_space)
@@ -303,4 +322,4 @@ This project is licensed under the [MIT](LICENSE) License.
303
322
  ## Support
304
323
 
305
324
  - **Issues**: [GitHub Issues](https://github.com/jeikl/dingtalk-openclaw-connector-fix-Community/issues)
306
- - **Changelog**: [CHANGELOG.md](CHANGELOG.md)
325
+ - **Changelog**: [CHANGELOG.md](CHANGELOG.md)
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
  <p>基于官方最新 <strong>v0.8.24</strong> 的社区增强版:吸收官方长连接改进,并重点优化消息接收、排队反馈与模型错误展示。<br/>
5
5
  保留社区在图片、答案卡、首响体验上的增强,持续修官方暂未覆盖的实际使用问题。</p>
6
6
 
7
- <p><strong>当前正式版:<a href="https://www.npmjs.com/package/@jeik/dingtalk-connector">@jeik/dingtalk-connector</a> v0.8.29</strong></p>
7
+ <p><strong>当前正式版:<a href="https://www.npmjs.com/package/@jeik/dingtalk-connector">@jeik/dingtalk-connector</a> v0.8.31</strong></p>
8
8
 
9
9
  <p>
10
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>
@@ -23,7 +23,7 @@
23
23
 
24
24
  ## 🔧 最近更新
25
25
 
26
- ### 🚀 v0.8.29 · 2026-07-25(当前正式版)
26
+ ### 🚀 v0.8.31 · 2026-07-29(当前正式版)
27
27
 
28
28
  **主题:正式加固 · 日志更干净 · 排障只开 debug**
29
29
 
@@ -37,13 +37,9 @@
37
37
  | ⚠️ **模型故障** | 503 / 欠费 / 无通道等更容易定格中文错误,少卡「正在召唤大模型」 |
38
38
  | 🃏 **本仓库独有** | 答案卡、图片全路径、首响体验等继续保留 |
39
39
 
40
- ```bash
41
- openclaw plugins install @jeik/dingtalk-connector --force && openclaw gateway restart
42
- ```
43
-
44
40
  ### 📦 v0.8.28 · 2026-07-25
45
41
 
46
- 基于官方 0.8.24 的长连接与消息体验加固(当前能力已并入 0.8.29)。
42
+ 基于官方 0.8.24 的长连接与消息体验加固(当前能力已并入 0.8.31)。
47
43
 
48
44
  ### 📦 v0.8.26 / 0.8.25 及更早
49
45
 
@@ -51,45 +47,65 @@ openclaw plugins install @jeik/dingtalk-connector --force && openclaw gateway re
51
47
 
52
48
  ---
53
49
 
54
- ## 增强功能
50
+ ## 🚀 快速开始
55
51
 
56
- ### 🖼️ 图片发送:全面修复与增强
52
+ ### 要求
57
53
 
58
- > 🔥 **毫无死角** · 混合发图 · 全面碾压官方薄弱的图片机制
59
- > 对话发图 · ✅ message 直发 · ✅ markdown 嵌图 · ✅ 文图可分可合
54
+ - **OpenClaw** 已安装并正常运行([官网](https://openclaw.ai/))
55
+ - **版本**:OpenClaw **2026.4.9**(`openclaw -v`)
56
+ - 与官方插件同 channel id(`dingtalk-connector`),`--force` 可直接覆盖,**无需先卸载**
57
+ - 安装/更新后**必须** `openclaw gateway restart`
60
58
 
61
- 对官方图片发送做了**全路径修复增强**,多通道混合发图,全部显示正常:
59
+ 包名:[`@jeik/dingtalk-connector`](https://www.npmjs.com/package/@jeik/dingtalk-connector)
62
60
 
63
- | | 发送方式 | 能力 |
64
- |--|----------|------|
65
- | 💬 | **普通对话回复** | Agent 用 `![注释](…)` 嵌图,定稿前自动上传 mediaId |
66
- | 📤 | **message · mediaUrl** | 机器人主动触发直发(本地 / 内网 / 公网) |
67
- | 📝 | **message · markdown 正文** | 正文嵌 `![](…)`(本地 / `file://` / 直链)与文字同条 |
68
- | ⚙️ | **文图策略可配** | 默认 📎 **分开**;`messageImageMd: true` → 🧩 **合并**一条 markdown |
61
+ ### A)npx 一键扫码安装(按顺序试)
69
62
 
70
- #### 🌐 路径与协议全覆盖
63
+ ```bash
64
+ # 1)装最新
65
+ npx @jeik/dingtalk-connector install --force && openclaw gateway restart
71
66
 
72
- | | 类型 | 示例 |
73
- |--|------|------|
74
- | 🌍 | 公网直链 | `https://…` |
75
- | 🏠 | 内网直链 | `http://内网主机/…` |
76
- | 📁 | 本地绝对路径 | `/tmp/…` · `/root/…` |
77
- | 💾 | **`/mnt` 挂载盘** | 中文目录 · 共享盘 · SMB |
78
- | 🔗 | `file://` URI | `file:///mnt/…` · `file:///tmp/…` |
79
- | 🆔 | 已有 mediaId | `@lADP…` |
67
+ # 2)若装到的不是最新,指定版本号
68
+ npx @jeik/dingtalk-connector@0.8.31 install --force && openclaw gateway restart
80
69
 
81
- #### 🛡️ 细节兜底
70
+ # 3)若仍装不了,强制走 npm 官方源
71
+ NPM_CONFIG_REGISTRY=https://registry.npmjs.org npx @jeik/dingtalk-connector@0.8.31 install --force && openclaw gateway restart
72
+ ```
82
73
 
83
- - 📦 代码块 / 行内 code 路径 **不会误上传**(参数说明原文保留)
84
- - ⬇️ 远程图 **先下载再上传**;本地失败会 **`/tmp` 重试**
85
- - 🫧 图 + 下载链接 **同泡共存**:`![]` → mediaId,下载 URL 仍是原链
74
+ ### B)只装插件(凭证已配好时,按顺序试)
86
75
 
87
- ### 🎨 AI Card 模板
76
+ ```bash
77
+ # 1)装最新
78
+ openclaw plugins install @jeik/dingtalk-connector --force && openclaw gateway restart
88
79
 
89
- - ✨ 支持自定义流式卡;**不填 `cardTemplateId` 默认**
90
- `0d2c84b3-12c1-473b-b14a-f329a7a102cd.schema`(含 📋 复制按钮等)
80
+ # 2)若装到的不是最新,指定版本号
81
+ openclaw plugins install @jeik/dingtalk-connector@0.8.31 --force && openclaw gateway restart
82
+
83
+ # 3)若仍装不了,强制走 npm 官方源
84
+ NPM_CONFIG_REGISTRY=https://registry.npmjs.org openclaw plugins install @jeik/dingtalk-connector@0.8.31 --force && openclaw gateway restart
85
+ ```
86
+
87
+ ### 本地 tgz / 源码(开发、离线)
88
+
89
+ ```bash
90
+ git clone https://github.com/jeikl/dingtalk-openclaw-connector-fix-Community.git
91
+ cd dingtalk-openclaw-connector-fix-Community
92
+ npm install && npm run build && npm pack
93
+ openclaw plugins install ./jeik-dingtalk-connector-0.8.31.tgz --force && openclaw gateway restart
94
+ ```
95
+
96
+ ### 安装后自检
97
+
98
+ ```bash
99
+ openclaw -v # ≥ 2026.4.9
100
+ openclaw plugins list # 应看到 dingtalk-connector / @jeik/dingtalk-connector
101
+ # 发一条钉钉消息:应先「正在召唤大模型…」,再流式/答案卡
102
+ ```
103
+
104
+ ---
91
105
 
92
- ### ⚙️ 最小配置(够跑)
106
+ ## ⚙️ 配置
107
+
108
+ ### 最小配置(够跑)
93
109
 
94
110
  ```json
95
111
  "channels": {
@@ -107,8 +123,6 @@ openclaw plugins install @jeik/dingtalk-connector --force && openclaw gateway re
107
123
 
108
124
  ### 最大化配置(展示用,默认值写全)
109
125
 
110
- 按单 Agent / 多 Agent 两种写法(值均为默认,**不等于额外能力**)。
111
-
112
126
  **单 Agent(顶层凭证):**
113
127
 
114
128
  ```json
@@ -202,7 +216,45 @@ openclaw plugins install @jeik/dingtalk-connector --force && openclaw gateway re
202
216
 
203
217
  ---
204
218
 
205
- ## 🎯 回复标记 + 答案卡 + 工具进度(核心增强)
219
+ ## 增强功能
220
+
221
+ ### 🖼️ 图片发送:全面修复与增强
222
+
223
+ > 🔥 **毫无死角** · 混合发图 · 全面碾压官方薄弱的图片机制
224
+ > ✅ 对话发图 · ✅ message 直发 · ✅ markdown 嵌图 · ✅ 文图可分可合
225
+
226
+ 对官方图片发送做了**全路径修复增强**,多通道混合发图,全部显示正常:
227
+
228
+ | | 发送方式 | 能力 |
229
+ |--|----------|------|
230
+ | 💬 | **普通对话回复** | Agent 用 `![注释](…)` 嵌图,定稿前自动上传 mediaId |
231
+ | 📤 | **message · mediaUrl** | 机器人主动触发直发(本地 / 内网 / 公网) |
232
+ | 📝 | **message · markdown 正文** | 正文嵌 `![](…)`(本地 / `file://` / 直链)与文字同条 |
233
+ | ⚙️ | **文图策略可配** | 默认 📎 **分开**;`messageImageMd: true` → 🧩 **合并**一条 markdown |
234
+
235
+ #### 🌐 路径与协议全覆盖
236
+
237
+ | | 类型 | 示例 |
238
+ |--|------|------|
239
+ | 🌍 | 公网直链 | `https://…` |
240
+ | 🏠 | 内网直链 | `http://内网主机/…` |
241
+ | 📁 | 本地绝对路径 | `/tmp/…` · `/root/…` |
242
+ | 💾 | **`/mnt` 挂载盘** | 中文目录 · 共享盘 · SMB |
243
+ | 🔗 | `file://` URI | `file:///mnt/…` · `file:///tmp/…` |
244
+ | 🆔 | 已有 mediaId | `@lADP…` |
245
+
246
+ #### 🛡️ 细节兜底
247
+
248
+ - 📦 代码块 / 行内 code 路径 **不会误上传**(参数说明原文保留)
249
+ - ⬇️ 远程图 **先下载再上传**;本地失败会 **`/tmp` 重试**
250
+ - 🫧 图 + 下载链接 **同泡共存**:`![]` → mediaId,下载 URL 仍是原链
251
+
252
+ ### 🎨 AI Card 模板
253
+
254
+ - ✨ 支持自定义流式卡;**不填 `cardTemplateId` 默认**
255
+ `0d2c84b3-12c1-473b-b14a-f329a7a102cd.schema`(含 📋 复制按钮等)
256
+
257
+ ### 🎯 回复标记 + 答案卡 + 工具进度
206
258
 
207
259
  这套机制让钉钉侧的「过程 → 最终答案」渲染更干净、更稳定,规避钉钉流式 AI Card 的官方渲染 bug:
208
260
 
@@ -242,49 +294,6 @@ openclaw plugins install @jeik/dingtalk-connector --force && openclaw gateway re
242
294
 
243
295
  ---
244
296
 
245
- ## 安装与要求
246
-
247
- - **OpenClaw** 已安装并正常运行([官网](https://openclaw.ai/))
248
- - **版本**:OpenClaw ≥ **2026.4.9**(`openclaw -v`)
249
- - 与官方插件同 channel id(`dingtalk-connector`),`--force` 可直接覆盖,**无需先卸载**
250
- - 安装/更新后**必须** `openclaw gateway restart`
251
-
252
- 包名:[`@jeik/dingtalk-connector`](https://www.npmjs.com/package/@jeik/dingtalk-connector)
253
-
254
- ### 三条安装命令(按顺序试)
255
-
256
- ```bash
257
- # 1)装最新
258
- openclaw plugins install @jeik/dingtalk-connector --force && openclaw gateway restart
259
-
260
- # 2)若装到的不是最新,指定版本号
261
- openclaw plugins install @jeik/dingtalk-connector@0.8.29 --force && openclaw gateway restart
262
-
263
- # 3)若仍装不了,强制走 npm 官方源
264
- NPM_CONFIG_REGISTRY=https://registry.npmjs.org openclaw plugins install @jeik/dingtalk-connector@0.8.29 --force && openclaw gateway restart
265
- ```
266
-
267
- > 一键扫码建机器人(可选):`npx @jeik/dingtalk-connector install --force`
268
-
269
- ### 本地 tgz / 源码(开发、离线)
270
-
271
- ```bash
272
- git clone https://github.com/jeikl/dingtalk-openclaw-connector-fix-Community.git
273
- cd dingtalk-openclaw-connector-fix-Community
274
- npm install && npm run build && npm pack
275
- openclaw plugins install ./jeik-dingtalk-connector-0.8.29.tgz --force && openclaw gateway restart
276
- ```
277
-
278
- ### 安装后自检
279
-
280
- ```bash
281
- openclaw -v # ≥ 2026.4.9
282
- openclaw plugins list # 应看到 dingtalk-connector / @jeik/dingtalk-connector
283
- # 发一条钉钉消息:应先「正在召唤大模型…」,再流式/答案卡
284
- ```
285
-
286
- ---
287
-
288
297
  ## 使用指南
289
298
 
290
299
  [OpenClaw 钉钉官方插件使用指南](https://alidocs.dingtalk.com/i/nodes/2Amq4vjg89GEno0zfPqoPGqdV3kdP0wQ?utm_scene=team_space)
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { a as initDingtalkPluginConfigSchema, i as dingtalkPlugin, n as setDingtalkRuntime } from "./runtime-DbqGRyhI.mjs";
1
+ import { a as initDingtalkPluginConfigSchema, i as dingtalkPlugin, n as setDingtalkRuntime } from "./runtime-CjE4Z9G5.mjs";
2
2
  import { t as registerGatewayMethods } from "./gateway-methods-BdcpfxEZ.mjs";
3
3
  //#region index.ts
4
4
  /**
@@ -1,5 +1,5 @@
1
1
  import { a as resolveDingtalkAccount } from "./accounts-BAzdqkAV.mjs";
2
- import { r as CHANNEL_ID, t as getDingtalkRuntime } from "./runtime-DbqGRyhI.mjs";
2
+ import { r as CHANNEL_ID, t as getDingtalkRuntime } from "./runtime-CjE4Z9G5.mjs";
3
3
  import { n as createLoggerFromConfig, r as isDingtalkDebug } from "./logger-CnBTcwyq.mjs";
4
4
  import { t as dingtalkHttp } from "./http-client-DFWZgO1n.mjs";
5
5
  import { i as getOapiAccessToken } from "./utils-CIfI_3Jh.mjs";
@@ -810,6 +810,13 @@ function createDingtalkReplyDispatcher(params) {
810
810
  await startStreaming();
811
811
  if (isNonAnswerPayload(payload)) {
812
812
  const isModelErrorFinal = Boolean(payload.isError) && info?.kind === "final" && Boolean(text.trim());
813
+ const existingAnswerText = (lastAnswerText.trim() || accumulatedText.trim()).trim();
814
+ if (isModelErrorFinal && /Agent couldn't generate a response/i.test(text) && existingAnswerText.length >= 20 && !/Agent couldn't generate a response/i.test(existingAnswerText)) {
815
+ pendingErrorText = null;
816
+ log.warn(`[DingTalk][deliver] 忽略 incomplete_turn 误报 isError final(卡片已有真实答案 len=${existingAnswerText.length}),不定格错误卡`);
817
+ await closeStreaming();
818
+ return;
819
+ }
813
820
  if (isModelErrorFinal) {
814
821
  accumulatedText = text;
815
822
  log.info(`[DingTalk][deliver] 将上游异常 final 文本存入 accumulatedText(len=${text.length}),防止 onIdle 覆盖`);
@@ -956,7 +956,7 @@ async function monitorDingtalkProvider(opts = {}) {
956
956
  const log = createLogger(cfg.channels?.["dingtalk-connector"]?.debug ?? false);
957
957
  const [accountsModule, monitorAccountModule, monitorSingleModule] = await Promise.all([
958
958
  import("./accounts-BQptOmgB.mjs"),
959
- import("./message-handler-BrO2i7tg.mjs"),
959
+ import("./message-handler-BeTQQCUe.mjs"),
960
960
  import("./connection-obtrPkj4.mjs")
961
961
  ]);
962
962
  const { resolveDingtalkAccount, listEnabledDingtalkAccounts } = accountsModule;
@@ -36,6 +36,21 @@
36
36
 
37
37
  ## 安装
38
38
 
39
+ **npx(一键扫码,按顺序试):**
40
+
41
+ ```bash
42
+ # 1)装最新
43
+ npx @jeik/dingtalk-connector install --force && openclaw gateway restart
44
+
45
+ # 2)若不是最新,指定版本
46
+ npx @jeik/dingtalk-connector@0.8.29 install --force && openclaw gateway restart
47
+
48
+ # 3)仍失败时走 npm 官方源
49
+ NPM_CONFIG_REGISTRY=https://registry.npmjs.org npx @jeik/dingtalk-connector@0.8.29 install --force && openclaw gateway restart
50
+ ```
51
+
52
+ **openclaw plugins install(只装插件,按顺序试):**
53
+
39
54
  ```bash
40
55
  # 1)装最新
41
56
  openclaw plugins install @jeik/dingtalk-connector --force && openclaw gateway restart
@@ -1,20 +1,27 @@
1
1
  {
2
2
  "id": "dingtalk-connector",
3
3
  "name": "DingTalk Channel",
4
- "version": "0.8.29",
4
+ "version": "0.8.31",
5
5
  "description": "OpenClaw DingTalk channel plugin (community) | 钉钉 OpenClaw 社区增强版",
6
6
  "author": "jeik",
7
7
  "main": "index.ts",
8
8
  "channels": [
9
9
  "dingtalk-connector"
10
10
  ],
11
- "skills": ["./skills"],
11
+ "skills": [
12
+ "./skills"
13
+ ],
12
14
  "configSchema": {
13
15
  "type": "object",
14
16
  "additionalProperties": false,
15
17
  "properties": {
16
- "cardTemplateId": { "type": "string" },
17
- "cardContentVar": { "type": "string", "default": "content" }
18
+ "cardTemplateId": {
19
+ "type": "string"
20
+ },
21
+ "cardContentVar": {
22
+ "type": "string",
23
+ "default": "content"
24
+ }
18
25
  }
19
26
  },
20
27
  "channelConfigs": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jeik/dingtalk-connector",
3
- "version": "0.8.29",
3
+ "version": "0.8.31",
4
4
  "description": "OpenClaw DingTalk channel plugin (community) | 钉钉 OpenClaw 社区增强版(基于官方 0.8.24,长连接与消息体验增强)",
5
5
  "type": "module",
6
6
  "exports": {
@@ -38,7 +38,8 @@
38
38
  ],
39
39
  "scripts": {
40
40
  "build": "tsdown",
41
- "prepublishOnly": "npm run build",
41
+ "sync:plugin-version": "node scripts/sync-plugin-version.mjs",
42
+ "prepublishOnly": "npm run sync:plugin-version && npm run build",
42
43
  "lint": "echo 'Lint check skipped'",
43
44
  "lint:fix": "echo 'Lint fix skipped'",
44
45
  "test": "vitest run tests/gateway-methods.unit.test.ts",
@@ -1307,6 +1307,25 @@ export function createDingtalkReplyDispatcher(params: CreateDingtalkReplyDispatc
1307
1307
  const isModelErrorFinal =
1308
1308
  Boolean((payload as any).isError) && info?.kind === "final" && Boolean(text.trim());
1309
1309
 
1310
+ // Gateway incomplete_turn 误报:会话/流式已有真实答案,却仍发
1311
+ // "Agent couldn't generate a response" isError final。若覆盖 accumulatedText
1312
+ // 并 closeStreaming,钉钉卡会定格错误、后续过程不再流式。
1313
+ // 此时忽略误报,用已有 lastAnswerText/accumulatedText 正常收尾。
1314
+ const existingAnswerText = (lastAnswerText.trim() || accumulatedText.trim()).trim();
1315
+ const isIncompleteTurnFalsePositive =
1316
+ isModelErrorFinal &&
1317
+ /Agent couldn't generate a response/i.test(text) &&
1318
+ existingAnswerText.length >= 20 &&
1319
+ !/Agent couldn't generate a response/i.test(existingAnswerText);
1320
+ if (isIncompleteTurnFalsePositive) {
1321
+ pendingErrorText = null;
1322
+ log.warn(
1323
+ `[DingTalk][deliver] 忽略 incomplete_turn 误报 isError final(卡片已有真实答案 len=${existingAnswerText.length}),不定格错误卡`,
1324
+ );
1325
+ await closeStreaming();
1326
+ return;
1327
+ }
1328
+
1310
1329
  // ✅ 上游模型异常 final:必须写入 accumulatedText,供 closeStreaming 定稿。
1311
1330
  // 工具失败 (kind=tool) 仍不计入最终答案。
1312
1331
  if (isModelErrorFinal) {