/**
 * Next.js component classifier: AST-based Server/Client component detection.
 *
 * Uses a two-stage directive detection strategy:
 *   1. Fast-reject: scan first 512 bytes for "use client"/"use server" substring
 *   2. AST confirm: verify directive is `Program.body[0]` ExpressionStatement
 *
 * Then walks the AST for client-component signals (hooks, JSX event handlers,
 * browser globals, `next/dynamic({ ssr: false })`) and classifies each file
 * per the 8-row decision table.
 *
 * This file is the orchestrator. AST reader helpers (`applyClassificationTable`,
 * `detectSignals`, `confirmDirectiveFromTree`, `classifyFile`) live in
 * `nextjs-component-readers.ts` and are re-exported from here for backward
 * compatibility.
 */
import type { NextjsComponentEntry, NextjsComponentsCounts } from "./nextjs-component-readers.js";
export { MAX_FILE_SIZE_BYTES, DEFAULT_MAX_FILES, PARSE_CONCURRENCY, CLIENT_HOOKS_EXCLUDE, EVENT_HANDLER_ATTRS, BROWSER_GLOBALS, HOOK_NAME_RE, applyClassificationTable, detectSignals, confirmDirectiveFromTree, classifyFile, } from "./nextjs-component-readers.js";
export type { ComponentClassification, SignalLocation, ComponentSignals, NextjsComponentEntry, NextjsComponentsCounts, } from "./nextjs-component-readers.js";
export interface NextjsComponentsResult {
    files: NextjsComponentEntry[];
    counts: NextjsComponentsCounts;
    parse_failures: string[];
    scan_errors: string[];
    truncated: boolean;
    truncated_at?: number;
    workspaces_scanned: string[];
    limitations: string[];
}
export interface AnalyzeNextjsComponentsOptions {
    workspace?: string | undefined;
    file_pattern?: string | undefined;
    max_files?: number | undefined;
}
/**
 * Analyze a Next.js repository for Server/Client component classification.
 *
 * Flow:
 *   1. Kill switch check (`CODESIFT_DISABLE_TOOLS`)
 *   2. Resolve project root via `getCodeIndex(repo).root`
 *   3. Determine workspaces: explicit `workspace` param, `discoverWorkspaces()`,
 *      or single root.
 *   4. For each workspace, walk `app/` for `.tsx`/`.jsx` files.
 *   5. Process in batches of `PARSE_CONCURRENCY` — for each file:
 *        a. `classifyFile` for directive
 *        b. `detectSignals` on the parsed tree (re-parses — acceptable for v1)
 *        c. `applyClassificationTable` to finalize classification + violations
 *   6. Aggregate counts; honor `max_files`.
 */
export declare function analyzeNextjsComponents(repo: string, options?: AnalyzeNextjsComponentsOptions): Promise<NextjsComponentsResult>;
//# sourceMappingURL=nextjs-component-tools.d.ts.map