message-relay
消息中继Skill:跨群/跨工人消息转发,支持消息格式转换和路由规则。
触发条件
- 需要将一个工人的产出物转发给另一个工人时
- 需要将群聊消息转发到指定工人inbox时
- 产出物交接场景
API依赖
- Dashboard API: GET(读群聊)+ POST(发inbox/群聊)
- 认证: Authorization: Bearer {TOKEN}
数据结构
{"relay_id": "uuid", "from_worker": "xiaoyu", "to_worker": "caojiang", "subject": "...", "body": "...", "status": "pending/done", "created_at": "..."}
使用方法
# 转发群聊最新消息给指定工人
python3 scripts/message_relay.py --from chat --to caojiang --last 3
# 转发inbox消息给群聊
python3 scripts/message_relay.py --from caojiang --to chat --subject "产出物"
# 查看中继记录
python3 scripts/message_relay.py --history
核心逻辑
- 读取源消息(群聊或inbox)
- 构造转发payload
- 发送到目标(群聊或inbox)
- 记录中继日志




