import type { IPty, IPtyForkOptions } from "node-pty"; /** Terminal operations plus an awaited disposal of its Windows process owner. */ export interface OwnedPty extends Pick { readonly dispose: () => Promise; } export type OwnerRequest = { readonly type: "start"; readonly command: string; readonly arguments: string[]; readonly options: IPtyForkOptions; } | { readonly type: "write"; readonly data: string; }; export type OwnerResponse = { readonly type: "ready"; readonly pid: number; } | { readonly type: "data"; readonly data: string; } | { readonly type: "exit"; readonly exitCode: number; readonly signal?: number; } | { readonly type: "error"; readonly message: string; }; /** Keep Windows constructor failures and PTY workers out of the caller's event loop. */ export declare function spawnOwnedPty(command: string, arguments_: string[], options: IPtyForkOptions, timeoutMs: number): Promise;