// 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/agents/[agentId]/page.tsx
{
  type __IsExpected<Specific extends AppPageConfig<"/agents/[agentId]">> = Specific
  const handler = {} as typeof import("../../app/agents/[agentId]/page.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

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

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

// Validate ../../app/onboarding/page.tsx
{
  type __IsExpected<Specific extends AppPageConfig<"/onboarding">> = Specific
  const handler = {} as typeof import("../../app/onboarding/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/roots/[id]/chat/[topicId]/page.tsx
{
  type __IsExpected<Specific extends AppPageConfig<"/roots/[id]/chat/[topicId]">> = Specific
  const handler = {} as typeof import("../../app/roots/[id]/chat/[topicId]/page.js")
  type __Check = __IsExpected<typeof handler>
  // @ts-ignore
  type __Unused = __Check
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// Validate ../../app/api/utilities/install-archive/route.ts
{
  type __IsExpected<Specific extends RouteHandlerConfig<"/api/utilities/install-archive">> = Specific
  const handler = {} as typeof import("../../app/api/utilities/install-archive/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
}

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