Sandbox provider configuration

The controller discovers installed compute packages independently of their factory settings. A provider that needs configuration remains visible in GET /v1/compute/providers before its adapter can initialize. Discovery, saved configuration and successful paid provisioning are separate states.

Provider credentials continue to use the encrypted credentials route. Nonsecret factory settings use the existing controller integration-state storage and survive controller restarts. They are never environment variables, workspace grants, account-home exports or snapshot contents.

Provider Nonsecret settings Credential
Modal Required appName and Linux container image; optional environment, default main A single-line JSON string containing tokenId and tokenSecret; existing local Modal accounts are not read
Cloudflare Sandboxes Required workerUrl, the HTTPS workers.dev origin of the separately deployed devctrl sandbox bridge Worker Its independent scoped bridge secret; never the Cloudflare account API token
E2B Optional template E2B API key
Daytona Optional snapshot and target, default us Daytona API key

The Cloudflare setting uses the constructor's existing workerUrl spelling. Its origin must have no user information, path, query or fragment. Only standard *.workers.dev hosts are accepted; private endpoints, alternate ports and custom domains are unsupported. The adapter enforces the same allowlist before reading credentials or making a request, and disables redirects. See Cloudflare's workers.dev routing. The configuration route neither builds an image nor deploys a Worker. Modal uses an existing App and does not create one while settings are saved. Its selected Linux image must contain the shell and process utilities described in the adapter implementation notes. An arbitrary image reference does not establish command compatibility.

Administrator API

These settings and credentials are global to the server operator. Their storage keys are compute-configuration:<provider> and compute:<provider> respectively; they are not tenant settings. Both ordinary server users and tenant administrators are denied access to configuration and credential routes, including reads. The canonical operator administrator or existing global operator credential is required. No tenant administrator can swap another user's provider target through these routes.

All configuration operations return Cache-Control: no-store:

Operation Route Body
Read settings GET /v1/compute/providers/:provider/configuration None
Replace settings PUT /v1/compute/providers/:provider/configuration { "configuration": { ... } }
Reset settings DELETE /v1/compute/providers/:provider/configuration None

The response contains configuration, configurationFields, configurationComplete and available. Provider discovery additionally reports credentialConfigured, configured, managedSessionEligible, limitation and an optional credentialHint. configured means required settings and a stored credential are present. available means an adapter factory initialized. Neither value proves provider authentication, SDK installation, account entitlement, detached-process survival or paid cloud provisioning.

For example, a Modal replacement body is:

{
  "configuration": {
    "appName": "existing-devctrl-app",
    "image": "debian:bookworm-slim",
    "environment": "main"
  }
}

For Cloudflare:

{
  "configuration": {
    "workerUrl": "https://sandbox-bridge.example.workers.dev"
  }
}

Only declared fields and their declared value types are accepted. Unknown keys, credential keys placed in settings, unsafe origins, missing required fields and invalid values return a bounded 400 response without echoing the input. An unknown installed-provider identity returns 404. Reset retains encrypted credentials and package discovery; it deactivates adapters whose required settings are now absent. Optional settings reset to adapter defaults.

Settings are validated and a replacement adapter is constructed before saving and replacing the active adapter. Factory failure leaves the preceding configuration active. Updates and reset return 409 while a managed resource remains outside the destroyed state, a creation is in flight, or another configuration update is pending. An uncertain creation still owns its provider target. Destroy or resolve those resources before changing settings.

A configured compute service also blocks target changes because its trusted gateway keeps an external resource ledger. Reconcile that ledger and disconnect the service before replacing or clearing the factory settings. Removing a service record alone is not evidence that its remote resources were deleted.

Runtime limits

Modal, Cloudflare Sandboxes, E2B and Daytona still declare docker: false. They support their adapter's API execution boundary; the current devctrl managed-session launcher requires a Docker-capable execution host and rejects them before creating a paid resource or local workspace. The provider list reports this limitation explicitly.

Internet access and filesystem persistence options are not exposed through the controller settings route. Their direct adapter opt-ins do not establish project egress enforcement, account export authorization or full execution-host support. Snapshot, fork and public-port capabilities remain unadvertised.

The regression tests use local controller state, injected provider factories and synthetic credentials. No ordinary configuration test creates a paid resource, builds a cloud image, deploys a Worker or touches a running user session. Cloud verification remains separately authorized work.

Focused verification

The combined configuration selection passed 103 tests across 15 files, with no skips, under Node 24.22.1 on 2026-10-24. It includes the controller lifecycle and authorization boundaries, four provider adapters and the Cloudflare bridge, shared configuration contracts, native Compute UI, CLI, operator MCP tools and translation keys. Normal contracts compilation and translation generation plus compilation passed. Scoped controller, TUI, CLI, MCP and all four provider type checks passed.

The original run retained one failing MCP expectation and CLI/controller type errors. The fixes preserve the normalized transport defaults, validate the service fixture, and record configuration audits through the public journal API with explicit operator ownership and actor attribution. Original logs remain separate from the final passing rerun. Source and lock fingerprints were unchanged during that final rerun.

That focused run reused installed tools and SDK links without installing dependencies; wanted and installed lock metadata differed at the time. A later maintenance checkpoint reconciled the exact installed dependency graph and verified matching lock metadata with the strict dependency guard. The earlier 103-case result still does not establish a fresh SDK resolution, real cloud SDK compatibility, full repository coverage or successful paid provisioning.