export interface StatusEnvelope { status: 'executed' | 'error' | 'unavailable' | 'queued'; /** True when the call was carried out. Authoritative — payloads cannot overwrite it. */ ok?: boolean; [key: string]: unknown; } export interface ErrorEnvelope extends StatusEnvelope { status: 'error'; ok: false; error: string; code?: string; } /** * Strip absolute paths out of an error before it goes on the wire. * Preserves URLs, relative paths, and the `.decibel/` portion of a project * path — that part is what makes an error actionable, the prefix is what * leaks a home directory. */ export declare function sanitizeErrorMessage(message: string): string; /** Wrap a successful result. `ok` goes last so the payload cannot overwrite it. */ export declare function wrapSuccess(data: Record): StatusEnvelope; /** Wrap a failure. Both fields are explicit, so both are trustworthy here. */ export declare function wrapError(error: string, code?: string): ErrorEnvelope; /** * The one place that decides whether an envelope represents a failure. * Handles both dialects so a new client can talk to an old runtime. */ export declare function envelopeFailed(envelope: Record): boolean; /** HTTP status code for an envelope. 400 only when the call actually failed. */ export declare function envelopeHttpStatus(envelope: StatusEnvelope): number; //# sourceMappingURL=envelope.d.ts.map