import type {Sensor,SensorInventory} from './contracts'; // Persistent identity/settings are not evidence that an instance is present. // Both Core and Node use the same live inventory projection, keyed by device ID. export function visibleSensors(inventory:SensorInventory|null,fresh:boolean):Sensor[]{ return fresh&&inventory?.fresh!==false?inventory?.items.filter(device=>device.online)??[]:[]; }