import type { AgentMessage } from "@mariozechner/pi-agent-core";
export declare const CONTEXT_LIMIT_TRUNCATION_NOTICE = "[truncated: output exceeded context limit]";
export declare const PREEMPTIVE_TOOL_RESULT_COMPACTION_PLACEHOLDER = "[compacted: tool output removed to free context]";
/** @deprecated Use {@link createToolResultContextGuardTransform} instead. Retained for compact.ts compatibility. */
type GuardableAgent = object;
/**
 * Creates a standalone transformContext function that enforces tool result context budgets.
 * This is the preferred way to guard tool result sizes -- build the transform externally
 * and pass it into the session creation flow via AgentOptions or post-construction assignment.
 *
 * @param params.contextWindowTokens - The model's context window size in tokens.
 * @param params.wrappedTransform - Optional pre-existing transformContext to chain (runs first).
 * @returns An async function suitable for use as Agent's transformContext callback.
 */
export declare function createToolResultContextGuardTransform(params: {
    contextWindowTokens: number;
    wrappedTransform?: (messages: AgentMessage[], signal: AbortSignal) => AgentMessage[] | Promise<AgentMessage[]>;
}): (messages: AgentMessage[], signal?: AbortSignal) => Promise<AgentMessage[]>;
/**
 * @deprecated Use {@link createToolResultContextGuardTransform} instead.
 * This function mutates the agent's private transformContext field directly.
 * Retained for backward compatibility with compact.ts; will be removed in a future cleanup.
 */
export declare function installToolResultContextGuard(params: {
    agent: GuardableAgent;
    contextWindowTokens: number;
}): () => void;
export {};
