cortexweaver
Version:
CortexWeaver is a command-line interface (CLI) tool that orchestrates a swarm of specialized AI agents, powered by Claude Code and Gemini CLI, to assist in software development. It transforms a high-level project plan (plan.md) into a series of coordinate
60 lines • 1.93 kB
TypeScript
/**
* Error Recovery Core Module
*
* Contains the main error recovery orchestration logic, circuit breakers, and learning mechanisms
*/
import { CortexError, ErrorRecoveryResult, RetryConfiguration, ErrorLearningData, CircuitBreakerState } from '../types/error-types';
import { CodeSavant } from '../code-savant';
import { CognitiveCanvas } from '../cognitive-canvas';
export declare class ErrorRecoveryCore {
private strategies;
private cognitiveCanvas;
private circuitBreakers;
private learningDatabase;
private activeRecoveries;
private readonly defaultRetryConfig;
constructor(cognitiveCanvas: CognitiveCanvas, codeSavant?: CodeSavant);
/**
* Main error recovery orchestration method
*/
recoverFromError(error: CortexError, operation: () => Promise<any>, config?: Partial<RetryConfiguration>): Promise<ErrorRecoveryResult>;
/**
* Check if circuit breaker is open for error category
*/
private isCircuitBreakerOpen;
/**
* Update circuit breaker state
*/
private updateCircuitBreaker;
/**
* Find similar error learning data
*/
private findSimilarErrorLearning;
/**
* Update learning database with successful recovery
*/
private updateLearningDatabase;
/**
* Generate error pattern for learning
*/
private generateErrorPattern;
/**
* Store recovery pheromone for learning
*/
private storeRecoveryPheromone;
/**
* Check if failure should trigger escalation
*/
private shouldEscalateAfterFailure;
/**
* Get recovery statistics for monitoring
*/
getRecoveryStatistics(): {
totalRecoveries: number;
successRate: number;
averageAttempts: number;
circuitBreakerStates: Map<string, CircuitBreakerState>;
learningDatabase: Map<string, ErrorLearningData>;
};
}
//# sourceMappingURL=core.d.ts.map