Skip to content

RepositoryExportOptions

RepositoryExportOptions = object

Options for client.repo.export: what to export (mode, delta base, fence) and how (sync stream or async token flow, resume cursor, abort signal).

readonly optional mode?: (typeof REPOSITORY_EXPORT_MODES)[number]

heads (default) exports current heads; ops exports the operation log.


readonly optional sinceRepoSeq?: number

Delta base. Defaults to 0, a full export.


readonly optional atRepoSeq?: number

Pin the fence. Omit to let the server pin current and echo it back.


readonly optional afterDurableId?: string

Resume cursor. Defaults to the session’s last verified row, and needs a session carrying the opening header: a resumed request gets no header back, so without one there is nothing to check the repository and fence against.


readonly optional prefer?: "sync" | "async"

async asks the server to prepare the export first, then redeems the returned token once it is ready. Defaults to a direct stream.


readonly optional token?: string

Redeem a token from a previous exportPrepare, polling until the prepared export is ready. Use it to download an export a different process, or a different machine, asked for.

Redemption returns a short-lived URL for the whole stored export object, so a token download always reads from the beginning: it cannot be continued with afterDurableId. A broken download restarts on a fresh session, and re-redeeming the token is a free lookup.


readonly optional session?: RepositoryExportSession

Verification state. Pass a session back in to resume a broken stream: the rolling digest continues and the request is pinned to what it reached.


readonly optional pollIntervalMs?: number

How long to wait between redemption polls while an async export is still building. Defaults to one second, and is clamped up to a 50ms floor: the poll re-runs the full authorization gate, so a zero would spin it.


readonly optional signal?: AbortSignal