export interface StoredToken {
    userId: string;
    token: string;
    fetchedAt: number;
}
/** Write-through UPSERT. Idempotent — same userId overrides previous token. */
export declare function persistContextToken(userId: string, token: string, fetchedAt: number): void;
/** Load a single still-valid token, or null. */
export declare function loadContextToken(userId: string, ttlMs: number, now: number): StoredToken | null;
/** Load every still-valid token. Used at adapter start() to warm the Map. */
export declare function loadAllContextTokens(ttlMs: number, now: number): StoredToken[];
/** Drop expired rows. Returns the number of rows deleted. */
export declare function cleanupExpiredTokens(ttlMs: number, now: number): number;
/** Drop the row for one user (e.g. after a sendMessage proves the token expired
 *  upstream — caller should evict so we don't keep retrying it). */
export declare function deleteContextToken(userId: string): void;
export declare function closeContextStore(): void;
//# sourceMappingURL=context-store.d.ts.map