/** Skills pageindex (markdown tree indexing and retrieval). */
import { type Bm25CohesionConfig } from "./bm25Cohesion.js";
export type { Bm25CohesionConfig } from "./bm25Cohesion.js";
export interface PageIndexConfig {
    ifAddNodeId?: boolean;
    ifAddNodeText?: boolean;
    /** When false, one full-text chunk per node (no BM25 splitting). Default: true. */
    enableBm25Chunking?: boolean;
    bm25Cohesion?: Partial<Bm25CohesionConfig>;
}
/** CamelCase SDK config or snake_case partial dict (e.g. from app YAML). */
export type PageIndexConfigInput = PageIndexConfig | Record<string, unknown>;
export interface ReconstructOptions {
    keepAllHeaders?: boolean;
}
export interface SkillsIndexDict {
    documents: Record<string, unknown>;
    files: Record<string, string>;
}
export declare function defaultPageIndexConfig(): PageIndexConfig;
/** Pageindex config with one full-text chunk per node (no BM25 splitting). */
export declare function pageIndexConfigWithoutChunking(): PageIndexConfig;
/** Partial pageindex settings from app config; Rust merges unset keys with SDK defaults. */
export declare function pageIndexConfigFromMapping(mapping?: Record<string, unknown> | null): Record<string, unknown> | undefined;
export declare function pageIndexConfigFromPartial(partial: Partial<PageIndexConfig> & Record<string, unknown>): PageIndexConfig;
export declare function pageIndexConfigToNative(config: PageIndexConfig): Record<string, unknown>;
export declare function buildSkillsIndex(skillDirs: string[], config?: PageIndexConfigInput): SkillsIndexDict;
export declare function writeSkillsIndex(index: SkillsIndexDict, outputDir: string): void;
export declare function loadSkillsIndexFromDir(catalogDir: string): SkillsIndexDict;
export declare function skillsIndexFromDecomposedDir(dir: string): SkillsIndexDict;
export declare function mdToTree(markdownContent: string, sourcePath: string, config?: PageIndexConfigInput): Record<string, unknown>;
export declare function getSkillDocument(documents: Record<string, unknown>, docId: string): Record<string, unknown>;
export declare function getSkillStructure(documents: Record<string, unknown>, docId: string): unknown;
export declare function getSkillLineContentFromSpec(index: SkillsIndexDict, docId: string, lineNumSpec: string): Array<{
    line_num: number;
    node_id: number;
    content: string;
}>;
export declare function getSkillLineContent(index: SkillsIndexDict, docId: string, opts?: {
    lineNumSpecs?: string[];
    nodeIdSpecs?: string[];
    chunkIdSpecs?: string[];
}): Array<{
    line_num: number;
    node_id: number;
    content: string;
    chunk_id?: number;
}>;
export declare function getSkillContentRetrieveResult(index: SkillsIndexDict, docId: string, opts?: {
    lineNumSpecs?: string[];
    nodeIdSpecs?: string[];
    chunkIdSpecs?: string[];
    options?: ReconstructOptions;
}): Record<string, unknown>;
export declare function reconstructSkillMarkdown(index: SkillsIndexDict, docId: string, opts?: {
    lineNumSpecs?: string[];
    nodeIdSpecs?: string[];
    chunkIdSpecs?: string[];
    options?: ReconstructOptions;
}): {
    markdown: string;
    matched_node_ids: number[];
    matched_chunk_ids: number[];
    node_ids: number[];
    output_rel_path: string;
};
export declare function writeReconstructedSkill(catalogDir: string, index: SkillsIndexDict, docId: string, opts?: {
    lineNumSpecs?: string[];
    nodeIdSpecs?: string[];
    chunkIdSpecs?: string[];
    options?: ReconstructOptions;
}): string;
export declare function parseSkillNodeIds(spec: string): number[];
export declare function parseSkillChunkIds(spec: string): number[];
export declare class SkillsBuilder {
    private inner;
    constructor(options?: {
        memoryOnly?: boolean;
        outputDir?: string;
    });
    buildFromDirs(skillDirs: string[], config?: PageIndexConfigInput): SkillsIndexDict;
    writeCatalog(): SkillsIndexDict;
    toSkillsIndexJson(): Record<string, unknown>;
    toSkillsDict(): Record<string, unknown>;
}
//# sourceMappingURL=pageindex.d.ts.map