/** * Machine-readable error codes surfaced to the MCP client. Deliberately coarse * and free of any spec content or credentials. */ export type ErrorCode = "config_error" | "validation_error" | "auth_error" | "payment_required" | "rate_limited" | "backend_error" | "timeout" | "network_error" | "not_available"; /** * The only error type this server throws outward. Its message is safe to show * an end user: it never contains spec content, API keys, JWTs, or request bodies. */ export declare class SpecShieldError extends Error { readonly code: ErrorCode; readonly status?: number | undefined; constructor(code: ErrorCode, message: string, status?: number | undefined); /** Structured, safe payload for a tool's `isError` result. */ toPayload(): { error: { code: ErrorCode; message: string; status?: number; }; }; } export declare class ConfigError extends SpecShieldError { constructor(message: string); }