feat: 莫荷微信按需登录——消除未登录忙循环请求腾讯的风控诱因

- init.js: DISABLE_AUTO_LOGIN=true 时不自动 bot.start(), 导出 start/stop/isRunning
- 新增 route/bot.js: POST /api/bot/login|logout, GET /api/bot/status (按需触发登录)
- login.js: bot 未运行时不展示残留二维码, 显示开始登录按钮
- wechat4u wechat.js: checkLogin 忙循环加 3s 间隔+指数退避 (原来毫秒级轰炸 login.wx.qq.com)
- puppet-wechat4u: logout 后不自动 start (原来登出即自动重登)
- 补丁脚本: deploy/linux/wxbot_on_demand_login_patch.py (可重放, 容器重建后一键恢复)
- 文档: docs/WXBOT_ON_DEMAND_LOGIN.md
- agents_health_check/self_todo_executor: 禁用 wxBotWebhook 自动重启 (重启=重登触发风控)
This commit is contained in:
hmo
2026-08-14 20:39:55 +08:00
parent 85ef30f896
commit 1febfd0cb5
5 changed files with 666 additions and 2 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ SERVICES = [
"host": "127.0.0.1",
"port": 3001,
"health_url": None, # TCP only
"fix_cmd": ["docker", "restart", "wxBotWebhook"],
"fix_cmd": None, # 禁用自动重启: 重启=重登会触发微信风控, 改为人工处理
"remote": False,
"critical": True,
"docker_name": "wxBotWebhook",
+1 -1
View File
@@ -29,7 +29,7 @@ FIX_MAP = {
"dashboard": ["sudo", "systemctl", "restart", "agentsmeeting-dashboard"],
"hermes_gateway_mohe": ["sudo", "systemctl", "restart", "hermes-gateway@mohe"],
"hermes_gateway_zhiwei": ["sudo", "systemctl", "restart", "hermes-gateway@zhiwei"],
"wechat_bridge": ["docker", "restart", "wxBotWebhook"],
"wechat_bridge": None, # 禁用自动重启: 重启=重登触发风控, 人工处理
# 远程服务无本地修复命令
"xmpp_bot_xxm": None,
"article_processor": None,