mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-10-26 10:45:22 +00:00
feat(permission): integrate auto-review and hard guards
This commit is contained in:
@@ -736,13 +736,13 @@ describe("loadAndMergeConfigs", () => {
|
||||
function writeGlobal(content: Record<string, unknown>): void {
|
||||
const dir = join(agentDir, "extensions", "pi-permission-system");
|
||||
mkdirSync(dir, { recursive: true });
|
||||
writeFileSync(join(dir, "config.json"), JSON.stringify(content));
|
||||
writeFileSync(join(dir, "policy.jsonc"), JSON.stringify(content));
|
||||
}
|
||||
|
||||
function writeProject(content: Record<string, unknown>): void {
|
||||
const dir = join(cwd, ".pi", "extensions", "pi-permission-system");
|
||||
mkdirSync(dir, { recursive: true });
|
||||
writeFileSync(join(dir, "config.json"), JSON.stringify(content));
|
||||
writeFileSync(join(dir, "policy.jsonc"), JSON.stringify(content));
|
||||
}
|
||||
|
||||
function writeLegacyGlobalPolicy(content: Record<string, unknown>): void {
|
||||
@@ -826,7 +826,7 @@ describe("loadAndMergeConfigs", () => {
|
||||
expect(result.merged.yoloMode).toBe(true);
|
||||
});
|
||||
|
||||
it("does not emit legacy extension config issue when path equals new global path", () => {
|
||||
it("does not emit legacy extension config issue when its path equals the runtime legacy path", () => {
|
||||
const newGlobalDir = join(agentDir, "extensions", "pi-permission-system");
|
||||
mkdirSync(newGlobalDir, { recursive: true });
|
||||
writeFileSync(
|
||||
|
||||
Reference in New Issue
Block a user