/** * A file read as an agent's tool actually delivers it: `123line`. * * WHY THIS EXISTS, measured rather than assumed. Claude Code's `Read` prefixes * every line with its number and a tab, and every detector in this package was * written against raw file content. That prefix defeats all of them: on a * captured request, an 18,778-character read of a TypeScript file classified as * `unknown` with no engine selected at all, while the identical bytes with the * prefix removed classified as `code` -- and compressed 55.6%, 17,130 * characters down to 7,604 with seven elisions, once the engine also knew the * path it came from. * * Those two defects compound, and either alone leaves the compressor inert: * without the strip nothing is classified, and without the path the code engine * cannot pick a language and returns its input untouched. * * THE NUMBERS ARE PUT BACK, not discarded. They are what the model uses to * address an edit, so handing back an unnumbered file would trade a token * saving for a broken edit -- the kind of bargain this package exists to refuse. */ export interface Numbering { /** The content with its line numbers removed. */ readonly stripped: string; /** * Puts the original numbers back on the lines that survived. * * Exact inserted marker lines are the only unmatched lines permitted. * Returns null when retained content was rewritten or reordered. */ restore(compressed: string, insertedLines?: readonly string[]): string | null; } /** * Recognises the numbered-read shape, or reports that this is not one. * * Returns null rather than guessing for anything not clearly numbered. A false * positive mangles content; a false negative only leaves a saving on the table, * and this package has a standing rule about which of those to prefer. */ export declare function readNumbering(text: string): Numbering | null; //# sourceMappingURL=numbering.d.ts.map