Files
wechat-agent/config.tasks.yaml
jesxion 06f88a8f73 改进任务调度器:支持三种任务类型
TaskType:
- long_running: 长期任务(持续监控 + 自动回复)
- specific: 特定任务(Cron 定时)
- proactive: 主动智能(条件触发)

Engine 改动:
- _handle_long_running_task: 处理长期任务的监控逻辑
- _schedule_send_message: 定时任务发送消息回调
- handlers 字典统一管理各种回调

待实现: 主动智能条件检查(_check_proactive_condition)
2026-04-13 12:49:06 +08:00

82 lines
2.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================
# 任务配置
# ============================================
#
# 三种任务类型:
#
# 1. 长期任务 (long_running)
# - 持续监控特定用户/群
# - 自动回复AI + 关键词)
# - 7x24 运行,直到手动停止
#
# 2. 特定任务 (specific)
# - 定时执行Cron 表达式)
# - 一次性任务
# - 手动触发
#
# 3. 主动智能 (proactive)
# - 条件触发AI 分析意图)
# - 满足条件时主动发起
# ============================================
tasks:
# ========== 长期任务 ==========
# 示例:持续监控"尾巴~",自动回复
# - name: "尾巴~_监控"
# type: long_running
# target: "尾巴~"
# enabled: false
# reply_mode: "ai" # ai / keyword / both
# poll_interval: 3 # 秒
#
# 示例:监控工作群(不自动回复,仅记录)
# - name: "工作群监控"
# type: long_running
# target: "工作通知群"
# enabled: false
# reply_mode: "none" # 只监控,不回复
# ========== 特定任务 ==========
# 示例:每天早安提醒
# - name: "早安提醒"
# type: specific
# target: "尾巴~"
# schedule: "0 9 * * *"
# message: "早上好!今天是{{date}}{{weekday}}"
# enabled: false
# once: false
#
# 示例:一次性任务
# - name: "生日祝福"
# type: specific
# target: "张三"
# schedule: "0 9 15 6 *"
# message: "生日快乐!🎂"
# enabled: false
# once: true
# ========== 主动智能 ==========
# 示例30分钟未回复提醒
# - name: "未回复提醒"
# type: proactive
# target: "尾巴~"
# conditions:
# - type: "no_reply"
# minutes: 30
# actions:
# - type: "send_to_me"
# message: "尾巴~ 有消息未回复"
# enabled: false
#
# 示例:检测到关键词主动推送
# - name: "价格咨询"
# type: proactive
# target: "*" # 监控所有
# conditions:
# - type: "keyword"
# keywords: ["价格", "多少钱", "报价"]
# actions:
# - type: "reply"
# message: "您好,价格请咨询 xxx"
# enabled: false