import assert from "node:assert/strict"; import { test } from "node:test"; import { initialActiveTools } from "./active-tools.ts"; test("removes schema-less tools generated by the obsolete Pi adapter", () => { assert.deepEqual( initialActiveTools([ "read", "index_repository", "search_graph", "cbm_search_graph", ]), ["read", "cbm_search_graph", "cbm_search_tools"], ); }); test("keeps lazy cbm tools inactive at session start", () => { assert.deepEqual( initialActiveTools(["read", "cbm_query_graph", "cbm_trace_path"]), ["read", "cbm_search_tools"], ); }); test("keeps unrelated tools and adds the loader once", () => { assert.deepEqual( initialActiveTools(["read", "workflow", "cbm_search_tools", "read"]), ["read", "workflow", "cbm_search_tools"], ); });