/**
 * Details for npm package entries.
 */
export interface PackageDetails {
    installed_version: string;
    size?: number;
    update_check?: {
        last_check: number;
        last_notification: number;
        latest_known: string;
    };
}
/**
 * Details for binary download entries.
 */
export interface BinaryDetails {
    checksum: string;
    checksum_algorithm: 'sha256' | 'sha512';
    platform: string;
    arch: string;
    size: number;
    source: {
        type: 'download';
        url: string;
    };
}
/**
 * Unified manifest entry for all cached items (packages and binaries).
 * Shared fields at root, type-specific fields in details.
 */
export interface ManifestEntry {
    type: 'package' | 'binary';
    cache_key: string;
    timestamp: number;
    details: PackageDetails | BinaryDetails;
}
/**
 * Type guard for package entries.
 */
export declare function isPackageEntry(entry: ManifestEntry): entry is ManifestEntry & {
    details: PackageDetails;
};
/**
 * Type guard for binary entries.
 */
export declare function isBinaryEntry(entry: ManifestEntry): entry is ManifestEntry & {
    details: BinaryDetails;
};
/**
 * Legacy store record format (deprecated, for migration).
 */
export interface StoreRecord {
    timestampFetch: number;
    timestampNotification: number;
    version: string;
}
export interface DlxManifestOptions {
    /**
     * Custom manifest file path (defaults to ~/.socket/_dlx/.dlx-manifest.json).
     */
    manifestPath?: string;
}
/**
 * DLX manifest storage manager with atomic operations.
 * Supports both legacy format (package name keys) and new unified manifest format (spec keys).
 */
export declare class DlxManifest {
    private readonly manifestPath;
    private readonly lockPath;
    constructor(options?: DlxManifestOptions);
    /**
     * Read the entire manifest file.
     */
    private readManifest;
    /**
     * Get a manifest entry by spec (e.g., "@socketsecurity/cli@^2.0.11").
     */
    getManifestEntry(spec: string): ManifestEntry | undefined;
    /**
     * Get cached update information for a package (legacy format).
     * @deprecated Use getManifestEntry() for new code.
     */
    get(name: string): StoreRecord | undefined;
    /**
     * Set a package manifest entry.
     */
    setPackageEntry(spec: string, cacheKey: string, details: PackageDetails): Promise<void>;
    /**
     * Set a binary manifest entry.
     */
    setBinaryEntry(spec: string, cacheKey: string, details: BinaryDetails): Promise<void>;
    private writeManifest;
    /**
     * Store update information for a package (legacy format).
     * @deprecated Use setPackageEntry() for new code.
     */
    set(name: string, record: StoreRecord): Promise<void>;
    /**
     * Clear cached data for a specific entry.
     */
    clear(name: string): Promise<void>;
    /**
     * Clear all cached data.
     */
    clearAll(): Promise<void>;
    /**
     * Check if cached data is fresh based on TTL.
     */
    isFresh(record: StoreRecord | undefined, ttlMs: number): boolean;
    /**
     * Get all cached package names.
     */
    getAllPackages(): string[];
}
// Export singleton instance using default manifest location.
export declare const dlxManifest: DlxManifest;
