/** * ruRE Phase 1 — ASAR extraction with resource caps (ADR-0002). * * @electron/asar already guards path traversal internally * (lib/path-validation.ts's ensureWithin); this module adds the * decompression-bomb guard ADR-0002 requires, by reading the archive header * (no extraction) and summing declared sizes BEFORE calling extractAll. * * ruRE never writes into a path derived from archive entry names — the * destination is always a ruRE-owned scratch directory. */ export interface AsarExtractLimits { /** Maximum total declared uncompressed size, in bytes. */ maxTotalBytes: number; /** Maximum number of files. */ maxFileCount: number; } export declare const DEFAULT_ASAR_LIMITS: AsarExtractLimits; export interface AsarExtractResult { unpackedPath: string; fileCount: number; totalBytes: number; truncated: boolean; reason?: string; } /** * Extracts an .asar archive to a fresh ruRE-owned scratch directory, after * verifying the archive's declared size/file-count against `limits`. Never * extracts (even partially) when the pre-check fails — `truncated: true` * with no files written, not a partial extraction passed off as complete. */ export declare function extractAsarWithCaps(archivePath: string, limits?: AsarExtractLimits): Promise; //# sourceMappingURL=extract-asar.d.ts.map