/** * @file Host power-source detection with bounded native and operating-system * probes. Missing or inconclusive evidence returns unknown. */ import type { PowerSnapshot, PowerState } from './util.js'; export declare const POWER_SUPPLY_DIRECTORY = "/sys/class/power_supply"; export declare const POWER_SUPPLY_LIMIT = 64; export declare const POWER_SNAPSHOT_OUTPUT_MAX_LENGTH: number; export declare function getLinuxPowerSnapshot(signal: AbortSignal): Promise; export declare function getLinuxPowerState(signal: AbortSignal): Promise; export declare function getMacPowerState(signal: AbortSignal): Promise; export declare function getNativePowerState(): Promise; /** * Raw charge is available only when a single host battery reports a valid * percentage. */ export declare function getPowerSnapshot(): Promise; /** * Returns the detected source; unknown does not imply AC or battery power. */ export declare function getPowerState(): Promise; export declare function getWindowsPowerState(signal: AbortSignal): Promise; export declare function parseLinuxPowerProperties(contents: string): Map; export declare function parseLinuxPowerState(contents: string): PowerState; export declare function parseMacPowerPercentage(output: string): number | undefined; export declare function parseMacPowerSnapshot(output: string): PowerSnapshot; export declare function parsePowerPercentage(value: unknown): number | undefined; export declare function parseWindowsPowerSnapshot(output: string): PowerSnapshot; export declare function readPowerStateCommand(command: string, args: readonly string[], signal: AbortSignal): Promise;