/** Skills pageindex (markdown tree indexing and retrieval). */ import type { SkillLineContentRow } from "./types.js"; 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; } /** CamelCase SDK config or snake_case partial dict (e.g. from app YAML). */ export type PageIndexConfigInput = PageIndexConfig | Record; export interface ReconstructOptions { keepAllHeaders?: boolean; } export interface SkillsIndexDict { documents: Record; files: Record; } 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 | null): Record | undefined; export declare function pageIndexConfigFromPartial(partial: Partial & Record): PageIndexConfig; export declare function pageIndexConfigToNative(config: PageIndexConfig): Record; 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; export declare function getSkillDocument(documents: Record, docId: string): Record; export declare function getSkillStructure(documents: Record, docId: string): unknown; export declare function getSkillLineContentFromSpec(index: SkillsIndexDict, docId: string, lineNumSpec: string): SkillLineContentRow[]; export declare function getSkillLineContent(index: SkillsIndexDict, docId: string, opts?: { lineNumSpecs?: string[]; nodeIdSpecs?: string[]; chunkIdSpecs?: string[]; }): SkillLineContentRow[]; export declare function getSkillContentRetrieveResult(index: SkillsIndexDict, docId: string, opts?: { lineNumSpecs?: string[]; nodeIdSpecs?: string[]; chunkIdSpecs?: string[]; options?: ReconstructOptions; }): Record; 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 function tokenCountFromDecomposedFrontmatter(content: string): number | null; export declare function repairSkillChunks(entryDir: string, docId: string, config?: PageIndexConfigInput): void; export declare function buildPageIndexOnly(skillDirs: string[], config?: PageIndexConfigInput): SkillsIndexDict; export declare function buildChunkVariant(entryDir: string, docId: string, pipeline: string, paramsHash: string, config?: PageIndexConfigInput): SkillsIndexDict; export declare function pageIndexValid(entryDir: string, contentSha256: string): boolean; export declare function chunkVariantValid(entryDir: string, docId: string, pipeline: string, paramsHash: string): boolean; export declare function repairSkillVariantChunks(entryDir: string, docId: string, pipeline: string, paramsHash: string, config?: PageIndexConfigInput): void; export declare function loadSkillsIndexFromEntry(entryDir: string, docId: string, chunkDir?: string): SkillsIndexDict; export declare function loadMergedSkillDocumentJson(entryDir: string, docId: string, chunkDir?: string): Record; export declare function finalizeSkillDocumentJson(entryDir: string, docId: string, options: { contentSha256: string; pipeline: string; indexParams: Record; builtAt: string; sourcePath: string; }): Record; export declare function updateSkillDocumentSourcePath(entryDir: string, docId: string, sourcePath: string): Record; export declare class SkillsBuilder { private inner; constructor(options?: { memoryOnly?: boolean; outputDir?: string; }); buildFromDirs(skillDirs: string[], config?: PageIndexConfigInput): SkillsIndexDict; buildFromFile(sourcePath: string, config?: PageIndexConfigInput): SkillsIndexDict; writeCatalog(): SkillsIndexDict; toSkillsIndexJson(): Record; toSkillsDict(): Record; } //# sourceMappingURL=pageindex.d.ts.map