/** * Bridges `AggregateDeviceSource` changes onto the shared `EventBus`'s device * categories (design.md D1; specs/realtime-events "Event Categories"; tasks * 7.4, 7.5). * * `AggregateDeviceSource.subscribe()` only signals a device that changed — * never an explicit removal — so every notification also reconciles the * tracked snapshot against a fresh `list()`, emitting `device_disappeared` * for anything that dropped out. This is the same generic strategy * `DeviceCatalogSource` (`src/core/services/homekit-sources/`) uses for * HomeKit accessory removal, applied here for the SSE stream instead. * * A device notified for the first time since wiring emits `device_appeared` * with its full descriptor; a device already tracked emits `device_state` * (only the properties that changed) and/or `device_reachability`, so a * single device change never resends the inventory. */ import type { EventBus } from "../events/event-bus.js"; import type { AggregateDeviceSource } from "./aggregate.js"; /** * Wires every device change from `devices` onto `eventBus`'s `device_state`, * `device_reachability`, `device_appeared`, and `device_disappeared` * categories. Returns an unsubscribe function. * * Seeds its tracked snapshot from `devices.list()` at call time, so devices * already known when this is wired do not themselves emit a spurious * `device_appeared` — only a device that becomes known, or changes, after * this call does. */ export declare function wireDeviceEvents(devices: AggregateDeviceSource, eventBus: EventBus): () => void; //# sourceMappingURL=device-event-bridge.d.ts.map