export declare class MetalEgressObservationError extends Error { } /** Incremental bounded multipart decoder, independently testable without a socket or privileges. */ export declare class MetalEgressDump { private readonly sequence; private readonly portId; private readonly ifIndex; private bytes; private datagrams; private messages; private done; private policies; constructor(sequence: number, portId: number, ifIndex: number); get complete(): boolean; accept(bytes: Uint8Array, senderPid: number): void; result(): { burstMbps: number; digest: string; }; } /** The only message this module can send is a fixed RTM_GETTFILTER dump for one interface. */ export declare function metalEgressDumpRequest(ifIndex: number, sequence: number): Uint8Array; /** Local socket seam for fault testing, never exposed through the helper request. * The send operation always receives the fixed read-only GET request above. */ export interface MetalEgressKernelSocket { portId: number; send(request: Uint8Array): void; receive(): { bytes: Uint8Array; senderPid: number; }; close(): void; } export declare function readMetalEgressSocket(ifIndex: number, sequence: number, socket: MetalEgressKernelSocket, now?: () => number): { burstMbps: number; digest: string; }; /** Linux/x64 only, fixed trusted libc path, bounded kernel replies, all handles closed on every outcome. */ export declare function observeMetalEgress(ifIndex: number): Promise<{ burstMbps: number; digest: string; }>;