Skip to content

Interface: SupervisorStatusResponse

@kortexya/reasoninglayer


@kortexya/reasoninglayer / SupervisorStatusResponse

Defined in: src/types/admin.ts:443

Response payload for GET /api/v1/admin/derived-facts/status/{tenant_id}.

Aggregates per-tenant supervisor health (event counters, last error, materialization LSN, queue depth approximation) and rebuild-state (sentinel snapshot, lock-held hint).

derivedFactsCount: number

Defined in: src/types/admin.ts:448

Total derived_facts rows for this tenant, queried at response time. Operators compare this against materialization_state.derived_count_at_bootstrap to estimate derivation growth since the last rebuild.


eventsFailed: number

Defined in: src/types/admin.ts:450

Cumulative count of events whose handler returned Err(_).


eventsInFlight: number

Defined in: src/types/admin.ts:452

Events currently inside the handler closure.


eventsProcessed: number

Defined in: src/types/admin.ts:454

Cumulative count of events whose handler returned Ok(()).


eventsSubmitted: number

Defined in: src/types/admin.ts:456

Cumulative count of events accepted by submit.


handlerMillisTotal: number

Defined in: src/types/admin.ts:458

Sum of elapsed_ms across all handler invocations.


lastCompleteMs: number

Defined in: src/types/admin.ts:460

Unix-millisecond timestamp of the most recent handler return.


optional lastError?: SupervisorErrorSnapshot | null

Defined in: src/types/admin.ts:461


lastSubmitMs: number

Defined in: src/types/admin.ts:463

Unix-millisecond timestamp of the most recent submit call.


materializationLsn: number

Defined in: src/types/admin.ts:467

Per-tenant materialization LSN as of the response. Read-side caches keyed on this value compare against it to detect new derivations.


optional materializationState?: MaterializationStateSnapshot | null

Defined in: src/types/admin.ts:468


program: MaterializationProgramStatus

Defined in: src/types/admin.ts:472

The tenant’s materialization program (#910): both fences and the open retirements naming the tenant. Rows are served as current only while program.current holds.


queueDepthApprox: number

Defined in: src/types/admin.ts:476

Approximate channel depth: submitted − processed − failed − in_flight. Saturates at zero on the rare race where a handler returned between two field reads.


rebuildInFlight: boolean

Defined in: src/types/admin.ts:483

Racy hint*: true if the per-tenant rebuild mutex is currently held. Computed via try_lock() and can briefly disagree with the actual lock state (the lock may drop between the probe and the read), so operators must not treat this as authoritative. Use it as a “rebuild appears to be in flight” signal only.


supervisorActive: boolean

Defined in: src/types/admin.ts:488

true if a [DataflowSupervisor] has been spawned for this tenant. false indicates the tenant has never had an event submitted on its behalf and the metrics fields are returned at their initial zero values.