import { Buffer } from "node:buffer"; export declare const detachPrefixByte = 2; export declare const detachKeyByte = 100; export type DetachFilter = { feed: (chunk: Buffer | string) => void; }; export declare function createDetachFilter(opts: { key?: number; onDetach: () => void; onInput: (data: string) => void; prefix?: number; }): DetachFilter; export type AttachResult = { exitCode?: number; reason: "detached" | "exited"; }; export type AttachStreams = { stdin?: NodeJS.ReadStream; stdout?: NodeJS.WritableStream & { columns?: number; rows?: number; }; }; export declare function attachTerminal(opts: { authToken?: () => string | undefined; baseUrl: string; streams?: AttachStreams; terminalId: string; }): Promise;