/**
 * Shared community-package materialization (download → verify → extract).
 *
 * Single source of truth for turning a registry install resolution into bytes on
 * disk: whole-package sha256 + size check, then a minimal tar.gz extractor with a
 * path-traversal guard. Used by the skill installer and the pet asset installer so
 * the security-sensitive verify/extract logic lives in exactly one place.
 */
import type { CommunityInstallResolution } from "./community-consent-client.js";
/**
 * Fetch the package, verifying it matches the registry's size + sha256. Delegates
 * to the ranged downloader (WS-C4): 4MB Range chunks + .part resume for large
 * assets, with a transparent whole-body fallback for small/non-Range packages.
 */
export declare function downloadAndVerifyPackage(fetchFn: typeof fetch, install: Pick<CommunityInstallResolution, "downloadUrl" | "sizeBytes" | "checksum">, label: string): Promise<Buffer>;
/** Extract a gzip-compressed tar into targetDir; only regular files + dirs, no traversal. */
export declare function extractTarGz(pkg: Buffer, targetDir: string, label: string): Promise<void>;
/** Resolve a tar entry under rootDir, rejecting absolute paths and `..` traversal. */
export declare function safeTarTarget(rootDir: string, entryName: string, label: string): string;
