import type { AutoCompactMode } from '../code/auto-compact-modes.js'; /** * The red-line sentence. * * It states what the system is doing and what is NOT blocked, so the * reader does not read the red line as a stop. It asks for nothing. */ export declare const BATCH_CONTEXT_RED_LINE_NOTICE = "\u5DF2\u8BF7\u6C42 harness \u538B\u7F29\uFF0C\u7B49\u5F85\u4E2D\uFF1B\u6D3E\u53D1\u672A\u963B\u585E"; /** * The zone sentence for a ratio that has entered the auto-compact zone. * * @param ratio - The context ratio, 0..1. */ export declare function batchContextRatioNotice(ratio: number): string; /** What kind of reminder this is. */ export type BatchReminderKind = 'ratio' | 'phase-boundary' | 'red-line'; /** One reminder: what kind, and the sentence. */ export interface BatchContextReminder { readonly kind: BatchReminderKind; readonly text: string; } /** * Build the reminder for this turn, from the ratio and the phase. * * Pure: the same inputs always give the same sentence, so the wording can * be tested without a filesystem. * * @param input.ratio - The context ratio, 0..1. * @param input.mode - The auto-compact mode; the thresholds come from it. * @param input.atBoundary - Whether the batch is crossing a compaction * boundary right now. * @param input.boundaryNotice - The boundary notice, when the caller has * one. Used verbatim; this module writes no boundary sentence of its own. */ export declare function buildBatchContextReminder(input: { readonly ratio: number; readonly mode: AutoCompactMode; readonly atBoundary: boolean; readonly boundaryNotice?: string; }): BatchContextReminder | null; /** * The reminder this turn, and the record that it was said. * * SIDE EFFECT: the phase the batch was seen in, and the phase it last * said something in, are recorded. That is what makes the rule "once per * phase" enforceable in code rather than left to the caller's discipline — * a reminder on every turn is the noise the design's open question named. * The write happens only when the phase changed or when the batch spoke, * so a steady phase is not written on every turn. * * The phase comes from the batch's progress record, which is the one place * that says which stage the batch is in. * * @param input.atBoundary - Whether the batch is crossing a compaction * boundary right now. When it is not given, the boundary is derived * from the recorded phase: a phase that differs from the one seen last * time IS a crossing. * @returns The reminder, or `null` when there is nothing to say. */ export declare function resolveBatchContextReminder(input: { readonly projectRoot: string; readonly sessionId: string; readonly batchId: string; readonly ratio: number; readonly mode: AutoCompactMode; readonly atBoundary?: boolean; readonly boundaryNotice?: string; }): BatchContextReminder | null; /** * The reminder the PRESENCE read should carry, for the batch in flight. * * The presence read knows the session, not the batch, so the batch in * flight is found among the session's batch records (see * `findActiveBatch`), and the boundary notice is the one the batch * recorded when it last crossed a boundary. * * @returns The reminder, or `null` when no batch is running, or when * there is nothing to say. */ export declare function resolveBatchPresenceReminder(input: { readonly projectRoot: string; readonly sessionId: string; readonly ratio: number; readonly mode: AutoCompactMode; }): BatchContextReminder | null;