import type { TerminalTranscriptProvider } from '../../shared/protocol.js';
export interface PtyExit {
    exitCode: number | null;
}
export interface PtyProcess {
    pid: number;
    write(data: string): void;
    resize(cols: number, rows: number): void;
    pause(): void;
    resume(): void;
    kill(): void;
    onData(listener: (data: string) => void): Disposable;
    onExit(listener: (event: PtyExit) => void): Disposable;
}
export interface Disposable {
    dispose(): void;
}
export interface PtySpawnOptions {
    sessionId: string;
    shell: string;
    cwd: string;
    cols: number;
    rows: number;
    env: NodeJS.ProcessEnv;
}
export interface PersistedSession {
    sessionId: string;
    title?: string;
}
export interface PtyHistoryCapture {
    startLine: number;
    endLine: number;
    hasMore: boolean;
    output: string[];
}
export interface PtyHistoryCaptureOptions {
    beforeLine?: number;
    limit: number;
}
export interface PtyTranscriptSource {
    provider: TerminalTranscriptProvider;
    sessionId: string;
    filePath: string;
}
export interface PtyAdapter {
    spawn(options: PtySpawnOptions & {
        title?: string;
    }): PtyProcess;
    listExisting?(): PersistedSession[];
    destroySession?(sessionId: string): boolean;
    setSessionTitle?(sessionId: string, title: string): void;
    pollSessions?(): Promise<Map<string, {
        currentCommand: string;
        busy: boolean;
    }>>;
    captureHistory?(sessionId: string, options: PtyHistoryCaptureOptions): PtyHistoryCapture | null;
    resolveTranscriptSource?(sessionId: string): PtyTranscriptSource | null;
}
