Skip to content
Français

recoverFileWorkspace

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

Claims an inspected abandoned file workspace after explicit stopped-process authorization and verified allocation release. File or mounted-source adoption is separate and explicit.

Complete example and detailed rules.

  • recordRequired
    FileWorkspaceRecord
    Versioned workspace description retaining ownership, settled generation and recovery references.
  • optionsRequired
    FileWorkspaceRecoveryOptions
    Inspected revision, stopped-process confirmations and explicit adoption choices for interrupted files or a changed mount.
  • options.expectedRevisionRequired
    string
    Revision obtained by inspection; recovery refuses a changed persisted record.
  • options.processesStoppedRequired
    true
    Explicit assertion that the prior owner and its processes have stopped; never inferred from heartbeat expiry.
  • options.sandboxProviderOptional
    SandboxProvider | undefined
    Execution provider with the required file binding capability; legacy providers remain usable for Git.
  • 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 recoverFileWorkspace(
  record: FileWorkspaceRecord,
  options: FileWorkspaceRecoveryOptions,
): Promise<FileWorkspace>;