/** * Default rotation threshold in bytes. ~4.6 bytes/token observed, so ~3 MB is * roughly 650K tokens — comfortably below the 1,000,000-token upstream cap, * leaving many cycles of headroom before a session could actually wedge. * Override with BRAIN_SESSION_MAX_BYTES. */ export declare const DEFAULT_SESSION_MAX_BYTES = 3000000; /** * Return the byte size of a session's transcript, or 0 if it can't be found. * * Transcripts live at `//.jsonl`. Rather than * reconstruct , we scan the (small) set of project dirs for the * uniquely-named `.jsonl`. */ export declare function sessionTranscriptBytes(sessionId: string): number; /** * If the resumable session for `conversationKey` has a transcript larger than * the configured threshold, clear it so the next run starts fresh. No-op when * there is no session or it is still within budget. * * Intended for scheduled/unattended tasks only — callers should not invoke this * for interactive conversations, where session continuity is desired. * * @returns true if a session was rotated (cleared), false otherwise. */ export declare function rotateSessionIfOversized(conversationKey: string, maxBytes?: number): boolean;