refactor(permission-system): simplify policy and autoreview flow

This commit is contained in:
云服务部-叶林立
2026-09-03 02:01:06 +08:00
parent 180da95ab7
commit 6e7effa792
112 changed files with 911 additions and 10346 deletions
@@ -160,20 +160,6 @@ describe("checkPermission", () => {
);
});
it("resolves an external_directory path query through an access-path intent matching the canonical alias", () => {
realpathSync.mockImplementation((p: string) =>
p === "/test/project/link" ? "/test/project/real" : p,
);
const { service, resolver } = makeService();
service.checkPermission("external_directory", "link");
expect(resolver.resolve).toHaveBeenCalledTimes(1);
const intent = resolver.resolve.mock.calls[0][0];
expect(intent.kind).toBe("access-path");
if (intent.kind === "access-path") {
expect(intent.surface).toBe("external_directory");
expect(intent.path.matchValues()).toContain("/test/project/real");
}
});
it("resolves a path-bearing tool query (read) through an access-path intent", () => {
const { service, resolver } = makeService();