/** * Extract an API skeleton from a TypeScript/JavaScript source file: imports, * re-exports, exported declarations with their full signatures, and type * definitions — with function/method *bodies* stubbed out. * * Purpose: let the agent understand a file's public API for a fraction of the * tokens of a full read. It is a pure structural transform over the TS AST — * it never invents text, only keeps or stubs nodes that are really there. * * SCOPE — read this before using it anywhere: * - SAFE for "what does this file export / how do I call it" (understanding). * - NOT safe for editing the file: bodies and original line numbers are gone. * The edit path must always do a full read. * * Faithfulness guarantees (see code-skeleton.test.ts, mechanically asserted): * 1. Every exported symbol survives with a usable signature — including * re-export barrels (`export { x } from`, `export *`) and arrow consts * whose callable shape is preserved (params + return, even when inferred). * 2. Stubbed bodies are explicitly marked with a body stub — never silently empty. */ export interface SkeletonResult { skeleton: string; /** Names of every exported symbol found in the source. */ exports: string[]; /** True when the file had no extractable top-level API (skeleton is empty). */ empty: boolean; } export declare function extractSkeleton(source: string, fileName?: string): SkeletonResult; //# sourceMappingURL=code-skeleton.d.ts.map