/** * @file `resolveTrufflehog()` — TruffleHog resolution entry point. Tries each * source in order: * * 1. VFS — smol binary's embedded TruffleHog, when packed * 2. PATH — `trufflehog` on the system PATH * 3. download — upstream GitHub release tar.gz (only when `downloadIfMissing` is * passed) Returns `undefined` if all of the enabled sources miss. Memoized * per option-shape; same caching semantics as `resolveJre()`. */ import type { BinaryDownloader } from '../from-download.js'; import type { HashInput } from '../../crypto/integrity.js'; import type { ResolvedTrufflehog } from './types.js'; export interface ResolveTrufflehogOptions { /** * When set, the resolver falls through to a GitHub release download after the * local-discovery tiers miss. Omit to keep the resolver read-only. */ downloadIfMissing?: { version: string; platformArch: string; integrity?: HashInput | undefined; cacheDir?: string | undefined; downloader?: BinaryDownloader | undefined; } | undefined; } export declare function cacheKey(options: ResolveTrufflehogOptions | undefined): string; export declare function doResolveTrufflehog(options?: ResolveTrufflehogOptions | undefined): Promise; /** * @unused No internal or Socket consumers; exercised only by its unit tests. */ export declare function resetTrufflehogResolution(): void; export declare function resolveTrufflehog(options?: ResolveTrufflehogOptions | undefined): Promise;