export interface VirtualRouterHitEvent {
    requestId: string;
    timestamp: number;
    entryEndpoint: string;
    routeName: string;
    pool: string;
    providerKey: string;
    runtimeKey?: string;
    providerType?: string;
    modelId?: string;
    reason?: string;
    requestTokens?: number;
    selectionPenalty?: number;
    stopMessageActive?: boolean;
    stopMessageMode?: 'on' | 'off' | 'auto' | 'unset';
    stopMessageRemaining?: number;
}
export interface ProviderUsageEvent {
    requestId: string;
    timestamp: number;
    providerKey: string;
    runtimeKey?: string;
    providerType: string;
    modelId?: string;
    routeName?: string;
    entryEndpoint?: string;
    success: boolean;
    latencyMs: number;
    promptTokens?: number;
    completionTokens?: number;
    totalTokens?: number;
}
export interface RouterStatsBucket {
    requestCount: number;
    poolHitCount: Record<string, number>;
    routeHitCount: Record<string, number>;
    providerHitCount: Record<string, number>;
    reasonHitCount: Record<string, number>;
    penaltyHitCount: Record<string, number>;
    stopMessageActiveCount: number;
}
export interface RouterStatsSnapshot {
    global: RouterStatsBucket;
    byEntryEndpoint: Record<string, RouterStatsBucket>;
}
export interface ProviderStatsBucket {
    requestCount: number;
    successCount: number;
    errorCount: number;
    latencySumMs: number;
    minLatencyMs: number;
    maxLatencyMs: number;
    usage: {
        promptTokens: number;
        completionTokens: number;
        totalTokens: number;
    };
}
export interface ProviderStatsSnapshot {
    global: ProviderStatsBucket;
    byProviderKey: Record<string, ProviderStatsBucket>;
    byRoute: Record<string, ProviderStatsBucket>;
    byEntryEndpoint: Record<string, ProviderStatsBucket>;
}
export interface StatsSnapshot {
    router: RouterStatsSnapshot;
    providers: ProviderStatsSnapshot;
}
export interface StatsCenterOptions {
    enable?: boolean;
    autoPrintOnExit?: boolean;
    persistPath?: string | null;
}
export interface StatsCenter {
    recordVirtualRouterHit(ev: VirtualRouterHitEvent): void;
    recordProviderUsage(ev: ProviderUsageEvent): void;
    getSnapshot(): StatsSnapshot;
    flushToDisk(): Promise<void>;
    reset(): void;
}
export declare function initStatsCenter(options?: StatsCenterOptions): StatsCenter;
export declare function getStatsCenter(): StatsCenter;
