import type { Diagnostic, Graph, NodeId } from '../graph.js'; import { type ArtifactResourcePolicy } from '../recipe/artifact-envelope.js'; import type { NpmTarballSource, YarnBerryChecksumSource } from '../registry/types.js'; export interface RefurbishSources { readonly npmTarballs: NpmTarballSource; readonly yarnBerryChecksums?: YarnBerryChecksumSource; } /** @deprecated Pass RefurbishSources so npm tarballs and Yarn cache checksum evidence cannot be conflated. */ export interface TarballSource extends NpmTarballSource { berryChecksum?(name: string, version: string, cacheKey: string): Promise; } export interface RefurbishOptions { onDiagnostic?: (d: Diagnostic) => void; seed?: ReadonlySet; concurrency?: number; cacheKey?: string; cacheKeyInference?: 'format-default' | 'observed-only'; artifactResources?: ArtifactResourcePolicy; } export interface RefurbishResult { graph: Graph; enriched: NodeId[]; unresolved: Diagnostic[]; } export declare function berryCacheKeyFor(graph: Graph, format: string, inference: NonNullable): string | undefined; export declare function refurbish(graph: Graph, format: string, source: RefurbishSources | TarballSource, opts?: RefurbishOptions): Promise;