import type { HistoireDiagnostic } from '@histoire/protocol';
import type { CatalogDiagnostic } from './types.js';
/** Public limits keep project errors bounded independently of source contents. */
export declare const MAX_DIAGNOSTICS = 100;
/** Byte cap of one bounded diagnostics list. */
export declare const MAX_DIAGNOSTIC_BYTES: number;
/** Removes runtime credentials and canonical project roots from generated errors. */
export declare function sanitizeDiagnosticMessage(value: unknown, root: string, secret?: string): string;
/** Deduplicates bounded diagnostics while reporting omitted records explicitly. */
export declare function boundedDiagnostics(items: CatalogDiagnostic[], max?: number): {
    diagnostics: readonly CatalogDiagnostic[];
    diagnosticsTruncated: boolean;
};
/**
 * Keeps the warnings that still fit beside already bounded diagnostics, so both lists together
 * respect the same count and byte caps.
 * @param bounded Output of {@link boundedDiagnostics}.
 * @param warnings Warnings produced after bounding (e.g. catalog projection).
 * @param max Count cap used for `bounded`.
 */
export declare function boundedWarnings(bounded: readonly CatalogDiagnostic[], warnings: readonly HistoireDiagnostic[], max?: number): HistoireDiagnostic[];
//# sourceMappingURL=diagnostics.d.ts.map