Types of the Ruby SDK with no Python counterpart of the same name: mostly option objects and result records. The methods that take them are on the area pages.
svm auth login (the browser device-code sign-in) and svm auth logout, and the signed-in session the other commands fall back to when there is no SVM_API_KEY, SVM_ACCESS_TOKEN or saved api_key: the same requests, checks, messages and credential store as the Python CLI (svm/cli_auth.py), so a sign-in made by one CLI is used by the other.
svm auth configure: saves the domain and an API key (never echoed, never an argument) to the credentials file the SDKs read, with Python’s checks, messages and file layout (svm/cli_auth.py). The domain is –domain or SVM_DOMAIN: the project file is not read.
svm auth info: the domain, which credential the CLI uses (api_key, access_token, session or none) and, for a signed-in user, who that is. No credential is ever part of the answer. /v2/me answers only a signed-in user, so an API key shows no user; the keyring is opened only when no credential is in the environment. settings is the credential the SDKs would use (the environment, else the credentials file), or nil: then the keyring session. signed_in is true only when GET /v2/me answered; it answers only a signed-in user, so an API key or a service account’s token it refuses (401 or 403) is reported with signed_in false, not as an error.
Python’s request_json: one JSON call to the API with no stored credential; an error answer is an ApiError, a broken connection a SandboxError that names the API.
https, or http to a loopback host; a host and no user information. A fragment is allowed: the console routes in the fragment (https://host/#/device), and a fragment never leaves the browser.
What the data-plane commands ask of a sandbox, in one place so a test can stand in for it. The real one is a thin layer over SVM::Sandbox (commands and files); the recorded cases fix what the commands ask of it.
Starts the guest’s shell on a terminal of cols x rows (as Python’s pty.create: bash, or PowerShell on Windows, with no arguments), as terminal’s user, in its cwd and with its envs when given; returns its pid.
The credential from #settings, else the session svm auth login saved in the OS credential store (refreshed for an access token), as the Python CLI’s _client does.
The domain a command talks to and where it came from (–domain, SVM_DOMAIN, the credentials file or the project file).
A project file (svm.toml) never chooses the domain a credential from the environment or the credentials file is sent to (cert-2026-11-29, last review finding): only –domain, SVM_DOMAIN or the credentials file’s own domain do. A project domain that differs from the one the credential goes to or is the only one configured, is a configuration error.
The text Python prints for an error: a data-plane failure is its message alone (“not_found”), without the ERROR_CODE_PATH_NOT_FOUND: prefix SVM::ProcessError#message carries.
The credential as the SDKs resolve it: SVM_API_KEY or SVM_ACCESS_TOKEN, else the api_key in the credentials file ($SVM_CONFIG, else the default path); nil when there is none. domain (–domain, SVM_DOMAIN or svm.toml; source says which) wins over the file’s domain for a key from the environment.
A key from the credentials file is only sent to the domain saved with it (cert-2026-11-29 review R2-1): another domain, from –domain, SVM_DOMAIN or the project file, is a configuration error, so a cloned repository’s svm.toml cannot redirect it. A file without a domain lets –domain or SVM_DOMAIN choose, never the project file.
gRPC-Web over HTTP/1.1 (unary, server-streaming and client-streaming calls): the messages travel in 5-byte-framed protobuf, the status in a final trailer frame. The edge relays them as ordinary gRPC.
Ends the calls in flight on this channel: they raise CANCELLED and are not retried (a follower does not reconnect). A later call opens a new connection.
The HTTP version a client was asked for: nil (the default, which is HTTP/1.1), “1.1” or “2”; anything else is an ArgumentError. Net::HTTP speaks HTTP/1.1 only, so “2” is the optional +http-2+ gem (SVM::Http2): without it, and with a proxy (the tunnel is HTTP/1.1), “2” is refused rather than ignored.
An http:// proxy URL, optionally with user:password@, as a URI; the error never repeats it (it may hold a password). Net::HTTP on Ruby 2.6 speaks plain HTTP to a proxy, so an https:// proxy is refused rather than used without TLS.
Result types of the code interpreter, as Python’s svm.code_interpreter_models has them. They live in this namespace because SVM::Result is a command’s result.
Where the API key and domain come from: arguments, then the environment, then a config file. The file is JSON with domain and api_key: $SVM_CONFIG when set (and then it must exist), else <XDG_CONFIG_HOME or ~/.config>/fcap/config.json when that exists. A file that holds an api_key must not be readable by group or others. The first source that gives any credential decides whether the key or the bearer token is used; the domain is chosen the same way on its own.
The credentials could not be found or the config file cannot be trusted. kind is no_credentials, config_permissions, config_invalid, config_missing or conflict.
An address of the origin that answers, for every new connection (the kept-alive ones are SVM::ConnectionPool’s).
Net::HTTP walks a host’s addresses one after another: on a machine whose IPv6 route leads nowhere, a name with AAAA and A records costs 3 s or more per dead address on every new connection and every stream (6 s in the lab where this was found).
The IP address to connect to for host, or nil to let Net::HTTP decide: nil for an IP literal, for a host with one address family, when nothing answered in timeout seconds (Net::HTTP then reports its own error), and on Ruby 3.4 and newer, whose sockets already race the families. The choice is remembered for ADDRESS_TTL seconds.
Started HTTP/1.1 connections kept per origin and reused across calls (keep-alive), so a call does not pay DNS, TCP and TLS again. Without it every call opened a connection; on a network whose IPv6 route reaches nothing, Ruby before 3.4 (no Happy Eyeballs) waits on each IPv6 address first, about 6 s per call against a dual-stack host (mtcert 2026-12-04).
One pool serves the whole process: credentials travel in each request’s headers, never on the connection, so clients of any credential share it. A connection is used by one call at a time. It is not reused after a failed call, after it has been idle longer than IDLE_SECONDS, or, for a call that must not be sent twice, after REPLAY_SAFE_SECONDS: an idle socket the server has just closed would fail such a call after it may have been written. A child process after fork drops its parent’s connections without closing them (closing would end the parent’s TLS sessions).
Yields (http, reused): a started connection for key, built by factory when none is idle. When the block returns, the connection goes back to the pool; when it raises, the connection is closed. repeatable is false for a call that must not be sent twice, which then takes only a connection used within REPLAY_SAFE_SECONDS. fresh skips the idle ones.
The file-call options the command line set (user, gzip, metadata); nothing for one left alone, so a call that names none is exactly the call it always was.
What git and the language-server installs need while a sandbox’s layer-7 egress is on: the proxy URL (credentials included) and the CA it signs with, written owner-only into the sandbox. Read at each use from the sandbox’s egress settings, never put on a command line.
The sandbox’s egress settings when the firewall is on with a proxy and a CA, else nil. A deployment without the rules, or a key that may not read them, means no proxy.
The text of a grpc-message header or trailer. gRPC percent-encodes it (“sandbox%20has%20ended”); a sequence that is not %XX stays as sent, and bytes that do not decode to UTF-8 are replaced rather than raised on.
Whether the same call may succeed on a new connection: the connection broke or the sandbox is not ready. A guest that took the call and stopped answering (reason GUEST_UNRESPONSIVE) is not: the host has already waited its health timeout, so a new connection meets the same stuck guest; the caller gets GuestUnresponsiveError at once.
A file or directory in a sandbox does not exist: a data-plane failure (ProcessError) with envd’s ERROR_CODE_PATH_NOT_FOUND (the reference vendor’s FileNotFoundError). A NotFoundError, so rescue SVM::NotFoundError still catches it.
The most specific error class for a code. GUEST_UNRESPONSIVE, SANDBOX_UNREACHABLE and FILE_UPLOAD_FAILED name their classes from the code alone (never from the path). For NOT_FOUND the request’s path says what is missing (a sandbox, volume or secret); HTTP 507 is NotEnoughSpaceError; an unknown code stays a plain ApiError.
Follows a process across broken connections. A command’s output is addressed by byte offset, so a stream that breaks is picked up again with Connect from the offsets already seen: nothing is lost and nothing repeats. A stream that broke before its start event is ambiguous, so the client looks for it by its tag and starts it again only when it is not there.
Output the way the Python CLI writes it: str() of a value (True, None, single-quoted dicts) in text mode, and json.dumps(sort_keys=True, ensure_ascii=True) in JSON mode, so every SDK’s CLI prints the same bytes.
Persistent shell sessions and tmux-style terminals: helpers that run in the sandbox through its commands. They take anything that answers run(command, **options) with a result that has stdout, stderr and exit_code, which a Sandbox does through Sandbox#sessions and #terminals.
HTTP/2 for the client’s http_version: “2” option. Net::HTTP speaks HTTP/1.1 only, so this is an optional extra built on the pure-Ruby +http-2+ gem (the protocol: frames, HPACK, flow control), loaded only when a client asks for it; the sockets are this file’s. Over TLS it offers only h2 by ALPN, and on +http://+ it speaks HTTP/2 with prior knowledge (h2c), so a server that does not speak HTTP/2 fails the call; nothing falls back to HTTP/1.1. A Session answers the subset of Net::HTTP the client uses (the timeouts and request), one connection per call, as the Net::HTTP path does.
macOS keychain through /usr/bin/security; Python’s keyring macOS backend keeps a generic password with the same service (kSecAttrService) and account (kSecAttrAccount). The token never appears in a process’s arguments: security -i reads the add command on standard input.
The OS credential stores, reached as Python’s keyring reaches them (service “firecracker-agent-platform:<api url>”, account “session-refresh”), so a sign-in made by one CLI is used by the other. Only the rotating refresh token is kept. Like Python, there is no file fallback: without an OS store the CLI refuses to keep a token.
The commands that hold a terminal or a socket open: sandbox connect, sandbox forward and ssh, plus eval, which runs the svm-eval harness. Each behaves as the Python CLI’s does (svm/cli.py, svm/cli_network.py).
Raw mode on a terminal standard input (restored after), keys sent as they are typed, the terminal resized with the local window (SIGWINCH), the guest’s output written as it arrives until the shell ends.
Piped input (F166) waits for the shell’s first output. Sent earlier, it reached the PTY before the shell’s line editor took the terminal, so the guest’s terminal echoed it (“echo …\r\nexit\r\n”) and the replay from the start printed that echo ahead of the prompt. Once the shell has written its prompt it echoes each line itself, after the prompt, as the other CLIs show. Keys typed on a terminal are sent at once, as before.
svm eval ...: the svm-eval harness (bench/eval) with the rest of the line and SVM_DOMAIN from –domain, SVM_DOMAIN or svm.toml. Python imports the harness in-process; it is a Python package, so this runs its svm-eval command, which is the same entry point.
Runs a program found on PATH with this process’s standard streams; its exit code (negative for a signal, as Python’s subprocess.call) is the command’s.
The help for a command path: the usage line, then a group’s commands or a command’s arguments. Raises UsageError for an unknown path (as svm help nope).
Is a PNG one flat colour? Used by Desktop#screenshot to tell the black frame an X server gives before the desktop session has painted from a real frame. An image this cannot decode (palette, 16-bit, interlaced, damaged) counts as not flat, so the caller never waits on what it cannot judge.
svm.toml: found from the working directory upwards, or named by –config / SVM_PROJECT_CONFIG (SVM_CONFIG is the SDKs’ credentials file, never the project file). Unknown keys are refused.
A protobuf codec driven by the generated schema (SVM::Envd::SCHEMA), so the SDK needs no protobuf library. Messages are Hashes keyed by field name; only the fields present on the wire come back. int64 values are Integers, bytes are binary Strings, enums are their names (an unknown number stays a number), google.protobuf.Timestamp is an RFC 3339 String.
How a failed request is repeated. max_attempts counts the first try. The wait after attempt n is base_delay * 2**(n-1) capped at max_delay, scaled by jitter (a number in [0.5, 1]); a server’s own Retry-After replaces it, and one longer than max_retry_after ends the call at once. A POST is repeated only because the client attaches an idempotency key to it that every attempt reuses.
A second command in each branch scores it (the last number it prints). argv[0] must be an absolute path in the guest (it is not run through a shell); timeout_seconds (1 to 300; the API’s default is 60) bounds it. It reads the command’s stdout on its stdin and its exit code in $SVM_EXIT_CODE.
A script run by /bin/sh in each branch scores it (the last number it prints); timeout_seconds (1 to 300; the API’s default is 60) bounds it. The script reads the command’s stdout on its stdin and in $SVM_STDOUT, and its exit code in $SVM_EXIT_CODE.
sandbox info, sandbox pause [--wait] and sandbox resume [--timeout-seconds N] [--wait]: one call, then the sandbox’s safe fields (never its tokens). With –wait, the sandbox is followed as the SDK’s pause(wait)/resume(wait) do (GET while it is pausing or resuming), so the answer is the settled state even from an API that answers before the change is done.
The Secret Service (GNOME Keyring, KeePassXC, KWallet’s Secret Service) through libsecret’s secret-tool. Python’s keyring SecretService backend stores the item with these attributes and label and looks it up by service and username; the token goes on standard input.
Sends req (a Net::HTTPRequest) and returns the Response; with a block, yields it as soon as the headers are in and reads the rest of the body when the block returns (or lets the block’s read_body stream it). The connection is closed afterwards.
Raised inside #with by a caller that found its reused connection stale; the connection is closed and the caller sends again on a new one (fresh: true).
Windows Credential Manager as Python’s keyring WinVaultKeyring uses it: a generic credential whose target is the service and whose user is the account (or, when another user already holds the service target, the target “account@service”), the secret as UTF-16LE, persisted for the enterprise, through advapi32 with Fiddle (stdlib).
The same desktop controls on a Windows sandbox (WIN-005). There is no shell to run xdotool in: each call is one PowerShell command that carries a base64 JSON request to the helper installed in the sandbox’s interactive session.
Runs command in the desktop’s session every interval seconds until the block accepts its result (true), or timeout seconds pass (false). The block gets the command’s result (stdout, stderr, exit_code) whatever its exit code. The command runs at least once.
Waits until the interactive session answers the helper and has drawn a frame that is not one flat colour, and returns the seconds it took (a Float). Raises Timeout::Error after timeout seconds (Python raises its built-in TimeoutError).