mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:10:42 +00:00
fix(plugins): preserve empty provider scopes
This commit is contained in:
@@ -358,7 +358,8 @@ function buildCacheKey(params: {
|
||||
},
|
||||
]),
|
||||
);
|
||||
const scopeKey = JSON.stringify(params.onlyPluginIds ?? []);
|
||||
const scopeKey =
|
||||
params.onlyPluginIds === undefined ? "__unscoped__" : JSON.stringify(params.onlyPluginIds);
|
||||
const setupOnlyKey = params.includeSetupOnlyChannelPlugins === true ? "setup-only" : "runtime";
|
||||
const startupChannelMode =
|
||||
params.preferSetupRuntimeForChannelPlugins === true ? "prefer-setup" : "full";
|
||||
@@ -378,7 +379,7 @@ function normalizeScopedPluginIds(ids?: string[]): string[] | undefined {
|
||||
return undefined;
|
||||
}
|
||||
const normalized = Array.from(new Set(ids.map((id) => id.trim()).filter(Boolean))).toSorted();
|
||||
return normalized.length > 0 ? normalized : undefined;
|
||||
return normalized;
|
||||
}
|
||||
|
||||
function matchesScopedPluginRequest(params: {
|
||||
@@ -442,19 +443,19 @@ function buildActivationMetadataHash(params: {
|
||||
}
|
||||
|
||||
function hasExplicitCompatibilityInputs(options: PluginLoadOptions): boolean {
|
||||
return Boolean(
|
||||
return (
|
||||
options.config !== undefined ||
|
||||
options.activationSourceConfig !== undefined ||
|
||||
options.autoEnabledReasons !== undefined ||
|
||||
options.workspaceDir !== undefined ||
|
||||
options.env !== undefined ||
|
||||
options.onlyPluginIds?.length ||
|
||||
options.onlyPluginIds !== undefined ||
|
||||
options.runtimeOptions !== undefined ||
|
||||
options.pluginSdkResolution !== undefined ||
|
||||
options.coreGatewayHandlers !== undefined ||
|
||||
options.includeSetupOnlyChannelPlugins === true ||
|
||||
options.preferSetupRuntimeForChannelPlugins === true ||
|
||||
options.loadModules === false,
|
||||
options.loadModules === false
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user