/**
 * @license
 * Copyright 2025 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { DetectedIde } from '../ide/detect-ide.js';
import { DiffUpdateResult } from '../ide/ideContext.js';
export type IDEConnectionState = {
    status: IDEConnectionStatus;
    details?: string;
};
export declare enum IDEConnectionStatus {
    Connected = "connected",
    Disconnected = "disconnected",
    Connecting = "connecting"
}
/**
 * Manages the connection to and interaction with the IDE server.
 */
export declare class IdeClient {
    private static instance;
    private client;
    private state;
    private readonly currentIde;
    private readonly currentIdeDisplayName;
    private diffResponses;
    private constructor();
    static getInstance(): IdeClient;
    connect(): Promise<void>;
    /**
     * A diff is accepted with any modifications if the user performs one of the
     * following actions:
     * - Clicks the checkbox icon in the IDE to accept
     * - Runs `command+shift+p` > "Gemini CLI: Accept Diff in IDE" to accept
     * - Selects "accept" in the CLI UI
     * - Saves the file via `ctrl/command+s`
     *
     * A diff is rejected if the user performs one of the following actions:
     * - Clicks the "x" icon in the IDE
     * - Runs "Gemini CLI: Close Diff in IDE"
     * - Selects "no" in the CLI UI
     * - Closes the file
     */
    openDiff(filePath: string, newContent?: string): Promise<DiffUpdateResult>;
    closeDiff(filePath: string): Promise<string | undefined>;
    resolveDiffFromCli(filePath: string, outcome: 'accepted' | 'rejected'): Promise<void>;
    disconnect(): Promise<void>;
    getCurrentIde(): DetectedIde | undefined;
    getConnectionStatus(): IDEConnectionState;
    getDetectedIdeDisplayName(): string | undefined;
    private setState;
    private validateWorkspacePath;
    private getPortFromEnv;
    private registerClientHandlers;
    private establishConnection;
    init(): Promise<void>;
    dispose(): void;
    setDisconnected(): void;
}
