export declare const MAX_TERMINFO_ENTRY = 32768; /** 8-bit RGB, each channel 0–255. */ export interface Rgb { r: number; g: number; b: number; } /** Static terminal capabilities, frozen at detection time. No WASM backing. */ export interface Capabilities { readonly colors: number; readonly trueColor: boolean; readonly bce: boolean; readonly autoMargin: boolean; readonly xenl: boolean; readonly altScreen: boolean; readonly styledUnderline: boolean; readonly syncOutput: boolean; readonly pointerShape: boolean; } /** Opaque type alias for the raw terminfo key-sequence bytes. */ export type KeyTable = Uint8Array; /** Result of detectTerminal(). */ export interface TerminalInfo { /** Static capabilities, frozen at detection time. */ readonly capabilities: Capabilities; /** * Write to stdout immediately after detection. Probe responses arrive * as CapabilityEvent values in input.scan(). */ readonly probe: Uint8Array; /** Raw terminfo key bytes. The input parser seeds its trie from this. */ readonly keys: KeyTable; } export interface DetectOptions { /** Terminal name to resolve. Defaults to env.TERM. */ term?: string; /** * Environment for TERM/TERMINFO/TERMINFO_DIRS/HOME/COLORTERM lookups. * Defaults to process.env. Injectable for testing. */ env?: Record; /** Raw compiled terminfo bytes; skips the filesystem lookup. */ entry?: Uint8Array; signal?: AbortSignal; } declare function rgbOf(packed: number): Rgb; /** * Detect the terminal's capabilities from the compiled terminfo entry and * process environment. Pure: performs no IO beyond reading the terminfo file. * Rejects only when `entry` exceeds MAX_TERMINFO_ENTRY (caller error); * environmental failures resolve to the baseline. See specs/terminfo-spec.md. */ export declare function detectTerminal(options?: DetectOptions): Promise; export { rgbOf };