import { type DreamingPhaseId } from './constants.js';
export type DreamingEventBase = {
    timestamp: string;
    phase: DreamingPhaseId;
    ok: boolean;
    reason: string;
    durationMs: number;
};
export type DreamingLightEvent = DreamingEventBase & {
    phase: 'light';
    scannedEntries: number;
    newSignals: number;
    deduped: number;
};
export type DreamingDeepEvent = DreamingEventBase & {
    phase: 'deep';
    candidates: number;
    applied: number;
};
export type DreamingRemEvent = DreamingEventBase & {
    phase: 'rem';
    patternsDiscovered: number;
    entriesAnalyzed: number;
};
export type DreamingEvent = DreamingLightEvent | DreamingDeepEvent | DreamingRemEvent;
/**
 * Append a single event line to `memory/.dreams/events.jsonl`.
 * Creates the directory and file if they don't exist.
 * Failures are silently ignored so audit logging never blocks execution.
 */
export declare function appendDreamingEvent(workspaceDir: string, event: DreamingEvent): Promise<void>;
/**
 * Read the most recent N events from the events log.
 * Returns newest-first. If the file doesn't exist, returns an empty array.
 */
export declare function readDreamingEvents(workspaceDir: string, limit?: number): Promise<DreamingEvent[]>;
