Versions in this module Expand all Collapse all v0 v0.3.0 May 26, 2026 v0.2.1 May 26, 2026 Changes in this version + func ExtractPattern(errorMsg string) string + func FormatError(enriched *EnrichedError) string + func NormalizeError(msg string) string + type EnrichedError struct + Examples []string + Explanation string + Original string + Recoverable bool + Severity string + Suggestions []string + Title string + type ErrorContext struct + Patterns map[string]*ErrorHelp + func NewErrorContext() *ErrorContext + func (ec *ErrorContext) AddPattern(pattern string, help ErrorHelp) error + func (ec *ErrorContext) Enrich(err string) *EnrichedError + func (ec *ErrorContext) IsRecoverable(err string) bool + func (ec *ErrorContext) SuggestFix(err string) string + type ErrorGroup struct + Count int + FirstSeen time.Time + ID string + Instances []ErrorInstance + LastSeen time.Time + Pattern string + Resolution string + Status string + type ErrorGrouper struct + Groups map[string]*ErrorGroup + func NewErrorGrouper() *ErrorGrouper + func (eg *ErrorGrouper) Add(errorMsg, file string, line int, context string) *ErrorGroup + func (eg *ErrorGrouper) FindGroup(errorMsg string) *ErrorGroup + func (eg *ErrorGrouper) FormatGroups() string + func (eg *ErrorGrouper) GetActive() []*ErrorGroup + func (eg *ErrorGrouper) GetResolution(errorMsg string) string + func (eg *ErrorGrouper) IsKnown(errorMsg string) bool + func (eg *ErrorGrouper) MarkResolved(groupID, resolution string) + func (eg *ErrorGrouper) Prune(maxAge time.Duration) + type ErrorHelp struct + AutoFix string + DocURL string + Examples []string + Explanation string + Pattern *regexp.Regexp + Suggestions []string + Title string + type ErrorInstance struct + Context string + File string + Line int + Message string + Timestamp time.Time + type ErrorLearner struct + Patterns map[string]*LearnedPattern + func NewErrorLearner() *ErrorLearner + func (el *ErrorLearner) BuildFixSuggestion(errorMsg string) string + func (el *ErrorLearner) Export() ([]byte, error) + func (el *ErrorLearner) Import(data []byte) error + func (el *ErrorLearner) Learn(errorMsg, fix, language, category string) + func (el *ErrorLearner) MatchLearned(errorMsg string) []*LearnedPattern + func (el *ErrorLearner) PruneWeak(minConfidence float64) + func (el *ErrorLearner) RecordFailure(patternID string) + func (el *ErrorLearner) RecordSuccess(patternID string) + func (el *ErrorLearner) Stats() ErrorLearnerStats + type ErrorLearnerStats struct + AvgConfidence float64 + ByCategory map[string]int + ByLanguage map[string]int + TotalPatterns int + type ErrorPattern struct + HitCount int + LastSeen time.Time + Resolution string + RootCause string + Trigger string + type ErrorPatternDB struct + func NewErrorPatternDB() *ErrorPatternDB + func (db *ErrorPatternDB) FormatHints(errorMsg string) string + func (db *ErrorPatternDB) Match(errorMsg string) []ErrorPattern + func (db *ErrorPatternDB) Record(trigger, rootCause, resolution string) + type ErrorRecovery struct + History []RecoveryAttempt + MaxAttempts int + Strategies map[string]*RecoveryStrategy + func NewErrorRecovery() *ErrorRecovery + func (er *ErrorRecovery) BuildRecoveryPrompt(result *RecoveryResult) string + func (er *ErrorRecovery) FormatHistory(limit int) string + func (er *ErrorRecovery) Recover(err error, ctx *RecoveryContext) (*RecoveryResult, error) + func (er *ErrorRecovery) RegisterStrategy(strategy *RecoveryStrategy) + func (er *ErrorRecovery) ShouldRetry(err error) bool + func (er *ErrorRecovery) SuccessRate() float64 + type LearnedPattern struct + Category string + Confidence float64 + Example string + FailureCount int + Fix string + FixTemplate string + ID string + Language string + LastSeen time.Time + Pattern string + SuccessCount int + type RecoveryAttempt struct + Duration time.Duration + Error string + Recovered bool + Strategy string + Timestamp time.Time + type RecoveryContext struct + Attempt int + Error error + ErrorMsg string + FilesModified []string + LastArgs map[string]interface{} + LastToolCall string + Messages []string + type RecoveryResult struct + Action string + Message string + Recovered bool + RetryWith string + type RecoveryStrategy struct + ErrorPattern *regexp.Regexp + FailureCount int + Name string + Priority int + RecoverFn func(err error, context *RecoveryContext) (*RecoveryResult, error) + SuccessCount int