mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
Attaching a desktop browser writes browser:* and skill:browser allows into the session's permissions. Session rules are evaluated after agent rules, so the grant overrode a browser deny from config, an agent definition (for example a "*" deny) or the session itself. Browser tools never called the permission check either, so tool.use policies did not apply. The plugin now records each agent's rules before it appends its own default deny. A browser call is refused when those rules, plus the session's rules without the grant, deny the browser, decided the way core's tool filter decides. The call then runs the permission check with the operation as its resource, so permission.evaluate hooks such as tool.use policies apply. Sessions without a deny behave as before: the grant allows the check, so nothing prompts. Refs #54044, #53294, #56869 |
||
|---|---|---|
| .. | ||
| machine.test.ts | ||
| rpc.test.ts | ||
| tools.test.ts | ||
| tunnel-machine.test.ts | ||
| tunnel.test.ts | ||