/**
 * `GET /api/deadcode` — symbols nothing in this repository reaches, grouped by
 * the file they live in (design spec §3.11).
 *
 * The derivation is `src/graph/dead-code.ts`, shared so that a second surface
 * asking the same question cannot get a different answer. This module is the
 * renderer, and it has exactly two jobs beyond flattening: hand the report a
 * source reader that goes through the viewer's read chokepoint, and carry the
 * exclusion counts onto the wire so the screen can say what the list could not
 * see. A dead code list without that sentence is a screen that quietly invites
 * somebody to delete a route handler.
 *
 * The rows come back ranked (largest first) and are grouped by file for
 * display, not re-ranked: the group order follows the best row in it, so the
 * biggest finding is still at the top of the screen.
 */
import type { CodeGraph } from '../../index';
import type { NodeKind } from '../../types';
import { MAX_DEAD_CODE_CANDIDATES, type DeadCodeExclusions } from '../../graph/dead-code';
import { type WireList, type WireNodeRef } from './wire';
/** Rows carried on the payload. The screen shows every one it is given. */
export declare const MAX_DEAD_CODE_ROWS = 300;
/** Members folded under one row before the row just counts them. */
export declare const MAX_DEAD_CODE_MEMBERS = 12;
/** One symbol nothing reaches. */
export interface WireDeadCodeRow extends WireNodeRef {
    /** Source lines it spans — the rank, and what deleting it would remove. */
    lines: number;
    /**
     * Members that are unreferenced and live inside this one: a class nobody
     * instantiates takes its methods with it. Capped; `total` stays real.
     */
    members: WireList<WireNodeRef>;
}
/** The rows of one file, in source order. */
export interface WireDeadCodeGroup {
    file: string;
    /** Tool-generated — drawn dimmed wherever it appears (design spec §2.6). */
    generated: boolean;
    test: boolean;
    /** Lines the rows in this group add up to. */
    lines: number;
    rows: WireDeadCodeRow[];
}
/** One reason candidates were dropped, in the words the screen prints. */
export interface WireDeadCodeExclusion {
    reason: keyof DeadCodeExclusions;
    count: number;
    label: string;
}
export interface WireDeadCode {
    /** Ranked, flat, capped. `total` is the real number of findings. */
    rows: WireList<WireDeadCodeRow>;
    /** The SHOWN rows, grouped by file — group order follows the best row. */
    groups: WireDeadCodeGroup[];
    /** Symbols with no incoming reference at all, before any exclusion ran. */
    candidates: number;
    /** Every exclusion that removed at least one candidate, biggest first. */
    excluded: WireDeadCodeExclusion[];
    /** How many candidates every exclusion removed between them. */
    excludedTotal: number;
    kinds: NodeKind[];
    /** Symbols reachable from outside the index are on the list. */
    includeExported: boolean;
    includeTests: boolean;
    includeGenerated: boolean;
    /** The candidate scan stopped at its cap; there are more. */
    bounded: boolean;
    /** Every row was checked against the text of the files that can reach it. */
    corroborated: boolean;
    timing: {
        elapsedMs: number;
    };
}
export declare function parseDeadCodeQuery(query: URLSearchParams): {
    limit: number;
    includeExported: boolean;
    includeTests: boolean;
    includeGenerated: boolean;
    kinds: NodeKind[] | undefined;
};
export declare function buildDeadCode(cg: CodeGraph, projectRoot: string, query: URLSearchParams): WireDeadCode;
export { MAX_DEAD_CODE_CANDIDATES };
//# sourceMappingURL=deadcode.d.ts.map