Skip to content

hostel v0.0.1

Choose a tag to compare

@qiankunli qiankunli released this 03 Jul 11:25
· 345 commits to main since this release
2e751b2

First versioned release.

hostel is a sandbox runtime for AI agents: one process manages many isolated execution units (beds) behind an OpenSandbox-compatible HTTP API.

Highlights

Bed model

  • bed = guest unit = one sandbox to the caller (workspace + long-lived shell, state persists across commands); default bed fallback for single-tenant callers
  • explicit lifecycle ACTIVE → EVICTING → DORMANT — the snapshot is the durable identity; --max-beds backpressure (429) for upstream schedulers

Data isolation tiers (hostel-metaphor levels, not mechanism names)

  • dorm (no walls) / room (your data locked, commons shared) / suite (fully private view) / auto = environment ceiling; effective = min(requested, ceiling), over-asks degrade honestly
  • mechanisms behind the levels: direct · Landlock (__confine re-exec, zero caps) · per-bed uid (no-Landlock kernels, NNP-hardened) · bwrap (private mount ns)
  • host facts collected once, surfaced in /healthz; every mechanism proves itself with a boot smoke — declared capability ≠ enforced

Persistence (S3-compatible)

  • --store auto (default): configure --s3-bucket and beds persist via cas — the workspace is catar-serialized and CDC-chunked (via desync); only chunks new since the previous snapshot upload, an unchanged workspace re-persists with zero uploads
  • tarball layout as explicit fallback (one tar.gz per bed)
  • dual-activation conflict detector: persist refuses to overwrite a newer generation (first-writer-wins, ErrConflict)
  • luggage: evicted beds leave a local warm copy; same-instance resume skips the download (generation-based freshness), disk bounded by watermark GC; GET /v1/inventory gives schedulers capacity + per-bed freshness in one call

Amenities

  • shared heavyweight facilities sliced by app-native tenancy: Chromium (one browser, per-bed BrowserContext) with full interaction verbs

Image

docker run hub.byted.org/epscprelease/hostel:v0.0.1

Multi-arch (linux/amd64, linux/arm64), bwrap + chromium included; hostel --health as HEALTHCHECK.