Skip to content

core/runs/executors.ts ​

Generated from the exports of core/runs/executors.ts · npm run docs:gen

The closed list of executors (PLAN-V2 §3.3), as the core knows it: quest steps (run.do) and store items (install, undo) may only name these. The server's table (server/runs/registry.mjs) is the authority on what is active; tests/runs.test.ts checks that both lists hold the same rows (everything but the file and the lot). alta.game/0.3 widens what a row says: the arguments a step may give (args, a closed list of values or the kind of a value), whether the executor shows a plan card (card), how it is undone (undo), how a secret reaches it (secret), whether its card records sound (capture), what installs its missing program (installs) and whether it reports progress. executorTableProblems() keeps those promises coherent (tested on the whole table).

Standards that cite this file: alta.chart/0.1: the Agent Chart · alta.game/0.3: steps that act, ask and say why · Resources: what a step, a choice or an executor needs of the machine · Executors, run engine, routes, checks

Exports ​

Capability type ​

ts
type Capability = "ask" | "setup" | "install" | "forge" | "pay" | "repair";

CAPABILITIES const ​

The server capabilities (--allow-<name>). repair is a machine switch, not an executor's: with it on, the guard loop may run a repair the owner granted (docs/standards/alta-chart-0.1.md §13); without it, every repair is asked.

ts
const CAPABILITIES: readonly Capability[]

ParamSpec type ​

One argument an executor takes from a step's run.args:

  • a closed list of values (the 0.2 form): the step gives one of them, or a choice input whose choices are all in it;
  • the kind of a value (0.3): the step gives a literal of that kind, an input of that kind, or an answer (never for secret: a secret only comes from a secret input, and never lands in args).
ts
type ParamSpec = readonly string[] | {
  kind: InputKind;
  /** text: a closed list of words (then it behaves like the list form). */
  values?: readonly string[];
  /** text: longest length (default 200); number: highest value. */
  max?: number;
  /** text: shortest length (default 1); number: lowest value. */
  min?: number;
  /** text: an anchored pattern (`^…$`), 200 characters at most. */
  pattern?: string;
  /** Default true. */
  required?: boolean;
};

SecretVia type ​

How a secret reaches the program (AGENTS.md §2), in the order the card offers them.

ts
type SecretVia = "tool" | "page" | "terminal";

SECRET_VIAS const ​

ts
const SECRET_VIAS: readonly SecretVia[]

Installs type ​

What installs the program an executor needs when the probe says it is missing (the card's "Install it first").

ts
type Installs =
  | { pkg: string }        // a package of `pkg.install`
  | { pkgArg: string }     // the package named by one of the executor's arguments (each of its values is a package)
  | { workflow: string };

ExecutorInfo interface ​

ts
interface ExecutorInfo {
  id: string;
  cap: Capability | null;
  os: OS[];
  hosted: boolean;
  needs?: Need[];
  /** Writes to OpenClaw or Alta (false: only the game's own folder, or nothing). */
  writes: boolean;
  /**
   * The arguments a quest step may give in `run.args`. Absent: the executor's own validation decides at run time
   * (and a step may not feed it a secret). A step that gives another argument or value is refused by `checkGame`.
   */
  args?: Record<string, ParamSpec>;
  /**
   * "plan" (default): a plan card and the player's agreement. "none": one click, only for an executor that writes
   * nothing (`executorTableProblems` refuses it on a writer).
   */
  card?: "plan" | "none";
  /**
   * How it is undone: by the game ("auto"), by a command the card shows ("command"), by moving what it created to
   * ~/.local/share/archive/<date>/ ("archive"), or not at all ("none").
   */
  undo?: "auto" | "command" | "archive" | "none";
  /** The ways a secret may reach it. "page" requires an argument of kind `secret`, and only then. */
  secret?: { via: SecretVia[]; last4?: boolean };
  /** The card records sound (local only: needs audio, never hosted). */
  capture?: "audio";
  installs?: Installs;
  /** The executor reports a percentage while it runs. */
  progress?: boolean;
  /**
   * The run asks the player for something while it goes (POST /api/runs/input): "code", the code a sign-in page
   * shows, typed in the page and handed to the program's standard input as a secret (AGENTS.md §2).
   */
  asks?: "code";
  /**
   * What it needs of the machine (core/platform/resources.ts): a step that runs it shows the reason instead of its
   * "Do it" where the server measured less. Kept equal to the program's own preflight.
   */
  resources?: Resources;
  /**
   * Its work goes on after the run has answered: the result names a job by a random id, whose state (running, done,
   * failed, unknown) is kept on disk (server/lib/jobs.mjs). Needs `progress`.
   */
  job?: boolean;
  /**
   * "auto": it may run under the owner's standing grant, without a plan card each time (a repair of a chart). Never
   * with a secret, a `sudo` need, or the capabilities `pay` and `forge`; never one that undoes by archiving.
   */
  repair?: "auto";
  /**
   * Whether it reaches the network beyond 127.0.0.1 (docs/standards/alta-chart-0.1.md §8, "External services and
   * locality"): "install" when it only downloads once, "run" when it talks to an online service each time it is used
   * or so that what it connects works. Absent: it stays on the machine.
   */
  net?: "install" | "run";
  /**
   * The hosts it reaches, the widest list (https implied; one leading "*." allowed). Absent with `net`: the code does
   * not know them (they depend on the agent's model, the module, the provider). Refined by its arguments in
   * core/charts/external.ts (NET_BY_ARG).
   */
  hosts?: readonly string[];
}

PKGS const ​

Packages pkg.install knows (the formula of each lives in its file, server/exec/pkg-install.mjs).

ts
const PKGS = ["claude", "codex", "ollama", "whisper-cpp", "gogcli", "rmapi", "ffmpeg", "restic", "wacli"] as const

WORKFLOWS const ​

The modules a step may install: the module charts of modules/ (modules/<id>/chart.json, kind module; tests/charts.test.ts keeps the two equal).

ts
const WORKFLOWS = ["sunrise", "ipad", "remarkable", "briefing", "external-drive-ingest", "people-digest", "google", "rhythms", "local-voice"] as const

ALTA_PARTS const ​

The six parts of the Alta install (engine/STEPS.md).

ts
const ALTA_PARTS = ["machine", "mind", "memory", "agents", "map", "modules"] as const

CONFIG_PATHS const ​

OpenClaw settings a step may change (openclaw.config-set); never a path that holds a credential.

ts
const CONFIG_PATHS = ["talk.provider", "talk.speechLocale", "update.channel", "update.checkOnStart"] as const

PANES const ​

System Settings panes mac.open-pane opens.

ts
const PANES = ["microphone", "speech", "accessibility", "screen", "notifications", "full-disk"] as const

CHANNELS const ​

Chat channels of OpenClaw a step may connect.

ts
const CHANNELS = ["telegram", "whatsapp"] as const

EXECUTORS const ​

ts
const EXECUTORS: readonly ExecutorInfo[]

EXECUTOR_IDS const ​

ts
const EXECUTOR_IDS: readonly string[]

executorInfo const ​

ts
const executorInfo = (id: string) => …

executorAccepts const ​

ts
const executorAccepts = (id: string, os: OS) => …

paramValues const ​

The closed list of a parameter, if it has one.

ts
const paramValues = (s: ParamSpec): readonly string[] | undefined => …

paramKind const ​

The kind of a parameter (a closed list is a choice).

ts
const paramKind = (s: ParamSpec): InputKind => …

paramRequired const ​

ts
const paramRequired = (s: ParamSpec) => …

executorTableProblems function ​

Coherence of the table itself (tested on EXECUTORS; a row that breaks it never ships): a card-less executor writes nothing; a sound recorder runs only where there is audio, never hosted; the "page" way of a secret exists exactly when an argument is a secret; installs names a known package, workflow or argument.

ts
function executorTableProblems(list: readonly ExecutorInfo[] = EXECUTORS): string[]

export … re-export ​

The 0.2 name of paramProblems (core/runs/inputs.ts), kept as an alias.

ts
export { paramProblems as runArgsProblems } from "./inputs";

Alta OS is open source (MIT).