import { FileStateCache } from '../../state/file-cache.js';
import { ProjectIndex } from '../../state/project-index.js';
import { CodeIntelligence } from '../../intelligence/facade.js';
import type { ImageMode } from './media.js';
import type { ReadFileInput, ExtractMode, OutputFormat } from './schema.js';
export interface FileReadResult {
    path: string;
    resolvedPath: string;
    content?: string | undefined;
    lineCount: number;
    byteSize: number;
    tokenEstimate: number;
    extract: ExtractMode;
    binary?: boolean | undefined;
    image?: boolean | undefined;
    mediaType?: string | undefined;
    error?: string | undefined;
    cache?: {
        status: 'miss' | 'unchanged' | 'modified';
    } | undefined;
    metadata?: {
        encoding: string;
        sizeBytes: number;
        cacheStatus: string;
    };
    imageData?: {
        base64: string;
        mediaType: string;
    };
    imageMetadata?: {
        width?: number | undefined;
        height?: number | undefined;
        format: string;
        fileSize: number;
        resized?: boolean | undefined;
        converted?: boolean | undefined;
        originalFormat?: string | undefined;
        mode?: ImageMode | undefined;
    };
    archive?: boolean | undefined;
}
export interface ReadOutput {
    success: boolean;
    error?: string | undefined;
    files?: FileReadResult[] | undefined;
    images?: Array<{
        path: string;
        base64: string;
        mediaType: string;
        description: string;
    }> | undefined;
    summary: {
        files_read: number;
        files_binary: number;
        files_errored: number;
        total_lines: number;
        total_tokens: number;
    };
    pagination?: {
        page: number;
        total_pages: number;
        pending_files: string[];
    };
}
export interface ReadExecutionContext {
    format: OutputFormat;
    includeLineNumbers: boolean;
    maxPerItem?: number | undefined;
    fileCache: FileStateCache;
    projectIndex: ProjectIndex;
    globalImageMode?: ImageMode | undefined;
    maxImageSize: number;
    codeIntelligence?: Pick<CodeIntelligence, 'getOutline' | 'getSymbols'> | undefined;
}
export interface ReadTarget {
    fileInput: ReadFileInput;
    resolvedPath: string;
    extract: ExtractMode;
}
export declare function readOneFile(fileInput: ReadFileInput, globalExtract: ExtractMode, format: OutputFormat, includeLineNumbers: boolean, maxPerItem: number | undefined, fileCache: FileStateCache, projectIndex: ProjectIndex, globalImageMode?: ImageMode, globalMaxImageSize?: number, codeIntelligence?: Pick<CodeIntelligence, 'getOutline' | 'getSymbols'>): Promise<FileReadResult>;
export declare function paginateFiles(files: ReadFileInput[], tokenBudget: number, projectRoot: string): Array<number[]>;
//# sourceMappingURL=file-readers.d.ts.map