feat: add platform adapter layer for WeCom and Feishu integration#15
Merged
feat: add platform adapter layer for WeCom and Feishu integration#15
Conversation
Introduce a comprehensive platform adapter layer enabling AI chat integration with enterprise messaging platforms. This implementation supports both WeChat Work (WeCom) and Feishu through WebSocket and HTTP webhook modes.
Core architecture includes:
- Unified channel interface (Channel) with platform-agnostic message handling
- Registry pattern for dynamic channel registration and lifecycle management
- Message deduplication using Redis with 60-second TTL
- Session-to-conversation mapping for persistent chat history across reconnections
Platform implementations:
- WeCom: WebSocket long-connection and HTTP webhook modes with AES decryption
- Feishu: WebSocket and HTTP webhook with signature verification
Supporting infrastructure:
- Extracted ToolExecutor to eliminate duplicate tool call loop logic between handlers
- Added allowlist filtering for authorized user access control
- Conversation binding via Redis mapping (platform:csid:{sessionKey} → OID)
- Unified message format supporting text, images, audio, and file attachments
Configuration via preset.yaml with multi-instance support per platform type.
987b42a to
ce6804c
Compare
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.
Introduce a comprehensive platform adapter layer enabling AI chat integration with enterprise messaging platforms. This implementation supports both WeChat Work (WeCom) and Feishu through WebSocket and HTTP webhook modes.
Core architecture includes:
Platform implementations:
Supporting infrastructure:
Configuration via preset.yaml with multi-instance support per platform type.