export interface DocsLocation { dir: string; version: string; } export interface DocEntry { /** Path inside the docs, such as `core/agents.md`. */ path: string; title: string; description: string; section: string; } export interface DocsIndex extends DocsLocation { entries: DocEntry[]; } export interface DocHit extends DocEntry { /** The heading of the part of the page that matched best. */ heading?: string; snippet: string; score: number; } /** * The docs bundled with the @cogitator-ai/core a project installed, falling * back to the one the CLI itself depends on. */ export declare function locateDocs(projectDir: string): DocsLocation; /** The catalog of pages, read from the `index.md` the docs ship with. */ export declare function loadDocsIndex(location: DocsLocation): DocsIndex; /** Reads a page; `path#heading` returns only that part of the page. */ export declare function readDoc(index: DocsIndex, reference: string): string; /** The anchor GitHub and Fumadocs give a heading. */ export declare function slugOf(heading: string): string; /** * Pages that answer `query`, best first. Titles weigh most, then the page * descriptions, headings and body text; every term has to appear somewhere on * a page for it to count, so `approval tool` finds the approvals guide rather * than every page that mentions tools. */ export declare function searchDocs(index: DocsIndex, query: string, limit?: number): DocHit[]; //# sourceMappingURL=docs.d.ts.map