export interface HistoryEntry {
    id: number;
    prompt: string;
    created_at: number;
    cwd?: string;
    /** ID of the session the prompt was submitted from, if known. */
    sessionId?: string;
}
export declare class HistoryStorage {
    #private;
    private constructor();
    static open(dbPath?: string): HistoryStorage;
    /** @internal Reset the singleton — test-only. */
    static resetInstance(): void;
    /**
     * Register a resolver that supplies the current session ID for prompts added
     * without an explicit `sessionId`. Evaluated synchronously at `add()` time so
     * batched writes capture the session active when the prompt was submitted.
     */
    setSessionResolver(resolver: () => string | undefined): void;
    add(prompt: string, cwd?: string, sessionId?: string): Promise<void>;
    getRecent(limit: number): HistoryEntry[];
    search(query: string, limit: number): HistoryEntry[];
    /**
     * IDs of the sessions whose stored prompts match `query`, ordered by prompt
     * recency and de-duplicated. Used to augment session ranking in the resume
     * picker with prompts that the 4KB session-list prefix never sees.
     */
    matchingSessionIds(query: string, limit?: number): string[];
}
