
























@@ -657,6 +657,34 @@ describe("resolvePluginCapabilityProviders", () => {
657657});
658658});
659659660+it("keeps bundled runtime dependency repair disabled when plugins are globally disabled", () => {
661+const cfg = { plugins: { enabled: false, allow: ["custom-plugin"] } } as OpenClawConfig;
662+const enablementCompat = {
663+plugins: {
664+enabled: true,
665+allow: ["custom-plugin", "openai"],
666+entries: { openai: { enabled: true } },
667+},
668+};
669+setBundledCapabilityFixture("mediaUnderstandingProviders");
670+mocks.withBundledPluginEnablementCompat.mockReturnValue(enablementCompat);
671+mocks.withBundledPluginVitestCompat.mockReturnValue(enablementCompat);
672+673+expectNoResolvedCapabilityProviders(
674+resolvePluginCapabilityProviders({
675+key: "mediaUnderstandingProviders",
676+ cfg,
677+}),
678+);
679+680+expect(mocks.resolveRuntimePluginRegistry).toHaveBeenCalledWith({
681+config: enablementCompat,
682+onlyPluginIds: ["openai"],
683+activate: false,
684+installBundledRuntimeDeps: false,
685+});
686+});
687+660688it.each([
661689"imageGenerationProviders",
662690"videoGenerationProviders",
@@ -816,4 +844,41 @@ describe("resolvePluginCapabilityProviders", () => {
816844activate: false,
817845});
818846});
847+848+it("keeps targeted provider fallback dependency repair disabled when plugins are globally disabled", () => {
849+const cfg = { plugins: { enabled: false, allow: ["custom-plugin"] } } as OpenClawConfig;
850+const enablementCompat = {
851+plugins: {
852+enabled: true,
853+allow: ["custom-plugin", "google"],
854+entries: { google: { enabled: true } },
855+},
856+};
857+mocks.loadPluginManifestRegistry.mockReturnValue({
858+plugins: [
859+{
860+id: "google",
861+origin: "bundled",
862+contracts: { memoryEmbeddingProviders: ["gemini"] },
863+},
864+] as never,
865+diagnostics: [],
866+});
867+mocks.withBundledPluginEnablementCompat.mockReturnValue(enablementCompat);
868+mocks.withBundledPluginVitestCompat.mockReturnValue(enablementCompat);
869+870+const provider = resolvePluginCapabilityProvider({
871+key: "memoryEmbeddingProviders",
872+providerId: "gemini",
873+ cfg,
874+});
875+876+expect(provider).toBeUndefined();
877+expect(mocks.resolveRuntimePluginRegistry).toHaveBeenCalledWith({
878+config: enablementCompat,
879+onlyPluginIds: ["google"],
880+activate: false,
881+installBundledRuntimeDeps: false,
882+});
883+});
819884});
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。