Skip to main content

Module scanner

Module scanner 

Source
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§

DetectedTool
A single detected host tool.
HostToolScanner
Cross-platform host CLI scanner with mtime/TTL caching.
RealProbe
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§

ToolSource
How a tool was installed / where it lives.

Traits§

HostProbe
Filesystem + process abstraction the scanner talks to.