2 Commits
Author SHA1 Message Date
Daniel Kim 609ad7e3ed Fix OpenCode 2.0.6+ health probe and WSL browser launch (#409)
OpenCode 2.0.6 removed /api/status in favor of /api/info, so orx probed
two dead routes until the 30s timeout and reported "Could not read
OpenCode configuration". The V2 check now negotiates /api/info ->
/api/status -> /api/health and requires a JSON body carrying `version`,
since the SPA fallback can answer unknown routes with HTML 200s.
/api/health answering still marks the legacy (<=2.0.3) route layout for
export/generate paths.

On WSL, xdg-open often has nothing to launch, so the dashboard URL never
reached the Windows browser. On WSL the URL now goes to the Windows host
through rundll32.exe url.dll,FileProtocolHandler (by PATH, then by
absolute System32 path for appendWindowsPath=false), then wslview, then
xdg-open. rundll32 is tried first because some wslview builds re-parse
the URL through cmd and truncate at '&', which breaks the login
callback's state parameter. Native Windows switches from cmd /C start to
the same argv-safe rundll32 call.

The compat fixture learns the same health negotiation, treats the 2.0.6+
synthetic idle message correctly when waiting for a reply, and looks for
export under /api/experimental first.

Refs #341
2026-09-22 10:32:10 -07:00
Daniel Kim 5fa74d1c3b Support OpenCode V2 alongside V1 with safe history migration (#348)
* Support OpenCode V2 alongside V1 with safe history migration

* Avoid guessing OpenCode V2 authentication method

* Remove OpenCode migration backups after validated upgrade
2026-09-15 16:49:19 -07:00