From 436efc3b09df34207fd78385199075d94b836302 Mon Sep 17 00:00:00 2001 From: OpenBot Date: Tue, 6 Oct 2026 16:07:05 +0800 Subject: [PATCH] feat(runtime): use real aibot WS transport by default (mock_transport=true opts out) --- src/agenthub/runtime.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/agenthub/runtime.py b/src/agenthub/runtime.py index 0ec49cb..013965b 100644 --- a/src/agenthub/runtime.py +++ b/src/agenthub/runtime.py @@ -73,7 +73,12 @@ def build_channels(cfg: dict[str, Any], mgr: SessionManager) -> list: channels.append(ch) if "wecom" in ccfg: - sink_and_inbound(WecomAibotChannel(ccfg["wecom"])) + from .channels.wecom_ws import make_ws_factory + + wcfg = ccfg["wecom"] + # real long-connection transport unless the config says otherwise + ws_factory = None if wcfg.get("mock_transport") else make_ws_factory() + sink_and_inbound(WecomAibotChannel(wcfg, ws_factory=ws_factory)) if "wecom-app" in ccfg: sink_and_inbound(WecomAppChannel(ccfg["wecom-app"])) if "weixin" in ccfg: