Add basic permission configuration methods
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 502
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 715
Description
### Problem
- The https://github.com/apache/maka/blob/main/packages/cli/README.md file doesn't mention anything related to permissions. It would be great if there were a way to configure permissions. A sandbox isn't necessarily needed; prompts and regular expressions can handle many scenarios.
- For example, in the `~/.config/opencode/opencode.jsonc` file related to https://github.com/anomalyco/opencode , I would do something like this to prevent `anomalyco/opencode` from accessing or modifying files under `/mnt/**` and the `/etc/wsl.conf` file, while also disabling `anomalyco/opencode` from executing the `git commit` and `git push` commands.
```json
{
"$schema": "https://opencode.ai/config.json",
"permission": {
"bash": {"git commit *": "deny","git push *": "deny"},
"edit": {"/etc/wsl.conf": "deny"},
"external_directory": {"*": "allow","/mnt/**": "deny"}
}
}
```
- Early investigation is located at https://x.com/linghengqian/status/2090453772862656944?s=20 .
### Desired outcome
- Add basic permission configuration methods.
### Alternatives or workarounds
- Uncertain.
Contributor guide
Assessment
This issue has not been assessed yet.