mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-23 02:34:21 +01:00
docs: add agent specific permission example (#3009)
This commit is contained in:
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user