opencode
opencode copied to clipboard
fix: accept boolean values for permission config
Fixes #7810
What does this PR do?
Users may now use boolean true/false instead of "allow"/"deny" for permissions.
This adds a preprocess step to convert booleans automatically, consistent with how tools config already handles this.
How did you verify your code works?
I created .opencode/agent/testing.md with the following permissions:
---
description: Test agent
mode: subagent
tools:
read: true
permission:
write: false
---
I then launched OpenCode in my project directory. It now launches successfully and does not hang like before.