The installer was using JSON.parse() which fails on JSONC (JSON with
Comments) files. OpenCode supports JSONC via jsonc-parser, so users
may have comments or trailing commas in their config.
Previously, parse failures would reset config to {} and overwrite the
user's file, causing data loss.
Changes:
- Add parseJsonc() to handle comments, trailing commas, and BOM
- On parse failure, skip permission config entirely instead of
overwriting user's file
- Show helpful error message with reason
Fixes#474
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>