/** * Detect the current IDE from environment variables. * Returns the IDE key (e.g., "vscode", "cursor") or null if unknown. * * Detection strategy (in priority order): * 1. Explicit env vars set only by a specific IDE (most reliable) * 2. process.execPath / argv[0] inspection for VS Code forks * 3. PATH / VSCODE_CWD string matching (fallback, fragile) * * TASK #110 (item 6): CLAUDE_CODE, CLAUDE_CLI, CURSOR_TRACE_ID, WINDSURF_PROFILE * and JETBRAINS_IDE appear in no vendor documentation found by a 2026-08-11 * audit — same status as ANTIGRAVITY_EDITOR_APP_ROOT below, which already * carried this caveat. They may be real and empirically observed; nothing on * record says which, or by whom. REPORTED, not VERIFIED. An unverifiable * signal is not the same defect as a wrong one, and the mitigation for both is * the same: the install plan (decision #44, and confirmGlobalWrite in * index.ts for the global case) prints the exact path before writing, so a * misdetection is something the user catches rather than something that lands * silently. */ export declare function detectCurrentIde(): string | null; /** * Forks that PATH suggests might be the real caller, when nothing authoritative * said so. Returns IDE_CONFIGS keys, or [] when there is nothing to ask about. * * Only meaningful when detectCurrentIde() returned "vscode". If VSCODE_CWD was * set it already answered the question and this returns [] — PATH must never * get a second vote against a signal that is actually about this process. * * See detectCurrentIde() for the PROVEN false positive that demoted PATH from * an assertion to a question. */ export declare function detectVscodeForkAmbiguity(): string[]; /** * TASK #108. Cline and Roo Code are VS Code extensions, not separate * processes — a terminal opened in either extension's panel sets exactly the * same TERM_PROGRAM/VSCODE_IPC_HOOK/VSCODE_CWD signals as the host VS Code * terminal, so detectCurrentIde() falls through every fork check and returns * "vscode". Installing there writes the entry into VS Code's own mcp.json * instead of the extension's private settings file — silent and inert, * exactly the shape the Antigravity path bug had (fixed in c2712fc). * * No environment variable distinguishes an extension's integrated terminal * from the host's, and inventing one to assert an unverified signal is how * this file got four env vars no vendor doc confirms (task #110) — so this * does not guess. When detectCurrentIde() lands on "vscode", call this to * find out whether Cline and/or Roo Code are even installed on the machine * (their extension's globalStorage directory exists, independent of whether * an MCP settings file has ever been written inside it). If either is, * the caller has a real ambiguity to resolve — by asking, not assuming. * * Returns IDE_CONFIGS keys, in priority order, or [] when there is nothing * to disambiguate and "vscode" can be trusted as-is. */ export declare function detectVscodeExtensionAmbiguity(): string[]; /** * Resolve the effective list of global config file paths for an IDE. * For most IDEs this is just `ide.scopes.global`. * For IDEs with `resolveGlobalPaths` (e.g. Android Studio with versioned dirs) * that function is called instead, returning all discovered install paths. */ export declare function resolveIdeGlobalPaths(ide: import("./ide-configs.js").IdeDefinition): string[]; /** * EVERY project-local config path this IDE could be installed at, relative to * `rootDir`. Use this when SEARCHING — status, listing, removal. * * Returns paths whether or not they exist; the caller decides what absence * means. An empty array means the IDE has no local scope at all, which is a * different fact from "nothing was found there". */ export declare function resolveIdeLocalPaths(ide: import("./ide-configs.js").IdeDefinition, rootDir: string): string[]; /** * The single path a local install WRITES to — the first declared localDir. * Null when the IDE has no local scope. Searching uses resolveIdeLocalPaths; * these are deliberately separate because writing to every candidate would * install an IDE several times over. */ export declare function resolveIdeLocalInstallPath(ide: import("./ide-configs.js").IdeDefinition, rootDir: string): string | null; /** * Scan all IDE_CONFIGS to find which IDEs appear to be installed on this machine. * * FLAW-9 FIX: The old code treated "parent dir exists" as a detection signal, * causing false positives for: * - Visual Studio: ~/.mcp.json parent is HOME — always exists * - Cline: parent is %APPDATA%\Code\... which exists when VS Code is installed * * New rule: an IDE is detected only when: * (a) Its config file itself exists (previously configured), OR * (b) Its parent dir is at least 2 path segments deeper than a known root * (HOME or APPDATA) AND exists — this filters out shallow paths like * ~/.mcp.json whose parent is just the home directory. * * An IDE is considered present if any of its global paths passes these checks. */ export declare function detectInstalledIdes(): string[]; //# sourceMappingURL=ide-detector.d.ts.map