import type { FormatId } from '../../api/format-contract.js'; import type { ArtifactResourceLimits, ArtifactResourcePolicy } from '../../recipe/artifact-envelope.js'; import type { NpmTarballSource, YarnBerryChecksumSource } from '../../registry/types.js'; import { type Graph, type NodeId } from './graph.js'; import type { Diagnostic, DiagnosticObserver } from './operation.js'; export type { ArtifactResourceLimits, ArtifactResourcePolicy, NpmTarballSource, YarnBerryChecksumSource, }; export interface RefurbishSources { readonly npmTarballs: NpmTarballSource; readonly yarnBerryChecksums?: YarnBerryChecksumSource; } export interface TarballSource extends NpmTarballSource { berryChecksum?(name: string, version: string, cacheKey: string): Promise; } export interface RefurbishOptions { readonly onDiagnostic?: DiagnosticObserver; readonly seed?: ReadonlySet; readonly concurrency?: number; readonly cacheKey?: string; readonly cacheKeyInference?: 'format-default' | 'observed-only'; readonly artifactResources?: ArtifactResourcePolicy; } export interface RefurbishResult { graph: Graph; enriched: NodeId[]; unresolved: Diagnostic[]; } export declare function refurbish(graph: Graph, format: FormatId, source: RefurbishSources | TarballSource, options?: RefurbishOptions): Promise;