Expand description
Host tool discovery — HostToolScanner.
Generalizes skill::requirements::has_bin (a boolean which <name>) into a
real inventory: enumerate CLIs across PATH and known package-manager install
roots, classify each by its source (brew / cargo / npm / …), and probe its
version. Cross-platform: uses Rust PATH traversal with PATHEXT resolution
on Windows (the existing which-based check silently fails there).
Testability is via the HostProbe trait: production uses RealProbe,
tests inject a [crate::host_tools::FakeProbe] (see tests module).
Structs§
- Detected
Tool - A single detected host tool.
- Host
Tool Scanner - Cross-platform host CLI scanner with mtime/TTL caching.
- Real
Probe - Real-filesystem probe. Expands
~/env vars in manager prefixes lazily and resolves dynamic prefixes (npm prefix -g,go env GOPATH) only when the manager binary itself is on PATH.
Enums§
- Tool
Source - How a tool was installed / where it lives.
Traits§
- Host
Probe - Filesystem + process abstraction the scanner talks to.