mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
## Why On macOS, GUI apps launched from Finder/Spotlight/Dock inherit a minimal PATH from launchd (`/usr/bin:/bin:/usr/sbin:/sbin`). The `discover_provider_candidates()` function in `backend.rs` only scanned this process PATH when looking for `buzz-backend-*` executables. As a result, backend providers (like `buzz-backend-blox`) were never found, and the "Run on" dropdown in Agent Settings was hidden — even though the binary existed both in the app bundle (`Contents/MacOS/`) and in `~/.local/bin`. ## What Augment the search directories in `discover_provider_candidates()` with: 1. **exe parent dir** (`Contents/MacOS/` in a `.app` bundle) — so bundled providers are always found regardless of how the desktop was launched 2. **`~/.local/bin`** — the conventional location for user-installed provider binaries (symlinks created by install scripts) Both directories are only added if not already present in PATH (deduplication). The exe parent dir is prepended (highest priority for bundled providers); `~/.local/bin` is appended. ## Verification - `cargo check --lib` passes - All 17 `managed_agents::backend` unit tests pass - Pre-push hook `desktop-tauri-test` passes (38s) ## References Root cause confirmed by inspecting the running `buzz-desktop` process environment: ``` $ ps eww <pid> | grep PATH PATH=/usr/bin:/bin:/usr/sbin:/sbin ``` --- Generated with Fizz