mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-15 23:32:46 +00:00
Three copies of the same mapping turned an environment into a sandbox: Docker had its own options type built from the environment, Daytona a config type with its own network enum and minute-and-gigabyte units, and plugin kinds a third options type, each with its own spec builder, constructor, and attach function, and the run spec had a variant per provider carrying them. The mapping now runs once. SandboxOptions is what any environment asks of any provider; options_from_environment builds it, and one base spec carries the source, name, labels, variables, resources, and network policy. Docker and Daytona are overlays on that spec: Docker fixes its working directory, supplies the default image, and pulls; Daytona replaces the source with the snapshot it ensures from the same image or Dockerfile, fixes its working directory and name, and sets the timers. The snapshot's content-addressed name is unchanged, since the identity still hashes the image or Dockerfile and the resources in whole gigabytes. SandboxSpec has two variants, Local and Provider, and the worker and the server preflight build the Provider one without knowing which kind it is; provider_sandbox and attach_provider_sandbox connect any kind through the single construction function and lay the repository out where that kind keeps it. The per-provider constructors, the config module, and the environment mapping module are gone, and the SDK reference and the integration tests use the one constructor. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| fabro-cli | ||
| fabro-mcp-server | ||
| fabro-server | ||
| fabro-spa | ||