import type { AutoCompactMode } from '../code/auto-compact-modes.js'; import { type BatchCompactionPoint } from '../code/batch-compaction-point.js'; import type { BatchItem, BatchPhase, BatchProgress } from './batch-progress-types.js'; /** What the caller knows about the advance. */ export interface BatchPhaseAdvanceInput { readonly projectRoot: string; readonly sessionId: string; readonly batchId: string; /** The phase the batch is moving INTO. */ readonly toPhase: BatchPhase; /** The items to record; the record's own items when omitted. */ readonly items?: readonly BatchItem[]; /** The wave plan to record; the record's own when omitted. */ readonly topology?: unknown; /** The auto-compact mode; the project's own profile when omitted. */ readonly mode?: AutoCompactMode; } /** What the advance did. */ export interface BatchPhaseAdvanceResult { /** The record as it was written. */ readonly progress: BatchProgress; /** The compaction point this advance chose. */ readonly compaction: BatchCompactionPoint; /** The notice recorded, when one was. */ readonly boundaryNotice?: string; } /** * Advance the batch's phase, and record the boundary notice when a boundary * was crossed. * * The notice is recorded only when a compaction actually happens: it SAYS * that a compaction is running, so writing it while the window is still at * 40% would be a false fact. * * @param input - The batch, the phase it is moving into, and what to record. */ export declare function advanceBatchPhase(input: BatchPhaseAdvanceInput): BatchPhaseAdvanceResult; /** * The context ratio the compaction point is judged against. * * The probe is the same one every other context read uses; when it cannot * measure, it answers zero, which reads as "there is room" — the same * answer today's conservative fallback gives. */ export declare function readContextRatio(projectRoot: string, sessionId: string): number;