fix(opencode): catch up to v1.14.20 (tui.mouse config key)#759
Conversation
Closes #752. Triage of OpenCode v1.3.13 -> v1.14.20 (~21 releases across v1.3.14-17, v1.4.0-11, v1.14.17-20; v1.5-v1.13 don't exist - re-versioning artifact) surfaced ONE structural change agnix needs to absorb: OpenCode v1.3.16 added the `tui.mouse: bool` config key to disable terminal mouse capture (PR anomalyco/opencode#13748). Without this fix, agnix would false-positive OC-TUI-001 (unknown TUI key) on any current OpenCode config that includes `{"tui": {"mouse": false}}`. Added `"mouse"` to `KNOWN_TUI_KEYS` in `crates/agnix-core/src/schemas/opencode.rs` plus two regression tests (mouse: false, mouse: true) asserting OC-TUI-001 doesn't fire. Other inspected upstream changes that need NO agnix changes: - MCP `oauth_redirect_uri` (v1.4.3): optional sub-field, OC-CFG-012 only checks required client_id + authorization_url - `compaction.autocontinue` (v1.4.4): optional sub-field, OC-CFG-009 only checks compaction.reserved - `compaction.preserve_recent_tokens` (v1.14.19): rename of an optional sub-field, agnix doesn't enforce sub-key list - LLM Gateway provider (v1.4.9): provider names not allowlisted by agnix - SDK breaking change v1.4.0 (UserMessage.variant -> .model): not a config schema change - All TUI/desktop/SDK fixes in v1.14.17-20: runtime/UI only Documentation: - Bumped verified_on to 2026-04-22 for all 46 OC-* rules in knowledge-base/rules.json (+ synced crates/agnix-rules/rules.json) - Bumped RESEARCH-TRACKING.md "Last Reviewed" for OpenCode from 2026-02-05 to 2026-04-22 - Regenerated website/docs/rules/generated/*.md via the docs script (forced by docs_website_parity test) Note: As of v1.14.x upstream `config.ts` deprecates the in-config `tui` block in favour of a separate `tui.json` file. agnix's TUI validator continues to help users on v1.3-v1.4 and users who keep the deprecated form. Migrating to validate `tui.json` is a future enhancement. Verified locally: - cargo clippy --workspace --all-targets --all-features -- -D warnings clean - cargo test -p agnix-core --lib: 3446 passed (+2 new regression tests) - cargo test -p agnix-rules --tests: 47 + 4 parity tests pass - cargo fmt --all clean
There was a problem hiding this comment.
Pull request overview
Updates agnix’s OpenCode schema/rules to match upstream OpenCode v1.14.20 (notably the addition of tui.mouse) and refreshes OpenCode rule verification metadata/documentation.
Changes:
- Add
mouseto OpenCodeKNOWN_TUI_KEYSsotui.mouseno longer triggers OC-TUI-001. - Add regression tests asserting
tui.mouse: true/falsedoes not produce OC-TUI-001 diagnostics. - Bump OpenCode rule
verified_ondates and regenerate associated documentation/tracking entries (plus changelog note).
Reviewed changes
Copilot reviewed 6 out of 52 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
crates/agnix-core/src/schemas/opencode.rs |
Extends known TUI key allowlist with mouse. |
crates/agnix-core/src/rules/opencode.rs |
Adds unit tests preventing OC-TUI-001 false-positives for tui.mouse. |
knowledge-base/rules.json |
Refreshes verified_on metadata for OC-* rules. |
crates/agnix-rules/rules.json |
Mirrors OC-* rule metadata updates for the packaged ruleset. |
knowledge-base/RESEARCH-TRACKING.md |
Updates OpenCode “Last Reviewed” date. |
website/docs/rules/generated/*.md |
Regenerates rule docs with updated Verified On dates. |
CHANGELOG.md |
Documents the OpenCode catch-up fix and related metadata/doc updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request updates the OpenCode schema and validation rules to support versions v1.3.13 through v1.14.20. Key changes include adding the mouse configuration key to the TUI schema to prevent false-positive validation errors, along with new regression tests. The PR also updates the verification dates for all OpenCode rules to 2026-04-22 across the changelog, research tracking, and documentation. I have no feedback to provide.
Summary
Triage of OpenCode v1.3.13 -> v1.14.20 (issue #752). The bump label looks like ~11 minor versions but actually spans only 21 releases across 3 version bands (v1.3.14-17, v1.4.0-11, v1.14.17-20); v1.5.x through v1.13.x do not exist (re-versioning artifact). Of those 21 releases, one structural change actually affects agnix.
The fix
OpenCode v1.3.16 (PR
anomalyco/opencode#13748) added thetui.mouse: boolconfig key to disable terminal mouse capture. Without this PR,agnixwould false-positive OC-TUI-001 (unknown TUI key) on any current OpenCode config that uses it:{ "tui": { "mouse": false } }Added
"mouse"toKNOWN_TUI_KEYSincrates/agnix-core/src/schemas/opencode.rs+ two regression tests (mouse: falseandmouse: true).Other inspected upstream changes that need NO agnix change
oauth_redirect_uri(v1.4.3)client_id+authorization_urlcompaction.autocontinue(v1.4.4)compaction.reservedcompaction.preserve_recent_tokens(v1.14.19)UserMessage.variant->.model)Doc bumps
knowledge-base/rules.jsonandcrates/agnix-rules/rules.json: bumpedverified_onto2026-04-22for all 46 OC-* rulesknowledge-base/RESEARCH-TRACKING.md: OpenCode "Last Reviewed" 2026-02-05 -> 2026-04-22website/docs/rules/generated/*.md(forced bydocs_website_paritytest)Observation, not a fix in this PR
As of v1.14.x, upstream
packages/opencode/src/config/config.tsdeprecates the in-configtuiblock in favour of a separatetui.jsonfile. The validator'snormalizeLoadedConfig()removes deprecated keys (theme,keybinds,tui) on load. agnix's TUI validator continues to help users on v1.3-v1.4 and users who still use the deprecated form. Migrating agnix to validate the newtui.jsonfile is a green-field enhancement (new FileType + schema + rules) - intentionally out of scope for this triage; happy to open a follow-up issue if you want it tracked.ToolVersions
OpenCode is a
pub opencode: booltoggle incrates/agnix-core/src/config.rs(defaulttrue), not a version string. Nothing to bump.Source verified
https://raw.githubusercontent.com/sst/opencode/v1.14.20/packages/opencode/src/config/config.ts— confirmed top-level keysgh release view <tag> -R sst/opencodeanomalyco/opencode#13748for thetui.mouseevidenceTest plan
cargo build --workspacecleancargo test -p agnix-core --lib: 3446 passed (+2 new regression tests)cargo test -p agnix-rules --tests: 47 + 4 parity tests passcargo clippy --workspace --all-targets --all-features -- -D warningscleancargo fmt --allcleanCloses #752.