import { type FederationEnvelope, type MessageKind, type StreamFrame } from './types.js'; export declare function newId(): string; export declare function envelope(kind: MessageKind, from: string, data?: T, opts?: { to?: string; re?: string; id?: string; auth?: string; }): FederationEnvelope; /** Build a reply envelope correlated to a request. */ export declare function reply(to: FederationEnvelope, kind: MessageKind, from: string, data?: T): FederationEnvelope; export declare function nextSeq(): number; export declare function frame(t: StreamFrame['t'], from: string, d?: unknown): StreamFrame; /** Serialize a frame as an SSE `data:` block. Event name = frame type for * per-type handling on the harness side. */ export declare function frameToSSE(f: StreamFrame): string; /** Parse a raw SSE chunk buffer into complete frames. Returns leftover text. */ export declare function parseSSE(buffer: string): { frames: StreamFrame[]; rest: string; };