import { SessionManager } from "@mariozechner/pi-coding-agent"; import type { SessionCompactionCheckpoint, SessionCompactionCheckpointReason, SessionEntry } from "../config/sessions.js"; import type { OpenClawConfig } from "../config/types.openclaw.js"; export declare const MAX_COMPACTION_CHECKPOINT_SNAPSHOT_BYTES: number; export type CapturedCompactionCheckpointSnapshot = { sessionId: string; sessionFile: string; leafId: string; }; type ForkedCompactionCheckpointTranscript = { sessionId: string; sessionFile: string; }; export declare function resolveSessionCompactionCheckpointReason(params: { trigger?: "budget" | "overflow" | "manual"; timedOut?: boolean; }): SessionCompactionCheckpointReason; export declare function readSessionLeafIdFromTranscriptAsync(sessionFile: string, maxBytes?: number): Promise; export declare function forkCompactionCheckpointTranscriptAsync(params: { sourceFile: string; targetCwd?: string; sessionDir?: string; }): Promise; /** * Capture a bounded pre-compaction transcript snapshot without blocking the * Gateway event loop on synchronous file reads/copies. */ export declare function captureCompactionCheckpointSnapshotAsync(params: { sessionManager?: Pick; sessionFile: string; maxBytes?: number; }): Promise; export declare function cleanupCompactionCheckpointSnapshot(snapshot: CapturedCompactionCheckpointSnapshot | null | undefined): Promise; export declare function persistSessionCompactionCheckpoint(params: { cfg: OpenClawConfig; sessionKey: string; sessionId: string; reason: SessionCompactionCheckpointReason; snapshot: CapturedCompactionCheckpointSnapshot; summary?: string; firstKeptEntryId?: string; tokensBefore?: number; tokensAfter?: number; postSessionFile?: string; postLeafId?: string; postEntryId?: string; createdAt?: number; }): Promise; export declare function listSessionCompactionCheckpoints(entry: Pick | undefined): SessionCompactionCheckpoint[]; export declare function getSessionCompactionCheckpoint(params: { entry: Pick | undefined; checkpointId: string; }): SessionCompactionCheckpoint | undefined; export {};