Files
CVE-Hunter-Leo bdad26cfcb fix(platform): search Nix profile bin dirs for CLI discovery (#6121) (#6885)
* fix(platform): search Nix profile bin dirs for CLI discovery (#6121)

The packaged desktop app does not discover agent CLIs installed through
nix-darwin environment.systemPackages because launchd provides a minimal
PATH that excludes Nix profile directories.

Add three standard Nix bin paths to wellKnownUserToolchainBins:

- /run/current-system/sw/bin (system-wide NixOS/nix-darwin profile)
- /nix/var/nix/profiles/default/bin (default system profile)
- ~/.nix-profile/bin (user's active Nix profile)

Since this list is the single source of truth consumed by both the daemon
runtime resolver and the packaged sidecar PATH builder, all Nix-installed
agent CLIs are now detected after Rescan.

Closes #6121

* fix: gate system-wide Nix paths behind includeSystemBins (review)

Move /run/current-system/sw/bin and /nix/var/nix/profiles/default/bin
behind the includeSystemBins flag so sandboxed runs with OD_AGENT_HOME
do not reach host-installed Nix tools. Keep ~/.nix-profile/bin (home-
relative) always included.

Add test verifying system Nix paths appear only when includeSystemBins
is true and are omitted when false.

---------

Co-authored-by: CVE-Hunter-Leo <CVE-Hunter-Leo@users.noreply.github.com>
2026-08-14 07:22:10 +00:00
..
…