Skip to content

feat: add platform adapter layer for WeCom and Feishu integration#15

Merged
liut merged 1 commit intomainfrom
feat/w582-channels
Mar 26, 2026
Merged

feat: add platform adapter layer for WeCom and Feishu integration#15
liut merged 1 commit intomainfrom
feat/w582-channels

Conversation

@liut
Copy link
Copy Markdown
Owner

@liut liut commented Mar 26, 2026

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.

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.
@liut liut force-pushed the feat/w582-channels branch from 987b42a to ce6804c Compare March 26, 2026 08:06
@liut liut merged commit 1e1687f into main Mar 26, 2026
2 checks passed
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