pub fn detect(
env: impl Fn(&str) -> Option<String>,
on_path: impl Fn(&str) -> bool,
healthz: impl Fn() -> bool,
) -> EnvironmentExpand description
Detect the environment via injected lookups: env(key) for env vars, on_path(bin) for PATH
probes, healthz() for a live proxy probe. Pure decision logic; all I/O behind the closures.