import { Message } from './history.js'; /** * A summary of a chunk of conversation messages. */ export interface Summary { id: string; fromIndex: number; toIndex: number; generatedAt: number; content: string; topics: string[]; } /** * The full summary file structure for a thread. */ export interface SummaryFile { threadId: string; lastMessageIndex: number; summaries: Summary[]; sessionSummary?: string; updatedAt: number; } /** * Result from get_summary tool. */ export interface GetSummaryResult { summary: string; coversMessages: { from: number; to: number; }; topics: string[]; generatedAt?: number; } /** * Get the summary file path for a thread. */ export declare function getSummaryPath(threadPath: string): string; /** * Load existing summaries for a thread. */ export declare function loadSummaries(threadPath: string): Promise; /** * Save summaries to file. */ export declare function saveSummaries(summaryFile: SummaryFile, threadPath: string): Promise; /** * Check if summarization should be triggered. */ export declare function shouldSummarize(lastSummaryIndex: number, currentIndex: number, estimatedTokens?: number): boolean; /** * Generate a summary for a chunk of messages using sub_query. */ export declare function generateChunkSummary(messages: Message[], fromIndex: number, toIndex: number, subQueryFn: (prompt: string, context: string) => Promise): Promise; /** * Generate a high-level session summary from multiple chunk summaries. */ export declare function generateSessionSummary(chunks: Summary[], subQueryFn: (prompt: string, context: string) => Promise): Promise; /** * Run summarization for a thread if needed. */ export declare function runSummarization(threadPath: string, messages: Message[], subQueryFn: (prompt: string, context: string) => Promise): Promise; /** * Get summary based on scope. */ export declare function getSummary(threadPath: string, scope?: 'recent' | 'full' | 'range', startIndex?: number, endIndex?: number): Promise; //# sourceMappingURL=summarizer.d.ts.map