Browse Source

docs: add agent specific permission example (#3009)

Sai 4 months ago
parent
commit
1f725cc3ed
1 changed files with 19 additions and 1 deletions
  1. 19 1
      packages/web/src/content/docs/permissions.mdx

+ 19 - 1
packages/web/src/content/docs/permissions.mdx

@@ -111,5 +111,23 @@ For example.
     }
     }
   }
   }
   ```
   ```
-
   This configuration allows all commands by default (`"*": "allow"`) but requires approval for `git push` commands.
   This configuration allows all commands by default (`"*": "allow"`) but requires approval for `git push` commands.
+
+### Agents
+
+Configure agent specific permissions 
+
+```json
+{
+  "$schema": "https://opencode.ai/config.json",
+  "agent": {
+    "plan": {
+      "permission": {
+        "bash": {
+          "echo *": "allow"
+        }
+      }
+    }
+  }
+}
+```