@duckduck-cocode/dingtalk-connector 0.7.1

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.
@@ -0,0 +1,142 @@
1
+ # Release Notes - v0.7.0
2
+
3
+ ## 🎉 新版本亮点 / Highlights
4
+
5
+ 本次更新带来了丰富的富媒体和文档处理能力,让 AI 助手能够更好地理解和处理各种类型的内容。新增了图片识别、文件解析、钉钉文档操作和多 Agent 路由等核心功能。
6
+
7
+ This update brings rich media and document processing capabilities, enabling AI assistants to better understand and process various types of content. New core features include image recognition, file parsing, DingTalk document operations, and multi-Agent routing.
8
+
9
+ ## ✨ 新增功能 / Added Features
10
+
11
+ ### 富媒体接收支持 / Rich Media Reception Support
12
+ - ✅ **JPEG 图片消息** - 支持接收钉钉中直接发送的 JPEG 图片,自动下载到 `~/.openclaw/workspace/media/inbound/` 目录
13
+ **JPEG Image Messages** - Support receiving JPEG images sent directly in DingTalk, automatically downloaded to `~/.openclaw/workspace/media/inbound/` directory
14
+ - ✅ **PNG 图片(富文本)** - 支持接收富文本消息中包含的 PNG 图片,自动提取 URL 和 downloadCode 并下载
15
+ **PNG Images (Rich Text)** - Support receiving PNG images contained in rich text messages, automatically extract URL and downloadCode and download
16
+ - ✅ **视觉模型集成** - 下载的图片自动传递给视觉模型,AI 可以识别和分析图片内容
17
+ **Vision Model Integration** - Downloaded images are automatically passed to vision models, AI can recognize and analyze image content
18
+ - ✅ **媒体文件管理** - 统一的文件命名格式 `openclaw-media-{timestamp}.{ext}`,便于管理和追踪
19
+ **Media File Management** - Unified file naming format `openclaw-media-{timestamp}.{ext}` for easy management and tracking
20
+
21
+ ### 文件附件提取 / File Attachment Extraction
22
+ - ✅ **Word 文档解析** - 支持解析 `.docx` 文件,通过 `mammoth` 库提取文本内容并注入到 AI 上下文
23
+ **Word Document Parsing** - Support parsing `.docx` files, extract text content via `mammoth` library and inject into AI context
24
+ - ✅ **PDF 文档解析** - 支持解析 `.pdf` 文件,通过 `pdf-parse` 库提取文本内容并注入到 AI 上下文
25
+ **PDF Document Parsing** - Support parsing `.pdf` files, extract text content via `pdf-parse` library and inject into AI context
26
+ - ✅ **纯文本文件** - 支持读取 `.txt`、`.md`、`.json` 等纯文本文件,内容直接注入到消息中
27
+ **Plain Text Files** - Support reading plain text files (`.txt`, `.md`, `.json`, etc.), content directly injected into messages
28
+ - ✅ **二进制文件处理** - 支持处理 `.xlsx`、`.pptx`、`.zip` 等二进制文件,文件保存到磁盘并在消息中报告路径
29
+ **Binary File Processing** - Support processing binary files (`.xlsx`, `.pptx`, `.zip`, etc.), files saved to disk and paths reported in messages
30
+
31
+ ### 钉钉文档 API / DingTalk Document API
32
+ - ✅ **创建文档** - `docs.create()` - 在指定空间中创建新的钉钉文档
33
+ **Create Document** - `docs.create()` - Create new DingTalk documents in specified spaces
34
+ - ✅ **追加内容** - `docs.append()` - 在现有文档上追加 Markdown 内容
35
+ **Append Content** - `docs.append()` - Append Markdown content to existing documents
36
+ - ✅ **搜索文档** - `docs.search()` - 根据关键词搜索钉钉文档
37
+ **Search Documents** - `docs.search()` - Search DingTalk documents by keywords
38
+ - ✅ **列举文档** - `docs.list()` - 列举指定空间下的所有文档
39
+ **List Documents** - `docs.list()` - List all documents under specified spaces
40
+ - ⚠️ **读取文档** - `docs.read()` - 当前不可用(见已知问题)
41
+ **Read Document** - `docs.read()` - Currently unavailable (see Known Issues)
42
+
43
+ ### 多 Agent 路由支持 / Multi-Agent Routing Support
44
+ - ✅ **多 Agent 会话隔离** - 支持一个连接器实例同时连接多个 Agent
45
+ **Multi-Agent Session Isolation** - Support one connector instance connecting to multiple Agents simultaneously
46
+ - ✅ **多机器人绑定** - 支持多个钉钉机器人分别绑定到不同的 Agent,实现角色分工和专业化服务
47
+ **Multi-Bot Binding** - Support multiple DingTalk bots binding to different Agents, enabling role division and specialized services
48
+ - ✅ **独立会话空间** - 每个 Agent 拥有独立的会话上下文,互不干扰
49
+ **Independent Session Space** - Each Agent has an independent session context without interference
50
+ - ✅ **灵活配置** - 通过 `accounts` 和 `bindings` 配置多个机器人,提供详细的配置示例和说明
51
+ **Flexible Configuration** - Configure multiple bots via `accounts` and `bindings`, with detailed configuration examples and instructions
52
+ - ✅ **向后兼容** - 单 Agent 场景下功能完全兼容,无需额外配置
53
+ **Backward Compatible** - Fully compatible with single Agent scenarios, no additional configuration required
54
+
55
+ ## 🐛 修复 / Fixes
56
+
57
+ - **语音消息播放异常修复** - 修复机器人发送语音消息播放异常问题,音频进度和播放功能现已正常工作
58
+ **Voice Message Playback Fix** - Fixed bot voice message playback issues, audio progress and playback functionality now work correctly
59
+
60
+ ## 🔧 改进 / Improvements
61
+
62
+ - **媒体文件处理优化** - 优化了媒体文件下载和存储机制,提升处理效率
63
+ **Media File Processing Optimization** - Optimized media file download and storage mechanism, improved processing efficiency
64
+ - **文件附件流程改进** - 改进了文件附件处理流程,支持更多文件类型,错误处理更完善
65
+ **File Attachment Process Improvement** - Improved file attachment processing flow, supporting more file types with better error handling
66
+ - **Markdown 表格转换** - 自动将 Markdown 表格转换为钉钉支持的文本格式,提升消息可读性
67
+ **Markdown Table Conversion** - Automatically convert Markdown tables to DingTalk-supported text format for better message readability
68
+ - **日志增强** - 增强了错误处理和日志输出,便于问题排查和调试
69
+ **Log Enhancement** - Enhanced error handling and log output for easier troubleshooting and debugging
70
+
71
+ ## 📦 依赖更新 / Dependency Updates
72
+
73
+ - 新增 `mammoth@^1.8.0` - Word 文档(.docx)解析库
74
+ Added `mammoth@^1.8.0` - Word document (.docx) parsing library
75
+ - 新增 `pdf-parse@^1.1.1` - PDF 文档解析库
76
+ Added `pdf-parse@^1.1.1` - PDF document parsing library
77
+
78
+ ## ⚠️ 已知问题 / Known Issues
79
+
80
+ ### 1. 钉钉文档读取功能不可用 / DingTalk Document Reading Unavailable
81
+
82
+ **问题描述 / Issue Description**:`docs.read()` API 当前无法正常工作
83
+ `docs.read()` API is currently not working properly
84
+
85
+ **原因 / Cause**:MCP(Model Context Protocol)中未提供读取文档的 tool,虽然代码层面实现正常,但缺少底层支持
86
+ MCP (Model Context Protocol) does not provide the tool for reading documents. While the implementation is correct at the code level, underlying support is missing
87
+
88
+ **影响范围 / Impact**:仅影响文档读取功能,其他文档操作(创建、追加、搜索、列举)均正常
89
+ Only affects document reading functionality, other document operations (create, append, search, list) work normally
90
+
91
+ **解决方案 / Solution**:等待 MCP 提供相应的 tool 支持,或使用其他文档操作 API 作为替代方案
92
+ Wait for MCP to provide corresponding tool support, or use other document operation APIs as alternatives
93
+
94
+ **状态 / Status**:已记录,等待上游支持
95
+ Recorded, waiting for upstream support
96
+
97
+ ## 📚 文档更新 / Documentation Updates
98
+
99
+ - ✅ 更新 README.md,添加新功能使用说明
100
+ Updated README.md, added usage instructions for new features
101
+ - ✅ 新增"富媒体接收"章节,说明图片消息处理方式
102
+ Added "Rich Media Reception" section, explaining image message processing
103
+ - ✅ 新增"文件附件提取"章节,列出支持的文件类型和处理方式
104
+ Added "File Attachment Extraction" section, listing supported file types and processing methods
105
+ - ✅ 新增"钉钉文档 API"章节,提供 API 使用示例
106
+ Added "DingTalk Document API" section, providing API usage examples
107
+ - ✅ 新增"多 Agent 路由支持"章节,说明多 Agent 会话隔离功能
108
+ Added "Multi-Agent Routing Support" section, explaining multi-Agent session isolation functionality
109
+ - ✅ 新增"多 Agent 配置"章节,提供详细的配置示例和说明(`accounts` 和 `bindings` 配置)
110
+ Added "Multi-Agent Configuration" section with detailed configuration examples and instructions (`accounts` and `bindings` configuration)
111
+ - ✅ 补充常见问题解答,包括新功能的故障排查
112
+ Added FAQ section, including troubleshooting for new features
113
+
114
+ ## 🔗 相关链接 / Related Links
115
+
116
+ - [完整变更日志 / Full Changelog](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/blob/main/CHANGELOG.md)
117
+ - [使用文档 / Documentation](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/blob/main/README.md)
118
+ - [问题反馈 / Issue Feedback](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/issues)
119
+
120
+ ## 📥 安装升级 / Installation & Upgrade
121
+
122
+ ```bash
123
+ # 通过 npm 安装最新版本 / Install latest version via npm
124
+ openclaw plugins install @dingtalk-real-ai/dingtalk-connector
125
+
126
+ # 或升级现有版本 / Or upgrade existing version
127
+ openclaw plugins update dingtalk-connector
128
+
129
+ # 通过 Git 安装 / Install via Git
130
+ openclaw plugins install https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector.git
131
+ ```
132
+
133
+ ## 🙏 致谢 / Acknowledgments
134
+
135
+ 感谢所有贡献者和用户的支持与反馈!
136
+ Thanks to all contributors and users for their support and feedback!
137
+
138
+ ---
139
+
140
+ **发布日期 / Release Date**:2026-03-05
141
+ **版本号 / Version**:v0.7.0
142
+ **兼容性 / Compatibility**:OpenClaw Gateway 0.4.0+
@@ -0,0 +1,74 @@
1
+ # Release Notes - v0.7.1
2
+
3
+ ## 🐛 修复版本 / Bug Fix Release
4
+
5
+ 本次更新修复了 stream 模式下的关键问题,确保 Agent 路由功能正常工作。
6
+
7
+ This update fixes critical issues in stream mode to ensure Agent routing functionality works correctly.
8
+
9
+ ## 🐛 修复 / Fixes
10
+
11
+ ### 1. Stream 模式 Session 路由失败问题 / Stream Mode Session Routing Failure
12
+
13
+ **问题描述 / Issue Description**:stream 模式下 model 参数错误导致 session 路由失败
14
+ Incorrect model parameter in stream mode caused session routing failures
15
+
16
+ **修复内容 / Fix**:
17
+ - 将 Gateway 请求中的 `model` 参数从 `'default'` 更正为 `'main'`
18
+ Corrected `model` parameter in Gateway requests from `'default'` to `'main'`
19
+ - 确保正确的 Agent 路由和会话管理
20
+ Ensures proper Agent routing and session management
21
+
22
+ **影响范围 / Impact**:影响所有使用 stream 模式的用户,修复后 Agent 路由将正常工作
23
+ Affects all users using stream mode. After the fix, Agent routing will work correctly.
24
+
25
+ ### 2. 多 Agent 路由问题修复 / Multi-Agent Routing Fix
26
+
27
+ **问题描述 / Issue Description**:多个钉钉机器人绑定到不同 Agent 时路由异常
28
+ Multiple DingTalk bots binding to different Agents failed to route correctly
29
+
30
+ **修复内容 / Fix**:
31
+ - 修复多 Agent 路由机制,确保多个钉钉机器人可以正确绑定到不同的 Agent
32
+ Fixed multi-Agent routing mechanism, ensuring multiple DingTalk bots can correctly bind to different Agents
33
+ - 改进会话隔离和路由逻辑
34
+ Improved session isolation and routing logic
35
+
36
+ **影响范围 / Impact**:影响使用多 Agent 配置的用户,修复后多机器人多 Agent 场景将正常工作
37
+ Affects users with multi-Agent configurations. After the fix, multi-bot multi-Agent scenarios will work correctly.
38
+
39
+ ## 🔧 改进 / Improvements
40
+
41
+ - **异步模式优化** - 优化异步模式处理流程,改进错误处理和日志输出
42
+ **Async Mode Optimization** - Optimized async mode processing flow, improved error handling and log output
43
+ - **DM Policy 增强** - 增强 DM Policy 检查机制,支持白名单配置
44
+ **DM Policy Enhancement** - Enhanced DM Policy check mechanism, supporting allowlist configuration
45
+
46
+ ## 📥 安装升级 / Installation & Upgrade
47
+
48
+ ```bash
49
+ # 通过 npm 安装最新版本 / Install latest version via npm
50
+ openclaw plugins install @dingtalk-real-ai/dingtalk-connector
51
+
52
+ # 或升级现有版本 / Or upgrade existing version
53
+ openclaw plugins update dingtalk-connector
54
+
55
+ # 通过 Git 安装 / Install via Git
56
+ openclaw plugins install https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector.git
57
+ ```
58
+
59
+ ## 🔗 相关链接 / Related Links
60
+
61
+ - [完整变更日志 / Full Changelog](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/blob/main/CHANGELOG.md)
62
+ - [使用文档 / Documentation](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/blob/main/README.md)
63
+ - [问题反馈 / Issue Feedback](https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/issues)
64
+
65
+ ## 🙏 致谢 / Acknowledgments
66
+
67
+ 感谢所有贡献者和用户的支持与反馈!
68
+ Thanks to all contributors and users for their support and feedback!
69
+
70
+ ---
71
+
72
+ **发布日期 / Release Date**:2026-03-05
73
+ **版本号 / Version**:v0.7.1
74
+ **兼容性 / Compatibility**:OpenClaw Gateway 0.4.0+
@@ -0,0 +1,15 @@
1
+ {
2
+ "id": "dingtalk-connector",
3
+ "name": "DingTalk Channel",
4
+ "version": "0.7.1",
5
+ "description": "DingTalk (钉钉) messaging channel via Stream mode with AI Card streaming",
6
+ "author": "DingTalk Real Team",
7
+ "channels": ["dingtalk-connector"],
8
+ "configSchema": {
9
+ "type": "object",
10
+ "additionalProperties": false,
11
+ "properties": {
12
+ "enabled": { "type": "boolean", "default": true }
13
+ }
14
+ }
15
+ }
package/package.json ADDED
@@ -0,0 +1,45 @@
1
+ {
2
+ "name": "@duckduck-cocode/dingtalk-connector",
3
+ "version": "0.7.1",
4
+ "description": "DingTalk (钉钉) channel connector — Stream mode with AI Card streaming",
5
+ "main": "plugin.ts",
6
+ "type": "module",
7
+ "scripts": {
8
+ "build": "echo 'No build needed - jiti loads TS at runtime'"
9
+ },
10
+ "keywords": [
11
+ "dingtalk",
12
+ "channel",
13
+ "stream",
14
+ "ai-card",
15
+ "connector"
16
+ ],
17
+ "author": "DingTalk Real Team",
18
+ "license": "MIT",
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector.git"
22
+ },
23
+ "homepage": "https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector#readme",
24
+ "bugs": "https://github.com/DingTalk-Real-AI/dingtalk-openclaw-connector/issues",
25
+ "publishConfig": {
26
+ "access": "public"
27
+ },
28
+ "dependencies": {
29
+ "dingtalk-stream": "^2.1.4",
30
+ "axios": "^1.6.0",
31
+ "fluent-ffmpeg": "^2.1.3",
32
+ "@ffmpeg-installer/ffmpeg": "^1.1.0",
33
+ "mammoth": "^1.8.0",
34
+ "pdf-parse": "^1.1.1"
35
+ },
36
+ "openclaw": {
37
+ "extensions": [
38
+ "./plugin.ts"
39
+ ],
40
+ "channels": [
41
+ "dingtalk-connector"
42
+ ],
43
+ "installDependencies": true
44
+ }
45
+ }