Skip to content
Français

WorkspaceSession

import type { WorkspaceSession } from "@elie-laloum/outpost/workspaces";
  • idRequired
    string
    Stable identifier of this resource, independent of its materialization path.
  • kindRequired
    "git" | "ephemeral" | "directory"
    Discriminant selecting Git, a directory source or an initially empty workspace.
  • directoryRequired
    string
    Absolute local materialization or source directory; it is not a portable resource identity.
  • runtimeRequired
    WorkspaceRuntime
    Control directory and logical namespace, separate from the workspace files.
  • closeRequired
    (options?: { readonly preserve?: boolean; }) => Promise<Disposal>
    Idempotent closure; preserves recoverable work and never removes a borrowed source.
  • [Symbol.asyncDispose]Required
    () => Promise<void>
    Idempotent closure; preserves recoverable work and never removes a borrowed source.
export interface WorkspaceSession {
  readonly id: string;
  readonly kind: "git" | "directory" | "ephemeral";
  readonly directory: string;
  readonly runtime: WorkspaceRuntime;
  close(options?: { readonly preserve?: boolean }): Promise<Disposal>;
  [Symbol.asyncDispose](): Promise<void>;
}