mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-10-26 10:45:22 +00:00
refactor(permission-system): simplify policy and autoreview flow
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
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");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user