export declare function configureAntigravitySessionSignaturePersistence(input: {
    stateDir: string;
    fileName?: string;
} | null): void;
export declare function flushAntigravitySessionSignaturePersistenceSync(): void;
export declare const ANTIGRAVITY_GLOBAL_ALIAS_KEY = "antigravity.global";
export declare function getAntigravityThoughtSignatureSentinel(): string;
export declare function getAntigravityLatestSignatureSessionIdForAlias(aliasKeyInput: string, options?: {
    hydrate?: boolean;
}): string | undefined;
export declare function cacheAntigravityRequestSessionId(requestId: string, aliasKey: string, sessionId: string): void;
export declare function cacheAntigravityRequestSessionId(requestId: string, sessionId: string): void;
export declare function cacheAntigravityRequestSessionMeta(requestId: string, meta: {
    aliasKey?: string;
    sessionId: string;
    messageCount?: number;
}): void;
export declare function getAntigravityRequestSessionId(requestId: string): string | undefined;
export declare function getAntigravityRequestSessionMeta(requestId: string): {
    aliasKey: string;
    sessionId: string;
    messageCount: number;
} | undefined;
/**
 * Antigravity-Manager alignment: derive a stable session fingerprint for Gemini native requests.
 * - sha256(first user text parts joined), if non-empty and no "<system-reminder>"
 * - else sha256(JSON body)
 * - sid = "sid-" + first 16 hex chars
 */
export declare function extractAntigravityGeminiSessionId(payload: unknown): string;
export declare function cacheAntigravitySessionSignature(aliasKey: string, sessionId: string, signature: string, messageCount?: number): void;
export declare function cacheAntigravitySessionSignature(sessionId: string, signature: string, messageCount?: number): void;
export declare function lookupAntigravityPinnedAliasForSessionId(sessionIdInput: string, options?: {
    hydrate?: boolean;
}): string | undefined;
export declare function unpinAntigravitySessionAliasForSessionId(sessionIdInput: string): void;
export declare function clearAntigravitySessionAliasPins(options?: {
    hydrate?: boolean;
}): {
    clearedBySession: number;
    clearedByAlias: number;
};
export declare function getAntigravitySessionSignature(aliasKey: string, sessionId: string): string | undefined;
export declare function getAntigravitySessionSignature(sessionId: string): string | undefined;
export type AntigravityThoughtSignatureLookupSource = 'session_cache' | 'miss' | 'blocked_unknown_alias' | 'blocked_rewind' | 'expired';
export type AntigravityThoughtSignatureLookupResult = {
    aliasKey: string;
    sessionId: string;
    cacheKey: string;
    source: AntigravityThoughtSignatureLookupSource;
    signature?: string;
    messageCount?: number;
    sourceSessionId?: string;
    sourceTimestamp?: number;
};
export declare function lookupAntigravitySessionSignatureEntry(aliasKeyInput: string, sessionIdInput: string, options?: {
    hydrate?: boolean;
}): AntigravityThoughtSignatureLookupResult;
export declare function getAntigravitySessionSignatureEntry(aliasKey: string, sessionId: string): {
    signature: string;
    messageCount: number;
} | undefined;
export declare function getAntigravitySessionSignatureEntry(aliasKey: string, sessionId: string, options?: {
    hydrate?: boolean;
}): {
    signature: string;
    messageCount: number;
} | undefined;
export declare function getAntigravitySessionSignatureEntry(sessionId: string, options?: {
    hydrate?: boolean;
}): {
    signature: string;
    messageCount: number;
} | undefined;
export declare function clearAntigravitySessionSignature(aliasKey: string, sessionId: string): void;
export declare function clearAntigravitySessionSignature(sessionId: string): void;
export declare function markAntigravitySessionSignatureRewind(aliasKey: string, sessionId: string, messageCount?: number): void;
/**
 * Clear thoughtSignature caches + pins for a specific (aliasKey, sessionId).
 *
 * Used for "Invalid signature / Corrupted thought signature / thinking.signature" style upstream errors,
 * where keeping a persisted signature would cause repeated 400s after restart.
 */
export declare function invalidateAntigravitySessionSignature(aliasKeyInput: string, sessionIdInput: string): void;
export declare function resetAntigravitySessionSignatureCachesForTests(): void;
export declare function shouldTreatAsMissingThoughtSignature(value: unknown): boolean;
