feat: Phase 4 多平台接入 — Platform Bridge + 6平台适配器 + 身份权限系统 (22文件, 2129行)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-23 16:19:57 +08:00
parent 717ad65b05
commit 965cce7192
22 changed files with 2129 additions and 2 deletions
@@ -0,0 +1,24 @@
package bridge
import "context"
// PlatformAdapter is the interface every platform adapter must implement.
type PlatformAdapter interface {
PlatformName() string
// Message conversion.
ToUnified(rawMessage interface{}) (*UnifiedMessage, error)
FromUnified(response *UnifiedResponse) ([]PlatformMessage, error)
// Capabilities.
Capabilities() PlatformCapabilities
// Connection management.
Connect(ctx context.Context) error
Disconnect(ctx context.Context) error
IsConnected() bool
HealthCheck() error
}
// MessageHandler receives unified messages from adapters for processing.
type MessageHandler func(msg *UnifiedMessage) (*UnifiedResponse, error)