import type { ProxyContextPolicy, ProxyContextEvidence, ProxyPreparedContext } from "../types/index.js";
/** Local refusal before spending a provider request; never silently truncates. */
export declare class ProxyContextPreflightError extends Error {
    readonly code: string;
    readonly evidence?: ProxyContextEvidence | undefined;
    readonly status = 400;
    readonly retryable = false;
    constructor(code: string, message: string, evidence?: ProxyContextEvidence | undefined);
}
/** An invalid configured budget must not silently disable protection. */
export declare function parseProxyContextPolicy(raw: string | undefined): ProxyContextPolicy;
export declare function getProxyContextPolicy(): ProxyContextPolicy;
/**
 * Preserve history, instructions and tool-call pairs. Tool reduction is explicit
 * opt-in; discovered/configured context limits never use a guessed model default.
 */
export declare function prepareProxyRequestContext<T extends object>(args: {
    provider: string;
    model: string;
    body: T;
    /** Original protocol body before an adapter flattens historical tool calls. */
    toolReferenceBody?: unknown;
    maxOutputTokens?: number;
    policy?: ProxyContextPolicy;
}): ProxyPreparedContext<T>;
