/**
 * Scan Cache Type Definitions
 *
 * Types for caching server scan results between sessions.
 * Prevents "0 plugins" on startup by preserving scan data.
 *
 * Data Model (Plan 01):
 * - Registry: How to find updates (source IDs, patterns)
 * - Scan Cache: What's actually installed (from JAR scan) <- THIS FILE
 * - Preferences: User flags (enable/disable, skip migrate, pinned)
 *
 * @since v1.50.0
 */
import type { ScannedPlugin } from './plugin.js';
/**
 * Cached scan results for a single server
 */
export interface ServerScanCache {
    /** Server path that was scanned */
    path: string;
    /** Scanned plugins from this server */
    plugins: ScannedPlugin[];
    /** Total plugin count (quick access without array length) */
    pluginCount: number;
    /** Scan duration in milliseconds */
    scanDurationMs?: number;
}
/**
 * Full scan cache file structure
 * Stored at ~/.pluginator/cache/scan-cache.json
 */
export interface ScanCache {
    /** Schema version for migrations */
    version: 1;
    /** When the scan was performed (ISO 8601) */
    timestamp: string;
    /** Cache time-to-live in milliseconds (default: 24 hours) */
    ttlMs: number;
    /** Production server scan results */
    prod: ServerScanCache;
    /** Test server scan results */
    test: ServerScanCache;
    /** Hash of server paths to detect config changes */
    pathsHash?: string;
}
/**
 * Default TTL for scan cache (24 hours)
 */
export declare const DEFAULT_SCAN_CACHE_TTL_MS: number;
/**
 * Minimum TTL for scan cache (1 hour)
 */
export declare const MIN_SCAN_CACHE_TTL_MS: number;
/**
 * Default empty scan cache
 */
export declare function createDefaultScanCache(prodPath: string, testPath: string): ScanCache;
/**
 * Result of checking cache validity
 */
export interface CacheValidityResult {
    /** Whether the cache is valid and can be used */
    valid: boolean;
    /** Reason if invalid */
    reason?: 'expired' | 'paths-changed' | 'missing' | 'version-mismatch' | 'corrupted';
    /** Age of cache in milliseconds (if valid) */
    ageMs?: number;
    /** Time until expiry in milliseconds (if valid) */
    expiresInMs?: number;
}
/**
 * Summary of scan cache state
 */
export interface ScanCacheSummary {
    /** Whether cache exists */
    exists: boolean;
    /** Whether cache is valid */
    valid: boolean;
    /** Cache timestamp (if exists) */
    timestamp?: string;
    /** Production plugin count */
    prodCount: number;
    /** Test plugin count */
    testCount: number;
    /** Reason if invalid */
    invalidReason?: string;
}
//# sourceMappingURL=scan-cache.d.ts.map