planRecoveryRestore
Purpose and behavior
Section titled “Purpose and behavior”Check a retained transfer against its repository and return a plan to restore one side into a new directory. It checks a checksum-verified temporary copy of the transfer and creates nothing. Invalid options and failed checks reject with code configuration; a missing transfer, repository or destination parent rejects with code workspace.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”optionsRequiredRecoveryRestoreOptionsRetained transfer source, repository, new destination, selected side and verification byte bound.options.directoryRequiredstringRetained transfer directory, as named by details.recovery of the synchronization error. It must contain state.json and checksums.json.options.repositoryRequiredstringHost Git repository cloned into the destination; it is only read. Partial, shallow or alternates-based repositories fail the Git check.options.destinationRequiredstringNew directory to create. Its parent must exist; the path must not exist and must lie outside the repository, its Git metadata and the transfer.options.sideRequired"previous" | "incoming"previous restores the host worktree as backed up before the transfer, staged index included; incoming restores the sandbox’s commits, uncommitted changes and untracked files.options.maxBytesOptionalnumber | undefinedMaximum transfer bytes copied and hashed, default 1073741824 (1 GiB). Exceeding it rejects with code configuration.observationOptionalObservationHub | undefinedHub that receives the recovery operation restore.plan when it starts, finishes or fails.