Skip to content
Français

restoreFileWorkspace

import { restoreFileWorkspace } from "@elie-laloum/outpost/workspaces";

Restores an inspected settled file resource locally, or a verified portable snapshot with an explicit Transport. Missing or replaced local work is refused.

Complete example and detailed rules.

  • recordRequired
    FileWorkspaceRecord
    Versioned workspace description retaining ownership, settled generation and recovery references.
  • optionsOptional
    RestoreFileWorkspaceOptions | undefined
    Select local or portable restoration and explicit ownership recovery authorizations.
  • options.runtimeOptional
    WorkspaceRuntimeOptions | undefined
    Control directory and logical namespace, separate from the workspace files.
  • options.retentionOptional
    WorkspaceRetention | undefined
    run cleans successful owned work, local retains it, portable additionally requires an explicit Transport and namespace.
  • options.portableOptional
    boolean | undefined
    Restore a verified snapshot into a new owned materialization; mounted sources must remain accessible and unchanged.
  • options.recoverOptional
    { readonly processesStopped: true; readonly expectedRevision?: string; readonly allocationReleased?: true; readonly adoptInterruptedFiles?: boolean; readonly adoptMountedSource?: boolean; } | undefined
    Explicit stopped-process recovery authorization; interrupted replay remains a separate workflow decision.

Promise<FileWorkspace>

export declare function restoreFileWorkspace(
  record: FileWorkspaceRecord,
  options?: RestoreFileWorkspaceOptions,
): Promise<FileWorkspace>;