export interface ColorPalette { cyan: string; cyanLight: string; cyanDim: string; magenta: string; magentaDim: string; yellow: string; yellowDim: string; key: string; white: string; light: string; mid: string; gray: string; darkGray: string; } export type PaletteId = 'compact-cmyk' | 'dracula' | 'nord' | 'solarized-dark' | 'gruvbox' | 'tokyo-night' | 'catppuccin' | 'high-contrast'; export interface PaletteMeta { id: PaletteId; name: string; source: string; description: string; } export declare const PALETTES: Record; export declare const PALETTE_META: Record; export declare function getPaletteId(): PaletteId; export declare function listPalettes(): PaletteMeta[]; export declare function isPaletteId(s: string): s is PaletteId; export declare const sym: { crow: string; prompt: string; assistant: string; success: string; error: string; pending: string; running: string; thinking: string; warn: string; arrow: string; bullet: string; divider: string; }; type ChalkFn = (s: string) => string; type BadgeFn = (s: string) => string; interface Theme { brand: ChalkFn; brandBold: ChalkFn; brandDim: ChalkFn; success: ChalkFn; warning: ChalkFn; error: ChalkFn; info: ChalkFn; primary: ChalkFn; secondary: ChalkFn; dim: ChalkFn; muted: ChalkFn; bright: ChalkFn; italic: ChalkFn; header: ChalkFn; subheader: ChalkFn; command: ChalkFn; cost: ChalkFn; link: ChalkFn; prompt: ChalkFn; assistant: ChalkFn; user: ChalkFn; toolName: ChalkFn; toolArgs: ChalkFn; toolStatus: ChalkFn; toolError: ChalkFn; toolTime: ChalkFn; thinkBorder: ChalkFn; thinkText: ChalkFn; thinkLabel: ChalkFn; modeBadge: BadgeFn; secBadge: BadgeFn; } export declare const theme: Theme; /** * Switch the active palette. Mutates the exported `theme` object in place * so existing callers don't need to re-import. Returns true if the palette * was found and applied; false if id was unknown. */ export declare function setPalette(id: string): boolean; export declare function printBanner(provider: string, model: string, mode: string, permissionMode: string, sessionId: string, _toolNames: string[]): void; export declare function formatDuration(ms: number): string; export declare function printSplash(): void; export declare function installScreenReaderDispatch(transform: (s: string) => string): void; export declare function uninstallScreenReaderDispatch(): void; export declare function printSection(title: string): void; export declare function printKV(key: string, value: string, indent?: number): void; export declare function printToolRun(name: string, args: string): Promise; export declare function printToolResult(success: boolean, elapsed: number, output: string): Promise; export declare function printThinkingOpen(): Promise; export declare function printThinkingText(text: string): void; /** * Close the thinking section. * * By default, COLLAPSES the streamed content into a one-liner — uses * ANSI cursor-up + clear-to-end-of-screen to erase the panel we just * printed, then writes a compact "▶ thinking · N tokens · /think to * expand" footer in its place. The full buffer is stashed on * globalThis so /think can re-print it later. * * Pass `{ collapse: false }` to skip the collapse and leave the * expanded panel on screen (used by expandLastThinking()). * * Safety: if the thinking output is taller than the terminal can * reliably address with cursor-up (more rows than the terminal has, * or terminal-width-wrapped lines we can't count precisely), we skip * the collapse and just print the footer below. The user still gets * the count + elapsed; the panel stays where it is. */ export declare function printThinkingClose(opts?: { collapse?: boolean; }): Promise; /** * Re-print the most recent thinking block (the one /think collapses) * in expanded form. Returns false if there's no thinking buffered for * this session yet — the slash command uses that to print a "no * thinking captured yet" message instead. */ export declare function expandLastThinking(): boolean; export declare function printCost(prompt: number, completion: number, cost: number, warning?: string, elapsedMs?: number): void; /** * Pattern-match an API error message + status into a specific category, * with provider-aware diagnosis and a one-line fix. Returns the best * matching pattern, or a generic fallback. */ export interface ApiErrorContext { baseURL?: string; provider?: string; model?: string; } export interface CategorizedError { category: string; status?: number; provider: string; title: string; why: string; fix: string; docs?: string; severity: 'auth' | 'quota' | 'model' | 'context' | 'content' | 'network' | 'server' | 'unknown'; } export declare function categorizeApiError(message: string, ctx?: ApiErrorContext): CategorizedError; /** * Render an API error with structured diagnosis. * * ✗ API error [429 · OpenRouter · rate-limit-free-per-min] * * Free-tier rate limit (20 RPM) * * OpenRouter's free models cap at ~20 requests per minute. * → Wait ~60s, OR switch to a paid model with /model, OR add credits. * · https://openrouter.ai/docs/limits * * raw: 429 Rate limit exceeded: free-models-per-min. */ export declare function printApiError(message: string, ctx?: ApiErrorContext): void; export declare function printSecurityBadge(level: string, threats: string[], blocked: boolean): void; export declare function printDivider(): void; export declare function spinner(text: string): string; export {};