import type { DiagEvent, LogEvent, NetworkEvent, RelayQuery, RelayResult, TraceEvent } from "@vincentt-xr/harness/events"; export interface RelayClient { query(q: RelayQuery): Promise; } /** A RelayClient backed by the relay's HTTP /query endpoint. */ export declare function httpRelayClient(baseUrl: string): RelayClient; export declare function formatLog(e: LogEvent, now: number): string; export declare function formatNetwork(e: NetworkEvent, now: number): string; export declare function formatTrace(e: TraceEvent, now: number): string; /** * Render a RelayResult for one kind into the text block a tool returns. * * EVERY field is read defensively, because the CLI and the relay are versioned * SEPARATELY on a user's machine even though they ship from one monorepo: * `npx vincentt` fetches whatever the registry has, and points it at whatever * relay `vincentt preview` happens to be running. A field this renderer reads * unguarded is a field whose removal from the relay CRASHES an older CLI. * * That is not hypothetical — it is exactly what removing `sessions` did: * `result.sessions.length` on a response that no longer carried the field took * down the whole command, while `--json` kept working because it never touched * it. A missing optional array must degrade to a missing LINE, never to an * exception that hides the events the creator asked for. */ export declare function renderResult(result: RelayResult, kind: DiagEvent["kind"], now: number): string; /** * Only-errors convenience filter applied on top of a log query result. * * EVERY index-parallel array is filtered with the SAME predicate rather than * passed through: dropping events without dropping their tags would shift each * remaining tag by one and attribute every error to the wrong tester — which is * worse than no attribution, because it looks right. * * Adding a parallel array to RelayResult means adding it here too. `eventTesters` * arrived with tester attribution and was missed on the first pass, which is * exactly the failure this comment already described. */ export declare function filterErrors(result: RelayResult): RelayResult;