/** * Renders a plan-limit / out-of-credits block as a CLI upgrade card. * * IMPORTANT: this file contains NO plan names, prices, benefits or URLs. All of * that arrives inside the server's `upgrade` payload, so pricing and marketing * copy can change server-side and every already-installed MCP client picks it * up on the next blocked call — no npm republish, no marketplace re-submission. * Keep it that way: this module formats, it never authors. */ /** One plan a user could move to, with its price and limits. */ export interface UpgradePlanOption { slug: string; name: string; price: string; price_note: string | null; recommended: boolean; current: boolean; unlocks: string | null; benefits: string[]; url: string; } /** A free-trial offer the account is eligible for. */ export interface TrialOffer { available: boolean; plan_slug: string; plan_name: string; days: number; start_url: string; requires_card: boolean; label: string; } /** A related Misar product offered alongside an upgrade. */ export interface CrossSellOffer { product: string; product_name: string; headline: string; url: string; } /** Everything the `upgrade` tool needs to describe the account's options. */ export interface UpgradeOffer { product_name: string; reason: "quota_exhausted" | "feature_locked" | "credits_exhausted"; feature: string; feature_label: string; headline: string; usage: { used: number | null; limit: number | null; remaining: number | null; period: "month" | "total" | null; resets_at: string | null; } | null; current_plan: { slug: string; name: string; }; recommended_plan: string | null; plans: UpgradePlanOption[]; topup: { balance_credits: number; required_credits: number; options: { amount_dollars: number; label: string; url: string; }[]; } | null; trial?: TrialOffer | null; cross_sell?: CrossSellOffer[]; urls: { pricing: string; billing: string; docs: string; compare: string; }; cta: string; event_id?: string | null; } /** Extract the offer from an arbitrary API error body, if present. */ export declare function extractUpgradeOffer(body: unknown): UpgradeOffer | null; /** * Render the upgrade card. Output is plain text with box drawing + a usage bar: * readable raw in a terminal, and rendered cleanly by MCP clients that treat * tool output as markdown. */ export declare function renderUpgradeOffer(offer: UpgradeOffer): string; /** Compact one-liner for logs / nested contexts. */ export declare function summarizeOffer(offer: UpgradeOffer): string; //# sourceMappingURL=upgrade.d.ts.map