import { claudeDryRun } from '@/lib/runtime.js';
import { requireSession } from '@/lib/auth.js';
export const runtime = 'nodejs';
export const dynamic = 'force-dynamic';
export async function POST(req) {
  try {
    await requireSession(req);
    return Response.json(claudeDryRun(await req.json()));
  } catch (err) {
    if (err && typeof err === 'object' && err.status) {
      return Response.json({ error: err.error || 'unauthorized' }, { status: err.status });
    }
    return Response.json({ error: err.message }, { status: 400 });
  }
}
