Commit Graph
5 Commits
Author SHA1 Message Date
mohe 406446c3f1 fix: WeChat session context via X-Hermes-Session-Id (revert SessionRouter)
SessionRouter approach failed on Linux because chat_bridge.py has
hardcoded Windows paths for provider config and opencode.db.

Instead, use the same pattern as xmpp_agent_core.py: direct Hermes API
call with X-Hermes-Session-Id=wechat-{sender_id} for per-user sessions.

This gives each WeChat user persistent context in Hermes without
depending on cross-platform path issues in chat_bridge.py.
2026-07-31 10:11:53 +08:00
mohe 24be3b2aa5 feat: route WeChat messages through SessionRouter for per-user context
Previously wechat_webhook.py sent each WeChat message as a stateless
API call to Hermes (no X-Hermes-Session-Id), so Mohe had zero memory
of previous messages. Now uses SessionRouter with SessionBridge
(same as XMPP path), which:
- Maintains per-user sessions via opencode.db
- Injects recent conversation context automatically
- Uses the same model/LLM pipeline as XMPP messages
2026-07-31 03:43:19 +08:00
mohe fd6ea76f54 feat: WeChat status + QR on Dashboard, proactive login notifier
- /api/wechat/status: real login detection via webhook log + docker logs
- /api/platform: wechat_bridge now returns login_ok, message, qr_url
- Platform tab: inline QR code with 5min expiry + refresh button
- wechat_qr_notifier.py: 40h session-age WeChat warning + XMPP logout alert
- agents_health_check.py: login_check via docker logs
- wechat_webhook.py: timeout 180→600s
2026-07-31 03:22:35 +08:00
zhiwei ef93f066e3 fix: stop user-level gateway service conflicting with system-level one
Root cause: user-level hermes-gateway.service was running the same
-p default gateway as the system-level hermes-gateway@default.service,
causing the two to SIGTERM each other every ~5 minutes. This killed
in-flight Hermes API requests with 'Remote end closed connection'.

Fix: disabled the redundant user-level service.
Also: simplified webhook to just forward raw message content (no
system prompt, no ACK, no max_tokens overrides). Removed unused
_get_ack method.
2026-06-24 19:53:24 +08:00
zhiwei f1630ebb03 feat: WeChat Linux bot via docker-wechatbot-webhook
- Docker container with auto-restart
- systemd webhook receiver on :5804
- Full send/receive loop: WeChat ↔ Docker ↔ Hermes
- Fixed login token for persistence
- Firewall rules for container-host communication
2026-06-24 01:59:44 +08:00