import { getHermesJobWithEvents } from '@/lib/hermes-jobs.js';

export const runtime = 'nodejs';
export const dynamic = 'force-dynamic';

export async function GET(_, { params }) {
  const { id } = await params;
  const job = getHermesJobWithEvents(id);
  if (!job) return Response.json({ error: 'not found' }, { status: 404 });
  return Response.json({ job });
}
