/** Heartbeat emitter — wraps long-running ops with periodic ticks. Replaces backend `with_heartbeat`. */
import { type AgentLoopEvent, type InFlightMeta, type InFlightOpKind } from './core-types.js';
/** 5s tick, 15s warn, 30s stalled — match backend `agent/config.py`. */
export declare const HEARTBEAT_INTERVAL_MS = 5000;
export declare const HEARTBEAT_WARN_AFTER_MS = 15000;
export declare const HEARTBEAT_STALLED_AFTER_MS = 30000;
export interface HeartbeatClock {
    now(): number;
    setInterval(handler: () => void, ms: number): unknown;
    clearInterval(handle: unknown): void;
}
export interface HeartbeatEmitter {
    wrap<T>(promise: Promise<T>, kind: InFlightOpKind, meta?: InFlightMeta): Promise<T>;
    dispose(): void;
}
export interface HeartbeatEmitterOptions {
    intervalMs?: number;
    clock?: HeartbeatClock;
}
export declare function createHeartbeatEmitter(emit: (event: AgentLoopEvent) => void, options?: HeartbeatEmitterOptions): HeartbeatEmitter;
//# sourceMappingURL=heartbeat.d.ts.map