docs(opencode): installer writes the V1 permission rule

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This commit is contained in:
MaheshtheDev 2026-11-03 16:33:03 +00:00
parent 16ed414e0e
commit a5c3a9fcbc

View file

@ -76,18 +76,16 @@ OpenCode V1 and OpenCode 2 read different keys from `~/.config/opencode/opencode
```jsonc
{
"plugins": ["opencode-supermemory"],
"permissions": [
{ "action": "supermemory_recall", "resource": "*", "effect": "allow" }
]
"permission": { "supermemory_recall": "allow" }
}
```
The `permissions` rule lets the read-only `supermemory_recall` tool run without prompting.
The `permission` rule lets the read-only `supermemory_recall` tool run without prompting. OpenCode 2 reads this V1-style rule too.
</Tab>
</Tabs>
<Warning>
The installer writes all three keys (`plugin`, `plugins`, and `permissions`) so that one file covers both versions. OpenCode V1 refuses to start when the file has a top-level `permissions` field ("V2 permissions are not supported by OpenCode V1"), so V1 users must remove `permissions` after installing. V1 ignores `plugins` with a warning, so you can remove it too.
The installer writes `plugin`, `plugins`, and `permission` so that one file covers both versions. Installers before 2.1.1 wrote a top-level `permissions` field instead, which OpenCode V1 1.19 and later refuse to start with ("V2 permissions are not supported by OpenCode V1"). Run the installer again to replace it. OpenCode V1 1.17 and 1.18 also reject the `plugins` key, so remove it on those versions.
</Warning>
## How it works