Skip to content
Français

recoverWorkspacePathLock

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

Releases only an explicitly inspected lock after the caller confirms its owner processes have stopped. Never infers authorization from a PID.

Complete example and detailed rules.

  • idRequired
    string
    Stable identifier of this resource, independent of its materialization path.
  • expectedDirectoryRequired
    string
    Inspected canonical directory that must match the exact abandoned lock.
  • optionsRequired
    WorkspacePathRecoveryOptions
    Stopped-process confirmation and inspected revision required to release path ownership.
  • options.processesStoppedRequired
    true
    Explicit assertion that the prior owner and its processes have stopped; never inferred from heartbeat expiry.

Promise<void>

export declare function recoverWorkspacePathLock(
  id: string,
  expectedDirectory: string,
  options: WorkspacePathRecoveryOptions,
): Promise<void>;