Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions electron/utils/openclaw-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1767,13 +1767,14 @@ export async function sanitizeOpenClawConfig(): Promise<void> {
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<string, unknown>).enabled !== false) {
pEntries.feishu = { enabled: false };
Comment on lines +1775 to +1776
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Gate feishu disablement on actual replacement plugin

This assignment disables the built-in feishu extension whenever canonicalFeishuId !== 'feishu', but canonicalFeishuId still falls back to FEISHU_PLUGIN_ID_CANDIDATES[0] even when no replacement plugin is actually installed/configured. In that case, sanitize can write plugins.entries.feishu.enabled=false for users who only have unrelated plugin config, so if the later auto-install/upgrade step fails (it is best-effort and swallowed), Feishu has no loadable plugin at startup. Please only force feishu to disabled after a confirmed replacement plugin presence.

Useful? React with 👍 / 👎.

console.log('[sanitize] Disabled built-in feishu plugin (openclaw-lark plugin is configured)');
modified = true;
}
}
Expand Down Expand Up @@ -1828,6 +1829,14 @@ export async function sanitizeOpenClawConfig(): Promise<void> {
// 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;
Comment on lines +1837 to +1838
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate feishu skip on detected replacement plugin

This guard skips re-adding bundled feishu whenever canonicalFeishuId !== 'feishu', but canonicalFeishuId falls back to FEISHU_PLUGIN_ID_CANDIDATES[0] even when no replacement plugin is actually installed/configured. In that case (for example, failed/missing ~/.openclaw/extensions install), the sanitize pass now removes feishu from plugins.allow and never adds it back, leaving users without any loadable Feishu plugin after restart. Please tie this skip to a confirmed replacement plugin presence (e.g., installed/configured) rather than the canonical fallback value alone.

Useful? React with 👍 / 👎.

}
if (!nextAllow.includes(pluginId)) {
nextAllow.push(pluginId);
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "clawx",
"version": "0.3.9-beta.1",
"version": "0.3.9-beta.2",
"pnpm": {
"onlyBuiltDependencies": [
"@discordjs/opus",
Expand Down Expand Up @@ -143,4 +143,4 @@
"zx": "^8.8.5"
},
"packageManager": "pnpm@10.31.0+sha512.e3927388bfaa8078ceb79b748ffc1e8274e84d75163e67bc22e06c0d3aed43dd153151cbf11d7f8301ff4acb98c68bdc5cadf6989532801ffafe3b3e4a63c268"
}
}
Loading