UNPKG

packfs-core

Version:

Semantic filesystem operations for LLM agent frameworks with natural language understanding. See LLM_AGENT_GUIDE.md for copy-paste examples.

48 lines 1.67 kB
/** * Error recovery suggestion system for semantic filesystem operations * Provides intelligent suggestions when operations fail */ export interface ErrorSuggestion { type: 'directory_listing' | 'similar_files' | 'parent_directory' | 'alternative_path' | 'search_results'; description: string; data: any; confidence: number; } export interface ErrorRecoveryContext { operation: string; requestedPath?: string; searchQuery?: string; error: string; suggestions: ErrorSuggestion[]; } export declare class ErrorRecoveryEngine { private readonly basePath; private readonly maxSuggestions; constructor(basePath: string); /** * Generate suggestions for file not found errors */ suggestForFileNotFound(requestedPath: string): Promise<ErrorSuggestion[]>; /** * Generate suggestions for directory not found errors */ suggestForDirectoryNotFound(requestedPath: string): Promise<ErrorSuggestion[]>; /** * Generate suggestions for search operations that found no results */ suggestForEmptySearchResults(query: string, searchType: 'content' | 'semantic' | 'filename'): Promise<ErrorSuggestion[]>; /** * Format error recovery context into a helpful message */ formatSuggestions(context: ErrorRecoveryContext): string; private pathExists; private listDirectory; private findSimilarFilenames; private searchForFilename; private isExcludedDirectory; private getParentPaths; private generateAlternativePaths; private generateAlternativeSearchTerms; private levenshteinDistance; } //# sourceMappingURL=error-recovery.d.ts.map