/**
 * Loop manager — owns in-memory setInterval handles for session-scoped loops.
 *
 * Pure runtime. No I/O, no persistence. State lives in a Map and dies
 * with the process. The onTick callback is injected at construction
 * (wired to session.followUp in main.ts).
 */
import type { Loop } from './types.js';
export declare class LoopManager {
    private readonly entries;
    private readonly onTick;
    private readonly changeListeners;
    constructor(onTick: (loop: Loop) => void);
    /** Register a listener called whenever loops are added, removed, or tick. */
    onChange(fn: () => void): () => void;
    private notifyChange;
    start(opts: {
        prompt: string;
        intervalMs: number;
        name?: string;
        maxTicks?: number;
    }): Loop;
    stop(id: string): boolean;
    stopAll(): void;
    list(): Loop[];
    get(id: string): Loop | undefined;
    get size(): number;
    /** Returns the loop whose next tick is soonest, or null if no loops active. */
    nextTick(): {
        name: string;
        deltaMs: number;
    } | null;
    private tick;
}
//# sourceMappingURL=loop-manager.d.ts.map