/** * Skeleton Extractor — High-speed AST-based file outline and body reduction. * * Strips function, method, and class implementations while preserving * signatures, type definitions, imports, and docstrings. Achieves 70–90% * token reduction for LLM context injection and repository understanding. */ import type { SymbolLang } from './schema.js'; export interface SkeletonSymbolRange { name?: string | undefined; kind?: string | undefined; startLine: number; endLine: number; bodyStartLine?: number | undefined; bodyEndLine?: number | undefined; } export interface SkeletonOptions { /** Keep JSDoc / docstring comments. Defaults to true. */ includeDocs?: boolean | undefined; /** Collapse multi-line import blocks into a single summary line. Defaults to false. */ collapseImports?: boolean | undefined; /** Keep only exported / public declarations. Defaults to false. */ exportsOnly?: boolean | undefined; /** Include original start-end line numbers in stripped block comments (e.g. L32-L45). Defaults to true. */ includeLineNumbers?: boolean | undefined; /** Maximum recursion depth for nested scopes. */ maxDepth?: number | undefined; } export interface FileSkeletonResult { file: string; lang: SymbolLang; skeleton: string; symbols?: SkeletonSymbolRange[] | undefined; stats: { originalLines: number; skeletonLines: number; tokenSavingsPercent: number; symbolCount: number; }; } /** * Extract an AST-based skeleton from a file's content. */ export declare function extractFileSkeleton(opts: { file: string; content: string; lang?: SymbolLang; options?: SkeletonOptions; }): Promise; /** * Extract skeletons for all indexable files under a directory. */ export declare function extractDirectorySkeleton(opts: { dirPath: string; maxFiles?: number; options?: SkeletonOptions; }): Promise<{ files: FileSkeletonResult[]; combinedSkeleton: string; totalOriginalLines: number; totalSkeletonLines: number; overallSavingsPercent: number; }>; //# sourceMappingURL=skeleton-extractor.d.ts.map