// This file is generated automatically by Next.js
// Do not edit this file manually

type AppRoutes = "/" | "/agents/[agentId]" | "/audit" | "/dispatcher" | "/onboarding" | "/roots/[id]" | "/roots/[id]/chat/[topicId]" | "/roots/[id]/kb/[...slug]" | "/roots/[id]/memory" | "/roots/[id]/workflows" | "/roots/[id]/workflows/[wfId]" | "/roots/new" | "/settings" | "/share/[id]" | "/share/[id]/file" | "/utilities" | "/utilities/[scope]/[id]"
type AppRouteHandlerRoutes = "/api/agents/[agentId]/respond" | "/api/images/[rootId]/[file]" | "/api/oauth/callback" | "/api/oauth/start" | "/api/roots/[id]/attachments" | "/api/roots/[id]/chat/[topicId]/send" | "/api/roots/[id]/chat/[topicId]/stop" | "/api/roots/[id]/chat/[topicId]/stream" | "/api/roots/[id]/dashboard" | "/api/roots/[id]/suggestions" | "/api/utilities/[scope]/[id]/bundle.js" | "/api/utilities/[scope]/[id]/host" | "/api/utilities/[scope]/[id]/host-api.mjs" | "/api/utilities/[scope]/[id]/host-ui.mjs" | "/api/utilities/[scope]/[id]/iframe" | "/api/utilities/[scope]/[id]/style.css" | "/api/utilities/install-archive"
type PageRoutes = never
type LayoutRoutes = "/" | "/roots/[id]"
type RedirectRoutes = never
type RewriteRoutes = never
type Routes = AppRoutes | PageRoutes | LayoutRoutes | RedirectRoutes | RewriteRoutes | AppRouteHandlerRoutes


interface ParamMap {
  "/": {}
  "/agents/[agentId]": { "agentId": string; }
  "/api/agents/[agentId]/respond": { "agentId": string; }
  "/api/images/[rootId]/[file]": { "rootId": string; "file": string; }
  "/api/oauth/callback": {}
  "/api/oauth/start": {}
  "/api/roots/[id]/attachments": { "id": string; }
  "/api/roots/[id]/chat/[topicId]/send": { "id": string; "topicId": string; }
  "/api/roots/[id]/chat/[topicId]/stop": { "id": string; "topicId": string; }
  "/api/roots/[id]/chat/[topicId]/stream": { "id": string; "topicId": string; }
  "/api/roots/[id]/dashboard": { "id": string; }
  "/api/roots/[id]/suggestions": { "id": string; }
  "/api/utilities/[scope]/[id]/bundle.js": { "scope": string; "id": string; }
  "/api/utilities/[scope]/[id]/host": { "scope": string; "id": string; }
  "/api/utilities/[scope]/[id]/host-api.mjs": { "scope": string; "id": string; }
  "/api/utilities/[scope]/[id]/host-ui.mjs": { "scope": string; "id": string; }
  "/api/utilities/[scope]/[id]/iframe": { "scope": string; "id": string; }
  "/api/utilities/[scope]/[id]/style.css": { "scope": string; "id": string; }
  "/api/utilities/install-archive": {}
  "/audit": {}
  "/dispatcher": {}
  "/onboarding": {}
  "/roots/[id]": { "id": string; }
  "/roots/[id]/chat/[topicId]": { "id": string; "topicId": string; }
  "/roots/[id]/kb/[...slug]": { "id": string; "slug": string[]; }
  "/roots/[id]/memory": { "id": string; }
  "/roots/[id]/workflows": { "id": string; }
  "/roots/[id]/workflows/[wfId]": { "id": string; "wfId": string; }
  "/roots/new": {}
  "/settings": {}
  "/share/[id]": { "id": string; }
  "/share/[id]/file": { "id": string; }
  "/utilities": {}
  "/utilities/[scope]/[id]": { "scope": string; "id": string; }
}


export type ParamsOf<Route extends Routes> = ParamMap[Route]

interface LayoutSlotMap {
  "/": never
  "/roots/[id]": never
}


export type { AppRoutes, PageRoutes, LayoutRoutes, RedirectRoutes, RewriteRoutes, ParamMap, AppRouteHandlerRoutes }

declare global {
  /**
   * Props for Next.js App Router page components
   * @example
   * ```tsx
   * export default function Page(props: PageProps<'/blog/[slug]'>) {
   *   const { slug } = await props.params
   *   return <div>Blog post: {slug}</div>
   * }
   * ```
   */
  interface PageProps<AppRoute extends AppRoutes> {
    params: Promise<ParamMap[AppRoute]>
    searchParams: Promise<Record<string, string | string[] | undefined>>
  }

  /**
   * Props for Next.js App Router layout components
   * @example
   * ```tsx
   * export default function Layout(props: LayoutProps<'/dashboard'>) {
   *   return <div>{props.children}</div>
   * }
   * ```
   */
  type LayoutProps<LayoutRoute extends LayoutRoutes> = {
    params: Promise<ParamMap[LayoutRoute]>
    children: React.ReactNode
  } & {
    [K in LayoutSlotMap[LayoutRoute]]: React.ReactNode
  }

  /**
   * Context for Next.js App Router route handlers
   * @example
   * ```tsx
   * export async function GET(request: NextRequest, context: RouteContext<'/api/users/[id]'>) {
   *   const { id } = await context.params
   *   return Response.json({ id })
   * }
   * ```
   */
  interface RouteContext<AppRouteHandlerRoute extends AppRouteHandlerRoutes> {
    params: Promise<ParamMap[AppRouteHandlerRoute]>
  }
}
