export interface ContextPreflightOptions {
    provider: string;
    model?: string;
    contextWindow?: number;
    reservedOutputTokens?: number;
    safetyMarginTokens?: number;
    runId?: string;
    nodeId?: string;
    projectRoot?: string;
}
export interface ContextPreflightReport {
    provider: string;
    model?: string;
    contextWindow?: number;
    reservedOutputTokens: number;
    safetyMarginTokens: number;
    maxInputTokens: number | null;
    inputTokensEstimated: number;
    inputTokensAfterCompaction: number;
    originalChars: number;
    finalChars: number;
    compacted: boolean;
    ok: boolean;
    reason?: string;
    runId?: string;
    nodeId?: string;
    projectRoot?: string;
}
export interface InputPreflightResult {
    ok: boolean;
    input: string;
    report: ContextPreflightReport;
}
export interface PreflightMessage {
    role: "system" | "user" | "assistant";
    content: string;
}
export interface MessagesPreflightResult {
    ok: boolean;
    messages: PreflightMessage[];
    report: ContextPreflightReport;
}
export declare function compactContext(input: string, options: ContextPreflightOptions): Promise<InputPreflightResult>;
export declare function estimateInputTokens(text: string): number;
export declare function preflightProviderInput(input: string, options: ContextPreflightOptions): Promise<InputPreflightResult>;
export declare function preflightProviderMessages(messages: readonly PreflightMessage[], options: ContextPreflightOptions): Promise<MessagesPreflightResult>;
export declare function contextPreflightErrorMessage(report: ContextPreflightReport): string;
