import { z } from "zod";
import { TerminalStateSchema } from "./messages.js";
export declare const TerminalStreamResizeSchema: z.ZodObject<{
    rows: z.ZodNumber;
    cols: z.ZodNumber;
}, "strict", z.ZodTypeAny, {
    rows: number;
    cols: number;
}, {
    rows: number;
    cols: number;
}>;
export declare const TerminalStreamOpcode: {
    readonly Output: 1;
    readonly Input: 2;
    readonly Resize: 3;
    readonly Snapshot: 4;
};
export type TerminalStreamOpcode = (typeof TerminalStreamOpcode)[keyof typeof TerminalStreamOpcode];
export type TerminalStreamFrame = {
    opcode: TerminalStreamOpcode;
    slot: number;
    payload: Uint8Array;
};
export declare function asUint8Array(data: unknown): Uint8Array | null;
export declare function encodeTerminalStreamFrame(input: {
    opcode: TerminalStreamOpcode;
    slot: number;
    payload?: Uint8Array | ArrayBuffer | string;
}): Uint8Array;
export declare function decodeTerminalStreamFrame(bytes: Uint8Array): TerminalStreamFrame | null;
export declare function encodeTerminalSnapshotPayload(state: z.infer<typeof TerminalStateSchema>): Uint8Array;
export declare function decodeTerminalSnapshotPayload(bytes: Uint8Array): z.infer<typeof TerminalStateSchema> | null;
export declare function encodeTerminalResizePayload(input: z.infer<typeof TerminalStreamResizeSchema>): Uint8Array;
export declare function decodeTerminalResizePayload(bytes: Uint8Array): z.infer<typeof TerminalStreamResizeSchema> | null;
//# sourceMappingURL=terminal-stream-protocol.d.ts.map