Skip to content

SubsystemRegistry

Defined in: subsystems.ts:76

new SubsystemRegistry(): SubsystemRegistry

SubsystemRegistry

getStatuses(): SubsystemStatus[]

Defined in: subsystems.ts:137

Current status of every subsystem, install order, liveness derived now.

SubsystemStatus[]


markError(id, reason?): void

Defined in: subsystems.ts:120

Terminal error transition; keeps the reason in lastError.

string

string

void


markStepped(id): void

Defined in: subsystems.ts:131

Pet the watchdog: an owned system ran this frame. Cheap and silent (no notify) — liveness is sampled, not pushed. Call once per tick.

string

void


phaseOf(id): SubsystemPhase | undefined

Defined in: subsystems.ts:125

The current phase of a subsystem, or undefined if unknown.

string

SubsystemPhase | undefined


recentEvents(limit?): SubsystemEvent[]

Defined in: subsystems.ts:160

Recent lifecycle transitions, oldest→newest (for a diagnostics log).

number = EVENT_LOG_CAP

SubsystemEvent[]


register(id, opts?): void

Defined in: subsystems.ts:85

Register (or re-register) a subsystem in the registered phase.

string

string[]

string

void


subscribe(fn): () => void

Defined in: subsystems.ts:165

Subscribe to phase transitions (not per-beat). Returns an unsubscribe.

() => void

() => void


transition(id, phase, detail?): void

Defined in: subsystems.ts:109

Move a subsystem to a new lifecycle phase (no-op for an unknown id).

string

SubsystemPhase

string

void