fix(gateway): only sync configured channel plugins and cleanup unconfigured extensions (#898)

This commit is contained in:
paisley
2026-04-23 17:30:53 +08:00
committed by GitHub
parent 956e943072
commit 1b75fec71c
4 changed files with 130 additions and 87 deletions

View File

@@ -40,7 +40,7 @@ import { createSignalQuitHandler } from './signal-quit';
import { acquireProcessInstanceFileLock } from './process-instance-lock';
import { getSetting } from '../utils/store';
import { ensureBuiltinSkillsInstalled, ensurePreinstalledSkillsInstalled } from '../utils/skill-config';
import { ensureAllBundledPluginsInstalled } from '../utils/plugin-install';
import { startHostApiServer } from '../api/server';
import { HostEventBus } from '../api/event-bus';
import { deviceOAuthManager } from '../utils/device-oauth';
@@ -389,14 +389,10 @@ async function initialize(): Promise<void> {
});
}
// Pre-deploy/upgrade bundled OpenClaw plugins (dingtalk, wecom, feishu, wechat)
// to ~/.openclaw/extensions/ so they are always up-to-date after an app update.
// Note: qqbot was moved to a built-in channel in OpenClaw 3.31.
if (!isE2EMode) {
void ensureAllBundledPluginsInstalled().catch((error) => {
logger.warn('Failed to install/upgrade bundled plugins:', error);
});
}
// Plugin installation is now configuration-driven:
// - When a channel is added via UI: ensureXxxPluginInstalled() in IPC handlers
// - When Gateway starts: ensureConfiguredPluginsUpgraded() in config-sync.ts
// No need to pre-install all bundled plugins at app startup.
// Bridge gateway and host-side events before any auto-start logic runs, so
// renderer subscribers observe the full startup lifecycle.