// This file is generated automatically by Next.js
// Do not edit this file manually
// This file validates that all pages and layouts export the correct types

import type { AppRoutes, LayoutRoutes, ParamMap, AppRouteHandlerRoutes } from "./routes.js"
import type { ResolvingMetadata, ResolvingViewport } from "next/types.js"
import type { NextRequest } from 'next/server.js'

type AppPageConfig<Route extends AppRoutes = AppRoutes> = {
  default: React.ComponentType<{ params: Promise<ParamMap[Route]> } & any> | ((props: { params: Promise<ParamMap[Route]> } & any) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
  generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
  generateMetadata?: (
    props: { params: Promise<ParamMap[Route]> } & any,
    parent: ResolvingMetadata
  ) => Promise<any> | any
  generateViewport?: (
    props: { params: Promise<ParamMap[Route]> } & any,
    parent: ResolvingViewport
  ) => Promise<any> | any
  metadata?: any
  viewport?: any
}

type LayoutConfig<Route extends LayoutRoutes = LayoutRoutes> = {
  default: React.ComponentType<LayoutProps<Route>> | ((props: LayoutProps<Route>) => React.ReactNode | Promise<React.ReactNode> | never | void | Promise<void>)
  generateStaticParams?: (props: { params: ParamMap[Route] }) => Promise<any[]> | any[]
  generateMetadata?: (
    props: { params: Promise<ParamMap[Route]> } & any,
    parent: ResolvingMetadata
  ) => Promise<any> | any
  generateViewport?: (
    props: { params: Promise<ParamMap[Route]> } & any,
    parent: ResolvingViewport
  ) => Promise<any> | any
  metadata?: any
  viewport?: any
}

type RouteHandlerConfig<Route extends AppRouteHandlerRoutes = AppRouteHandlerRoutes> = {
  GET?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
  POST?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
  PUT?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
  PATCH?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
  DELETE?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
  HEAD?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
  OPTIONS?: (request: NextRequest, context: { params: Promise<ParamMap[Route]> }) => Promise<Response | void> | Response | void
}


// Validate ../../app/demo/page.tsx
{
  type __IsExpected<Specific extends AppPageConfig<"/demo">> = Specific
  const handler = {} as typeof import("../../app/demo/page.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/page.tsx
{
  type __IsExpected<Specific extends AppPageConfig<"/">> = Specific
  const handler = {} as typeof import("../../app/page.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/agent/[id]/events/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/agent/[id]/events">> = Specific
  const handler = {} as typeof import("../../app/api/agent/[id]/events/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/agent/[id]/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/agent/[id]">> = Specific
  const handler = {} as typeof import("../../app/api/agent/[id]/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/agent/new/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/agent/new">> = Specific
  const handler = {} as typeof import("../../app/api/agent/new/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/auth/all-providers/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/auth/all-providers">> = Specific
  const handler = {} as typeof import("../../app/api/auth/all-providers/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/auth/api-key/[provider]/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/auth/api-key/[provider]">> = Specific
  const handler = {} as typeof import("../../app/api/auth/api-key/[provider]/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/auth/login/[provider]/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/auth/login/[provider]">> = Specific
  const handler = {} as typeof import("../../app/api/auth/login/[provider]/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/auth/logout/[provider]/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/auth/logout/[provider]">> = Specific
  const handler = {} as typeof import("../../app/api/auth/logout/[provider]/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/auth/providers/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/auth/providers">> = Specific
  const handler = {} as typeof import("../../app/api/auth/providers/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/default-cwd/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/default-cwd">> = Specific
  const handler = {} as typeof import("../../app/api/default-cwd/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/files/[...path]/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/files/[...path]">> = Specific
  const handler = {} as typeof import("../../app/api/files/[...path]/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/home/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/home">> = Specific
  const handler = {} as typeof import("../../app/api/home/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/models-config/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/models-config">> = Specific
  const handler = {} as typeof import("../../app/api/models-config/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/models-config/test/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/models-config/test">> = Specific
  const handler = {} as typeof import("../../app/api/models-config/test/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/models/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/models">> = Specific
  const handler = {} as typeof import("../../app/api/models/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/sessions/[id]/context/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions/[id]/context">> = Specific
  const handler = {} as typeof import("../../app/api/sessions/[id]/context/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/sessions/[id]/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions/[id]">> = Specific
  const handler = {} as typeof import("../../app/api/sessions/[id]/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/sessions/new/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions/new">> = Specific
  const handler = {} as typeof import("../../app/api/sessions/new/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/sessions/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/sessions">> = Specific
  const handler = {} as typeof import("../../app/api/sessions/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/skills/install/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/skills/install">> = Specific
  const handler = {} as typeof import("../../app/api/skills/install/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/skills/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/skills">> = Specific
  const handler = {} as typeof import("../../app/api/skills/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

// Validate ../../app/api/skills/search/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/skills/search">> = Specific
  const handler = {} as typeof import("../../app/api/skills/search/route.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}





// Validate ../../app/layout.tsx
{
  type __IsExpected<Specific extends LayoutConfig<"/">> = Specific
  const handler = {} as typeof import("../../app/layout.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}
