import type { MemorySearchOptions } from '../../prompt/memory/index.js';
export type DreamingStoreEntry = {
    key: string;
    path: string;
    startLine: number;
    endLine: number;
    snippet: string;
    /** Number of times this snippet was returned by a memory recall query. */
    recallCount: number;
    /** Number of times recorded from daily log scanning (light sweep). */
    dailyCount: number;
    /** Number of times replayed from grounded context (agent-initiated). */
    groundedCount: number;
    /** Number of times the light phase touched this entry. */
    lightHits: number;
    /** Number of times the REM phase touched this entry. */
    remHits: number;
    /** Cross-phase hit count (light + deep + rem combined touches). */
    phaseHitCount: number;
    /** Weighted aggregate of all signal dimensions. */
    totalSignalCount: number;
    totalScore: number;
    maxScore: number;
    queryHashes: string[];
    recallDays: string[];
    firstRecalledAt: string;
    lastRecalledAt: string;
    promotedAt?: string;
};
export type DreamingStore = {
    version: 1;
    updatedAt: string;
    entries: Record<string, DreamingStoreEntry>;
};
type MemoryMatch = Awaited<ReturnType<typeof import('../../prompt/memory/index.js').memorySearch>>[number];
export declare function recordDreamingRecalls(params: {
    workspaceDir: string;
    query: string;
    matches: MemoryMatch[];
    options?: MemorySearchOptions;
    now?: Date;
}): Promise<{
    recorded: number;
    skipped: number;
    storePath: string;
}>;
export declare function withDreamingPromotionLock<T>(workspaceDir: string, task: () => Promise<T>): Promise<T>;
export declare function loadDreamingStore(params: {
    workspaceDir: string;
}): Promise<{
    store: DreamingStore;
    storePath: string;
}>;
export declare function saveDreamingStore(params: {
    workspaceDir: string;
    store: DreamingStore;
}): Promise<void>;
type PhaseSignalField = 'dailyCount' | 'groundedCount' | 'lightHits' | 'remHits';
/**
 * Increment a phase-specific signal counter on an existing store entry.
 * Also bumps `phaseHitCount` and `totalSignalCount`.
 * Returns `true` if the entry existed and was updated.
 */
export declare function bumpEntryPhaseSignal(entry: DreamingStoreEntry, field: PhaseSignalField, increment?: number): void;
export {};
