English
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.
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 }. Nosupport= supported everywhere.hostedLevel(s): defaultokwhen linux is listed and no need is declared, elseno. In hosted mode the needskeychain,gui,audio,local-deviceare never present (LOCAL_ONLY_NEEDS).pick(v, os): the value of aPerOSfor 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 aPerOStable that names an OS the support does not list.- The server sends its
Hostin/api/game(host), computed bydescribeHost()inserver/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.