import type { PatchOperation } from "./types"; /** The `notifications/meissa/update` envelope a server pushes over SSE (spec §09-mcp-integration.md §6). */ export interface MeissaUpdateNotification { method: "notifications/meissa/update"; params: { target: string; patches: PatchOperation[]; }; } export interface MeissaStreamHandlers { /** Called with merged patches for a target, at most `maxPatchesPerSecond` times per second. */ onPatch: (target: string, patches: PatchOperation[]) => void; onOpen?: () => void; onError?: (err: unknown) => void; } export interface MeissaStreamOptions { /** Caps how often `onPatch` fires per target, coalescing rapid updates. Default 10 (per spec). */ maxPatchesPerSecond?: number; } export interface MeissaStreamConnection { close: () => void; } /** * Subscribe to a Meissa live-update SSE endpoint (see `createUpdateStream` on the * server subpath). Buffers rapid patches per target and flushes at `maxPatchesPerSecond`. */ export declare function connectMeissaStream(url: string, handlers: MeissaStreamHandlers, options?: MeissaStreamOptions): MeissaStreamConnection;