fix(plugins): keep auto-enabled channels behind allowlists

This commit is contained in:
Doruk Ardahan
2026-04-03 14:54:41 +03:00
committed by Peter Steinberger
parent f7d24c1ed5
commit cd08facd7a
4 changed files with 76 additions and 2 deletions

View File

@@ -287,8 +287,7 @@ export function resolvePluginActivationState(params: {
});
const explicitlyConfiguredBundledChannel =
params.origin === "bundled" &&
explicitSelection.reason === "channel enabled in config" &&
explicitSelection.explicitlyEnabled;
isBundledChannelEnabledByChannelConfig(params.sourceRootConfig ?? params.rootConfig, params.id);
if (!params.config.enabled) {
return {
@@ -451,6 +450,8 @@ export function resolveEffectiveEnableState(params: {
config: NormalizedPluginsConfig;
rootConfig?: OpenClawConfig;
enabledByDefault?: boolean;
sourceConfig?: NormalizedPluginsConfig;
sourceRootConfig?: OpenClawConfig;
}): { enabled: boolean; reason?: string } {
const state = resolveEffectivePluginActivationState(params);
return state.enabled ? { enabled: true } : { enabled: false, reason: state.reason };