/** Maximum bytes to read when scanning for a directive. */
export declare const DIRECTIVE_WINDOW = 512;
/**
 * Scan a file's first 512 bytes for a `"use client"` or `"use server"` directive.
 * Returns the directive string or `null` if not found.
 */
export declare function scanDirective(filePath: string): Promise<"use client" | "use server" | null>;
/**
 * Derive a URL path from a file path relative to the repo root.
 * Handles App Router route groups, dynamic segments, and Pages Router conventions.
 */
export declare function deriveUrlPath(filePath: string, router: "app" | "pages"): string;
/**
 * Discover Next.js workspaces in a monorepo by finding `next.config.*` files.
 * Returns empty array for single-app projects (config at root only) or no config.
 */
export declare function discoverWorkspaces(repoRoot: string): Promise<{
    root: string;
    configFile: string;
}[]>;
/**
 * Walk up from `filePath` through ancestor directories collecting layout files.
 * Returns relative paths from root to leaf order. Stops at the `app/` boundary.
 * If `filePath` is itself a layout, it is excluded from the chain.
 */
export declare function computeLayoutChain(filePath: string, repoRoot: string): Promise<string[]>;
export interface MiddlewareTraceResult {
    file: string;
    matchers: string[];
    applies: boolean;
}
/**
 * Find and analyze middleware.ts for the given repo root.
 * Returns null if no middleware file exists.
 * Uses tree-sitter AST to extract matcher config.
 */
export declare function traceMiddleware(repoRoot: string, urlPath: string): Promise<MiddlewareTraceResult | null>;
export { parseMetadataExport, extractFetchCalls } from "./nextjs-metadata-readers.js";
export type { MetadataFields, FetchCall, FetchCallee } from "./nextjs-metadata-readers.js";
export { extractZodSchema, extractLinkHrefs } from "./nextjs-ast-readers.js";
export type { ZodShape, ZodFieldType, LinkRef, LinkRefKind } from "./nextjs-ast-readers.js";
//# sourceMappingURL=nextjs.d.ts.map