/** * Platform compatibility layer. * * Detects the runtime platform and provides cross-platform utilities * for timestamps, checksums, temp files, and tool detection. * * @task T4454 * @epic T4454 */ /** Detected platform. */ export type Platform = 'linux' | 'macos' | 'windows' | 'unknown'; /** Detect the current platform. */ export declare function detectPlatform(): Platform; /** Cached platform value. */ export declare const PLATFORM: Platform; /** Check if a command exists on PATH. */ export declare function commandExists(command: string): boolean; /** Require a tool to be available, returning an error message if missing. */ export declare function requireTool(tool: string, installHint?: string): { available: boolean; error?: string; }; /** Check all required tools. */ export declare function checkRequiredTools(tools: Array<{ name: string; installHint?: string; }>): { allAvailable: boolean; missing: string[]; }; /** Get ISO 8601 UTC timestamp. */ export declare function getIsoTimestamp(): string; /** Convert ISO timestamp to epoch seconds. */ export declare function isoToEpoch(isoTimestamp: string): number; /** Get ISO date for N days ago. */ export declare function dateDaysAgo(days: number): string; /** Get file size in bytes. */ export declare function getFileSize(filePath: string): number; /** Get file modification time as ISO string. */ export declare function getFileMtime(filePath: string): string | null; /** Generate N random hex characters. */ export declare function generateRandomHex(bytes?: number): string; /** Compute SHA-256 checksum of a string. */ export declare function sha256(data: string): string; /** Create a temporary file path. */ export declare function createTempFilePath(prefix?: string, suffix?: string): string; /** Minimum required Node.js major version. */ export declare const MINIMUM_NODE_MAJOR = 24; /** Get Node.js version info. */ export declare function getNodeVersionInfo(): { version: string; major: number; minor: number; patch: number; meetsMinimum: boolean; }; /** * Get platform-specific Node.js upgrade instructions. * Returns actionable install/upgrade guidance based on OS and available tools. */ export declare function getNodeUpgradeInstructions(): { platform: Platform; arch: string; instructions: string[]; recommended: string; }; /** Structured snapshot of the host system for diagnostics, error reports, and logging. */ export interface SystemInfo { /** OS platform (linux, darwin, win32, etc.) */ platform: string; /** CPU architecture (x64, arm64, etc.) */ arch: string; /** OS type (Linux, Darwin, Windows_NT, etc.) */ osType: string; /** OS kernel release version */ osRelease: string; /** Node.js version (without 'v' prefix) */ nodeVersion: string; /** Total system memory in bytes */ totalMemory: number; /** Free system memory in bytes */ freeMemory: number; /** Machine hostname (useful for multi-machine correlation) */ hostname: string; /** User home directory path */ homeDir: string; } /** * Gather a snapshot of the host system. * * This is the SSoT for system information. Use this instead of * scattering `process.platform` / `os.type()` calls throughout * the codebase. * * Use cases: * - Logger base context (every log entry carries platform info) * - Error reports and issue submission * - Doctor diagnostics * - Startup health check results */ export declare function getSystemInfo(): SystemInfo; export { getDataPath, readJsonFile, resolveProjectRoot, writeJsonFileAtomic, } from './store/file-utils.js'; //# sourceMappingURL=platform.d.ts.map