Skip to content

feat: channel gateway implementation and multi-bot refactor#27

Merged
chen-ran merged 1 commit intomainfrom
refactor/bot-channel
Feb 4, 2026
Merged

feat: channel gateway implementation and multi-bot refactor#27
chen-ran merged 1 commit intomainfrom
refactor/bot-channel

Conversation

@HoneyBBQ
Copy link
Collaborator

@HoneyBBQ HoneyBBQ commented Feb 4, 2026

Summary

This PR implements the core logic for the Channel Gateway and refactors the Bot system to be independent of Users, as discussed in #8 and #23.

Key Changes

  • Multi-bot Refactor: Decoupled Bots from Users with a new bot_members and configuration schema.
  • Channel Gateway: Added support for Telegram, Feishu, and Local channels with a unified adapter system.
  • Database: Consolidated migrations and optimized sqlc configuration.
  • Agent: Enhanced with ToolContext for platform-aware interactions.

Status

  • Core implementation
  • Database schema migration
  • Code optimization and cleanup
  • Comprehensive testing

Closes #8
Closes #23

Major changes:
1. Core Architecture: Decoupled Bots from Users. Bots now have independent lifecycles, member management (bot_members), and dedicated configurations.
2. Channel Gateway:
   - Implemented a unified Channel Manager supporting Feishu, Telegram, and Local (Web/CLI) adapters.
   - Added message processing pipeline to normalize interactions across different platforms.
   - Introduced a Contact system for identity binding and guest access policies.
3. Database & Tooling:
   - Consolidated all migrations into 0001_init with updated schema for bots, channels, and contacts.
   - Optimized sqlc.yaml to automatically track the migrations directory.
4. Agent Enhancements:
   - Introduced ToolContext to provide Agents with platform-aware execution capabilities (e.g., messaging, contact lookups).
   - Added tool logging and fallback mechanisms for toolChoice execution.
5. UI & Docs: Updated frontend stores, UI components, and Swagger documentation to align with the new Bot-centric model.
@chen-ran chen-ran marked this pull request as ready for review February 4, 2026 17:32
@chen-ran chen-ran merged commit dd6d570 into main Feb 4, 2026
@sheepbox8646 sheepbox8646 deleted the refactor/bot-channel branch February 9, 2026 10:44
@sheepbox8646 sheepbox8646 restored the refactor/bot-channel branch February 9, 2026 10:44
@sheepbox8646 sheepbox8646 deleted the refactor/bot-channel branch February 9, 2026 10:45
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.

[refactor] Multi-bot [feat] Channel Gateway

2 participants