{ // Bundle-owned hard guards, read directly from the installed bundle's // config/ directory. pi update overwrites this file; project configuration // cannot override it. "version": 1, "permission": { "bash": { "rm -rf /": "deny", "rm -rf /*": "deny", "rm -rf ~": "deny", "rm -rf ~/*": "deny", "sudo rm -rf /": "deny", "sudo rm -rf /*": "deny", "mkfs*": "deny", "dd * of=/dev/*": "deny" } }, // Writes to the files below always reach a human prompt — never AutoReview, // never yolo, never an existing session grant — and are denied outright when // no confirmation UI is available. Reads are unaffected. `*` crosses `/`, so // `/**` covers a whole subtree. `{agentDir}` is the Pi agent directory, // `{configHome}` is $XDG_CONFIG_HOME or ~/.config; a leading `~/` also works. "protectedWrites": [ { "pattern": "{agentDir}/auth.json", "label": "Pi 凭据(模型与搜索 API key)" }, { "pattern": "{agentDir}/settings.json", "label": "Pi 全局设置" }, { "pattern": "{agentDir}/models.json", "label": "Pi 模型配置" }, { "pattern": "{agentDir}/trust.json", "label": "项目信任记录" }, { "pattern": "{agentDir}/hashline.json", "label": "Hashline 配置" }, { "pattern": "{agentDir}/lsp.json", "label": "LSP 配置" }, { "pattern": "{agentDir}/git/**", "label": "已安装的组合包(含 config/ 与权限系统源码)" }, { "pattern": "{agentDir}/npm/**", "label": "已安装的 npm 扩展" }, { "pattern": "{agentDir}/extensions/**", "label": "Pi 自动加载的扩展目录" }, { "pattern": "{configHome}/my-pi/**", "label": "pi-ssh 凭据库与 p10k 配置" } ] }