/**
 * LAFS-compliant output formatter for CLEO V2.
 *
 * LAFS (LLM-Agent-First Schema) ensures all CLI output is
 * machine-parseable JSON by default, with optional human-readable modes.
 *
 * All envelopes use the canonical CLI envelope shape:
 *   { success, data?, error?, meta, page? }
 *
 * This replaces the three legacy shapes:
 *   {ok, r, _m}            (minimal MVI — removed)
 *   {$schema, _meta, success, result}  (full LAFS — now uses meta/data)
 *   {success, result}      (observe command — now uses data)
 *
 * Types are re-exported from the canonical source in src/types/lafs.ts.
 *
 * @epic T4663
 * @task T4672
 * @task T338 (ADR-039 envelope unification)
 */
import type { LafsEnvelope, LafsError, LafsSuccess } from '@cleocode/contracts';
import type { CliEnvelope, CliEnvelopeError, CliMeta, LAFSPage, Warning } from '@cleocode/lafs';
import { CleoError } from './errors.js';
export type { CliEnvelope, CliEnvelopeError, CliMeta, LafsEnvelope, LafsError, LafsSuccess };
/**
 * Push a deprecation or informational warning into the current envelope.
 * Warnings are drained (consumed) by the next formatSuccess/formatError call.
 *
 * @task T4669
 * @epic T4663
 */
export declare function pushWarning(warning: Warning): void;
/**
 * Options for envelope formatting.
 *
 * @task T4668
 * @task T4670
 * @epic T4663
 */
export interface FormatOptions {
    operation?: string;
    page?: LAFSPage;
    extensions?: Record<string, unknown>;
    /** MVI level to embed in the envelope _meta. Defaults to 'standard'. @task T4957 */
    mvi?: import('@cleocode/lafs').MVILevel;
}
/**
 * Format a successful result as a canonical CLI envelope.
 *
 * Produces the unified `CliEnvelope<T>` shape: `{success, data, meta, page?}`.
 * This replaces all three legacy shapes (minimal `{ok,r,_m}`, full `{$schema,_meta,result}`,
 * and observe `{success,result}`) with a single canonical format (ADR-039).
 *
 * The `mvi` option in `FormatOptions` is accepted for backward compatibility but
 * no longer affects the envelope shape — the canonical shape is always emitted.
 *
 * @param data - The operation result payload.
 * @param message - Optional success message (attached to `meta.message`).
 * @param operationOrOpts - Operation name string or `FormatOptions` object.
 * @returns JSON-serialized `CliEnvelope<T>`.
 *
 * @task T4672
 * @task T4668
 * @task T4670
 * @task T338
 * @epic T4663
 */
export declare function formatSuccess<T>(data: T, message?: string, operationOrOpts?: string | FormatOptions): string;
/**
 * Format an error as a canonical CLI error envelope.
 *
 * Produces `{success: false, error: CliEnvelopeError, meta: CliMeta}`.
 * Every error envelope now always includes `meta` (ADR-039).
 * When operation is omitted, defaults to `'cli.output'`.
 *
 * @param error - The `CleoError` to format.
 * @param operation - Optional dot-delimited operation identifier.
 * @returns JSON-serialized error `CliEnvelope`.
 *
 * @task T4672
 * @task T338
 * @epic T4663
 */
export declare function formatError(error: CleoError, operation?: string): string;
/** Format any result (success or error) as LAFS JSON. */
export declare function formatOutput<T>(result: T | CleoError): string;
//# sourceMappingURL=output.d.ts.map