mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 09:10:42 +00:00
fix: keep runtime deps repair out of hot paths
This commit is contained in:
@@ -103,6 +103,7 @@ function expectBundledCompatLoadPath(params: {
|
||||
config: params.enablementCompat,
|
||||
onlyPluginIds: ["openai"],
|
||||
activate: false,
|
||||
installBundledRuntimeDeps: false,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -408,6 +409,7 @@ describe("resolvePluginCapabilityProviders", () => {
|
||||
}),
|
||||
onlyPluginIds: ["microsoft"],
|
||||
activate: false,
|
||||
installBundledRuntimeDeps: false,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -616,6 +618,7 @@ describe("resolvePluginCapabilityProviders", () => {
|
||||
config: expect.anything(),
|
||||
onlyPluginIds: [],
|
||||
activate: false,
|
||||
installBundledRuntimeDeps: false,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -660,6 +663,7 @@ describe("resolvePluginCapabilityProviders", () => {
|
||||
config: compatConfig,
|
||||
onlyPluginIds: ["google"],
|
||||
activate: false,
|
||||
installBundledRuntimeDeps: false,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -795,6 +799,7 @@ describe("resolvePluginCapabilityProviders", () => {
|
||||
config: compatConfig,
|
||||
onlyPluginIds: ["microsoft"],
|
||||
activate: false,
|
||||
installBundledRuntimeDeps: false,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -818,6 +823,7 @@ describe("resolvePluginCapabilityProviders", () => {
|
||||
config: expect.anything(),
|
||||
onlyPluginIds: [],
|
||||
activate: false,
|
||||
installBundledRuntimeDeps: false,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -955,6 +961,7 @@ describe("resolvePluginCapabilityProviders", () => {
|
||||
config: enablementCompat,
|
||||
onlyPluginIds: ["google"],
|
||||
activate: false,
|
||||
installBundledRuntimeDeps: false,
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1077,6 +1084,7 @@ describe("resolvePluginCapabilityProviders", () => {
|
||||
config: enablementCompat,
|
||||
onlyPluginIds: ["microsoft"],
|
||||
activate: false,
|
||||
installBundledRuntimeDeps: false,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -315,7 +315,7 @@ export function resolvePluginCapabilityProvider<K extends CapabilityProviderRegi
|
||||
const loadOptions = createCapabilityProviderFallbackLoadOptions({
|
||||
compatConfig,
|
||||
pluginIds,
|
||||
installBundledRuntimeDeps: params.installBundledRuntimeDeps,
|
||||
installBundledRuntimeDeps: params.installBundledRuntimeDeps ?? false,
|
||||
});
|
||||
const cache = resolveCapabilityProviderSnapshotCache(params.cfg);
|
||||
const cacheKey = cache
|
||||
@@ -373,7 +373,7 @@ export function resolvePluginCapabilityProviders<K extends CapabilityProviderReg
|
||||
const loadOptions = createCapabilityProviderFallbackLoadOptions({
|
||||
compatConfig,
|
||||
pluginIds,
|
||||
installBundledRuntimeDeps: params.installBundledRuntimeDeps,
|
||||
installBundledRuntimeDeps: params.installBundledRuntimeDeps ?? false,
|
||||
});
|
||||
const cache = resolveCapabilityProviderSnapshotCache(params.cfg);
|
||||
const cacheKey = cache
|
||||
|
||||
@@ -261,7 +261,7 @@ function resolveRuntimeProviderPluginLoadState(
|
||||
pluginSdkResolution: params.pluginSdkResolution,
|
||||
cache: params.cache ?? true,
|
||||
activate: params.activate ?? false,
|
||||
installBundledRuntimeDeps: params.installBundledRuntimeDeps,
|
||||
installBundledRuntimeDeps: params.installBundledRuntimeDeps ?? false,
|
||||
},
|
||||
);
|
||||
return { loadOptions };
|
||||
|
||||
@@ -162,6 +162,7 @@ describe("ensurePluginRegistryLoaded", () => {
|
||||
workspaceDir: "/resolved-workspace",
|
||||
onlyPluginIds: ["demo-channel"],
|
||||
throwOnLoadError: true,
|
||||
installBundledRuntimeDeps: false,
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@@ -175,7 +175,7 @@ export function ensurePluginRegistryLoaded(options?: {
|
||||
},
|
||||
{
|
||||
throwOnLoadError: true,
|
||||
installBundledRuntimeDeps: options?.installBundledRuntimeDeps,
|
||||
installBundledRuntimeDeps: options?.installBundledRuntimeDeps ?? false,
|
||||
...(hasExplicitPluginIdScope(requestedPluginIds) ||
|
||||
shouldForwardChannelScope({ scope, scopedLoad }) ||
|
||||
hasNonEmptyPluginIdScope(expectedChannelPluginIds)
|
||||
|
||||
@@ -457,6 +457,7 @@ describe("resolvePluginTools optional tools", () => {
|
||||
|
||||
expect(loadOpenClawPluginsMock).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
installBundledRuntimeDeps: false,
|
||||
runtimeOptions: {
|
||||
allowGatewaySubagentBinding: true,
|
||||
},
|
||||
|
||||
@@ -133,7 +133,10 @@ export function resolvePluginTools(params: {
|
||||
const runtimeOptions = params.allowGatewaySubagentBinding
|
||||
? { allowGatewaySubagentBinding: true as const }
|
||||
: undefined;
|
||||
const loadOptions = buildPluginRuntimeLoadOptions(context, { runtimeOptions });
|
||||
const loadOptions = buildPluginRuntimeLoadOptions(context, {
|
||||
installBundledRuntimeDeps: false,
|
||||
runtimeOptions,
|
||||
});
|
||||
const registry = resolvePluginToolRegistry({
|
||||
loadOptions,
|
||||
allowGatewaySubagentBinding: params.allowGatewaySubagentBinding,
|
||||
|
||||
Reference in New Issue
Block a user