/** * format.ts — render `hashline read --json` output in the binary-native * `N:hh|content` format, prefixed with a `[path#4hex]` header line. * * This is PURE PRESENTATION. The hashes come from the binary; offset/limit * slicing happens here (the binary has no pagination flags). The rendered * text is byte-identical to what `hashline read ` prints (minus the * path normalization), so anchors copied out of this view are exactly what * `hashline patch` parses. */ import type { ReadResult } from "./hashline-core"; /** Options for rendering a read result. */ export interface ReadFormatOptions { offset?: number; limit?: number; } export interface ReadFormatResult { text: string; /** True when output was truncated by `limit`. */ truncated: boolean; /** 1-based first line shown. */ startLine: number; /** 1-based last line shown (inclusive). */ endLine: number; /** Next offset to continue from, when truncated. */ nextOffset?: number; } /** Slice + render a read result in binary-native `N:hh|content` form. */ export declare function formatRead(result: ReadResult, opts?: ReadFormatOptions): ReadFormatResult; //# sourceMappingURL=format.d.ts.map