//#region extensions/matrix/src/matrix/device-health.ts
const DAOCORE_DEVICE_NAME_PREFIX = "DaoCore ";
function isDaoCoreManagedMatrixDevice(displayName) {
	return displayName?.startsWith(DAOCORE_DEVICE_NAME_PREFIX) === true;
}
function summarizeMatrixDeviceHealth(devices) {
	const currentDeviceId = devices.find((device) => device.current)?.deviceId ?? null;
	const openClawDevices = devices.filter((device) => isDaoCoreManagedMatrixDevice(device.displayName));
	return {
		currentDeviceId,
		staleDaoCoreDevices: openClawDevices.filter((device) => !device.current),
		currentDaoCoreDevices: openClawDevices.filter((device) => device.current)
	};
}
//#endregion
export { summarizeMatrixDeviceHealth as n, isDaoCoreManagedMatrixDevice as t };
