Constructor options
SandboxesOptions, all optional. It extends EngineOptions, which is where
socketPath comes from.
runtime also reads NATIVESANDBOX_OCI_RUNTIME from the environment.
Properties
create
Promise<Sandbox>. The sandbox by that name: the existing one if its shape still
serves, otherwise a fresh one. See reuse.
SandboxSpec
check
Promise<{ ok: boolean; engine?: string; problem?: string }>. Never throws. Whether
this host can run a sandbox at all, and why not when it cannot.
Worth calling at startup; the alternative is discovering it on a user’s first command.
ping
Promise<string> — the engine’s version. Throws if it is not reachable. check() is
the same question without the exception.
list
Promise<SandboxInfo[]> — every sandbox this runtime owns, in any state. Scoped by
label to containers created with this prefix.
workspaceDir
string — the host directory mounted into that sandbox, whether or not it exists yet.
Use it to stage files before the first create().
remove
Promise<boolean> — whether there was one. Removes the container and its workspace.
Removing something already gone is not an error.
removeAll
Promise<number> — how many were removed.
stopIdle
Promise<string[]> — the names stopped. Stops every sandbox past its idle timeout,
never one with a command in flight. now is for testing.
retireExpired
Promise<string[]> — the names retired. Removes the container and keeps the
workspace for every sandbox past its maximum lifetime, never one with a command in flight.
sweep
Promise<{ stopped: string[]; retired: string[] }>. Both passes. This is what the timer
runs.