import type { AdapterHealth, CancelResult, CapabilityReport, CliAdapter, LaunchProfile, McpBindingLaunchSpec, NativeEvent, NativeSession, PromptInput } from "../types.js"; export interface CodexAdapterTimeouts { handshakeMs: number; requestMs: number; firstEventMs: number; idleMs: number; cancelMs: number; closeMs: number; } export interface CodexAppServerAdapterOptions { timeouts?: Partial; clientVersion?: string; targetCliVersion?: string; now?: () => Date; createInstanceId?: () => string; createBindingId?: () => string; /** Room-local agent key; defaults to the builtin `codex`. */ agentId?: string; } export interface CodexMcpServerConfig { command?: string; args?: string[]; url?: string; http_headers?: Record; } export interface CodexThreadConfigOverride { "mcp_servers.groupx": CodexMcpServerConfig; } /** * Stable process argv for Codex 0.147 App Server. The configured cwd belongs to * the OS child process and is deliberately not repeated as a thread override. */ export declare function buildCodexLaunchArgv(command: string, prefixArgs?: readonly string[]): readonly [string, ...string[]]; /** * Build the one GroupX-owned Codex config fragment. A binding id is a source * correlation handle, not an authentication token or permission grant. */ export declare function buildCodexMcpOverride(mcp: McpBindingLaunchSpec | undefined, bindingId: string): CodexThreadConfigOverride | undefined; export declare function buildCodexThreadStartParams(profile: LaunchProfile, bindingId: string): Record; export declare function buildCodexThreadResumeParams(profile: LaunchProfile, bindingId: string, nativeSessionId: string): Record; export declare function buildCodexPromptText(input: Pick): string; export declare class CodexAppServerAdapter implements CliAdapter { #private; readonly adapterId: string; readonly actorId: string; constructor(options?: CodexAppServerAdapterOptions); probe(): Promise; start(input: LaunchProfile): Promise; resume(input: LaunchProfile & { nativeSessionId: string; }): Promise; prompt(session: NativeSession, input: PromptInput): AsyncIterable; cancel(session: NativeSession, nativeTurnId: string): Promise; close(session: NativeSession): Promise; health(): AdapterHealth; } //# sourceMappingURL=codex-app-server-adapter.d.ts.map