> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sailresearch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeScript SDK

> TypeScript SDK installation and full reference

The Sail TypeScript SDK (`@sailresearch/sdk` on npm) runs on Node 22+ and Bun.
It shares one engine with the [Python](/reference/python-sdk) and
[Rust](/reference/rust-sdk) SDKs, so behavior matches across languages.

## Install

<CodeGroup>
  ```bash npm theme={null}
  npm install @sailresearch/sdk
  ```

  ```bash pnpm theme={null}
  pnpm add @sailresearch/sdk
  ```

  ```bash bun theme={null}
  bun add @sailresearch/sdk
  ```
</CodeGroup>

Prebuilt native binaries are published per platform (Linux, macOS, Windows) and
selected automatically at install time.

The Sail API warns when your SDK version is nearing the end of its support
window. The SDK prints that warning to stderr once per process. A version past
the end of its support window is rejected with an upgrade error before any
operation runs. Upgrade with `npm install @sailresearch/sdk@latest`.

## Configure

Set `SAIL_API_KEY` in the environment; the SDK also reads the credential
`sail auth login` stores under `~/.sail`. The statics on `Sailbox`, `App`, and
`Volume` use this configuration by default, or construct a `Client` explicitly
with `Client.fromConfig({ apiKey })`. See
[Configuration](/reference/sdk-configuration).

## Quickstart

```ts theme={null}
import { App, Sailbox } from "@sailresearch/sdk";

// Look up (or create) the app your sandboxes belong to.
const app = await App.find("example-app", { mintIfMissing: true });

// Boot a sandbox.
const sb = await Sailbox.create({ app, name: "worker-1" });

// Run a command and stream its output.
const proc = await sb.exec("echo hello && ls /");
for await (const chunk of proc.stdout) process.stdout.write(chunk);
const result = await proc.wait();
console.log("exit code:", result.exitCode);

// Move files.
await sb.fs.write("/tmp/note.txt", "hi\n");
const contents = await sb.fs.read("/tmp/note.txt");

// Expose a port and wait until it is reachable.
await sb.expose(8080, { protocol: "http" });
const listener = await sb.waitForListener(8080);
if (listener.endpoint?.kind === "http") {
  console.log("reachable at:", listener.endpoint.url);
}

// Clean up (see also pause / sleep / resume / checkpoint).
await sb.terminate();
```

## Errors

Every failure the SDK recognizes extends `SailError`, so one
`catch (e) { if (e instanceof SailError) }` handles them; a truly unexpected
native error surfaces unchanged. Subclasses like `NotFoundError` and
`SailboxExecutionError` match specific failures, every error carries an
advisory `retryable` flag, and `isSailError()` is the realm-safe check.
See [Errors](/sailbox-sdk-errors).

## Reference

The docs below are auto-generated.

<div className="reference-fold prose prose-gray dark:prose-invert">
  <a id="sailbox" />

  ## Sailbox

  A sandbox (Sailbox): the primary object agent harnesses work with. Create one
  with [Sailbox.create](#create), run commands with [exec](#exec-1), move files with
  [fs](#fs), expose ports with [expose](#expose), and
  manage its lifecycle. The statics use a default env-configured client unless
  you pass one.

  ### Example

  ```ts theme={null}
  import { App, Sailbox } from "@sailresearch/sdk";

  const app = await App.find("example-app", { mintIfMissing: true });
  const box = await Sailbox.create({ app, name: "worker-1" });
  const proc = await box.exec(["bash", "-lc", "echo hello"]);
  console.log(await proc.stdout.text());
  await box.terminate();
  ```

  ### Accessors

  <a id="appid-1" />

  #### appId

  ##### Get Signature

  > **get** **appId**(): `string` | `undefined`

  Identifier of the owning app.

  ##### Returns

  `string` | `undefined`

  <a id="appname-1" />

  #### appName

  ##### Get Signature

  > **get** **appName**(): `string` | `undefined`

  Name of the owning app.

  ##### Returns

  `string` | `undefined`

  <a id="architecture" />

  #### architecture

  ##### Get Signature

  > **get** **architecture**(): `string` | `undefined`

  CPU architecture (for example `arm64`).

  ##### Returns

  `string` | `undefined`

  <a id="checkpointgeneration" />

  #### checkpointGeneration

  ##### Get Signature

  > **get** **checkpointGeneration**(): `number` | `undefined`

  Checkpoint generation counter as of the snapshot.

  ##### Returns

  `number` | `undefined`

  <a id="client-1" />

  #### client

  ##### Get Signature

  > **get** **client**(): [`Client`](#client)

  The underlying [Client](#client).

  ##### Returns

  [`Client`](#client)

  <a id="cpurequestedvcpu" />

  #### cpuRequestedVcpu

  ##### Get Signature

  > **get** **cpuRequestedVcpu**(): `number` | `undefined`

  Requested CPU, in vCPUs.

  ##### Returns

  `number` | `undefined`

  <a id="cpuusedvcpu" />

  #### cpuUsedVcpu

  ##### Get Signature

  > **get** **cpuUsedVcpu**(): `number` | `undefined`

  Current CPU usage, in vCPUs, as of the snapshot.

  ##### Returns

  `number` | `undefined`

  <a id="createdat-1" />

  #### createdAt

  ##### Get Signature

  > **get** **createdAt**(): `Date` | `undefined`

  When the Sailbox was created.

  ##### Returns

  `Date` | `undefined`

  <a id="createdbyuserid" />

  #### createdByUserId

  ##### Get Signature

  > **get** **createdByUserId**(): `string` | `undefined`

  The user whose credential created this Sailbox (for a fork or restore, the
  user who ran it). `undefined` for service-key creates.

  ##### Returns

  `string` | `undefined`

  <a id="deprecation" />

  #### deprecation

  ##### Get Signature

  > **get** **deprecation**(): `SailboxDeprecation` | `undefined`

  Actionable runtime deprecation notice, when an upgrade is needed.

  ##### Returns

  `SailboxDeprecation` | `undefined`

  <a id="diskrequestedbytes" />

  #### diskRequestedBytes

  ##### Get Signature

  > **get** **diskRequestedBytes**(): `number` | `undefined`

  Requested disk, in bytes.

  ##### Returns

  `number` | `undefined`

  <a id="diskusedbytes" />

  #### diskUsedBytes

  ##### Get Signature

  > **get** **diskUsedBytes**(): `number` | `undefined`

  Current disk usage, in bytes, as of the snapshot.

  ##### Returns

  `number` | `undefined`

  <a id="errormessage" />

  #### errorMessage

  ##### Get Signature

  > **get** **errorMessage**(): `string` | `undefined`

  Failure detail when the status is `failed`.

  ##### Returns

  `string` | `undefined`

  <a id="fs" />

  #### fs

  ##### Get Signature

  > **get** **fs**(): [`SailboxFs`](#sailboxfs-1)

  Filesystem operations on this Sailbox's guest: read and write files
  (buffered or streaming), and directory helpers.

  ##### Returns

  [`SailboxFs`](#sailboxfs-1)

  <a id="guestschemaversion" />

  #### guestSchemaVersion

  ##### Get Signature

  > **get** **guestSchemaVersion**(): `number` | `undefined`

  The Sailbox runtime schema version the Sailbox last booted with.

  ##### Returns

  `number` | `undefined`

  <a id="imageid" />

  #### imageId

  ##### Get Signature

  > **get** **imageId**(): `string` | `undefined`

  Identifier of the image the Sailbox was created from.

  ##### Returns

  `string` | `undefined`

  <a id="lastcheckpointedat" />

  #### lastCheckpointedAt

  ##### Get Signature

  > **get** **lastCheckpointedAt**(): `Date` | `undefined`

  When the most recent checkpoint was taken.

  ##### Returns

  `Date` | `undefined`

  <a id="memorymib" />

  #### memoryMib

  ##### Get Signature

  > **get** **memoryMib**(): `number` | `undefined`

  Configured memory, in MiB.

  ##### Returns

  `number` | `undefined`

  <a id="memoryrequestedbytes" />

  #### memoryRequestedBytes

  ##### Get Signature

  > **get** **memoryRequestedBytes**(): `number` | `undefined`

  Requested memory, in bytes.

  ##### Returns

  `number` | `undefined`

  <a id="memoryusedbytes" />

  #### memoryUsedBytes

  ##### Get Signature

  > **get** **memoryUsedBytes**(): `number` | `undefined`

  Current memory usage, in bytes, as of the snapshot.

  ##### Returns

  `number` | `undefined`

  <a id="name-1" />

  #### name

  ##### Get Signature

  > **get** **name**(): `string`

  The Sailbox name.

  ##### Returns

  `string`

  <a id="sailboxid" />

  #### sailboxId

  ##### Get Signature

  > **get** **sailboxId**(): `string`

  The Sailbox's stable identifier.

  ##### Returns

  `string`

  <a id="startedat" />

  #### startedAt

  ##### Get Signature

  > **get** **startedAt**(): `Date` | `undefined`

  When the Sailbox first started running. A resume does not rewrite it.

  ##### Returns

  `Date` | `undefined`

  <a id="statedisksizegib" />

  #### stateDiskSizeGib

  ##### Get Signature

  > **get** **stateDiskSizeGib**(): `number` | `undefined`

  Configured state-disk size, in GiB.

  ##### Returns

  `number` | `undefined`

  <a id="status-1" />

  #### status

  ##### Get Signature

  > **get** **status**(): [`SailboxStatus`](#sailboxstatus-1)

  The lifecycle status as of the call that produced this handle (updated
  by lifecycle calls on this instance). Use [Sailbox.get](#get) for a fresh
  snapshot.

  ##### Returns

  [`SailboxStatus`](#sailboxstatus-1)

  <a id="updatedat" />

  #### updatedAt

  ##### Get Signature

  > **get** **updatedAt**(): `Date` | `undefined`

  When the Sailbox last changed.

  ##### Returns

  `Date` | `undefined`

  <a id="vcpucount" />

  #### vcpuCount

  ##### Get Signature

  > **get** **vcpuCount**(): `number` | `undefined`

  Configured number of vCPUs.

  ##### Returns

  `number` | `undefined`

  <a id="visibility" />

  #### visibility

  ##### Get Signature

  > **get** **visibility**(): `string` | `undefined`

  `"private"` when access is restricted to the creator; `undefined`/`"org"`
  is the default org-wide access.

  ##### Returns

  `string` | `undefined`

  ### Methods

  <a id="checkpoint" />

  #### checkpoint()

  > **checkpoint**(`options?`): `Promise`\<[`SailboxCheckpoint`](#sailboxcheckpoint-1)>

  Take a checkpoint of this Sailbox. The returned handle carries
  `expiresAt`, after which starting a Sailbox from it fails.

  ##### Parameters

  | Parameter | Type                                      |
  | --------- | ----------------------------------------- |
  | `options` | [`CheckpointOptions`](#checkpointoptions) |

  ##### Returns

  `Promise`\<[`SailboxCheckpoint`](#sailboxcheckpoint-1)>

  <a id="enablessh-1" />

  #### enableSsh()

  > **enableSsh**(`options?`): `Promise`\<[`SshEndpoint`](#sshendpoint) | `null`>

  Enable SSH on this Sailbox: trust the org SSH CA, start `sshd`, and
  expose guest port 22 as TCP once the CA-only daemon owns it. Org members
  connect with a short-lived certificate (fetched by the `sail box ssh`
  CLI); a private Sailbox accepts only its creator's certificates. Safe to
  re-run. With `wait` (the default), polls until the endpoint is reachable
  and returns it, throwing [TimeoutError](#timeouterror) if it is not within
  `timeoutSeconds`; with `wait: false`, skips the probe and resolves
  `null`.

  ##### Parameters

  | Parameter | Type                                    |
  | --------- | --------------------------------------- |
  | `options` | [`EnableSshOptions`](#enablesshoptions) |

  ##### Returns

  `Promise`\<[`SshEndpoint`](#sshendpoint) | `null`>

  <a id="exec-1" />

  #### exec()

  > **exec**(`command`, `options?`): `Promise`\<[`ExecProcess`](#execprocess)>

  Run a command and return a handle to the live process. A `string` command
  is run via `/bin/sh -lc`; a `string[]` is exec'd directly. `options` can set
  a working directory or detach the command (see [ExecOptions](#execoptions)).
  Stopping the command is the caller's job via [ExecProcess.cancel](#cancel).

  ##### Parameters

  | Parameter  | Type                             |
  | ---------- | -------------------------------- |
  | `command`  | `string` \| readonly `string`\[] |
  | `options?` | [`ExecOptions`](#execoptions)    |

  ##### Returns

  `Promise`\<[`ExecProcess`](#execprocess)>

  <a id="expose" />

  #### expose()

  > **expose**(`guestPort`, `options?`): `Promise`\<[`Listener`](#listener-1)>

  Expose a guest port at runtime. Re-exposing a port under the same
  protocol sets its `allowlist` to what you pass, so pass the whole list
  every time; passing none clears the restriction and reopens the port. The
  returned listener carries the resolved endpoint but an `"unknown"` route
  status: the response confirms configuration, not reachability;
  [waitForListener](#waitforlistener-1) confirms the route is live.

  ##### Parameters

  | Parameter   | Type                              |
  | ----------- | --------------------------------- |
  | `guestPort` | `number`                          |
  | `options`   | [`ExposeOptions`](#exposeoptions) |

  ##### Returns

  `Promise`\<[`Listener`](#listener-1)>

  <a id="fork" />

  #### fork()

  > **fork**(`options?`): `Promise`\<[`Sailbox`](#sailbox)>

  Fork this Sailbox into a new running child in one call. The child copies
  this Sailbox's memory and writable disk as they are now, branching from the
  parent's current state, and the parent is left as it was. The copy is
  transient: no durable checkpoint is created. To branch from a saved point
  in time instead, pair [checkpoint](#checkpoint) with [Sailbox.fromCheckpoint](#fromcheckpoint),
  which works even after the parent is gone.
  Because the memory comes across, processes the parent was running carry on
  in the child. Commands started with [exec](#exec-1) stop in the child, though
  their writes up to the fork are kept, and one started with
  `background: true` keeps running there. Start the other execs the child
  needs. Sometimes the child comes up cold instead, with the disk intact and
  nothing running, and a child that mounts a volume always does. Volumes are
  mounted on the child at the same paths as on the parent, and they are the
  same volumes, so both Sailboxes read and write the same files.

  ##### Parameters

  | Parameter | Type                                        |
  | --------- | ------------------------------------------- |
  | `options` | [`ForkSailboxOptions`](#forksailboxoptions) |

  ##### Returns

  `Promise`\<[`Sailbox`](#sailbox)>

  <a id="ingressauthheaders-1" />

  #### ingressAuthHeaders()

  > **ingressAuthHeaders**(): `Promise`\<`Record`\<`string`, `string`>>

  Ingress-identity headers for this Sailbox, as a name→value map.

  ##### Returns

  `Promise`\<`Record`\<`string`, `string`>>

  <a id="listener" />

  #### listener()

  > **listener**(`guestPort`): `Promise`\<[`Listener`](#listener-1)>

  Fetch one listener by guest port without waking the Sailbox.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `guestPort` | `number` |

  ##### Returns

  `Promise`\<[`Listener`](#listener-1)>

  <a id="listeners" />

  #### listeners()

  > **listeners**(): `Promise`\<[`Listener`](#listener-1)\[]>

  List this Sailbox's listeners without waking it.

  ##### Returns

  `Promise`\<[`Listener`](#listener-1)\[]>

  <a id="pause" />

  #### pause()

  > **pause**(): `Promise`\<`void`>

  Pause this Sailbox in memory.

  ##### Returns

  `Promise`\<`void`>

  <a id="resume" />

  #### resume()

  > **resume**(): `Promise`\<`void`>

  Resume this Sailbox (updates [status](#status-1)).

  ##### Returns

  `Promise`\<`void`>

  <a id="run" />

  #### run()

  > **run**(`command`, `options?`): `Promise`\<[`ExecResult`](#execresult)>

  Run a command to completion and return its buffered result: a one-shot
  convenience over [exec](#exec-1) followed by [ExecProcess.wait](#wait). A
  `string` command runs via `/bin/sh -lc`; a `string[]` is exec'd directly.
  Set `env` in `options` to add environment variables; `cwd` sets the
  working directory (string commands only, like [exec](#exec-1)); `signal`
  force-cancels the command on abort (see [RunOptions](#runoptions)). The result's
  stdout/stderr are the buffered output (capped, drop-oldest); for unbounded
  output, stream it live via [exec](#exec-1) instead. `openStdin`, `pty`, and
  `background` are excluded from [RunOptions](#runoptions) and rejected at runtime:
  run() waits for the command to finish and buffers its output, so an
  interactive command would hang and a backgrounded one would return the
  launcher's result, not the command's; use [exec](#exec-1) for those.

  ##### Parameters

  | Parameter  | Type                             |
  | ---------- | -------------------------------- |
  | `command`  | `string` \| readonly `string`\[] |
  | `options?` | [`RunOptions`](#runoptions)      |

  ##### Returns

  `Promise`\<[`ExecResult`](#execresult)>

  <a id="shell-1" />

  #### shell()

  > **shell**(`command?`, `options?`): `Promise`\<`number`>

  Open an interactive pty session on this Sailbox, bridged to the local
  terminal. With no `command`, runs a login shell; pass a command to run
  that under a pty instead (e.g. a REPL or an editor). Blocks until the
  remote process exits and resolves with its exit code. Requires an
  interactive terminal (stdin and stdout TTYs) on a Unix machine. While the
  session is open, browser opens, localhost servers, paste, drag-and-drop,
  and clipboard are forwarded to your machine (the clipboard is two-way on
  devbox images); see [ShellOptions.noForward](#noforward).

  ##### Parameters

  | Parameter  | Type                            |
  | ---------- | ------------------------------- |
  | `command?` | `string`                        |
  | `options?` | [`ShellOptions`](#shelloptions) |

  ##### Returns

  `Promise`\<`number`>

  <a id="sleep" />

  #### sleep()

  > **sleep**(`wakeAt?`): `Promise`\<`Date` | `undefined`>

  Sleep this Sailbox to disk (wakes on traffic), optionally scheduling a
  wall-clock wake first. `wakeAt`, when given, records the wake before the
  sleep starts and the returned value is the effective wake time: the
  sooner of this request and any wake already scheduled. If the Sailbox
  is sleeping when that moment arrives, Sail restores it. The wake can
  fire a little after the time you set, so treat it as approximate.
  Sleeping an already-sleeping Sailbox succeeds and just updates the
  scheduled wake.

  ##### Parameters

  | Parameter | Type   |
  | --------- | ------ |
  | `wakeAt?` | `Date` |

  ##### Returns

  `Promise`\<`Date` | `undefined`>

  <a id="terminate" />

  #### terminate()

  > **terminate**(): `Promise`\<`void`>

  Terminate (delete) this Sailbox (updates [status](#status-1)).

  ##### Returns

  `Promise`\<`void`>

  <a id="unexpose" />

  #### unexpose()

  > **unexpose**(`guestPort`): `Promise`\<`void`>

  Remove a runtime ingress port.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `guestPort` | `number` |

  ##### Returns

  `Promise`\<`void`>

  <a id="upgrade" />

  #### upgrade()

  > **upgrade**(): `Promise`\<[`UpgradeResult`](#upgraderesult)>

  Upgrade this Sailbox's runtime.

  ##### Returns

  `Promise`\<[`UpgradeResult`](#upgraderesult)>

  <a id="waitforlistener-1" />

  #### waitForListener()

  > **waitForListener**(`guestPort`, `options?`): `Promise`\<[`Listener`](#listener-1)>

  Block until the listener on `guestPort` is reachable end to end and
  return it, or throw [TimeoutError](#timeouterror) after `timeoutSeconds`. An HTTP
  listener is ready once the guest server answers; a TCP listener once the
  guest sends bytes or holds the connection open. A connectivity check, not
  an application health check.

  ##### Parameters

  | Parameter   | Type                                                |
  | ----------- | --------------------------------------------------- |
  | `guestPort` | `number`                                            |
  | `options`   | [`WaitForListenerOptions`](#waitforlisteneroptions) |

  ##### Returns

  `Promise`\<[`Listener`](#listener-1)>

  <a id="create" />

  #### create()

  > `static` **create**(`options`): `Promise`\<[`Sailbox`](#sailbox)>

  Create a new Sailbox.

  A custom image definition passed as `image` is built first, following
  the image contract (see [Client.buildImageDefinition](#buildimagedefinition)): the image
  may boot hidden at build time and periodically while in active use,
  sharing those boots' state with every Sailbox created from it via a
  start snapshot, so generate per-instance identity at runtime, not in
  boot-time jobs.

  Sail may sleep a fully idle Sailbox; it wakes transparently on traffic or
  the next operation.

  ##### Parameters

  | Parameter | Type                                            |
  | --------- | ----------------------------------------------- |
  | `options` | [`CreateSailboxOptions`](#createsailboxoptions) |

  ##### Returns

  `Promise`\<[`Sailbox`](#sailbox)>

  <a id="fromcheckpoint" />

  #### fromCheckpoint()

  > `static` **fromCheckpoint**(`options`): `Promise`\<[`Sailbox`](#sailbox)>

  Create a new running Sailbox from a durable checkpoint handle. The new
  Sailbox restores the memory saved in the checkpoint as well as the writable
  disk, so processes the original was running carry on here, and it runs
  independently of the Sailbox that took the checkpoint. Commands started
  with [Sailbox.exec](#exec-1) stop here, though their writes up to the
  checkpoint are kept, and one started with `background: true` keeps
  running. Start the other execs the new Sailbox needs. Sometimes it comes
  up cold instead, with the disk intact and nothing running, and a Sailbox
  that mounts a volume always does. Volumes are mounted on it at the same
  paths as on the original, and they are the same volumes, so both Sailboxes
  read and write the same files.

  ##### Parameters

  | Parameter | Type                                              |
  | --------- | ------------------------------------------------- |
  | `options` | [`FromCheckpointOptions`](#fromcheckpointoptions) |

  ##### Returns

  `Promise`\<[`Sailbox`](#sailbox)>

  <a id="fromid" />

  #### fromId()

  > `static` **fromId**(`sailboxId`, `options?`): [`Sailbox`](#sailbox)

  Bind a handle to an existing Sailbox id without a network call.

  The returned handle carries no snapshot fields (its [name](#name-1) and
  [status](#status-1) are empty), just the operable surface. The id is not
  verified to exist: operations on an unknown or inaccessible id reject
  with [NotFoundError](#notfounderror). Use [get](#get) to validate the id and fetch
  a fresh snapshot instead.

  ##### Parameters

  | Parameter   | Type                              |
  | ----------- | --------------------------------- |
  | `sailboxId` | `string`                          |
  | `options`   | [`ClientOptions`](#clientoptions) |

  ##### Returns

  [`Sailbox`](#sailbox)

  <a id="get" />

  #### get()

  > `static` **get**(`sailboxId`, `options?`): `Promise`\<[`Sailbox`](#sailbox)>

  Fetch an existing Sailbox by id.

  ##### Parameters

  | Parameter   | Type                              |
  | ----------- | --------------------------------- |
  | `sailboxId` | `string`                          |
  | `options`   | [`ClientOptions`](#clientoptions) |

  ##### Returns

  `Promise`\<[`Sailbox`](#sailbox)>

  <a id="list-1" />

  #### list()

  > `static` **list**(`params?`): `Promise`\<[`Sailbox`](#sailbox)\[]>

  List the Sailboxes that match the filters, fetching pages internally
  until every match (or `limit` of them) is collected; use
  [listPage](#listpage) to page through results manually instead. `limit` caps
  the total returned, bounding the fetch for large orgs. A `client` can
  ride along in the query object.

  ##### Parameters

  | Parameter | Type                                            |
  | --------- | ----------------------------------------------- |
  | `params`  | [`ListSailboxesOptions`](#listsailboxesoptions) |

  ##### Returns

  `Promise`\<[`Sailbox`](#sailbox)\[]>

  <a id="listpage" />

  #### listPage()

  > `static` **listPage**(`params?`): `Promise`\<[`SailboxPage`](#sailboxpage)>

  List one page of Sailboxes alongside the pagination envelope
  (`total`/`hasMore`). Takes the same filters as [list](#list-1), plus `limit`
  and `offset` to select the page.

  ##### Parameters

  | Parameter | Type                                                    |
  | --------- | ------------------------------------------------------- |
  | `params`  | [`ListSailboxesPageOptions`](#listsailboxespageoptions) |

  ##### Returns

  `Promise`\<[`SailboxPage`](#sailboxpage)>

  ***

  <a id="app" />

  ## App

  An app: the billing/ownership scope a Sailbox belongs to. Look one up (or mint
  it) with [App.find](#find), then pass it (or its [App.id](#id)) to
  [Sailbox.create](#create).

  ### Properties

  | Property                         | Modifier   | Type     | Description    |
  | -------------------------------- | ---------- | -------- | -------------- |
  | <a id="createdat" /> `createdAt` | `readonly` | `Date`   | Creation time. |
  | <a id="id" /> `id`               | `readonly` | `string` | Stable app id. |
  | <a id="name" /> `name`           | `readonly` | `string` | App name.      |

  ### Methods

  <a id="find" />

  #### find()

  > `static` **find**(`name`, `options?`): `Promise`\<[`App`](#app)>

  Find an app by name, optionally minting it if missing.

  ##### Parameters

  | Parameter | Type                                |
  | --------- | ----------------------------------- |
  | `name`    | `string`                            |
  | `options` | [`FindAppOptions`](#findappoptions) |

  ##### Returns

  `Promise`\<[`App`](#app)>

  <a id="list" />

  #### list()

  > `static` **list**(`options?`): `Promise`\<[`App`](#app)\[]>

  Every app the current org owns, newest first.

  ##### Parameters

  | Parameter | Type                              |
  | --------- | --------------------------------- |
  | `options` | [`ClientOptions`](#clientoptions) |

  ##### Returns

  `Promise`\<[`App`](#app)\[]>

  ***

  <a id="image" />

  ## Image

  A custom image definition. Immutable and fluent: each method returns a new
  `Image`. Local files/dirs are recorded here and hashed + uploaded by the
  core when the image is resolved to a spec (at [Sailbox.create](#create), or via
  [toSpec](#tospec)), so chaining stays synchronous.

  ### Example

  ```ts theme={null}
  const image = Image.debian("arm64")
    .aptInstall("git")
    .pipInstall("numpy")
    .addLocalDir("./app", "/app", { ignore: ["*.pyc", "__pycache__/"] })
    .runCommand("pip install -e /app");
  const box = await Sailbox.create({ app, name: "w", image });
  ```

  ### Methods

  <a id="addlocaldir" />

  #### addLocalDir()

  > **addLocalDir**(`localPath`, `remotePath`, `options?`): [`Image`](#image)

  Bake a local directory tree into the image at `path`. Each regular
  file is hashed + uploaded at resolve; symlinks are skipped and file modes
  preserved. `ignore` takes gitignore-style patterns.

  ##### Parameters

  | Parameter    | Type                                        |
  | ------------ | ------------------------------------------- |
  | `localPath`  | `string`                                    |
  | `remotePath` | `string`                                    |
  | `options`    | [`AddLocalDirOptions`](#addlocaldiroptions) |

  ##### Returns

  [`Image`](#image)

  <a id="addlocalfile" />

  #### addLocalFile()

  > **addLocalFile**(`localPath`, `remotePath`, `options?`): [`Image`](#image)

  Bake one local file into the image at `path` (absolute POSIX path;
  a trailing `/` appends the source basename). Hashed + uploaded at resolve.

  ##### Parameters

  | Parameter    | Type                                          |
  | ------------ | --------------------------------------------- |
  | `localPath`  | `string`                                      |
  | `remotePath` | `string`                                      |
  | `options`    | [`AddLocalFileOptions`](#addlocalfileoptions) |

  ##### Returns

  [`Image`](#image)

  <a id="aptinstall" />

  #### aptInstall()

  > **aptInstall**(...`packages`): [`Image`](#image)

  Install system packages with apt.

  ##### Parameters

  | Parameter     | Type        |
  | ------------- | ----------- |
  | ...`packages` | `string`\[] |

  ##### Returns

  [`Image`](#image)

  <a id="build" />

  #### build()

  > **build**(`options?`): `Promise`\<[`ImageSpec`](#imagespec)>

  Upload any local files and build the image, waiting until it is ready.
  Returns the resolved [ImageSpec](#imagespec). [Sailbox.create](#create) calls this
  for a custom image before creating the Sailbox (the backend serves the
  content-addressed built image); a bare base image skips the build.
  Local files are re-hashed on every call, so edits always reach the
  build, and rebuilding an unchanged, already-built image returns quickly.

  ##### Parameters

  | Parameter | Type                                      |
  | --------- | ----------------------------------------- |
  | `options` | [`ImageBuildOptions`](#imagebuildoptions) |

  ##### Returns

  `Promise`\<[`ImageSpec`](#imagespec)>

  <a id="env" />

  #### env()

  > **env**(`env`): [`Image`](#image)

  Bake environment variables into the image (keys are trimmed).

  ##### Parameters

  | Parameter | Type                                       |
  | --------- | ------------------------------------------ |
  | `env`     | `Readonly`\<`Record`\<`string`, `string`>> |

  ##### Returns

  [`Image`](#image)

  <a id="pipinstall" />

  #### pipInstall()

  > **pipInstall**(...`packages`): [`Image`](#image)

  Install Python packages with pip.

  ##### Parameters

  | Parameter     | Type        |
  | ------------- | ----------- |
  | ...`packages` | `string`\[] |

  ##### Returns

  [`Image`](#image)

  <a id="runcommand" />

  #### runCommand()

  > **runCommand**(`command`): [`Image`](#image)

  Run a shell command during the build.

  ##### Parameters

  | Parameter | Type     |
  | --------- | -------- |
  | `command` | `string` |

  ##### Returns

  [`Image`](#image)

  <a id="tospec" />

  #### toSpec()

  > **toSpec**(`client?`): `Promise`\<[`ImageSpec`](#imagespec)>

  Resolve to an [ImageSpec](#imagespec): walks local files/dirs (honoring
  gitignore), hashes them, and uploads their content via `client` (defaults
  to the env client). [Sailbox.create](#create) calls this for you; use it
  directly only if you need the raw spec.

  ##### Parameters

  | Parameter | Type                |
  | --------- | ------------------- |
  | `client?` | [`Client`](#client) |

  ##### Returns

  `Promise`\<[`ImageSpec`](#imagespec)>

  <a id="debian" />

  #### debian()

  > `static` **debian**(`architecture?`): [`Image`](#image)

  A Debian base image (defaults to arm64).

  ##### Parameters

  | Parameter      | Type                                      | Default value |
  | -------------- | ----------------------------------------- | ------------- |
  | `architecture` | [`ImageArchitecture`](#imagearchitecture) | `"arm64"`     |

  ##### Returns

  [`Image`](#image)

  <a id="devbox" />

  #### devbox()

  > `static` **devbox**(`architecture?`): [`Image`](#image)

  The devbox base image (defaults to arm64): a prebuilt Debian base with a
  baked development layer. Prebuilt-only, so it does not support build
  steps or env; start from [Image.debian](#debian) to customize.

  ##### Parameters

  | Parameter      | Type                                      | Default value |
  | -------------- | ----------------------------------------- | ------------- |
  | `architecture` | [`ImageArchitecture`](#imagearchitecture) | `"arm64"`     |

  ##### Returns

  [`Image`](#image)

  ***

  <a id="execprocess" />

  ## ExecProcess

  A live command running in a Sailbox. Stream [stdout](#stdout)/[stderr](#stderr),
  write to [writeStdin](#writestdin), and [wait](#wait) for the result. Not killed on GC;
  call [close](#close) to detach, or [cancel](#cancel) to stop the command.

  ### Example

  ```ts theme={null}
  const proc = await box.exec(["bash", "-lc", "echo hi"]);
  for await (const line of proc.stdout) process.stdout.write(line);
  const result = await proc.wait();
  console.log(result.exitCode);
  ```

  ### Properties

  | Property                   | Modifier   | Type                        | Description                                                     |
  | -------------------------- | ---------- | --------------------------- | --------------------------------------------------------------- |
  | <a id="stderr" /> `stderr` | `readonly` | [`ExecStream`](#execstream) | Stderr stream: string iteration by default, `.raw()` for bytes. |
  | <a id="stdout" /> `stdout` | `readonly` | [`ExecStream`](#execstream) | Stdout stream: string iteration by default, `.raw()` for bytes. |

  ### Accessors

  <a id="execrequestid" />

  #### execRequestId

  ##### Get Signature

  > **get** **execRequestId**(): `string`

  The durable exec request id.

  ##### Returns

  `string`

  <a id="idempotencykey" />

  #### idempotencyKey

  ##### Get Signature

  > **get** **idempotencyKey**(): `string`

  The idempotency key used to launch the command.

  ##### Returns

  `string`

  <a id="output" />

  #### output

  ##### Get Signature

  > **get** **output**(): [`ExecStream`](#execstream)

  Alias for [stdout](#stdout): under a pty the two output streams merge onto
  stdout, and `output` names that merged terminal stream.

  ##### Returns

  [`ExecStream`](#execstream)

  ### Methods

  <a id="asyncdispose" />

  #### \[asyncDispose]\()

  > **\[asyncDispose]**(): `Promise`\<`void`>

  `await using` support: detaches on scope exit.

  ##### Returns

  `Promise`\<`void`>

  <a id="dispose" />

  #### \[dispose]\()

  > **\[dispose]**(): `void`

  `using` support: detaches on scope exit.

  ##### Returns

  `void`

  <a id="cancel" />

  #### cancel()

  > **cancel**(`options?`): `Promise`\<`void`>

  Cancel the command (SIGINT by default, SIGKILL with `force`).
  Transient failures are retried briefly, covering the window right after
  the command starts when the guest cannot accept signals for it yet.

  ##### Parameters

  | Parameter | Type                              |
  | --------- | --------------------------------- |
  | `options` | [`CancelOptions`](#canceloptions) |

  ##### Returns

  `Promise`\<`void`>

  <a id="close" />

  #### close()

  > **close**(): `void`

  Stop the output pump and detach (does not kill the command). Call this on
  early exit from streaming a long-running command so the stream is not held
  until GC.

  ##### Returns

  `void`

  <a id="closestdin" />

  #### closeStdin()

  > **closeStdin**(): `Promise`\<`void`>

  Close the command's stdin (send EOF).

  ##### Returns

  `Promise`\<`void`>

  <a id="poll" />

  #### poll()

  > **poll**(): `number` | `null`

  The exit code if the exit frame has arrived on the stream, else `null`.
  Throws for a host-lost exec (no real exit code), as [wait](#wait) does.

  ##### Returns

  `number` | `null`

  <a id="resize" />

  #### resize()

  > **resize**(`cols`, `rows`): `Promise`\<`void`>

  Resize the pty (no-op without one).

  ##### Parameters

  | Parameter | Type     |
  | --------- | -------- |
  | `cols`    | `number` |
  | `rows`    | `number` |

  ##### Returns

  `Promise`\<`void`>

  <a id="resync" />

  #### resync()

  > **resync**(): `Promise`\<`void`>

  Ask a pty exec to repaint its current screen (no-op without a pty). A
  command runs at full speed and never waits for a slow reader, so if you
  fall far behind the oldest output is dropped. Call this after that happens
  to receive the current screen instead of a broken, partial one. Advisory
  and best-effort.

  ##### Returns

  `Promise`\<`void`>

  <a id="wait" />

  #### wait()

  > **wait**(): `Promise`\<[`ExecResult`](#execresult)>

  Await the authoritative result (exit code, buffered output, flags).

  ##### Returns

  `Promise`\<[`ExecResult`](#execresult)>

  <a id="waitstreamended" />

  #### waitStreamEnded()

  > **waitStreamEnded**(`timeoutSeconds`): `Promise`\<`boolean`>

  Wait up to `timeoutSeconds` for the streams to end; returns whether they
  did. `Infinity` waits indefinitely.

  ##### Parameters

  | Parameter        | Type     |
  | ---------------- | -------- |
  | `timeoutSeconds` | `number` |

  ##### Returns

  `Promise`\<`boolean`>

  <a id="writestdin" />

  #### writeStdin()

  > **writeStdin**(`data`): `Promise`\<`void`>

  Write to the command's stdin (requires `openStdin`).

  ##### Parameters

  | Parameter | Type                                                                         |
  | --------- | ---------------------------------------------------------------------------- |
  | `data`    | `string` \| `Buffer`\<`ArrayBufferLike`> \| `Uint8Array`\<`ArrayBufferLike`> |

  ##### Returns

  `Promise`\<`void`>

  ***

  <a id="execstream" />

  ## ExecStream

  An async-iterable view of one exec stream (stdout or stderr). Default
  iteration yields `string` chunks, incrementally decoded as UTF-8 (a
  multibyte character split across chunks is carried until complete); use
  [raw](#raw) for the unmodified byte stream.

  ### Example

  ```ts theme={null}
  for await (const chunk of proc.stdout) process.stdout.write(chunk);
  ```

  ### Implements

  * `AsyncIterable`\<`string`>

  ### Methods

  <a id="asynciterator" />

  #### \[asyncIterator]\()

  > **\[asyncIterator]**(): `AsyncIterator`\<`string`>

  ##### Returns

  `AsyncIterator`\<`string`>

  ##### Implementation of

  `AsyncIterable.[asyncIterator]`

  <a id="bytes" />

  #### bytes()

  > **bytes**(): `Promise`\<`Buffer`\<`ArrayBufferLike`>>

  Collect the whole raw byte stream into a single `Buffer`.

  ##### Returns

  `Promise`\<`Buffer`\<`ArrayBufferLike`>>

  <a id="raw" />

  #### raw()

  > **raw**(): `AsyncIterableIterator`\<`Buffer`\<`ArrayBufferLike`>>

  Iterate the raw byte stream, exactly as the command wrote it (escape
  sequences and binary payloads included).

  ##### Returns

  `AsyncIterableIterator`\<`Buffer`\<`ArrayBufferLike`>>

  <a id="text" />

  #### text()

  > **text**(): `Promise`\<`string`>

  Collect the whole stream into a single string.

  ##### Returns

  `Promise`\<`string`>

  <a id="toreadable" />

  #### toReadable()

  > **toReadable**(): `Readable`

  Adapt to a Node `Readable` of string chunks (e.g. to `.pipe()` it).

  ##### Returns

  `Readable`

  ***

  <a id="sailboxfs-1" />

  ## SailboxFs

  Filesystem operations on a Sailbox's guest, reached via [Sailbox.fs](#fs).
  File I/O streams bytes to/from the guest; the directory helpers create,
  remove, and test paths.

  ### Methods

  <a id="exists" />

  #### exists()

  > **exists**(`path`): `Promise`\<`boolean`>

  Whether `path` exists in the guest. Follows symlinks (like `test -e`), so
  a dangling symlink reports `false` even though [ls](#ls) lists it.

  ##### Parameters

  | Parameter | Type     |
  | --------- | -------- |
  | `path`    | `string` |

  ##### Returns

  `Promise`\<`boolean`>

  <a id="ls" />

  #### ls()

  > **ls**(`path`): `Promise`\<[`DirEntry`](#direntry)\[]>

  List a directory's immediate entries as [DirEntry](#direntry) records (no
  recursion). A missing path throws, as does a path that is not a directory and
  a listing too large for the exec output cap. An entry whose name is not
  valid UTF-8 fails the listing, since the path API cannot address it.

  ##### Parameters

  | Parameter | Type     |
  | --------- | -------- |
  | `path`    | `string` |

  ##### Returns

  `Promise`\<[`DirEntry`](#direntry)\[]>

  <a id="mkdir" />

  #### mkdir()

  > **mkdir**(`path`): `Promise`\<`void`>

  Create a directory and any missing parents (like `mkdir -p`); a no-op if
  it already exists.

  ##### Parameters

  | Parameter | Type     |
  | --------- | -------- |
  | `path`    | `string` |

  ##### Returns

  `Promise`\<`void`>

  <a id="read" />

  #### read()

  > **read**(`path`): `Promise`\<`Buffer`\<`ArrayBufferLike`>>

  Read a guest file fully into memory (convenience over [readStream](#readstream-1)).

  ##### Parameters

  | Parameter | Type     |
  | --------- | -------- |
  | `path`    | `string` |

  ##### Returns

  `Promise`\<`Buffer`\<`ArrayBufferLike`>>

  <a id="readstream-1" />

  #### readStream()

  > **readStream**(`path`): `Promise`\<[`FileStream`](#filestream)>

  Open a streaming read of a guest file.

  ##### Parameters

  | Parameter | Type     |
  | --------- | -------- |
  | `path`    | `string` |

  ##### Returns

  `Promise`\<[`FileStream`](#filestream)>

  <a id="remove" />

  #### remove()

  > **remove**(`path`): `Promise`\<`void`>

  Remove a file or directory tree (like `rm -rf`); a no-op if it is already
  absent.

  ##### Parameters

  | Parameter | Type     |
  | --------- | -------- |
  | `path`    | `string` |

  ##### Returns

  `Promise`\<`void`>

  <a id="write-1" />

  #### write()

  > **write**(`path`, `data`, `options?`): `Promise`\<`void`>

  Write bytes (a `string` is encoded as UTF-8) to a guest file, creating it
  and any missing parent directories (convenience over [writeStream](#writestream-1);
  pass `createParents: false` to opt out).

  ##### Parameters

  | Parameter  | Type                                                                         |
  | ---------- | ---------------------------------------------------------------------------- |
  | `path`     | `string`                                                                     |
  | `data`     | `string` \| `Buffer`\<`ArrayBufferLike`> \| `Uint8Array`\<`ArrayBufferLike`> |
  | `options?` | [`WriteOptions`](#writeoptions)                                              |

  ##### Returns

  `Promise`\<`void`>

  <a id="writestream-1" />

  #### writeStream()

  > **writeStream**(`path`, `options?`): `Promise`\<[`FileWriter`](#filewriter)>

  Open a streaming upload to a guest file.

  ##### Parameters

  | Parameter  | Type                            |
  | ---------- | ------------------------------- |
  | `path`     | `string`                        |
  | `options?` | [`WriteOptions`](#writeoptions) |

  ##### Returns

  `Promise`\<[`FileWriter`](#filewriter)>

  ***

  <a id="filewriter" />

  ## FileWriter

  A streaming write to a guest file. Push chunks with [write](#write), then
  confirm with [finish](#finish); only `finish` commits the write. A writer
  that goes away without finishing ([abort](#abort), an error path, or garbage
  collection) cancels the transfer instead; the guest file state is then
  unspecified.

  ### Methods

  <a id="asyncdispose-2" />

  #### \[asyncDispose]\()

  > **\[asyncDispose]**(): `Promise`\<`void`>

  `await using` support; same semantics as the synchronous form.

  ##### Returns

  `Promise`\<`void`>

  <a id="dispose-1" />

  #### \[dispose]\()

  > **\[dispose]**(): `void`

  `using` support: aborts the write if it was never finished, so leaving
  scope on an error path cancels instead of committing a partial file.
  `abort` is synchronous, so the plain form suffices.

  ##### Returns

  `void`

  <a id="abort" />

  #### abort()

  > **abort**(): `void`

  Abort the write: cancel the RPC so the server does not commit it.
  Idempotent. A later [finish](#finish) reports the abort instead of
  succeeding; the guest file state after an abort is unspecified.

  ##### Returns

  `void`

  <a id="finish" />

  #### finish()

  > **finish**(): `Promise`\<`void`>

  Confirm the write, creating an empty file if nothing was written.

  ##### Returns

  `Promise`\<`void`>

  <a id="towritable" />

  #### toWritable()

  > **toWritable**(): `Writable`

  Adapt to a Node `Writable`: `end()` runs [finish](#finish) (only that
  commits the write), destroying the stream aborts it, and backpressure
  follows the underlying transfer since each chunk's callback fires when the
  core accepts the bytes.

  ##### Returns

  `Writable`

  <a id="write" />

  #### write()

  > **write**(`data`): `Promise`\<`void`>

  Write bytes (a `string` is encoded as UTF-8). The core splits them into
  transport-sized chunks.

  ##### Parameters

  | Parameter | Type                                                                         |
  | --------- | ---------------------------------------------------------------------------- |
  | `data`    | `string` \| `Buffer`\<`ArrayBufferLike`> \| `Uint8Array`\<`ArrayBufferLike`> |

  ##### Returns

  `Promise`\<`void`>

  ***

  <a id="filestream" />

  ## FileStream

  An async-iterable download of a guest file. Chunks are `Buffer`s; iteration
  ends at end of file. The underlying stream is released when iteration finishes
  or is abandoned (via a generator `finally`), or explicitly via [close](#close-1).

  ### Implements

  * `AsyncIterable`\<`Buffer`>

  ### Methods

  <a id="asyncdispose-1" />

  #### \[asyncDispose]\()

  > **\[asyncDispose]**(): `Promise`\<`void`>

  `await using` support.

  ##### Returns

  `Promise`\<`void`>

  <a id="asynciterator-1" />

  #### \[asyncIterator]\()

  > **\[asyncIterator]**(): `AsyncIterator`\<`Buffer`\<`ArrayBufferLike`>>

  ##### Returns

  `AsyncIterator`\<`Buffer`\<`ArrayBufferLike`>>

  ##### Implementation of

  `AsyncIterable.[asyncIterator]`

  <a id="bytes-1" />

  #### bytes()

  > **bytes**(): `Promise`\<`Buffer`\<`ArrayBufferLike`>>

  Collect the whole file into a single `Buffer`.

  ##### Returns

  `Promise`\<`Buffer`\<`ArrayBufferLike`>>

  <a id="close-1" />

  #### close()

  > **close**(): `Promise`\<`void`>

  Release the underlying download stream (idempotent).

  ##### Returns

  `Promise`\<`void`>

  <a id="toreadable-1" />

  #### toReadable()

  > **toReadable**(): `Readable`

  Adapt to a Node `Readable`.

  ##### Returns

  `Readable`

  ***

  <a id="volume" />

  ## Volume

  A managed NFS volume that can be mounted into Sailboxes. Look one up (or
  mint it) with [Volume.find](#find-1), then pass it (or its [Volume.id](#id-1))
  in a Sailbox's `volumes` mapping.

  Volumes are currently in Alpha. To pilot them, reach out in the Sail Slack:
  [https://join.slack.com/t/sailresearchcrew/shared\_invite/zt-41pdcym9j-UU0Ey\~A\~r6n2H0DQVQsQHQ](https://join.slack.com/t/sailresearchcrew/shared_invite/zt-41pdcym9j-UU0Ey~A~r6n2H0DQVQsQHQ).

  ### Properties

  | Property                           | Modifier   | Type                    | Default value | Description                                                       |
  | ---------------------------------- | ---------- | ----------------------- | ------------- | ----------------------------------------------------------------- |
  | <a id="backend" /> `backend`       | `readonly` | `string`                | `undefined`   | Storage backend serving the volume.                               |
  | <a id="createdat-2" /> `createdAt` | `readonly` | `Date` \| `undefined`   | `undefined`   | Creation time, if reported.                                       |
  | <a id="id-1" /> `id`               | `readonly` | `string`                | `undefined`   | Stable volume id.                                                 |
  | <a id="mountpath" /> `mountPath`   | `readonly` | `string` \| `undefined` | `undefined`   | Guest mount path, when loaded via [Volume.fromMount](#frommount). |
  | <a id="name-2" /> `name`           | `readonly` | `string`                | `undefined`   | Volume name.                                                      |
  | <a id="status-3" /> `status`       | `readonly` | `string`                | `undefined`   | Lifecycle status.                                                 |
  | <a id="updatedat-1" /> `updatedAt` | `readonly` | `Date` \| `undefined`   | `undefined`   | Last-update time, if reported.                                    |

  ### Methods

  <a id="delete" />

  #### delete()

  > **delete**(`options?`): `Promise`\<`boolean`>

  Delete this volume. Resolves `true` if it was deleted, `false` if it was
  already gone (only possible with `allowMissing`).

  ##### Parameters

  | Parameter | Type                                          |
  | --------- | --------------------------------------------- |
  | `options` | [`DeleteVolumeOptions`](#deletevolumeoptions) |

  ##### Returns

  `Promise`\<`boolean`>

  <a id="find-1" />

  #### find()

  > `static` **find**(`name`, `options?`): `Promise`\<[`Volume`](#volume)>

  Look up an NFS volume by name, optionally minting it if missing.

  ##### Parameters

  | Parameter | Type                                      |
  | --------- | ----------------------------------------- |
  | `name`    | `string`                                  |
  | `options` | [`FindVolumeOptions`](#findvolumeoptions) |

  ##### Returns

  `Promise`\<[`Volume`](#volume)>

  <a id="frommount" />

  #### fromMount()

  > `static` **fromMount**(`path`): [`Volume`](#volume)

  Guest-side: load the volume handle for a path mounted into this
  Sailbox (reads the mount's metadata; only available inside a guest).

  ##### Parameters

  | Parameter | Type     |
  | --------- | -------- |
  | `path`    | `string` |

  ##### Returns

  [`Volume`](#volume)

  <a id="list-2" />

  #### list()

  > `static` **list**(`options?`): `Promise`\<[`Volume`](#volume)\[]>

  List NFS volumes in the current org.

  ##### Parameters

  | Parameter | Type                                        |
  | --------- | ------------------------------------------- |
  | `options` | [`ListVolumesOptions`](#listvolumesoptions) |

  ##### Returns

  `Promise`\<[`Volume`](#volume)\[]>

  ***

  <a id="ingressauthheaders-2" />

  ## ingressAuthHeaders()

  > **ingressAuthHeaders**(): `Record`\<`string`, `string`>

  Guest-side: headers that authenticate this Sailbox as an ingress
  allowlist source (only available inside a Sailbox guest).

  ### Returns

  `Record`\<`string`, `string`>

  ***

  <a id="client" />

  ## Client

  A configured Sail client: the low-level surface over the native core (one
  config snapshot; env vars are read at construction). Every client
  operation is here. The object-model API ([Sailbox](#sailbox), [App](#app),
  [Volume](#volume)) is built on top of it.

  Construct with [Client.fromEnv](#fromenv) or [Client.fromConfig](#fromconfig).

  ### Methods

  <a id="buildimagedefinition" />

  #### buildImageDefinition()

  > **buildImageDefinition**(`def`, `timeoutSeconds`): `Promise`\<[`ImageSpec`](#imagespec)>

  Resolve an image definition and build it to ready, returning the
  content-addressed [ImageSpec](#imagespec) to create Sailboxes from. A bare
  builtin base skips the build; `timeoutSeconds` bounds the whole pipeline
  (hashing, uploads, and the build).

  Sail may boot the image outside of any Sailbox -- once as the final
  stage of the build, and again periodically while the image is in
  active use -- to capture and refresh a start snapshot so Sailboxes
  created from it skip the cold boot. Boot-time initialization therefore
  runs at times you don't control, and anything it writes becomes part
  of the snapshot shared by every Sailbox created from this image --
  generate per-instance identity (machine IDs, nonces, cached
  credentials) at runtime, not during boot. Per-Sailbox environment,
  networking, and credentials are injected at create time either way.
  See "Hidden boots and start snapshots" in the Sailbox images guide.

  ##### Parameters

  | Parameter        | Type                                  |
  | ---------------- | ------------------------------------- |
  | `def`            | [`ImageDefinition`](#imagedefinition) |
  | `timeoutSeconds` | `number`                              |

  ##### Returns

  `Promise`\<[`ImageSpec`](#imagespec)>

  <a id="buildspectoready" />

  #### buildSpecToReady()

  > **buildSpecToReady**(`spec`, `timeoutSeconds`): `Promise`\<[`ImageBuild`](#imagebuild-1)>

  Build an already-resolved spec to ready (submit + poll), bounded by
  `timeoutSeconds`.

  ##### Parameters

  | Parameter        | Type                      |
  | ---------------- | ------------------------- |
  | `spec`           | [`ImageSpec`](#imagespec) |
  | `timeoutSeconds` | `number`                  |

  ##### Returns

  `Promise`\<[`ImageBuild`](#imagebuild-1)>

  <a id="checkpointsailbox" />

  #### checkpointSailbox()

  > **checkpointSailbox**(`sailboxId`, `options?`): `Promise`\<[`SailboxCheckpoint`](#sailboxcheckpoint-1)>

  Take a checkpoint of a Sailbox. `name` sets the handle's display name;
  `ttlSeconds`, when given, overrides the server's default retention
  window.

  ##### Parameters

  | Parameter   | Type                                      |
  | ----------- | ----------------------------------------- |
  | `sailboxId` | `string`                                  |
  | `options`   | [`CheckpointOptions`](#checkpointoptions) |

  ##### Returns

  `Promise`\<[`SailboxCheckpoint`](#sailboxcheckpoint-1)>

  <a id="createfromcheckpoint" />

  #### createFromCheckpoint()

  > **createFromCheckpoint**(`params`): `Promise`\<[`SailboxHandle`](#sailboxhandle)>

  Create a new Sailbox from a checkpoint.

  ##### Parameters

  | Parameter | Type                                              |
  | --------- | ------------------------------------------------- |
  | `params`  | [`FromCheckpointRequest`](#fromcheckpointrequest) |

  ##### Returns

  `Promise`\<[`SailboxHandle`](#sailboxhandle)>

  <a id="createsailbox" />

  #### createSailbox()

  > **createSailbox**(`req`, `timeoutSeconds?`): `Promise`\<[`SailboxHandle`](#sailboxhandle)>

  Create a Sailbox. `timeoutSeconds` bounds each create attempt (default
  600s); pass `0` for no client-side timeout. A timed-out attempt is retried,
  and a retry usually reattaches to the Sailbox already coming up rather than
  starting another. When the overall budget is exhausted the Sailbox may still
  be coming up server-side: find or terminate it by `name`. `image` defaults
  to a plain Debian base.

  ##### Parameters

  | Parameter        | Type                                            | Default value |
  | ---------------- | ----------------------------------------------- | ------------- |
  | `req`            | [`CreateSailboxRequest`](#createsailboxrequest) | `undefined`   |
  | `timeoutSeconds` | `number`                                        | `600`         |

  ##### Returns

  `Promise`\<[`SailboxHandle`](#sailboxhandle)>

  <a id="deletevolume" />

  #### deleteVolume()

  > **deleteVolume**(`volumeId`, `allowMissing?`): `Promise`\<[`VolumeInfo`](#volumeinfo) | `null`>

  Delete a volume by id. `allowMissing` tolerates an already-deleted
  volume, resolving `null` instead of throwing.

  ##### Parameters

  | Parameter      | Type      | Default value |
  | -------------- | --------- | ------------- |
  | `volumeId`     | `string`  | `undefined`   |
  | `allowMissing` | `boolean` | `false`       |

  ##### Returns

  `Promise`\<[`VolumeInfo`](#volumeinfo) | `null`>

  <a id="enablessh" />

  #### enableSsh()

  > **enableSsh**(`sailboxId`, `options?`): `Promise`\<[`SshEndpoint`](#sshendpoint) | `null`>

  Enable SSH on a Sailbox: trust the org SSH CA, start `sshd`, and expose
  guest port 22 as TCP once the CA-only daemon owns it. A non-empty
  `allowlist` restricts port 22 to those source addresses or ranges,
  replacing any existing restriction. With `wait` (the default), polls until
  the endpoint is reachable and returns it, throwing [TimeoutError](#timeouterror) if
  it is not within `timeoutSeconds`; with `wait: false`, skips the probe and
  resolves `null`.

  ##### Parameters

  | Parameter   | Type                                    |
  | ----------- | --------------------------------------- |
  | `sailboxId` | `string`                                |
  | `options`   | [`EnableSshOptions`](#enablesshoptions) |

  ##### Returns

  `Promise`\<[`SshEndpoint`](#sshendpoint) | `null`>

  <a id="exec" />

  #### exec()

  > **exec**(`sailboxId`, `command`, `options?`): `Promise`\<[`ExecProcess`](#execprocess)>

  Run a command in a Sailbox and return a handle to the live process. A
  `string` command is run via `/bin/sh -lc`; a `string[]` is exec'd directly.
  `cwd`/`background` apply to string commands (see [ExecOptions](#execoptions)).
  Stopping the command is the caller's job via [ExecProcess.cancel](#cancel).

  ##### Parameters

  | Parameter   | Type                             |
  | ----------- | -------------------------------- |
  | `sailboxId` | `string`                         |
  | `command`   | `string` \| readonly `string`\[] |
  | `options`   | [`ExecOptions`](#execoptions)    |

  ##### Returns

  `Promise`\<[`ExecProcess`](#execprocess)>

  <a id="exposelistener" />

  #### exposeListener()

  > **exposeListener**(`sailboxId`, `guestPort`, `protocol?`, `allowlist?`): `Promise`\<[`Listener`](#listener-1)>

  Expose a guest port at runtime. Re-exposing a port under the same
  protocol sets its `allowlist` to what you pass, so pass the whole list
  every time; an empty one clears the restriction and reopens the port. The
  route status starts "unknown": the response confirms configuration, not
  reachability.

  ##### Parameters

  | Parameter   | Type                                  | Default value |
  | ----------- | ------------------------------------- | ------------- |
  | `sailboxId` | `string`                              | `undefined`   |
  | `guestPort` | `number`                              | `undefined`   |
  | `protocol`  | [`IngressProtocol`](#ingressprotocol) | `"http"`      |
  | `allowlist` | readonly `string`\[]                  | `[]`          |

  ##### Returns

  `Promise`\<[`Listener`](#listener-1)>

  <a id="findapp" />

  #### findApp()

  > **findApp**(`name`, `mintIfMissing?`): `Promise`\<[`AppInfo`](#appinfo)>

  Find an app by name; `mintIfMissing` creates it when absent.

  ##### Parameters

  | Parameter       | Type      | Default value |
  | --------------- | --------- | ------------- |
  | `name`          | `string`  | `undefined`   |
  | `mintIfMissing` | `boolean` | `false`       |

  ##### Returns

  `Promise`\<[`AppInfo`](#appinfo)>

  <a id="forksailbox" />

  #### forkSailbox()

  > **forkSailbox**(`sailboxId`, `options?`): `Promise`\<[`SailboxHandle`](#sailboxhandle)>

  Fork a Sailbox into a new running child: a copy of its memory and
  writable disk as they are now, with no durable checkpoint created (see
  [Sailbox.fork](#fork)). Sometimes the child comes up cold instead, with
  the disk intact and nothing running, and a child that mounts a volume
  always does. The parent may be running, sleeping, or paused.

  ##### Parameters

  | Parameter   | Type                                        |
  | ----------- | ------------------------------------------- |
  | `sailboxId` | `string`                                    |
  | `options`   | [`ForkSailboxOptions`](#forksailboxoptions) |

  ##### Returns

  `Promise`\<[`SailboxHandle`](#sailboxhandle)>

  <a id="getlistener" />

  #### getListener()

  > **getListener**(`sailboxId`, `guestPort`): `Promise`\<[`Listener`](#listener-1)>

  Fetch one listener by guest port without waking the Sailbox.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |
  | `guestPort` | `number` |

  ##### Returns

  `Promise`\<[`Listener`](#listener-1)>

  <a id="getsailbox" />

  #### getSailbox()

  > **getSailbox**(`sailboxId`): `Promise`\<[`SailboxInfo`](#sailboxinfo)>

  Fetch one Sailbox by id.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |

  ##### Returns

  `Promise`\<[`SailboxInfo`](#sailboxinfo)>

  <a id="getvolume" />

  #### getVolume()

  > **getVolume**(`name`, `mintIfMissing?`): `Promise`\<[`VolumeInfo`](#volumeinfo)>

  Look up an NFS volume by name; `mintIfMissing` creates it when absent.

  ##### Parameters

  | Parameter       | Type      | Default value |
  | --------------- | --------- | ------------- |
  | `name`          | `string`  | `undefined`   |
  | `mintIfMissing` | `boolean` | `false`       |

  ##### Returns

  `Promise`\<[`VolumeInfo`](#volumeinfo)>

  <a id="ingressauthheaders" />

  #### ingressAuthHeaders()

  > **ingressAuthHeaders**(`sailboxId`): `Promise`\<`Record`\<`string`, `string`>>

  Ingress-identity headers for this Sailbox, as a name→value map.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |

  ##### Returns

  `Promise`\<`Record`\<`string`, `string`>>

  <a id="isbuiltinbasespec" />

  #### isBuiltinBaseSpec()

  > **isBuiltinBaseSpec**(`spec`): `boolean`

  Whether a spec is a bare builtin base the backend ships prebuilt (no
  build needed).

  ##### Parameters

  | Parameter | Type                      |
  | --------- | ------------------------- |
  | `spec`    | [`ImageSpec`](#imagespec) |

  ##### Returns

  `boolean`

  <a id="listapps" />

  #### listApps()

  > **listApps**(): `Promise`\<[`AppInfo`](#appinfo)\[]>

  Every app the current org owns, newest first.

  ##### Returns

  `Promise`\<[`AppInfo`](#appinfo)\[]>

  <a id="listdir" />

  #### listDir()

  > **listDir**(`sailboxId`, `path`): `Promise`\<[`DirEntry`](#direntry)\[]>

  List a directory's immediate entries as structured records.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |
  | `path`      | `string` |

  ##### Returns

  `Promise`\<[`DirEntry`](#direntry)\[]>

  <a id="listlisteners" />

  #### listListeners()

  > **listListeners**(`sailboxId`): `Promise`\<[`Listener`](#listener-1)\[]>

  List a Sailbox's listeners without waking it.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |

  ##### Returns

  `Promise`\<[`Listener`](#listener-1)\[]>

  <a id="listsailboxes" />

  #### listSailboxes()

  > **listSailboxes**(`params?`): `Promise`\<[`SailboxInfoPage`](#sailboxinfopage)>

  List one page of Sailboxes in the current org.

  ##### Parameters

  | Parameter | Type                                        |
  | --------- | ------------------------------------------- |
  | `params`  | [`ListSailboxesQuery`](#listsailboxesquery) |

  ##### Returns

  `Promise`\<[`SailboxInfoPage`](#sailboxinfopage)>

  <a id="listvolumes" />

  #### listVolumes()

  > **listVolumes**(`maxObjects?`): `Promise`\<[`VolumeInfo`](#volumeinfo)\[]>

  List NFS volumes in the current org.

  ##### Parameters

  | Parameter     | Type     |
  | ------------- | -------- |
  | `maxObjects?` | `number` |

  ##### Returns

  `Promise`\<[`VolumeInfo`](#volumeinfo)\[]>

  <a id="makedir" />

  #### makeDir()

  > **makeDir**(`sailboxId`, `path`): `Promise`\<`void`>

  Create a directory and any missing parents (like `mkdir -p`); a no-op if
  it already exists.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |
  | `path`      | `string` |

  ##### Returns

  `Promise`\<`void`>

  <a id="orgsshcapublickey" />

  #### orgSshCaPublicKey()

  > **orgSshCaPublicKey**(): `Promise`\<`string`>

  Fetch (creating on first use) the org SSH certificate authority public key.
  Used to preflight SSH before a Sailbox is provisioned.

  ##### Returns

  `Promise`\<`string`>

  <a id="pathexists" />

  #### pathExists()

  > **pathExists**(`sailboxId`, `path`): `Promise`\<`boolean`>

  Whether `path` exists in the guest.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |
  | `path`      | `string` |

  ##### Returns

  `Promise`\<`boolean`>

  <a id="pausesailbox" />

  #### pauseSailbox()

  > **pauseSailbox**(`sailboxId`): `Promise`\<`void`>

  Pause a Sailbox in memory.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |

  ##### Returns

  `Promise`\<`void`>

  <a id="readstream" />

  #### readStream()

  > **readStream**(`sailboxId`, `path`): `Promise`\<[`FileStream`](#filestream)>

  Open a streaming read of a guest file.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |
  | `path`      | `string` |

  ##### Returns

  `Promise`\<[`FileStream`](#filestream)>

  <a id="removepath" />

  #### removePath()

  > **removePath**(`sailboxId`, `path`): `Promise`\<`void`>

  Remove a file or directory tree (like `rm -rf`); a no-op if it is already
  absent.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |
  | `path`      | `string` |

  ##### Returns

  `Promise`\<`void`>

  <a id="resolveimage" />

  #### resolveImage()

  > **resolveImage**(`def`): `Promise`\<[`ImageSpec`](#imagespec)>

  Resolve an image definition into a content-addressed [ImageSpec](#imagespec):
  the core walks local directories (gitignore-style `ignore`), hashes every
  file, and uploads content the server does not already have.

  ##### Parameters

  | Parameter | Type                                  |
  | --------- | ------------------------------------- |
  | `def`     | [`ImageDefinition`](#imagedefinition) |

  ##### Returns

  `Promise`\<[`ImageSpec`](#imagespec)>

  <a id="resumesailbox" />

  #### resumeSailbox()

  > **resumeSailbox**(`sailboxId`): `Promise`\<[`SailboxHandle`](#sailboxhandle)>

  Resume a paused or sleeping Sailbox.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |

  ##### Returns

  `Promise`\<[`SailboxHandle`](#sailboxhandle)>

  <a id="shell" />

  #### shell()

  > **shell**(`sailboxId`, `command?`, `options?`): `Promise`\<`number`>

  Open an interactive pty session on a Sailbox, bridged to the local
  terminal: raw keystrokes reach the remote process, output renders
  locally, and resizes propagate. Resolves with the remote process's exit
  code. Requires an interactive terminal (stdin and stdout TTYs).

  ##### Parameters

  | Parameter   | Type                            |
  | ----------- | ------------------------------- |
  | `sailboxId` | `string`                        |
  | `command?`  | `string`                        |
  | `options?`  | [`ShellOptions`](#shelloptions) |

  ##### Returns

  `Promise`\<`number`>

  <a id="sleepsailbox" />

  #### sleepSailbox()

  > **sleepSailbox**(`sailboxId`, `wakeAt?`): `Promise`\<`string` | `null`>

  Sleep a Sailbox to disk (wakes on traffic), optionally scheduling a
  wall-clock wake first. `wakeAt` is an RFC 3339 timestamp; the returned
  value is the effective (sooner) wake time, or null when no wake was
  requested. Most callers use [Sailbox.sleep](#sleep), which takes and
  returns `Date`.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |
  | `wakeAt?`   | `string` |

  ##### Returns

  `Promise`\<`string` | `null`>

  <a id="terminatesailbox" />

  #### terminateSailbox()

  > **terminateSailbox**(`sailboxId`): `Promise`\<`void`>

  Terminate a Sailbox (idempotent).

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |

  ##### Returns

  `Promise`\<`void`>

  <a id="unexposelistener" />

  #### unexposeListener()

  > **unexposeListener**(`sailboxId`, `guestPort`): `Promise`\<`void`>

  Remove a runtime ingress port.

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |
  | `guestPort` | `number` |

  ##### Returns

  `Promise`\<`void`>

  <a id="upgradesailbox" />

  #### upgradeSailbox()

  > **upgradeSailbox**(`sailboxId`): `Promise`\<[`UpgradeResult`](#upgraderesult)>

  Upgrade a Sailbox's runtime (now if running, else at next wake).

  ##### Parameters

  | Parameter   | Type     |
  | ----------- | -------- |
  | `sailboxId` | `string` |

  ##### Returns

  `Promise`\<[`UpgradeResult`](#upgraderesult)>

  <a id="waitforlistener" />

  #### waitForListener()

  > **waitForListener**(`sailboxId`, `guestPort`, `timeoutSeconds`): `Promise`\<[`Listener`](#listener-1)>

  Block until the listener on `guestPort` is reachable end to end and
  return it, throwing [TimeoutError](#timeouterror) after `timeoutSeconds`. An HTTP
  listener is ready once the guest server answers; a TCP listener once the
  guest sends bytes or holds the connection open. A connectivity check, not
  an application health check.

  ##### Parameters

  | Parameter        | Type     |
  | ---------------- | -------- |
  | `sailboxId`      | `string` |
  | `guestPort`      | `number` |
  | `timeoutSeconds` | `number` |

  ##### Returns

  `Promise`\<[`Listener`](#listener-1)>

  <a id="writestream" />

  #### writeStream()

  > **writeStream**(`sailboxId`, `path`, `options?`): `Promise`\<[`FileWriter`](#filewriter)>

  Open a streaming upload to a guest file.

  ##### Parameters

  | Parameter   | Type                            |
  | ----------- | ------------------------------- |
  | `sailboxId` | `string`                        |
  | `path`      | `string`                        |
  | `options`   | [`WriteOptions`](#writeoptions) |

  ##### Returns

  `Promise`\<[`FileWriter`](#filewriter)>

  <a id="fromconfig" />

  #### fromConfig()

  > `static` **fromConfig**(`config`): [`Client`](#client)

  Build a client from an explicit [ClientConfig](#clientconfig).

  ##### Parameters

  | Parameter | Type                            |
  | --------- | ------------------------------- |
  | `config`  | [`ClientConfig`](#clientconfig) |

  ##### Returns

  [`Client`](#client)

  <a id="fromenv" />

  #### fromEnv()

  > `static` **fromEnv**(): [`Client`](#client)

  Build a client from the environment (`SAIL_API_KEY`, ...).

  ##### Returns

  [`Client`](#client)

  ***

  <a id="defaultclient" />

  ## defaultClient()

  > **defaultClient**(): [`Client`](#client)

  The process-wide client used by the object-model statics ([Sailbox](#sailbox),
  [App](#app), [Volume](#volume)) when no explicit `client` is passed. Created
  lazily from the environment on first use.

  ### Returns

  [`Client`](#client)

  ***

  <a id="setdefaultclient" />

  ## setDefaultClient()

  > **setDefaultClient**(`client`): `void`

  Override (or clear, with `undefined`) the process-wide default client. Useful
  for tests or to point the object-model API at an explicitly configured client.

  ### Parameters

  | Parameter | Type                               |
  | --------- | ---------------------------------- |
  | `client`  | [`Client`](#client) \| `undefined` |

  ### Returns

  `void`

  ***

  <a id="resolveconfig" />

  ## resolveConfig()

  > **resolveConfig**(): [`ResolvedConfig`](#resolvedconfig)

  Resolve the SDK config from the environment (`SAIL_API_KEY`, `SAIL_API_URL`,
  `SAILBOX_API_URL`, ...) and `~/.sail`, without requiring an API key. The core
  is the single source of truth for endpoint resolution.

  ### Returns

  [`ResolvedConfig`](#resolvedconfig)

  ***

  <a id="issailerror" />

  ## isSailError()

  > **isSailError**(`err`): `err is SailError`

  Whether `err` is a [SailError](#sailerror), matched on the stable shape (`code`
  string plus `retryable` boolean) rather than the prototype chain. Use it
  where `instanceof` can lie: across realms (worker threads, `vm` contexts)
  or when two copies of the SDK are loaded. It does not survive
  `structuredClone` or `postMessage` serialization, which strip an Error's
  custom fields; send `{ name, message, code, retryable }` yourself when an
  error must cross a serialization boundary.

  ### Parameters

  | Parameter | Type      |
  | --------- | --------- |
  | `err`     | `unknown` |

  ### Returns

  `err is SailError`

  ## Types

  Plain data types accepted by and returned from the calls above.

  <a id="addlocaldir-1" />

  ### AddLocalDir

  A tree of local files copied into the image.

  #### Properties

  | Property                            | Type                                     | Description                                |
  | ----------------------------------- | ---------------------------------------- | ------------------------------------------ |
  | <a id="files" /> `files?`           | [`AddLocalDirFile`](#addlocaldirfile)\[] | The files to place under `remotePath`.     |
  | <a id="remotepath" /> `remotePath?` | `string`                                 | Absolute guest path of the directory root. |

  ***

  <a id="addlocaldirfile" />

  ### AddLocalDirFile

  One file within an `addLocalDir` step.

  #### Properties

  | Property                                  | Type     | Description                                     |
  | ----------------------------------------- | -------- | ----------------------------------------------- |
  | <a id="contentsha256" /> `contentSha256?` | `string` | SHA-256 of the (already uploaded) file content. |
  | <a id="mode" /> `mode?`                   | `number` | Permission bits (low 9).                        |
  | <a id="relativepath" /> `relativePath?`   | `string` | Path relative to the directory root.            |

  ***

  <a id="addlocaldiroptions" />

  ### AddLocalDirOptions

  Options for [Image.addLocalDir](#addlocaldir).

  #### Properties

  | Property                            | Type                 | Description                                                          |
  | ----------------------------------- | -------------------- | -------------------------------------------------------------------- |
  | <a id="ignore" /> `ignore?`         | readonly `string`\[] | Gitignore-style patterns to skip (e.g. `"*.pyc"`, `"__pycache__/"`). |
  | <a id="ignorefile" /> `ignoreFile?` | `string`             | A gitignore-style file whose patterns to skip (e.g. `.gitignore`).   |

  ***

  <a id="addlocalfile-1" />

  ### AddLocalFile

  One local file copied into the image, referenced by content hash.

  #### Properties

  | Property                                    | Type     | Description                                                  |
  | ------------------------------------------- | -------- | ------------------------------------------------------------ |
  | <a id="contentsha256-1" /> `contentSha256?` | `string` | SHA-256 of the (already uploaded) file content.              |
  | <a id="mode-1" /> `mode?`                   | `number` | Permission bits (low 9); 0 means the builder default (0644). |
  | <a id="remotepath-1" /> `remotePath?`       | `string` | Absolute guest path to place the file at.                    |

  ***

  <a id="addlocalfileoptions" />

  ### AddLocalFileOptions

  Options for [Image.addLocalFile](#addlocalfile).

  #### Properties

  | Property                  | Type     | Description                                                      |
  | ------------------------- | -------- | ---------------------------------------------------------------- |
  | <a id="mode-2" /> `mode?` | `number` | Unix mode bits (low 9); omitted uses the builder default (0644). |

  ***

  <a id="appinfo" />

  ### AppInfo

  A Sail app.

  #### Properties

  | Property                           | Type     | Description               |
  | ---------------------------------- | -------- | ------------------------- |
  | <a id="createdat-3" /> `createdAt` | `string` | Creation time (RFC 3339). |
  | <a id="id-2" /> `id`               | `string` | Stable app id.            |
  | <a id="name-3" /> `name`           | `string` | App name.                 |

  ***

  <a id="baseimage" />

  ### BaseImage

  > **BaseImage** = `"debian"` | `"devbox"`

  ***

  <a id="canceloptions" />

  ### CancelOptions

  Options for cancelling an exec.

  #### Properties

  | Property                  | Type      | Description                     |
  | ------------------------- | --------- | ------------------------------- |
  | <a id="force" /> `force?` | `boolean` | Send SIGKILL instead of SIGINT. |

  ***

  <a id="checkpointoptions" />

  ### CheckpointOptions

  Options for [Sailbox.checkpoint](#checkpoint).

  #### Properties

  | Property                            | Type     | Description                                                                                                                                                                                               |
  | ----------------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | <a id="name-4" /> `name?`           | `string` | Display name for the checkpoint handle.                                                                                                                                                                   |
  | <a id="ttlseconds" /> `ttlSeconds?` | `number` | Retention override in whole seconds (must be positive). Set it when you keep a checkpoint to reuse as a template, so the handle does not expire while you still need it; omitted uses the server default. |

  ***

  <a id="clientconfig" />

  ### ClientConfig

  Explicit client configuration (an alternative to environment resolution).

  #### Extends

  * `Omit`\<`native.ClientConfig`, `"mode"`>

  #### Properties

  | Property                                      | Type     | Description                                                                                                                              | Inherited from         |
  | --------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ---------------------- |
  | <a id="apikey" /> `apiKey`                    | `string` | Bearer API key. Required.                                                                                                                | `Omit.apiKey`          |
  | <a id="apiurl" /> `apiUrl?`                   | `string` | Override the Sail API URL.                                                                                                               | `Omit.apiUrl`          |
  | <a id="imagebuilderurl" /> `imagebuilderUrl?` | `string` | Override the image-build endpoint (`host:port`).                                                                                         | `Omit.imagebuilderUrl` |
  | <a id="ingressurl" /> `ingressUrl?`           | `string` | Override the listener ingress base URL (what `SAILBOX_INGRESS_URL` sets from the environment), for custom or self-hosted Sailbox stacks. | `Omit.ingressUrl`      |
  | <a id="sailboxapiurl" /> `sailboxApiUrl?`     | `string` | Override the sailbox-API URL.                                                                                                            | `Omit.sailboxApiUrl`   |

  ***

  <a id="clientoptions" />

  ### ClientOptions

  Options for statics that select which [Client](#client) to use.

  #### Extended by

  * [`FindAppOptions`](#findappoptions)
  * [`FindVolumeOptions`](#findvolumeoptions)
  * [`ListVolumesOptions`](#listvolumesoptions)
  * [`CreateSailboxOptions`](#createsailboxoptions)
  * [`FromCheckpointOptions`](#fromcheckpointoptions)
  * [`ListSailboxesOptions`](#listsailboxesoptions)
  * [`ListSailboxesPageOptions`](#listsailboxespageoptions)

  #### Properties

  | Property                      | Type                | Description                                             |
  | ----------------------------- | ------------------- | ------------------------------------------------------- |
  | <a id="client-2" /> `client?` | [`Client`](#client) | Use a specific client instead of the default (env) one. |

  ***

  <a id="createsailboxoptions" />

  ### CreateSailboxOptions

  Options for [Sailbox.create](#create): the create request plus a per-attempt
  timeout and an optional explicit client. `image` defaults to a Debian base.

  #### Extends

  * `Omit`\<[`CreateSailboxRequest`](#createsailboxrequest), `"image"` | `"appId"` | `"volumeMounts"` | `"ingressPorts"`>.[`ClientOptions`](#clientoptions)

  #### Properties

  | Property                                                        | Type                                                              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Overrides                       | Inherited from                                                    |
  | --------------------------------------------------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- | ----------------------------------------------------------------- |
  | <a id="app-1" /> `app`                                          | `string` \| [`App`](#app)                                         | The owning app, or its id.                                                                                                                                                                                                                                                                                                                                                                                                                                    | -                               | -                                                                 |
  | <a id="client-3" /> `client?`                                   | [`Client`](#client)                                               | Use a specific client instead of the default (env) one.                                                                                                                                                                                                                                                                                                                                                                                                       | -                               | [`ClientOptions`](#clientoptions).[`client`](#client-2)           |
  | <a id="disklimitgib" /> `diskLimitGib?`                         | `number`                                                          | Disk limit in whole GiB within the size's range; the size's default when omitted.                                                                                                                                                                                                                                                                                                                                                                             | -                               | `Omit.diskLimitGib`                                               |
  | <a id="image-1" /> `image?`                                     | [`ImageSpec`](#imagespec) \| [`Image`](#image)                    | Image spec, or an [Image](#image) builder (built and resolved at create). Defaults to a plain Debian base.                                                                                                                                                                                                                                                                                                                                                    | -                               | -                                                                 |
  | <a id="imagebuildtimeoutseconds" /> `imageBuildTimeoutSeconds?` | `number`                                                          | Timeout in seconds for building a custom `Image` before create (1800).                                                                                                                                                                                                                                                                                                                                                                                        | `Omit.imageBuildTimeoutSeconds` | -                                                                 |
  | <a id="ingressports" /> `ingressPorts?`                         | readonly (`number` \| [`IngressPortInput`](#ingressportinput))\[] | Guest ports to expose: a bare number is HTTP shorthand.                                                                                                                                                                                                                                                                                                                                                                                                       | -                               | -                                                                 |
  | <a id="memorylimitgib" /> `memoryLimitGib?`                     | `number`                                                          | Memory limit in whole GiB within the size's range; the size's default when omitted.                                                                                                                                                                                                                                                                                                                                                                           | -                               | `Omit.memoryLimitGib`                                             |
  | <a id="name-5" /> `name`                                        | `string`                                                          | The Sailbox name.                                                                                                                                                                                                                                                                                                                                                                                                                                             | -                               | `Omit.name`                                                       |
  | <a id="private" /> `private?`                                   | `boolean`                                                         | By default a Sailbox is org-wide: any credential in the org can exec, copy files, SSH, or run lifecycle operations on it. `true` restricts all of that to the creating user. An org admin can override that with a recorded reason for exec, files, setting a wake time, and the pause, sleep, resume, terminate, and upgrade operations. SSH, exposing or removing listeners, and fork/checkpoint/restore stay creator-only. Requires a user-scoped API key. | -                               | `Omit.private`                                                    |
  | <a id="size" /> `size?`                                         | [`SailboxSize`](#sailboxsize)                                     | Resource size; `"m"` when omitted.                                                                                                                                                                                                                                                                                                                                                                                                                            | -                               | [`CreateSailboxRequest`](#createsailboxrequest).[`size`](#size-1) |
  | <a id="ssh" /> `ssh?`                                           | `boolean`                                                         | Enable SSH on the new Sailbox after create: trust the org SSH CA, start `sshd`, and expose guest port 22 as TCP once the CA-only daemon owns it (an explicit port-22 ingress entry contributes just its allowlist). Equivalent to calling [Sailbox.enableSsh](#enablessh-1) after create.                                                                                                                                                                     | `Omit.ssh`                      | -                                                                 |
  | <a id="timeoutseconds" /> `timeoutSeconds?`                     | `number`                                                          | Bounds each create attempt (default 600s); pass `0` for no client-side timeout. A timed-out attempt is retried, and a retry usually reattaches to the Sailbox already coming up rather than starting another. When the overall budget is exhausted the Sailbox may still be coming up server-side: find or terminate it by `name`.                                                                                                                            | -                               | -                                                                 |
  | <a id="volumes" /> `volumes?`                                   | `Readonly`\<`Record`\<`string`, `string` \| [`Volume`](#volume)>> | Shared volumes to mount, mapping an absolute guest path to a [Volume](#volume) or volume id. Volumes are currently in Alpha. To pilot them, reach out in the Sail Slack: [https://join.slack.com/t/sailresearchcrew/shared\_invite/zt-41pdcym9j-UU0Ey\~A\~r6n2H0DQVQsQHQ](https://join.slack.com/t/sailresearchcrew/shared_invite/zt-41pdcym9j-UU0Ey~A~r6n2H0DQVQsQHQ).                                                                                       | -                               | -                                                                 |

  ***

  <a id="createsailboxrequest" />

  ### CreateSailboxRequest

  #### Extends

  * `Omit`\<`native.CreateSailboxRequest`, `"image"` | `"ingressPorts"` | `"size"` | `"volumeMounts"`>

  #### Properties

  | Property                                                          | Type                                                | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                   | Inherited from                  |
  | ----------------------------------------------------------------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
  | <a id="appid-2" /> `appId`                                        | `string`                                            | Identifier of the owning app.                                                                                                                                                                                                                                                                                                                                                                                                                                 | `Omit.appId`                    |
  | <a id="disklimitgib-1" /> `diskLimitGib?`                         | `number`                                            | Disk limit in whole GiB within the size's range; the size's default when omitted.                                                                                                                                                                                                                                                                                                                                                                             | `Omit.diskLimitGib`             |
  | <a id="image-2" /> `image?`                                       | [`ImageSpec`](#imagespec)                           | Image to boot; defaults to a plain Debian base when omitted.                                                                                                                                                                                                                                                                                                                                                                                                  | -                               |
  | <a id="imagebuildtimeoutseconds-1" /> `imageBuildTimeoutSeconds?` | `number`                                            | Budget in seconds for rebuilding the image if Sail needs to rebuild it before the Sailbox is created; the default build budget applies when omitted.                                                                                                                                                                                                                                                                                                          | `Omit.imageBuildTimeoutSeconds` |
  | <a id="ingressports-1" /> `ingressPorts?`                         | readonly [`IngressPortInput`](#ingressportinput)\[] | Guest ports to reserve for ingress.                                                                                                                                                                                                                                                                                                                                                                                                                           | -                               |
  | <a id="memorylimitgib-1" /> `memoryLimitGib?`                     | `number`                                            | Memory limit in whole GiB within the size's range; the size's default when omitted.                                                                                                                                                                                                                                                                                                                                                                           | `Omit.memoryLimitGib`           |
  | <a id="name-6" /> `name`                                          | `string`                                            | The Sailbox name.                                                                                                                                                                                                                                                                                                                                                                                                                                             | `Omit.name`                     |
  | <a id="private-1" /> `private?`                                   | `boolean`                                           | By default a Sailbox is org-wide: any credential in the org can exec, copy files, SSH, or run lifecycle operations on it. `true` restricts all of that to the creating user. An org admin can override that with a recorded reason for exec, files, setting a wake time, and the pause, sleep, resume, terminate, and upgrade operations. SSH, exposing or removing listeners, and fork/checkpoint/restore stay creator-only. Requires a user-scoped API key. | `Omit.private`                  |
  | <a id="size-1" /> `size?`                                         | [`SailboxSize`](#sailboxsize)                       | Resource size; `"m"` when omitted.                                                                                                                                                                                                                                                                                                                                                                                                                            | -                               |
  | <a id="ssh-1" /> `ssh?`                                           | `boolean`                                           | Enable SSH on the new Sailbox after create: trust the org SSH CA, start `sshd`, and expose guest port 22 as TCP once the CA-only daemon owns it (an explicit port-22 ingress entry contributes just its allowlist).                                                                                                                                                                                                                                           | `Omit.ssh`                      |
  | <a id="volumemounts" /> `volumeMounts?`                           | readonly [`VolumeMountInput`](#volumemountinput)\[] | NFS volumes to mount.                                                                                                                                                                                                                                                                                                                                                                                                                                         | -                               |

  ***

  <a id="deletevolumeoptions" />

  ### DeleteVolumeOptions

  Options for [Volume.delete](#delete).

  #### Properties

  | Property                                | Type      | Description                                                 |
  | --------------------------------------- | --------- | ----------------------------------------------------------- |
  | <a id="allowmissing" /> `allowMissing?` | `boolean` | Tolerate a volume that is already gone instead of throwing. |

  ***

  <a id="direntry" />

  ### DirEntry

  One entry in a directory listing from `Sailbox.fs.ls`. The shape comes from
  the core, with `type` narrowed to the closed set the SDK emits; the
  generated declaration widens it to
  `string`.

  #### Extends

  * `Omit`\<`native.DirEntry`, `"type"`>

  #### Properties

  | Property                               | Type                              | Description                                                                 | Inherited from      |
  | -------------------------------------- | --------------------------------- | --------------------------------------------------------------------------- | ------------------- |
  | <a id="mode-3" /> `mode`               | `number`                          | Unix permission bits, e.g. `0o644`. The file-type bits are not included.    | `Omit.mode`         |
  | <a id="modifiedtime" /> `modifiedTime` | `number`                          | Last-modified time as a Unix timestamp in seconds (with a fractional part). | `Omit.modifiedTime` |
  | <a id="name-7" /> `name`               | `string`                          | The entry's base name, with no directory prefix.                            | `Omit.name`         |
  | <a id="size-2" /> `size`               | `number`                          | Size in bytes as reported by the guest.                                     | `Omit.size`         |
  | <a id="type" /> `type`                 | [`DirEntryType`](#direntrytype-1) | -                                                                           | -                   |

  ***

  <a id="direntrytype-1" />

  ### DirEntryType

  > **DirEntryType** = `"file"` | `"directory"` | `"symlink"` | `"other"`

  The kind of a directory entry, reported for the entry itself: a symlink is
  `"symlink"` regardless of what it points at.

  ***

  <a id="enablesshoptions" />

  ### EnableSshOptions

  Options for enabling SSH on a Sailbox.

  #### Properties

  | Property                                      | Type                 | Description                                                                                                                                                                                                 |
  | --------------------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | <a id="allowlist" /> `allowlist?`             | readonly `string`\[] | Source addresses or ranges allowed to reach port 22, replacing any existing restriction. Left empty, a first enable opens the port to any source, and a re-enable leaves an existing restriction unchanged. |
  | <a id="timeoutseconds-1" /> `timeoutSeconds?` | `number`             | Give up waiting after this many seconds (default 60; `Infinity` waits indefinitely).                                                                                                                        |
  | <a id="wait-1" /> `wait?`                     | `boolean`            | Poll until the SSH route is ready (default true).                                                                                                                                                           |

  ***

  <a id="execoptions" />

  ### ExecOptions

  Options for starting an exec (see the field docs on the generated
  `ExecStartOptions`).

  #### Extends

  * `Omit`\<`native.ExecStartOptions`, `"env"`>

  #### Properties

  | Property                                      | Type                                       | Description                                                                                                                                                                                     | Inherited from        |
  | --------------------------------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
  | <a id="background" /> `background?`           | `boolean`                                  | Detach the command so it keeps running and the call returns immediately; output is discarded (shell commands only, incompatible with `openStdin`/`pty`).                                        | `Omit.background`     |
  | <a id="cols" /> `cols?`                       | `number`                                   | Initial pty width in columns.                                                                                                                                                                   | `Omit.cols`           |
  | <a id="cwd" /> `cwd?`                         | `string`                                   | Working directory to run the command in (shell commands only).                                                                                                                                  | `Omit.cwd`            |
  | <a id="env-1" /> `env?`                       | `Readonly`\<`Record`\<`string`, `string`>> | Extra environment for the command. Entries override the guest's defaults and the image env, but a few reserved variables that identify the Sailbox (such as `SAILBOX_ID`) cannot be overridden. | -                     |
  | <a id="idempotencykey-1" /> `idempotencyKey?` | `string`                                   | Stable key so a reconnect reattaches to the same command.                                                                                                                                       | `Omit.idempotencyKey` |
  | <a id="openstdin" /> `openStdin?`             | `boolean`                                  | Leave stdin open for `writeStdin`.                                                                                                                                                              | `Omit.openStdin`      |
  | <a id="pty" /> `pty?`                         | `boolean`                                  | Allocate a pseudo-terminal.                                                                                                                                                                     | `Omit.pty`            |
  | <a id="rows" /> `rows?`                       | `number`                                   | Initial pty height in rows.                                                                                                                                                                     | `Omit.rows`           |
  | <a id="term" /> `term?`                       | `string`                                   | TERM value for the pty.                                                                                                                                                                         | `Omit.term`           |
  | <a id="timeoutseconds-2" /> `timeoutSeconds?` | `number`                                   | Wall-clock limit in seconds before the server kills the command.                                                                                                                                | `Omit.timeoutSeconds` |

  ***

  <a id="execresult" />

  ### ExecResult

  The authoritative result of a finished exec.

  The buffered `stdout`/`stderr` are a capped, drop-oldest tail (the server
  keeps a bounded ring). To capture the complete output of a large-output
  command, stream it live and consult the `*Truncated`/`*Complete` flags.

  #### Properties

  | Property                                     | Type      | Description                                                                                                                                                 |
  | -------------------------------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | <a id="exitcode" /> `exitCode`               | `number`  | The command's exit code.                                                                                                                                    |
  | <a id="stderr-1" /> `stderr`                 | `string`  | Buffered stderr (a capped tail; see `stderrTruncated`/`stderrComplete`).                                                                                    |
  | <a id="stderrcomplete" /> `stderrComplete`   | `boolean` | True if the live stream delivered stderr through to exit (see `stdoutComplete`).                                                                            |
  | <a id="stderrtruncated" /> `stderrTruncated` | `boolean` | True if buffered `stderr` dropped its oldest bytes (ring overflow).                                                                                         |
  | <a id="stdout-1" /> `stdout`                 | `string`  | Buffered stdout (a capped tail; see `stdoutTruncated`/`stdoutComplete`).                                                                                    |
  | <a id="stdoutcomplete" /> `stdoutComplete`   | `boolean` | True if the live stream delivered stdout through to exit: a consumer that streamed live already has the complete stdout even if `stdout` here is truncated. |
  | <a id="stdouttruncated" /> `stdoutTruncated` | `boolean` | True if buffered `stdout` dropped its oldest bytes (ring overflow).                                                                                         |
  | <a id="timedout" /> `timedOut`               | `boolean` | Whether the command was killed for exceeding its timeout.                                                                                                   |

  ***

  <a id="exposeoptions" />

  ### ExposeOptions

  Options for [Sailbox.expose](#expose).

  #### Properties

  | Property                            | Type                                  | Description                                                                                                                                                                                                                                                                                                                     |
  | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | <a id="allowlist-1" /> `allowlist?` | readonly `string`\[]                  | Sources allowed to reach the port: an address or a range, or a Sail app name on an `http` listener. An app name cannot read as an address or a range, and cannot contain a `/`. An address must not carry an IPv6 zone, such as `fe80::1%eth0`, which names an interface on one machine rather than a source. Empty allows all. |
  | <a id="protocol" /> `protocol?`     | [`IngressProtocol`](#ingressprotocol) | Wire protocol to expose (default `"http"`).                                                                                                                                                                                                                                                                                     |

  ***

  <a id="findappoptions" />

  ### FindAppOptions

  Options for [App.find](#find).

  #### Extends

  * [`ClientOptions`](#clientoptions)

  #### Properties

  | Property                                  | Type                | Description                                             | Inherited from                                          |
  | ----------------------------------------- | ------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
  | <a id="client-4" /> `client?`             | [`Client`](#client) | Use a specific client instead of the default (env) one. | [`ClientOptions`](#clientoptions).[`client`](#client-2) |
  | <a id="mintifmissing" /> `mintIfMissing?` | `boolean`           | Create the app when it does not exist yet.              | -                                                       |

  ***

  <a id="findvolumeoptions" />

  ### FindVolumeOptions

  Options for [Volume.find](#find-1).

  #### Extends

  * [`ClientOptions`](#clientoptions)

  #### Properties

  | Property                                    | Type                | Description                                             | Inherited from                                          |
  | ------------------------------------------- | ------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
  | <a id="client-5" /> `client?`               | [`Client`](#client) | Use a specific client instead of the default (env) one. | [`ClientOptions`](#clientoptions).[`client`](#client-2) |
  | <a id="mintifmissing-1" /> `mintIfMissing?` | `boolean`           | Create the volume when it does not exist yet.           | -                                                       |

  ***

  <a id="forksailboxoptions" />

  ### ForkSailboxOptions

  Options for [Sailbox.fork](#fork).

  #### Properties

  | Property                                      | Type     | Description                                                                                                                                    |
  | --------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
  | <a id="name-8" /> `name?`                     | `string` | Display name for the child Sailbox; the server derives one when omitted.                                                                       |
  | <a id="timeoutseconds-3" /> `timeoutSeconds?` | `number` | Whole seconds, positive when given. Accepted and ignored: the call blocks until the fork finishes, so apply your own deadline if you need one. |

  ***

  <a id="fromcheckpointoptions" />

  ### FromCheckpointOptions

  Options for [Sailbox.fromCheckpoint](#fromcheckpoint).

  #### Extends

  * [`FromCheckpointRequest`](#fromcheckpointrequest).[`ClientOptions`](#clientoptions)

  #### Properties

  | Property                                      | Type                | Description                                                                                                                                       | Inherited from                                                                          |
  | --------------------------------------------- | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
  | <a id="checkpointid" /> `checkpointId`        | `string`            | The checkpoint to restore from.                                                                                                                   | [`FromCheckpointRequest`](#fromcheckpointrequest).[`checkpointId`](#checkpointid-1)     |
  | <a id="client-6" /> `client?`                 | [`Client`](#client) | Use a specific client instead of the default (env) one.                                                                                           | [`ClientOptions`](#clientoptions).[`client`](#client-2)                                 |
  | <a id="name-9" /> `name?`                     | `string`            | Name for the new Sailbox. Defaults to the name of the Sailbox the checkpoint came from with `-fork` appended.                                     | [`FromCheckpointRequest`](#fromcheckpointrequest).[`name`](#name-10)                    |
  | <a id="timeoutseconds-4" /> `timeoutSeconds?` | `number`            | Whole seconds, positive when given. Accepted and ignored: the call blocks until the restore finishes, so apply your own deadline if you need one. | [`FromCheckpointRequest`](#fromcheckpointrequest).[`timeoutSeconds`](#timeoutseconds-5) |

  ***

  <a id="fromcheckpointrequest" />

  ### FromCheckpointRequest

  The create-from-checkpoint request.

  #### Extended by

  * [`FromCheckpointOptions`](#fromcheckpointoptions)

  #### Properties

  | Property                                      | Type     | Description                                                                                                                                       |
  | --------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
  | <a id="checkpointid-1" /> `checkpointId`      | `string` | The checkpoint to restore from.                                                                                                                   |
  | <a id="name-10" /> `name?`                    | `string` | Name for the new Sailbox. Defaults to the name of the Sailbox the checkpoint came from with `-fork` appended.                                     |
  | <a id="timeoutseconds-5" /> `timeoutSeconds?` | `number` | Whole seconds, positive when given. Accepted and ignored: the call blocks until the restore finishes, so apply your own deadline if you need one. |

  ***

  <a id="httpendpoint" />

  ### HttpEndpoint

  The routable HTTPS address of an `http` listener.

  #### Properties

  | Property               | Type     | Description                               |
  | ---------------------- | -------- | ----------------------------------------- |
  | <a id="kind" /> `kind` | `"http"` | -                                         |
  | <a id="url" /> `url`   | `string` | The HTTPS URL to reach the guest service. |

  ***

  <a id="imagearchitecture" />

  ### ImageArchitecture

  > **ImageArchitecture** = `"amd64"` | `"arm64"`

  ***

  <a id="imagebuild-1" />

  ### ImageBuild

  The state of a custom image build.

  #### Extends

  * `Omit`\<`native.ImageBuild`, `"status"`>

  #### Properties

  | Property                                  | Type                                      | Description                                                       | Inherited from      |
  | ----------------------------------------- | ----------------------------------------- | ----------------------------------------------------------------- | ------------------- |
  | <a id="errormessage-1" /> `errorMessage?` | `string`                                  | Human-readable failure detail; present when `status` is `failed`. | `Omit.errorMessage` |
  | <a id="imageid-1" /> `imageId`            | `string`                                  | The content-addressed image id.                                   | `Omit.imageId`      |
  | <a id="status-4" /> `status`              | [`ImageBuildStatus`](#imagebuildstatus-1) | -                                                                 | -                   |

  ***

  <a id="imagebuildoptions" />

  ### ImageBuildOptions

  Options for [Image.build](#build).

  #### Properties

  | Property                                      | Type                | Description                                                                                     |
  | --------------------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------- |
  | <a id="client-7" /> `client?`                 | [`Client`](#client) | Use a specific client instead of the default (env) one.                                         |
  | <a id="timeoutseconds-6" /> `timeoutSeconds?` | `number`            | Timeout in seconds bounding the whole pipeline: hashing, uploads, and the build (default 1800). |

  ***

  <a id="imagebuildstatus-1" />

  ### ImageBuildStatus

  > **ImageBuildStatus** = `"unknown"` | `"queued"` | `"building"` | `"ready"` | `"failed"`

  The status of a custom image build.

  ***

  <a id="imagebuildstep" />

  ### ImageBuildStep

  > **ImageBuildStep** = \{ `addLocalDir?`: `never`; `addLocalFile?`: `never`; `aptInstall`: [`PackageInstall`](#packageinstall); `pipInstall?`: `never`; `runCommand?`: `never`; } | \{ `addLocalDir?`: `never`; `addLocalFile?`: `never`; `aptInstall?`: `never`; `pipInstall`: [`PackageInstall`](#packageinstall); `runCommand?`: `never`; } | \{ `addLocalDir?`: `never`; `addLocalFile?`: `never`; `aptInstall?`: `never`; `pipInstall?`: `never`; `runCommand`: [`RunCommand`](#runcommand-2); } | \{ `addLocalDir?`: `never`; `addLocalFile`: [`AddLocalFile`](#addlocalfile-1); `aptInstall?`: `never`; `pipInstall?`: `never`; `runCommand?`: `never`; } | \{ `addLocalDir`: [`AddLocalDir`](#addlocaldir-1); `addLocalFile?`: `never`; `aptInstall?`: `never`; `pipInstall?`: `never`; `runCommand?`: `never`; }

  One build step: exactly one operation. Each union member `never`-types the
  other operations, so a step that sets two of them is a compile error (a
  bare union of the operations would accept it).

  ***

  <a id="imagedefinition" />

  ### ImageDefinition

  A custom image definition: a base image plus ordered build steps, where
  local-file steps still reference paths on this machine.

  #### Properties

  | Property                                  | Type                                             | Description                                                                   |
  | ----------------------------------------- | ------------------------------------------------ | ----------------------------------------------------------------------------- |
  | <a id="architecture-1" /> `architecture?` | `string`                                         | Target CPU architecture: `amd64` or `arm64`; unset lets the backend choose.   |
  | <a id="base" /> `base?`                   | `string`                                         | Base image to build on: `debian` or `devbox`.                                 |
  | <a id="env-2" /> `env?`                   | `Record`\<`string`, `string`>                    | Environment variables baked into the image.                                   |
  | <a id="pythonversion" /> `pythonVersion?` | `string`                                         | Exact Python version to install as `python3`; unset uses the builder default. |
  | <a id="steps" /> `steps?`                 | [`ImageDefinitionStep`](#imagedefinitionstep)\[] | Ordered build steps.                                                          |

  ***

  <a id="imagedefinitionstep" />

  ### ImageDefinitionStep

  One image-definition step. Exactly one of the fields must be set.

  #### Properties

  | Property                                  | Type                                | Description                                 |
  | ----------------------------------------- | ----------------------------------- | ------------------------------------------- |
  | <a id="addlocaldir-2" /> `addLocalDir?`   | [`LocalDirInput`](#localdirinput)   | Bake a local directory tree into the image. |
  | <a id="addlocalfile-2" /> `addLocalFile?` | [`LocalFileInput`](#localfileinput) | Bake one local file into the image.         |
  | <a id="aptinstall-1" /> `aptInstall?`     | `string`\[]                         | Install system packages with apt.           |
  | <a id="pipinstall-1" /> `pipInstall?`     | `string`\[]                         | Install Python packages with pip.           |
  | <a id="runcommand-1" /> `runCommand?`     | `string`                            | Run a shell command during the build.       |

  ***

  <a id="imagespec" />

  ### ImageSpec

  A Sailbox image: a base image plus ordered build steps.

  #### Extends

  * `Omit`\<`native.ImageSpec`, `"base"` | `"buildSteps"` | `"architecture"` | `"filesystem"`>

  #### Properties

  | Property                                    | Type                                      | Description                                                                   | Inherited from       |
  | ------------------------------------------- | ----------------------------------------- | ----------------------------------------------------------------------------- | -------------------- |
  | <a id="architecture-2" /> `architecture?`   | [`ImageArchitecture`](#imagearchitecture) | Target CPU architecture; unset lets the backend choose.                       | -                    |
  | <a id="base-1" /> `base?`                   | [`BaseImage`](#baseimage)                 | Base image to build on.                                                       | -                    |
  | <a id="buildsteps" /> `buildSteps?`         | [`ImageBuildStep`](#imagebuildstep)\[]    | Ordered build steps applied on top of the base image.                         | -                    |
  | <a id="env-3" /> `env?`                     | `Record`\<`string`, `string`>             | Environment variables baked into the image.                                   | `Omit.env`           |
  | <a id="pythonversion-1" /> `pythonVersion?` | `string`                                  | Exact Python version to install as `python3`; unset uses the builder default. | `Omit.pythonVersion` |

  ***

  <a id="ingressportinput" />

  ### IngressPortInput

  A guest port to reserve for ingress at create time.

  #### Extends

  * `Omit`\<`native.IngressPortInput`, `"protocol"` | `"allowlist"`>

  #### Properties

  | Property                            | Type                                  | Description                                                                                                                                                                                                                                                                                                                     | Inherited from   |
  | ----------------------------------- | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- |
  | <a id="allowlist-2" /> `allowlist?` | readonly `string`\[]                  | Sources allowed to reach the port: an address or a range, or a Sail app name on an `http` listener. An app name cannot read as an address or a range, and cannot contain a `/`. An address must not carry an IPv6 zone, such as `fe80::1%eth0`, which names an interface on one machine rather than a source. Empty allows all. | -                |
  | <a id="guestport" /> `guestPort`    | `number`                              | The in-guest port to expose (1-65535).                                                                                                                                                                                                                                                                                          | `Omit.guestPort` |
  | <a id="protocol-1" /> `protocol`    | [`IngressProtocol`](#ingressprotocol) | `http` or `tcp`.                                                                                                                                                                                                                                                                                                                | -                |

  ***

  <a id="ingressprotocol" />

  ### IngressProtocol

  > **IngressProtocol** = `"tcp"` | `"http"`

  The protocol you request when exposing a port.

  ***

  <a id="ingressscheme-1" />

  ### IngressScheme

  > **IngressScheme** = `"path"` | `"subdomain"`

  How a listener's URL is addressed under `ingressBase`.

  ***

  <a id="listsailboxesoptions" />

  ### ListSailboxesOptions

  Options for [Sailbox.list](#list-1): the server-side filters, a total-cap
  `limit`, and an optional `client`.

  #### Extends

  * `Omit`\<[`ListSailboxesQuery`](#listsailboxesquery), `"limit"` | `"offset"`>.[`ClientOptions`](#clientoptions)

  #### Properties

  | Property                      | Type                                          | Description                                                                                                                      | Inherited from                                                    |
  | ----------------------------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
  | <a id="appid-3" /> `appId?`   | `string`                                      | Filter to one app by its id.                                                                                                     | `Omit.appId`                                                      |
  | <a id="client-8" /> `client?` | [`Client`](#client)                           | Use a specific client instead of the default (env) one.                                                                          | [`ClientOptions`](#clientoptions).[`client`](#client-2)           |
  | <a id="limit" /> `limit?`     | `number`                                      | Cap on the total number of Sailboxes returned, bounding the fetch for large orgs; omit to fetch every match.                     | -                                                                 |
  | <a id="order" /> `order?`     | [`SailboxListOrder`](#sailboxlistorder)       | Result ordering; `"newest_active"` (most recently active first) when omitted; `"newest_created"` lists the newest-created first. | [`ListSailboxesQuery`](#listsailboxesquery).[`order`](#order-2)   |
  | <a id="search" /> `search?`   | `string`                                      | Substring filter on the Sailbox name.                                                                                            | `Omit.search`                                                     |
  | <a id="status-5" /> `status?` | [`SailboxStatusFilter`](#sailboxstatusfilter) | Filter by lifecycle status.                                                                                                      | [`ListSailboxesQuery`](#listsailboxesquery).[`status`](#status-7) |

  ***

  <a id="listsailboxespageoptions" />

  ### ListSailboxesPageOptions

  Options for [Sailbox.listPage](#listpage): the same filters as
  [ListSailboxesOptions](#listsailboxesoptions), plus `limit`/`offset` page selection and an
  optional `client`.

  #### Extends

  * [`ListSailboxesQuery`](#listsailboxesquery).[`ClientOptions`](#clientoptions)

  #### Properties

  | Property                      | Type                                          | Description                                                                                                                      | Inherited from                                                    |
  | ----------------------------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
  | <a id="appid-4" /> `appId?`   | `string`                                      | Filter to one app by its id.                                                                                                     | `Omit.appId`                                                      |
  | <a id="client-9" /> `client?` | [`Client`](#client)                           | Use a specific client instead of the default (env) one.                                                                          | [`ClientOptions`](#clientoptions).[`client`](#client-2)           |
  | <a id="limit-1" /> `limit?`   | `number`                                      | Page size.                                                                                                                       | `Omit.limit`                                                      |
  | <a id="offset" /> `offset?`   | `number`                                      | Page offset.                                                                                                                     | `Omit.offset`                                                     |
  | <a id="order-1" /> `order?`   | [`SailboxListOrder`](#sailboxlistorder)       | Result ordering; `"newest_active"` (most recently active first) when omitted; `"newest_created"` lists the newest-created first. | [`ListSailboxesQuery`](#listsailboxesquery).[`order`](#order-2)   |
  | <a id="search-1" /> `search?` | `string`                                      | Substring filter on the Sailbox name.                                                                                            | `Omit.search`                                                     |
  | <a id="status-6" /> `status?` | [`SailboxStatusFilter`](#sailboxstatusfilter) | Filter by lifecycle status.                                                                                                      | [`ListSailboxesQuery`](#listsailboxesquery).[`status`](#status-7) |

  ***

  <a id="listsailboxesquery" />

  ### ListSailboxesQuery

  Filters for listing Sailboxes.

  #### Extends

  * `Omit`\<`native.ListSailboxesQuery`, `"status"` | `"order"`>

  #### Properties

  | Property                      | Type                                          | Description                                                                                                                      | Inherited from |
  | ----------------------------- | --------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------- |
  | <a id="appid-5" /> `appId?`   | `string`                                      | Filter to one app by its id.                                                                                                     | `Omit.appId`   |
  | <a id="limit-2" /> `limit?`   | `number`                                      | Page size.                                                                                                                       | `Omit.limit`   |
  | <a id="offset-1" /> `offset?` | `number`                                      | Page offset.                                                                                                                     | `Omit.offset`  |
  | <a id="order-2" /> `order?`   | [`SailboxListOrder`](#sailboxlistorder)       | Result ordering; `"newest_active"` (most recently active first) when omitted; `"newest_created"` lists the newest-created first. | -              |
  | <a id="search-2" /> `search?` | `string`                                      | Substring filter on the Sailbox name.                                                                                            | `Omit.search`  |
  | <a id="status-7" /> `status?` | [`SailboxStatusFilter`](#sailboxstatusfilter) | Filter by lifecycle status.                                                                                                      | -              |

  ***

  <a id="listvolumesoptions" />

  ### ListVolumesOptions

  Options for [Volume.list](#list-2).

  #### Extends

  * [`ClientOptions`](#clientoptions)

  #### Properties

  | Property                            | Type                | Description                                             | Inherited from                                          |
  | ----------------------------------- | ------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
  | <a id="client-10" /> `client?`      | [`Client`](#client) | Use a specific client instead of the default (env) one. | [`ClientOptions`](#clientoptions).[`client`](#client-2) |
  | <a id="maxobjects" /> `maxObjects?` | `number`            | Maximum number of volumes to return.                    | -                                                       |

  ***

  <a id="listener-1" />

  ### Listener

  An exposed guest port and how to reach it.

  #### Properties

  | Property                             | Type                                            | Description                                                        |
  | ------------------------------------ | ----------------------------------------------- | ------------------------------------------------------------------ |
  | <a id="endpoint" /> `endpoint?`      | [`ListenerEndpoint`](#listenerendpoint-1)       | How to reach the port; `undefined` until the listener is routable. |
  | <a id="guestport-1" /> `guestPort`   | `number`                                        | The in-guest port traffic is forwarded to.                         |
  | <a id="protocol-2" /> `protocol`     | [`Protocol`](#protocol-3)                       | Wire protocol exposed.                                             |
  | <a id="routestatus" /> `routeStatus` | [`ListenerRouteStatus`](#listenerroutestatus-1) | Status of the listener's ingress route.                            |

  ***

  <a id="listenerendpoint-1" />

  ### ListenerEndpoint

  > **ListenerEndpoint** = [`HttpEndpoint`](#httpendpoint) | [`TcpEndpoint`](#tcpendpoint)

  How to reach an exposed listener; discriminate on `kind`.

  ***

  <a id="listenerroutestatus-1" />

  ### ListenerRouteStatus

  > **ListenerRouteStatus** = `"unknown"` | `"pending"` | `"active"` | `"restoring"` | `"unavailable"` | `string` & `object`

  Status of a listener's ingress route (open: tolerates unknown values).

  ***

  <a id="localdirinput" />

  ### LocalDirInput

  A local directory tree to bake into the image (walked, hashed, and
  uploaded at resolve; symlinks skipped, file modes preserved).

  #### Properties

  | Property                              | Type        | Description                                                        |
  | ------------------------------------- | ----------- | ------------------------------------------------------------------ |
  | <a id="ignore-1" /> `ignore?`         | `string`\[] | Gitignore-style patterns to skip.                                  |
  | <a id="ignorefile-1" /> `ignoreFile?` | `string`    | A gitignore-style file whose patterns to skip (e.g. `.gitignore`). |
  | <a id="localpath" /> `localPath`      | `string`    | Path on this machine.                                              |
  | <a id="remotepath-2" /> `remotePath`  | `string`    | Absolute POSIX path of the directory root inside the image.        |

  ***

  <a id="localfileinput" />

  ### LocalFileInput

  One local file to bake into the image (hashed and uploaded at resolve).

  #### Properties

  | Property                             | Type     | Description                                                                       |
  | ------------------------------------ | -------- | --------------------------------------------------------------------------------- |
  | <a id="localpath-1" /> `localPath`   | `string` | Path on this machine.                                                             |
  | <a id="mode-4" /> `mode?`            | `number` | Permission bits (low 9); omitted uses the builder default (0644).                 |
  | <a id="remotepath-3" /> `remotePath` | `string` | Absolute POSIX path inside the image; a trailing `/` appends the source basename. |

  ***

  <a id="packageinstall" />

  ### PackageInstall

  A set of packages to install (apt or pip).

  #### Properties

  | Property                        | Type        | Description    |
  | ------------------------------- | ----------- | -------------- |
  | <a id="packages" /> `packages?` | `string`\[] | Package names. |

  ***

  <a id="protocol-3" />

  ### Protocol

  > **Protocol** = `"tcp"` | `"http"` | `string` & `object`

  The protocol reported on a listener (open: tolerates unknown values).

  ***

  <a id="resolvedconfig" />

  ### ResolvedConfig

  The config resolved from the environment and `~/.sail`.

  #### Extends

  * `Omit`\<`native.ResolvedConfig`, `"ingressScheme"` | `"mode"`>

  #### Properties

  | Property                                       | Type                                | Description                                           | Inherited from         |
  | ---------------------------------------------- | ----------------------------------- | ----------------------------------------------------- | ---------------------- |
  | <a id="apikey-1" /> `apiKey?`                  | `string`                            | The resolved API key; absent when none is configured. | `Omit.apiKey`          |
  | <a id="apiurl-1" /> `apiUrl`                   | `string`                            | Sail API URL.                                         | `Omit.apiUrl`          |
  | <a id="imagebuilderurl-1" /> `imagebuilderUrl` | `string`                            | Image-build endpoint (`host:port`).                   | `Omit.imagebuilderUrl` |
  | <a id="ingressbase" /> `ingressBase`           | `string`                            | Base host/URL public listeners are addressed under.   | `Omit.ingressBase`     |
  | <a id="ingressscheme" /> `ingressScheme`       | [`IngressScheme`](#ingressscheme-1) | -                                                     | -                      |
  | <a id="sailboxapiurl-1" /> `sailboxApiUrl`     | `string`                            | Sailbox-API URL.                                      | `Omit.sailboxApiUrl`   |

  ***

  <a id="runcommand-2" />

  ### RunCommand

  A shell command to run during the build.

  #### Properties

  | Property                      | Type     | Description                               |
  | ----------------------------- | -------- | ----------------------------------------- |
  | <a id="command" /> `command?` | `string` | The command, run via the builder's shell. |

  ***

  <a id="runoptions" />

  ### RunOptions

  Options for [Sailbox.run](#run): the subset of [ExecOptions](#execoptions) that fits
  a buffered, run-to-completion command.

  #### Extends

  * `Pick`\<[`ExecOptions`](#execoptions), `"timeoutSeconds"` | `"cwd"` | `"env"` | `"idempotencyKey"`>

  #### Properties

  | Property                                      | Type                                       | Description                                                                                                                                                                                                                                                                                                                                                                         | Inherited from                                |
  | --------------------------------------------- | ------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
  | <a id="check" /> `check?`                     | `boolean`                                  | Reject with `CommandFailedError` (carrying the completed result) when the command exits nonzero or times out, instead of resolving.                                                                                                                                                                                                                                                 | -                                             |
  | <a id="cwd-1" /> `cwd?`                       | `string`                                   | Working directory to run the command in (shell commands only).                                                                                                                                                                                                                                                                                                                      | `Pick.cwd`                                    |
  | <a id="env-4" /> `env?`                       | `Readonly`\<`Record`\<`string`, `string`>> | Extra environment for the command. Entries override the guest's defaults and the image env, but a few reserved variables that identify the Sailbox (such as `SAILBOX_ID`) cannot be overridden.                                                                                                                                                                                     | [`ExecOptions`](#execoptions).[`env`](#env-1) |
  | <a id="idempotencykey-2" /> `idempotencyKey?` | `string`                                   | Stable key so a reconnect reattaches to the same command.                                                                                                                                                                                                                                                                                                                           | `Pick.idempotencyKey`                         |
  | <a id="signal" /> `signal?`                   | `AbortSignal`                              | Aborting rejects with the signal's reason and force-cancels the remote command (SIGKILL, like [ExecProcess.cancel](#cancel) with `force`), briefly retrying transient failures. Best effort: the kill is sent once the submission settles (an abort mid-submission cancels the command as soon as its launch is confirmed), and a kill that still fails leaves the command running. | -                                             |
  | <a id="timeoutseconds-7" /> `timeoutSeconds?` | `number`                                   | Wall-clock limit in seconds before the server kills the command.                                                                                                                                                                                                                                                                                                                    | `Pick.timeoutSeconds`                         |

  ***

  <a id="sailboxcheckpoint-1" />

  ### SailboxCheckpoint

  A durable checkpoint handle.

  #### Extends

  * `Omit`\<`native.SailboxCheckpoint`, `"status"` | `"expiresAt"`>

  #### Properties

  | Property                                                 | Type                                | Description                                                                                                                         | Inherited from              |
  | -------------------------------------------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
  | <a id="checkpointgeneration-1" /> `checkpointGeneration` | `number`                            | Checkpoint generation captured by this checkpoint.                                                                                  | `Omit.checkpointGeneration` |
  | <a id="checkpointid-2" /> `checkpointId`                 | `string`                            | The checkpoint id.                                                                                                                  | `Omit.checkpointId`         |
  | <a id="expiresat" /> `expiresAt?`                        | `Date`                              | When the checkpoint expires: seven days out unless a TTL asked for a different window. Starting a Sailbox from it after that fails. | -                           |
  | <a id="sailboxid-1" /> `sailboxId`                       | `string`                            | The Sailbox the checkpoint was taken from.                                                                                          | `Omit.sailboxId`            |
  | <a id="status-8" /> `status`                             | [`SailboxStatus`](#sailboxstatus-1) | -                                                                                                                                   | -                           |

  ***

  <a id="sailboxdeprecation-1" />

  ### SailboxDeprecation

  > **SailboxDeprecation** = `native.SailboxDeprecation`

  Actionable notice that a Sailbox's runtime should be upgraded: a `deadline`
  date and a `message` with upgrade instructions.

  ***

  <a id="sailboxhandle" />

  ### SailboxHandle

  Returned by create / resume / fromCheckpoint: the Sailbox's identity and
  lifecycle status.

  #### Properties

  | Property                           | Type                                | Description                                           |
  | ---------------------------------- | ----------------------------------- | ----------------------------------------------------- |
  | <a id="name-11" /> `name`          | `string`                            | The caller-supplied Sailbox name.                     |
  | <a id="sailboxid-2" /> `sailboxId` | `string`                            | The Sailbox's stable identifier.                      |
  | <a id="status-9" /> `status`       | [`SailboxStatus`](#sailboxstatus-1) | Lifecycle status at the time the operation completed. |

  ***

  <a id="sailboxinfo" />

  ### SailboxInfo

  A read snapshot of a Sailbox (get / list). Timestamps are RFC 3339 strings.

  #### Extends

  * `Omit`\<`native.SailboxInfo`, `"status"`>

  #### Properties

  | Property                                                 | Type                                | Description                                                                                                                  | Inherited from              |
  | -------------------------------------------------------- | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | --------------------------- |
  | <a id="appid-6" /> `appId`                               | `string`                            | Identifier of the owning app.                                                                                                | `Omit.appId`                |
  | <a id="appname-2" /> `appName`                           | `string`                            | Name of the owning app.                                                                                                      | `Omit.appName`              |
  | <a id="architecture-3" /> `architecture`                 | `string`                            | CPU architecture (for example `arm64`).                                                                                      | `Omit.architecture`         |
  | <a id="checkpointgeneration-2" /> `checkpointGeneration` | `number`                            | Monotonic checkpoint generation counter.                                                                                     | `Omit.checkpointGeneration` |
  | <a id="cpurequestedvcpu-1" /> `cpuRequestedVcpu`         | `number`                            | Requested CPU, in vCPUs.                                                                                                     | `Omit.cpuRequestedVcpu`     |
  | <a id="cpuusedvcpu-1" /> `cpuUsedVcpu`                   | `number`                            | Current CPU usage, in vCPUs.                                                                                                 | `Omit.cpuUsedVcpu`          |
  | <a id="createdat-4" /> `createdAt`                       | `string`                            | When the Sailbox was created (RFC 3339).                                                                                     | `Omit.createdAt`            |
  | <a id="createdbyuserid-1" /> `createdByUserId?`          | `string`                            | The user whose credential created this Sailbox (for a fork or restore, the user who ran it). Absent for service-key creates. | `Omit.createdByUserId`      |
  | <a id="deprecation-1" /> `deprecation?`                  | `SailboxDeprecation`                | Actionable runtime deprecation notice, when an upgrade is needed.                                                            | `Omit.deprecation`          |
  | <a id="diskrequestedbytes-1" /> `diskRequestedBytes`     | `number`                            | Requested disk, in bytes.                                                                                                    | `Omit.diskRequestedBytes`   |
  | <a id="diskusedbytes-1" /> `diskUsedBytes`               | `number`                            | Current disk usage, in bytes.                                                                                                | `Omit.diskUsedBytes`        |
  | <a id="errormessage-2" /> `errorMessage?`                | `string`                            | Human-readable error detail when the Sailbox is in an error state.                                                           | `Omit.errorMessage`         |
  | <a id="guestschemaversion-1" /> `guestSchemaVersion?`    | `number`                            | The Sailbox runtime schema version the Sailbox last booted with.                                                             | `Omit.guestSchemaVersion`   |
  | <a id="imageid-2" /> `imageId`                           | `string`                            | Identifier of the image the Sailbox was created from.                                                                        | `Omit.imageId`              |
  | <a id="lastcheckpointedat-1" /> `lastCheckpointedAt?`    | `string`                            | When the most recent checkpoint was taken, if any (RFC 3339).                                                                | `Omit.lastCheckpointedAt`   |
  | <a id="memorymib-1" /> `memoryMib`                       | `number`                            | Configured memory, in MiB.                                                                                                   | `Omit.memoryMib`            |
  | <a id="memoryrequestedbytes-1" /> `memoryRequestedBytes` | `number`                            | Requested memory, in bytes.                                                                                                  | `Omit.memoryRequestedBytes` |
  | <a id="memoryusedbytes-1" /> `memoryUsedBytes`           | `number`                            | Current memory usage, in bytes.                                                                                              | `Omit.memoryUsedBytes`      |
  | <a id="name-12" /> `name`                                | `string`                            | The Sailbox name.                                                                                                            | `Omit.name`                 |
  | <a id="sailboxid-3" /> `sailboxId`                       | `string`                            | The Sailbox id.                                                                                                              | `Omit.sailboxId`            |
  | <a id="startedat-1" /> `startedAt?`                      | `string`                            | When the Sailbox first started running, if it ever has (RFC 3339). A resume does not rewrite it.                             | `Omit.startedAt`            |
  | <a id="statedisksizegib-1" /> `stateDiskSizeGib`         | `number`                            | Configured state-disk size, in GiB.                                                                                          | `Omit.stateDiskSizeGib`     |
  | <a id="status-10" /> `status`                            | [`SailboxStatus`](#sailboxstatus-1) | -                                                                                                                            | -                           |
  | <a id="updatedat-2" /> `updatedAt`                       | `string`                            | When the Sailbox was last updated (RFC 3339).                                                                                | `Omit.updatedAt`            |
  | <a id="vcpucount-1" /> `vcpuCount`                       | `number`                            | Configured number of vCPUs.                                                                                                  | `Omit.vcpuCount`            |
  | <a id="visibility-1" /> `visibility?`                    | `string`                            | `"private"` when access is restricted to the creator; absent/`"org"` is the default org-wide access.                         | `Omit.visibility`           |

  ***

  <a id="sailboxinfopage" />

  ### SailboxInfoPage

  One page of list results plus the pagination envelope.

  #### Extends

  * `Omit`\<`native.SailboxInfoPage`, `"items"`>

  #### Properties

  | Property                     | Type                             | Description                                | Inherited from |
  | ---------------------------- | -------------------------------- | ------------------------------------------ | -------------- |
  | <a id="hasmore" /> `hasMore` | `boolean`                        | Whether more results exist past this page. | `Omit.hasMore` |
  | <a id="items" /> `items`     | [`SailboxInfo`](#sailboxinfo)\[] | -                                          | -              |
  | <a id="limit-3" /> `limit`   | `number`                         | The page size that was applied.            | `Omit.limit`   |
  | <a id="offset-2" /> `offset` | `number`                         | The offset that was applied.               | `Omit.offset`  |
  | <a id="total" /> `total`     | `number`                         | Total matching Sailboxes across all pages. | `Omit.total`   |

  ***

  <a id="sailboxlistorder" />

  ### SailboxListOrder

  > **SailboxListOrder** = `"newest_active"` | `"newest_created"`

  Result ordering for a Sailbox list: most recently active first, or newest
  created first.

  ***

  <a id="sailboxpage" />

  ### SailboxPage

  One page of [Sailbox](#sailbox) instances plus the pagination envelope.

  #### Extends

  * `Omit`\<[`SailboxInfoPage`](#sailboxinfopage), `"items"`>

  #### Properties

  | Property                       | Type                     | Description                                | Inherited from |
  | ------------------------------ | ------------------------ | ------------------------------------------ | -------------- |
  | <a id="hasmore-1" /> `hasMore` | `boolean`                | Whether more results exist past this page. | `Omit.hasMore` |
  | <a id="items-1" /> `items`     | [`Sailbox`](#sailbox)\[] | -                                          | -              |
  | <a id="limit-4" /> `limit`     | `number`                 | The page size that was applied.            | `Omit.limit`   |
  | <a id="offset-3" /> `offset`   | `number`                 | The offset that was applied.               | `Omit.offset`  |
  | <a id="total-1" /> `total`     | `number`                 | Total matching Sailboxes across all pages. | `Omit.total`   |

  ***

  <a id="sailboxsize" />

  ### SailboxSize

  > **SailboxSize** = `"s"` | `"m"` | `"l"`

  Named resource size; each sets the vCPU count plus default memory/disk.

  ***

  <a id="sailboxstatus-1" />

  ### SailboxStatus

  > **SailboxStatus** = `"running"` | `"paused"` | `"sleeping"` | `"failed"` | `"terminated"` | `string` & `object`

  Lifecycle status of a Sailbox. Open: tolerates values added server-side.

  ***

  <a id="sailboxstatusfilter" />

  ### SailboxStatusFilter

  > **SailboxStatusFilter** = `"running"` | `"paused"` | `"sleeping"` | `"failed"` | `"terminated"`

  The closed set of statuses accepted as a list filter.

  ***

  <a id="shelloptions" />

  ### ShellOptions

  Options for [Sailbox.shell](#shell-1).

  #### Properties

  | Property                                        | Type      | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
  | ----------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | <a id="cwd-2" /> `cwd?`                         | `string`  | Working directory for the session.                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
  | <a id="noforward" /> `noForward?`               | `boolean` | While attached, the Sailbox's browser opens and localhost servers reach your machine, files dragged onto the terminal upload and paste as guest paths, and Ctrl+V forwards your clipboard. On devbox images the clipboard is two-way (pastes land on the Sailbox's clipboard, and what you copy inside the Sailbox comes back); other images upload a pasted image as a file and paste its path. Set `true` to turn all of it off, for example for an untrusted or automated session. |
  | <a id="noforwardbrowser" /> `noForwardBrowser?` | `boolean` | Set `true` to keep everything forwarded except browser opens. Ignored when `noForward` is set.                                                                                                                                                                                                                                                                                                                                                                                        |
  | <a id="shell-2" /> `shell?`                     | `string`  | Login shell to run when no command is given (default: the guest's `$SHELL`, else `/bin/bash`). Ignored when a command is given.                                                                                                                                                                                                                                                                                                                                                       |
  | <a id="term-1" /> `term?`                       | `string`  | `$TERM` for the remote pty (default: the local `$TERM`).                                                                                                                                                                                                                                                                                                                                                                                                                              |
  | <a id="timeoutseconds-8" /> `timeoutSeconds?`   | `number`  | Wall-clock limit for the session in seconds; omit for no limit.                                                                                                                                                                                                                                                                                                                                                                                                                       |

  ***

  <a id="sshendpoint" />

  ### SshEndpoint

  The public TCP endpoint a Sailbox's SSH listener is reachable at.

  #### Properties

  | Property               | Type     | Description       |
  | ---------------------- | -------- | ----------------- |
  | <a id="host" /> `host` | `string` | Hostname to dial. |
  | <a id="port" /> `port` | `number` | Port to dial.     |

  ***

  <a id="tcpendpoint" />

  ### TcpEndpoint

  The address to dial for a `tcp` listener.

  #### Properties

  | Property                 | Type     | Description       |
  | ------------------------ | -------- | ----------------- |
  | <a id="host-1" /> `host` | `string` | Hostname to dial. |
  | <a id="kind-1" /> `kind` | `"tcp"`  | -                 |
  | <a id="port-1" /> `port` | `number` | Port to dial.     |

  ***

  <a id="upgraderesult" />

  ### UpgradeResult

  The outcome of a Sailbox runtime upgrade.

  #### Extends

  * `Omit`\<`native.UpgradeResult`, `"status"`>

  #### Properties

  | Property                      | Type                                | Description                                                                                                                                                                                                 | Inherited from |
  | ----------------------------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
  | <a id="applied" /> `applied`  | `boolean`                           | True when no upgrade is left to apply, either because the Sailbox took one just now or because it was already current. False when the upgrade is recorded and takes effect the next time the Sailbox wakes. | `Omit.applied` |
  | <a id="status-11" /> `status` | [`SailboxStatus`](#sailboxstatus-1) | -                                                                                                                                                                                                           | -              |

  ***

  <a id="volumeinfo" />

  ### VolumeInfo

  A managed NFS volume. Timestamps are RFC 3339 strings.

  #### Properties

  | Property                            | Type     | Description                               |
  | ----------------------------------- | -------- | ----------------------------------------- |
  | <a id="backend-1" /> `backend`      | `string` | Storage backend serving the volume.       |
  | <a id="createdat-5" /> `createdAt?` | `string` | Creation time (RFC 3339), if reported.    |
  | <a id="name-13" /> `name`           | `string` | The volume name.                          |
  | <a id="status-12" /> `status`       | `string` | Lifecycle status.                         |
  | <a id="updatedat-3" /> `updatedAt?` | `string` | Last-update time (RFC 3339), if reported. |
  | <a id="volumeid-1" /> `volumeId`    | `string` | The volume id.                            |

  ***

  <a id="volumemountinput" />

  ### VolumeMountInput

  An NFS volume to mount at create time.

  #### Properties

  | Property                           | Type     | Description                                     |
  | ---------------------------------- | -------- | ----------------------------------------------- |
  | <a id="mountpath-1" /> `mountPath` | `string` | Absolute guest path to mount at.                |
  | <a id="volumeid-2" /> `volumeId`   | `string` | The volume id (from `getVolume`/`listVolumes`). |

  ***

  <a id="waitforlisteneroptions" />

  ### WaitForListenerOptions

  Options for [Sailbox.waitForListener](#waitforlistener-1).

  #### Properties

  | Property                                      | Type          | Description                                                                                                                                                                                                                                                                     |
  | --------------------------------------------- | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | <a id="signal-1" /> `signal?`                 | `AbortSignal` | Aborting stops the wait and rejects with the signal's reason. An abandoned in-flight probe winds down on its own (by `timeoutSeconds` at the latest); it does not touch the listener. Because the wind-down relies on the timeout, `signal` requires a finite `timeoutSeconds`. |
  | <a id="timeoutseconds-9" /> `timeoutSeconds?` | `number`      | Give up waiting after this many seconds (default 60; `Infinity` waits indefinitely).                                                                                                                                                                                            |

  ***

  <a id="writeoptions" />

  ### WriteOptions

  Options for uploading a file.

  #### Properties

  | Property                                  | Type      | Description                          |
  | ----------------------------------------- | --------- | ------------------------------------ |
  | <a id="createparents" /> `createParents?` | `boolean` | Create missing parent directories.   |
  | <a id="mode-5" /> `mode?`                 | `number`  | Unix mode bits for the written file. |

  ## Errors

  Errors thrown by this SDK surface. All of them extend [SailError](#sailerror), so an `instanceof SailError` check matches everything below.

  <a id="sailerror" />

  ### SailError

  Base class for every error surfaced by the SDK.

  #### Extends

  * `Error`

  #### Extended by

  * [`InvalidArgumentError`](#invalidargumenterror)
  * [`InternalError`](#internalerror)
  * [`NotFoundError`](#notfounderror)
  * [`PermissionDeniedError`](#permissiondeniederror)
  * [`FileNotFoundError`](#filenotfounderror)
  * [`BrokenPipeError`](#brokenpipeerror)
  * [`TimeoutError`](#timeouterror)
  * [`TransportError`](#transporterror)
  * [`ApiError`](#apierror)
  * [`SailboxCreationError`](#sailboxcreationerror)
  * [`ImageBuildError`](#imagebuilderror)
  * [`SailboxExecutionError`](#sailboxexecutionerror)

  #### Constructors

  <a id="constructor-14" />

  ##### Constructor

  > **new SailError**(`message`, `code?`, `details?`): [`SailError`](#sailerror)

  ###### Parameters

  | Parameter | Type               | Default value |
  | --------- | ------------------ | ------------- |
  | `message` | `string`           | `undefined`   |
  | `code`    | `string`           | `"SailError"` |
  | `details` | `SailErrorDetails` | `{}`          |

  ###### Returns

  [`SailError`](#sailerror)

  ###### Overrides

  `Error.constructor`

  #### Properties

  | Property                            | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  |
  | ----------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | <a id="code-14" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     |
  | <a id="retryable-14" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. |

  ***

  <a id="apierror" />

  ### ApiError

  A non-2xx API response.

  #### Extends

  * [`SailError`](#sailerror)

  #### Constructors

  <a id="constructor" />

  ##### Constructor

  > **new ApiError**(`message`, `details?`): [`ApiError`](#apierror)

  ###### Parameters

  | Parameter | Type               |
  | --------- | ------------------ |
  | `message` | `string`           |
  | `details` | `SailErrorDetails` |

  ###### Returns

  [`ApiError`](#apierror)

  ###### Overrides

  [`SailError`](#sailerror).[`constructor`](#constructor-14)

  #### Properties

  | Property                         | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                         |
  | -------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
  | <a id="body" /> `body?`          | `readonly` | `unknown` | Parsed response body from the failed request, when available.                                                                                                                                                                                                                                                                                | -                                                      |
  | <a id="code" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailError`](#sailerror).[`code`](#code-14)           |
  | <a id="retryable" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailError`](#sailerror).[`retryable`](#retryable-14) |
  | <a id="status" /> `status?`      | `readonly` | `number`  | HTTP status code returned by the API, when the failure carries one.                                                                                                                                                                                                                                                                          | -                                                      |

  ***

  <a id="brokenpipeerror" />

  ### BrokenPipeError

  A stream (e.g. exec stdin) was closed and can no longer be written.

  #### Extends

  * [`SailError`](#sailerror)

  #### Constructors

  <a id="constructor-1" />

  ##### Constructor

  > **new BrokenPipeError**(`message`, `details?`): [`BrokenPipeError`](#brokenpipeerror)

  ###### Parameters

  | Parameter | Type               |
  | --------- | ------------------ |
  | `message` | `string`           |
  | `details` | `SailErrorDetails` |

  ###### Returns

  [`BrokenPipeError`](#brokenpipeerror)

  ###### Overrides

  [`SailError`](#sailerror).[`constructor`](#constructor-14)

  #### Properties

  | Property                           | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                         |
  | ---------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
  | <a id="code-1" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailError`](#sailerror).[`code`](#code-14)           |
  | <a id="retryable-1" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailError`](#sailerror).[`retryable`](#retryable-14) |

  ***

  <a id="commandfailederror" />

  ### CommandFailedError

  Thrown by [Sailbox.run](#run) with `check` when the command exits nonzero
  or times out. Carries the completed result as [result](#result).

  #### Extends

  * [`SailboxExecutionError`](#sailboxexecutionerror)

  #### Constructors

  <a id="constructor-2" />

  ##### Constructor

  > **new CommandFailedError**(`message`, `result`): [`CommandFailedError`](#commandfailederror)

  ###### Parameters

  | Parameter | Type                        |
  | --------- | --------------------------- |
  | `message` | `string`                    |
  | `result`  | [`ExecResult`](#execresult) |

  ###### Returns

  [`CommandFailedError`](#commandfailederror)

  ###### Overrides

  [`SailboxExecutionError`](#sailboxexecutionerror).[`constructor`](#constructor-11)

  #### Properties

  | Property                           | Modifier   | Type                        | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                                                 |
  | ---------------------------------- | ---------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
  | <a id="code-2" /> `code`           | `readonly` | `string`                    | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailboxExecutionError`](#sailboxexecutionerror).[`code`](#code-11)           |
  | <a id="result" /> `result`         | `readonly` | [`ExecResult`](#execresult) | -                                                                                                                                                                                                                                                                                                                                            | -                                                                              |
  | <a id="retryable-2" /> `retryable` | `readonly` | `boolean`                   | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailboxExecutionError`](#sailboxexecutionerror).[`retryable`](#retryable-11) |
  | <a id="rpcstatus" /> `rpcStatus`   | `readonly` | `string`                    | RPC status classifying the failure (for example `"unavailable"`), empty when the failure carries no status. Distinct from [code](#code-14), which stays the taxonomy discriminator on every SailError.                                                                                                                                       | [`SailboxExecutionError`](#sailboxexecutionerror).[`rpcStatus`](#rpcstatus-2)  |

  ***

  <a id="filenotfounderror" />

  ### FileNotFoundError

  A remote file path does not exist.

  #### Extends

  * [`SailError`](#sailerror)

  #### Constructors

  <a id="constructor-3" />

  ##### Constructor

  > **new FileNotFoundError**(`message`, `details?`): [`FileNotFoundError`](#filenotfounderror)

  ###### Parameters

  | Parameter | Type               |
  | --------- | ------------------ |
  | `message` | `string`           |
  | `details` | `SailErrorDetails` |

  ###### Returns

  [`FileNotFoundError`](#filenotfounderror)

  ###### Overrides

  [`SailError`](#sailerror).[`constructor`](#constructor-14)

  #### Properties

  | Property                           | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                         |
  | ---------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
  | <a id="code-3" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailError`](#sailerror).[`code`](#code-14)           |
  | <a id="retryable-3" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailError`](#sailerror).[`retryable`](#retryable-14) |

  ***

  <a id="imagebuilderror" />

  ### ImageBuildError

  A custom image could not be built or its local content could not be uploaded.

  #### Extends

  * [`SailError`](#sailerror)

  #### Constructors

  <a id="constructor-4" />

  ##### Constructor

  > **new ImageBuildError**(`message`, `details?`): [`ImageBuildError`](#imagebuilderror)

  ###### Parameters

  | Parameter | Type               |
  | --------- | ------------------ |
  | `message` | `string`           |
  | `details` | `SailErrorDetails` |

  ###### Returns

  [`ImageBuildError`](#imagebuilderror)

  ###### Overrides

  [`SailError`](#sailerror).[`constructor`](#constructor-14)

  #### Properties

  | Property                           | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                         |
  | ---------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
  | <a id="code-4" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailError`](#sailerror).[`code`](#code-14)           |
  | <a id="retryable-4" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailError`](#sailerror).[`retryable`](#retryable-14) |

  ***

  <a id="internalerror" />

  ### InternalError

  An unexpected internal SDK/core failure.

  #### Extends

  * [`SailError`](#sailerror)

  #### Constructors

  <a id="constructor-5" />

  ##### Constructor

  > **new InternalError**(`message`, `details?`): [`InternalError`](#internalerror)

  ###### Parameters

  | Parameter | Type               |
  | --------- | ------------------ |
  | `message` | `string`           |
  | `details` | `SailErrorDetails` |

  ###### Returns

  [`InternalError`](#internalerror)

  ###### Overrides

  [`SailError`](#sailerror).[`constructor`](#constructor-14)

  #### Properties

  | Property                           | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                         |
  | ---------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
  | <a id="code-5" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailError`](#sailerror).[`code`](#code-14)           |
  | <a id="retryable-5" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailError`](#sailerror).[`retryable`](#retryable-14) |

  ***

  <a id="invalidargumenterror" />

  ### InvalidArgumentError

  Invalid arguments or configuration (bad request, missing/invalid API key).

  #### Extends

  * [`SailError`](#sailerror)

  #### Constructors

  <a id="constructor-6" />

  ##### Constructor

  > **new InvalidArgumentError**(`message`, `details?`): [`InvalidArgumentError`](#invalidargumenterror)

  ###### Parameters

  | Parameter | Type               |
  | --------- | ------------------ |
  | `message` | `string`           |
  | `details` | `SailErrorDetails` |

  ###### Returns

  [`InvalidArgumentError`](#invalidargumenterror)

  ###### Overrides

  [`SailError`](#sailerror).[`constructor`](#constructor-14)

  #### Properties

  | Property                           | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                         |
  | ---------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
  | <a id="code-6" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailError`](#sailerror).[`code`](#code-14)           |
  | <a id="retryable-6" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailError`](#sailerror).[`retryable`](#retryable-14) |

  ***

  <a id="notfounderror" />

  ### NotFoundError

  The Sailbox, volume, or other resource does not exist (or is another org's).

  #### Extends

  * [`SailError`](#sailerror)

  #### Constructors

  <a id="constructor-7" />

  ##### Constructor

  > **new NotFoundError**(`message`, `details?`): [`NotFoundError`](#notfounderror)

  ###### Parameters

  | Parameter | Type               |
  | --------- | ------------------ |
  | `message` | `string`           |
  | `details` | `SailErrorDetails` |

  ###### Returns

  [`NotFoundError`](#notfounderror)

  ###### Overrides

  [`SailError`](#sailerror).[`constructor`](#constructor-14)

  #### Properties

  | Property                           | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                         |
  | ---------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
  | <a id="code-7" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailError`](#sailerror).[`code`](#code-14)           |
  | <a id="retryable-7" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailError`](#sailerror).[`retryable`](#retryable-14) |

  ***

  <a id="permissiondeniederror" />

  ### PermissionDeniedError

  The credential is not permitted to perform the operation.

  #### Extends

  * [`SailError`](#sailerror)

  #### Constructors

  <a id="constructor-8" />

  ##### Constructor

  > **new PermissionDeniedError**(`message`, `details?`): [`PermissionDeniedError`](#permissiondeniederror)

  ###### Parameters

  | Parameter | Type               |
  | --------- | ------------------ |
  | `message` | `string`           |
  | `details` | `SailErrorDetails` |

  ###### Returns

  [`PermissionDeniedError`](#permissiondeniederror)

  ###### Overrides

  [`SailError`](#sailerror).[`constructor`](#constructor-14)

  #### Properties

  | Property                           | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                         |
  | ---------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
  | <a id="code-8" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailError`](#sailerror).[`code`](#code-14)           |
  | <a id="retryable-8" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailError`](#sailerror).[`retryable`](#retryable-14) |

  ***

  <a id="sailboxcreationerror" />

  ### SailboxCreationError

  A Sailbox could not be created (provisioning failed).

  #### Extends

  * [`SailError`](#sailerror)

  #### Constructors

  <a id="constructor-9" />

  ##### Constructor

  > **new SailboxCreationError**(`message`, `details?`): [`SailboxCreationError`](#sailboxcreationerror)

  ###### Parameters

  | Parameter | Type               |
  | --------- | ------------------ |
  | `message` | `string`           |
  | `details` | `SailErrorDetails` |

  ###### Returns

  [`SailboxCreationError`](#sailboxcreationerror)

  ###### Overrides

  [`SailError`](#sailerror).[`constructor`](#constructor-14)

  #### Properties

  | Property                           | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                         |
  | ---------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
  | <a id="body-1" /> `body?`          | `readonly` | `unknown` | Parsed response body from the failed create request, when available.                                                                                                                                                                                                                                                                         | -                                                      |
  | <a id="code-9" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailError`](#sailerror).[`code`](#code-14)           |
  | <a id="retryable-9" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailError`](#sailerror).[`retryable`](#retryable-14) |
  | <a id="status-2" /> `status?`      | `readonly` | `number`  | HTTP status code returned by the create request, when the failure carries one.                                                                                                                                                                                                                                                               | -                                                      |

  ***

  <a id="sailboxexecrequestnotfounderror" />

  ### SailboxExecRequestNotFoundError

  The exec request could not be found (for example after the Sailbox
  moved machines).

  #### Extends

  * [`SailboxExecutionError`](#sailboxexecutionerror)

  #### Constructors

  <a id="constructor-10" />

  ##### Constructor

  > **new SailboxExecRequestNotFoundError**(`message`, `details?`): [`SailboxExecRequestNotFoundError`](#sailboxexecrequestnotfounderror)

  ###### Parameters

  | Parameter | Type               |
  | --------- | ------------------ |
  | `message` | `string`           |
  | `details` | `SailErrorDetails` |

  ###### Returns

  [`SailboxExecRequestNotFoundError`](#sailboxexecrequestnotfounderror)

  ###### Overrides

  [`SailboxExecutionError`](#sailboxexecutionerror).[`constructor`](#constructor-11)

  #### Properties

  | Property                            | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                                                 |
  | ----------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
  | <a id="code-10" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailboxExecutionError`](#sailboxexecutionerror).[`code`](#code-11)           |
  | <a id="retryable-10" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailboxExecutionError`](#sailboxexecutionerror).[`retryable`](#retryable-11) |
  | <a id="rpcstatus-1" /> `rpcStatus`  | `readonly` | `string`  | RPC status classifying the failure (for example `"unavailable"`), empty when the failure carries no status. Distinct from [code](#code-14), which stays the taxonomy discriminator on every SailError.                                                                                                                                       | [`SailboxExecutionError`](#sailboxexecutionerror).[`rpcStatus`](#rpcstatus-2)  |

  ***

  <a id="sailboxexecutionerror" />

  ### SailboxExecutionError

  Base class for failures during an exec.

  #### Extends

  * [`SailError`](#sailerror)

  #### Extended by

  * [`CommandFailedError`](#commandfailederror)
  * [`SailboxTerminatedError`](#sailboxterminatederror)
  * [`SailboxExecRequestNotFoundError`](#sailboxexecrequestnotfounderror)
  * [`SailboxHostLostError`](#sailboxhostlosterror)

  #### Constructors

  <a id="constructor-11" />

  ##### Constructor

  > **new SailboxExecutionError**(`message`, `code?`, `details?`): [`SailboxExecutionError`](#sailboxexecutionerror)

  ###### Parameters

  | Parameter | Type               | Default value             |
  | --------- | ------------------ | ------------------------- |
  | `message` | `string`           | `undefined`               |
  | `code`    | `string`           | `"SailboxExecutionError"` |
  | `details` | `SailErrorDetails` | `{}`                      |

  ###### Returns

  [`SailboxExecutionError`](#sailboxexecutionerror)

  ###### Overrides

  [`SailError`](#sailerror).[`constructor`](#constructor-14)

  #### Properties

  | Property                            | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                         |
  | ----------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
  | <a id="code-11" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailError`](#sailerror).[`code`](#code-14)           |
  | <a id="retryable-11" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailError`](#sailerror).[`retryable`](#retryable-14) |
  | <a id="rpcstatus-2" /> `rpcStatus`  | `readonly` | `string`  | RPC status classifying the failure (for example `"unavailable"`), empty when the failure carries no status. Distinct from [code](#code-14), which stays the taxonomy discriminator on every SailError.                                                                                                                                       | -                                                      |

  ***

  <a id="sailboxhostlosterror" />

  ### SailboxHostLostError

  The machine hosting the Sailbox was lost while an exec was in flight.

  #### Extends

  * [`SailboxExecutionError`](#sailboxexecutionerror)

  #### Constructors

  <a id="constructor-12" />

  ##### Constructor

  > **new SailboxHostLostError**(`message`, `details?`): [`SailboxHostLostError`](#sailboxhostlosterror)

  ###### Parameters

  | Parameter | Type               |
  | --------- | ------------------ |
  | `message` | `string`           |
  | `details` | `SailErrorDetails` |

  ###### Returns

  [`SailboxHostLostError`](#sailboxhostlosterror)

  ###### Overrides

  [`SailboxExecutionError`](#sailboxexecutionerror).[`constructor`](#constructor-11)

  #### Properties

  | Property                            | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                                                 |
  | ----------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
  | <a id="code-12" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailboxExecutionError`](#sailboxexecutionerror).[`code`](#code-11)           |
  | <a id="retryable-12" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailboxExecutionError`](#sailboxexecutionerror).[`retryable`](#retryable-11) |
  | <a id="rpcstatus-3" /> `rpcStatus`  | `readonly` | `string`  | RPC status classifying the failure (for example `"unavailable"`), empty when the failure carries no status. Distinct from [code](#code-14), which stays the taxonomy discriminator on every SailError.                                                                                                                                       | [`SailboxExecutionError`](#sailboxexecutionerror).[`rpcStatus`](#rpcstatus-2)  |

  ***

  <a id="sailboxterminatederror" />

  ### SailboxTerminatedError

  The Sailbox was terminated while an exec was in flight.

  #### Extends

  * [`SailboxExecutionError`](#sailboxexecutionerror)

  #### Constructors

  <a id="constructor-13" />

  ##### Constructor

  > **new SailboxTerminatedError**(`message`, `details?`): [`SailboxTerminatedError`](#sailboxterminatederror)

  ###### Parameters

  | Parameter | Type               |
  | --------- | ------------------ |
  | `message` | `string`           |
  | `details` | `SailErrorDetails` |

  ###### Returns

  [`SailboxTerminatedError`](#sailboxterminatederror)

  ###### Overrides

  [`SailboxExecutionError`](#sailboxexecutionerror).[`constructor`](#constructor-11)

  #### Properties

  | Property                            | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                                                 |
  | ----------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
  | <a id="code-13" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailboxExecutionError`](#sailboxexecutionerror).[`code`](#code-11)           |
  | <a id="retryable-13" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailboxExecutionError`](#sailboxexecutionerror).[`retryable`](#retryable-11) |
  | <a id="rpcstatus-4" /> `rpcStatus`  | `readonly` | `string`  | RPC status classifying the failure (for example `"unavailable"`), empty when the failure carries no status. Distinct from [code](#code-14), which stays the taxonomy discriminator on every SailError.                                                                                                                                       | [`SailboxExecutionError`](#sailboxexecutionerror).[`rpcStatus`](#rpcstatus-2)  |

  ***

  <a id="timeouterror" />

  ### TimeoutError

  A request exceeded its timeout.

  #### Extends

  * [`SailError`](#sailerror)

  #### Constructors

  <a id="constructor-15" />

  ##### Constructor

  > **new TimeoutError**(`message`, `details?`): [`TimeoutError`](#timeouterror)

  ###### Parameters

  | Parameter | Type               |
  | --------- | ------------------ |
  | `message` | `string`           |
  | `details` | `SailErrorDetails` |

  ###### Returns

  [`TimeoutError`](#timeouterror)

  ###### Overrides

  [`SailError`](#sailerror).[`constructor`](#constructor-14)

  #### Properties

  | Property                            | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                         |
  | ----------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
  | <a id="code-15" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailError`](#sailerror).[`code`](#code-14)           |
  | <a id="retryable-15" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailError`](#sailerror).[`retryable`](#retryable-14) |

  ***

  <a id="transporterror" />

  ### TransportError

  A network/connection transport failure.

  #### Extends

  * [`SailError`](#sailerror)

  #### Constructors

  <a id="constructor-16" />

  ##### Constructor

  > **new TransportError**(`message`, `details?`): [`TransportError`](#transporterror)

  ###### Parameters

  | Parameter | Type               |
  | --------- | ------------------ |
  | `message` | `string`           |
  | `details` | `SailErrorDetails` |

  ###### Returns

  [`TransportError`](#transporterror)

  ###### Overrides

  [`SailError`](#sailerror).[`constructor`](#constructor-14)

  #### Properties

  | Property                            | Modifier   | Type      | Description                                                                                                                                                                                                                                                                                                                                  | Inherited from                                         |
  | ----------------------------------- | ---------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------ |
  | <a id="code-16" /> `code`           | `readonly` | `string`  | Stable, language-neutral error code (e.g. `"NotFound"`).                                                                                                                                                                                                                                                                                     | [`SailError`](#sailerror).[`code`](#code-14)           |
  | <a id="retryable-16" /> `retryable` | `readonly` | `boolean` | Advisory: `true` when retrying the same call may succeed (a transport failure, HTTP 429 or a gateway 5xx, a transient RPC failure). `false` when the failure is deterministic (bad argument, missing resource, permission). The SDK's built-in retry already covers the transient window for most calls; this classifies what leaks past it. | [`SailError`](#sailerror).[`retryable`](#retryable-14) |
</div>
