mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-10-26 18:55:22 +00:00
22 lines
592 B
TypeScript
22 lines
592 B
TypeScript
import { readFileSync } from "node:fs";
|
|
import { join } from "node:path";
|
|
|
|
import { describe, expect, it } from "vitest";
|
|
|
|
const permissionSources = [
|
|
"src/index.ts",
|
|
"src/tool-registry.ts",
|
|
"src/handlers/before-agent-start.ts",
|
|
];
|
|
|
|
describe("Tool Search ownership boundary", () => {
|
|
it("never reads or changes Pi's active tool list", () => {
|
|
const source = permissionSources
|
|
.map((path) => readFileSync(join(process.cwd(), path), "utf8"))
|
|
.join("\n");
|
|
|
|
expect(source).not.toContain("getActiveTools");
|
|
expect(source).not.toContain("setActiveTools");
|
|
});
|
|
});
|