import { type JoinKeyType } from './JoinKeys.js'; export type { JoinKeyType }; export interface CardinalityIndex { /** * How many distinct actors share this key value in the window. * * Zero means the value was never seen, or was seen only on rows that carry no client address * — either way there is no evidence that it identifies anybody. */ cardinality(type: JoinKeyType, value: string): number; } /** * Count distinct actors behind each join-key value across a window. * * This is the evidence for Invariant 2. Some keys identify a person and some identify a crowd, * and the difference is not knowable from the key's name: REQUEST_ID is reliably 1:1, while a * community guest USER_ID was measured at 1:1371 in a single hour. Expanding through the second * turns one actor's timeline into every anonymous visitor's, attributed to one actor. * * Actors are counted as distinct client IPs rather than rows on purpose. Rows measure how busy a * key was; IPs measure how many people stand behind it. A single actor making ten thousand * requests must stay expandable, and ten actors sharing one key must not. * * The index only measures. Refusing to expand, and recording why, belongs to the engine — a * timeline that was quietly bounded is as misleading as one that was over-attributed. */ export declare function buildCardinalityIndex(rows: ReadonlyArray>): CardinalityIndex; //# sourceMappingURL=CardinalityIndex.d.ts.map