import type { WorklogPolicy } from './config.js'; export declare const WORKLOG_ARCHIVE_DIR = "WORKLOG.archives"; export interface WorklogInspection { enabled: boolean; bytes: number; overLimit: boolean; } export interface WorklogRotation { rotated: boolean; deferred?: boolean; beforeBytes: number; afterBytes: number; archivePath?: string; } export declare function inspectWorklog(path: string, policy?: WorklogPolicy): WorklogInspection; /** * Keep a bounded set of recent archives beside WORKLOG.md without deleting * history. Older archives move atomically-by-link into WORKLOG.archives/. * The legacy name remains exported for source compatibility. */ export declare function pruneWorklogArchives(path: string, maxArchives: number): void; /** * Conservatively rotate a stable snapshot. A changed size/mtime/inode aborts * before replacement; callers retry at the next fleet-owned lifecycle point. */ export declare function rotateWorklog(path: string, policy?: WorklogPolicy, deps?: { now?: () => Date; beforeCommit?: () => void; /** Deterministic test hook after the full archive is published. */ afterArchiveRename?: () => void; }): WorklogRotation;