import type { ClaudeInvoker } from '../invoker.js'; export interface ResolveDeps { config?: { realClaudePath?: string | null; }; /** Returns candidate absolute paths for `claude` (like `where`/`which -a`). */ findCandidates?: () => string[]; /** * Just the PATH lookup, so a test can simulate a machine where PATH knows * nothing while still exercising the real search of known locations. Without * this seam the only way to test discovery is to replace all of it, which * leaves a test that passes whether the discovery exists or not. */ onPath?: () => string[]; /** Predicate marking a candidate as our own shim, to be skipped. */ isShim?: (candidate: string) => boolean; platform?: NodeJS.Platform; } /** * Resolve the REAL claude launcher to an absolute path and return it as an * invoker. On Windows this resolves to the actual `.exe` (not the `.cmd` shim, * which node-pty cannot launch). Invoking by absolute path (never the bare name) * is what stops the transparent shim from calling itself. An explicit * `config.realClaudePath` always wins. */ export declare function resolveRealClaude(deps?: ResolveDeps): ClaudeInvoker; /** * Say what was actually looked for, and what to do about it. * * The old message named a config key and stopped there, which reads as "you * have not installed Claude" to someone who plainly has. The two real causes * are a PATH this process never inherited and an install somewhere unusual, * and both are acted on differently. */ export declare function cannotFindClaude(candidates: string[], platform: NodeJS.Platform): string; /** * Ask the OS where `claude` lives, then look where it is normally installed. * * PATH alone was not enough, and the way it fails is confusing: Claude is * installed, the operator can run it in their own shell, and ccx says it does * not exist. That happens whenever the installer added a directory to PATH * that this process never inherited, which is the ordinary case for a shell * (or an editor) started before the install, and for anything launched from a * process with a frozen environment. * * So a miss on PATH is not an answer, it is a reason to go and look. */ export declare function defaultFindCandidates(platform: NodeJS.Platform, fromPath?: () => string[]): string[]; /** * The places Claude Code actually installs itself. * * Listed rather than guessed at: the native installer, the local install that * `claude migrate-installer` produces, and the two npm global layouts. An * absent one costs a stat, and a present one turns "could not resolve the real * claude binary" into a session that simply starts. */ export declare function whereItIsUsuallyInstalled(platform: NodeJS.Platform): string[];