export interface CliJsonSuccess { success: true; data: T; } export interface CliJsonError { success: false; code: string; message: string; stage?: string; command?: string; http_status?: number; data?: unknown; } export interface BatchFileResult { file: string; success: boolean; output?: string; duration_ms?: number; code?: string; message?: string; } export interface BatchConvertData { batch_mode: true; command: string; output_dir: string; total: number; succeeded: number; failed: number; results: BatchFileResult[]; } export type CliJsonResponse = CliJsonSuccess | CliJsonError; export interface ReportCliErrorOptions { json?: boolean; quiet?: boolean; command?: string; } export declare function resetErrorReported(): void; export declare function markErrorReported(): void; export declare function wasErrorReported(): boolean; export declare function writeJsonSuccess(data: T): void; export declare function writeJsonError(body: CliJsonError): void; export declare function isCliJsonSuccess(value: Record): value is CliJsonSuccess & Record; export declare function isCliJsonError(value: Record): value is CliJsonError & Record; export declare function unwrapCliJsonData>(body: Record | null): T | null; export declare function buildCliErrorResponse(err: unknown, opts?: { command?: string; }): Promise; export declare function reportCliError(err: unknown, opts?: ReportCliErrorOptions): Promise; export declare function writeBatchJsonResponse(command: string, outputDir: string, results: BatchFileResult[]): void; export declare function argvHasJsonFlag(argv: string[]): boolean;