import type { CallbackActivity } from "../../core/callback-activity.ts";
export interface ActivityWatchdogThresholds {
    diagnosticMs: number;
    unresponsiveMs: number;
    pollMs: number;
}
export interface ActivityWatchdogDiagnostic {
    activity: CallbackActivity | undefined;
    elapsedMs: number;
    level: "blocking" | "unresponsive";
    message: string;
    /** Set when the diagnostic came from the heartbeat watchdog rather than a concrete engine failure. */
    source?: "watchdog";
}
/**
 * Chat-surface policy for engine diagnostics. Heartbeat-watchdog gaps stay
 * internal regardless of callback attribution: the TUI remains responsive and
 * the diagnostic is operational noise rather than a concrete engine failure.
 * Concrete engine failures (termination, RPC errors) always surface.
 */
export declare function shouldRenderEngineDiagnosticAsChatError(diagnostic: ActivityWatchdogDiagnostic): boolean;
export interface ActivityWatchdogOptions {
    now?: () => number;
    onDiagnostic: (diagnostic: ActivityWatchdogDiagnostic) => void;
    thresholds?: Partial<ActivityWatchdogThresholds>;
}
export declare class ActivityWatchdog {
    private readonly now;
    private readonly onDiagnostic;
    private readonly thresholds;
    private lastHeartbeatAt;
    private readonly activities;
    private timer;
    private emittedBlocking;
    private emittedUnresponsive;
    constructor(options: ActivityWatchdogOptions);
    start(): void;
    stop(): void;
    heartbeat(): void;
    activityStarted(activity: CallbackActivity): void;
    activityFinished(activityId: string): void;
    private inspect;
    private emit;
}
//# sourceMappingURL=activity-watchdog.d.ts.map