import type { SummaryLength } from "@steipete/summarize-core";
import type { OutputLanguage } from "../../../language.js";
import type { Attachment } from "../../../llm/attachments.js";
import { convertToMarkdownWithMarkitdown } from "../../../markitdown.js";
import type { FixedModelSpec } from "../../../model-spec.js";
import { type AssetAttachment } from "../../attachments.js";
export type AssetPreprocessContext = {
    env: Record<string, string | undefined>;
    envForRun: Record<string, string | undefined>;
    execFileImpl: Parameters<typeof convertToMarkdownWithMarkitdown>[0]["execFileImpl"];
    timeoutMs: number;
    preprocessMode: "off" | "auto" | "always";
    format: "text" | "markdown";
    lengthArg: {
        kind: "preset";
        preset: SummaryLength;
    } | {
        kind: "chars";
        maxCharacters: number;
    };
    outputLanguage: OutputLanguage;
    fixedModelSpec: FixedModelSpec | null;
    promptOverride?: string | null;
    lengthInstruction?: string | null;
    languageInstruction?: string | null;
    openaiApiKey?: string | null;
    openrouterApiKey?: string | null;
    openaiBaseUrl?: string | null;
};
export type AssetPreprocessResult = {
    promptText: string;
    attachments: Attachment[];
    assetFooterParts: string[];
    textContent: {
        content: string;
        bytes: number;
    } | null;
};
export type DocumentHandlingDecision = {
    mode: "inline";
} | {
    mode: "attach";
} | {
    mode: "preprocess";
} | {
    mode: "error";
    error: Error;
};
export declare function resolveDocumentHandling({ attachment, textContent, fileBytes, preprocessMode, fixedModelSpec, openaiApiKey, openrouterApiKey, openaiBaseUrl, }: {
    attachment: AssetAttachment;
    textContent: {
        content: string;
        bytes: number;
    } | null;
    fileBytes: Uint8Array | null;
    preprocessMode: "off" | "auto" | "always";
    fixedModelSpec: FixedModelSpec | null;
    openaiApiKey?: string | null;
    openrouterApiKey?: string | null;
    openaiBaseUrl?: string | null;
}): DocumentHandlingDecision;
export declare function prepareAssetPrompt({ ctx, attachment, }: {
    ctx: AssetPreprocessContext;
    attachment: AssetAttachment;
}): Promise<AssetPreprocessResult>;
