export declare class AIServiceError extends Error {
    readonly service?: string;
    constructor(message: string, service?: string);
}
export declare class GitError extends Error {
    constructor(message: string);
}
export declare class FileError extends Error {
    constructor(message: string);
}
/**
 * 日志级别
 */
export declare enum LogLevel {
    DEBUG = 0,
    INFO = 1,
    WARN = 2,
    ERROR = 3
}
/**
 * 简单的日志记录器
 */
export declare class Logger {
    private logLevel;
    private logFile?;
    constructor(level?: LogLevel, logFile?: string);
    /**
     * 记录调试信息
     */
    debug(message: string, context?: Record<string, any>): void;
    /**
     * 记录信息
     */
    info(message: string, context?: Record<string, any>): void;
    /**
     * 记录警告
     */
    warn(message: string, context?: Record<string, any>): void;
    /**
     * 记录错误
     */
    error(message: string, error?: Error, context?: Record<string, any>): void;
    /**
     * 核心日志记录方法
     */
    private log;
    /**
     * 获取日志文件路径
     */
    getLogFile(): string | undefined;
    /**
     * 设置日志级别
     */
    setLevel(level: LogLevel): void;
}
export declare const logger: Logger;
/**
 * 错误处理工具类
 */
export declare class ErrorHandler {
    private logger;
    constructor(logger: Logger);
    /**
     * 处理并格式化错误
     */
    handleError(error: unknown, context?: string): Error;
    /**
     * 包装异步函数，自动处理错误
     */
    wrapAsync<T extends any[], R>(fn: (...args: T) => Promise<R>, context?: string): (...args: T) => Promise<R>;
    /**
     * 创建用户友好的错误消息
     */
    createUserFriendlyError(error: Error, suggestions?: string[]): {
        error: string;
        error_code: string;
        suggestions: string[];
    };
}
export declare const errorHandler: ErrorHandler;
//# sourceMappingURL=logger.d.ts.map