import type { ExamplePolicy } from '../example-policy.js'; /** A doc as it appears in the extracted corpus (docs.json). */ interface CorpusDoc { title?: string; filename: string; text?: string; description?: string; hidden?: boolean; } interface LlmsEntry { title: string; description: string; /** rendered-doc URL (corpus mode) or dist/*.js path (legacy scan) */ link: string; } export interface LlmsTxtMeta { name?: string; description?: string; /** * Site **ORIGIN ONLY** — `https://example.github.io`, not * `https://example.github.io/repo`. The path the site is mounted under is `basePath`, * and this module applies it (#144). Putting the path here doubles it in every * canonical URL and sitemap entry, because `generate-site` adds `basePath` on top. */ baseUrl?: string; /** URL prefix the site is mounted under — mirrors `SiteConfig.basePath`. */ basePath?: string; /** project links — `github` / `npm` (or any) become Source/npm links */ projectLinks?: Record; /** optional framing line(s) under the description */ tagline?: string; /** * @deprecated Ignored since 1.16.16. It used to add a paragraph about driving the dev * server with the `hj` CLI; `llms.txt` is for whoever consumes the library, so that note * belongs in the project's own agent instructions. Kept so existing callers still compile. */ haltijaDev?: boolean | 'tunnel'; /** * Mirrors `SiteConfig.markdownPages` (default true): the build writes `index.md` beside * every page, so the index says so. Pass false when the site ships HTML only — pointing a * reader at a file that is not there costs more than not mentioning it. */ markdownPages?: boolean; /** Mirrors `SiteConfig.liveExamples`: which fences are live decides the examples note. */ liveExamples?: ExamplePolicy; } /** * Build entries from the extracted corpus — every doc that was actually * extracted (`.md`, `.ts`/`.js`/`.css` doc comments, auto-created sections), * linking to its rendered URL. This is what the build uses: it reflects the real * docs and needs no `dist/` library output. */ export declare function entriesFromCorpus(corpus: CorpusDoc[], meta: LlmsTxtMeta): LlmsEntry[]; /** * A real page of THIS site to show the `index.md` rule with. It was hard-coded to * `/carousel/index.md`, a tosijs-ui page, so every other project's llms.txt pointed agents * at a URL it does not have (board #3248). The first page that has a markdown copy and is * not the site root. */ export declare function markdownExample(corpus: CorpusDoc[], meta: LlmsTxtMeta): string | undefined; /** * Write an `llms.txt` index. Pass the extracted `corpus` (the build does) to * index every doc by its rendered URL; omit it to fall back to the legacy * `src/*.ts`-with-`dist/*.js` scan. */ export declare function generateLlmsTxt(outputPath: string, meta?: LlmsTxtMeta, corpus?: CorpusDoc[]): void; export {};