erosolar-cli
Version:
Unified AI agent framework for the command line - Multi-provider support with schema-driven tools, code intelligence, and transparent reasoning
70 lines • 1.99 kB
TypeScript
/**
* AI-Powered Error Analysis and Auto-Fix System
*/
export declare enum ErrorType {
BUILD_ERROR = "build_error",
TEST_FAILURE = "test_failure",
TYPE_ERROR = "type_error",
LINT_ERROR = "lint_error",
IMPORT_ERROR = "import_error",
SYNTAX_ERROR = "syntax_error",
FILE_NOT_FOUND = "file_not_found",
PERMISSION_ERROR = "permission_error",
EDIT_CONFLICT = "edit_conflict",
NEWLINE_IN_STRING = "newline_in_string",
UNKNOWN = "unknown"
}
export interface ErrorLocation {
filePath: string;
lineNumber?: number;
column?: number;
}
export interface ErrorFix {
description: string;
filePath: string;
oldContent: string;
newContent: string;
confidence: number;
autoApplicable: boolean;
requiresConfirmation: boolean;
}
export interface ParsedError {
errorType: ErrorType;
message: string;
rawOutput: string;
locations: ErrorLocation[];
suggestedFixes: ErrorFix[];
relatedErrors: string[];
metadata: Record<string, unknown>;
}
export interface TestSummary {
passed: number;
failed: number;
skipped: number;
total: number;
}
export declare class AIErrorFixer {
private readonly workingDir;
constructor(options?: {
workingDir?: string;
});
analyzeOutput(output: string, command?: string): ParsedError[];
parseTestSummary(output: string): TestSummary;
getFixSuggestions(errors: ParsedError[]): string;
formatForAI(errors: ParsedError[]): string;
private detectOutputType;
private parseTypeScriptErrors;
private parseNpmErrors;
private parseTestErrors;
private parseEditErrors;
private parseGenericErrors;
private generateFixes;
private generateTypeScriptFixes;
private generateImportFixes;
private generateNewlineFixes;
private generateEditConflictFixes;
}
export declare function createErrorFixer(options?: {
workingDir?: string;
}): AIErrorFixer;
//# sourceMappingURL=aiErrorFixer.d.ts.map