import type { Check } from '../types.js'; export interface PathShadowOverrides { /** Raw PATH string to scan. Defaults to `process.env.PATH ?? ''`. Injectable for deterministic tests. */ path?: string; /** PATH entry separator. Defaults to ';' on win32, ':' elsewhere. Injectable for deterministic tests. */ separator?: string; /** Platform id, used only to pick candidate filenames. Defaults to `os.platform()`. */ platformId?: NodeJS.Platform; /** Per-candidate existence check. Defaults to `fs.existsSync`. Injectable so tests never touch the real filesystem. */ exists?: (candidatePath: string) => boolean; } /** * Warns when MORE THAN ONE `astramem-local` executable is reachable on PATH. * * Issue #308: a stale bun-global install (`~/.bun/bin/astramem-local`, an old * 0.4.0 build) shadowed the current npm-global install (0.18.0) whenever * `~/.bun/bin` preceded the npm bin dir on PATH. The shell silently resolved * the old binary — which predates the `reinstall` command — so the operator * saw `unknown command: reinstall` with no hint that a newer, working install * existed elsewhere on the same machine. This check makes that shape visible * before it costs someone a debugging session. * * Detection + guidance only: it never deletes or modifies a binary, and it * always WARNs (`ok: false`) rather than treating a second install as a hard * failure — a stray PATH entry is a footgun, not broken state, matching the * same non-fatal WARN convention as `checkConfigDirDivergence` and * `checkProxyCaptureReminder` in this same checks/ directory. * * Both PATH and the per-directory existence probe are injectable (see * `PathShadowOverrides`) so tests are deterministic and independent of the * runner's real PATH/filesystem — no real binaries are ever touched or * required to exist. */ export declare function checkPathShadow(overrides?: PathShadowOverrides): Check;