Skip to content

Add WeChat ClawBot connector#203

Open
jasmine889966 wants to merge 1 commit into
andrewyng:mainfrom
jasmine889966:feat/weixin-clawbot
Open

Add WeChat ClawBot connector#203
jasmine889966 wants to merge 1 commit into
andrewyng:mainfrom
jasmine889966:feat/weixin-clawbot

Conversation

@jasmine889966

@jasmine889966 jasmine889966 commented Jul 26, 2026

Copy link
Copy Markdown

Summary

Adds a two-way WeChat ClawBot connector on Tencent's iLink API (ilinkai.weixin.qq.com), so DMs on your phone can reach a local OpenWorker session.

  • QR login in the Connectors UI (POST /v1/connectors/weixin/qrcode + status poll); server turns the scan payload into a PNG data URL
  • Inbound long-poll via getupdates; outbound through send_message with a per-chat context_token
  • The account that confirms the QR is pre-added to the allow-list (same idea as Slack's installer)
  • Enabling WeChat / Telegram / Slack on a session claims it as the DM route when none is set yet

v1: DMs only (no groups). Outbound needs a prior inbound message (WeChat's ~24h window).

Test plan

  • Unit + integration: pytest tests/test_weixin_flow.py tests/test_weixin_ilink.py tests/test_connectors.py tests/test_connectors_allowlist.py tests/test_connector_registry.py tests/test_connections.py tests/test_gateway_inbox_reply.py tests/test_message_source.py93 passed
  • npx tsc --noEmit in surfaces/gui
  • QR login REST → PNG data URL → confirmed saves profile + allow-list (test_qr_login_rest_connects_and_preallows_scanner; live /v1/connectors/weixin/qrcode returns a valid PNG)
  • Enable WeChat on a session claims DM route and inbound DM is delivered (test_enable_weixin_claims_dm_route_and_delivers)
  • send_message to weixin:… uses stored context_token (test_send_message_weixin_uses_context_token)
  • Disconnect clears context tokens (test_disconnect_clears_context_tokens)

QR login against ilinkai.weixin.qq.com, long-poll inbound, and
send_message replies for DMs. Pre-allows the account that scans.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant