From 13c8a5b14ed3b1843cfbb866552692eb8bbc76b1 Mon Sep 17 00:00:00 2001 From: Alex Blank Date: Mon, 13 Jul 2026 12:00:49 +0200 Subject: [PATCH] pi updates --- .../pi-permission-system/config.json | 186 ++++++++++++++++++ .pi/agent/settings.json | 1 + 2 files changed, 187 insertions(+) create mode 100644 .pi/agent/extensions/pi-permission-system/config.json diff --git a/.pi/agent/extensions/pi-permission-system/config.json b/.pi/agent/extensions/pi-permission-system/config.json new file mode 100644 index 0000000..1b277db --- /dev/null +++ b/.pi/agent/extensions/pi-permission-system/config.json @@ -0,0 +1,186 @@ +{ + "$schema": "https://raw.githubusercontent.com/gotgenes/pi-packages/main/packages/pi-permission-system/schemas/permissions.schema.json", + "debugLog": false, + "permissionReviewLog": true, + "yoloMode": false, + "toolInputPreviewMaxLength": 400, + "toolTextSummaryMaxLength": 120, + "piInfrastructureReadPaths": [], + "permission": { + "*": "ask", + + "path": { + "*": "allow", + + "*.env": "deny", + "*.env.*": "deny", + "*.env.example": "allow", + "*.env.sample": "allow", + "*.env.template": "allow", + + "~/.ssh/*": { + "action": "deny", + "reason": "SSH keys and configuration are outside the agent's normal scope." + }, + "~/.aws/*": { + "action": "deny", + "reason": "AWS configuration may contain credentials." + }, + "~/.config/gcloud/*": { + "action": "deny", + "reason": "Google Cloud configuration may contain credentials." + }, + "~/.kube/*": { + "action": "deny", + "reason": "Kubernetes configuration may contain cluster credentials." + }, + + "~/.netrc": "deny", + "~/.npmrc": "deny", + "~/.pypirc": "deny", + "~/.git-credentials": "deny", + "~/.docker/config.json": "deny", + + "*.pem": { + "action": "deny", + "reason": "PEM files frequently contain private keys or credentials." + }, + "*.key": { + "action": "deny", + "reason": "Key files should not be accessed automatically." + }, + "*credentials*.json": { + "action": "deny", + "reason": "Credential files should not be exposed to the agent." + }, + "*service-account*.json": { + "action": "deny", + "reason": "Service-account files commonly contain private credentials." + } + }, + + "read": "allow", + "find": "allow", + "grep": "allow", + "ls": "allow", + + "write": "allow", + "edit": "allow", + + "external_directory": { + "*": "ask", + + "~/.cache/*": "allow", + "~/.npm/_cacache/*": "allow", + "~/.cargo/registry/*": "allow", + "~/go/pkg/mod/*": "allow" + }, + + "bash": { + "*": "ask", + + "pwd": "allow", + "printf *": "allow", + "echo *": "allow", + "which *": "allow", + "command -v *": "allow", + + "git status": "allow", + "git status *": "allow", + "git diff": "allow", + "git diff *": "allow", + "git log": "allow", + "git log *": "allow", + "git show": "allow", + "git show *": "allow", + "git branch": "allow", + "git branch --show-current": "allow", + "git rev-parse *": "allow", + "git ls-files": "allow", + "git ls-files *": "allow", + + "git add *": "allow", + "git commit *": "allow", + "git push *": "ask", + "git pull *": "allow", + "git fetch *": "ask", + "git checkout *": "allow", + "git switch *": "allow", + "git restore *": "allow", + "git rebase *": "allow", + "git merge *": "allow", + + "git push --force *": { + "action": "deny", + "reason": "Force-pushing can overwrite remote history." + }, + "git push --force-with-lease *": "ask", + "git reset --hard *": { + "action": "deny", + "reason": "A hard reset can irreversibly discard uncommitted work." + }, + "git clean *": { + "action": "deny", + "reason": "Git clean can irreversibly delete untracked files." + }, + + "rm -rf *": { + "action": "deny", + "reason": "Recursive forced deletion is disabled in the bootstrap policy." + }, + "rm -fr *": { + "action": "deny", + "reason": "Recursive forced deletion is disabled in the bootstrap policy." + }, + "sudo *": { + "action": "deny", + "reason": "Privileged commands should be run manually." + }, + "su *": "deny", + "chmod -R *": "ask", + "chown *": "deny", + "mkfs *": "deny", + "dd *": "deny", + "shutdown *": "deny", + "reboot *": "deny", + + "curl *": "ask", + "wget *": "ask", + "ssh *": "ask", + "scp *": "ask", + "rsync *": "ask", + + "npm publish *": "deny", + "pnpm publish *": "deny", + "yarn publish *": "deny", + "cargo publish *": "deny", + "twine upload *": "deny", + + "npm install *": "ask", + "npm i *": "ask", + "pnpm install *": "ask", + "pnpm add *": "ask", + "yarn install *": "ask", + "yarn add *": "ask", + "pip install *": "ask", + "pip3 install *": "ask", + "uv add *": "ask", + "cargo add *": "ask" + }, + + "mcp": { + "*": "ask", + "mcp_status": "allow", + "mcp_list": "allow", + "mcp_search": "allow", + "mcp_describe": "allow", + "mcp_connect": "ask" + }, + + "skill": { + "*": "ask" + }, + + "task": "ask" + } +} diff --git a/.pi/agent/settings.json b/.pi/agent/settings.json index a891844..318267f 100644 --- a/.pi/agent/settings.json +++ b/.pi/agent/settings.json @@ -6,6 +6,7 @@ "defaultThinkingLevel": "high", "packages": [ "npm:pi-subagents", + "npm:@mjasnikovs/pi-task", "npm:context-mode", "npm:pi-web-access", "npm:@juicesharp/rpiv-ask-user-question",