import { checkComfyHttp, fetchQueue } from '~/server/utils/comfyLifecycle' export default defineEventHandler(async () => { const [comfy, queue] = await Promise.all([ checkComfyHttp().catch(() => ({ ok: false, host: '', stats: null })), fetchQueue() ]) const busy = Boolean(comfy.ok && queue.running > 0) return { ok: true, service: useRuntimeConfig().public.instanceName || 'aigen', comfy: { ok: comfy.ok, busy, host: comfy.host || '', queueRunning: queue.running, queuePending: queue.pending, stats: comfy.ok ? comfy.stats : undefined } } })