import type { WorkspaceFs } from "./fs.js";
export declare const MAX_EXTRACTED_BYTES = 65536;
export declare const MAX_TOTAL_EXTRACTED_BYTES = 262144;
export declare const SUPPORTED_MIME_PREFIXES: readonly string[];
export declare const SUPPORTED_MIME_LITERALS: ReadonlySet<string>;
export type DocumentExtractionFailure = {
    readonly kind: "binary-file";
    readonly mimeHint?: string | undefined;
} | {
    readonly kind: "unsupported-type";
    readonly mimeHint?: string | undefined;
} | {
    readonly kind: "denied-path";
} | {
    readonly kind: "not-found";
} | {
    readonly kind: "unreadable";
} | {
    readonly kind: "empty";
};
export interface ExtractedDocumentContext {
    readonly id: string;
    readonly displayName: string;
    readonly mimeType: string;
    readonly sizeBytes: number;
    readonly extractedBytes: number;
    readonly truncated: boolean;
    readonly truncationMarker: string | undefined;
    readonly text: string;
}
export interface DocumentExtractionBudget {
    readonly perDocBytes: number;
    readonly totalBudgetUsedBytes: number;
    readonly totalBudgetBytes: number;
}
export type DocumentExtractionResult = {
    readonly ok: true;
    readonly context: ExtractedDocumentContext;
} | {
    readonly ok: false;
    readonly failure: DocumentExtractionFailure;
};
export declare function extractDocumentContext(fs: WorkspaceFs, workspaceRoot: string, relativePath: string, budget: DocumentExtractionBudget): Promise<DocumentExtractionResult>;
//# sourceMappingURL=document-extraction.d.ts.map