diff --git a/src/plugins/loader.native-module-loader.test.ts b/src/plugins/loader.native-module-loader.test.ts index 987d0ddcc551..bbfadbcc2e10 100644 --- a/src/plugins/loader.native-module-loader.test.ts +++ b/src/plugins/loader.native-module-loader.test.ts @@ -74,55 +74,6 @@ function writePackagedPluginFixture(id: string) { return pluginRoot; } -function writePreManagedLlamaCppProviderFixture() { - const pluginRoot = tempDirs.make("openclaw-plugin-loader-"); - fs.mkdirSync(path.join(pluginRoot, "dist")); - fs.writeFileSync( - path.join(pluginRoot, "package.json"), - JSON.stringify( - { - name: "@openclaw/llama-cpp-provider", - version: "2026.7.2-beta.7", - type: "module", - openclaw: { - extensions: ["./dist/index.js"], - runtimeExtensions: ["./dist/index.js"], - }, - }, - null, - 2, - ), - "utf-8", - ); - fs.writeFileSync( - path.join(pluginRoot, "openclaw.plugin.json"), - JSON.stringify( - { - id: "llama-cpp", - configSchema: { - type: "object", - additionalProperties: false, - properties: {}, - }, - }, - null, - 2, - ), - "utf-8", - ); - fs.writeFileSync( - path.join(pluginRoot, "dist", "index.js"), - [ - 'import { createLocalEmbeddingProvider } from "openclaw/plugin-sdk/memory-core-host-engine-embeddings";', - 'export default { id: "llama-cpp", register() {', - ' if (typeof createLocalEmbeddingProvider !== "function") throw new Error("missing bridge");', - "} };", - ].join("\n"), - "utf-8", - ); - return pluginRoot; -} - function writePreSplitSdkBridgeConsumerFixture() { const pluginRoot = tempDirs.make("openclaw-plugin-loader-"); fs.mkdirSync(path.join(pluginRoot, "dist")); @@ -162,6 +113,9 @@ function writePreSplitSdkBridgeConsumerFixture() { // Import shapes copied from published 2026.7.2-beta.7 artifacts: // voice-call/matrix doctor contracts (runtime-doctor), whatsapp ack policy // (channel-feedback), slack progress-draft render (channel-outbound). + // Covers both alias classes on purpose: runtime-doctor is private-local-only, + // the channel subpaths are public. A source checkout has no dist/, so every + // subpath listed here is evaluated through jiti — keep them light. fs.writeFileSync( path.join(pluginRoot, "dist", "index.js"), [ @@ -284,30 +238,6 @@ describe("createPluginModuleLoader", () => { expect(sourceLoaderCalls).toStrictEqual([]); }); - it("loads the released pre-managed llama.cpp provider import through the SDK alias", async () => { - const { loadOpenClawPlugins } = await importFreshModule( - import.meta.url, - "./loader.js?scope=llama-cpp-upgrade-compat", - ); - const pluginRoot = writePreManagedLlamaCppProviderFixture(); - process.env.OPENCLAW_BUNDLED_PLUGINS_DIR = tempDirs.make("openclaw-plugin-loader-"); - - const registry = loadOpenClawPlugins({ - cache: false, - onlyPluginIds: ["llama-cpp"], - config: { - plugins: { - enabled: true, - load: { paths: [pluginRoot] }, - allow: ["llama-cpp"], - entries: { "llama-cpp": { enabled: true } }, - }, - }, - }); - - expect(registry.plugins.find((plugin) => plugin.id === "llama-cpp")?.status).toBe("loaded"); - }); - it("loads published pre-split SDK bridge imports (doctor repair, WhatsApp ack, Slack render)", async () => { const { loadOpenClawPlugins } = await importFreshModule( import.meta.url,