vibesec
Version:
Security scanner for AI-generated code - detects vulnerabilities in vibe-coded projects
47 lines • 1.83 kB
TypeScript
export declare enum ErrorCategory {
PARSE_ERROR = "parse_error",
CONFIG_ERROR = "config_error",
FILE_SYSTEM_ERROR = "file_system_error",
CACHE_ERROR = "cache_error",
DETECTION_ERROR = "detection_error",
VALIDATION_ERROR = "validation_error",
SYSTEM_ERROR = "system_error"
}
export interface ErrorReport {
id: string;
category: ErrorCategory;
message: string;
error: Error;
context?: Record<string, unknown>;
timestamp: string;
stackTrace?: string;
resolved: boolean;
}
export declare class ErrorReporter {
private static instance;
private errors;
private maxErrors;
private errorCount;
private constructor();
static getInstance(): ErrorReporter;
report(category: ErrorCategory, message: string, error: Error, context?: Record<string, unknown>): ErrorReport;
reportParseError(file: string, error: Error, context?: Record<string, unknown>): ErrorReport;
reportConfigError(configPath: string, error: Error, context?: Record<string, unknown>): ErrorReport;
reportFileSystemError(operation: string, path: string, error: Error): ErrorReport;
reportCacheError(operation: string, error: Error, context?: Record<string, unknown>): ErrorReport;
reportDetectionError(ruleId: string, file: string, error: Error, context?: Record<string, unknown>): ErrorReport;
resolve(errorId: string): boolean;
getUnresolvedErrors(): ErrorReport[];
getErrorsByCategory(category: ErrorCategory): ErrorReport[];
getStats(): {
total: number;
unresolved: number;
byCategory: Record<ErrorCategory, number>;
recentErrors: ErrorReport[];
};
export(): string;
getSummary(): string;
clear(): void;
}
export declare const errorReporter: ErrorReporter;
//# sourceMappingURL=error-reporter.d.ts.map