/** * OpenKernel — Event Bridge * * Taps the kernel EventBus (via subscribeAll) and turns local events into * compact StreamFrames the mesh broadcasts to connected harnesses. Tuned for * animation: lifecycle events flow immediately (so the map reacts instantly), * while noisy LOG/PROVIDER_HEALTH chatter is coalesced on a short flush timer to * keep the byte-rate low. */ import type { KernelEvent } from '../types.js'; import type { StreamFrame } from './types.js'; export interface EventBridgeOptions { nodeId: string; /** Push a frame onto the mesh (MeshServer.broadcast). */ emit: (f: StreamFrame) => void; flushMs?: number; } export declare class EventBridge { private opts; private buffer; private timer?; constructor(opts: EventBridgeOptions); /** Compact an event to a tiny payload for the wire. */ private compact; /** Handle a kernel event (wire this to kernel.subscribeAll). */ handle(e: KernelEvent): void; private scheduleFlush; private flush; stop(): void; }