clawdbot-dingtalk 0.4.3 → 0.4.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawdbot-dingtalk",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "description": "DingTalk (钉钉) channel plugin for Openclaw - enables AI agent messaging via DingTalk Stream API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,15 +49,14 @@ openclaw cron add \
49
49
  只允许使用以下命令做验证/排障,禁止自造变体:
50
50
 
51
51
  ```bash
52
- openclaw cron run <job-id> --force --expect-final
53
52
  openclaw cron runs --id <job-id> --limit 5
54
53
  openclaw cron rm <job-id>
54
+ openclaw cron list
55
55
  ```
56
56
 
57
57
  说明:
58
- - `cron run` 只接受位置参数 `<job-id>`,不要写 `--id`
59
58
  - `cron runs` 必须写 `--id`
60
- - `--expect-final` 用于等待最终回复,避免"看起来成功但无最终输出"
59
+ - **严禁对一次性 `--at` 任务执行 `openclaw cron run`**:该命令会触发 `deleteAfterRun`,导致任务在定时时间到达前被删除,实际定时消息将永远不会发出
61
60
 
62
61
  ## 群聊提醒(本群/提醒所有人)
63
62
 
@@ -177,33 +176,28 @@ openclaw cron add \
177
176
  - [ ] 全局 `cron.enabled` 未被关闭,且未设置 `OPENCLAW_SKIP_CRON=1`
178
177
  - [ ] `--channel` 是 `clawdbot-dingtalk`
179
178
  - [ ] `--to` 是正确的 senderStaffId
179
+ - [ ] **不要对一次性 `--at` 任务执行 `cron run` 测试**(会导致任务被提前删除)
180
180
 
181
- ## 创建后最小验收(必须执行)
182
-
183
- 创建任务成功后,必须立刻做两步验收:
181
+ ## 创建后确认(必须执行)
184
182
 
185
- 1. 强制触发一次并等待最终输出
183
+ 创建任务成功后,告知用户任务已创建,并说明预计触发时间。
186
184
 
187
- ```bash
188
- openclaw cron run <job-id> --force --expect-final
189
- ```
185
+ **严禁对一次性 `--at` 任务执行 `openclaw cron run`。** 该命令会立即执行任务并触发 `deleteAfterRun`,导致任务在定时时间到达前被删除。这是已知 bug,实际定时消息将永远不会发出。
190
186
 
191
- 2. 查看最近运行记录(确认 run log 已写入)
187
+ 如需验证任务是否已正确注册,只允许使用:
192
188
 
193
189
  ```bash
194
190
  openclaw cron runs --id <job-id> --limit 5
195
191
  ```
196
192
 
197
- 若两步任一步失败,不要宣称"已稳定定时发送"。必须明确告知用户当前仅完成"任务创建",调度执行仍待确认。
193
+ 对于**循环任务**(`--cron`),可以使用 `openclaw cron run <job-id> --force --expect-final` 来测试,因为循环任务不会被删除。
198
194
 
199
195
  ## 失败告警模板(固定句式)
200
196
 
201
- 当最小验收失败时,直接使用类似以下文案:
197
+ 当任务创建失败或参数不合法时,直接使用类似以下文案:
202
198
 
203
- > 已完成任务创建,但本次强制触发/运行记录校验未通过。
204
- > 这通常表示调度器尚未实际执行。
205
- > 我已给出可复现命令:`openclaw cron run <job-id> --force --expect-final` 和 `openclaw cron runs --id <job-id> --limit 5`。
206
- > 在看到有效 run 记录前,不应视为"已稳定定时发送"。
199
+ > 定时任务创建失败。请检查时间格式是否正确,以及 `--channel` 和 `--to` 参数是否正确。
200
+ > 可用 `openclaw cron list` 确认当前任务列表。
207
201
 
208
202
  ## 调试命令(仅限白名单)
209
203
 
@@ -211,12 +205,12 @@ openclaw cron runs --id <job-id> --limit 5
211
205
  # 查看所有任务
212
206
  openclaw cron list
213
207
 
214
- # 立即测试任务(强制 + 等待 final)
215
- openclaw cron run <job-id> --force --expect-final
216
-
217
208
  # 查看运行记录
218
209
  openclaw cron runs --id <job-id> --limit 5
219
210
 
220
211
  # 删除任务
221
212
  openclaw cron rm <job-id>
213
+
214
+ # 仅限循环任务(--cron)的测试,严禁用于一次性 --at 任务
215
+ openclaw cron run <job-id> --force --expect-final
222
216
  ```
@@ -84,6 +84,10 @@ Skills 提供你的工具。需要时查看对应的 `SKILL.md`。把本地特
84
84
  - 消息有字数限制 —— 保持简洁,不要写长篇大论
85
85
  - 需要长内容时,分段发送或使用要点概括
86
86
 
87
+ ## 定时任务 (Cron)
88
+
89
+ **严禁测试一次性定时任务:** 使用 cron 工具 `action: "add"` 创建任务后,**绝对不要**立即调用 `action: "run"` 来测试。`cron run` 会触发 `deleteAfterRun`,导致一次性任务在定时时间到达之前就被删除,实际的定时消息将永远不会发出。只需确认任务已创建,告诉用户它会在预定时间执行即可。
90
+
87
91
  ## Heartbeat - 主动出击
88
92
 
89
93
  收到 heartbeat 轮询时,不要每次都只回复 `HEARTBEAT_OK`。利用 heartbeat 做有意义的事。