/**
 * Pure source-slicing for `vyuh-dxkit context <file:line>`. The graph
 * carries declaration lines but no source text, so the CLI reads the
 * file from disk and hands the raw text here to carve out a focused,
 * budget-bounded chunk centered on the requested line.
 *
 * This module is deliberately fs-free: it takes the already-read file
 * text + a span and returns the slice, so the windowing math is
 * unit-testable without touching the filesystem. The CLI layer
 * (`cli/context.ts`) owns the `readFileSync`.
 *
 * The window is CENTERED on the requested line, not anchored to the
 * span's top. That matters: a 700-line symbol whose budget only fits
 * 60 lines must still show the line the caller asked about — anchoring
 * to the declaration could fill the budget before ever reaching it.
 */
export interface ExtractOpts {
    /** Soft token ceiling on the rendered chunk. */
    budgetTokens: number;
    /** 1-based inclusive line the chunk may start at (defaults to 1). */
    spanStart?: number;
    /** 1-based EXCLUSIVE line the chunk must stop before (defaults to EOF+1). */
    spanEndExclusive?: number;
    /** Override the chars-per-token estimate (tests / tuning). */
    charsPerToken?: number;
}
export interface SourceChunk {
    /** First line shown (1-based, inclusive). */
    startLine: number;
    /** Last line shown (1-based, inclusive). */
    endLine: number;
    /** The raw source lines shown, in order — no line-number prefix. */
    lines: string[];
    /** Span the chunk was drawn from (symbol body or whole file), 1-based inclusive. */
    spanStart: number;
    spanEnd: number;
    /** Total lines in the span. */
    spanLines: number;
    /** True when the budget forced us to show only part of the span. */
    truncated: boolean;
}
/**
 * Carve a budget-bounded window out of `fileText`, centered on
 * `targetLine`, clamped to `[spanStart, spanEndExclusive)`. Always
 * returns at least the target line itself (even when that single line
 * already exceeds the budget) so the caller never gets an empty chunk
 * for a valid location. `truncated` is true iff the returned window is
 * a strict subset of the span (budget cut it short).
 */
export declare function extractWindow(fileText: string, targetLine: number, opts: ExtractOpts): SourceChunk;
//# sourceMappingURL=source-slice.d.ts.map