/** * Skillsmith Error Code Taxonomy * SMI-583: Structured error handling */ export type ErrorCategory = 'SKILL' | 'SEARCH' | 'CONFIG' | 'NETWORK' | 'VALIDATION' | 'INTERNAL'; export declare const ErrorCodes: { readonly SKILL_NOT_FOUND: "SKILL_NOT_FOUND"; readonly SKILL_INVALID_ID: "SKILL_INVALID_ID"; readonly SKILL_INSTALL_FAILED: "SKILL_INSTALL_FAILED"; readonly SKILL_PARSE_ERROR: "SKILL_PARSE_ERROR"; readonly SEARCH_QUERY_EMPTY: "SEARCH_QUERY_EMPTY"; readonly SEARCH_QUERY_INVALID: "SEARCH_QUERY_INVALID"; readonly SEARCH_INDEX_UNAVAILABLE: "SEARCH_INDEX_UNAVAILABLE"; readonly SEARCH_TIMEOUT: "SEARCH_TIMEOUT"; readonly CONFIG_NOT_FOUND: "CONFIG_NOT_FOUND"; readonly CONFIG_INVALID: "CONFIG_INVALID"; readonly CONFIG_PERMISSION_DENIED: "CONFIG_PERMISSION_DENIED"; readonly NETWORK_UNREACHABLE: "NETWORK_UNREACHABLE"; readonly NETWORK_TIMEOUT: "NETWORK_TIMEOUT"; readonly NETWORK_RATE_LIMITED: "NETWORK_RATE_LIMITED"; readonly NETWORK_QUOTA_EXCEEDED: "NETWORK_QUOTA_EXCEEDED"; readonly NETWORK_INVALID_RESPONSE: "NETWORK_INVALID_RESPONSE"; readonly VALIDATION_REQUIRED_FIELD: "VALIDATION_REQUIRED_FIELD"; readonly VALIDATION_INVALID_TYPE: "VALIDATION_INVALID_TYPE"; readonly VALIDATION_OUT_OF_RANGE: "VALIDATION_OUT_OF_RANGE"; readonly INTERNAL_ERROR: "INTERNAL_ERROR"; readonly INTERNAL_NOT_IMPLEMENTED: "INTERNAL_NOT_IMPLEMENTED"; }; export type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes]; /** * Structured error response format */ export interface ErrorResponse { error: { code: ErrorCode; message: string; suggestion?: string; details?: Record; }; } /** * Error suggestions map for actionable feedback */ export declare const ErrorSuggestions: Partial>; /** * Custom error class for Skillsmith operations */ export declare class SkillsmithError extends Error { readonly code: ErrorCode; readonly suggestion?: string; readonly details?: Record; constructor(code: ErrorCode, message: string, options?: { suggestion?: string; details?: Record; cause?: Error; }); /** * Convert to structured error response */ toResponse(): ErrorResponse; /** * Format for terminal display */ toTerminalString(): string; } /** * Create an error response from an unknown error */ export declare function createErrorResponse(error: unknown): ErrorResponse; /** * Wrap a handler function with error boundary */ export declare function withErrorBoundary Promise>(handler: T, logError?: (error: unknown) => void): T; //# sourceMappingURL=errors.d.ts.map