import { type SessionNotification } from "@agentclientprotocol/sdk";
import type { CliProviderAdapter, ProviderEvent, ProviderAuthStatus, ProviderLoginResult, ProviderLogoutResult, ProviderId, ProviderInfo, ProviderModelInfo, ProviderSession, RuntimeMode, StartSessionOptions } from "./contracts.js";
type AcpProviderAuthKind = "acp";
export interface AcpProviderConfig {
    id: ProviderId;
    name: string;
    description: string;
    command: string;
    args?: string[];
    env?: Record<string, string>;
    modes?: RuntimeMode[];
    auth?: AcpProviderAuthKind | false;
}
export declare class AcpProvider implements CliProviderAdapter {
    readonly id: ProviderId;
    readonly info: ProviderInfo;
    private readonly config;
    private readonly authKind;
    private readonly sessions;
    private readonly emitter;
    private replayableEvents;
    private authLoginProcess;
    private cachedModels;
    private cachedAuthStatus;
    private authProbeInFlight;
    constructor(config: AcpProviderConfig);
    checkAvailability(): Promise<boolean>;
    listModels(): Promise<ProviderModelInfo[]>;
    getAuthStatus(): Promise<ProviderAuthStatus>;
    private _computeAuthStatus;
    startLogin(): Promise<ProviderLoginResult>;
    private startCodexDeviceLogin;
    private checkProviderAuthenticated;
    private getProviderCliAuthenticated;
    private hasProviderCliLogout;
    /**
     * Returns true when Codex has local auth.json credentials that can be cleared
     * from the UI.
     */
    private hasCodexAuthFile;
    private hasLocalProviderCredential;
    sendLoginInput(input: string): void;
    logout(): Promise<ProviderLogoutResult>;
    startSession(options: StartSessionOptions): Promise<ProviderSession>;
    sendTurn(sessionId: string, message: string, attachments?: string[]): Promise<void>;
    interruptTurn(sessionId: string): Promise<void>;
    respondToApproval(sessionId: string, requestId: string, approved: boolean): Promise<void>;
    stopSession(sessionId: string): Promise<void>;
    onEvent(handler: (event: ProviderEvent) => void): () => void;
    emitEvent(event: ProviderEvent): void;
    private pruneReplayableEvents;
    handleSessionUpdate(sessionId: string, params: SessionNotification): void;
    private getSession;
    private probeAcpAuth;
}
export declare function loadAcpProviderConfigs(): AcpProviderConfig[];
export {};
//# sourceMappingURL=acp-provider.d.ts.map