claude-historian
Version:
an MCP server for Claude Code conversation history
42 lines • 1.38 kB
TypeScript
import { ClaudeMessage } from './types.js';
interface MessageIndex {
uuid: string;
sessionId: string;
timestamp: string;
type: 'user' | 'assistant' | 'tool_use' | 'tool_result';
contentLength: number;
hasFiles: boolean;
hasTools: boolean;
hasErrors: boolean;
keywords: string[];
projectDir: string;
filename: string;
lineNumber: number;
}
export declare class IntelligentIndexer {
private index;
private fileMetadata;
private keywordMap;
private sessionMap;
buildIndex(projectDirs: string[]): Promise<void>;
private prioritizeFiles;
private estimateMessageCount;
private calculateFilePriority;
private indexFile;
private isValidMessage;
private createMessageIndex;
private extractKeywords;
private detectFileReferences;
private detectToolUsage;
private detectErrors;
private updateMappings;
searchByKeywords(keywords: string[], limit?: number): MessageIndex[];
searchByFilePattern(filePattern: string, limit?: number): MessageIndex[];
searchErrorSolutions(errorPattern: string, limit?: number): MessageIndex[];
getSessionMessages(sessionId: string): MessageIndex[];
private calculateContentRichness;
getStats(): any;
getFullMessage(index: MessageIndex): Promise<ClaudeMessage | null>;
}
export {};
//# sourceMappingURL=indexer.d.ts.map