/** * FleetTelemetryBridge — forwards local multi-agent coordinator stats to the * HQ publisher as `fleet.snapshot` envelopes, so the command center can render * a global fleet roll-up (queued/completed/failed tasks, per-subagent status, * fleet cost) across every connected machine. * * Source: the `coordinator.stats` EventBus event (originating on the FleetBus * and re-emitted onto the host EventBus by `fleet/host.ts`). All payload * fields are plain serializable data — no closures, no decoupled relay needed. * * The snapshot is republished on every `coordinator.stats` change (hash-dedup, * mirroring {@link startSessionTelemetryBridge}) so the HQ browser sees live * fleet counters without polling. * * @module hq/fleet-bridge */ import type { EventBus } from '../kernel/events.js'; import type { HqEventEnvelope } from './protocol.js'; import { type BridgeContextOptions } from './bridge-context.js'; export interface FleetTelemetryBridgeOptions extends BridgeContextOptions { /** Local EventBus emitting `coordinator.stats` (host EventBus after the FleetBus hop). */ events: EventBus; /** Coordinator run id — identifies this fleet instance. Falls back to a stable per-session id. */ runId: string; } /** * Start forwarding coordinator stats to HQ. Returns a disposer that * unsubscribes the listener — call on shutdown. */ export declare function startFleetTelemetryBridge(opts: FleetTelemetryBridgeOptions): () => void; /** Re-export for type-only consumers. */ export type { HqEventEnvelope }; //# sourceMappingURL=fleet-bridge.d.ts.map