/**
 * Pre-run prune of empty assistant entries from a session JSONL file.
 *
 * When a stream fails before any content arrives, pi-coding-agent persists
 * an assistant message with an empty content array.  If this repeats (e.g. a
 * misconfigured provider fails on every retry), the session ends up with
 * hundreds of consecutive empty assistant entries.  vLLM and other strict
 * providers then reject the request with a role-ordering error — once the
 * session is in that state, every future turn fails until the user runs /new.
 *
 * This helper runs before SessionManager opens the file, reads the JSONL
 * line-by-line, filters out any line whose `message` is an empty-content
 * assistant, and rewrites the file atomically if anything was dropped.  The
 * in-memory SessionManager state and the on-disk file stay consistent.
 *
 * The append guard in {@link ./session-tool-result-guard.ts} prevents new
 * empty entries from being written; this helper retroactively cleans files
 * that were poisoned before the guard existed.
 *
 * @module
 */
export interface PruneReport {
    /** Whether the file was rewritten. */
    rewrote: boolean;
    /** Count of empty assistant entries removed (0 if file was clean). */
    pruned: number;
    /** Count of JSONL lines that failed to parse (preserved as-is). */
    unparsable: number;
}
/**
 * Remove empty assistant JSONL entries from the session file.
 *
 * Parses each line; lines that don't parse are preserved verbatim so we don't
 * lose unknown data.  Only lines that parse into a `{type:"message", message:
 * <empty-assistant>}` entry are dropped.
 */
export declare function pruneEmptyAssistantsFromSessionFile(sessionFile: string): Promise<PruneReport>;
