import { NextResponse } from "next/server";

export const dynamic = "force-dynamic";

export async function POST() {
  return NextResponse.json(
    {
      error: "Next /api/mindmap-ai/expand-node 已退场，请改用 AI Agent 内置 mindmap_expand_node 工具。",
      code: "mindmap-expand-node-route-retired",
      replacement: {
        kind: "ai-agent-tool",
        toolName: "mindmap_expand_node",
        route: "/api/ai-agent/run",
      },
    },
    {
      status: 410,
      headers: {
        "x-mnote-compat-boundary": "mindmap-expand-node-route-retired",
      },
    },
  );
}
