import type { WsControlPlane } from "../ws.js";
import type { Surface, SurfaceSnapshot, SurfaceStartInput, SurfaceState, SurfaceStopInput } from "./contracts.js";
export interface RemoteTerminalSurfaceOptions {
    shell?: string;
    cols?: number;
    rows?: number;
}
export declare class RemoteTerminalSurface implements Surface {
    readonly id: string;
    private readonly ws;
    private readonly nodeId;
    readonly type: "terminal";
    private _state;
    private _sessionId;
    private _startedAt;
    private _cwd;
    private _pid;
    private _outputBuffer;
    private _outputListeners;
    private _cols;
    private _rows;
    private _shell;
    private _lastActivityAt;
    onOutput?: (data: string) => void;
    onStateChange?: (state: SurfaceState) => void;
    constructor(id: string, ws: WsControlPlane, nodeId: string, opts?: RemoteTerminalSurfaceOptions);
    get state(): SurfaceState;
    get sessionId(): string | null;
    start(input: SurfaceStartInput): Promise<void>;
    stop(_input?: SurfaceStopInput): Promise<void>;
    write(data: string): void;
    resize(cols: number, rows: number): void;
    waitForPrompt(timeoutMs?: number): Promise<void>;
    addOutputListener(listener: (data: string) => void): void;
    removeOutputListener(listener: (data: string) => void): void;
    ingestOutput(data: string): void;
    ingestExit(exitCode?: number | null, signal?: number | string | null): void;
    snapshot(): SurfaceSnapshot;
    getRecentOutput(lines?: number): string;
    touch(): void;
    get idleMs(): number;
    private _setState;
}
//# sourceMappingURL=remote-terminal.d.ts.map