diff --git a/electron/utils/openclaw-auth.ts b/electron/utils/openclaw-auth.ts index 237144a1..991e1f4f 100644 --- a/electron/utils/openclaw-auth.ts +++ b/electron/utils/openclaw-auth.ts @@ -1767,13 +1767,14 @@ export async function sanitizeOpenClawConfig(): Promise { console.log('[sanitize] Removed bare "feishu" from plugins.allow (openclaw-lark plugin is configured)'); modified = true; } - // Delete the built-in feishu entry entirely instead of setting enabled:false. - // Setting enabled:false causes the Gateway to report the channel as "disabled" - // which shows as an error in the UI. Since 'feishu' is removed from - // plugins.allow above, the built-in extension won't auto-load. - if (pEntries.feishu) { - delete pEntries.feishu; - console.log('[sanitize] Removed built-in feishu plugin entry (openclaw-lark plugin is configured)'); + // Explicitly disable the built-in feishu extension so it doesn't + // conflict with the official openclaw-lark plugin at runtime. + // Simply deleting the entry is NOT sufficient — the built-in + // extension in dist/extensions/feishu/ (enabledByDefault: true) will + // still load unless explicitly marked as disabled. + if (!pEntries.feishu || (pEntries.feishu as Record).enabled !== false) { + pEntries.feishu = { enabled: false }; + console.log('[sanitize] Disabled built-in feishu plugin (openclaw-lark plugin is configured)'); modified = true; } } @@ -1828,6 +1829,14 @@ export async function sanitizeOpenClawConfig(): Promise { // allowlist because they were excluded from externalPluginIds above. if (nextAllow.length > 0) { for (const pluginId of bundled.enabledByDefault) { + // When the official openclaw-lark (or similar) plugin replaces the + // built-in 'feishu' extension, skip re-adding 'feishu' here — + // otherwise the enabledByDefault logic undoes the conflict + // resolution performed above and the built-in extension keeps + // reappearing in plugins.allow on every gateway restart. + if (pluginId === 'feishu' && canonicalFeishuId !== 'feishu') { + continue; + } if (!nextAllow.includes(pluginId)) { nextAllow.push(pluginId); } diff --git a/package.json b/package.json index 17a9927b..7c2de727 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "clawx", - "version": "0.3.9-beta.1", + "version": "0.3.9-beta.2", "pnpm": { "onlyBuiltDependencies": [ "@discordjs/opus", @@ -143,4 +143,4 @@ "zx": "^8.8.5" }, "packageManager": "pnpm@10.31.0+sha512.e3927388bfaa8078ceb79b748ffc1e8274e84d75163e67bc22e06c0d3aed43dd153151cbf11d7f8301ff4acb98c68bdc5cadf6989532801ffafe3b3e4a63c268" -} +} \ No newline at end of file