feat: add agent-first minitool studio MVP
CI / verify (push) Has been cancelled

This commit is contained in:
2026-09-17 21:54:33 +08:00
commit 74a8f7cdf3
51 changed files with 3855 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
import { NextRequest, NextResponse } from "next/server";
import { cleanupIdleNodeModules } from "../../../../lib/cleanup";
import { errorResponse } from "../../../../lib/http";
export const runtime = "nodejs";
export async function POST(request: NextRequest) {
try {
const body = await request.json().catch(() => ({}));
const idleHours = body.idleHours === undefined ? undefined : Number(body.idleHours);
if (idleHours !== undefined && (!Number.isFinite(idleHours) || idleHours < 0)) throw new Error("idleHours must be a non-negative number");
return NextResponse.json(await cleanupIdleNodeModules(idleHours));
} catch (error) { return errorResponse(error); }
}