/**
 * @module output
 * @description Shared output helper for --json structured output support.
 */
import ora from "ora";
export declare enum ExitCode {
    SUCCESS = 0,
    GENERAL = 1,
    USAGE = 2,
    NOT_FOUND = 3,
    AUTH = 4,
    API_ERROR = 5,
    NETWORK = 6
}
export interface StructuredError {
    success: false;
    error: string;
    message?: string;
    code: string;
    exitCode: ExitCode;
    suggestion?: string;
    retryWith?: string[];
    recoverable?: boolean;
    retryable: boolean;
}
export declare function usageError(msg: string, suggestion?: string): StructuredError;
export declare function authError(envVar: string, provider: string): StructuredError;
export declare function apiError(msg: string, retryable?: boolean): StructuredError;
export declare function notFoundError(path: string): StructuredError;
export declare function networkError(msg: string): StructuredError;
export declare function generalError(msg: string, suggestion?: string): StructuredError;
/** Output structured error then exit */
export declare function exitWithError(err: StructuredError): never;
/** Check if --json flag is active */
export declare function isJsonMode(): boolean;
/** Check if --quiet flag is active */
export declare function isQuietMode(): boolean;
/** Estimated cost ranges by command */
export declare const COST_ESTIMATES: Record<string, {
    min: number;
    max: number;
    unit: string;
}>;
export interface SuccessEnvelopeOptions {
    /** Canonical command name, e.g. "generate image". Matches `vibe schema --list`. */
    command: string;
    /** Domain payload — provider-specific success keys (`provider`, `images`, `outputPath`, etc.). */
    data: Record<string, unknown>;
    /** Wallclock start. Use `Date.now()` at the top of the action handler. */
    startedAt: number;
    /** Actual cost. Omit for free ops (defaults to 0). For dry-run, defaults to COST_ESTIMATES upper bound. */
    costUsd?: number;
    /** Non-fatal signals (provider fallback, deprecated flag, partial cache miss). */
    warnings?: string[];
    /** Pass-through of `--dry-run` flag — surfaces as a top-level `dryRun: true` in the envelope. */
    dryRun?: boolean;
}
/**
 * Emit a canonical success envelope (#33 — 2c). JSON mode prints the
 * envelope; quiet mode prints a single primary value extracted from
 * `data.outputPath ?? data.output ?? data.path ?? data.url ?? data.id`;
 * human mode prints nothing — the caller renders human output itself.
 *
 * Canary scope: `generate image` only in 2c-canary. 2c-sweep migrates
 * the rest. Old `outputResult()` remains for the sweep transition.
 */
export declare function outputSuccess(opts: SuccessEnvelopeOptions): void;
/** Output result - JSON mode outputs JSON, quiet mode outputs primary value only */
export declare function outputResult(result: Record<string, unknown>): void;
/** Wrap console output - suppressed in JSON/quiet mode */
export declare function log(...args: unknown[]): void;
/** Create a spinner that is silent in JSON/quiet mode */
export declare function spinner(text: string): ReturnType<typeof ora>;
/** Suggest next steps - only in human interactive mode */
export declare function suggestNext(tip: string): void;
export declare function emitDeprecationWarning(oldName: string, newName: string, removeIn: string): void;
/** Test-only: reset deduplication memory between cases. */
export declare function _resetDeprecationMemoryForTesting(): void;
/** Output an error - always outputs (JSON mode writes to stdout as JSON) */
export declare function outputError(error: string, details?: Record<string, unknown>): void;
