/**
 * A resolved (name@version) → (id, updatedAt) mapping. The on-disk field that
 * holds the id is type-specific (`integrationId` / `interfaceId` / `pluginId`)
 * for byte-compatibility with caches written by the pre-WS4 managers; callers
 * always see the uniform `id`.
 */
export interface VersionResolution {
    id: string;
    updatedAt: string;
    cachedAt: string;
}
export interface ResolutionCacheConfig {
    /** Subdirectory under the cache root — `integrations` | `interfaces` | `plugins`. */
    cacheType: string;
    /**
     * Field name the resolution value is stored under on disk. Kept type-specific
     * (e.g. `integrationId`) so the unified cache reads/writes byte-identically to
     * the three separate caches it replaces — no cache invalidation on upgrade.
     */
    idField: string;
    /**
     * Cache root directory. Defaults to `~/.adk/cache` (the production path the
     * pre-WS4 caches used); overridable only so tests can run against a temp dir
     * without mocking `os.homedir()`.
     */
    cacheRoot?: string;
}
/**
 * Generic two-level on-disk catalog cache, unifying the three byte-identical
 * `Enhanced{Integration,Interface,Plugin}Cache` classes.
 *
 * - **Resolution cache** (`resolutions/`): `name@version[+workspace]` →
 *   `{ id, updatedAt }`, {@link RESOLUTION_TTL_MINUTES}-minute TTL (checked on
 *   read; stale entries silently miss).
 * - **Definition cache** (`definitions/`): `id+updatedAt` → full definition, no
 *   expiry — the `(id, updatedAt)` tuple is content-addressed (same tuple ⇒ same
 *   spec), so it is immutable by contract.
 *
 * Paths, key sanitization (`[^a-zA-Z0-9_-] → _`), TTL, and compact JSON
 * serialization match the pre-WS4 caches exactly. `noCache` disables reads (and,
 * matching the old behavior, still allows writes through `set*`).
 */
export declare class ResolutionCache<TDef> {
    private readonly cacheDir;
    private readonly resolutionsDir;
    private readonly definitionsDir;
    private readonly idField;
    private readonly noCache;
    constructor(config: ResolutionCacheConfig, noCache?: boolean);
    private ensureCacheDirs;
    /**
     * @param allowStale when true, ignore the {@link RESOLUTION_TTL_MINUTES} TTL and
     *   return an expired entry. Used by the cloud-failure fallback so a stale-but-
     *   present resolution can recover a cached definition instead of hard-failing.
     */
    getResolution(name: string, version: string, workspace?: string, options?: {
        allowStale?: boolean;
    }): Promise<VersionResolution | null>;
    setResolution(name: string, version: string, workspace: string | undefined, id: string, updatedAt: string): Promise<void>;
    getDefinition(id: string, updatedAt: string): Promise<TDef | null>;
    setDefinition(id: string, updatedAt: string, definition: TDef): Promise<void>;
    clear(): Promise<void>;
    getStats(): Promise<{
        resolutions: {
            count: number;
            sizeBytes: number;
        };
        definitions: {
            count: number;
            sizeBytes: number;
        };
    }>;
    private getResolutionKey;
    private getDefinitionKey;
}
//# sourceMappingURL=resolution-cache.d.ts.map