import { NextResponse } from "next/server"; import { toErrorResponse } from "@/lib/render-pipeline/errors"; import { requirePipelineUser } from "@/lib/render-pipeline/session-auth"; import { listToolVersions } from "@/lib/render-pipeline/tools"; // ── GET /api/tools ─────────────────────────────────────────────────────────── // // What version of each studio tool is deployed where, with anything behind the // newest seen version flagged. export async function GET() { try { await requirePipelineUser(); const result = await listToolVersions(); return NextResponse.json(result); } catch (err) { const { body, status } = toErrorResponse(err); return NextResponse.json(body, { status }); } }