Skip to main content

glovebox-driver

The host-side Python that drives one glovebox microVM: boot it, run commands in it, read what it let out, and tear it down. It imports no eval framework, so an integration picks the framework and this package holds the VM.

inspect-glovebox and shepherd-glovebox are both built on it.

What the host needs

The driver runs the glovebox command, which drives Docker's sbx sandbox runtime. Install glovebox and sign in to sbx, then ask whether this host qualifies:

glovebox sandbox preflight

Set GLOVEBOX_BIN when the executable is not on PATH.

The modules

Module Owns
cli resolving the glovebox executable and running one sandbox verb
config GloveboxSandboxConfig — what a VM may be and which hosts it may reach
session GloveboxSession — one live microVM, from boot to teardown
wedge booting again when the HOST, not the work, wedged the first attempt
guest_exec the argv for one command inside the guest, as the de-privileged user
evidence reading the policy decision log the sandbox wrote
leak reaping a microVM whose owner died before teardown

Boot one

import os
from pathlib import Path

from glovebox_driver import cli
from glovebox_driver.session import GloveboxSession

workspace = Path("/path/to/workspace")
workspace.mkdir(parents=True, exist_ok=True)
os.chmod(workspace, 0o755)
ready_path = workspace / ".ready"
ready_path.touch()

cli.preflight()
session = GloveboxSession.boot(str(workspace), str(ready_path), boot_timeout=300)
try:
    ...
finally:
    session.teardown()

boot waits for ready_path to exist; it never creates it. Every in-tree caller touches its own marker first, and the guest user needs permission to traverse the workspace, so a freshly created directory needs its mode set too.

Apache-2.0.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glovebox_driver-0.2.0.tar.gz (54.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

glovebox_driver-0.2.0-py3-none-any.whl (59.2 kB view details)

Uploaded Python 3

File details

Details for the file glovebox_driver-0.2.0.tar.gz.

File metadata

  • Download URL: glovebox_driver-0.2.0.tar.gz
  • Upload date:
  • Size: 54.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for glovebox_driver-0.2.0.tar.gz
Algorithm Hash digest
SHA256 094ccfe94fdedd78efb203d39400c9fae846910fb494c47930283cd77fd30297
MD5 fa202567b4e5868d05298ad0018a239f
BLAKE2b-256 6c42a524ed993c788e244e9dc3db86399a98bc43d9404f69ddf45f409549d739

See more details on using hashes here.

File details

Details for the file glovebox_driver-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: glovebox_driver-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 59.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.10 {"installer":{"name":"uv","version":"0.12.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for glovebox_driver-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce10395b40c0e379c4c6147cb394046d92b97b75063e8e1b59959ec76d0ecbaa
MD5 b19d05f6a273dd8dfd6120df9c50d70e
BLAKE2b-256 84cf1b878cd14a9aa4d96e8c6ad79e8065be2a33ad1b9a83b690a15e0643616a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page