import type { ChildProcessWithoutNullStreams } from "node:child_process";
import type { Logger } from "pino";
type RequestHandler = (params: unknown) => unknown;
type NotificationHandler = (method: string, params: unknown) => void;
export interface CodexAppServerTraceContext {
    agentId?: string;
    sessionId?: string;
    turnId?: string;
}
export declare class CodexAppServerClient {
    private readonly child;
    private readonly logger;
    private readonly getTraceContext;
    private readonly rl;
    private readonly pending;
    private readonly requestHandlers;
    private notificationHandler;
    private nextId;
    private disposed;
    private stderrBuffer;
    constructor(child: ChildProcessWithoutNullStreams, logger: Logger, getTraceContext?: () => CodexAppServerTraceContext);
    setNotificationHandler(handler: NotificationHandler): void;
    setRequestHandler(method: string, handler: RequestHandler): void;
    request(method: string, params?: unknown, timeoutMs?: number): Promise<unknown>;
    notify(method: string, params?: unknown): void;
    dispose(): Promise<void>;
    private writeJsonRpcResponse;
    private handleLine;
    private traceRawEvent;
}
export {};
//# sourceMappingURL=app-server-transport.d.ts.map