49 lines
2.3 KiB
JSON
49 lines
2.3 KiB
JSON
{
|
||
"module": "wechat_bridge",
|
||
"version": "1.0",
|
||
"purpose": "WeChat Bridge 服务运行在 Windows (192.168.1.16:5801),负责将微信消息桥接到 Hermes Gateway (246:8642),实现老爸在微信上与莫荷的双向通信。",
|
||
"ui_location": "Infrastructure tab → Platform → WeChat Bridge",
|
||
|
||
"human_help": {
|
||
"title": "WeChat Bridge(微信桥接 :5801)",
|
||
"description": [
|
||
"这是整个系统的核心通道。部署在 Windows 上,接收微信消息后通过 HTTP POST 转发到 Linux (246) 上的 Hermes API,处理完成后再通过 wxhelper 将回复发回微信。",
|
||
"简单说:老爸在微信上发消息 → WeChat Bridge 接收 → 传给 Hermes AI 处理 → 回复发回微信。",
|
||
"它是一切的起点——没了它,微信通道就断了。"
|
||
],
|
||
"usage": [
|
||
"监控状态:在 Infrastructure → Platform 下查看状态指示灯(绿=运行,红=停止)",
|
||
"如果状态为 stopped:需要检查 Windows 上的 wechat_agent.py 进程",
|
||
"启动脚本:start-bot-server.bat(自动启动 opencode serve + wechat_agent)"
|
||
],
|
||
"troubleshooting": [
|
||
"如果 WeChat Bridge 停止:先检查 Windows 上 wxhelper 是否注入成功",
|
||
"如果 Hermes 不回复:检查 Linux 上 Hermes Gateway (:8642) 是否存活",
|
||
"如果消息延迟:消息走 HTTP 桥,网络延迟通常 < 2s",
|
||
"如果启动了但状态还是 stopped:页面每 5-10s 自动刷新,等一会"
|
||
],
|
||
"related": "Ejabberd(XMPP 底层通信)、F 健康 tab(系统整体健康)"
|
||
},
|
||
|
||
"ai_spec": {
|
||
"apis": [
|
||
{"method": "GET", "path": "/health", "returns": "{ok, status} — 服务健康检查"}
|
||
],
|
||
"dependencies": [
|
||
"依赖 wxhelper DLL 注入微信 3.9.5.81",
|
||
"依赖 Hermes API (:8642) 存活才能处理消息",
|
||
"依赖 EasyTier VPN 打通网络(Windows ↔ Linux)"
|
||
],
|
||
"constraints": [
|
||
"只支持 3.9.5.81 x64 微信版本",
|
||
"注入 wxhelper 后如果微信重启需重新注入",
|
||
"Python 请用 3.10(Miniconda3 3.13 的 encodings 模块损坏)"
|
||
],
|
||
"related_files": [
|
||
"gateway/scripts/wechat_agent.py — 实际运行脚本",
|
||
"gateway/scripts/templates/dashboard.html — fI() 状态展示",
|
||
"gateway/scripts/specs/wechat_bridge.json — 本 spec 文件"
|
||
]
|
||
}
|
||
}
|