/** * What an engine's failure prose actually says. * * Three places used to answer this question with their own regex set — the * rate-limit detector, the workflow retry boundary, and the respawn auth guard — * and they disagreed with each other in ways that were load-bearing rather than * accidental. "overloaded" is a quota window to one of them and an upstream * fault to another, and both readings are correct: the provider is saying two * things at once. * * So a classification here is a SET, not a verdict. This module says which * signals the text carries; each consumer keeps its own reading of them. */ export type EngineFailureClass = "rate-limit" | "quota" | "provider-outage" | "network" | "auth-terminal" | "invalid-model" | "terminal"; export interface EngineFailureClassification { /** Every class the text carries. Ambiguous prose carries more than one. */ classes: ReadonlySet; /** Unix seconds, and only when the engine stated a time itself. */ resetsAt?: number; } /** * Every class the given failure text carries. `terminal` is present exactly when * nothing else matched: an unrecognised failure is a verdict, not a maybe, and * guessing generously spends real money on real failures. */ export declare function classifyEngineFailureText(text: string | null | undefined): EngineFailureClassification; /** Whether a classification carries any of the given classes. */ export declare function hasEngineFailureClass(classification: EngineFailureClassification, ...classes: EngineFailureClass[]): boolean; //# sourceMappingURL=engine-failure.d.ts.map