/** * Which document an observation belongs to. * * Evidence scoped by time and ring-buffer capacity alone lets a request observed under a PREVIOUS * document — or under a previous run of the application entirely — be counted against an action * taken now. That is a citation that is true about the bytes and false about the world, which is * the worst kind of wrong a verification tool can be. * * A document id is minted once per real document and dies with it. A full navigation replaces the * document and so replaces the id. An SPA route change does NOT, which is correct rather than a * limitation: same JavaScript context, same in-flight requests, same evidence. * * This lives in `core` because it crosses the wire, and every wire value is defined here. */ /** * Long enough not to collide within a session, short enough to stamp on every event. * * The cost is paid thousands of times per session, so this is a deliberate trade rather than a * default: eight base-36 characters is a little over forty bits, against a population of at most a * handful of documents per session. Collisions are not the risk being managed here; wire weight is. */ export declare const DOCUMENT_ID_LENGTH = 8; /** * Mint an id for the current document. * * `random` is injected for the same reason the clock is: a generator that reaches for `Math.random()` * cannot be unit-tested and cannot be replayed, and this repo forbids both. */ export declare function newDocumentId(random: () => number): string; /** * Does this evidence belong to the document currently under observation? * * **Unstamped evidence counts as current.** An SDK older than this field stamps nothing, and * excluding it would make those installations silently stop reporting real contradictions. A * verification tool that quietly finds nothing is far worse than one that occasionally over-reports, * and this change exists to remove quietly-wrong answers rather than to trade one kind for another. */ export declare function isSameDocument(evidenceDocumentId: string | undefined, currentDocumentId: string | undefined): boolean;