export interface PortalIndexEntry { lastPushMs: number; rows: number; exposed: string[]; } export type PortalIndexState = Record; export interface PortalAccountAudit { accountId: string; /** No state entry at all: enrolled for a portal, never successfully pushed. */ neverRan: boolean; /** Whole minutes since the last verified push; null when it never ran. */ ageMin: number | null; rows: number | null; exposed: string[]; stale: boolean; } export interface PortalIndexAuditResult { accounts: PortalAccountAudit[]; stale: number; neverRan: number; } /** * Two intervals, not one: a single missed cycle is ordinary (a slow push, a * device asleep at the tick). Two consecutive misses is a pattern, and the * threshold has to be loose enough that the line means something when it fires. */ export declare const STALE_AFTER_INTERVALS = 2; /** * @param portalAccountIds accounts carrying a data-portal.json — the enrolment * signal. An account absent from this list has no portal and is not audited. * @param state the push's own success record, keyed by accountId. * @param nowMs * @param intervalMs the push's cadence. */ export declare function auditPortalIndex(portalAccountIds: string[], state: PortalIndexState, nowMs: number, intervalMs: number): PortalIndexAuditResult; /** One line per account needing attention, plus one summary line that fires * even when everything is healthy — an audit that goes quiet when it finds * nothing is indistinguishable from an audit that stopped running, which is * the exact defect this whole module exists to close. */ export declare function formatPortalIndexAudit(result: PortalIndexAuditResult): string[]; //# sourceMappingURL=portal-index-audit.d.ts.map