test(agents): opencode answers only through the idx tools

opencode kept its built-in tools, so it could route around the server
under test: on published 0.3.1 it answered a quote from web search, and
on the live `changes` case it queried the ownership SQLite file with
bash and timed out. Deny every tool but `idx_*`, as Claude, pi, and
Hermes already are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V3syn2fN2LNo5pvTSqc6eh
This commit is contained in:
hermes 2026-10-16 06:50:29 +00:00
commit 855ec0cdc3
2 changed files with 5 additions and 3 deletions

View file

@ -276,7 +276,8 @@ setup_opencode() {
mkdir -p "$work/opencode/cwd"
jq -n --argjson s "$server_json" \
'{"$schema": "https://opencode.ai/config.json",
mcp: {idx: {type: "local", command: ([$s.command] + $s.args), environment: $s.env, enabled: true}}}' \
mcp: {idx: {type: "local", command: ([$s.command] + $s.args), environment: $s.env, enabled: true}},
permission: {"*": "deny", "idx_*": "allow"}}' \
> "$work/opencode/cwd/opencode.json"
}
run_opencode() {