#!/usr/bin/env node import { type DomainAggregate, type TierSlotName } from "../domain-stats.js"; export interface GaugeData { domains_tracked: number; domains_failing: number; tier_success_ratio: Array<{ tier: TierSlotName; ratio: number; }>; } /** Pure: derive gauge values from an aggregate. */ export declare function deriveGauges(agg: DomainAggregate): GaugeData; /** * Emit the gauges via a self-contained MeterProvider, force-flushing before * shutdown so a short-lived run exports. No-op (returns false) when * OTEL_EXPORTER_OTLP_ENDPOINT is unset. Best-effort — logs and returns false on * any OTel error rather than failing the snapshot half of the job. */ export declare function emitGauges(data: GaugeData): Promise; export interface MaintenanceResult { count: number; snapshotPath: string; pruned: number; gaugesEmitted: boolean; truncated: boolean; aggregate: DomainAggregate; } export interface MaintenanceOptions { snapshotDir?: string; retention?: number; } /** Run one maintenance pass: SCAN → gauges + snapshot + prune. */ export declare function runMaintenance(opts?: MaintenanceOptions): Promise; export declare function main(): Promise;