gatelineAPI reference
interface OrchestratorOptions {
    adapters?: string[];
    budgetEnforcement?: boolean;
    codeRepo?: null | string;
    dispatcher?: Dispatcher;
    displayName?: string;
    engineName?: string;
    frameworkPrefix?: string;
    governor?: GovernorPort;
    heartbeatSeconds?: number;
    localOnly?: boolean;
    log?: (line: string) => void;
    maxConcurrentDispatches?: number;
    onSupersede?: (status: CodeTreeStatus) => void;
    push?: boolean;
    repoDir: string;
    repository?: string;
    repositorySpendLimitUsd?: null | number;
    requireBudget?: boolean;
    roleTimeoutSeconds?: number;
    runner?: { enabled: boolean };
    spendLimitUsd?: null | number;
    spendWindowHours?: number;
    stopWaitMs?: number;
}

Properties

adapters?: string[]

Headless adapter names; the first is the default runner (default: claude-code).

budgetEnforcement?: boolean

Budget enforcement switch (#109), default on: false disables the DB/RB/HB pauses — for operators billed flat-rate, where dollar caps do not map to marginal cost. Metering stays unconditional.

codeRepo?: null | string

The code checkout to watch for self-supersede (#141). Absent, the checkout this module runs from (resolveCodeRepo); null, none. Tests point it at a throwaway repository.

dispatcher?: Dispatcher

The engine's and the scheduler's local dispatcher, in place of the headless dispatchers built from the host's adapter manifests — which are then not read at all (#502). For tests and for an embedding that brings its own dispatch seam; everything else about the engine is unchanged.

displayName?: string

How log lines and the governor's refusal words name the repository (#502). Default: the id's last segment.

engineName?: string

The name that replaces the hostname in the engine's id (#502), everywhere the engine writes it: ledger entries and sweep markers, which are committed. Letters, digits, ., _ and -. Default: the OS hostname.

frameworkPrefix?: string

Metadata prefix of an gateline init --prefix host, when not .gateline.

governor?: GovernorPort

The governor that admits this engine's dispatches and its sweeps (#501). Absent, one is built from maxConcurrentDispatches, spendLimitUsd, spendWindowHours and budgetEnforcement — so the standalone binary and a one-repository up each get a governor of their own. An embedding that runs several engines calls startOrchestrators, which builds one governor for all of them; given one here, those four options are the governor's business and are ignored.

heartbeatSeconds?: number
localOnly?: boolean

Explicit local-only designator (mirrors push's explicit tier, the core resolution table's rule 2/AC1.1): unset auto-detects off a missing remote.origin.url, same trigger as loadSources. Conflicts with an explicit push: true — rejected before anything starts (AC4.1).

log?: (line: string) => void
maxConcurrentDispatches?: number

Most dispatches — runs and sweeps — running at once in this process; 0 disables (#227, #501).

onSupersede?: (status: CodeTreeStatus) => void

Self-supersede (#141): fired exactly once, after the confirming heartbeat write, when the code tree this process's own module lives in fast-forwards past the commit it started on. Only wired when the running module resolves to a git checkout (resolveCodeRepo) — an npm-installed/viewer-only process has nothing to watch and startOrchestrator behaves exactly as it did before #141.

push?: boolean

Push every orchestrator commit to origin — origin is the record.

repoDir: string
repository?: string

This repository's id (#494, #502): the id of the engine's source (so the RunRef.source it reads matches the server's) and its key with the governor. Absent, it is derived from the origin (defaultRepositoryId).

repositorySpendLimitUsd?: null | number

This repository's own spend ceiling per window, beneath the machine's (MULTI-REPO.md §7.4).

requireBudget?: boolean

Refuse dispatch on any run missing budget.cost_limit_usd.

roleTimeoutSeconds?: number

Wall clock per dispatched role before its process group is killed (default 30 min).

runner?: { enabled: boolean }

Opt into remote dispatch (run "runner-agent", R6/R9): the engine's dispatcher becomes a RemoteDispatcher instead of the local HeadlessDispatcher(s) — dispatch requests park as promises a workstation agent claims and reports over HTTP (runner-dispatcher.ts, the server's runner-api.ts) rather than spawning a harness in this process. A configuration choice, not a routing decision: unset or false dispatches exactly as before (AC9.1). No entry point enables it today (#507), and startOrchestrators refuses it with several repositories: the runner API serves one.

spendLimitUsd?: null | number

Host-wide spend ceiling across active runs.

spendWindowHours?: number

The rolling window spendLimitUsd measures over, in hours (default 24, #97).

stopWaitMs?: number

How long stop() waits for the running pass before draining without it (default 30 s; #502).