import { type DiagnosticEventPayload } from "../infra/diagnostic-events.js";
export declare const DEFAULT_DIAGNOSTIC_STABILITY_CAPACITY = 1000;
export declare const DEFAULT_DIAGNOSTIC_STABILITY_LIMIT = 50;
export declare const MAX_DIAGNOSTIC_STABILITY_LIMIT = 1000;
export type DiagnosticStabilityEventRecord = {
    seq: number;
    ts: number;
    type: DiagnosticEventPayload["type"];
    channel?: string;
    source?: string;
    outcome?: string;
    reason?: string;
    level?: string;
    detector?: string;
    toolName?: string;
    pairedToolName?: string;
    provider?: string;
    model?: string;
    durationMs?: number;
    costUsd?: number;
    count?: number;
    bytes?: number;
    queueDepth?: number;
    queueSize?: number;
    waitMs?: number;
    active?: number;
    waiting?: number;
    queued?: number;
    ageMs?: number;
    webhooks?: {
        received: number;
        processed: number;
        errors: number;
    };
    usage?: {
        input?: number;
        output?: number;
        cacheRead?: number;
        cacheWrite?: number;
        promptTokens?: number;
        total?: number;
    };
    context?: {
        limit?: number;
        used?: number;
    };
};
export type DiagnosticStabilitySnapshot = {
    generatedAt: string;
    capacity: number;
    count: number;
    dropped: number;
    firstSeq?: number;
    lastSeq?: number;
    events: DiagnosticStabilityEventRecord[];
    summary: {
        byType: Record<string, number>;
        webhooks?: {
            received: number;
            processed: number;
            errors: number;
        };
        sessions?: {
            stuck: number;
            maxQueueDepth?: number;
        };
    };
};
export type DiagnosticStabilityQueryInput = {
    limit?: unknown;
    type?: unknown;
    sinceSeq?: unknown;
};
export type NormalizedDiagnosticStabilityQuery = {
    limit: number;
    type: string | undefined;
    sinceSeq: number | undefined;
};
export declare function normalizeDiagnosticStabilityQuery(input?: DiagnosticStabilityQueryInput, options?: {
    defaultLimit?: number;
}): NormalizedDiagnosticStabilityQuery;
export declare function startDiagnosticStabilityRecorder(): void;
export declare function stopDiagnosticStabilityRecorder(): void;
export declare function getDiagnosticStabilitySnapshot(options?: DiagnosticStabilityQueryInput): DiagnosticStabilitySnapshot;
export declare function resetDiagnosticStabilityRecorderForTest(): void;
