/**
 * Build the deterministic category tree consumed by `/docs`.
 *
 * Walks `docs/**` (excluding `docs/private/**` and `**\/archived/**`), resolves
 * frontmatter for each file, applies visibility filtering, and groups by
 * (category, subcategory). Sort order:
 *   category.order → subcategory.order → frontmatter.order → title.
 *
 * The category/subcategory display tree lives in
 * `docs/site/site_doc_manifest.yaml` under the top-level `categories:` key.
 * Per-doc `category` slugs reference that tree.
 */
import { type DocFrontmatter } from "./doc_frontmatter.js";
import { type VisibilityEnv } from "./visibility.js";
export interface DocsManifestSubcategory {
    key: string;
    display_name: string;
    description?: string;
    order: number;
}
export interface DocsManifestCategory {
    key: string;
    display_name: string;
    description?: string;
    order: number;
    subcategories: DocsManifestSubcategory[];
}
export interface DocsManifest {
    categories: DocsManifestCategory[];
    featured: string[];
}
export interface DocEntry {
    /** Slug used in URLs: `architecture/architecture` (no `docs/` prefix, no `.md`). */
    slug: string;
    /** Repo-relative path: `docs/architecture/architecture.md`. */
    repo_path: string;
    /** Resolved frontmatter (after inference). */
    frontmatter: DocFrontmatter;
}
export interface SubcategoryGroup {
    key: string;
    display_name: string;
    description: string | null;
    order: number;
    docs: DocEntry[];
}
export interface CategoryGroup {
    key: string;
    display_name: string;
    description: string | null;
    order: number;
    subcategories: SubcategoryGroup[];
    /** Docs in this category that declared no subcategory. */
    uncategorized: DocEntry[];
}
export interface DocsIndex {
    /** Deterministic, sorted category tree. */
    categories: CategoryGroup[];
    /** Curated featured entries, in manifest order. */
    featured: DocEntry[];
    /** Total doc count after visibility filtering. */
    total: number;
}
export interface BuildDocsIndexOptions {
    docsRoot: string;
    manifest: DocsManifest;
    env: VisibilityEnv;
    manifestEntries?: Map<string, {
        status?: string;
    }>;
    /**
     * When true, docs with `deprecated: true` in their frontmatter are kept in
     * the index. Default is false — deprecated docs are filtered out of the
     * browseable index but still resolve via direct slug lookup.
     */
    includeDeprecated?: boolean;
}
export declare function buildDocsIndex(opts: BuildDocsIndexOptions): DocsIndex;
//# sourceMappingURL=index_builder.d.ts.map