/**
 * symbol-index — Programmatic extractor that produces a flat list of
 * identifiers the canonical reference legitimizes, each with a one-line
 * provenance snippet.
 *
 * Used by the grader-context pathway (W0196 / W0197) so the LLM judge sees
 * a compact, deterministic recognition reference instead of the full
 * narrative doc — addresses the DOC-2117 prior-collision failure mode
 * where a grader claimed `useEditDocument` did not exist.
 *
 * Two upstream sources, both fully programmatic (no LLM in the extractor):
 *
 *   - `extractSymbolIndex(blocks)` — walks Sanity Portable Text content
 *     (article docs).
 *   - `extractSymbolsFromTypedoc(json, packageName)` — parses typedoc
 *     JSON (typesReference docs).
 *
 * `mergeSymbolIndexes(indexes)` combines indexes from multiple references
 * into a single deduped index for a task.
 *
 * Source precedence (higher wins on dedup):
 *   1. type-def      — typedoc declarations: literal authoritative type
 *                      surface, no editorial layer between extracted
 *                      symbol and the package's actual exports.
 *   2. heading       — Section headings (`block` style h1..h4), including
 *                      inline `code` marks within heading spans.
 *   3. inline-code   — Inline `code` marks within non-heading `block` spans.
 *   4. code-block    — Identifiers from `import` statements in `codeBlock`
 *                      bodies. Body identifiers (`const foo = ...`) are
 *                      intentionally not extracted — those are usage demos.
 */
export type SymbolProvenanceKind = "type-def" | "heading" | "inline-code" | "code-block";
/** Declaration kinds we surface from typedoc JSON for `type-def` provenance. */
export type TypeDefDeclarationKind = "function" | "class" | "interface" | "type" | "enum" | "variable" | "namespace";
export interface SymbolProvenance {
    kind: SymbolProvenanceKind;
    /** Human-readable line that locates the symbol in the source doc. */
    snippet: string;
    /** Heading style when kind === "heading". */
    style?: "h1" | "h2" | "h3" | "h4";
    /** Source filename when kind === "code-block" and one is set on the block. */
    filename?: string;
    /** Code block language tag when kind === "code-block". */
    language?: string;
    /** Declaration kind when kind === "type-def". */
    declarationKind?: TypeDefDeclarationKind;
    /** Source package (e.g. `@sanity/sdk-react`) when kind === "type-def". */
    package?: string;
}
export interface SymbolEntry {
    symbol: string;
    provenance: SymbolProvenance;
}
export interface SymbolIndex {
    symbols: SymbolEntry[];
}
export declare function extractSymbolIndex(blocks: unknown): SymbolIndex;
/**
 * Extract a symbol index from a typedoc JSON document (schema 2.x — the
 * shape produced by `typedoc --json`). Each top-level export becomes a
 * `type-def` provenance entry with the symbol name, declaration kind
 * (function / interface / type / etc.), and the JSDoc summary as snippet.
 *
 * Type-def is the highest-precedence source: typedoc declarations are
 * literal authoritative type surface, no editorial layer between them
 * and the package's actual exports. If a symbol also appears in narrative
 * docs (heading, inline code, code-block import) the type-def entry wins
 * on dedup.
 *
 * `body` is the raw JSON string fetched from the typesReference's
 * attachment URL. Returns an empty index for any unparseable input — this
 * is best-effort recognition material; callers fall back to full-doc
 * injection when extraction yields nothing.
 */
export declare function extractSymbolsFromTypedoc(body: string, packageName?: string): SymbolIndex;
/**
 * Compute per-tier counts for a SymbolIndex. Used by the fetcher to
 * populate the per-task manifest entry's `tierBreakdown` field.
 */
export declare function symbolIndexTierBreakdown(index: SymbolIndex): {
    typeDef: number;
    heading: number;
    inlineCode: number;
    codeBlock: number;
};
/**
 * Combine multiple `SymbolIndex` instances (typically from different
 * canonical references for the same task) into a single deduped index
 * preserving precedence.
 */
export declare function mergeSymbolIndexes(indexes: readonly SymbolIndex[]): SymbolIndex;
/**
 * Render a SymbolIndex as a compact markdown reference suitable for
 * injection into a grader's `rubricPrompt` as ground-truth recognition
 * material. Layout intentionally puts headings first so the most
 * authoritative symbols anchor the top of the list.
 */
export declare function renderSymbolIndex(index: SymbolIndex, title?: string): string;
