import type { DiagEvent, RelayQuery, RelayResult } from "@vincentt-xr/harness/events"; export declare class EventStore { private readonly capacity; private readonly buf; /** * Insertion-ordered, so the roster reads in arrival order rather than in * whatever order a hash lands. Labels are never removed: a viewer that * disconnected 20 seconds ago still has events in this buffer, and dropping * its label would make them unfilterable. */ private readonly viewersSeen; /** * Same rule, same reason, for testers — and it matters MORE here, because * `--tester t1` is what a creator runs at the moment the tester who hit the * bug has already closed their tab. * * Note what is NOT here: a set of raw client session keys. The store used to * hold one and return it in `RelayResult.sessions`, which put a * viewer-controlled string on the terminal and in MCP tool output. The raw key * never enters this file; the relay maps it to a tester id first. */ private readonly testersSeen; private latest; constructor(capacity?: number); /** * Ingest a batch from a client. Both the VIEWER and the TESTER come from the * connection's own resolution, never from the payload — the device never * proposes its own label (B22), and an identifier taken from the body would be * a viewer-supplied string flowing to the terminal and to MCP tool output. */ ingest(events: DiagEvent[], tags?: { viewer?: string; tester?: string; }): void; /** Answer an MCP query against the buffer. Newest-biased when limited. */ query(q?: RelayQuery): RelayResult; /** The label an event carries, for the live terminal stream. */ viewerFor(e: DiagEvent): string | undefined; /** The tester an event carries, for the live terminal stream. */ testerFor(e: DiagEvent): string | undefined; size(): number; }