import type { SourceIdentity, SourceInlineBlock, SourceInlineDiagnostic, SourceInlineProjection } from './source-inline-contract.js';
import type { CodebaseIndex } from './types.js';
export { SourceIdentitySchema, SourceInlineBlockSchema, SourceInlineDiagnosticSchema, SourceInlineProjectionSchema, SourceInlineRangeSchema, } from './source-inline-contract.js';
export type { SourceIdentity, SourceInlineBlock, SourceInlineDiagnostic, SourceInlineProjection, SourceInlineRange, } from './source-inline-contract.js';
export interface SourceInlineManifestEntry {
    relativePath: string;
    size: number;
    sha256?: string;
}
export interface ReadInlineSourceRequest {
    relativePath: string;
    startLine: number;
    endLine: number;
    contextLines: number;
    signal?: AbortSignal;
}
export interface ReadInlineSourceResult {
    block?: SourceInlineBlock;
    diagnostic?: SourceInlineDiagnostic;
}
export declare function sourceIdentityForBytes(bytes: Uint8Array): SourceIdentity;
/** Bind disk-readable source to the exact byte identity used to build this index. */
export declare function attachSourceInlineManifest(index: CodebaseIndex, entries: readonly SourceInlineManifestEntry[]): void;
export declare function getSourceInlineManifestEntry(index: CodebaseIndex, relativePath: string): SourceInlineManifestEntry | undefined;
export declare function inlineSourceFromLines(relativePath: string, lines: readonly string[], start: number, end: number, context: number): ReadInlineSourceResult;
export declare function inlineSourceFromText(relativePath: string, source: string, startLine: number, endLine: number, contextLines: number): ReadInlineSourceResult;
export declare function toSourceInlineProjection(result: ReadInlineSourceResult): SourceInlineProjection;
export declare function renderInlineSourceBlock(block: SourceInlineBlock, indent?: string): string;
/**
 * Read one indexed span plus `contextLines` on either side.
 *
 * Full-content indexes are their own immutable source snapshot. Reduced
 * indexes may consult the working tree only when both byte size and SHA-256
 * match the manifest captured from the bytes that were actually parsed.
 */
export declare function readInlineSource(index: CodebaseIndex, request: ReadInlineSourceRequest): Promise<ReadInlineSourceResult>;
