import type { AutoSessionSnapshot } from '../../types/index.js';
/** Build the compact markdown block for a checkpoint (max ~300 tokens). */
export declare function buildCheckpointBlock(snapshot: AutoSessionSnapshot): string;
/** Remove old checkpoint sections and prepend the new one to keep the file small. */
export declare function replaceLatestCheckpoint(existing: string, newBlock: string): string;
/**
 * Write a compact checkpoint to `<projectPath>/planu/session-context.md`.
 * Replaces any previous checkpoint section — idempotent.
 * May throw — callers should catch or use maybeWriteCheckpoint.
 */
export declare function writeCheckpoint(projectPath: string, snapshot: AutoSessionSnapshot): Promise<void>;
/**
 * Fire-and-forget helper: records the tool call, then writes a checkpoint if
 * the policy threshold is reached and projectPath is available.
 *
 * Call this from safe-handler.ts after each tool response.
 */
export declare function maybeWriteCheckpoint(toolName: string, success: boolean, projectPath: string | undefined): void;
//# sourceMappingURL=checkpoint-writer.d.ts.map