Skip to content

@usine/core/cycle-budget

An Item-level request for an operator reset before further Runs can open.

  • Schema.Class

new CycleBudgetAsk(…args): CycleBudgetAsk

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

CycleBudgetAsk

readonly counts: readonly [LoopCycleCount, LoopCycleCount]

readonly id: string & Brand<"EventId"> & Brand<"CycleBudgetAskId">

readonly itemKey: string & Brand<"ItemKey">

readonly limit: number & Brand<"CycleLimit">

readonly loop: string & Brand<"LoopName">

readonly repository: string & Brand<"RepositoryName">

get completedCycles(): number & Brand<"CycleCount">

The furthest completed round; each Loop participates at most once per round.

number & Brand<"CycleCount">


A Loop’s charged Runs and settled Runs in the current cycle budget.

  • Schema.Class

new LoopCycleCount(…args): LoopCycleCount

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

LoopCycleCount

readonly admitted: number & Brand<"CycleCount">

readonly completed: number & Brand<"CycleCount">

readonly loop: string & Brand<"LoopName">

CycleBudgetAskId = typeof CycleBudgetAskId.Type

Identifies the Event and budget generation that first exhausted an Item’s allowance.


CycleCount = typeof CycleCount.Type

Number of admitted or completed rounds for one Loop on an Item.


CycleGeneration = typeof CycleGeneration.Type

Identifies one Item allowance between explicit operator resets.


CycleLimit = typeof CycleLimit.Type

Maximum Runs one Loop may open for an Item between operator resets.

const CycleBudgetAskId: Schema.brand<Schema.brand<Schema.NonEmptyString, "EventId">, "CycleBudgetAskId">

Identifies the Event and budget generation that first exhausted an Item’s allowance.


const CycleCount: Schema.brand<Schema.Int, "CycleCount">

Number of admitted or completed rounds for one Loop on an Item.


const CycleGeneration: Schema.brand<Schema.Int, "CycleGeneration">

Identifies one Item allowance between explicit operator resets.


const CycleLimit: Schema.brand<Schema.Int, "CycleLimit">

Maximum Runs one Loop may open for an Item between operator resets.


const DEFAULT_CYCLE_LIMIT: number & Brand

The safe default for unattended rounds on an Item.