feat(permission): integrate auto-review and hard guards

This commit is contained in:
云服务部-叶林立
2026-09-02 15:34:29 +08:00
parent a4807dde67
commit 180da95ab7
79 changed files with 4263 additions and 9203 deletions
+3 -3
View File
@@ -4,7 +4,7 @@
| Problem | Cause | Solution |
| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| Config not applied (everything asks) | File not found or parse error | Verify the global config at `~/.pi/agent/extensions/pi-permission-system/config.json` (respects `PI_CODING_AGENT_DIR`); check for trailing commas |
| Config not applied (everything asks) | File not found or parse error | Verify the global policy at `~/.pi/agent/extensions/pi-permission-system/policy.jsonc` (respects `PI_CODING_AGENT_DIR`); check JSONC syntax |
| Per-agent override not applied | Frontmatter parsing issue | Ensure `---` delimiters at file top; keep YAML simple; restart session |
| Tool blocked as unregistered | Unknown tool name | Use a registered `mcp` tool for server tools: `{ "tool": "server:tool" }` |
| `/skill:<name>` blocked | Deny policy or confirmation unavailable | Check merged `skill` policy (global/project/agent layers). `ask` still requires UI or forwarded confirmation. |
@@ -22,9 +22,9 @@ This makes it easy to verify which files the extension actually loaded:
```jsonc
{
"event": "config.resolved",
"globalConfigPath": "/…/.pi/agent/extensions/pi-permission-system/config.json",
"globalConfigPath": "/…/.pi/agent/extensions/pi-permission-system/policy.jsonc",
"globalConfigExists": true,
"projectConfigPath": "/…/my-project/.pi/extensions/pi-permission-system/config.json",
"projectConfigPath": "/…/my-project/.pi/extensions/pi-permission-system/policy.jsonc",
"projectConfigExists": false,
"agentsDir": "/…/.pi/agent/agents",
"agentsDirExists": true,