Skip to content
Français

FileSandbox

import type { FileSandbox } from "@elie-laloum/outpost/core";
  • diagnoseRequired
    (options?: SandboxDiagnosticOptions) => Promise<SandboxDiagnosticReport>
    Inspect the selected execution mode; Git probes run only for Git workspaces.
  • workspaceRequired
    FileWorkspace
    Open workspace borrowed for this operation; its caller remains responsible for closing it.
  • rootRequired
    string
    Execution root inside the borrowed sandbox, distinct from its host control directory.
  • commandRequired
    (command: Command) => Promise<CommandResult>
    Execute the declared command and preserve its actual exit status, cancellation and settled files.
  • dispatchRequired
    <T = undefined>(options: DispatchOptions<T>) => Promise<FileDispatchResult<T>>
    Runs an agent against the current files, preserving the workspace across repairs and steering passes.
  • resumeRequired
    <T = undefined>(id: string, options: DispatchOptions<T>) => Promise<FileDispatchResult<T>>
    Continue a captured conversation in the same retained file workspace without recopying initial inputs.
  • forkRequired
    <T = undefined>(id: string, options: DispatchOptions<T>) => Promise<FileDispatchResult<T>>
    Fork a captured conversation when supported while retaining the current workspace files.
  • attachRequired
    (options?: AttachOptions) => Promise<FileAttachResult>
    Open an interactive terminal only when the adapter explicitly supports this file-workspace variant.
  • 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 FileSandbox {
  diagnose(
    options?: SandboxDiagnosticOptions,
  ): Promise<SandboxDiagnosticReport>;
  readonly workspace: FileWorkspace;
  readonly root: string;
  command(command: Command): Promise<CommandResult>;
  dispatch<T = undefined>(
    options: DispatchOptions<T>,
  ): Promise<FileDispatchResult<T>>;
  resume<T = undefined>(
    id: string,
    options: DispatchOptions<T>,
  ): Promise<FileDispatchResult<T>>;
  fork<T = undefined>(
    id: string,
    options: DispatchOptions<T>,
  ): Promise<FileDispatchResult<T>>;
  attach(options?: AttachOptions): Promise<FileAttachResult>;
  close(options?: { readonly preserve?: boolean }): Promise<Disposal>;
  [Symbol.asyncDispose](): Promise<void>;
}