/** * 24h mode persistence — atomic JSON snapshot under * `.peaks/_runtime//24h-state.json`. * * the caller passes one (the CLI resolves it from `.peaks/_runtime/session.json`). * Writes use the temp-file + rename pattern so a crash mid-write never * leaves a half-written state file (atomic on POSIX, near-atomic on * Windows — same approach used by `session-checkpoint-service.ts`). */ import { type State24hSnapshot } from './state.js'; export declare function emptySnapshot(now?: Date): State24hSnapshot; export declare function read24hState(projectRoot: string, sessionId: string): State24hSnapshot; /** * Atomic write: temp file in the same directory, then rename. The * rename is a single syscall on POSIX and a single MoveFile on * Windows — a crash in between leaves the previous valid snapshot * intact. `fsync` on the temp file is omitted (we accept the * same weaker contract that `session-checkpoint-service.ts` uses) * because the state is reconstructible from the B3 attempt log. */ export declare function write24hState(projectRoot: string, sessionId: string, snapshot: State24hSnapshot): { path: string; }; export declare const STATE_STORE_CONSTANTS: { readonly STATE_FILENAME: "24h-state.json"; };