import { type CandidateFetch, type CandidateTransportAuthorization } from "./candidate-uploader.js"; import { type DeltaDrainResult } from "./delta-client.js"; import { DurableApplyEngine } from "./durable-apply.js"; type SnapshotSource = { kind: "regular" | "symlink"; mode: number; }; export interface SnapshotDescriptor { descriptorId: string; projectionDigest: `sha256:${string}`; checksum: `sha256:${string}`; barrier: { epoch: string; sequence: string; }; /** Recipient-bound opaque cursor minted at this descriptor's barrier H. */ cursor: string; url: string; expiresAt: string; versionId: string; } export interface SnapshotManifestEntry { canonicalPath: string; headState: "present" | "deleted"; versionId: string | null; /** Server-authorized exact-version content identity; never an S3 coordinate. */ deltaId: string; source?: SnapshotSource; sha256?: `sha256:${string}`; size?: number; } interface PersistedDescriptor { descriptorId: string; projectionDigest: `sha256:${string}`; checksum: `sha256:${string}`; barrier: { epoch: string; sequence: string; }; cursor: string; versionId: string; resetId: string | null; } export interface SnapshotState { descriptor: PersistedDescriptor | null; manifestApplied: boolean; resetAcknowledged: boolean; } export interface SnapshotClientOptions { apiUrl: string; stateRootDir: string; scopeId: string; fetchImpl?: CandidateFetch; now?: () => number; authorizationTimeoutMs?: number; } export interface SnapshotReconcileRequest { authorization: CandidateTransportAuthorization; scopeHandle: string; scopeRevision: string; descriptorId: string; /** Required for reset-required; omit only for a bootstrap snapshot. */ resetId?: string; durableApply: DurableApplyEngine; deltaLimit?: number; } export interface SnapshotReconcileResult { descriptorId: string; cursor: string; manifestEntries: number; resetAcknowledged: boolean; postSnapshotDrain: DeltaDrainResult; } export declare class SnapshotClientError extends Error { constructor(message: string, options?: ErrorOptions); } export declare class SnapshotClient { private readonly apiUrl; private readonly scopeId; private readonly fetchImpl; private readonly now; private readonly timeoutMs; private readonly store; private readonly content; private readonly delta; constructor(options: SnapshotClientOptions); getState(): SnapshotState; reconcile(request: SnapshotReconcileRequest): Promise; private fetchDescriptor; private fetchManifest; private fetchContent; private fetchDeltaContent; private acknowledgeReset; private controlRequest; private request; } export {}; //# sourceMappingURL=snapshot-client.d.ts.map