import type { Stats } from "node:fs"; import type { StoredReviewNetworkMode } from "./isolation.js"; export interface ImmutableReviewScope { readonly sourceDir: string; readonly prompt: string; readonly model?: string; readonly thinking?: string; readonly piHomeSource?: string; readonly piHomeIncludes?: readonly string[]; readonly allowReadPaths?: readonly string[]; readonly allowWritePaths?: readonly string[]; readonly network: StoredReviewNetworkMode; readonly piVersion: string; readonly extensionDigest?: string; readonly gitTargets?: readonly string[]; } export interface ReviewResumeArchive { readonly token: string; readonly archiveDir: string; readonly attemptsDir: string; readonly activeAttemptDir: string; readonly leaseContents?: string; readonly preacquiredLease?: boolean; } export interface LoadedReviewResumeArchive { readonly archive: ReviewResumeArchive; readonly scope: ImmutableReviewScope; readonly state: string; } export declare const MAX_RESUME_ARCHIVE_BYTES: number; export declare const MAX_RESUME_ARCHIVE_FILES = 10000; export declare const MAX_RESUME_MANIFEST_BYTES: number; export declare const MAX_RETAINED_RESUME_ARCHIVES = 10; export declare const RESUME_RETENTION_MS: number; export declare const RESUME_CLOCK_SKEW_MS: number; export declare const MAX_RESUME_ATTEMPT = 9999; export declare function defaultReviewResumeDirectory(environment?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, home?: string): string; export declare function defaultReviewReportDirectory(environment?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, home?: string): string; export { isTrustedApplicationDataOwner, isTrustedStickyApplicationDataParent, } from "../stable-directory.js"; export declare function prepareDefaultReviewResumeDirectory(options?: { readonly actorVisiblePaths?: readonly string[]; readonly create?: boolean; }, environment?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, home?: string): Promise; export declare function isResumeToken(token: string): boolean; export declare function resumeArchivePath(root: string, token: string): string; export declare function immutableReviewScope(scope: ImmutableReviewScope): Readonly>; export declare function publishReviewResumeArchiveLease(leasePath: string, leaseContents: string, afterPendingWrite?: (pendingPath: string) => Promise): Promise; export declare function restoreDisplacedReviewResumeArchiveLease(displacedLeasePath: string, leasePath: string): Promise; export declare function validatePublishedReviewResumeArchiveLease(archiveDir: string, leaseContents: string, beforeDisplacedRestore?: (displacedLeasePath: string) => Promise): Promise; export declare function reviewResumeArchiveHasLiveLease(archive: ReviewResumeArchive): Promise; export declare function leaseReviewResumeArchive(archive: ReviewResumeArchive): Promise; export declare function releaseLeasedReviewResumeArchive(archive: ReviewResumeArchive): Promise; export declare function pruneInactiveReviewResumeArchive(directory: string): Promise; export declare function pruneReviewResumeArchives(root: string, now?: number, beforeCountPrune?: () => Promise): Promise; export declare function statReviewResumeArchiveCandidate(directory: string): Promise; export declare function createReviewResumeArchive(root: string, scope: ImmutableReviewScope, token?: `${string}-${string}-${string}-${string}-${string}`, actorVisiblePaths?: readonly string[]): Promise; type ValidateReviewReportTarget = (target: string, controllerMutationPaths: readonly string[]) => Promise; type BeforeReviewReportUnlink = (target: string) => Promise; export declare function prepareValidatedDefaultReviewReportPath(validateTarget: ValidateReviewReportTarget, environment?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, home?: string, beforeReportUnlink?: BeforeReviewReportUnlink): Promise; export declare function prepareDefaultReviewReportPath(environment?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, home?: string): Promise; export declare function inspectReviewResumeSessionTree(root: string, maxEntries?: number, maxBytes?: number): Promise<{ sizeBytes: number; fileCount: number; entryCount: number; }>; export declare function inspectReviewResumeArchive(archive: ReviewResumeArchive, committedOnly?: boolean): Promise<{ readonly sizeBytes: number; readonly fileCount: number; readonly entryCount: number; }>; export declare function findReviewResumeSessionFile(attemptDir: string): Promise; export declare function retainReviewResumeArchive(archive: ReviewResumeArchive, failureCode: string, prune?: (root: string) => Promise): Promise<{ sizeBytes: number; fileCount: number; entryCount: number; }>; export declare function rollbackReviewResumeArchiveToPriorAttempt(archive: ReviewResumeArchive, failureCode: string, prune?: (root: string) => Promise): Promise<{ sizeBytes: number; fileCount: number; entryCount: number; }>; export declare function deleteReviewResumeArchive(archive: ReviewResumeArchive): Promise; export declare function copyReviewResumeSession(archive: ReviewResumeArchive, sourceAttemptDir: string, attemptNumber: number): Promise; export declare function loadReviewResumeArchive(root: string, token: string, afterLeaseAcquired?: (archive: ReviewResumeArchive) => Promise): Promise; //# sourceMappingURL=resume-archive.d.ts.map