/** * BrainTelemetryBridge — forwards local Brain (decision layer) events to the * HQ publisher as `brain.event` envelopes, so the command center can observe * decision requests, answers, denials, ask-human escalations, and * self-activated interventions across every connected machine. * * Source: the `brain.*` EventBus events emitted by `ObservableBrainArbiter` * (`coordination/brain.ts`) and `BrainMonitor` (`coordination/brain-monitor.ts`). * All payloads are plain serializable data (request id, question, source, risk, * decision kind, rationale) — no closures, no decoupled relay needed. * * The webui `setup-events.ts` already forwards these verbatim to its browser; * this bridge does the same for the cross-machine HQ plane. * * @module hq/brain-bridge */ import type { EventBus } from '../kernel/events.js'; import type { HqEventEnvelope } from './protocol.js'; import { type BridgeContextOptions } from './bridge-context.js'; export interface BrainTelemetryBridgeOptions extends BridgeContextOptions { /** Local EventBus emitting `brain.*` events. */ events: EventBus; } /** * Start forwarding brain events to HQ. Returns a disposer that unsubscribes * all listeners — call on shutdown. */ export declare function startBrainTelemetryBridge(opts: BrainTelemetryBridgeOptions): () => void; /** Re-export for type-only consumers. */ export type { HqEventEnvelope }; //# sourceMappingURL=brain-bridge.d.ts.map