Skip to content

alta.control/0.1: the cloud control plane ​

Generated from docs/standards/alta-control-0.1.md · npm run docs:gen

Code: cloud/control/api.ts (routes, states), cloud/control/provider.ts (host provider and fake), cloud/control/billing.ts (billing and fake). Tests: tests/cloud-contract.test.ts. cloud/ and service/ are not part of the game's build (type-checked only). Frozen in P0b for H2, H3 and H4 to work in parallel.

Status: alpha. This format can still change before its 1.0; a change follows the versioning rules of the project and is announced in the changelog.

Routes ​

RouteAuthLot
POST /v1/auth/start, POST /v1/auth/verify, POST /v1/auth/logoutcaptcha / none / sessionH3
GET /v1/plans, GET /v1/capacitynoneH2
POST /v1/worlds ({ captcha, email?, plan? }, idempotent, one free world per browser or account)captchaH2
GET /v1/worlds/:id, GET /v1/worlds/:id/events (SSE)browser ticket or sessionH2
POST /v1/worlds/:id/enter (single-use ticket, 60 s)browser ticket or sessionH2
POST /v1/worlds/:id/export, GET /v1/worlds/:id/export/:nbrowser ticket or sessionH2
POST /v1/worlds/:id/stop, POST /v1/worlds/:id/resumebrowser ticket or sessionH2
POST /v1/billing/checkout, POST /v1/billing/portal, POST /v1/billing/webhooksession / session / provider signatureH4

/v1/plans and /v1/capacity are the §3.7 additions (VM sizes as offers; the public cap of decision P20). Errors: { error, code }, status by code (STATUS). matchRoute(method, path) gives the route and its params.

World states ​

queued → provisioning → booting → configuring → ready → warned → stopping → stopped → archived → purged, and failed (with a readable reason, "Retry" back to queued). Allowed moves: TRANSITIONS, canMove(a, b). WorldView { id, state, offer, plan, position?, step?, endsAt?, purgeAt?, url?, reason? }: state and billing only, never the content of the VM. A world lives at https://w-<id>.<players' domain>/ (worldUrl), a domain distinct from the site's.

Host provider ​

HostProvider { id, limits(), create, get, start, stop, snapshot, restore, destroy, resize, warmPool? } with InstanceSpec { image (pinned by digest), cpu, memMb, diskGb, region, volume?, env (not secret), secrets (names), ingress: "gateway-only", egress, accelerator? }. destroy is reserved to the announced purge. resize keeps the VM and its disk (free → paid); a disk never shrinks. accelerator attaches a GPU (§3.7 point 6). checkSpec(spec, limits?) is the same for every adapter. createFakeProvider({ now, coldStartS, … }) is the only provider of the tests. providerContract(provider, env) returns the named cases every adapter must pass.

Billing ​

BillingProvider { plans, checkout, portal, verifyWebhook, subscription }; Plan { id, label, explains, cpu, memMb, diskGb, accelerator?, priceMonthly, currency, lifetimeS? } (a free plan has a lifetime: 2 h). checkPlans(plans). Only a signed webhook makes a world paid. createFakeBilling() and FAKE_PLANS (placeholders: sizes and prices are decision P21).

The standard, the SDK and the CLI are Apache-2.0; Alta System OS and Alta World are FSL-1.1-ALv2.