/** * MCP Server error hierarchy -- zero external imports * * Error codes use the E_MCP_* taxonomy for MCP-server-specific errors. * Protocol errors (E_INVALID_SIGNATURE, etc.) are passed through as nested detail. */ export type McpServerErrorCode = 'E_MCP_KEY_LOAD' | 'E_MCP_POLICY_LOAD' | 'E_MCP_JWKS_LOAD' | 'E_MCP_INPUT_TOO_LARGE' | 'E_MCP_OUTPUT_TOO_LARGE' | 'E_MCP_TOOL_DISABLED' | 'E_MCP_TOOL_TIMEOUT' | 'E_MCP_KEY_RESOLUTION' | 'E_MCP_KID_REQUIRED' | 'E_MCP_JWKS_NO_MATCH' | 'E_MCP_INVALID_INPUT' | 'E_MCP_HANDLER_ERROR' | 'E_MCP_STDOUT_FENCE_VIOLATION' | 'E_MCP_KEY_REQUIRED' | 'E_MCP_ISSUE_FAILED' | 'E_MCP_BUNDLE_FAILED' | 'E_MCP_PATH_TRAVERSAL' | 'E_MCP_BUNDLE_DIR_REQUIRED' | 'E_MCP_CANCELLED'; export declare class McpServerError extends Error { readonly code: McpServerErrorCode; constructor(code: McpServerErrorCode, message: string, options?: ErrorOptions); } export declare class KeyLoadError extends McpServerError { constructor(message: string, options?: ErrorOptions); } export declare class PolicyLoadError extends McpServerError { constructor(message: string, options?: ErrorOptions); } export declare class JwksLoadError extends McpServerError { constructor(message: string, options?: ErrorOptions); } export declare class IssueToolError extends McpServerError { constructor(message: string, options?: ErrorOptions); } export declare class BundleToolError extends McpServerError { constructor(message: string, options?: ErrorOptions); } export declare class PathTraversalError extends McpServerError { constructor(message: string, options?: ErrorOptions); } /** * Strip key-like material from output strings (Trust Gate 1 helper). * * Replaces matches of each pattern with `[REDACTED]`. */ export declare function sanitizeOutput(text: string, sensitivePatterns: RegExp[]): string; //# sourceMappingURL=errors.d.ts.map