/** * Type for SyncError details with specific fields for different error contexts */ interface SyncErrorDetails { project?: string; action?: string; path?: string; } /** * Custom error class for sync-rules operations with built-in details support. */ export declare class SyncError extends Error { readonly details: SyncErrorDetails; constructor(message: string, details?: SyncErrorDetails, cause?: Error); } /** * Error thrown when config file is not found. */ export declare class ConfigNotFoundError extends Error { readonly path: string; readonly isDefault: boolean; constructor(path: string, isDefault?: boolean); } /** * Error thrown when config file cannot be accessed (permissions, not a file, etc.) */ export declare class ConfigAccessError extends Error { readonly path: string; readonly originalError?: Error; constructor(path: string, originalError?: Error); } /** * Error thrown when config file cannot be parsed or is invalid. */ export declare class ConfigParseError extends Error { readonly path: string; readonly originalError?: Error; constructor(path: string, originalError?: Error); } /** * Error thrown when a subprocess spawn fails. */ export declare class SpawnError extends Error { readonly command: string; readonly exitCode?: number; readonly code?: string; readonly signal?: string; constructor(command: string, code?: string, exitCode?: number, signal?: string, cause?: Error); /** * Builds the appropriate error message based on the error conditions. * Centralizes all spawn error message strings in one place. */ static buildMessage(command: string, code?: string, exitCode?: number, signal?: string): string; } /** * Ensures that an unknown caught value is an Error object. * @param error - The unknown value to ensure is an Error */ export declare function ensureError(error: unknown): Error; /** * Type guard to safely check if an error is a Node.js ErrnoException * @param error - The error to check */ export declare function isNodeError(error: unknown): error is NodeJS.ErrnoException; export {};