/** * @fileoverview TerminalBridge — CLI terminal integration. * Encapsulates TTY detection, CLI primitive rendering, and server-mode * fallback for non-TTY environments. */ import type { ISpinnerHandle, IBoxOptions, ITableOptions } from '../types/index.js'; import { ServerFallback } from '../playground/server-fallback.js'; import type { LoggerConfig } from '../types/index.js'; import type { Logger } from '../Logger.js'; /** * Bridge for CLI terminal operations. */ export interface TerminalBridge { /** Displays a step progress indicator. */ step(current: number, total: number, message: string): void; /** Displays a styled header. */ header(title: string, subtitle?: string): void; /** Displays a horizontal divider. */ divider(): void; /** Outputs a blank line. */ blank(): void; /** Renders content inside a bordered box. */ box(content: string, options?: IBoxOptions): void; /** Renders an array of objects as an ASCII table. */ cliTable(rows: Record[], options?: ITableOptions): void; /** Creates a spinner handle. */ spinner(message: string): ISpinnerHandle; /** Whether CLI primitives should be shown. */ getShowPrimitives(): boolean; /** Sets whether CLI primitives should be shown. */ setShowPrimitives(show: boolean): void; /** Returns the server fallback instance (lazy). */ getServerFallback(): ServerFallback; /** Returns true if running in a TTY. */ isInTerminal(): boolean; } interface ITerminalBridgeCtorOptions { config: LoggerConfig; getLogger: () => Logger; } /** * Creates a TerminalBridge using a getter to avoid circular reference at construction. */ export declare function createTerminalBridge(options: ITerminalBridgeCtorOptions): TerminalBridge; export {}; //# sourceMappingURL=TerminalBridge.d.ts.map