import type * as smoltalk from "smoltalk";
export type CompactionConfig = {
    trigger: "token" | "messages";
    threshold: number;
};
export declare function shouldCompact(messages: smoltalk.Message[], config: CompactionConfig): boolean;
/**
 * Find a safe split point that respects message boundaries.
 *
 * Per resolved decision #5: walk forward from the midpoint until the
 * boundary message is a `user` message — so we never split between an
 * `assistant` with `tool_calls` and its corresponding `tool` replies.
 *
 * Returns the index of the message that should be the FIRST kept message
 * (i.e., everything before this index is compacted).
 *
 * Returns -1 if no clean boundary exists (caller should skip compacting).
 */
export declare function findCompactionSplitPoint(messages: smoltalk.Message[]): number;
export declare function buildCompactionPrompt(messages: smoltalk.Message[]): string;
export declare function buildMergeSummaryPrompt(existingSummary: string, newSummary: string): string;
