evOo-local/packages/adapters/src/memory-tools.test.ts
cynarAI 6c7eed7580 Initial clean evOo-local from f00577b
Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline
(Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/*
packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
2026-09-20 17:15:16 +02:00

34 lines
1.2 KiB
TypeScript

import type { ConnectorTool } from "@rakazo/adapter-kit";
import { describe, expect, it } from "vitest";
import { selectMemoryTools } from "./memory-tools.js";
function tool(name: string): ConnectorTool {
return { name, description: name, inputSchema: { type: "object", properties: {} } };
}
const allThree = [
tool("remember"),
tool("recall_memory"),
tool("save_memory"),
tool("forget_memory"),
tool("shell"),
];
describe("selectMemoryTools", () => {
it("keeps native remember and drops semantic memory tools when unconfigured", () => {
const names = selectMemoryTools(allThree, false).map((t) => t.name);
expect(names).toEqual(["remember", "shell"]);
});
it("keeps semantic memory tools and drops native remember when configured", () => {
const names = selectMemoryTools(allThree, true).map((t) => t.name);
expect(names).toEqual(["recall_memory", "save_memory", "forget_memory", "shell"]);
});
it("is a no-op for tool lists with no memory tools at all", () => {
const shellOnly = [tool("shell")];
expect(selectMemoryTools(shellOnly, false)).toEqual(shellOnly);
expect(selectMemoryTools(shellOnly, true)).toEqual(shellOnly);
});
});