import type { ServerMessage } from "./adapter.js"; export declare function appendMessage(agentDir: string, branch: string, msg: ServerMessage): void; export declare function loadHistory(agentDir: string, branch: string): ServerMessage[]; export declare function deleteHistory(agentDir: string, branch: string): void; /** Count messages for a branch (to decide when to re-summarize) */ export declare function getMessageCount(agentDir: string, branch: string): number; /** Summarize a branch's chat history using a lightweight query() call */ export declare function summarizeHistory(agentDir: string, branch: string): Promise;