refactor: remove Pico and MaixCAM channels
Remove pico, pico_client and maixcam adapters, configuration and migration support. Drop Pico-specific agent publishing while preserving shared IM streaming and MQTT. Clean up channel examples and localized documentation; move shared tests to Telegram. Validated with full Go tests, vet, lint, docs checks and a Linux amd64 build.
This commit is contained in:
1 parent
6159157e47
commit
996dfefffe
74 files changed
+243
-5862
No files matched your search
@@ -17,7 +17,6 @@ var supportedChannels = map[string]bool{
|
||||
"telegram": true,
|
||||
"feishu": true,
|
||||
"discord": true,
|
||||
"maixcam": true,
|
||||
"qq": true,
|
||||
"dingtalk": true,
|
||||
"slack": true,
|
||||
|
||||
@@ -128,7 +128,6 @@ type OpenClawChannels struct {
|
||||
BlueBubbles *OpenClawBlueBubblesConfig `json:"bluebubbles"`
|
||||
QQ *OpenClawQQConfig `json:"qq"`
|
||||
DingTalk *OpenClawDingTalkConfig `json:"dingtalk"`
|
||||
MaixCam *OpenClawMaixCamConfig `json:"maixcam"`
|
||||
}
|
||||
|
||||
type OpenClawTelegramConfig struct {
|
||||
@@ -267,14 +266,6 @@ type OpenClawDingTalkConfig struct {
|
||||
Enabled *bool `json:"enabled"`
|
||||
}
|
||||
|
||||
type OpenClawMaixCamConfig struct {
|
||||
Host *string `json:"host"`
|
||||
Port *int `json:"port"`
|
||||
DmPolicy *string `json:"dmPolicy"`
|
||||
AllowFrom []string `json:"allowFrom"`
|
||||
Enabled *bool `json:"enabled"`
|
||||
}
|
||||
|
||||
type OpenClawSkills struct {
|
||||
Entries map[string]json.RawMessage `json:"entries"`
|
||||
Load json.RawMessage `json:"load"`
|
||||
@@ -631,7 +622,6 @@ type ChannelsConfig struct {
|
||||
Telegram TelegramConfig `json:"telegram"`
|
||||
Feishu FeishuConfig `json:"feishu"`
|
||||
Discord DiscordConfig `json:"discord"`
|
||||
MaixCam MaixCamConfig `json:"maixcam"`
|
||||
QQ QQConfig `json:"qq"`
|
||||
DingTalk DingTalkConfig `json:"dingtalk"`
|
||||
Slack SlackConfig `json:"slack"`
|
||||
@@ -669,13 +659,6 @@ type DiscordConfig struct {
|
||||
AllowFrom []string `json:"allow_from"`
|
||||
}
|
||||
|
||||
type MaixCamConfig struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
Host string `json:"host"`
|
||||
Port int `json:"port"`
|
||||
AllowFrom []string `json:"allow_from"`
|
||||
}
|
||||
|
||||
type QQConfig struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
AppID string `json:"app_id"`
|
||||
@@ -872,19 +855,6 @@ func (c *OpenClawConfig) convertChannels(warnings *[]string) ChannelsConfig {
|
||||
}
|
||||
}
|
||||
|
||||
if c.Channels.MaixCam != nil && supportedChannels["maixcam"] {
|
||||
channels.MaixCam = MaixCamConfig{
|
||||
Enabled: true,
|
||||
AllowFrom: c.Channels.MaixCam.AllowFrom,
|
||||
}
|
||||
if c.Channels.MaixCam.Host != nil {
|
||||
channels.MaixCam.Host = *c.Channels.MaixCam.Host
|
||||
}
|
||||
if c.Channels.MaixCam.Port != nil {
|
||||
channels.MaixCam.Port = *c.Channels.MaixCam.Port
|
||||
}
|
||||
}
|
||||
|
||||
if c.Channels.Matrix != nil && supportedChannels["matrix"] {
|
||||
enabled := c.Channels.Matrix.Enabled == nil || *c.Channels.Matrix.Enabled
|
||||
channels.Matrix = MatrixConfig{
|
||||
@@ -1064,12 +1034,6 @@ func (c ChannelsConfig) ToStandardChannels() config.ChannelsConfig {
|
||||
return m
|
||||
}())
|
||||
|
||||
setChannel(channels, "maixcam", map[string]any{
|
||||
"enabled": c.MaixCam.Enabled,
|
||||
"host": c.MaixCam.Host,
|
||||
"port": c.MaixCam.Port,
|
||||
})
|
||||
|
||||
setChannel(channels, "qq", func() map[string]any {
|
||||
m := map[string]any{
|
||||
"enabled": c.QQ.Enabled,
|
||||
|
||||
@@ -329,11 +329,6 @@ func TestConvertToPicoClawWithQQAndDingTalk(t *testing.T) {
|
||||
"appId": "ding-app-id",
|
||||
"appSecret": "ding-app-secret"
|
||||
},
|
||||
"maixcam": {
|
||||
"enabled": true,
|
||||
"host": "192.168.1.100",
|
||||
"port": 9000
|
||||
},
|
||||
"slack": {
|
||||
"enabled": true,
|
||||
"botToken": "xoxb-test",
|
||||
@@ -371,16 +366,6 @@ func TestConvertToPicoClawWithQQAndDingTalk(t *testing.T) {
|
||||
t.Errorf("expected dingtalk client ID 'ding-app-id', got '%s'", picoCfg.Channels.DingTalk.ClientID)
|
||||
}
|
||||
|
||||
if !picoCfg.Channels.MaixCam.Enabled {
|
||||
t.Error("maixcam should be enabled")
|
||||
}
|
||||
if picoCfg.Channels.MaixCam.Host != "192.168.1.100" {
|
||||
t.Errorf("expected maixcam host '192.168.1.100', got '%s'", picoCfg.Channels.MaixCam.Host)
|
||||
}
|
||||
if picoCfg.Channels.MaixCam.Port != 9000 {
|
||||
t.Errorf("expected maixcam port 9000, got %d", picoCfg.Channels.MaixCam.Port)
|
||||
}
|
||||
|
||||
if !picoCfg.Channels.Slack.Enabled {
|
||||
t.Error("slack should be enabled")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user