Skip to content

@usine/core/run

The work a loop owes one Event. At most one open Run exists per dedup key; the engine’s ledger enforces it (ADR 0002).

  • Schema.Class

new Run(…args): Run

Parameter Type
…args [props: object, options?: MakeOptions]

Run

readonly eventId: string & Brand<"EventId">

readonly id: string & Brand<"RunId">

readonly loop: string & Brand<"LoopName">

readonly openedAt: Utc

readonly state: Pending | Waiting | Queued | Running | Succeeded | Failed | Canceled

RunId = typeof RunId.Type

Identity of the work owed to one Event, retained across retries of its Step.

const RunId: Schema.brand<Schema.NonEmptyString, "RunId">

Identity of the work owed to one Event, retained across retries of its Step.