Managoat.Sandbox.Daytona (managoat_sandbox v0.2.0)

Copy Markdown View Source

The Daytona adapter: Managoat.Sandbox implemented against daytona.io (or a self-hosted Daytona via DAYTONA_API_URL).

Daytona is the closest semantic match to the contract of any provider:

  • sandboxes are genuinely name-addressable — the minted name goes straight into API paths, no metadata emulation;
  • the daemon journals command output server-side and the log stream replays it from byte zero before following — the replay-from-start contract holds natively, with no shim;
  • stop/start preserve the whole disk, so :suspend is real; a long-parked sandbox auto-archives to object storage (still startable, just slower) so it stops consuming disk quota;
  • ttlMinutes: 0 and autoStopInterval: 0 at create — no TTL treadmill; Fountain's own lifecycle owns suspension.

Streaming commands are daemon-side sessions: spawn/4 creates a session named by the command tag, execs asynchronously, and a Managoat.Sandbox.Daytona.LogStream WebSocket translates the journaled log into owner frames. attach/3 is the same stream opened again — the journal replays from the start. Stdin is the daemon's per-command FIFO: line-oriented (a trailing newline is appended when missing), which suits the NDJSON JSON-RPC the ACP path writes; there is no stdin EOF operation, so close_stdin/1 is a documented no-op — the paths that need an ending signal (codex's one-shot login) pipe via exec/4 instead.

Sandboxes are created from DAYTONA_SNAPSHOT, which must carry the agent CLIs and the sprite user layout the provisioning pipeline assumes — see images/daytona/ for the reference Dockerfile.