/** * Unified UI module for @agents-dev/cli * * Provides consistent formatting, colors, and symbols across all commands. * Features: * - Unicode symbols with ASCII fallback * - Minimalist colors (only for status indicators) * - Context-aware output (respects --json, NO_COLOR) * - Spinner wrapper for async operations */ import * as clack from '@clack/prompts'; import color from 'picocolors'; export declare const symbols: { readonly success: "✓"; readonly error: "✗"; readonly warning: "⚠"; readonly info: "○"; readonly bullet: "•"; readonly arrow: "→"; readonly ellipsis: "…"; } | { readonly success: "[ok]"; readonly error: "[error]"; readonly warning: "[warn]"; readonly info: "[info]"; readonly bullet: "-"; readonly arrow: "->"; readonly ellipsis: "..."; }; interface UIContext { json: boolean; quiet: boolean; noColor: boolean; } /** * Set UI context flags (call at command start) */ export declare function setContext(options: Partial): void; /** * Reset UI context to defaults */ export declare function resetContext(): void; /** * Write raw text to stdout */ export declare function write(text: string): void; /** * Write a line to stdout */ export declare function writeln(text?: string): void; /** * Output success message: ✓ message (green) */ export declare function success(message: string): void; /** * Output error message: ✗ message (red) */ export declare function error(message: string): void; /** * Output warning message: ⚠ message (yellow) */ export declare function warning(message: string): void; /** * Output info message: ○ message (cyan) */ export declare function info(message: string): void; /** * Output dim/secondary text */ export declare function dim(message: string): void; /** * Output a blank line */ export declare function blank(): void; /** * Output key-value pair with aligned formatting * Example: "Project: /path/to/project" */ export declare function keyValue(key: string, value: string, keyWidth?: number): void; /** * Output a bulleted list * Example: * • item1 * • item2 */ export declare function list(items: string[], indent?: number): void; /** * Output a list with status indicators * Example: * ✓ file1.json * ✗ file2.json (missing) */ export declare function statusList(items: Array<{ label: string; ok: boolean; detail?: string; }>, indent?: number): void; /** * Output a section with title * Example: * Files: * ✓ config.json * ✗ local.json */ export declare function section(title: string, content: string[] | (() => void)): void; /** * Output items with arrow prefix (for "changed" lists) * Example: * → file1.json * → file2.json */ export declare function arrowList(items: string[], indent?: number): void; /** * Output a hint/help message */ export declare function hint(message: string): void; /** * Output next steps */ export declare function nextSteps(message: string): void; export interface Spinner { start: (message?: string) => void; stop: (message?: string) => void; message: (message: string) => void; } /** * Create a spinner for async operations * Returns a no-op spinner if in JSON mode or non-TTY */ export declare function spinner(): Spinner; /** * Output JSON and exit (for --json flag handling) */ export declare function json(data: T): void; /** * Format a count with singular/plural label * Example: formatCount(1, 'file', 'files') => '1 file' * Example: formatCount(3, 'file', 'files') => '3 files' */ export declare function formatCount(count: number, singular: string, plural: string): string; /** * Format a list of items with "none" fallback * Example: formatList(['a', 'b']) => 'a, b' * Example: formatList([]) => '(none)' */ export declare function formatList(items: string[], fallback?: string): string; /** * Format enabled/disabled status */ export declare function formatEnabled(enabled: boolean): string; /** * Format ok/missing status for files */ export declare function formatExists(exists: boolean): string; export { color, clack };