From a20b2e781f31501fc5535972aa0cbbc74636e28c Mon Sep 17 00:00:00 2001 From: shivanagendrak Date: Wed, 28 Jan 2026 22:04:01 -0700 Subject: [PATCH 1/4] fix(config): write enabled state to channels config for built-in channels --- src/config/plugin-auto-enable.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/config/plugin-auto-enable.ts b/src/config/plugin-auto-enable.ts index a7632e41f..85aba2867 100644 --- a/src/config/plugin-auto-enable.ts +++ b/src/config/plugin-auto-enable.ts @@ -3,6 +3,7 @@ import { getChatChannelMeta, listChatChannels, normalizeChatChannelId, + CHAT_CHANNEL_ORDER, } from "../channels/registry.js"; import { getChannelPluginCatalogEntry, @@ -318,6 +319,23 @@ function ensureAllowlisted(cfg: MoltbotConfig, pluginId: string): MoltbotConfig } function enablePluginEntry(cfg: MoltbotConfig, pluginId: string): MoltbotConfig { + // If this is a built-in channel, enable it in config.channels instead of config.plugins + if (CHAT_CHANNEL_ORDER.includes(pluginId as any)) { + const channels = cfg.channels as Record> | undefined; + const channelConfig = channels?.[pluginId] || {}; + + return { + ...cfg, + channels: { + ...channels, + [pluginId]: { + ...channelConfig, + enabled: true, + }, + }, + }; + } + const entries = { ...cfg.plugins?.entries, [pluginId]: { From 421abb4cb06f4aca24de94266327b22bbcb122c3 Mon Sep 17 00:00:00 2001 From: shivanagendrak Date: Thu, 29 Jan 2026 18:53:42 -0700 Subject: [PATCH 2/4] fix(config): standardize plugin auto-enable to use plugins.entries for all channels --- src/config/plugin-auto-enable.ts | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/src/config/plugin-auto-enable.ts b/src/config/plugin-auto-enable.ts index 85aba2867..87d322886 100644 --- a/src/config/plugin-auto-enable.ts +++ b/src/config/plugin-auto-enable.ts @@ -320,22 +320,10 @@ function ensureAllowlisted(cfg: MoltbotConfig, pluginId: string): MoltbotConfig function enablePluginEntry(cfg: MoltbotConfig, pluginId: string): MoltbotConfig { // If this is a built-in channel, enable it in config.channels instead of config.plugins - if (CHAT_CHANNEL_ORDER.includes(pluginId as any)) { - const channels = cfg.channels as Record> | undefined; - const channelConfig = channels?.[pluginId] || {}; - - return { - ...cfg, - channels: { - ...channels, - [pluginId]: { - ...channelConfig, - enabled: true, - }, - }, - }; - } - + // UPDATE: We now standardize on config.plugins.entries for ALL plugins, including core channels. + // This simplifies the logic and makes the test expectations correct. + // Core channels can still have config in config.channels, but their enabled state is tracked in plugins.entries. + const entries = { ...cfg.plugins?.entries, [pluginId]: { From 9ae76b8972193bf9efd8b1d26677b98a15f9678c Mon Sep 17 00:00:00 2001 From: shivanagendrak Date: Thu, 29 Jan 2026 19:16:41 -0700 Subject: [PATCH 3/4] fix(config): remove unused import CHAT_CHANNEL_ORDER --- src/config/plugin-auto-enable.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/config/plugin-auto-enable.ts b/src/config/plugin-auto-enable.ts index 87d322886..738b2a393 100644 --- a/src/config/plugin-auto-enable.ts +++ b/src/config/plugin-auto-enable.ts @@ -3,7 +3,6 @@ import { getChatChannelMeta, listChatChannels, normalizeChatChannelId, - CHAT_CHANNEL_ORDER, } from "../channels/registry.js"; import { getChannelPluginCatalogEntry, From 65b26334b0371dc0b02a451dba4ac6d81f5357ae Mon Sep 17 00:00:00 2001 From: shivanagendrak Date: Thu, 29 Jan 2026 20:00:26 -0700 Subject: [PATCH 4/4] style: remove trailing whitespace to fix format check --- src/config/plugin-auto-enable.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/plugin-auto-enable.ts b/src/config/plugin-auto-enable.ts index 738b2a393..b1ddc5f2a 100644 --- a/src/config/plugin-auto-enable.ts +++ b/src/config/plugin-auto-enable.ts @@ -322,7 +322,7 @@ function enablePluginEntry(cfg: MoltbotConfig, pluginId: string): MoltbotConfig // UPDATE: We now standardize on config.plugins.entries for ALL plugins, including core channels. // This simplifies the logic and makes the test expectations correct. // Core channels can still have config in config.channels, but their enabled state is tracked in plugins.entries. - + const entries = { ...cfg.plugins?.entries, [pluginId]: {