import type { MonitorHealth, MonitorLifecycleState, MonitorStatusView, PersistedMonitorRecord } from "./monitor-types.js"; /** * Derive the health value for a monitor based on its lifecycle state and * an optional tick result. * * When the lifecycle is paused or stopped the health always matches the * lifecycle. Otherwise the caller supplies the "active" health that * reflects what happened during the tick. */ export declare function deriveHealth(lifecycleState: MonitorLifecycleState, activeHealth: MonitorHealth): MonitorHealth; /** * Derive the health to assign after a lifecycle transition (pause/stop/resume). */ export declare function deriveTransitionHealth(lifecycleState: MonitorLifecycleState): MonitorHealth; /** * Normalize a poll interval value, falling back to the provided default. * Throws if the value is not a positive finite integer. */ export declare function normalizePollIntervalMs(value: number | undefined, fallback: number): number; /** * Sort an array of monitor status views by gitCommonDir for deterministic output. */ export declare function sortStatuses(statuses: readonly MonitorStatusView[]): readonly MonitorStatusView[]; /** * Project a persisted record plus an authorized-workspace count into a * read-only status view. */ export declare function toStatusView(record: PersistedMonitorRecord, authorizedWorkspaces: number): MonitorStatusView; //# sourceMappingURL=monitor-health.d.ts.map