71f0a1abdb
- 所有Go模块路径从 github.com/yourname/cyrene-ai 迁移到 git.yeij.top/AskaEth/Cyrene - 5个Go Dockerfile添加 GOPROXY=https://goproxy.cn,direct 解决国内构建问题 - ai-core go.mod 添加 pkg/plugins replace 指令 - Caddyfile 简化为 http:// 通配 + handle 保留 /api 前缀 - ethend Dockerfile 适配 (npm install + 仅 COPY package.json) - ethend 新增 RUNNING_IN_DOCKER 环境变量,健康检查改用Docker服务名 - ethend 数据库状态检查支持Docker hostname (postgres/redis/qdrant/minio) - process-manager 新增 CONTAINER_SVC_MAP + Docker模式自动检测 - 统一 docker-compose.dev.db.yml 卷名 (pg_data/redis_data/qdrant_data/minio_data) - docker-compose.yml ethend服务挂载docker.sock + 端口变量化 - 清理 .env 统一后的残留文件与提示信息 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
51 lines
1.5 KiB
Go
51 lines
1.5 KiB
Go
package wechat
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
|
|
"git.yeij.top/AskaEth/Cyrene/platform-bridge/internal/bridge"
|
|
)
|
|
|
|
// Adapter implements PlatformAdapter for WeChat (Enterprise WeChat / Personal Hook).
|
|
// Currently a stub — requires WeChatFerry / ItChat or Enterprise WeChat SDK credentials.
|
|
type Adapter struct{}
|
|
|
|
func NewAdapter() *Adapter { return &Adapter{} }
|
|
|
|
func (a *Adapter) PlatformName() string { return "wechat" }
|
|
|
|
func (a *Adapter) Capabilities() bridge.PlatformCapabilities {
|
|
return bridge.PlatformCapabilities{
|
|
MaxMessageLength: 50,
|
|
SupportsMarkdown: false,
|
|
SupportsImage: true,
|
|
SupportsVoice: true,
|
|
SupportsEmoji: true,
|
|
SupportsReaction: false,
|
|
SupportsTypingHint: false,
|
|
RecommendBurstMax: 3,
|
|
}
|
|
}
|
|
|
|
func (a *Adapter) Connect(ctx context.Context) error {
|
|
fmt.Println("[wechat] stub adapter — no live connection (requires WeChatFerry/ItChat or Enterprise WeChat SDK)")
|
|
return nil
|
|
}
|
|
|
|
func (a *Adapter) Disconnect(ctx context.Context) error { return nil }
|
|
|
|
func (a *Adapter) IsConnected() bool { return false }
|
|
|
|
func (a *Adapter) HealthCheck() error {
|
|
return fmt.Errorf("wechat adapter is a stub — not connected to WeChat")
|
|
}
|
|
|
|
func (a *Adapter) ToUnified(rawMessage interface{}) (*bridge.UnifiedMessage, error) {
|
|
return nil, fmt.Errorf("wechat adapter is a stub — implement with WeChatFerry or Enterprise WeChat SDK")
|
|
}
|
|
|
|
func (a *Adapter) FromUnified(response *bridge.UnifiedResponse) ([]bridge.PlatformMessage, error) {
|
|
return nil, fmt.Errorf("wechat adapter is a stub")
|
|
}
|