ReadonlyspendThe window the spend limits measure over — engines read their ledgers back this far.
Make a repository known: it enters the spend sum and the round-robin, and
must seed before anything is granted. displayName is how the refusal
words name it (#502); the key is used when there is none.
Optionalopts: { displayName?: string; spendLimitUsd?: null | number }Whether the repository is registered now (not unregistered, not unknown).
The repository's ledgers, read by gather. Replaces its previous report.
The governor calls gather itself so that it knows which settlements the
report can have seen: those released before gather began. A report
that arrives after a newer one has been applied is ignored.
Check every limit and grant or refuse, in one synchronous step.
The repository's open entries at startup. Marks it seeded; additive.
Be woken when a slot this repository was refused may be free. Returns the unsubscribe.
The repositories the machine's spend window is not counting (#502): each was unregistered after its startup seed failed or timed out, before it ever reported, so what it spent in the window is unknown to the governor until it seeds. Empty unless a machine spend limit is enforced, since only then is anything decided on that sum.
Forget a repository (#502), for an engine that has stopped. Its live reservations and startup holds are released, and it leaves the round-robin and the seed gate. What it spent inside the window keeps counting against the machine's window until the window rolls past it: the money was spent whether or not its engine still runs.
Optionalopts: { uncounted?: boolean }The registered repositories that have not yet seeded — the ones the seed gate is waiting on.
The seam (#34): what an engine needs from whatever admits its dispatches.
Governoris the in-process implementation.