gatelineAPI reference

Constructors

Properties

engineId: string

This process, as the ledger names it (#349) — see EngineConfig.engineId.

governor: GovernorPort

What admits this engine's dispatches (#501) — see EngineConfig.governor.

hostName: string

The host part of this engine's id: engineName, or the OS hostname (#502).

onSettled: null | () => void = null

Fired each time a dispatch job settles — the completion trigger.

repository: string

This repository's key with the governor — see EngineConfig.repository.

Methods

  • Operator force-drain (#150): SIGKILL every live harness process group. Aborted dispatches resolve through the normal failure path — closing commits land and tasks are freed for retry — so drain() completes shortly after. Returns how many groups were signalled.

    Returns number

  • The engine's loop is stopping (#502): admit nothing from now on. Checked immediately before every reservation and again immediately before every intent commit, so a pass that was running when stop() was called cannot reserve, commit or launch after it. Jobs already launched run to their closing commits.

    Returns void

  • A pass completed (#502): a tick or seed fault is behind the engine. A settlement or sweep fault is not — it stands until its entry is closed or aged out (settleEntryFaults).

    Returns void

  • Additive fields for this engine's health file (#502), present only while they say something, so a healthy engine's file is unchanged: failed (the newest standing fault), unseeded (the repositories the governor's seed gate is still waiting on) and uncounted (the repositories the machine's spend window is not counting, because their startup seed failed before they ever reported — the one known under-count).

    Returns { failed?: EngineFault; uncounted?: string[]; unseeded?: string[] }

  • Record a fault caught at a boundary (#502) — a tick that threw, a job whose closing commit threw, a failed startup seed — and log it, with the stack on the first fault of a streak. The engine is then failed in its health file from the next write (the loop writes it after every pass). It is not stopped: every trigger still reaches it, except that after repeated tick faults the loop retries on the heartbeat only.

    entry is the ledger entry (or sweep marker) a settlement fault left open; the fault stands until that entry is closed or aged out.

    Parameters

    • where: "seed" | "sweep" | "tick" | "settlement"
    • e: unknown
    • Optionalcontext: string
    • Optionalentry: FaultEntry

    Returns EngineFault

  • Seed if needed, then report this repository's ledgers to the governor — for a caller about to reserve without a tick first (the CLI's sweep).

    Returns Promise<void>

  • Be woken when the governor frees a slot this engine was refused (#501). runLoop subscribes with its own trigger, so a wake is an ordinary tick through the ordinary path — never a call into the engine mid-tick.

    Parameters

    • wake: () => Promise<void>

    Returns () => void

  • Fast-forward local run branches from origin before deriving (#104). A standalone orchestrator has no co-located server fetch loop to lean on, and an engine reading a materialized local branch never sees remote decisions otherwise — it re-derives yesterday's state forever. ff-only and idempotent (LocalGitSource.syncFromRemote): a diverged branch is refused and left for a human, never resolved silently. Failure is tolerated — a clone with no origin is a legal dev/test topology.

    Callers choose when: the run loop syncs on heartbeat/startup ticks only, because our own fetch touches FETCH_HEAD under the watched .git dir and a sync inside every refs-triggered tick would re-trigger itself.

    Returns Promise<void>

  • Leave the governor (#502): for an engine that has stopped and drained. Its slots and its place in the seed gate and the round-robin are freed; its spend inside the window keeps counting (Governor.unregister).

    Returns void