/** * Content extractors for the read command. * * Pull specific slices out of a markdown/text page so agents don't have to * parse the full body themselves. All extractors return arrays. * * --extract code fenced code blocks (with language tag if present) * --extract links markdown links + bare URLs (deduped) * --extract tables markdown table blocks (rendered as their raw markdown) * --extract headings H1/H2/H3 outline with anchor slugs */ export type ExtractMode = "code" | "links" | "tables" | "headings"; export declare const EXTRACT_MODES: ExtractMode[]; export declare function isExtractMode(v: string): v is ExtractMode; export interface CodeBlock { language: string | null; code: string; } export interface Link { text: string | null; url: string; } export interface Heading { level: 1 | 2 | 3 | 4 | 5 | 6; text: string; slug: string; } export interface Table { rows: number; markdown: string; } export declare function extractCode(content: string): CodeBlock[]; export declare function extractLinks(content: string): Link[]; export declare function extractTables(content: string): Table[]; export declare function extractHeadings(content: string): Heading[]; export declare function extract(content: string, mode: ExtractMode): unknown[]; //# sourceMappingURL=extract.d.ts.map