/** * CLI 统一输出契约(对标 OpenCLI): * 成功 → {"ok":true,"data":...} * 失败 → {"ok":false,"error":{"code","message","hint"?}} * 失败时退出码非 0;人类可读格式在 --json 之外默认打印。 */ export interface CliError { code: string; message: string; hint?: string; } export interface OutputOptions { json?: boolean; /** 人类可读输出(--json 时忽略) */ human?: string | (() => string); } export declare function emitSuccess(data: unknown, opts?: OutputOptions): void; export declare function emitFailure(error: CliError, opts?: OutputOptions): void; /** 表格输出(人类可读) */ export declare function formatTable(rows: Record[], columns?: string[]): string;