Skip to content
Français

GitWorkspaceSandboxOptions

import type { GitWorkspaceSandboxOptions } from "@elie-laloum/outpost/workspaces";
  • workspaceSourceRequired
    GitWorkspaceSource
    Declared source for an owned resource; mutually exclusive with borrowing an open workspace.
  • workspaceOptional
    undefined
    Forbidden with workspaceSource; declare Git settings inside the single source instead.
  • repositoryOptional
    undefined
    Forbidden with workspaceSource; declare Git settings inside the single source instead.
  • branchOptional
    undefined
    Forbidden with workspaceSource; declare Git settings inside the single source instead.
  • copiesOptional
    undefined
    Forbidden with workspaceSource; declare Git settings inside the single source instead.
  • guardOptional
    undefined
    Forbidden with workspaceSource; declare Git settings inside the single source instead.
  • signalOptional
    AbortSignal | undefined
    Aborting it cancels sandbox setup: allocation, repository seeding, agent installation and setup hooks. createSandbox() stops watching it once the sandbox is returned.
  • agentOptional
    DispatchAgent | undefined
    Default agent for dispatch(), resume(), fork() and attach() on this sandbox; an operation’s own agent replaces it. On a remote provider with bootstrap on, its first candidate is installed during allocation; attach() rejects a fallback agent on every provider.
  • hooksOptional
    LifecycleHooks | undefined
    Setup commands, each required to exit 0 within its deadlineMs, default 600000 (10 minutes): workspaceReady on the host once a new worktree exists, then hostReady (host, in order) and sandboxReady (sandbox, all at once) concurrently; a nonzero exit fails setup with code process. With a supplied workspace, workspaceReady does not run and hooks given here replace the workspace’s hostReady and sandboxReady. With when: changed(files), checked again before each warm command, dispatch or attachment; successful fingerprints are scoped to this sandbox.
  • storageQuotaOptional
    Omit<StorageReservationOptions, "signal"> | undefined
    Storage admission checked before the workspace opens: reserves reserveBytes and fails with code configuration when usage under .outpost plus active reservations would exceed maxBytes. The reservation is released when the workspace closes.
  • includeUncommittedOptional
    boolean | undefined
    Remote providers only: also send the managed worktree’s uncommitted changes and untracked, non-ignored files, default false. Without it, synchronization fails with code workspace when the sandbox touches one of those files, which includes any copies entry not ignored by a committed .gitignore.
  • sandboxProviderOptional
    SandboxProvider | undefined
    Provider that allocates the environment, default createDockerSandboxProvider(). A remote provider requires a named or integrate branch and defaults branch to integrate.
  • loggingOptional
    Logging | undefined
    Journal of each dispatch on this sandbox, default a local journal under .outpost/storage; stdout prints progress instead, false disables it, and an object sets transporter, verbose and replayable. A dispatch’s own logging replaces it.
  • bootstrapOptional
    boolean | undefined
    Install a built-in CLI agent missing from a remote sandbox, at its pinned version, before its first use; default true. Mounted and host providers never install: the CLI must be in the image or on the host.
  • conversationHomeOptional
    string | undefined
    Host directory used in place of your home directory to store and find captured native conversations. Default: your home directory for Claude and Codex transcripts, the repository for Copilot and Kimi session bundles.
  • recoveryTransportOptional
    Transport | undefined
    Remote providers only: before pulled changes are applied, archive the host backup to this transport as well as to .outpost/recovery. Archives outlive the sandbox.
  • activityTransportOptional
    Transport | undefined
    Transport for this sandbox’s resource activity record, default local storage under .outpost/storage. The record is deleted after a clean close and kept with a failure phase when cleanup fails.
  • observationOptional
    ObservationHub | undefined
    Hub that receives this workspace’s Git, copy, hook, integration and cleanup operations. The caller keeps ownership; the workspace never closes it.
  • limitsOptional
    StageLimits | undefined
    Deadlines in milliseconds for copying, Git preparation, commit collection and integration. Past a deadline the stage fails with code timeout, or conflict for integration. collectMs also bounds each Git command inspecting a diff guard; incomplete inspection fails with code guard.
  • labelOptional
    string | undefined
    Name used in the integrate branch (outpost/<label>-<id>), the worktree directory under .outpost/workspaces and the startup-failure journal; lowercased, other characters replaced by -, cut to 48.
export interface GitWorkspaceSandboxOptions extends Omit<
  SandboxOptions,
  "repository" | "branch" | "copies" | "guard" | "workspace"
> {
  readonly workspaceSource: GitWorkspaceSource;
  readonly workspace?: never;
  readonly repository?: never;
  readonly branch?: never;
  readonly copies?: never;
  readonly guard?: never;
}