Files
AgentsMeeting/HANDFOFF.md
T
hmo 1b2b935832 Initial: multi-agent XMPP communication system with dashboard
- Platform-based architecture (Windows/Linux/Mac)
- Agent instance registry (agents.yaml)
- Management dashboard with cross-platform monitoring
- xmpp_bot with HTTP bridge + health endpoints
- wechat_agent with WeChat-Hermes bridging
- Platform services: ProcessGuardian, HealthProbe, APIRouter, ChannelBridge
- Deployment: systemd (Linux) + PowerShell (Windows)
- Monitoring: SSH+ejabberdctl for cross-platform presence
2026-06-12 21:51:36 +08:00

3.2 KiB
Raw Blame History

AgentsMeeting — Session Handoff

创建时间: 2026-06-12 04:00 源会话: hermes session (ses_1d95d15c4ffehQaZ6hrbIbak5k)

已完成

系统修复

  • part_ 前缀 bug (chat_bridge.py:335): part_prt_
  • 工具调用 XML 泄漏: final force 用干净上下文 + _strip_toolcall_xml()
  • 静默模式误杀: _SHUTUP_PATTERNS 缩紧到仅 "闭嘴"/"住口"/"shut up"
  • self-message 回声静默: on_group_message 中 self-msg 检查提前到 shutup 之前
  • MAX_TOOL_LOOPS: 15 → 30,超限后走 clean final force
  • watchdog 进程唯一: start_bot()kill_all_bots() 再启动
  • 健康检查: 检测 "alive 但无消息接收" 状态,自动重启
  • 日志轮转: watchdog 每 15 分钟检查 >5MB 自动轮转

架构设计

  • docs/ARCHITECTURE.md (17.5 KB): 系统总览/拓扑/数据流/模块/监控
  • docs/AUDIT.md (4.2 KB): 稳定性审计报告
  • docs/DEPLOY.md (2.8 KB): 部署指南 (Windows + Linux)
  • docs/OPS.md (3.2 KB): 运维手册/常见故障/日志轮转
  • docs/QUICKSTART.md: 快速操作手册
  • README.md (4.4 KB): 项目概览

部署脚本

  • deploy/windows/{start,stop,check,rollback}.ps1
  • deploy/linux/{install.sh,hermes-gateway@.service,xmpp-bot@.service}

源码

  • src/shared/config.py: 集中配置管理 (env var + YAML)
  • src/shared/bot_base.py: Bot 基类 (BotConfig/BaseBot/extract_response)
  • src/ops/watch_group.py: 消息监控脚本
  • src/channels/qq/bridge.py: QQ 通道骨架
  • config/.env.example: 环境变量模板

HTTP 桥 (:5802)

  • POST /send: 发送群消息
  • GET /messages: 读取最近 200 条消息 (支持 ?from=mohe 过滤)
  • 集成到 xmpp_bot.pybot 重启自动恢复

测试

  • tests/test_core.py: 单元测试
  • tests/verify_deploy.py: 部署验证 (12 项全部通过)
  • HTTP bridge 验证: send+receive 均正常

运行状态

  • xmpp_bot: RUNNING (watchdog 守护)
  • wechat_agent: RUNNING (uptime 35h+)
  • watchdog: RUNNING (30s 检查 + 日志轮转)
  • api_proxy: RUNNING
  • health_check: 5 分钟定时任务

待完成

需 mohe 在 Linux 侧

  • 部署 systemd services (hermes-gateway@.service, xmpp-bot@.service)
  • 配置 provider 环境变量 (替换 configs/*/config.yaml 中的占位符)
  • 排查 ejabberd MUC conference.yoin.fun 响应问题
  • state.db 829MB 归档清理

需 mohe 配合

  • 架构文档最终审核
  • 部署验证
  • hermes-gateway@.service 使用实际 systemd 模板

关键文件

  • projects/wechat-hermes-gateway/scripts/xmpp_bot.py (HTTP bridge)
  • projects/wechat-hermes-gateway/scripts/chat_bridge.py (final force 修复)
  • projects/wechat-hermes-gateway/scripts/xmpp_watchdog.py (log rotation)
  • projects/wechat-hermes-gateway/scripts/health_check_xxm.py
  • projects/AgentsMeeting/src/shared/config.py
  • projects/AgentsMeeting/src/shared/bot_base.py
  • projects/AgentsMeeting/deploy/windows/start.ps1
  • projects/AgentsMeeting/deploy/windows/check.ps1
  • projects/AgentsMeeting/docs/ARCHITECTURE.md
  • projects/AgentsMeeting/tests/verify_deploy.py

注意事项

  • HTTP bridge (:5802) 绑定 127.0.0.1,不对外暴露
  • bot 重启后消息 buffer 会清空,新消息到达后自动重建
  • 健康检查 lastMsg=999min 是 MAM 恢复期间正常现象
  • MUC join 一直超时,bot 通过 MAM 订阅工作