> v1.x 注意:此为队列式通信桥(queue.json)。如需更强大的事件驱动闭环命令系统,请改用 hermes-memory-bridge v2.0(~/.workbuddy/skills/hermes-memory-bridge/)。两者可并存,各司其职。
通过 ~/.hermes/shared/communication/queue.json 共享文件队列,WorkBuddy 与 Hermes 直接双向通信。
~/.hermes/shared/communication/queue.json~/.hermes/shared/communication/history.json~/.workbuddy/skills/hermes-communication-bridge/scripts/communication_queue.py# WorkBuddy → Hermes 发消息
python3 ~/.workbuddy/skills/hermes-communication-bridge/scripts/communication_queue.py send workbuddy hermes "内容"
# 收 Hermes → WorkBuddy 的消息
python3 ~/.workbuddy/skills/hermes-communication-bridge/scripts/communication_queue.py receive workbuddy
# 查看队列统计
python3 ~/.workbuddy/skills/hermes-communication-bridge/scripts/communication_queue.py stats
# 标记消息已处理
python3 ~/.workbuddy/skills/hermes-communication-bridge/scripts/communication_queue.py mark <msg_id> completed
{
"id": "msg_<timestamp>_<sender>",
"sender": "workbuddy|hermes",
"receiver": "hermes|workbuddy",
"type": "message|task|query|response|status|file|command|alert",
"content": "消息内容",
"priority": "low|normal|high|urgent",
"status": "pending|processing|completed|failed"
}
message:普通文本消息task:任务请求(带元数据)query:查询请求response:响应status:状态更新file:文件传输command:系统命令alert:警报通知send workbuddy hermes "内容"hermes → workbuddy 的 pending 消息receive workbuddy,处理消息mark completed time.time_ns() 生成纳秒级唯一 ID,避免同一秒内多条消息 ID 重复process_queue.py 和 communication_queue.py 需同时安装到 Hermes skill 目录(~/.hermes/skills/autonomous-ai-agents/hermes-communication-bridge/),Bridge cron 才能正常工作共 1 个版本