export type NpmSpecResolution = {
    name?: string;
    version?: string;
    resolvedSpec?: string;
    integrity?: string;
    shasum?: string;
    resolvedAt?: string;
};
export type NpmIntegrityDrift = {
    expectedIntegrity: string;
    actualIntegrity: string;
};
export declare function withTempDir<T>(prefix: string, fn: (tmpDir: string) => Promise<T>): Promise<T>;
export declare function resolveArchiveSourcePath(archivePath: string): Promise<{
    ok: true;
    path: string;
} | {
    ok: false;
    error: string;
}>;
export declare function packNpmSpecToArchive(params: {
    spec: string;
    timeoutMs: number;
    cwd: string;
}): Promise<{
    ok: true;
    archivePath: string;
    metadata: NpmSpecResolution;
} | {
    ok: false;
    error: string;
}>;
