export interface SymbolEntry {
    symbolId: string;
    name: string;
    file: string;
    firstSeen: number;
    lastSeen: number;
    accessCount: number;
}
export interface FileEntry {
    path: string;
    firstSeen: number;
    lastSeen: number;
    accessCount: number;
}
export interface QueryEntry {
    tool: string;
    query: string;
    repo: string;
    ts: number;
    resultCount: number;
}
export interface NegativeEntry {
    tool: string;
    query: string;
    repo: string;
    ts: number;
    stale: boolean;
    filePattern?: string;
}
export interface SessionState {
    sessionId: string;
    startedAt: number;
    callCount: number;
    exploredSymbols: Map<string, SymbolEntry>;
    exploredFiles: Map<string, FileEntry>;
    queries: QueryEntry[];
    negativeEvidence: NegativeEntry[];
    h10Emitted: boolean;
}
export declare function getSessionState(): SessionState;
export declare function getCallCount(): number;
export declare function resetSession(): void;
/** Search tools that produce negative evidence on zero results */
export declare const SEARCH_TOOL_SET: Set<string>;
export declare function recordToolCall(tool: string, args: Record<string, unknown>, resultChunks: number, resultData: unknown): void;
/**
 * Track a cache-hit tool call.
 * Increments callCount but does NOT evaluate negative evidence
 * (no result data available to inspect).
 */
export declare function recordCacheHit(_tool: string, _args: Record<string, unknown>): void;
export declare function isStale(entry: NegativeEntry): boolean;
export declare function formatSnapshot(sessionState: SessionState, repo?: string): string;
export declare function getContext(repo?: string, includeStale?: boolean): Record<string, unknown>;
/**
 * Mark negative evidence entries as stale when a file changes.
 * Scoped to the changed file's subtree — entries with a filePattern
 * in a different subtree are not affected.
 */
export declare function invalidateNegativeEvidence(repo: string, changedFile: string): void;
/** Deserialize sidecar JSON back to SessionState shape (reconstructs Maps) */
export declare function deserializeState(raw: Record<string, unknown>): SessionState;
/** Write current state to sidecar file atomically (tmp + rename) */
export declare function flushSidecar(): Promise<void>;
/** Remove sidecar file (sync, called on process exit) */
export declare function cleanupSidecar(): void;
/** Remove orphan sidecar files older than 24h */
export declare function cleanupOrphanSidecars(): void;
/** Debounced sidecar flush */
export declare function scheduleSidecarFlush(): void;
//# sourceMappingURL=session-state.d.ts.map