@yaoyuanchao/dingtalk 1.2.0 → 1.2.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.
- package/CHANGELOG.md +4 -7
- package/README.md +7 -5
- package/package.json +1 -1
- package/src/config-schema.ts +4 -3
- package/src/types.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -69,15 +69,12 @@ This release transforms the DingTalk plugin into an official Clawdbot plugin tha
|
|
|
69
69
|
|
|
70
70
|
### Migration Guide
|
|
71
71
|
|
|
72
|
-
If you're upgrading from v0.1.0
|
|
72
|
+
If you're upgrading from v0.1.0, see [UPGRADE.md](./UPGRADE.md) for detailed steps.
|
|
73
73
|
|
|
74
|
+
Summary:
|
|
74
75
|
1. **No configuration changes required** - existing configs work as-is
|
|
75
|
-
2.
|
|
76
|
-
3. **Optional**:
|
|
77
|
-
```bash
|
|
78
|
-
clawdbot plugins uninstall dingtalk
|
|
79
|
-
clawdbot plugins install @yaoyuanchao/dingtalk
|
|
80
|
-
```
|
|
76
|
+
2. Backup, stop gateway, delete old plugin, install via NPM, restart
|
|
77
|
+
3. **Optional**: Try the new onboarding wizard for fresh setup
|
|
81
78
|
|
|
82
79
|
## [0.1.0] - 2026-01-26
|
|
83
80
|
|
package/README.md
CHANGED
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
|
|
25
25
|
## 快速开始
|
|
26
26
|
|
|
27
|
+
> **从 v0.1.0 升级?** 查看 [升级指南](./UPGRADE.md)
|
|
28
|
+
|
|
27
29
|
### 方式一:官方安装(推荐)
|
|
28
30
|
|
|
29
31
|
```bash
|
|
@@ -81,7 +83,7 @@ clawdbot plugins install .
|
|
|
81
83
|
"allowFrom": ["YOUR_STAFF_ID"]
|
|
82
84
|
},
|
|
83
85
|
"groupPolicy": "allowlist",
|
|
84
|
-
"groupAllowlist": ["
|
|
86
|
+
"groupAllowlist": ["YOUR_CONVERSATION_ID"],
|
|
85
87
|
"requireMention": true
|
|
86
88
|
}
|
|
87
89
|
}
|
|
@@ -147,7 +149,7 @@ tail -f /tmp/clawdbot/clawdbot-$(date +%Y-%m-%d).log | grep dingtalk
|
|
|
147
149
|
|
|
148
150
|
1. 在钉钉中找到机器人
|
|
149
151
|
2. 发送任意消息
|
|
150
|
-
3. 机器人会回复:"Access denied. Your staffId:
|
|
152
|
+
3. 机器人会回复:"Access denied. Your staffId: XXXXXXXXXXXXXXXXXXXX Ask admin to add you."
|
|
151
153
|
4. 将这个 staffId 添加到配置文件的 `dm.allowFrom` 数组中
|
|
152
154
|
5. 重启 gateway
|
|
153
155
|
|
|
@@ -168,7 +170,7 @@ tail -f /tmp/clawdbot/clawdbot-$(date +%Y-%m-%d).log | grep "dingtalk.*Group"
|
|
|
168
170
|
1. 临时修改配置为 `groupPolicy: "open"`
|
|
169
171
|
2. 重启 gateway
|
|
170
172
|
3. 在群聊中 @机器人发送消息
|
|
171
|
-
4. 查看日志获取 conversationId(格式类似 `
|
|
173
|
+
4. 查看日志获取 conversationId(格式类似 `cidXXXXXXXXXXXXXXXXXX==`)
|
|
172
174
|
5. 将 conversationId 添加到 `groupAllowlist` 数组
|
|
173
175
|
6. 改回 `groupPolicy: "allowlist"` 并重启
|
|
174
176
|
|
|
@@ -177,8 +179,8 @@ tail -f /tmp/clawdbot/clawdbot-$(date +%Y-%m-%d).log | grep "dingtalk.*Group"
|
|
|
177
179
|
{
|
|
178
180
|
"groupPolicy": "allowlist",
|
|
179
181
|
"groupAllowlist": [
|
|
180
|
-
"
|
|
181
|
-
"
|
|
182
|
+
"cidXXXXXXXXXXXXXXXXXX==",
|
|
183
|
+
"cidYYYYYYYYYYYYYYYYYY=="
|
|
182
184
|
],
|
|
183
185
|
"requireMention": true
|
|
184
186
|
}
|
package/package.json
CHANGED
package/src/config-schema.ts
CHANGED
|
@@ -9,8 +9,8 @@ export const groupPolicySchema = z.enum(['disabled', 'allowlist', 'open'], {
|
|
|
9
9
|
description: 'Group chat access control policy',
|
|
10
10
|
});
|
|
11
11
|
|
|
12
|
-
export const messageFormatSchema = z.enum(['text', 'markdown'], {
|
|
13
|
-
description: 'Message format for bot responses',
|
|
12
|
+
export const messageFormatSchema = z.enum(['text', 'markdown', 'richtext'], {
|
|
13
|
+
description: 'Message format for bot responses (richtext is an alias for markdown)',
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
// DingTalk 配置 Schema
|
|
@@ -59,7 +59,8 @@ export const dingTalkConfigSchema = z.object({
|
|
|
59
59
|
.describe(
|
|
60
60
|
'Message format:\n' +
|
|
61
61
|
' - text: Plain text (recommended, supports tables)\n' +
|
|
62
|
-
' - markdown: DingTalk markdown (limited support, no tables)'
|
|
62
|
+
' - markdown: DingTalk markdown (limited support, no tables)\n' +
|
|
63
|
+
' - richtext: Alias for markdown (deprecated, use markdown instead)'
|
|
63
64
|
),
|
|
64
65
|
|
|
65
66
|
// 高级配置(可选)
|
package/src/types.ts
CHANGED