import { EventEmitter } from "node:events";
/**
 * Process-wide IdleWatcher. Surfaces (web POST /chat, channel router, REPL)
 * call `tick()` on every user input. The watcher fires `idle` once when the
 * gap between now and last tick exceeds `idleMs`. After firing it stays
 * quiet until the next tick — we don't keep firing every minute.
 *
 * No backpressure: if the runner takes longer than `idleMs`, the watcher
 * does NOT re-arm until tick() is called again.
 */
export declare class IdleWatcher extends EventEmitter {
    private lastActivityAt;
    private timer?;
    private fired;
    private running;
    private readonly idleMs;
    private readonly checkIntervalMs;
    constructor(opts: {
        idleMs: number;
        checkIntervalMs?: number;
    });
    start(): void;
    stop(): void;
    /** Call on every user input from any surface. */
    tick(): void;
    /** Returns ms since last activity. */
    idleFor(): number;
    private check;
}
/**
 * Get the process-wide IdleWatcher. The first caller's idleMs wins (subsequent
 * calls just return the existing instance). `start()` must be called explicitly.
 */
export declare function getIdleWatcher(idleMs: number): IdleWatcher;
//# sourceMappingURL=watcher.d.ts.map