Conversation
- Introduced a new optional dependency group 'claw' for PantheonClaw mobile gateway channels. - Updated installation instructions in README and documentation to reflect the new 'claw' group. - Modified Dockerfile and development environment to use 'claw' instead of 'slack'. - Added gateway channel management functionality in ChatRoom class, including methods for configuration, session management, and logging. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…ndling - Moved WebSocket client creation to a separate thread to avoid asyncio event loop issues. - Enhanced error handling during WebSocket connection and logging integration. - Updated the way configuration parameters are retrieved for better readability. - Ensured proper cleanup of resources when stopping the WebSocket client.
- Eliminated the custom logging handler for Lark SDK to streamline logging. - Adjusted WebSocket client cleanup process by removing the handler during shutdown. - Improved code readability by reducing unnecessary complexity in logging setup.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat: PantheonClaw gateway integration
Introduces PantheonClaw, a multi-channel mobile gateway layer that routes
messages from Slack, Telegram, Discord, WeChat, Feishu, QQ, and iMessage
into Pantheon's existing chatroom and agent runtime.
New module:
pantheon/claw/bridge.py—ChatRoomGatewayBridgemaps incoming gateway sessions toPantheon chat rooms and streams agent responses back to the originating channel
manager.py—GatewayChannelManagerstarts/stops each channel in its owndaemon thread, maintains per-channel log buffers, and exposes state for the UI
registry.py—ClawRouteRegistrytracks activeConversationRoutemappingsruntime.py— sharedChannelRuntimebase with queuing, dedup, andchunk/step callback helpers
config.py—ClawConfigStorewith masked-value serialization for secretschannels/— full implementations for Slack, Telegram, Discord, WeChat,Feishu, QQ, and iMessage
WeChat QR login
manager.pyexposeswechat_get_login_qr()andwechat_poll_login_status()room.pyadds@toolmethodswechat_login_qrandwechat_login_statususing
asyncio.to_thread()to avoid blocking the agent event loopFeishu WebSocket fix
lark_oapi/ws/client.pycapturesasyncio.get_event_loop()at module-importtime as a module-level global. When the module is first imported inside
asyncio.run(), that variable holds the already-running loop, causing everysubsequent
loop.run_until_complete()call to raise"This event loop is already running"ws_clientcreation (includingEventDispatcherHandler.builderandlark.ws.Client) is moved insiderun_ws(), a plain daemon thread with norunning event loop. Before calling
start(), the module-levelloopvariableis overwritten with
asyncio.new_event_loop()so lark_oapi gets a fresh loopit can call
run_until_complete()onasyncio.run(ws_client._disconnect())for clean teardown,matching the reference implementation in OmicClaw
Other
clawinpyproject.tomltests/test_claw_gateway.py