Skip to main content
See the snapshot guide for workflows and examples. Use snapshot objects or references on cloud. Local operations also accept a group head, group:member, or artifact path. Use ctx.snapshots.get(name) for a history and ctx.checkpoints.get(id) for one checkpoint. Both collections retain the selected provider. Cloud supports individual disk checkpoints. Spawning from an exact remote checkpoint requires a managed ID. An explicit host-volume path restore selects the contents currently at that path.

Sandbox capture

sandbox.snapshot()

Create a group and its first disk checkpoint with default capture options. Available on Sandbox; an existing group is refused.

sandbox.snapshotWith()

Configure the initial member using SnapshotCaptureOptions. The sandbox receiver fixes the source.
Artifact helpers formerly owned by Snapshot are now accessed through Checkpoint. Existing Checkpoint, builder, archive, ID, and verification type names remain; this public object rename does not rewrite persisted artifact IDs. Retained artifact helpers below also cover supported cloud workflows, where local group operations return unsupported.

Snapshot group methods

Snapshot.open()

Open an existing local history directory, including groups captured or imported outside the default snapshot store. Relative paths are anchored when the call is made, before deferred work; symlinks retain their filesystem meaning. The returned group retains its backend and path for later operations. Missing directories fail without creating a group or falling back to a same-name default-store group. Cloud backends do not support this local-directory operation. Use get (Get in Go) to select a bare group name from the default store.

Snapshot.get()

Open a named local history, including a headless group. Group operations on cloud return unsupported.

Snapshot.list()

List installed groups. Standalone artifacts are not treated as groups.

group.name

Read the retained group name without changing selection.

group.head()

Read the selected checkpoint once. The returned checkpoint retains that identity if head changes later. Returns null after explicit clearing.

group.checkpoints()

List member handles in stable ID order, including when no head is selected.

group.getCheckpoint()

Open one member by group-local name or stable checkpoint ID without changing head.

group.setHead()

Select an existing member by group-local name or stable ID. Selecting the current head reports a no-op.

group.clearHead()

Clear selection while preserving every member. Clearing an already headless group reports a no-op.

group.checkpoint()

Capture the bound sandbox and return the exact checkpoint and this operation’s head outcome. Imported or orphaned groups refuse capture; a same-name replacement sandbox never becomes the source. Uses a generated name and default disk-only capture options.

group.checkpointWith()

Capture the bound sandbox and return the exact checkpoint and this operation’s head outcome. Imported or orphaned groups refuse capture; a same-name replacement sandbox never becomes the source. See capture options. A destination directory is valid only when creating a new group.

group.spawnSandbox()

Select the group head once and retain it throughout destination preparation. A headless group refuses spawning. The same methods on an exact checkpoint retain that checkpoint instead. Full checkpoints resume execution by default; disk checkpoints boot fresh. Destination options cannot change the source selector or backend.

group.spawnSandboxWith()

Configure the destination with the existing RestoreBuilder controls. The callback configures options; it must not call a restore terminal.

group.spawnSandboxWithProgress()

Local-only. Read best-effort events from progress or iterate the returned object. Call awaitSandbox() for authoritative completion; stream exhaustion is not success. cancel() requests cancellation.

group.spawnSandboxWithProgressWith()

The configured progress variant uses the same destination rules. Call awaitSandbox() even when progress is ignored or cancellation was requested.

Snapshot.groupHead()

Deprecated compatibility helper. Prefer opening a group and calling head() or setHead(member); new code should not use a combined selector to mutate selection.

Save an exact checkpoint

The receiver selects one immutable checkpoint. Use the group’s optional head or exact-member lookup first; saving a group’s whole history is not implied. The no-options call writes a compressed .msb archive. saveTo retains its explicit options form for compatibility. See the archive compatibility option below before sending output to an older reader.

Group archive import

Snapshot.load()

Import a batch atomically using default storage and head policy.

Snapshot.loadWith()

Configure dependency lookup, storage and selection with SnapshotLoadOptions.
files is string[]. Returns SnapshotImportResult: snapshot, checkpoints, added, reused, headUpdate, operationId, and warnings. The result contains every unique supplied checkpoint, including bundled dependencies, in stable ID order. added and reused identify what was new versus already installed at publication; archive argument order does not select the head. The head outcome belongs to this operation and does not change when another operation edits the group. Multiple incomparable tips can commit a headless group; explicit head selection refuses ambiguous tips. A successful return confirms publication and catalog completion. Warnings describe deferred cleanup after commit. A structured import error distinguishes no publication, confirmed publication with a later failure, and an unknown outcome needing recovery. Import never binds a group to a source sandbox. See atomic import requirements for filesystem capabilities and maintenance requirements.

Group inspection

group.inspect()

Returns the group’s name, backend path, optional head, member count and optional saved source binding. Head and count come from one protected metadata read. Field names include checkpointCount, source.recordedName, source.currentName, source.databaseUuid, source.sandboxId. The source is absent for an unbound history; otherwise its status is available, missing_sandbox or different_catalog. Saved and current names distinguish renames; identity is the catalog UUID plus sandbox row ID, so deleting and recreating the same name does not rebind the group. Source availability is observed separately from group metadata and is not a guarantee of later capture readiness. Inspection does not change the selected head or create a missing catalog identity. Invalid metadata and database failures remain errors, rather than being reported as unbound. Obtain a member with getCheckpoint for its immutable metadata.

Group verification

group.verify()

await (await Snapshot.get("worker")).verify() checks every pinned member and returns SnapshotGroupVerifyReport: group, state, checkpoints, and payloadHashes. States are complete, incomplete, invalid, or empty; an empty group explicitly means zero checkpoints checked. Each member has id, path, state, report (the existing SnapshotVerifyReport, or null), and specific findings. Shared physical files are hashed once per algorithm; independent copies are checked separately. Headless groups can be verified. To verify only head, obtain the optional checkpoint with head() and call its verify(). Unrecorded checksums produce incomplete coverage. Corruption, missing files, unsupported requirements, and operational failures reject with SnapshotVerificationError, whose report retains all selected members and findings. Errors before a meaningful group report exists retain their ordinary error type. Cancellation does not release reader protection while hashing continues. Selected members remain protected through hashing, including cancellation. Same-group captures, imports and head changes wait until verification finishes. Concurrent older removers must be stopped or upgraded; reads and sandbox execution can continue.

Whole-group removal

group.remove()

Removes the selected history and returns SnapshotRemoveResult with group, removed, headUpdate, and warnings. The member IDs and cleared-head outcome belong to this operation. Empty groups can be removed. Active readers and surviving external dependents refuse removal; there is no force bypass for an entire group. If publication commits but catalog cleanup fails, the call rejects with SnapshotGroupRemovalRecoveryError with result and detail. The attached result means removal already happened. Cleanup warnings after successful catalog reconciliation are returned in the result. An uncertain durability outcome is an error requiring recovery rather than a claimed successful removal. Later listing recovers pending cleanup without deleting a replacement group.

Exact checkpoint removal

These are alternative calls, not successive removals of the same checkpoint. The instance method removes the retained checkpoint identity, refuses a replacement at the same address, and returns CheckpointRemoveResult with id, optional headUpdate, and warnings. The head outcome belongs to this operation; later head edits do not change it. Removing the head selects its surviving same-group parent or clears selection. Removing another member reports an unchanged head. Standalone artifacts have no head outcome. Force permits removal despite indexed children, but never bypasses reader protection. A repeated removal reports a missing checkpoint rather than fabricating another successful result. Backends or native libraries without exact-removal reporting return unsupported instead of falling back to deletion by name. If removal commits but catalog cleanup fails, the call rejects with SnapshotRemovalRecoveryError, with result and detail. Its result is authoritative: removal already happened. Recover the affected storage before retrying cleanup; do not assume an error means the checkpoint still exists.

Group options and results

SnapshotCaptureOptions

options.name()

Set the member name. Omission generates a name.

options.initialCheckpoint()

Alias for name, intended for the first capture.

options.destDir()

Set the parent storage directory for a new group. An append cannot move an existing group.

options.full()

Capture memory and device state as well as disk. The default is disk-only.

options.recordIntegrity()

Record payload integrity checksums. Disabled by default.

options.guestFlush()

Select guest writeback policy. The default is "auto"; see guest writeback.

options.label()

Add a checkpoint label; a later value replaces the same key.

SnapshotLoadOptions

options.base()

Supply an external dependency snapshot or archive.

options.destDir()

Select the parent storage directory. Omission uses default storage.

options.maximumDiskBytes()

Limit total logical file bytes, including metadata, dependencies, and sparse holes. Each declared file disk must also fit. Omit it for no size limit. Legacy LoadOpts accepts the same maximumDiskBytes property.

options.setHead()

Select the unique imported tip even when it is not a fast-forward. Ambiguous tips are refused; default import preserves the automatic head policy.

SnapshotCreateResult

snapshotSnapshot
The newly created group.
checkpointCheckpoint
The exact first checkpoint created by this call.
headUpdateHeadUpdate
Head outcome from this operation; later selection changes do not alter it. See head outcomes.

CheckpointCaptureResult

checkpointCheckpoint
The exact checkpoint created by this append.
headUpdateHeadUpdate
Head outcome from this operation; later selection changes do not alter it. See head outcomes.

SnapshotImportResult

operationIdstring
Identifier of this import attempt.
snapshotSnapshot
The destination group.
checkpointsCheckpoint[]
All unique supplied members, including bundled dependencies, in stable ID order.
addedstring[]
Stable IDs newly installed by this operation.
reusedstring[]
Stable IDs already installed at publication.
headUpdateHeadUpdate
Head outcome from this operation; later selection changes do not alter it. See head outcomes.
warningsstring[]
Cleanup warnings after confirmed publication and catalog completion; empty when none.

HeadUpdate

groupstring
Group name.
previousstring | null
Previous selected member ID; absent when headless.
headstring | null
Resulting selected member ID; absent after clearing or a headless import.
reasonstring
Selection reason: initialized, fast_forwarded, selected, unchanged, diverged, unknown_ancestry, ambiguous_candidates, cleared or parent_selected.
changedboolean
Whether this operation changed the selected head.

Capture recovery

A failed capture can still have published its requested artifact before source recovery failed. SnapshotSourceRecoveryError preserves the source checkpoint recovery locator and, when publication completed, the published artifact’s kind, path, identity, digest and headUpdate. The head outcome belongs to that publication even if another operation changes the group afterward. Archive-only capture and older producers omit it; do not infer it by reading the current head. Inspect those details before retrying or removing the source. The error does not prove that the source is running or safely paused.

Guest writeback

Use .guestFlush("required") on snapshot builders or { guestFlush: "required" } in source.fork, source.forkMany, and source.pause options. The default "auto" flushes live disk-only captures, but adds no optional flush to full captures, forks, or pause. "skip" retains mandatory storage barriers. A paused disk capture needs a matching prior flush; cloud rejects non-Auto policies. See guest flush policy reference.

Checkpoint

A snapshot retains the backend that created or opened it.

Static methods

Checkpoint.builder()

Configure a snapshot. Set the required source with fromSandbox(); see SnapshotBuilder for options.

Parameters

namestring
Member name within its group; generated when omitted.

Returns

Builder for configuring the snapshot.

builder.createArchive()

Capture directly into an archive without installing a local snapshot.

Checkpoint.open()

Open an existing snapshot artifact by group head, group:member, or path. Cheap metadata validation only; it does not read the upper file. Use verify() for content checks.

Parameters

pathOrNamestring
Group head or group:member selector or filesystem path.

Returns

The opened snapshot.

Checkpoint.get()

Look up a snapshot through the active backend and return a lightweight Checkpoint.

Parameters

nameOrDigeststring
Public identifier understood by the active backend, such as a local name/digest or cloud snapshot ID.

Returns

Operational snapshot with metadata loaded on demand.

Checkpoint.list()

List snapshots visible through the active backend. Cloud lists managed snapshots; host-volume artifacts are opened explicitly by reference.

Returns

All indexed snapshot resources.

Checkpoint.listDir()

Walk a local directory and parse each subdirectory’s manifest. Does not touch the local index, which makes it useful for inspecting external snapshot collections that were never loaded. Skips entries that don’t look like snapshot artifacts. Cloud returns UnsupportedError.

Parameters

dirstring
Directory to scan for artifact subdirectories.

Returns

Parsed snapshots found in the directory.

Checkpoint.remove()

Remove a snapshot by group selector, unambiguous ID or digest, or path. Refuses if the snapshot has indexed children unless force is set. A group’s head cannot be removed while other members remain, even with force; select another head first.

Parameters

pathOrNamestring
Group head, group:member, unambiguous snapshot ID or digest, or artifact path.
opts.forceboolean
Remove even if the snapshot has indexed children. Defaults to false.

Checkpoint.reindex()

Walk a local snapshots directory (default: the configured snapshots dir) and rebuild the local index. Returns the number of artifacts indexed. Cloud returns UnsupportedError.

Parameters

dirstring
Directory to scan. Defaults to the configured snapshots dir.

Returns

Promise<number>
Count of artifacts indexed.

Checkpoint.save()

staticasync
Bundle a snapshot into a .msb archive. The recorded manifest is archived as-is, so create the snapshot with recordIntegrity() if receivers must verify content. See SaveOpts for bundling options.

Parameters

nameOrPathstring
Group head, group:member, or artifact path to bundle.
outstring
Output archive path.
Bundling options. All fields default to false.

Checkpoint.load()

staticasync
Unpack a snapshot archive (.msb or .tar) into the snapshots directory. Structural and archive-entry checks run during import; recorded payload integrity is preserved for explicit verify(). Compression is detected from magic bytes.

Parameters

archivestring
Path to the archive to unpack.
deststring
Destination directory. Defaults to the snapshots directory.

Returns

Handle to the loaded snapshot.

Checkpoint.loadWithOptions()

Import an archive with an explicit dependency base or destination group. See import options.

Checkpoint.loadMany()

Import archives as one batch. Returns handles in input order. Dependencies resolve from the batch, the named group, or an explicit base; input order does not matter. All members are validated before publication.

Checkpoint.groupHead()

Read the selected ID from a local group, or explicitly set it to an installed member’s stable ID. A headless group returns an absent ID. A missing group or qualified group name raises an error. The write returns the previous and current IDs, reason and change flag. See group selection.

Import options

Options for LoadOpts. With divergent tips, the existing head stays selected; a new group has no head. Select a member explicitly. Identical members may be reused; conflicting identities fail. See archive imports.

Sandbox

handle.checkpoint()

Checkpoint this sandbox into its default group with the given member name. Called on a Sandbox. Local live disk captures preserve the source’s running or paused state. Cloud requires a stopped persistent source. Use the returned artifact path or sandbox:member to open it later.

Parameters

namestring
Member name within the source sandbox’s group.

Returns

The created snapshot artifact.

Checkpoint instance members

snap.state()

Fetch a fresh descriptor and project its file or checkpoint state. Lookup and list results support this method directly.

snap.manifest()

Fetch the full normalized descriptor as a detached observation. This checks the captured identity and fails for missing or replaced artifacts. state() uses one descriptor observation; neither method silently returns cached data.

snap.id

string Stable opaque snap_... identity, separate from the descriptor digest.

snap.path

string Local artifact directory. Throws UnsupportedError for cloud snapshots; use the snapshot object or its typed reference for backend-neutral operations.

snap.reference

string Stable backend-relative value. Pass the snapshot object to Sandbox.restore(snapshot) to preserve both this value and its reference kind.

snap.referenceKind

"id" \| "path" How the selected backend resolves reference. Most callers can pass the snapshot object directly and never inspect this value.

snap.digest

string Canonical descriptor digest (sha256:hex), separate from the stable snapshot ID.

snap.sizeBytes

bigint \| null Backend-reported stored payload size in bytes, or null when unavailable.

snap.imageRef

string Image reference the snapshot was taken from.

snap.imageManifestDigest()

OCI manifest digest of the pinned image.

snap.format

"raw" \| "qcow2" \| null On-disk format of the upper layer.

snap.scope

SnapshotScope Checkpoint scope: "disk" for a disk-only snapshot or "full" for disk plus VM execution state. See SnapshotScope.

snap.fstype

string \| null Filesystem type inside the upper (e.g. "ext4").

snap.parent

string \| null Manifest digest of the parent snapshot, or null for a root.

snap.createdAt

string RFC 3339 timestamp when the snapshot was created.

snap.labels()

labels(): Promise<ReadonlyArray<readonly [string, string]>> User-supplied labels (sorted by key in canonical form), as [key, value] pairs.

snap.sourceSandbox()

Best-effort source-sandbox name, if recorded. null when the manifest has no source recorded.

snap.saveTo()

Bundle this snapshot into an archive through the backend retained when it was created or opened. This avoids resolving its reference through a possibly different current default backend. Cloud returns UnsupportedError.

snap.copyTo()

Create a new archive from this snapshot’s disk data while replacing its labels and integrity metadata. The source snapshot is unchanged. Cloud returns UnsupportedError when save() is awaited.

snap.verify()

Verify the snapshot’s complete state closure. File state recomputes recorded upper-layer integrity. Checkpoint state validates the complete checkpoint closure and returns its root in report.checkpoint.

Returns

Verification result.

snap.name

string \| null Member name within its group, or null when no alias is recorded.

snap.destroy()

Instance deletion of a remote path-based snapshot returns Unsupported until the provider supports atomic conditional deletion. Explicit path-selected static removal remains available. Managed remote snapshot deletion uses its captured server ID; local deletion retains its identity checks. Force does not bypass this restriction. Remove this installed snapshot copy and its index row using the handle’s stored artifact path. Other groups containing the same snapshot ID or digest remain unchanged. Refuses if the snapshot has indexed children unless force is set.

SnapshotBuilder

Fluent builder for a snapshot, returned by Checkpoint.builder(name). Every setter mutates in place and returns this, so calls chain. The source sandbox is required: call .fromSandbox() before .create().

.fromSandbox()

builder
Set the sandbox to capture. Required; .create() fails without it.

Parameters

sourceSandboxstring
Name of the source sandbox. Local disk capture supports running, paused, stopped, and crashed sources. Cloud requires a stopped persistent source.

.group()

Set the local snapshot group. Defaults to the source sandbox’s name. Direct archive capture does not accept a group.

.destDir()

builder
Create the snapshot group under this parent directory instead of the default snapshots store. Member names are local aliases within the group; stable snapshot IDs identify immutable artifacts.

Parameters

destDirstring
Parent directory to create the artifact in (e.g. a larger volume).

.label()

Add a key=value label to the snapshot manifest. May be called repeatedly.

Parameters

keystring
Label key.
valuestring
Label value.

.force()

Overwrite an existing direct archive output file. Installed group members are immutable, so installed creation rejects this option.

.recordIntegrity()

Compute and record a content-integrity hash of the upper layer at creation time, so the snapshot can be verified later or across a trust boundary.

snapshot.full()

builder
Local-only: capture disk, memory, and execution state. The source must be running or paused and returns to that state after capture.

.guestFlush()

Select the guest writeback policy before capture. Defaults to "auto". See SDK usage.

.create()

Capture the configured snapshot and return the resulting artifact.

Returns

The created snapshot artifact.

SnapshotCopyBuilder

Returned by snapshot.copyTo(). Each setter mutates the builder and returns this.

Forking

Fork a running or paused local sandbox to create a child with copy-on-write memory. The source returns to its previous state, and each child needs an unused name. Sandbox has the same methods. See the forking guide for backend limits and disk bindings.

fork()

Create one child from the current execution state.

forkMany()

Capture once for all names and return outcomes in input order. Each outcome has name and either a started sandbox or an error. Validation or capture errors reject the whole call; a child startup error leaves successful siblings running. Stop successful children when finished.

ForkOptions

recordIntegrity records disk hashes. guestFlush defaults to "auto". Each volumes key is a captured disk’s guest path; its callback configures the replacement mount. Forks cannot add new block devices, and batch children cannot share a writable disk image. See fork disk bindings. branch(), branchMany(), and BranchOutcome remain deprecated aliases.

RestoreBuilder

Restore into a new detached sandbox. Disk boots fresh; full resumes execution. See restore examples and progress.

restore.cowMemory()

Share unchanged full-snapshot memory.

restore.forked()

Deprecated alias for the same CoW memory policy; see migration notes.

restore.diskOnly()

Boot only the saved disk.

restore.snapshotBase()

Supply an archive dependency.

restore.restore()

Return the restored sandbox.

restore.restoreWithProgress()

Return progress events; await awaitSandbox() for the sandbox.

restore.init()

Select guest PID 1 for disk boot using an absolute guest executable path or "auto". Full-memory resume rejects an explicit choice, including "auto"; use diskOnly() for a new boot. Available on group and checkpoint spawn callbacks, including progress variants.

restore.initWith()

Set init arguments and environment using the same builder as ordinary creation. Replaces an earlier init choice. Older native SDKs refuse unsupported explicit init or hostname options before launch.

restore.hostname()

Set a nonempty guest hostname of at most 64 UTF-8 bytes for disk boot. Full-memory resume refuses replacement even when the requested name matches the source. Image, replacement, and automatic startup-command options are not accepted; entrypoint/CMD configure future commands only. Full restore requires matching CPU and memory settings, keeps captured network devices, and cannot apply a new guest security profile. Use disk-only restore to change these. Restore rejects missing external filesystems (and, for full restore, additional disks) by default. Use allowMissingResources() to resume with unavailable devices (full restore records warnings). This is separate from strict/relaxed validation of supplied mappings; inheritance does not waive missing backing. Root and owned storage remain required.

restore.cpus()

CPU count. Full restore must match capture.

restore.memory()

Memory in MiB. Full restore must match capture.

restore.maxCpus()

Set the maximum possible CPU count for a disk boot. Must be positive and at least the requested CPU count. Full-memory resume requires the captured ceiling exactly.

restore.maxMemory()

Set the memory ceiling in MiB for a disk boot. Must be positive and at least the requested memory. Full-memory resume requires the captured ceiling exactly. Omitting either ceiling retains the existing inherited/default choice. An older native SDK that lacks either setter rejects its explicit use before launch.

Destination command defaults

Use workdir, shell, entrypoint, cmd, env and envs to configure new commands in the destination. They work for disk boots and full resumes without changing captured processes or starting a workload during restoration. An explicit empty entrypoint or CMD clears that default; omission keeps existing resolution. Environment defaults combine with per-command overrides through the ordinary SDK rules. Guest working directories must exist. These are explicit destination settings, not automatically saved snapshot configuration. Unsupported native bindings reject new explicit options before dispatch.

restore.label()

Attach a destination sandbox label, replacing an earlier value for the same key. Source snapshot labels remain unchanged.

restore.labels()

Attach multiple destination labels. An older native SDK missing any of these setters rejects explicit use before launch.

restore.networkPolicy()

Replace host traffic filtering; guest DNS and TLS settings stay unchanged.

restore.pullPolicy()

Control retrieval of the snapshot’s recorded image digest. The default if-missing and explicit never can use complete local/archive content offline. always revalidates that exact digest through its registry, even when cached, and fails if the registry cannot provide it. This never follows the original mutable tag or changes the source snapshot. Explicit use requires an updated native binding and is refused before dispatch when unsupported.

restore.proxy()

Select the destination host proxy before disk boot or full-memory resume. This preserves the captured guest interface and does not inject guest trust material. SOCKS5 passwords use destination environment references; resolved passwords are not saved in snapshot configuration. Older native bindings missing this setter reject explicit use before dispatch.

restore.maxConnections()

Concurrent TCP limit; zero means unlimited.

restore.disableNetwork()

Remove the NIC. Rejected for full snapshots that captured one.

restore.security()

Guest security profile. Disk boot only, including an explicit default profile.

restore.maxDuration()

Lifetime and idle limits. Omitted means unlimited; zero expires immediately.

restore.idleTimeout()

Lifetime and idle limits. Omitted means unlimited; zero expires immediately.

restore.guestClock()

Override the saved guest clock policy; omission preserves it, defaulting to sync when absent.

restore.port()

Bind destination TCP or UDP ports.

restore.portBind()

Bind destination TCP or UDP ports.

restore.portUdp()

Bind destination TCP or UDP ports.

restore.portUdpBind()

Bind destination TCP or UDP ports.

restore.vsock()

Bind destination vsock endpoints.

restore.vsockDgram()

Bind destination vsock endpoints.

restore.user()

Default user for new execs.

restore.logLevel()

Host runtime log level.

restore.dangerouslyInheritResources()

Explicitly inherit host resources. Disabled by default.

restore.externalMountPolicy()

Validate supplied filesystem mappings: strict (default) or relaxed. Does not grant access. Omitted controls retain destination defaults. Durations are non-negative finite seconds, rounded up. Network policy accepts NetworkPolicy or NetworkPolicyBuilder. Use v => v.captured() for a private captured volume. Full capture records the source clock policy; current disk capture does not. An explicit sync policy overrides a saved off policy. The same option is available on group and checkpoint spawn, including progress variants. Clock selection controls guest wall-clock synchronization. Unsupported native SDKs or runtimes refuse unsupported explicit selection before launching the destination.

restore.volume()

Map a host volume to a guest path, or use v => v.captured() to select its captured private volume.

restore.allowMissingResources()

Allow unavailable external filesystems or additional disks. Full restore records warnings; root and owned storage remain required. Disabled by default. This does not relax validation of supplied mappings.

Compaction

Compact a local sandbox’s root or owned disks. See compaction for examples and recovery requirements.
disk
Select one owned disk by guest path; / selects the root.
rootDiskOnly
Select only the root. Cannot combine with the disk selector.
layers
Oldest sealed layers to merge, including the base. Minimum two; omit for all. Excludes the writable layer.
dryRun
Preview without changing storage.
Defaults to the root and owned data disks; excludes named/external volumes and directories. Requires a running or fully stopped local sandbox. Fewer than two sealed layers means no change; no eligible disks returns an empty result with zero counts. Results include aggregate counts and per-disk entries keyed by guestPath. materializedBytes counts copied bytes, not reclaimed space. Times are microseconds: per-disk totalUs covers preparation; aggregate totalUs also includes switching; pauseUs measures the shared VM pause.

Types

SaveOpts interface

Bundle options for Checkpoint.save() and instance saveTo() methods. Boolean fields default to false; selective-export fields are omitted by default.
compatibility”current” | “0.7.8”
Defaults to “current”; explicit targets require a native library advertising support
sincestring
Omit disk layers and RAM objects supplied by an exact base; incompatible with lastLayers and withParents.
lastLayersnumber
Include the newest N sealed root-disk layers; owned disks and full execution state remain complete.
withParentsboolean
Walk the parent chain and include each ancestor in the archive.
withImageboolean
Include the OCI image cache so the archive boots offline.
plainTarboolean
Skip zstd compression and write a plain .tar.

SnapshotScope type

Scope of what a snapshot captures: "disk" for filesystem state or "full" for disk plus VM execution state.

SnapshotVerifyReport union

Result of snap.verify(). Checkpoint snapshots add checkpoint: { kind: "verified", root: string }; the existing upper projection stays intact for disk-snapshot compatibility.
digeststring
Checkpoint’s manifest digest.
pathstring
Artifact directory path.
coverageSnapshotVerifyCoverage
complete, incomplete with unrecorded paths, or unknown on older native libraries.
upper.kind”notRecorded” | “verified”
Whether an integrity hash was recorded and checked.
upper.algorithmstring
Hash algorithm (“verified” only).
checkpoint{ kind: “verified”; root: string }
Verified checkpoint closure identity when state is full.
upper.digeststring
Recomputed upper-layer digest (“verified” only).