import type { XyJsonDiagnostic } from './xyReporter.ts';
export interface EnvelopeContext<T = unknown> {
    data?: T;
    errorCount?: number;
    errors?: XyJsonDiagnostic[];
    warningCount?: number;
    warnings?: XyJsonDiagnostic[];
}
export type EnvelopeReturn<T = unknown> = number | {
    envelope?: EnvelopeContext<T>;
    exitCode: number;
};
export declare function runWithEnvelope<T = unknown>(command: string, action: () => Promise<EnvelopeReturn<T>> | EnvelopeReturn<T>): Promise<number>;
export declare function withEnvelope<T = unknown>(command: string, action: () => Promise<EnvelopeReturn<T>> | EnvelopeReturn<T>): Promise<void>;
//# sourceMappingURL=runWithEnvelope.d.ts.map