fix(plugins): use shared handoff resources and native patch versions

This commit is contained in:
kartik-mem0
2026-09-10 19:20:14 +05:30
parent 19a71bbacf
commit 2ac8f2f9a9
83 changed files with 2515 additions and 2916 deletions
+9
View File
@@ -50,6 +50,15 @@ describe("plugin registration modes", () => {
);
});
it("keeps shared resource commands and model tools available before Mem0 setup", () => {
const api = createPluginApi();
api.pluginConfig.apiKey = "";
memoryPlugin.register(api as any);
expect(api.registerCommand).toHaveBeenCalledWith(expect.objectContaining({name: "mem0-handoff"}));
expect(api.registerTool).toHaveBeenCalledWith(expect.any(Function), {name: "mem0_handoff", optional: false});
expect(api.on).toHaveBeenCalledWith("before_prompt_build", expect.any(Function));
});
it("keeps cli-metadata registration free of runtime side effects", () => {
const api = createPluginApi("cli-metadata");