From 421abb4cb06f4aca24de94266327b22bbcb122c3 Mon Sep 17 00:00:00 2001 From: shivanagendrak Date: Thu, 29 Jan 2026 18:53:42 -0700 Subject: [PATCH] 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]: {