nixcfg/config/opencode/agents
Harald Hoyer 3e515d54eb feat(opencode): allow agents to read external Rust crate source
@make, @test, @check often need to inspect dependency source (trait
definitions, impl details, test patterns) to inform implementation or
verify findings. Opencode applies a CWD check on tool access, so reads
outside the worktree previously prompted for each access.

- Add permission.read/grep/glob path allowlists for the three locations
  cargo deps live: ~/.cargo/registry/src/, ~/.cargo/git/checkouts/, and
  /nix/store/*-vendor-*/ for crane / buildRustPackage projects.
- Document the discovery pattern in each agent: `cargo metadata
  --format-version 1` returns absolute paths via packages[].manifest_path.
- Cross-reference the registry paths from the permission.bash allowlist
  comment so future readers see the bash inspection commands (rg/ls)
  intentionally accept paths outside CWD.
- @check gets its first permission block (was tools-only before).

Path-pattern syntax for read/grep/glob isn't fully documented; if
opencode rejects it, fall back to `permission: { external_directory:
allow }` at the project config level.
2026-05-08 13:24:30 +02:00
..
check.md feat(opencode): allow agents to read external Rust crate source 2026-05-08 13:24:30 +02:00
make.md feat(opencode): allow agents to read external Rust crate source 2026-05-08 13:24:30 +02:00
pm.md feat(opencode): one-task-per-run model + 9 routing fixes (ADRs 13-21) 2026-05-08 13:02:54 +02:00
simplify.md fix(opencode): remove agent models and temperature 2026-05-06 15:33:11 +02:00
test.md feat(opencode): allow agents to read external Rust crate source 2026-05-08 13:24:30 +02:00