/**
 * OpenAI Codex SDK Adapter
 *
 * 通过 @openai/codex-sdk 的 Thread/runStreamed() API
 * 将 Codex 事件流映射到 runtime-bridge 统一 ProviderEvent。
 */
import { EventEmitter } from 'node:events';
import type { AdapterSessionConfig, BaseProviderAdapter, ConversationMessage, SessionStatus } from './types.js';
export declare class CodexSdkAdapter extends EventEmitter implements BaseProviderAdapter {
    readonly providerId = "codex";
    readonly displayName = "Codex";
    private sessions;
    private sdkModule?;
    startSession(sessionId: string, config: AdapterSessionConfig): Promise<void>;
    sendMessage(sessionId: string, message: string): Promise<void>;
    sendConfirmation(_sessionId: string, _accept: boolean): Promise<void>;
    sendQuestionAnswer(_sessionId: string, _answers: Record<string, string>): Promise<void>;
    setIdleCommands(sessionId: string, commands: {
        idleInputCommand: string;
        nonInputCommand: string;
    }): void;
    abortCurrentTurn(sessionId: string): Promise<void>;
    terminateSession(sessionId: string): Promise<void>;
    resumeSession(sessionId: string, providerSessionId: string, config: AdapterSessionConfig): Promise<void>;
    getConversation(sessionId: string): ConversationMessage[];
    hasSession(sessionId: string): boolean;
    getProviderSessionId(sessionId: string): string | undefined;
    getSessionStatus(sessionId: string): SessionStatus | undefined;
    getSessionPid(_sessionId: string): number | undefined;
    cleanup(): void;
    /**
     * 按需加载 Codex SDK：只有启动 Codex provider 时才解析重依赖，
     * 避免 bridge 基础安装默认拉取 @openai/codex 的多平台二进制包。
     */
    private loadSdk;
    private buildCodexOptions;
    private warnUnsupportedMcpConfig;
    private buildThreadOptions;
    private runTurn;
    private handleThreadEvent;
    private handleThreadItem;
    private emitTextDelta;
    private emitReasoningDelta;
    private handleToolLikeItem;
    private completeTurn;
    private emitEvent;
    private startIdleDetection;
    private stopIdleDetection;
    private checkIdleState;
    private sendIdlePrompt;
    private toIdlePrompt;
    private isMessagePollingIdleCommand;
}
//# sourceMappingURL=CodexSdkAdapter.d.ts.map