export interface PtyExitEvent {
    exitCode: number;
    signal?: number;
}
export interface SpawnPtySessionRequest {
    binary: string;
    args?: string[] | string;
    cwd: string;
    env?: Record<string, string | undefined>;
    cols: number;
    rows: number;
    onData?: (chunk: Buffer) => void;
    onExit?: (event: PtyExitEvent) => void;
}
export declare class PtySession {
    private readonly onDataCallback?;
    private readonly onExitCallback?;
    private readonly ptyProcess;
    private readonly outputHistory;
    private historyBytes;
    private interrupted;
    private exited;
    private constructor();
    static spawn({ binary, args, cwd, env, cols, rows, onData, onExit }: SpawnPtySessionRequest): PtySession;
    get pid(): number;
    getOutputHistory(): readonly Buffer[];
    write(data: string | Buffer): void;
    resize(cols: number, rows: number, pixelWidth?: number, pixelHeight?: number): void;
    pause(): void;
    resume(): void;
    stop(options?: {
        interrupted?: boolean;
    }): void;
    wasInterrupted(): boolean;
}
//# sourceMappingURL=pty-session.d.ts.map