export async function checkSupervisorHealth(deps) {
    const status = await deps.sessionGateway.daemonStatus();
    const checkedAt = deps.now().toISOString();
    if (status.reachable) {
        deps.supervisorHealthGateway.update('up', null, checkedAt);
    }
    else {
        deps.supervisorHealthGateway.update('down', status.reason, checkedAt);
    }
    return deps.supervisorHealthGateway.read();
}
//# sourceMappingURL=checkSupervisorHealth.usecase.js.map