import { type UpgradeOffer } from "./upgrade.js"; /** Render any thrown value as a message safe to return to the model. */ export declare function formatError(error: unknown): string; /** * Error carrying a structured upgrade offer, so a caller that wants the raw * data (rather than the rendered card) can still reach it. */ export declare class PlanLimitError extends Error { readonly offer: UpgradeOffer; constructor(offer: UpgradeOffer, rendered: string); } /** * Turn a non-2xx API response into an Error carrying the server's own message. * * When the body is a plan-limit rejection, the message becomes the full * rendered upgrade card — so EVERY tool in this server surfaces the upsell * automatically, without each one needing to handle quota errors itself. */ export declare function apiError(status: number, body: unknown): Error; //# sourceMappingURL=errors.d.ts.map