/** * Build a platform-appropriate "is this binary on PATH?" command. * * On Windows, `cmd.exe` doesn't know about `which` — the equivalent is * `where`. On macOS/Linux, `which` is the canonical choice. This helper * keeps the branching in one place so callers don't duplicate the check. * * 0706 T-001: foundation for platform-aware agent detection. */ export declare function buildDetectCommand(binary: string): string; /** * Async "is this binary on PATH?" probe. Returns true when the binary is * found via `which`/`where`, false otherwise. Never throws — non-zero exit * codes and spawn failures both resolve to `false`. * * Intended for use inside agent-registry `detectInstalled` functions where * a one-shot "present or not" answer is enough. * * 0706 T-001: replaces ad-hoc `exec("which X")` strings in agents-registry.ts * so Windows installs can detect agents without piping through shell. */ export declare function detectBinary(binary: string): Promise; /** * Resolve a CLI binary name to its full absolute path. * * Tries multiple strategies in order: * 1. Current PATH via `which` / `where` * 2. Login shell PATH (picks up .zshrc/.bashrc additions) * 3. npm global bin directory * 4. Common installation directories per OS * 5. Falls back to bare name (lets spawn produce a clear ENOENT error) * * Results are cached per binary name for the lifetime of the process. */ export declare function resolveCliBinary(name: string): string; /** * Build an enhanced PATH string that includes common binary directories. * Use this when spawning child processes to ensure they can find binaries * even if the parent process has a limited PATH. */ export declare function enhancedPath(currentPath?: string): string; /** Clear the resolution cache (useful for testing) */ export declare function clearResolveCache(): void; export declare function enhancedSpawnEnv(baseEnv?: NodeJS.ProcessEnv): NodeJS.ProcessEnv; /** Test-only: drop the memoized process-env enhanced PATH. */ export declare function _resetEnhancedSpawnEnvCache(): void;