import { NextRequest, NextResponse } from 'next/server'; import { createSupervisorClient } from '@/lib/supervisor/client'; import { withLogging } from '@/lib/utils/api-logger'; export const POST = withLogging(async (request: NextRequest) => { const body = await request.json().catch(() => ({})); const wait = body.wait ?? true; const client = createSupervisorClient(); const results = await client.startAllProcesses(wait); return NextResponse.json({ success: true, message: 'Started all processes', results, wait, }); }, 'startAllProcesses');