import type { EnrichmentWarning } from '../enrichments/EnrichmentWarning.js'; /** A subject whose generation threw: its trail and the error message. */ export type FailedItem = { trail: string; message: string; }; /** * The message of a run that failed in generate. Each distinct error is * written once, with the subjects it failed: one wrong enrichment fails * every subject that reads it, and the user needs to read it only once. */ export declare const toGenerationFailure: (failedItems: readonly FailedItem[]) => string; /** * The error a run that failed in generate throws. It carries the * enrichment warnings the audit found, since a misaddressed enrichment is * often why a subject failed. */ export declare class GenerationFailure extends Error { enrichmentWarnings: EnrichmentWarning[]; constructor(failedItems: readonly FailedItem[], enrichmentWarnings: EnrichmentWarning[]); }