Commit Graph
196 Commits
Author SHA1 Message Date
hmo 9b53ba6872 fix(rdp): disable HW graphics adapter (software rendering) in enable step — DisplayLink/multi-GPU WDDM init conflict is a top cause of 'stuck at configuring' 2026-08-26 02:58:22 +08:00
hmo 345abd782e fix(rdp): disable NLA by default in enable step — CredSSP pre-auth is the root cause of 'stuck at configuring'; tunnel is already SSH-encrypted 2026-08-26 02:48:32 +08:00
hmo 811d2dd6db feat(rdp): robust RDP enable — step-machine + deep health check + self-heal + end-to-end verify + live progress & structured log 2026-08-26 02:40:06 +08:00
hmo 7036b667b1 refactor: article_processor as external service, disable wechat_qr_notifier 2026-08-24 05:53:22 +08:00
hmo df3a630084 fix: disable SenseNova+Kimi usage collectors (CDP consent spam) 2026-08-24 05:40:29 +08:00
hmo 39a73db9b3 feat: WeChat QR get button — trigger container /api/bot/login (DISABLE_AUTO_LOGIN) via POST /api/wechat/trigger-login; show QR block when logged_out even without qr_url 2026-08-17 19:18:36 +08:00
hmo 5a736ddaa8 feat: streaming passthrough for stream=True + first-byte timeout (30s) — distinguish slow upstream (data flowing) vs hung key (no first byte); fix 180s cutoff killing legit 3-8min requests 2026-08-15 20:22:22 +08:00
hmo a7a42448d4 fix: 5xx (503) and read-timeout now try next key instead of break/fail — key1 down but key6/key5 healthy should succeed; wide 180s per-key timeout only as safety net (no per-request deadline) 2026-08-15 20:10:58 +08:00
hmo 8de5b6ccb6 fix: overall request deadline (180s) + upstream timeout 180->60s — prevent multi-key retry chain hanging 15min (2026-08-15 incident) 2026-08-15 20:04:33 +08:00
hmo aa0d005925 feat: router firewall — validate model against OCG whitelist + require messages; block client errors before upstream call (prevents rate-limit pollution) 2026-08-15 17:37:39 +08:00
hmo 42bcc4d4ec fix: return HTTP 400 (not 502) for client ModelError/bad model requests 2026-08-15 17:32:32 +08:00
hmo a800d5214d fix: ModelError 401 (bad model name) was cooling all keys -> cooldown avalanche 502; treat as client error, return 400 without cooling 2026-08-15 17:30:33 +08:00
hmo 3becd8ea08 fix: empty_content false-positive on reasoning models — deepseek-v4-flash/pro return content in reasoning_content; only treat as empty when no content AND no reasoning AND not finish_reason=length 2026-08-15 16:56:49 +08:00
hmo f4af37fe49 fix: Kimi/SenseNova collection fails with utf-8 decode error — SSH output is GBK on Windows; use bytes+errors=replace + PYTHONIOENCODING=utf-8 via cmd /c 2026-08-15 12:51:22 +08:00
hmo fd71e8ffcd fix: Kimi/SenseNova usage not auto-refreshed — auto-timer only collected OCG; extract _collect_kimi_usage/_collect_sensenova_usage, refresh every 30min in timer 2026-08-15 12:45:12 +08:00
hmo 1febfd0cb5 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 自动重启 (重启=重登触发风控)
2026-08-14 20:39:55 +08:00
mohe 85ef30f896 feat: ocg_router key降级改指数退避——按key独立统计失败次数,失败冷却base2s×2^count指数增加(上限600s/10分钟),成功后重置计数; 空输出/报错立即换key+该key进入指数退避 2026-08-14 10:08:51 +08:00
mohe ef4ead6a03 fix: ocg_router proc_guard API适配——_LockResult无pid属性,g.pid→g.message(修复502 Bad Gateway根因:启动检查AttributeError导致服务不稳定) 2026-08-14 09:46:51 +08:00
mohe 75026c9b7a feat: ocg_router空输出自动换key——_forward_request检测content为空→返回empty_content→_proxy_chat自动换下一个key重试(不冷却) 2026-08-14 09:31:07 +08:00
mohe 6a5c08a5df feat: ocg_router 并发模式——X-OCG-Mode: concurrent 时 round-robin 锁 key 轮询(每次请求轮着用key,避免并发压同一key触发429/401), 非并发模式保持按用量选最空闲; 测试验证key1→key4→key5→key6轮询 2026-08-14 04:06:26 +08:00
hmo 936925c74f revert: Windows now static IP 192.168.1.16 (was .248 DHCP) — restore .16 in configs 2026-08-12 21:51:08 +08:00
hmo f19f93931a fix: wechat login status — logged in / message activity takes priority over stale QR text in docker logs 2026-08-12 16:14:05 +08:00
hmo a83ae177cb fix: ocg_router error classification — 400 client error no retry, 5xx/Router.Unavailable no longer kill keys into cooldown, client disconnect handled, max parallel 16 2026-08-12 16:08:14 +08:00
hmo 44b77be525 fix: Windows IP changed 192.168.1.16 -> 192.168.1.248 — update dashboard bridge URL, health checks, agents.yaml 2026-08-12 16:07:46 +08:00
hmo 4b838b5a6b fix: ocg_router single-threaded HTTPServer blocks all requests on large body — switch to ThreadingHTTPServer 2026-08-10 12:56:01 +08:00
hmo 15a97696f7 fix: kanban-handler SKILL.md — replace nonexistent GET /api/kanban/t_xxx with POST :9580/kanban/show + comment/update examples 2026-08-10 12:56:01 +08:00
mohe c6d7d8b92d fix: 微信状态检测登录成功优先(logged in/Message), 消除历史日志干扰 2026-08-08 01:36:57 +08:00
mohe 6f9161cd93 fix: dashboard 微信状态检测识别等待扫码/会话失效, 不再误报已登录 2026-08-08 01:30:19 +08:00
mohe 8feed0092b fix: health_check 识别微信登录失效(loginCheck错误), 防止误报已登录 2026-08-08 01:03:13 +08:00
hmo a8b46178e3 fix: spec audit — align specs with reality (xmpp_bot 5807, dashboard missing endpoints, article_processor X-Lines, api_proxy capability, health_check JSON escape); fix 5802->5807 across dashboard/health_check/watchdog consumers 2026-08-06 16:48:16 +08:00
hmo 1dd3f9aad5 fix: watchdog revival — port 5807 in registry, skip remote/self-managed services, add to start.bat
- service_registry: xmpp_bot port 5802 -> 5807 (matches xmpp_agent_core), fix health_url/log
- xmpp_watchdog: skip services without script or pid_file (dashboard self-managed, gateway_* remote) — previously crashed on open(None)
- start.bat: launch watchdog after xxm bot so crash auto-recovery runs on boot
2026-08-05 09:57:51 +08:00
hmo afcce956f0 fix: chat_bridge missing import sys -> xmpp_bot crash on startup; RDP/EasyTier bridge offline 2026-08-05 02:22:20 +08:00
hmo 745daaa1a2 fix: Router.Unavailable -> all keys short-cooldown 30s + cooldown error shows cause/expiry 2026-08-04 11:09:27 +08:00
hmo a83660ebd3 feat: enable/disable OCG keys via Dashboard — disabled keys removed from router pool instantly 2026-08-03 11:45:16 +08:00
hmo f25a15f3bf fix: usage collection error no longer kills keys; 401/403 treated as key failure; key3 (renewal cancelled) skipped via accounts.json 2026-08-03 11:21:12 +08:00
mohe be2b194b71 feat: WeChat QR code + status inline in Platform tab
wechat_bridge entry now shows:
- status text (已登录Xh / 已掉线Xh) via s.message
- inline QR code with 5min expiry + refresh button when logged out
- refreshWechatQR() fetches latest QR on demand (no polling)
2026-08-02 04:43:16 +08:00
mohe b0ad75b88e fix: detect system_event_logout for real WeChat status
Previously only looked for WeChat send OK/error in last 200 log lines.
system_event_logout was missed, so dashboard showed 正常 when session
was actually dead. Now:
- Greps full webhook log for system_event_login/logout
- Logout after login => logged_out status
- WeChat send timeout (Hermes error) also counts as failure
2026-08-02 04:32:37 +08:00
hmo bd87a341dc fix: strip Transfer-Encoding from proxy response (buffered, not chunked) 2026-08-02 04:25:44 +08:00
hmo ad40956f33 docs: ocg_router spec file (human help + AI spec) 2026-08-01 14:39:32 +08:00
hmo e8111a3a59 merge: resolve dashboard.html conflict (keep proxy section) 2026-08-01 12:40:47 +08:00
hmo 79a9264cbd feat: OCG router proxy — quota-aware 6-key routing 2026-08-01 12:39:35 +08:00
mohe 7581bccda5 fix: cross-platform config path in chat_bridge.py
_load_providers and _SERVE_DB had hardcoded C:\\\\Users\\\\hmo paths.
Now uses os.path.expanduser(" ~\) as primary path, with Windows
fallback. Supports OPENCODE_CONFIG_PATH env override.
2026-07-31 10:37:07 +08:00
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
hmo 3e2a74d4d9 fix: SenseNova卡片不再混入OpenCode Go组
- accounts.json移除key8/9/10(它们是同一SenseNova账户的3个模型视角,非OCG账号)
  否则OCG采集器会把它们当OCG账户采集,前端归到OpenCode Go组
- /api/keys: 注册表外的用量条目(sensenova)以独立provider追加,不进OCG
- 前端provider名映射补sensenova
2026-07-23 22:52:53 +08:00
hmo 0a3986238e feat: SenseNova Token Plan余量监控(参考OCG/Kimi CDP模式)
- usage_collector_sensenova.py: CDP刮platform.sensenova.cn/console三模型余量
  (锚定'模型名+换行+数字%剩余'防图例区误匹配)
- dashboard: /api/usage和/api/keys合并sensenova数据; refresh流程加SSH采集+scp回传
- accounts.json注册key8/9/10(同一SenseNova key三模型视角)
2026-07-23 18:23:16 +08:00
hmo e59c1bcc53 fix: 移除afw-proxy(已废弃试验)+ocg-key顺序由/api/keys配额动态决定
- afw-proxy是早期试验代理,老爸确认已废弃,不入链
- ocg-key*按AgentsMeeting/api/keys健康度排序,session_expired跳过
2026-07-23 16:47:28 +08:00
hmo eddbee968c fix: provider链白名单与实际config脱节导致模型无响应
- 原allowed仅4个provider(deepseek/volcengine/opencode-go*), config里只有deepseek(402欠费)→全链死
- 现按存活度排序: sense-nova(实测可用+tools支持)→deepseek→afw-proxy→ocg-key*
- 模型名: options.model优先, 否则取provider models字典第一个key
2026-07-23 15:54:38 +08:00
hmo ea193a9881 chore: retire legacy wechat-hermes-gateway xmpp_bot, unify bridge to :5807
Old xmpp_bot.py (PID-locked separately) coexisted with new xmpp_agent_core,
causing duplicate JID connections and split bridge traffic (5802 vs 5807).
Deploy scripts now use new bot's :5807 bridge with X-Api-Key auth.
2026-07-23 13:59:11 +08:00