Skip to content

Platform support (per OS, local or hosted) ​

Generated from docs/standards/platform.md · npm run docs:gen

Code: core/platform/platform.ts. Tests: tests/platform.test.ts.

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.

ts
type OS = "macos" | "linux" | "windows";   type Arch = "arm64" | "x64";
interface Platform { os: OS; arch?: Arch[]; min?: string }
type PerOS<T> = T | Partial<Record<OS, T>>;
type Need = "gui" | "audio" | "gpu" | "keychain" | "sudo" | "terminal" | "local-device";
interface Support { platforms: Platform[]; hosted?: "ok" | "limited" | "no"; needs?: Need[]; notes?: Partial<Record<OS, Text>> }
interface Host { os: OS; arch: Arch; version?: string; mode: "local" | "hosted"; has: Need[];
  tier?: "free" | "paid";   // hosted only: the trial or a kept world; absent = unknown
  axis?: string;             // the marketing axis the world was opened from
  machine?: Measured }       // what the server measured: cores, memory, free disk, GPU (resources.md)
type HostCond = "local" | "hosted" | "hosted-free" | "hosted-paid";
  • supports(s, host) → { ok: true } or { ok: false, reason: "os"|"arch"|"version"|"hosted"|"needs", detail }. No support = supported everywhere.
  • hostedLevel(s): default ok when linux is listed and no need is declared, else no. In hosted mode the needs keychain, gui, audio, local-device are never present (LOCAL_ONLY_NEEDS).
  • pick(v, os): the value of a PerOS for this OS (a plain value is for every OS).
  • checkSupport(s, perOS): refuses an empty list, unknown OS/arch/need, a bad version, hosted: "ok" without linux, and a PerOS table that names an OS the support does not list.
  • The server sends its Host in /api/game (host), computed by describeHost() in server/lib/mode.mjs.

Host conditions ​

HostCond says where a beat, a tour stop, a step or a choice applies (ONBOARDING-V2 §4.3); absent = everywhere. onHost(c, host): no host described = local. hosted-free holds only when tier === "free", hosted-paid only when tier === "paid": an unknown tier shows neither. The reference hosts (REF_HOSTS, one table shared by the client, the validators and the tests): local = macOS arm64 with its default needs; hosted-free and hosted-paid = linux x64, has: []. refHost(id) reads a ?host= value (hosted is the free tier).

Machine resources ​

What a step, a choice or an executor needs of the machine (cores, memory, free disk, GPU, processor family) and what the server measures of it (Host.machine): see resources.

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