/** * 设置全局 pretty 模式 */ export declare function setGlobalPrettyMode(pretty: boolean): void; /** * 获取全局 pretty 模式状态 */ export declare function isGlobalPrettyMode(): boolean; /** * 判断是否应该使用 pretty 模式 * 优先级:命令级别 pretty 选项 > 全局 pretty 选项 */ export declare function isPrettyMode(options?: { pretty?: boolean; }): boolean; /** * 成功响应结构 */ export interface SuccessResponse { success: true; data: T; } /** * 错误响应结构 */ export interface ErrorResponse { success: false; error: { code: string; message: string; [key: string]: any; }; } /** * 输出成功响应 */ export declare function outputSuccess(data: T, options?: { pretty?: boolean; }): void; /** * 输出错误响应并退出。 * * `extra` 字段会浅合并进 `error` 对象——给业务侧失败(如 generation task status=failed) * 透传 task_id / retryable / status 等元数据用,让 Agent 既能从顶层 success:false 立即识别 * 失败、又能拿到结构化字段执行 SKILL.md 里基于 error_code 的分支处理。 * * `code` / `message` 始终覆盖 extra 里的同名字段,防止调用方误传冲突值。 */ export declare function outputError(code: string, message: string, options?: { pretty?: boolean; }, extra?: Record): never; /** * Pretty 模式下的日志函数 */ export declare const prettyLog: { success(message: string): void; error(message: string): void; info(message: string): void; warning(message: string): void; }; //# sourceMappingURL=output.d.ts.map