feat(integrations): add @mem0/eve memory provider
Give Eve agents a first-class Mem0 recall/capture provider so they can use Mem0 in the agent loop instead of MCP. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
dae67f74f5
commit
1d83bb0835
@@ -0,0 +1,30 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { resolveOptions } from "../src/options.js";
|
||||
import { createFakeStore } from "./helpers.js";
|
||||
|
||||
describe("resolveOptions", () => {
|
||||
it("applies defaults", () => {
|
||||
expect(resolveOptions({ apiKey: "m0-test" })).toMatchObject({
|
||||
host: "https://api.mem0.ai",
|
||||
topK: 5,
|
||||
threshold: 0.1,
|
||||
rerank: false,
|
||||
infer: true,
|
||||
autoSearch: { enabled: true },
|
||||
capture: { enabled: true },
|
||||
});
|
||||
});
|
||||
|
||||
it("rejects an empty api key", () => {
|
||||
expect(() => resolveOptions({ apiKey: " " })).toThrow(/empty/);
|
||||
});
|
||||
|
||||
it("rejects an invalid topK", () => {
|
||||
expect(() => resolveOptions({ apiKey: "m0-test", topK: 0 })).toThrow(/topK/);
|
||||
});
|
||||
|
||||
it("keeps an injected store", () => {
|
||||
const store = createFakeStore();
|
||||
expect(resolveOptions({ apiKey: "m0-test", store }).store).toBe(store);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user