/**
 * Resolve `$XDG_CACHE_HOME/gjsify/<kind>/<layoutVersion>` (falling back to
 * `~/.cache` when `XDG_CACHE_HOME` is unset/empty). `kind` is the cache area
 * (`tarballs`, `metadata`); `layoutVersion` lets one cache evolve its on-disk
 * shape without invalidating its siblings.
 */
export declare function gjsifyCacheRoot(kind: string, layoutVersion: string): string;
/**
 * Write `bytes` to `path` atomically: write a `<path>.tmp.<pid>` sibling, then
 * `rename` it into place, so a concurrent reader never observes a half-written
 * file. Creates the parent directory. Best-effort — any failure (read-only /
 * out-of-disk cache volume) is swallowed so a cache hiccup never breaks the
 * install; the caller proceeds with its in-memory copy.
 */
export declare function atomicWrite(path: string, bytes: Uint8Array | string): void;
/**
 * Read a cache file, returning its bytes on a HIT or `null` on a MISS. A
 * missing file, a zero-byte file (an interrupted previous write), or any read
 * error are all treated as a MISS — the file is left untouched so a follow-up
 * writer's atomic rename isn't disturbed.
 */
export declare function readCacheFile(path: string): Buffer | null;
