Skip to content

core/install/alta-os.ts ​

Generated from the exports of core/install/alta-os.ts · npm run docs:gen

The contract of the single Alta OS install script (alta.install/0.1), shared by the Mac (native, no Docker) and the cloud image (its Dockerfile runs the same script): plan §3.7 and decision P2. Interface only in P0b: the script itself lives in the engine (lot A), the Mac side calls it through setup.alta-plan|apply|check (D1, D2), the cloud image through its build (H1). Both read and check its JSON with the functions below. Command line, the same everywhere: install.sh <part> plan [--target macos|docker] --json what would be done, writes nothing install.sh <part> apply [--target macos|docker] --json does it; idempotent (a second apply does nothing) install.sh <part> check [--target macos|docker] --json what is there, writes nothing Nothing chains by itself: the game's quests run the parts in order, with the player's agreement. Environment: ALTA_HOME (default ~/.alta), ALTA_NONINTERACTIVE=1 (never prompts; fails with exit 4 instead). Never a secret in argv, env or output: a sign-in is the llm.signin executor's business, not this script's. Exit codes: see EXIT.

Standards that cite this file: alta.install/0.1: the single Alta System OS install script

Exports ​

INSTALL_SCHEMA const ​

ts
const INSTALL_SCHEMA = "alta.install/0.1"

Part type ​

The parts, each a separate, idempotent command (P2: "machine only" is the only mode).

ts
type Part = "machine" | "mind" | "memory" | "agents" | "map" | "modules";

PARTS const ​

ts
const PARTS: readonly Part[]

Target type ​

ts
type Target = "macos" | "docker";

TARGETS const ​

ts
const TARGETS: readonly Target[]

TARGET_OS const ​

The OS a target runs on (docker = the Linux image).

ts
const TARGET_OS: Readonly<Record<Target, OS>>

Verb type ​

ts
type Verb = "plan" | "apply" | "check";

EXIT const ​

ts
const EXIT = { ok: 0, failed: 1, badArgs: 2, unsupported: 3, wouldPrompt: 4 } as const

InstallStep interface ​

One thing a part does. writes: paths under ALTA_HOME or the user's home, shown on the plan card.

ts
interface InstallStep { id: string; does: string; writes: string[]; needs?: Need[]; /** Already done: apply skips it. */ done?: boolean }

PartPlan interface ​

ts
interface PartPlan { schema: typeof INSTALL_SCHEMA; part: Part; target: Target; steps: InstallStep[] }

PartCheck interface ​

ts
interface PartCheck { schema: typeof INSTALL_SCHEMA; part: Part; target: Target; ok: boolean; present: string[]; missing: string[] }

PartApply interface ​

ts
interface PartApply { schema: typeof INSTALL_SCHEMA; part: Part; target: Target; ok: boolean; did: string[]; skipped: string[]; error?: string }

InstallOutput type ​

ts
type InstallOutput = PartPlan | PartCheck | PartApply;

installArgs function ​

The argv of a call (the program is resolved by the server's bins, never from this).

ts
function installArgs(part: Part, verb: Verb, target: Target): string[]

checkInstallOutput function ​

Problems of an output of the script for this call (empty = the game can trust its shape).

ts
function checkInstallOutput(o: unknown, part: Part, verb: Verb, target: Target): string[]

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