Commit Graph
2 Commits
Author SHA1 Message Date
openbot bbe36be192 feat(wecom): official aibot long-connection protocol + real WS transport
- wecom_ws.py: AibotWSAdapter (asyncio websockets bridged to channel threads):
  connect wss://openws.work.weixin.qq.com, aibot_subscribe auth, 30s ping
  heartbeat, reader->queue, graceful shutdown
- wecom.py switched to official frames:
  * inbound aibot_msg_callback / aibot_event_callback (enter_chat -> welcome)
  * reply: aibot_respond_msg stream {id, finish, content} reusing the
    callback's req_id; after finish, proactive aibot_send_msg markdown
  * image inbound: {url, aeskey} fetch + AES-256-CBC (IV=key[:16], PKCS7)
  * mixed (text+image) and voice (transcribed) message types
- tests updated to official frame shapes; 43 passed
2026-10-06 16:06:49 +08:00
openbot 86642e07c9 test(channels): IM three-channel e2e wiring tests + final-text accumulation
- test_channels_e2e.py: full loop per channel
  (inbound -> SessionManager.prompt -> mock ACP agent -> events -> outbound):
  * wecom aibot: text dispatch -> delta frames -> replyStream final;
    image base64 inbound
  * wecom-app: real local HTTP callback server + real WXBizMsgCrypt
    (GET echo verify + POST encrypted XML) -> stubbed qyapi send
  * weixin: QR login -> long-poll inbound -> sendmessage outbound
- session.py fix: accumulate delta text per turn; 'final' event now carries
  full text so no-edit-API channels (wecom-app/weixin) deliver whole message
- wecom.py: buffer outbound frames when not connected (testability)
- tests: 43 passed
2026-10-06 11:51:04 +08:00