calendar: add recurring events, event management, and safety rules
Add --rrule flag to send with DTSTART/BYDAY validation (RFC 5545). Add event list (via khal) and event delete (safe single-event removal). Document safety rules from 2026-03-25 incident: always dry-run recurring events, never rm .ics files, space out SMTP sends.
This commit is contained in:
26
TOOLS.md
26
TOOLS.md
@@ -118,12 +118,20 @@ $SKILL_DIR/scripts/calendar.sh send \
|
||||
--subject "Lunch" --summary "Lunch at Tartine" \
|
||||
--start "2026-03-20T12:00:00" --end "2026-03-20T13:00:00"
|
||||
|
||||
# 接受邀请(从邮件中提取 .ics)
|
||||
# 发送周期性邀请(--start 必须落在 BYDAY 指定的那天!)
|
||||
$SKILL_DIR/scripts/calendar.sh send \
|
||||
--to "alice@example.com" \
|
||||
--subject "Weekly Shot" --summary "Allergy Shot (Tue)" \
|
||||
--start "2026-03-31T14:30:00" --end "2026-03-31T15:00:00" \
|
||||
--rrule "FREQ=WEEKLY;COUNT=13;BYDAY=TU"
|
||||
|
||||
# 接受/拒绝邀请
|
||||
$SKILL_DIR/scripts/calendar.sh reply --envelope-id 42 --action accept
|
||||
|
||||
# 拒绝邀请(附带留言)
|
||||
$SKILL_DIR/scripts/calendar.sh reply --envelope-id 42 --action decline \
|
||||
--comment "Sorry, I have a conflict."
|
||||
# 事件管理(查看、搜索、删除)
|
||||
$SKILL_DIR/scripts/calendar.sh event list
|
||||
$SKILL_DIR/scripts/calendar.sh event list --search "Allergy"
|
||||
$SKILL_DIR/scripts/calendar.sh event delete --match "Allergy Shot (Tue)"
|
||||
|
||||
# 待办管理
|
||||
$SKILL_DIR/scripts/calendar.sh todo add --summary "跟进报销" --due "2026-03-25" --priority high
|
||||
@@ -132,16 +140,18 @@ $SKILL_DIR/scripts/calendar.sh todo edit --match "报销" --due "2026-03-28"
|
||||
$SKILL_DIR/scripts/calendar.sh todo complete --match "报销"
|
||||
$SKILL_DIR/scripts/calendar.sh todo delete --match "报销"
|
||||
$SKILL_DIR/scripts/calendar.sh todo check # 每日摘要(cron)
|
||||
|
||||
# 查看日历(检查冲突)
|
||||
khal list today 7d
|
||||
```
|
||||
|
||||
**支持操作**: 发送邀请 (`send`)、接受/拒绝/暂定 (`reply`)、待办管理 (`todo add/list/edit/complete/delete/check`)
|
||||
**支持操作**: 发送邀请 (`send`)、接受/拒绝/暂定 (`reply`)、事件管理 (`event list/delete`)、待办管理 (`todo add/list/edit/complete/delete/check`)
|
||||
**依赖**: himalaya(邮件)、vdirsyncer(CalDAV 同步)、khal(查看日历)、todoman(待办管理)
|
||||
**同步**: 发送/回复/待办变更后自动 `vdirsyncer sync`,心跳也会定期同步
|
||||
**注意**: 发送日历邀请属于对外邮件,需先确认
|
||||
|
||||
**安全规则**:
|
||||
- 周期性邀请务必先 `--dry-run` 验证 ICS 内容
|
||||
- **绝不用 `rm` 删日历 .ics 文件**,只用 `event delete`
|
||||
- 连续发多封邮件时,每封间隔 10 秒以上(Migadu SMTP 限频)
|
||||
|
||||
### OpenClaw Cron 定时任务
|
||||
|
||||
**规则**: 确定性 shell 任务用 `systemEvent`,需要 LLM 判断的用 `agentTurn`
|
||||
|
||||
Reference in New Issue
Block a user