type Command = 'generate' | 'migrate' | 'status' | 'drift' | 'check' | 'plugin' | 'query'; /** Whether any JSON payload (success or error) has already been written to stdout. */ export declare function hasEmittedJson(): boolean; export declare function printOutput(value: unknown, jsonMode: boolean): void; export declare function emitJson(command: Command, payload: T): void; export interface JsonError { code: string; message: string; hint?: string; } export interface JsonErrorEnvelope { command: string; schemaVersion: number; ok: false; error: JsonError; } export declare function buildJsonErrorEnvelope(command: string, error: JsonError): JsonErrorEnvelope; /** * Emit a stable machine-readable error envelope to stdout for `--json` consumers. * Without this, a thrown error left stdout empty and printed plain text to * stderr, breaking any pipe to `jq` on the first failure. */ export declare function emitJsonError(command: string, error: JsonError): void; export {}; //# sourceMappingURL=json-output.d.ts.map