English
Executors, run engine, routes, checks
Generated from docs/standards/runs-routes-checks.md · npm run docs:gen
Tests: tests/runs.test.ts, tests/e2e/base.write.spec.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.
Executors (closed list)
core/runs/executors.ts (for the game) and server/runs/registry.mjs (for the server, with the file of each) hold the same list, tested equal field by field. Each executor: id, cap (ask, install, setup, pay, or none), os[], hosted (allowed in hosted mode), needs[], writes, and since alta.game/0.3:
| Field | Values | Meaning |
|---|---|---|
args | { name: ParamSpec } | what a step may give in run.args: a closed list of values, or { kind, values?, max?, min?, pattern?, required? } (the kinds of inputs) |
card | plan (default), none | none: one click, no plan card, only for an executor that writes nothing (writes: false, tested); the game says what it opened |
undo | auto, command, none | undone by the game, by a command the card shows, or not at all |
secret | { via: ("tool" or "page" or "terminal")[], last4? } | how a secret reaches the program, in the card's order of preference; page exactly when an argument has kind: "secret" |
capture | audio | the card records sound (needs audio, never hosted) |
installs | { pkg }, { pkgArg }, { workflow } | what installs the missing program: a package of pkg.install, the package named by an argument, or a workflow of workflow.install. Two cards, two agreements: nothing chains by itself |
progress | boolean | the executor reports a percentage |
executorTableProblems() keeps the table coherent (tested): card: "none" only with writes: false; capture only with needs: audio and never hosted; the way page exactly when an argument is a secret or the action asks a code while it runs (asks: "code", which needs page); a hosted executor that takes a secret offers the page or the tool's own sign-in (a hosted world has no Terminal); installs names a known package, workflow or argument; patterns are anchored.
Active in this version: agent.message (server/exec/agent-message.mjs), signin.cli and its alias llm.signin (server/exec/signin-cli.mjs), setup.claude-signin and setup.openai-signin (server/exec/setup-signin.mjs), and the OpenClaw executors (see OpenClaw executors): openclaw.config-set, channel.connect, channel.pair-approve, skill.install, automation.enable, automation.disable, automation.run, setup.daemon-name, openclaw.read, and the voice executors voice.hear, voice.make, voice.say (see Recordings and voices). Declared, file to come (an absent file is "not in this version"):
| Executor | Cap | OS | Hosted | Writes | Card | Undo | Arguments |
|---|---|---|---|---|---|---|---|
item.data | – | all | yes | no | plan | – | – |
workflow.install | install | macOS, Linux | yes | yes | plan | command | id: a module chart of modules/ |
automation.enable, automation.disable | install | macOS, Linux | yes | yes | plan | auto | key (text) |
skill.install | install | macOS, Linux | yes | yes | plan | none (OpenClaw has no uninstall command) | ref (@owner/slug) |
setup.base | setup | macOS | no | yes | plan | none | none. Runs engine/install-alta-os.sh from the app's copy of Alta System OS (~/alta_system/alta-os): Homebrew, git, Python 3.13, Node. The Mac password goes to sudo through macOS's own dialog (SUDO_ASKPASS, secret way tool): the game never sees it. Asked once: the script runs on a pseudo-terminal of its own (/usr/bin/script, no window), so every sudo of the install shares one timestamp, kept alive by the script. While the dialog is open, GET /api/runs/waiting says so (never what is typed); the Mac app steps aside so the dialog is in front, and the page shows a banner. Long (progress, 5 minutes to an hour): the run answers once the preflight is past and returns { ok: true, job, running }; the install goes on as a job (server/lib/jobs.mjs, job a random id) and every view of the run says running while it goes, then running: false once it ended well, or reads as failed with the installer's FAIL line once it ended badly. The page follows it, checks the step's proof (bin) the moment it ends, or shows the failure card. No window opens (no opened): the page never offers "Open it again" for it |
setup.brew, setup.machine (macOS), setup.alta-os (and Linux) | setup | see left | no | yes | plan | none | password (secret, optional): the Mac password typed in the card, else sudo asks it in a Terminal window |
setup.other-signin | setup | macOS, Linux | yes | yes | plan | command | provider (text), key (secret) |
setup.daemon-name | setup | macOS, Linux | yes | yes | plan | auto | name (text, 40) |
setup.alta-plan, setup.alta-apply, setup.alta-check | setup | macOS, Linux | yes | apply only | plan | command (apply) | part (the 6 parts), steps, model, channel, embeddings, with (modules, or supabase for memory); the answers slug, group, company (boolean), display_name, language, timezone, telegram (-100… or skip), default_model; apply only: telegram_token and embeddings_key (secret, way page), embeddings_provider (openai, voyage) |
pkg.install | install | macOS, Linux | yes | yes | plan | command | pkg: claude, codex, ollama, whisper-cpp, gogcli, rmapi, ffmpeg, restic, wacli. Homebrew for all but claude, which comes from Anthropic's own installer (claude.ai/install.sh, downloaded to a private file by curl, then run by /bin/bash; no quarantine, no admin password, ~/.local/bin/claude) |
openclaw.config-set | setup | macOS, Linux | yes | yes | plan | auto | path (closed list, never a credential), value (text) |
mac.open-pane | – | macOS | no | no | none | – | pane: microphone, speech, accessibility, screen, notifications, full-disk |
app.open | – | macOS | no | no | none | – | app: openclaw, alta |
channel.connect | setup | macOS, Linux | yes | yes | plan | command | channel: telegram, whatsapp; token (secret) |
channel.pair-approve | setup | macOS, Linux | yes | yes | plan | none (OpenClaw has no command to take an approval back) | channel, code (text, 16, never starting with -) |
connector.connect | setup | macOS | no | yes | plan | command | id: google; email (email) |
automation.run | ask | macOS, Linux | yes | yes | plan | none | key (text) |
prefs.set | setup | macOS, Linux | yes | yes | plan | auto | tool: briefing, profile; key, value (text) |
backup.init, backup.run, backup.restore-test | setup | macOS | no | yes | plan | none | connector: local-disk, r2 (init also: target path; for r2 endpoint, bucket text and key_id, key secrets) |
tablet.pair | setup | macOS | no | yes | plan | command | device: remarkable, ipad; code (secret) |
voice.hear | ask | macOS | no | no | plan, records | – | none |
voice.make | install | macOS | no | yes | plan, records | auto | mode: preset, design, clone; preset, description |
voice.say | – | macOS | no | no | none | – | line: hello |
memory.import | setup | macOS | no | yes | plan | none | source: obsidian; path |
openclaw.read | – | macOS, Linux | yes | no | none | – | what: update, memory |
agent.create | install | macOS, Linux | yes | yes | plan | archive | chart (an installed chart's id), agent (an agent of that chart, never main) |
agent.archive | install | macOS, Linux | yes | yes | plan | none | chart, agent |
service.restart | setup | macOS, Linux | yes | yes | plan | none | id: a service of the services registry. A repair (repair: "auto") |
model.pull | install | macOS, Linux | yes | yes | plan (job) | none | model: an Ollama model name. A repair |
signin.refresh | setup | macOS, Linux | yes | yes | plan | none | tool: a sign-in tool whose row has refresh. A repair |
channel.reconnect | setup | macOS, Linux | yes | yes | plan | none | channel. A repair; not in this version (no real command verified yet) |
gateway.recover | setup | macOS, Linux | yes | yes | plan | none | none. A repair |
Agent Charts executors
What Agent Charts add (§19). undo: "archive" is undone by the game like auto (an Undo button), and what it made goes to ~/.local/share/archive/<date>/, never deleted. job: true: the run answers early with { ok: true, job, running } and its work goes on (server/lib/jobs.mjs), as setup.base does. repair: "auto": the executor may run under the owner's standing grant (alta.grants/0.1, capability repair); never with a secret, sudo, pay, forge or an archive undo (executorTableProblems).
| Executor | Runs | Card | Proof |
|---|---|---|---|
agent.create { chart, agent } | reads the chart from its release (~/.local/state/alta/charts/<chart>/release.json, field folder); moves an existing ~/.openclaw/workspace-<agent>/ to the archive; writes the agent's files, {{name}} marks replaced by the release's render values (and home); openclaw agents add <agent> --workspace <dir> [--model <id>] --non-interactive --json; openclaw agents set-identity --agent <agent> --name <name> --json; openclaw config set agents.entries.<agent>.tools {"allow":[…],"deny":[…]} --strict-json. Undo: the workspace to the archive, openclaw agents delete <agent> --force --json | the agent's name, its file count, whether a workspace is already there; blocked when the chart is not installed | agent { id } |
agent.archive { chart, agent } | the undo of agent.create, as a step of its own (a chart's removal) | agent { id } fails | |
service.restart { id } | the label from the registry (~/.local/state/alta/services/<id>.json, never from the arguments): launchctl kickstart -k gui/<uid>/<label> or systemctl --user restart <unit> | blocked when the service is not registered | service { id } |
model.pull { model } | ollama list, then ollama pull <model>; its percentages are the progress | already when the model is listed | the step's check |
signin.refresh { tool } | the tool's own refresh argv (core/runs/signin.ts; only practice has one today) | signin { tool } | |
gateway.recover | python3.13 <engine>/scripts/run/pulse.py gateway-recover: the engine's own checks; exit 3 is a refusal that changed nothing | blocked when the engine or Python 3.13 is missing | the step's check |
An executor file exports default { id | ids, byId?, validate(args) → problems[], probe?(args, env) → { installed?, … }, plan(args, probe, env) → card, run(args, ctx) → result, undo?(args, ctx) → result }, where ctx is { signal, log(msg, data?), progress(percent, label?), keep(state), state, env }. validate is required (the engine refuses an executor without it). progress is for an executor that declares it; keep holds what the undo needs (an old value) in memory only, and undo gets it back as ctx.state; an executor with undo: "auto" gives undo. A probe that says installed: false makes the card say what is missing. Argv is constant, never a shell. A file with several ids may give each its own object in byId. An executor that records (capture: "audio") may give needsCapture(args) → boolean: its run gets ctx.capture ({ file, bytes, seconds }, see Recordings below), and a plan that needs one does not start without it (409 nothing recorded). A result may carry once: { … }: what the page sees a single time (what was heard), merged into the first view of the finished run, then forgotten.
Recordings and voices
The executors voice.hear, voice.make and voice.say (server/exec/voice-*.mjs, tests tests/exec-voice.test.ts and tests/e2e/voice.write.spec.ts) use the microphone of the game page and the voice of the player's own machine. Local only: none of them is hosted (needs: audio), and the capture route refuses a hosted world or a machine without sound (409) before it reads the body.
- The plan card of an executor that records says so:
card.capture = { kind: "audio", required, maxSeconds: 30, maxBytes? }, and for cloningcard.read, the sentence to read. The page shows a recorder in the card (mountCapture(container, { planId, read, maxSeconds }, onDone)ofclient/quests/capture.ts): record, a level meter, a clock, stop at 30 s by itself. The page turns the recording into a 16 kHz mono WAV. POST /api/capture/<planId>with{ type: "audio/wav", audio: <base64> }(JSON, the same token, Host, Origin and type checks as every POST). Refused: more than 2 MB (413), more than 30 s, shorter than 0.3 s, anything but a PCM WAV (400), a plan that records nothing, is used or expired (409, 404). The WAV header is read; the file is written0600in the server's own0700temporary folder (server/lib/audio.mjs).- The engine joins it to the plan (
attach); a second recording replaces the first, whose file is deleted. The run gets it asctx.capture; the file is deleted when the run ends (ok, failed or cancelled), when the plan expires (5 minutes), and when the server stops. - Nothing of it is logged, saved or sent elsewhere.
voice.heartranscribes on this machine only: whisper.cpp with the model of Alta's installer (whisper-cli -m ~/.local/share/alta/models/whisper/ggml-*.bin -f <file> -l <en|fr> -nt -np), elseopenclaw infer audio transcribe --file <file> --jsononly whenopenclaw infer audio providers --jsonshows no provider outsidelocal/…configured or selected (OpenClaw prefers a configured online provider to a local program, and its--modelcannot name a local one). Otherwise its card is blocked and says why. What it heard is returned once (once: { heard, greeting }, 120 characters at most), withpass(something was heard). The page marksseen { key: "heard:<step>" }whenpassis true, and the step's ownseenkey when it is not a scene (heard:<uid>.<step>in the built-in quests,docs/standards/alta-game-0.3.md). voice.makerunslocal-voice preset <name>,design <words>orclone <recording>with--lang(thelocal-voiceworkflow); the voice before is copied to~/.local/share/archive/<date>/voice/first, and the undo archives the new voice and puts that copy back. Nothing is deleted. Proof:file ~/.local/share/alta/voice/voice.json.voice.saysays a line of its closed list (hello) with that voice (local-voice say <words> <file.wav>), one click. The page fetches the file once (GET /api/capture/said/<id>→{ type, audio }, then deleted; 5 minutes at most) and plays it with Web Audio, then marksseen { key: "played:<step>" }and the step's ownseenkey.
In the quest panel (client/quests/voice.ts), a plan card with capture holds the recorder; its agreement stays off until a recording is sent (when capture.required), and the microphone is released when the card closes or the run starts. A step whose proof is seen and that has a run is proven by its run only: it has no "Watch" or "Skip" button.
An executor may declare args in the table: each argument a step may give in run.args, with its closed list of values or the kind of its value (paramProblems(id, args) in core/runs/inputs.ts; runArgsProblems is its 0.2 name). checkGame refuses another argument, another value, or a missing one (rule step.run-args), and checks the references to the step's inputs (rules step.input-ref, step.input-kind, step.input-secret). An executor without args validates at run time only, and never takes a secret. The server does not trust the page: the executor's validate(args) checks the plain values again with the same rules.
Secrets
A secret (password, token, key, pairing code) reaches an executor one of three ways, which the executor declares (secret.via) and the card offers in this order:
| Way | When | Where the value goes |
|---|---|---|
tool | the tool has its own sign-in (OAuth, its own login, a device code) | from the player's browser to the provider; the game sees nothing |
page | the tool wants a pasted value, or there is no Terminal (a hosted world) | from the game page to the player's own server, then to the program |
terminal | local only, when the player prefers | from the keyboard to the program, in a Terminal window; the game sees nothing |
The path of a secret typed in the page (page), in a local world and in a hosted world alike:
- The field is
type="password",autocomplete="off",spellcheck="false", withoutnameor initial value. It exists only while the card is open, and is cleared on submit and when the card closes. - The value travels in the body of
POST /api/runs/run, fieldsecrets: { <input id>: <value> }, with the agreement. Never in/api/runs/plan(a plan lives 5 minutes), never in a URL, never inargs(resolveArgskeeps it out and only names the argument it feeds). - The server is the player's own. The route's checks stay mandatory:
X-World-Tokenlocally,X-World-Authin a hosted world, exactHost, exactOrigin,Content-Type: application/json. In a hosted world HTTPS ends on the player's own machine (their VM): no gateway of Alta sees the value in clear, and a request that did not arrive over HTTPS is refused. - The engine keeps the value in memory only, in a single-use holder (
ctx.secret(id)gives aBufferonce, then zeroes it). A secret is not part of the plan's fingerprint. - The executor gives it to the program on its standard input, or through the program's own secret store. Never in argv (seen by
ps), never in the program's environment. A program that only reads a file gets a0600file in a0700temporary folder, deleted in afinally, and the card says so. - It is written nowhere else: not the runs journal, not a run's log or result, not the save, not a game file, not an error message. The program's output is filtered before it enters the journal (the value becomes
•••). - The page never sees the value again: the result says
{ set: true }, andlast4only when the executor asks for it (secret.last4) and the secret has at least 12 characters. - Nothing goes to Alta's cloud control plane or Supabase: no route of
cloud/receives or relays this body.
A code the program asks for while it runs (asks: "code", the link-code flow of signin.cli) follows the same path, through POST /api/runs/input {id, code} instead of the agreement: a password field, autocomplete="off", cleared before the request leaves; the same route checks; one line of at most 4096 bytes; held in the run's secret holder (scrubbed and zeroed like the others), written to the program's stdin, never in the answer.
The server refuses (400 secret-in-args) any args that names a secret argument, and any argument value that looks like a credential (looksSecret in core/runs/inputs.ts).
What the agreement's secrets may hold (server/lib/secrets.mjs), else 400 bad secrets with problems that name the field and never its value, the plan not spent:
- only for an executor whose
secret.viahaspage, and only for its arguments ofkind: "secret"; - named by the step's input id when the plan was made from a quest step (
{quest, step, values}: the input that feeds the argument, asresolveArgssays), by the argument's name when it was made from{executor, args}; - at most 8 values, each a non-empty text of at most 4096 bytes, in a body of at most 16 KB;
- in a hosted world, only when the world's public origin is HTTPS.
The run reads each one once: ctx.secret(<argument>) gives a Buffer (a copy; null the second time or when none was given), which the executor writes to the program's standard input and zeroes. The engine scrubs the run's log lines, progress label, result and error (the value, with or without the spaces around it, becomes •••), and zeroes every Buffer when the run ends, whatever the end.
Sign-in from the player's browser: signin.cli
A sign-in to a tool's own command line, played from the browser the player is looking at, which may not be the browser of the game's machine (a VM, a server). The tools and their flows are a closed table in code, SIGNIN_TOOLS of core/runs/signin.ts (the reference page draws it): each tool has a program, a status command for the proof, and for each flow it offers a constant argv, the hosts its link may point at (and the path), the environment variables that would open a browser, the line it prints when it waits for a code, the lines that say a pasted code is wrong, and a time limit. A pack names a tool and a flow; it never adds a program, an argument or a host.
| Flow | The program | The page shows | Back from the page |
|---|---|---|---|
link-code | prints a link, then waits for a code on stdin (Claude Code: "Paste code here if prompted >") | the link as a button (new tab, rel="noopener noreferrer") and a password field | the code, through POST /api/runs/input |
device-code | prints a link and a short code, then polls by itself (codex login --device-auth, gh auth login --web) | the link and the code (with Copy) | nothing |
email-link | sends an e-mail and waits; may print a page to open | the words, and the page as a button when there is one | nothing |
secret | reads a token on stdin (codex login --with-api-key, gh auth login --with-token) | a secret input of the step, in the plan card | the token, with the agreement (see Secrets) |
tool-browser | the tool's own login, in a Terminal window of the player's Mac | the Terminal path below | nothing |
run.args: tool (required), flow (default: the tool's first), hosts (comma-separated, required for a flow that shows a link, each one a host of the tool's own list for that flow; refused on a flow without a link), token ({ "input": "<secret input id>" }, only and always for secret). The step's proof is a signin check of the same tool (signin.proof). Rule ids: signin.tool, signin.flow, signin.hosts, signin.token, signin.proof (signinStep of core/quests/standard.ts, signinArgsProblems of core/runs/signin.ts).
The run, for a flow in the page (server/exec/signin-cli.mjs):
- The program runs with its constant argv and an environment where each variable of
noBrowser(BROWSER,GH_BROWSER) is/usr/bin/true: the game's machine opens no browser. - Its stdout and stderr are read line by line, with terminal escapes removed (OSC 8 hyperlinks, colours). The first link is kept only if it is
https, without user or port, its host is in the step'shostsand in the tool's list, its path is the tool's, it is at most 4096 characters of URL characters (isAllowedLink). A link to any other host ends the run (signinHost) and is not shown. A device code must match the tool's pattern. - The run's live view (
ctx.live,liveinGET /api/runs/:idwhile it runs, never journaled) gives{ phase: starting|link|code|device|email|checking, url?, host?, code? (device code only), problem? }. The page re-checks the link against the card'ssignin.hostsbefore it draws it. - For
link-code,POST /api/runs/input { id, code }hands the code to the run: the same token and exact Host/Origin checks as every route, a body of at most 8 KB, one line without control characters of at most 4096 bytes, HTTPS in a hosted world; 404 unknown run, 409 "this action asks nothing" or "not waiting for a code". The code goes into the run's secret holder (scrubbed from every log line and zeroed at the end), then to the program's stdin followed by a newline. The answer is the run's view withaccepted; it never holds the code. - A line of
problems(a code cut short, a web address, a verification code) setsproblem; the program still waits, the page says it in one sentence and the field stays. A refused code (signinCode), a link that expired (signinExpired), the time limit, or the program ending (signinEnded) end the run with one sentence; Try again starts a new run, with a new link. - Exit 0 ends the run with
{ signedIn: true }; the step is done only when itssignincheck passes.
secret: the token is read once from ctx.secret("token"), written to the program's stdin with a newline, and zeroed; a refusal is signinToken. tool-browser, and the Terminal way below: the program's tool-browser argv in a Terminal window. The plan card has signin { tool, flow, label, product, hosts } and ways: ["page", "terminal"] on a Mac with a screen and Terminal when the tool has a tool-browser flow, ["page"] elsewhere (hosted, server, Linux without a screen), ["terminal"] for tool-browser (blocked where there is no Terminal). The agreement may carry way: "terminal" (POST /api/runs/run {planId, agree, way}), checked against the card's ways (400 bad way). llm.signin { mind } is kept as an alias: the same run, with mind as the tool and the tool's default flow.
The program's output reaches the journal only scrubbed; a run journals "code handed to the program" (or "the code was not handed over"), never the code. The fakes (tests/fakes/bin/claude, codex, gh, alta-signin-practice) play every flow; nothing in the tests signs in to a real account.
Sign-in executors in a Terminal window
| Executor | run.args | Opens a Terminal window that runs | Proof (check) |
|---|---|---|---|
signin.cli, way terminal or flow tool-browser | tool | the tool's own login (claude auth login, codex login, gh auth login --web) | signin { tool } |
setup.claude-signin | none | openclaw models auth login --provider anthropic --method cli --set-default | model { mind: "claude" } |
setup.openai-signin | none | openclaw models auth login --provider openai --set-default | model { mind: "codex" } |
The two setup.*: capability setup (--allow-setup), os: [macos, linux], needs: [terminal, gui] (a hosted world has neither, so it answers 409 before any probe). The window is opened with open -a Terminal <file> (execFile, constant argv) on a .command file written from a fixed template in a private temporary folder (0700): a banner, then exec of the program's full path with constant arguments (server/exec/terminal.mjs). On Linux nothing opens: the run returns { ok: true, opened: false, command } and the game shows the command to copy. On a Mac it returns { ok: true, opened: true, command, window }: window is a random id (never a path); the template writes the program's pid in its private folder before exec, and every view of the run adds windowOpen (true while the program runs, false once the player closed the window or it ended). The page then stops saying "a Terminal window is open" and offers "Open it again" and, for a step shown by a choice (when.answer), a link back to that choice; it offers the same when nothing is seen after two minutes. The sign-in itself happens in that window and in the player's browser: no token, code or answer passes through the game, and the journal holds only "terminal opened". The plan card gives title and body in English and French, command, writes, and blocked (English and French) when the program is not installed. In the test sandbox the program and open are the fakes of tests/fakes/bin.
OpenClaw executors
Each runs openclaw (found by server/lib/bins.mjs) with execFile and a constant argv, read in --help of OpenClaw 2026.12.2. plan only reads (the probe column); run writes; the proof is the step's check. Tests: tests/exec-openclaw.test.ts.
| Executor | Probe (read only) | Run | Undo | Proof |
|---|---|---|---|---|
openclaw.config-set { path, value } | config get <path> --json; config set <path> <json> --strict-json --dry-run | config set <path> <json> --strict-json | auto: config set of the value before, or config unset <path> | config { path, equals } |
setup.daemon-name { name } | agents list --json (the name before), whether ~/.openclaw/workspace/IDENTITY.md exists | agents set-identity --agent main --name <name> --json (OpenClaw's config), then the same name in IDENTITY.md's **Name:** field only (the rest of the file kept; a copy goes to ~/.local/share/archive/<date>/openclaw/ first; no file or no field: nothing written there) | auto: the name before in the config, and the Name field as it was when it still holds the line written | identity (the check reads both) |
channel.connect { channel: telegram }, way page | channels list --json | secrets store set TELEGRAM_BOT_TOKEN --kind secret --value-file - (the token on standard input), then config set channels.telegram.botToken --ref-source store --ref-provider default --ref-id TELEGRAM_BOT_TOKEN, then config set channels.telegram.enabled true --strict-json | command: channels remove --channel telegram --delete, secrets store rm TELEGRAM_BOT_TOKEN --yes | channel { id: "telegram" } |
channel.connect { channel: telegram }, way terminal | same | a Terminal window runs channels add --channel telegram (OpenClaw's guided setup) | same | same |
channel.connect { channel: whatsapp }, way tool | same | a Terminal window runs channels login --channel whatsapp (a QR code for the phone) | channels remove --channel whatsapp --delete | channel { id: "whatsapp" } |
channel.pair-approve { channel, code } | pairing list <channel> --json (a count only) | pairing approve <channel> <code> | none | channel { id, state: "paired" } |
skill.install { ref } | skills list --json | skills install <ref> (ClawHub @owner/slug only) | none | skill { name } |
automation.enable, automation.disable { key } | cron list --all --json (the one job whose id or declaration key is key, else whose name contains it) | cron enable <id> / cron disable <id> | auto: the other one, when the run changed the state | automation { key, enabled } |
automation.run { key } | same | cron run <id> --wait --wait-timeout 10m | none | the step's check |
openclaw.read { what } (card none) | update status --json, or memory search --agent main --json --max-results 3 <fixed query> | seen |
A secret never goes in argv (channels add --token is never used) nor in the program's environment (--use-env is never used), and --token-file is not used either: OpenClaw keeps the path of that file in its config, so a temporary file would break the channel once deleted. The token reaches the executor once, as a Buffer from the run context (ctx.secret("token")); the executor writes it to the program's standard input, drops that command's output, and zeroes the Buffer. A key or code is never in a result, a log line or an error. An executor with undo: "auto" exports undo(args, { result, signal, log }), given the result of the run it undoes, and verify(args) reads the state again.
The Alta install executors
The install of Alta itself, part by part, with the engine's own commands (engine/STEPS.md). Files in server/exec/: setup-alta.mjs, setup-{brew,base,alta-os,machine}.mjs (shared: alta-base.mjs), workflow-install.mjs, connector-connect.mjs, prefs-set.mjs, backup.mjs, tablet-pair.mjs, memory-import.mjs; helpers alta.mjs (where alta-step is, the parts in words, needs), args.mjs (the server's own argument check, from the table row), proc.mjs (one program, its standard error line by line, cleaned).
| Executor | Runs | Card | Proof |
|---|---|---|---|
setup.alta-apply { part, … } | alta-step <part> apply --json [--steps] [--with] [--model] [--channel] [--embeddings] [--answers FILE] [--secrets-stdin]; the report streams line by line (live progress); a secret the part needs (the Telegram bot token for the agents' topics, the cloud embeddings key) goes as one JSON line on alta-step's standard input, built from the run's Buffer and zeroed after | the part's plan (read only), in words: title and body (EN, FR), steps[] (kind, where, text), counts, needs[] (a secret need is a secret input), missing[], secret: { input, inputs, via: "stdin" } when a field is needed, blocked while a required part is not applied | part { id }, and the step's own check |
setup.alta-plan, setup.alta-check | alta-step <part> plan / check (read only) | the same / what is checked | the run's result |
setup.brew, setup.base, setup.alta-os, setup.machine | way page: engine/install-alta-os.sh on the server itself with SUDO_ASKPASS=engine/scripts/install/alta-askpass and NONINTERACTIVE=1; every sudo is sudo -A, the helper reads the password from a named pipe the server serves during the run (server/exec/askpass.mjs: a FIFO in a 0700 folder, never argv, the environment or a file; the Buffer is zeroed after); the Command Line Tools by softwareupdate -i <label> (no window); the script's report streams with a progress. Way terminal: a Terminal window runs the same script and sudo asks there | what is already there, what the script installs, ways, secret: { input: "password", via: "askpass" } | bin, part |
workflow.install { id } | alta-step modules apply --with <id> | the modules part's plan for that module, and what it brings | module { id } |
connector.connect { id: google, email } | alta-google connect --email <address> --json --timeout 300 (Google's page in the browser; the token in the Keychain, kept by gog) | whether an account is already there (alta-google status --json), never which | account |
prefs.set { tool, key, value } | alta-prefs set <tool>.<key> <json> --why <fixed words>; undo alta-prefs unset | blocked when the tool declares no such key under [prefs] (alta-prefs get) | the step's check |
backup.init { connector, target } | alta-backup password-init, the local disk's override ~/.config/alta/backup/local-disk.yaml (never overwritten), alta-backup init <c> | r2: with endpoint and bucket and no r2.yaml yet, two secret fields (key_id, key) whose values go as JSON lines on the standard input of alta-backup r2-init --endpoint E --bucket B (Keychain through security -i, then r2.yaml, never overwritten); without them, blocked until the owner sets them | backup |
backup.run, backup.restore-test | alta-backup dump then backup <c>; restore-test <c> | backup { maxAgeHours }, backup { restoreTested } | |
tablet.pair { device, code? } | reMarkable: rmapi ls /, the one-time code on standard input (or typed in a Terminal window); iPad: the workflow ipad | already paired or not (rmapi's own file exists, never read) | module |
memory.import { source, path } | gbrain import <folder> --allow-noncanonical-root --json | whether the folder is an Obsidian vault | the step's check |
Answers and needs. The engine never asks on a terminal: a question it cannot answer is a need with a key. The answers it accepts (slug, group, company, display_name, language, timezone, telegram, default_model) are arguments of setup.alta-*; the executor writes them in a --answers file (JSON, mode 0600, in a private 0700 folder, removed in a finally), never a secret. Each need of the plan or the run is given in the game's terms (server/exec/alta.mjs, NEEDS): input (a field, with its kind, pattern and labels, whose value comes back as the argument arg), then (another executor: llm.signin for claude_signin, setup.claude-signin or setup.openai-signin for openclaw_onboard, pkg.install for ollama), human with words (GitLab, cloud embeddings key, Docker, the Telegram bot token), or retry. An unknown key keeps the engine's question.
Progress. The engine's report (its standard error) reaches the run's journal line by line, cleaned (control characters out, a credential-like line dropped, the run's secret as •••), and progress(percent, line) counts the part's sub-steps as they are reported. alta-step itself hands its report over when the part ends.
Secrets. None of these executors takes a secret in its arguments. tablet.pair reads its code once through the run's secret seam (ctx.secret("code")), writes it to rmapi's standard input and zeroes the buffer. The agents part asks the Telegram bot token only to create the agents' topics, and the engine reads it from its environment or its terminal only: the game does not pass it (need telegram_bot_token, human); the step uses channel: none or the player runs that part once in a Terminal.
Run engine
server/runs/engine.mjs, createEngine({ caps, host, now?, journal?, execDir? }):
| Call | Route | Errors |
|---|---|---|
plan(id, args) | POST /api/runs/plan {executor, args} → { planId, executor, card, expiresAt } | 404 unknown; 403 capability off; 409 unsupported before any probe; 400 secret-in-args (before any file is read); 404 not in this version; 400 bad arguments |
planStep(step, values, answers) | POST /api/runs/plan {quest, step, values} → the same, plus secretIds, saves | as plan; 404 unknown step; 400 bad inputs (in words); 400 secret-in-args when a secret input's value is sent |
run(planId, { agree, secrets? }) | POST /api/runs/run {planId, agree: true, secrets?} → the run | 400 without agreement; 400 bad secrets (see Secrets); 410 expired (5 min); 409 used, busy, another run going, or something missing |
get(id) | GET /api/runs/:id → { id, executor, state, startedAt, endedAt?, log[], result?, progress?, undo?, undoOf? } | 404 |
cancel(id) | POST /api/runs/cancel {id} | 404 |
input(id, body) | POST /api/runs/input {id, code} → the run's view and accepted: a code for a running action that asks one (asks: "code" in the table; today signin.cli in link-code); the code goes to the run's secret holder, never in the answer | 404; 409 asks nothing or not waiting; 400 bad secrets or not HTTPS when hosted |
undo(id) | POST /api/runs/undo {id} → the undo's own run (undoOf) | 404; 409 not undo: "auto", not finished ok, or already undone; 403 capability off |
direct(id, args, { click }) | POST /api/runs/direct {executor, args} or {quest, step, values} → the finished run | 409 unless card: "none" and writes: false; then as plan and run |
list() | GET /api/runs → { executors: [{ id, cap, writes, card, undo, progress, present, capOn, unsupported }] } | |
| a system window waits | GET /api/runs/waiting → { waiting: { what: "password", executor, since } | null, app }: macOS's password dialog of a background install is open (server/lib/sysdialog.mjs; the askpass helper drops an empty mark in a private folder while it is open; never what is typed). app: the Mac app can step aside. POST /api/runs/waiting/show → { shown }: asks the app to step aside so the dialog is in front |
The arguments are checked in this order: no secret (an argument the table declares kind: "secret", or a value that looks like a credential: 400 secret-in-args), plain values only (a {input} or {answer} reference must be resolved first), the table's rules (paramProblems of core/runs/inputs.ts), then the executor's validate, all before the probe. From a quest step, the server finds the step in its own game (never a step sent by the page) and turns the typed values and the save's answers into arguments with resolveArgs of core/runs/inputs.ts, on this host's system. The engine reads those core files itself, with Node's type stripping (Node 22.18 or later).
The plan card
PlanCard in core/runs/card.ts is what plan returns as card, the same for every executor. A Text is one string (a name the same in every language, or English) or { en, fr }. The quest card shows the title, the short list and the chips first; everything else folds under "Details".
| Field | Type | Meaning |
|---|---|---|
title | Text | what happens, in one line |
summary | string | the same in English, for the logs |
items | { name: Text, what?: Text, done?: boolean }[] | the short list of what is installed or changed: a name (one to four words) and why (two to five words); done when it is already there (shown ticked). At most 12 are shown. Without items the card lists writes |
duration | Text | how long it takes, roughly ("5 to 20 min"): a chip |
size | Text | what it downloads, roughly ("about 1 GB"): a chip |
body | Text | what happens in a few sentences (under "Details" when the card has items) |
command | string | the exact command (under "Details") |
writes | Text[] | what it writes on the machine, one line each (under "Details") |
blocked, already | Text | why it cannot run now; that it is already done |
progress, undo, missing, capture, read | see below and Sound |
items are filled by setup.base (Homebrew, git, Python, Node, ticked when found), setup.alta-plan and setup.alta-apply (per part, PART_ITEMS of server/exec/alta.mjs, ticked when the part's plan reports them OK and left out when the plan only notes them), pkg.install, signin.cli (and llm.signin), channel.connect and connector.connect. A sign-in card also has signin, ways and terminalCommand (see signin.cli).
While a run goes, the page shows one progress bar and one current line in words: reportLine of core/runs/card.ts strips the engine's code from a report line (OK R10 openclaw-in the model answers → ✓ "The model answers") and Homebrew's ==> . A line of a run still going is never said as a failure: only a line marked FAIL takes a sentence of knownReason (run.why.*). Other lines may say what the run is doing (knownActivity, run.doing.*): the local model downloading (the engine's "downloading the local model qwen3:4b: 45%", printed while it waits for ollama pull) reads "Downloading the model… 45 %", with the program's own percentage in place of the part's. The raw log is folded under "Details". A failed setup.alta-apply gives its engine FAIL lines in result.fails ({ kind, where, text }, the engine's English) and its needs: the page says the first one in a sentence, the next three below, the rest under "Details", and each need's words. For any other executor, failReasons takes the FAIL lines of the run's log and error (terminal colours stripped): setup.base logs its installer's FAIL line ("Only 17 GB free on the disk, 20 GB needed…"), and the page says it as the reason.
The card gains undo: { how: "auto" | "command" | "none", command?, text } (text in English and French), and progress: true when the executor reports one. When the probe says the program is not installed, the card gains missing: { pkg | workflow, executor, args, text }: the card of pkg.install or workflow.install that installs it (from the table's installs). Two cards, two agreements: a plan with something missing does not run (409 missing).
While a run goes, progress: { percent, label?, at } shows where it is (100 when it ends well). A finished run of an executor with undo: "auto" says undo: { how: "auto", available: true }; its undo runs with what the run kept in memory (ctx.keep), never shown and lost when the server restarts. The one click (direct) is for an executor with card: "none", which writes nothing; /api/ask goes through engine.direct("agent.message"), its shown text and "Send" being the agreement.
A planId is single-use and bound to its arguments. One run at a time (an undo is a run). The journal (<save dir>/logs/runs.jsonl) holds only at, run, executor, event (start, end, undo-start, undo-end) and state: no argument value, no log line, no result.
Routes
server/routes/index.mjs, TABLE: one file per area with its paths, capability and lot. All areas are declared; a lot only adds its file. An absent file answers 404 { error: "not in this version", area, lot }.
| Area | Paths | Cap | Lot |
|---|---|---|---|
| world, game, save | /api/world, /api/game, /api/save | P0 | |
| ask | /api/ask | ask | P0 |
| runs | /api/runs/ | the executor's | P0 |
| missions | /api/missions | ask | M |
| tasks | /api/tasks | Q2 | |
| store, license | /api/store, /api/store/license | –, pay | S1, S3 |
| universes, forge | /api/universes, /api/forge | –, forge | W |
| setup | /api/setup | D1 | |
| host | /api/host | H1 | |
| media | /api/media | C | |
| capture | /api/capture/:planId (POST), /api/capture/said/:id | the plan's executor's | V |
A route file exports a list { method, path, prefix?, cap?, handler(req, res, url, params) } (or a function of the context returning it); :name segments are parameters. POST /api/quests/* stays refused (403).
/api/game gives caps, host, mode, sources (per-source data for client quest sources: probes [{ id, ok }] and tasks { source, tasks[{ id, title, done }], problem? }, from server/sources.mjs; the results of the probe and task checks of the generated quests are added to checks), installed ({} until S1), and the quests of content/quests/*.json merged into the game.
Checks
server/checks/index.mjs, TABLE type → file (identity, module, automation, config, file, skill, service, signin, model, and from alta.game/0.3 permission and channel; to come: task Q2, item S1, bin, account, backup, host). An absent file gives unverifiable "not in this version". host is answered by the core when it knows the host.
server/checks/index.mjs, TABLE type → file (identity, module, automation, config, file, skill, service, signin, model; to come: task Q2, item S1, bin, and the checks of alta.game/0.3: permission, channel, account, backup, host, part). An absent file gives unverifiable "not in this version". host is answered by the core when it knows the host.
| Check | Passes when (read only) | Reads |
|---|---|---|
account { service: "google", scope? } | connected is true, and with a scope services.<scope> is true | alta-google status --json (exit 3 when not connected; its JSON is read all the same): { connected, email, state: missing|ok|revoked|offline|no_gog, services: { gmail, gmail_drafts, calendar, calendar_write } }; the address is never returned |
backup { maxAgeHours?, restoreTested? } | a target's last snapshot is at most that old (default 26 h); a target's last restore test passed | alta-backup status --all --max-age-hours <h>: one row, or { connector: "--all", details: { results: [row] } }; a row is { ok, connector, details: { last_snapshot_age_h, last_restore_test: [ended, ok], last_verify: [ended, ok], warn? } }; no ready target: exit 3 without a row |
part { id } | the engine's marker ~/.local/state/alta/steps/<id>.json says status: "ok" (a successful apply) | that file only; no program runs |
agent { id } | the agent is in OpenClaw's list | openclaw agents list --json |
chart { id, version? } | the chart's release record exists (at a version in the range, when given) | ~/.local/state/alta/charts/<id>/release.json only |
service { id } | the service is in the registry, and answers on 127.0.0.1 at its port when the registry names one | ~/.local/state/alta/services/<id>.json, then an HTTP request |
automation { key, ranWithinHours } | as automation, and its last_run_at on the system map is that recent | the system map |
task { id } (Q2) reads the owner's task file: a Markdown file of checkboxes under ~/ chosen with | ||
--tasks ~/path.md or WORLD_TASKS (the demo reads content/demo/tasks.demo.md), read only, never written; | ||
GET /api/tasks lists it. Task ids are f- and 10 hex of the sha-256 of the text. probe { id } is answered by | ||
server/sources.mjs only (live probes, or content/demo/probes.demo.json in demo). answer, | ||
entity, world, mission are never run by the server (CORE_TYPES). | ||
seen is resolved by the core too. |
Sign-in and model checks
| Check | Passes when (read only) | Fails with |
|---|---|---|
signin { tool } | the tool's status command (status of SIGNIN_TOOLS): claude auth status --json says loggedIn: true (only that field is read); codex login status, gh auth status --hostname github.com, alta-signin-practice status exit 0 (their output is not read) | "Claude Code is not installed on this machine…" (the tool's product name), or "not signed in to Claude Code yet" |
signin { mind } | the same as tool (claude or codex), for packs written before tool; a check names exactly one | as above |
model { mind: "claude" } | openclaw models status --json: default model anthropic/… and a runtime route anthropic → claude-cli | the default model is not Claude, or not through the Claude Code sign-in |
model { mind: "codex" } | default model openai/… with an OpenAI runtime route or OAuth profile | the default model is not ChatGPT (Codex), or has no ChatGPT sign-in |
model { mind: "local" } | default model of a local provider (ollama, lmstudio, omlx, vllm, sglang, llama.cpp, apple-fm) | the default model is not a local one |
permission { name } | openclaw nodes status --json: the node of the Mac app (clientId: "openclaw-macos" or deviceFamily: "Mac", the connected one first) has permissions.<key> true (speech → speechRecognition, screen → screenRecording, the others by their name) | "the OpenClaw app is not connected on this Mac", or "may not use … yet" |
channel { id, state? } | openclaw channels list --json: chat.<id>.accounts is not empty; with state: "paired" also openclaw pairing list <id> --json has no requests | "<id> has no account in OpenClaw yet", or "a pairing request still waits" |
identity | ~/.openclaw/workspace/IDENTITY.md has a **Name:** field with a name (same line or the indented line under it; OpenClaw's template hint _(pick something you like)_ is no name), or openclaw agents list --json gives the agent main an identityName with identitySource: "config" (what agents set-identity writes) | "no name in IDENTITY.md nor in OpenClaw's config"; the name read from the config is never returned |
seen { key } (core) | Save.seen holds the key; "trailer" matches the trailer of any world (trailer:<world>) | stays open (never failing) |
A result carries no token, e-mail, account or model name: only pass or fail and why, in words, and for a missing program reason: "not-installed" (CheckResult.reason), which the game says in the player's language. model runs openclaw models status once for all its checks (cached 5 s), and so do permission (nodes status) and channel (channels list). Neither ever returns a node, an account, a sender or a code. GET /api/game?fresh=1 runs every check again at once (at most every 2 s): the game's "Check again".
Before this version the server read a second game file, ~/.openclaw/workspace/prototypes/quests/branches.json, when it existed. It is now read only when asked for with --branches <file> or WORLD_BRANCHES.