export interface TelemetrySample { operation: { name: string; version: string; }; durationMs: number; success: boolean; timestamp: Date; errorCode?: string; tenantId?: string; traceId?: string; actorId?: string; metadata?: Record; } export interface AggregatedOperationMetrics { operation: { name: string; version: string; }; totalCalls: number; successRate: number; errorRate: number; averageLatencyMs: number; p95LatencyMs: number; p99LatencyMs: number; maxLatencyMs: number; windowStart: Date; windowEnd: Date; topErrors: Record; } export interface OperationSequence { steps: string[]; tenantId?: string; count: number; } export interface IntentAggregatorSnapshot { metrics: AggregatedOperationMetrics[]; sequences: OperationSequence[]; sampleCount: number; windowStart?: Date; windowEnd?: Date; } export interface IntentAggregatorOptions { windowMs?: number; sequenceSampleSize?: number; } export declare class IntentAggregator { private readonly windowMs; private readonly sequenceSampleSize; private readonly samples; constructor(options?: IntentAggregatorOptions); add(sample: TelemetrySample): void; flush(now?: Date): IntentAggregatorSnapshot; private aggregateMetrics; private buildSequences; }