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
@@ -8,9 +8,7 @@ import {
getGlobalLogsDir,
getLegacyExtensionConfigPath,
getLegacyGlobalPolicyPath,
getLegacyProjectPolicyPath,
getProjectAgentsDir,
getProjectConfigPath,
REVIEW_LOG_FILENAME,
} from "#src/config-paths";
@@ -38,11 +36,6 @@ describe("config-paths", () => {
);
});
it("getProjectConfigPath returns .pi/extensions/pi-permission-system/policy.jsonc under cwd", () => {
expect(getProjectConfigPath(cwd)).toBe(
join(cwd, ".pi", "extensions", "pi-permission-system", "policy.jsonc"),
);
});
it("getProjectAgentsDir returns .pi/agents under cwd", () => {
expect(getProjectAgentsDir(cwd)).toBe(join(cwd, ".pi", "agents"));
@@ -56,11 +49,6 @@ describe("config-paths", () => {
);
});
it("getLegacyProjectPolicyPath returns .pi/agent/pi-permissions.jsonc under cwd", () => {
expect(getLegacyProjectPolicyPath(cwd)).toBe(
join(cwd, ".pi", "agent", "pi-permissions.jsonc"),
);
});
it("getLegacyExtensionConfigPath returns config.json under extensionRoot", () => {
expect(getLegacyExtensionConfigPath(extensionRoot)).toBe(