/**
 * 摘要缓存带 TTL 和并发触发去重。
 * 共享单例用于所有摘要钩子 (aiSummary & smartFollowDetail)。
 */
import type { AiSummaryStatus } from '../ai-summary/types';
export interface CachedSummaryEntry {
    status: AiSummaryStatus;
    summary: string;
    /** 智能跟单任务的最近更新时间（来自 gmtModified） */
    gmtModified?: string;
    updatedAt: number;
}
export type CacheKey = string;
export declare function buildCacheKey(tableId: string, rowId: string, mode: string): CacheKey;
export declare class SummaryCache {
    private store;
    private inflight;
    private ttl;
    constructor(ttl?: number);
    get(key: CacheKey): CachedSummaryEntry | undefined;
    set(key: CacheKey, entry: Omit<CachedSummaryEntry, 'updatedAt'>): void;
    delete(key: CacheKey): void;
    clear(): void;
    getInflight(key: CacheKey): Promise<CachedSummaryEntry> | undefined;
    setInflight(key: CacheKey, promise: Promise<CachedSummaryEntry>): void;
    hasInflight(key: CacheKey): boolean;
    clearAll(): void;
    getStats(): {
        cacheSize: number;
        inflightSize: number;
    };
}
export declare const summaryCache: SummaryCache;
