import { Message } from '../../types/messages.js'; import type { Model } from '../../models/model.js'; export declare const DEFAULT_SUMMARIZATION_PROMPT = "You are a conversation summarizer. Provide a concise summary of the conversation history.\n\nFormat Requirements:\n- You MUST create a structured and concise summary in bullet-point format.\n- You MUST NOT respond conversationally.\n- You MUST NOT address the user directly.\n- You MUST NOT comment on tool availability.\n\nAssumptions:\n- You MUST NOT assume tool executions failed unless otherwise stated.\n\nTask:\nYour task is to create a structured summary document:\n- It MUST contain bullet points with key topics and questions covered\n- It MUST contain bullet points for all significant tools executed and their results\n- It MUST contain bullet points for any code or technical information shared\n- It MUST contain a section of key insights gained\n- It MUST format the summary in the third person\n\nExample format:\n\n## Conversation Summary\n* Topic 1: Key information\n* Topic 2: Key information\n\n## Tools Executed\n* Tool X: Result Y"; /** * Adjust a split point forward to avoid breaking tool use/result pairs. * * Walks the split point forward until the message at that position is neither * an orphaned toolResult nor a toolUse without an immediately following toolResult. * * @throws If no valid split point can be found (walked past all messages) */ export declare function adjustSplitPointForToolPairs(messages: Message[], splitPoint: number): number; /** * Find a valid trim point for truncation starting at `startIndex`. * * A valid trim point must: * 1. Be a user message (required by some models) * 2. Not be an orphaned toolResult * 3. Not be a toolUse unless its toolResult immediately follows * * @returns The valid trim index, or `messages.length` if none found */ export declare function findValidTrimPoint(messages: Message[], startIndex: number): number; /** * Generate a summary of the provided messages by calling the model. * * @returns A user-role message containing the model-generated summary * @throws If the model fails to produce a response */ export declare function generateSummary(messagesToSummarize: Message[], model: Model, systemPrompt?: string): Promise; export type MessageTypeFilter = 'tools' | 'messages' | 'all'; /** * Returns true if the message matches the given type filter. * - 'tools': message contains at least one toolUseBlock or toolResultBlock * - 'messages': message contains no toolUseBlock or toolResultBlock * - 'all': always matches */ export declare function matchesMessageType(message: Message, filter: MessageTypeFilter): boolean; //# sourceMappingURL=context-compression.d.ts.map