import { type MemoryConsolidationRegistry, type MemoryConsolidationRunReceipt, type MemoryConsolidationUsageLookup } from './memory-consolidation.js'; import { type MemoryConsolidationConfigSource } from './memory-consolidation-config.js'; export interface MemoryConsolidationSchedulerOptions { readonly memoryRegistry: MemoryConsolidationRegistry; /** Live config source (ConfigManager.getRaw shape); re-read every wake. */ readonly configSource: MemoryConsolidationConfigSource; /** True when the runtime is idle right now (e.g. no busy broker sessions). */ readonly isIdle: () => boolean; /** Optional usage instrumentation; omit when no signal exists (kept honest in receipts). */ readonly usageLookup?: MemoryConsolidationUsageLookup | undefined; readonly now?: (() => number) | undefined; readonly setTimer?: ((fn: () => void, ms: number) => ReturnType) | undefined; readonly clearTimer?: ((timer: ReturnType) => void) | undefined; /** Wake cadence for the due-ness check (5 minutes by default). */ readonly checkIntervalMs?: number | undefined; /** Optional receipt sink invoked after every run (in addition to the log + ring). */ readonly onReceipt?: ((receipt: MemoryConsolidationRunReceipt) => void) | undefined; } export declare class MemoryConsolidationScheduler { private readonly options; private timer; private stopped; private lastRunAt; /** First-tick timestamp: the schedule fallback baselines here, so a busy daemon consolidates SCHEDULE_FACTOR x intervalMs after start, not instantly. */ private startedAt; private idleSince; private readonly receipts; constructor(options: MemoryConsolidationSchedulerOptions); private get checkIntervalMs(); start(): void; stop(): void; /** The retained receipts, newest last (bounded ring). */ listReceipts(): readonly MemoryConsolidationRunReceipt[]; private scheduleNext; /** * One wake: track continuous idleness, then run when due, the idle trigger * at intervalMs cadence, or the slow schedule fallback when the runtime has * not offered an idle window for SCHEDULE_FACTOR x intervalMs. */ tick(): void; } //# sourceMappingURL=memory-consolidation-scheduler.d.ts.map