mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-10-26 18:55:22 +00:00
- 组合包拥有、可随时重建的配置、日志与缓存统一放在 <agentDir>/my-pi/:permission-system/(policy.jsonc、hard-guards.jsonc、 logs/)、rtk-optimizer/config.json、tool-search/(config.json、 catalog-v1.json)与 system-prompt-cover.md。hashline.json、lsp.json 由外部扩展读取固定路径,是唯一例外。 - 新增 config/bundle-manifest.json 与 scripts/rebuild-bundle-config.mjs: 先校验全部来源与目标,在临时目录构建完整树,再整体删除旧 my-pi/ (符号链接只删链接)并原子替换,不备份。install.sh / update.sh 每次 运行都调用它;扩展自身不再播种或迁移配置。 - update.sh 删除 pi update 失败后的 git clean 恢复逻辑:Pi 1.3.0 会在 下一次 pi update 时依据中断标记自行恢复。同时删除 Tool Search settings.json 快照迁移与封面部署脚本。 - Tool Search 改为读取 my-pi/tool-search/config.json(源为 config/tool-search.json,须与 BUNDLE_TOOL_SEARCH_DEFAULTS 一致), 不再读写 settings.json 的 toolSearch 段,移除 bundleDefaultsVersion。 - 默认权限策略开启 debugLog。 - 旧位置的残留文件不迁移、不清理;AGENTS.md / README 同步新约束。 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
149 lines
4.3 KiB
JSON
149 lines
4.3 KiB
JSON
{
|
|
"debugLog": true,
|
|
"permissionReviewLog": true,
|
|
"yoloMode": false,
|
|
"doublePressToConfirm": true,
|
|
|
|
// AutoReview is the default authority for deterministic review decisions.
|
|
//
|
|
// The reviewer is a conversational model asked to judge one planned action
|
|
// under a bundled security policy. With no provider/model pair it follows
|
|
// the session's current model, so review quality tracks whatever you run.
|
|
// It answers by calling `approve` or `reject`; a reject — and every failure
|
|
// (timeout, provider error, malformed verdict) — defers to the human
|
|
// permission prompt with the model's reason shown. Approvals are cached
|
|
// within one user message, so the same ask does not pay for a second review.
|
|
//
|
|
// To pin a dedicated review model instead, set BOTH "provider" and "model";
|
|
// exactly one set is a misconfiguration and also defers to the human.
|
|
// "reasoning" defaults to "low" and only applies to reasoning-capable models.
|
|
"authorizerChain": ["auto-review"],
|
|
"autoReview": {
|
|
"enabled": true
|
|
},
|
|
|
|
"shellTools": {
|
|
"ssh_bash": {
|
|
"commandArgument": "command",
|
|
"decisionFloor": "ask"
|
|
}
|
|
},
|
|
|
|
"permission": {
|
|
// Unknown tools are reviewed instead of silently allowed.
|
|
"*": "ask",
|
|
"read": "allow",
|
|
"write": "allow",
|
|
"edit": "allow",
|
|
"grep": "allow",
|
|
"find": "allow",
|
|
"multi_grep": "allow",
|
|
"codegraph_explore": "allow",
|
|
"lsp_diagnostics": "allow",
|
|
"ctx_execute": "allow",
|
|
"ctx_execute_file": "allow",
|
|
"ctx_batch_execute": "allow",
|
|
"tool_search": "allow",
|
|
"ask_user_question": "allow",
|
|
|
|
// Hermes memory tools write only to the extension's own agent-directory
|
|
// stores and never touch the workspace, so they stay allowed. memory_search
|
|
// is invoked by the injected memory policy on most turns and must not
|
|
// trigger an AutoReview round trip each time.
|
|
"memory_search": "allow",
|
|
"session_search": "allow",
|
|
"memory_add": "allow",
|
|
"memory_replace": "allow",
|
|
"memory_remove": "allow",
|
|
"skill_manage": "allow",
|
|
// pi-compaction's evidence recovery reads only the extension's own segment
|
|
// index and never touches the workspace. It is pinned in Tool Search's
|
|
// alwaysEnabled set, so it must not pay an AutoReview round trip per turn.
|
|
"context_tree_query": "allow",
|
|
|
|
"ssh_connect": "ask",
|
|
"ssh_cd": "ask",
|
|
"ssh_read": "ask",
|
|
"ssh_write": "ask",
|
|
"ssh_edit": "ask",
|
|
"ssh_find": "ask",
|
|
"ssh_grep": "ask",
|
|
|
|
"path": {
|
|
"*": "allow",
|
|
".git/*": "ask"
|
|
},
|
|
"bash": {
|
|
"*": "allow",
|
|
"rg*": "deny",
|
|
"grep*": "deny",
|
|
"find*": "deny",
|
|
"fd*": "deny",
|
|
"git *": "ask",
|
|
"git status*": "allow",
|
|
"git diff*": "allow",
|
|
"git log*": "allow",
|
|
"git show*": "allow",
|
|
"git rev-parse*": "allow",
|
|
"git ls-files*": "allow",
|
|
"git grep*": "deny",
|
|
"git branch": "allow",
|
|
"git branch --show-current*": "allow",
|
|
"git remote -v": "allow",
|
|
"git remote get-url*": "allow",
|
|
"npm install *": "ask",
|
|
"npm add *": "ask",
|
|
"npm uninstall *": "ask",
|
|
"npm update *": "ask",
|
|
"pnpm install *": "ask",
|
|
"pnpm add *": "ask",
|
|
"pnpm uninstall *": "ask",
|
|
"pnpm update *": "ask",
|
|
"bun install *": "ask",
|
|
"bun add *": "ask",
|
|
"bun uninstall *": "ask",
|
|
"bun update *": "ask",
|
|
"pip install *": "ask",
|
|
"pip3 install *": "ask",
|
|
"brew install *": "ask",
|
|
"brew uninstall *": "ask",
|
|
"rm *": "ask",
|
|
"/bin/rm *": "ask",
|
|
"rmdir *": "ask",
|
|
"/bin/rmdir *": "ask",
|
|
"unlink *": "ask",
|
|
"/usr/bin/unlink *": "ask",
|
|
"mv *": "ask",
|
|
"/bin/mv *": "ask",
|
|
"truncate *": "ask",
|
|
"dd *": "ask",
|
|
"chmod *": "ask",
|
|
"chown *": "ask",
|
|
"sudo *": "ask",
|
|
"su *": "ask",
|
|
"kill *": "ask",
|
|
"pkill *": "ask",
|
|
"diskutil *": "ask",
|
|
"security *": "ask",
|
|
"launchctl *": "ask",
|
|
"osascript *": "ask",
|
|
"open *": "ask",
|
|
"ssh *": "ask",
|
|
"scp *": "ask",
|
|
"sftp *": "ask",
|
|
"rsync *": "ask",
|
|
"curl *": "ask",
|
|
"wget *": "ask",
|
|
"printenv*": "ask"
|
|
},
|
|
"mcp": {
|
|
"*": "ask",
|
|
"mcp_status": "allow",
|
|
"mcp_list": "allow"
|
|
},
|
|
"skill": {
|
|
"*": "allow"
|
|
}
|
|
}
|
|
}
|