import { AgentLocationTelemetry, AgentLocationStatus } from '../services/location';
export interface SystemMetrics {
    cpu: {
        load: number;
        user: number;
        system: number;
        idle: number;
        cores: number[];
        speed: number;
        temperature?: number;
    };
    memory: {
        total: number;
        used: number;
        free: number;
        percent: number;
        swapTotal: number;
        swapUsed: number;
        swapPercent: number;
    };
    disk: DiskInfo[];
    network: NetworkInfo[];
    networkInterfaces?: NetworkInfo[];
    routes?: NetworkRouteInfo[];
    tunnels?: TunnelTelemetry;
    gpu?: GpuInfo[];
    battery?: BatteryInfo;
    hardware?: HardwareProfile;
    location?: AgentLocationTelemetry;
    locationStatus?: AgentLocationStatus;
    publicIp?: string;
    publicIpObservedAt?: string;
    publicIpSource?: string;
    publicIpLocation?: {
        city?: string | null;
        region?: string | null;
        country?: string | null;
        latitude?: number | null;
        longitude?: number | null;
    } | null;
    uptime: number;
    loadAvg: number[];
    packageManagers?: PackageManagerInfo[];
}
export interface PackageManagerInfo {
    name: string;
    available: boolean;
    version?: string;
    path?: string;
}
export interface DiskInfo {
    fs: string;
    type: string;
    size: number;
    used: number;
    available: number;
    percent: number;
    mount: string;
}
export interface NetworkInfo {
    interface: string;
    name?: string;
    rxBytes: number;
    txBytes: number;
    rxSec: number;
    txSec: number;
    rxPerSec?: number;
    txPerSec?: number;
    speed: number;
    operstate: string;
    type: 'ethernet' | 'wifi' | 'vpn' | 'loopback' | 'other';
    vpnType?: 'wireguard' | 'openvpn' | 'ipsec' | 'other';
    ip4?: string;
    ip6?: string;
    mac?: string;
    gateway?: string;
    dnsServers?: string[];
    mtu?: number;
    isInternal?: boolean;
    description?: string;
    vendor?: string;
    model?: string;
    driver?: string;
    isVirtual?: boolean;
}
export type TunnelKind = 'tls' | 'dtls' | 'ipsec' | 'gre' | 'wireguard' | 'openvpn' | 'other';
export interface TunnelDetection {
    kind: TunnelKind;
    source: 'interface' | 'connection' | 'process';
    confidence: 'high' | 'medium' | 'low';
    interface?: string;
    process?: string;
    protocol?: string;
    localAddress?: string;
    peerAddress?: string;
    peerPort?: number;
    provider?: string;
    note?: string;
}
export interface TunnelSummary {
    tls: number;
    dtls: number;
    ipsec: number;
    gre: number;
    wireguard: number;
    openvpn: number;
    other: number;
    total: number;
}
export interface TunnelTelemetry {
    generatedAt: string;
    sampleWindowSeconds: number;
    providers: string[];
    summary: TunnelSummary;
    detections: TunnelDetection[];
}
export interface NetworkRouteInfo {
    destination: string;
    gateway: string;
    interface: string;
    metric?: number;
    family: 'ipv4' | 'ipv6';
    isDefault?: boolean;
}
export interface GpuInfo {
    model: string;
    vendor: string;
    vram: number;
    temperature?: number;
    utilizationGpu?: number;
    utilizationMemory?: number;
}
export interface BatteryInfo {
    hasBattery: boolean;
    isCharging: boolean;
    percent: number;
    timeRemaining: number;
}
export interface HardwareMemoryModule {
    bank: string;
    sizeBytes: number;
    speedMHz: number;
    formFactor: string;
    type: string;
    manufacturer: string;
    partNumber: string;
    serialNumber: string;
}
export interface HardwareProfile {
    system: {
        manufacturer: string;
        model: string;
        version: string;
        serial: string;
        sku: string;
        uuid: string;
        virtual: boolean;
    };
    cpu: {
        manufacturer: string;
        brand: string;
        socket: string;
        socketCount: number;
        physicalCores: number;
        logicalCores: number;
        speedGHz: number;
        maxSpeedGHz: number;
    };
    memory: {
        totalBytes: number;
        moduleCount: number;
        populatedModules: number;
        sodimmCount: number;
        speedMHz: number;
        maxSpeedMHz: number;
        modules: HardwareMemoryModule[];
    };
    baseboard: {
        manufacturer: string;
        model: string;
        version: string;
        serial: string;
    };
    bios: {
        vendor: string;
        version: string;
        releaseDate: string;
    };
}
export interface WifiInfo {
    ssid: string;
    bssid: string;
    rssi: number;
    signal_quality: number;
    channel: number;
    frequency: number;
    link_speed_mbps: number;
    tx_rate_mbps: number;
    rx_rate_mbps: number;
    noise: number;
    security: string;
    interface_name: string;
    ip_address: string;
    gateway: string;
    dns_servers: string[];
    connection_type: string;
    phy_link_speed_mbps: number;
    errors: number;
}
export declare class SystemCollector {
    private collecting;
    private lastTunnelTelemetry;
    private lastTunnelTelemetryAt;
    private hardwareProfileCache;
    private hardwareProfileFetchedAt;
    private readonly hardwareProfileTtlMs;
    private readonly locationCollector;
    collect(): Promise<SystemMetrics>;
    private collectHardwareProfile;
    collectQuick(): Promise<Partial<SystemMetrics>>;
    collectWifi(): Promise<WifiInfo | null>;
    collectIPAddresses(): Promise<{
        primary: string;
        all: string[];
    }>;
    collectPhysicalNetwork(): Promise<{
        type: string;
        speed: number;
        interface_name: string;
        ip: string;
    } | null>;
    private createEmptyTunnelSummary;
    private resolveTunnelProvider;
    private classifyInterfaceTunnelKind;
    private classifyProcessTunnelKind;
    private summarizeTunnelKind;
    private collectTunnelTelemetry;
    private buildInterfaceRoutes;
    private networkFromIPv4;
    private detectPackageManagers;
}
//# sourceMappingURL=system.d.ts.map