/** * Bucket interpretation helpers for log10x_pattern_examples. * * Classifies per-bucket slot distributions into a structured * interpretation: how many emitters, what kind, how much of the * slot space is pure envelope noise vs real content variation, * and what action the regulator should take. */ /** * Return true if the slot name comes from the k8s / infra envelope. * * Strips the ' (inferred)' suffix before matching so medium-confidence * inferred names (e.g. "version (inferred)") are also caught. * * Low-confidence positional slots (slot_N, slot_N_partM) are NOT envelope * — they are residual and classified as 'unknown' by the caller. */ export declare function classifySlotAsEnvelope(slotName: string): boolean; /** * Infer the type of emitting entity from the set of envelope slot * names present in a bucket. * * Priority order mirrors k8s nesting: * pod_id | pod_name → 'pod' (most specific k8s identity) * container_id alone → 'container' * host | hostname → 'host' * default → 'process' */ export declare function inferEmitterType(envelopeSlots: Set): 'pod' | 'container' | 'process' | 'host'; export interface SlotDistributionEntry { slot: string; distinct_count: number; is_constant: boolean; naming_confidence: 'high' | 'medium' | 'low'; sample_values: string[]; } export interface BucketInterpretationInput { eventCount: number; patternEventCount: number; slotDistribution: SlotDistributionEntry[]; } export interface BucketInterpretation { active_emitters: number; emitter_type: 'pod' | 'container' | 'process' | 'host'; content_variance: 'none' | 'low' | 'high'; envelope_share_of_named_slots: number; recommended_action: 'drop' | 'compact' | 'sample' | 'keep'; rationale: string; human_summary: string; } /** * Derive a structured interpretation of one pattern-examples bucket. * * Steps: * 1. Partition slots into envelope / content / residual. * 2. Count varying content slots for content_variance. * 3. Identify active_emitters as max(distinct_count) across * envelope-identity slots (container_id, pod_id, pod_name). * 4. Infer emitter_type from which identity slots are present. * 5. Compute envelope_share_of_named_slots (residual excluded). * 6. Apply recommended_action heuristic. * 7. Build rationale + human_summary strings. * * @param input.eventCount Events in this bucket. * @param input.patternEventCount Total events across ALL buckets in the pattern. * @param input.slotDistribution Already-built slot_distribution array from * the bucket output. */ export declare function computeBucketInterpretation(input: BucketInterpretationInput): BucketInterpretation;