export declare function parseKeyValueLines(input: string, separator?: string): Record; export interface ParsedLscpu { architecture: string; modelName: string; vendorId: string; cpuMHz: number; cpus: number; coresPerSocket: number; sockets: number; flags: string; } export declare function parseLscpu(input: string): ParsedLscpu; export interface ParsedDfRow { filesystem: string; sizeKb: number; usedKb: number; availableKb: number; mount: string; } export declare function parseDf(input: string): ParsedDfRow[]; export interface ParsedPsRow { pid: number; cpu: number; mem: number; command: string; } export declare function parsePsList(input: string): ParsedPsRow[]; export declare function parseNetstatConnections(input: string): number; export declare function parseDockerPs(input: string): number; export interface ParsedDiskutilRow { identifier: string; type: string; name: string; size: string; } /** * Parse `diskutil list` output (macOS). * * Each disk has a header (`/dev/disk0 (internal, physical):`) followed by * a column-aligned table: * * #: TYPE NAME SIZE IDENTIFIER * 0: GUID_partition_scheme *500.3 GB disk0 * 1: EFI EFI 314.6 MB disk0s1 * * We return a flat list of partition rows across all disks, skipping * headers and "Physical Store" lines (which describe APFS containers). */ export declare function parseDiskutilList(input: string): ParsedDiskutilRow[]; export interface ParsedDfRowDarwin { filesystem: string; totalKb: number; usedKb: number; availableKb: number; capacity: number; mount: string; } /** * Parse `df -kP` output. macOS / BSD have 1024-byte blocks (kB) when -k * is set; -P forces a single-line POSIX format that is robust to long * filesystem names. * * Filesystem 1024-blocks Used Available Capacity Mounted on * /dev/disk3s1s1 482797652 12163828 38615968 24% / */ export declare function parseDfDarwin(input: string): ParsedDfRowDarwin[]; export interface ParsedIfconfigDarwin { iface: string; flags: string[]; mtu: number; mac?: string; ip4?: string; ip4Netmask?: string; ip4Broadcast?: string; ip6?: string[]; status?: 'active' | 'inactive' | 'unknown'; } /** * Parse a single-interface `ifconfig ` output (macOS / BSD format). * * Header line shape: * en0: flags=8863 mtu 1500 * * Followed by tab-indented lines: * ether aa:bb:cc:dd:ee:ff * inet 192.168.1.10 netmask 0xffffff00 broadcast 192.168.1.255 * inet6 fe80::1%en0 prefixlen 64 ... * status: active */ export declare function parseIfconfigDarwin(input: string): ParsedIfconfigDarwin | null; export interface ParsedRouteDarwin { destination: string; gateway: string; iface: string; flags?: string[]; } /** * Parse `route -n get default` output (macOS). * * Format is a label/value table: * destination: default * gateway: 192.168.1.1 * interface: en0 * flags: */ export declare function parseRouteDarwin(input: string): ParsedRouteDarwin | null; /** * Count routing-table rows in `netstat -rn` output. (Distinct from * parseNetstatConnections which counts established TCP/UDP sockets.) */ export declare function parseNetstatRoutes(input: string): number; export interface ParsedHardwarePort { hardwarePort: string; device: string; ethernetAddress: string; } /** * Parse `networksetup -listallhardwareports` output (macOS). * * Sequence of stanzas separated by blank lines: * * Hardware Port: Wi-Fi * Device: en0 * Ethernet Address: 02:00:00:00:00:04 */ export declare function parseNetworksetupHardwarePorts(input: string): ParsedHardwarePort[]; export interface ParsedAirportNetwork { ssid: string | null; associated: boolean; } /** * Parse `networksetup -getairportnetwork ` output (macOS). * * Two shapes: * "Current Wi-Fi Network: " * "You are not associated with an AirPort network." */ export declare function parseNetworksetupAirportNetwork(input: string): ParsedAirportNetwork; export interface ParsedAirportPower { iface: string; on: boolean; } /** * Parse `networksetup -getairportpower ` output (macOS). * * "Wi-Fi Power (en0): On" * "Wi-Fi Power (en0): Off" */ export declare function parseNetworksetupAirportPower(input: string): ParsedAirportPower | null; export interface ParsedPsAxoRow { pid: number; user: string; cpu: number; mem: number; command: string; } /** * Parse `ps -axo pid,user,pcpu,pmem,command -c` output (macOS). * * PID USER %CPU %MEM COMMAND * 1 root 1.1 0.2 launchd * * Differs from parsePsList (which expects 4 columns); this one accepts * the additional USER column emitted by `-axo`. */ export declare function parsePsAxoDarwin(input: string): ParsedPsAxoRow[]; export interface ParsedSystemProfilerSPDisplays { chipsetModel?: string; type?: string; bus?: string; vendor?: string; cores?: number; metalSupport?: string; displays: Array<{ name: string; resolution?: string; main?: boolean; online?: boolean; connectionType?: string; }>; } /** * Parse `system_profiler SPDisplaysDataType` output (macOS). * * The format is a hierarchical key:value tree with 2-space indentation. * For our purposes we extract the first GPU's metadata and a list of * attached displays (each as a sub-stanza two indents deep under * "Displays:"). */ export declare function parseSystemProfilerSPDisplays(input: string): ParsedSystemProfilerSPDisplays; export interface ParsedSystemProfilerSPMemory { total?: string; type?: string; manufacturer?: string; } /** * Parse `system_profiler SPMemoryDataType` output (macOS). * * Memory: * * Memory: 8 GB * Type: LPDDR5 * Manufacturer: Hynix * * On Apple Silicon the memory is on-package and reports as a single * stanza; on Intel Macs the layout includes per-DIMM slots which we * intentionally don't enumerate here (memLayout in the domain module * already does that path). */ export declare function parseSystemProfilerSPMemory(input: string): ParsedSystemProfilerSPMemory; //# sourceMappingURL=parsers.d.ts.map