fix feishu plugin conflict (#852)

This commit is contained in:
paisley
2026-04-14 17:47:58 +08:00
committed by GitHub
Unverified
parent 30bd8c08f9
commit a20a97ad83
2 changed files with 18 additions and 9 deletions

View File

@@ -1767,13 +1767,14 @@ export async function sanitizeOpenClawConfig(): Promise<void> {
console.log('[sanitize] Removed bare "feishu" from plugins.allow (openclaw-lark plugin is configured)'); console.log('[sanitize] Removed bare "feishu" from plugins.allow (openclaw-lark plugin is configured)');
modified = true; modified = true;
} }
// Delete the built-in feishu entry entirely instead of setting enabled:false. // Explicitly disable the built-in feishu extension so it doesn't
// Setting enabled:false causes the Gateway to report the channel as "disabled" // conflict with the official openclaw-lark plugin at runtime.
// which shows as an error in the UI. Since 'feishu' is removed from // Simply deleting the entry is NOT sufficient — the built-in
// plugins.allow above, the built-in extension won't auto-load. // extension in dist/extensions/feishu/ (enabledByDefault: true) will
if (pEntries.feishu) { // still load unless explicitly marked as disabled.
delete pEntries.feishu; if (!pEntries.feishu || (pEntries.feishu as Record<string, unknown>).enabled !== false) {
console.log('[sanitize] Removed built-in feishu plugin entry (openclaw-lark plugin is configured)'); pEntries.feishu = { enabled: false };
console.log('[sanitize] Disabled built-in feishu plugin (openclaw-lark plugin is configured)');
modified = true; modified = true;
} }
} }
@@ -1828,6 +1829,14 @@ export async function sanitizeOpenClawConfig(): Promise<void> {
// allowlist because they were excluded from externalPluginIds above. // allowlist because they were excluded from externalPluginIds above.
if (nextAllow.length > 0) { if (nextAllow.length > 0) {
for (const pluginId of bundled.enabledByDefault) { 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)) { if (!nextAllow.includes(pluginId)) {
nextAllow.push(pluginId); nextAllow.push(pluginId);
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "clawx", "name": "clawx",
"version": "0.3.9-beta.1", "version": "0.3.9-beta.2",
"pnpm": { "pnpm": {
"onlyBuiltDependencies": [ "onlyBuiltDependencies": [
"@discordjs/opus", "@discordjs/opus",