/** * CLI Output Module * * Provides structured output for CLI commands with support for: * - Different message types (info, success, error, warning) * - Quiet mode to suppress non-essential output * - Consistent formatting across all commands * * This module is for USER-FACING output only. For diagnostic/debug logging, * use the logging module (src/logging/logger.ts). */ /** * Output configuration options. */ export interface OutputConfig { /** Suppress non-essential output */ quiet?: boolean; /** Disable colored output */ noColor?: boolean; } /** * Configure global output settings. */ export declare function configureOutput(config: OutputConfig): void; /** * Get current output configuration. */ export declare function getOutputConfig(): OutputConfig; /** * Reset output configuration to defaults. */ export declare function resetOutput(): void; /** * Check if output is in quiet mode. */ export declare function isQuiet(): boolean; /** * Standard information output. * Use for progress messages, status updates, and general information. */ export declare function info(message: string): void; /** * Success message output. * Use for completion messages and positive confirmations. */ export declare function success(message: string): void; /** * Warning message output. * Always shown (not suppressed by quiet mode) as warnings are important. */ export declare function warn(message: string): void; /** * Error message output. * Always shown (not suppressed by quiet mode) as errors are critical. */ export declare function error(message: string): void; /** * Debug output (only shown in verbose mode). * For detailed information during development/troubleshooting. */ export declare function debug(message: string, verbose?: boolean): void; /** * Print a blank line for formatting. */ export declare function newline(): void; /** * Print multiple lines. */ export declare function lines(...messages: string[]): void; /** * Print formatted JSON output. * Always shown as this is typically requested data output. */ export declare function json(data: unknown): void; /** * Print a section header. */ export declare function section(title: string): void; /** * Print a key-value pair. */ export declare function keyValue(key: string, value: string | number | boolean | undefined): void; /** * Print a list item. */ export declare function listItem(item: string, indent?: number): void; /** * Print numbered list items. */ export declare function numberedList(items: string[], startIndex?: number): void; /** * Create a scoped output instance for a specific command. * Useful for commands that need to track their own quiet state. */ export declare function createOutput(config?: OutputConfig): Output; /** * Output class for scoped output with its own configuration. */ export declare class Output { private config; constructor(config?: OutputConfig); info(message: string): void; success(message: string): void; warn(message: string): void; error(message: string): void; debug(message: string, verbose?: boolean): void; newline(): void; lines(...messages: string[]): void; json(data: unknown): void; section(title: string): void; keyValue(key: string, value: string | number | boolean | undefined): void; listItem(item: string, indent?: number): void; numberedList(items: string[], startIndex?: number): void; } /** * Streaming text display configuration. */ export interface StreamingDisplayConfig { /** Prefix to show before streaming output */ prefix?: string; /** Suffix to show after streaming completes */ suffix?: string; /** Whether to show a spinner during streaming */ showSpinner?: boolean; /** Maximum line width before wrapping */ maxWidth?: number; /** Stream to write to (defaults to stdout) */ stream?: NodeJS.WriteStream; /** Color/style for the streaming text */ style?: 'dim' | 'normal' | 'bright'; } /** * Streaming display controller for real-time LLM output. * Provides clean, formatted output during streaming operations. */ export declare class StreamingDisplay { private config; private stream; private buffer; private lineLength; private isActive; private quietMode; private supportsAnsi; constructor(config?: StreamingDisplayConfig); /** * Start streaming display with optional prefix. */ start(prefix?: string): void; /** * Write a chunk of streaming text. */ write(chunk: string): void; /** * Complete the streaming display. */ finish(suffix?: string): string; /** * Abort the streaming display (e.g., on error). */ abort(message?: string): void; /** * Get the complete buffer content. */ getBuffer(): string; /** * Check if streaming is currently active. */ isStreaming(): boolean; } /** * Create a streaming display for interview operations. * Provides context-appropriate prefixes and styling. */ export declare function createStreamingDisplay(operation: 'generating' | 'analyzing' | 'synthesizing', context?: string): StreamingDisplay; /** * Simple streaming callback that writes to stdout. * Use this for basic streaming output without the full StreamingDisplay. */ export declare function createStreamingCallback(prefix?: string): { onStart: (operation: string, context?: string) => void; onChunk: (chunk: string, operation: string) => void; onComplete: (text: string, operation: string) => void; onError: (error: Error, operation: string) => void; }; //# sourceMappingURL=output.d.ts.map