import { EventEmitter } from 'node:events'; import type { LifecycleAssessment, LifecycleStage } from '@contractspec/lib.lifecycle'; export type LifecyclePipelineEvent = { type: 'assessment.recorded'; payload: { tenantId?: string; stage: LifecycleStage; }; } | { type: 'stage.changed'; payload: { tenantId?: string; previousStage?: LifecycleStage; nextStage: LifecycleStage; }; } | { type: 'confidence.low'; payload: { tenantId?: string; confidence: number; }; }; export interface LifecycleKpiPipelineOptions { meterName?: string; emitter?: EventEmitter; lowConfidenceThreshold?: number; } export declare class LifecycleKpiPipeline { private readonly assessmentCounter; private readonly confidenceHistogram; private readonly stageUpDownCounter; private readonly emitter; private readonly lowConfidenceThreshold; private readonly currentStageByTenant; constructor(options?: LifecycleKpiPipelineOptions); recordAssessment(assessment: LifecycleAssessment, tenantId?: string): void; on(listener: (event: LifecyclePipelineEvent) => void): void; private ensureStageCounters; }