/** * Server-side protocol errors (SPEC.md §10). * * Every request-level failure raised by the server core is a `SyncError` * carrying the fixed catalog metadata of §10.2 (`category`, `retryable`, * `recommendedAction`) plus an HTTP status for transport adapters. The * catalog is closed: creating a `SyncError` with an unknown code throws. */ export interface ErrorCatalogEntry { readonly category: string; readonly retryable: boolean; readonly recommendedAction: string; readonly httpStatus: number; } /** The §10.2 wire catalog, keyed by stable code. */ export declare const ERROR_CATALOG: Readonly>; export declare class SyncError extends Error { readonly name = "SyncError"; readonly code: string; readonly category: string; readonly retryable: boolean; readonly recommendedAction: string; readonly httpStatus: number; readonly details?: string; constructor(code: string, message?: string, details?: string); } export declare function syncError(code: string, message?: string, details?: string): SyncError; /** The §10.1 JSON error shape, for HTTP-level error bodies (§1.1). */ export declare function errorBody(error: SyncError): { code: string; category: string; retryable: boolean; recommendedAction: string; message: string; details?: unknown; };