/** * The install doctor, exposed as a tool. * * Runs the enforcement path for real rather than inspecting configuration, so a * PASS means a refusal actually came back out of the hook binary -- not that the * files are where they should be. That distinction is not academic: this project * shipped a version where every configuration check would have passed and the * plugin saved nothing. * * The MCP server probe is skipped when running inside the server itself, because * spawning a second copy of the process that is answering the call is a way to * deadlock rather than a way to learn anything. */ /** * What the telemetry switches are actually doing, in the doctor's own words. * * REPORTED, NEVER SENT: the doctor is run by people checking whether we are * uploading anything, and a diagnostic that uploaded while answering that * question would be the exact thing they were checking for. It reads the local * log and the resolved endpoint and prints them. * * It also states whether a key was packed, because a policy of "local and * upload: both explicitly enabled" with no key is a build that will never send * a byte, and an operator who opted in deserves to be told that rather than * left to wonder. */ export declare function telemetrySection(env?: NodeJS.ProcessEnv): Promise; /** * WHETHER THIS COPY IS THE CURRENT ONE, and how to replace it if not. * * Asked here and nowhere else. The check is a GET to the registry npm already * installs from, but it still reveals that this machine is running this package, * so it happens only when a person has explicitly asked for a diagnosis -- never * on the server's boot path, where nobody asked and a slow registry would delay * every session. DO_NOT_TRACK and TOKEN_OPTIMIZER_UPDATE_CHECK=0 both suppress * it; see latestVersion, which refuses before opening a socket. * * A failed lookup is reported as a failed lookup. Reporting "current" because * the registry did not answer would be the one wrong answer, since it is the * answer that stops a user from upgrading out of a bug. */ export declare function versionSection(options?: { readonly env?: NodeJS.ProcessEnv; readonly fetcher?: typeof fetch; }): Promise; export declare function installDoctor(input: { uninstallPlan?: boolean; clientName?: string; /** * Diagnose this client instead of the one that opened the session. * * The handshake name is right for nearly every call, but it is not always * sent, and it is not always the install the user is asking about: a Codex * session debugging a Claude Code install had no way to say so, and a host * that sends no name at all falls back to the machine's registered plugin * -- which is how #408 read a Codex problem as a Claude version regression. */ client?: string; /** * Set by the server when its cache fell back to memory. Passed in rather than * detected here because it is a property of THIS process, not of the files on * disk -- a second CacheEngine built by the doctor might well open fine. */ cacheDegradedReason?: string | null; }): Promise<{ content: Array<{ type: string; text: string; }>; isError?: boolean; }>; export declare const DOCTOR_TOOL: { readonly name: "install_doctor"; readonly description: string; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly uninstallPlan: { readonly type: "boolean"; readonly description: "Show what uninstall would remove, changing nothing"; }; readonly client: { readonly type: "string"; readonly description: string; }; }; }; }; //# sourceMappingURL=doctor-tool.d.ts.map